Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DC code plugin
#1
[] 
Remember me saying that I was working on the syntax highlighter? Yes? Well, here it is. It's basically a generic syntax highlighter, which has been "CSSed", extended and so on. Following languages (among DC) are, according to the php-code, supported (be careful, I haven't tested them all): actionscript, ada, apache, asm, asp, bash, c, c_mac, caddcl, cadlisp, cdfg, cobol, cpp, csharp, css, delphi, dos, gettext, html4strict, ini, java, javascript, klonec, klonecpp, lisp, lua, matlab, mpasm, nsis, objc, oobas, oracle8, pascal, perl, php, python, qbasic, sas, scilab, smarty, vb, vbnet, visualfoxpro, xml.

What you have to do:
use the regular [ code]-tag (ofc, without the spaces). But, in order to tell the parser which language shall be parsed, you'll take: [ code=language]
For example, if you want to use the dc-code, you'll need to write [ code=dc]. An example is shown below. Regular c-code would get the tag [ code=c], and so on. Easy as that.

Example:
    DC-Code:
<bmp_begin>
name: Bandit
head: sprite\sys\bandit_f.bmp
small: sprite\sys\bandit_s.bmp
file(0-69): sprite\sys\bandit_0.bmp  w: 79  h: 79  row: 10  col: 7
file(70-139): sprite\sys\bandit_1.bmp  w: 79  h: 79  row: 10  col: 7
file(140-209): sprite\sys\bandit_0b.bmp  w: 79  h: 79  row: 10  col: 7
file(210-279): sprite\sys\bandit_1b.bmp  w: 79  h: 79  row: 10  col: 7
walking_frame_rate 3
walking_speed 4.000000
walking_speedz 2.000000
running_frame_rate 3
running_speed 8.000000
running_speedz 1.300000
heavy_walking_speed 3.000000
heavy_walking_speedz 1.500000
heavy_running_speed 5.000000
heavy_running_speedz 0.800000
jump_height -16.299999
jump_distance 8.000000
jump_distancez 3.000000
dash_height -11.000000
dash_distance 15.000000
dash_distancez 3.750000
rowing_height -2.000000
rowing_distance 5.000000
<bmp_end>
 
#random comment
 
<frame> 0 standing
   pic: 0  state: 0  wait: 5  next: 1  dvx: 0  dvy: 0  dvz: 0  centerx: 39  centery: 79  hit_a: 0  hit_d: 0  hit_j: 0
   bpoint:
      x: 43  y: 38
   bpoint_end:
   wpoint:
      kind: 1  x: 23  y: 46  weaponact: 35  attacking: 0  cover: 0  dvx: 0  dvy: 0  dvz: 0 
   wpoint_end:
   bdy:
      kind: 0  x: 21  y: 18  w: 43  h: 62
   bdy_end:
<frame_end>



Enjoy :)
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
#2
awesome sh¡t

ill just test my own UE32 highlighting list with it here :D

    DC-Code:
/L10"DATA" File Extensions = DAT TXT
/Delimiters = (	) 
/C1"Frames" #0000A0
<bmp_begin> <bmp_end> <boss> <background> <background_end>
<end>
<frame> <frame_end> <file_editing> <file_editing_end>
<object> <object_end>
<phase> <phase_end>
<stage> <stage_end> <soldier>
<weapon_strength_list> <weapon_strength_list_end>
 
/C2"Attributes" #800000
attacking: aaction: action: act: arest:
backhurtact: bdefend: bound:
col: centerx: centery: cover: catchingact: caughtact: cc: c1: c2:
dash_height dash_distance dash_distancez dvx: dvy: dvz: decrease: dircontrol:
effect: entry:
file fronthurtact: fall: facing: file:
heavy_walking_speed heavy_walking_speedz heavy_running_speed heavy_running_speedz h: head: hit_a: hit_d: hit_j: hit_Fa: hit_Ua: hit_Da: hit_Fj: hit_Uj: hit_Dj: hit_ja: hurtable: hp: height:
id: injury:
jump_height jump_distance jump_distancez join:
kind:
loop:
mp: music:
name: next:
oid:
pic:
running_frame_rate running_speed running_speedz rowing_height rowing_distance row: ratio: rect: reserve:
small: state: sound: shadow: shadowsize:
taction: throwvx: throwvy: throwvz: throwinjury: times: type: transparency:
vaction: vrest:
walking_frame_rate walking_speed walking_speedz w: wait: weaponact: weapon_hit_sound: weapon_drop_sound: weapon_broken_sound: weapon_hp: weapon_drop_hurt: width: when_clear_goto_phase:
x:
y:
zwidth: zboundary:
 
/C3"Tags" #008040
bpoint: bpoint_end: bdy: bdy_end:
cpoint: cpoint_end:
itr: itr_end:
layer: layer_end
opoint: opoint_end:
wpoint: wpoint_end:
 
/C4"Comments" #808080
** #
 
/C5"URL"
** http://


ohoo ... some are missing - but neat never the less

edit: maybe also just label it 'data' instead of 'DC Programming' ...
Reply
Thanks given by: Silverthorn
#3
thanks for mentioning, I'll implement them (shouldn't take THAT long now :D)

--

done :D
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#4
next gadget in line for the forum: auto complete :P

    JAVA-Code:
//keywords
    private String[] tokens1 = {
        //objects
        "<bmp_begin>", "<bmp_end>", "<frame>", "<frame_end>",
        "<weapon_strength_list>", "<weapon_strength_list_end>",
 
        //stage
        "<stage>", "<stage_end>", "<phase>", "<phase_end>",
        "<boss>", "<soldier>", "<end>",
 
        "<background>", "<background_end>", "<file_editing>", "<file_editing_end>",
        "<object>", "<object_end>"
    };
    private String[] tokens2 = {
        //char
        "itr:", "itr_end:", "wpoint:", "wpoint_end:",
        "bdy:", "bdy_end:", "bpoint:", "bpoint_end:",
        "opoint:", "opoint_end:", "cpoint:", "cpoint_end:",
 
        //bg
        "layer:", "layer_end"
    };
    private String[] tokens3 = {
        //bmp part
        "name:", "head:", "small:", //"file", "file:",
        "w:", "h:", "row:", "col:",
        "walking_frame_rate", "walking_speed", "walking_speedz",
        "running_frame_rate", "running_speed", "running_speedz",
        "heavy_walking_speed", "heavy_walking_speedz",
        "heavy_running_speed", "heavy_running_speedz",
        "jump_height", "jump_distance", "jump_distancez",
        "dash_height", "dash_distance", "dash_distancez",
        "rowing_height", "rowing_distance",
        "type:",
        //frame tokens
        "pic:", "state:", "wait:", "next:",
        "dvx:",    "dvy:",    "dvz:",
        "centerx:", "centery:",
        "hit_a:", "hit_j:",    "hit_d:",
        "hit_Fa:", "hit_Ua:", "hit_Da:",
        "hit_Fj:", "hit_Uj:", "hit_Dj:", "hit_ja:",
        "sound:", "mp:",
        "weapon_hit_sound:", "weapon_drop_sound:", "weapon_broken_sound:",
        "entry:",
 
        //frame element tokens
        "kind:", "x:", "y:", "zwidth:", "arest:", "vrest:",
        "bdefend:", "fall:", "injury:", "effect:",
        "weaponact:", "attacking:", "cover:",
        "catchingact:", "caughtact:",
        "vaction:", "hurtable:",
        "throwvx:", "throwvy:", "throwvz:",
        "throwinjury:", "decrease:",
        "aaction:", "taction:", "dircontrol:",
        "oid:",    "facing:", "action:",
        "fronthurtact:", "backhurtact:",
        "weapon_hp:", "weapon_drop_hurt:",
 
        //stage
        "bound:", "music:", "id:", "act:", "hp:", "times:",
        "ratio:", "reserve:", "join:", "when_clear_goto_phase:",
 
        //backgrounds
        "zboundary:", "shadow:", "shadowsize:", "rect:",
        "width:", "height:", "transparency:",
        "loop:", "cc:", "c1:", "c2:"
 
    };




Azriel~
Reply
Thanks given by:
#5
wow, awesome, good work BP.

I just hope you still have the files you updated or uploaded cause of mybb updates... don't want to delete your work for accident! (so plz send them to my mail or so ;))
[Image: random.php?pic=random]
www.lf-empire.de
Once I had a fortune, it said: "Leave now. Life is short. Time is luck"
Don't dream your life, live your dream!
Reply
Thanks given by:
#6
hm could we get rid of the line numbers? or turn them into a graphical feature only - because even tho they do not seem to get selected they still get into my copy pasting
Reply
Thanks given by:
#7
(04-23-2009, 04:21 PM)YinYin Wrote:  hm could we get rid of the line numbers? or turn them into a graphical feature only - because even tho they do not seem to get selected they still get into my copy pasting
The line number system is quite stupid, actually. It's just a ordered list :P
I can disable the line numbers, tho; seems like we won't need it anyways ;)
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by: YinYin , dunce326




Users browsing this thread: 1 Guest(s)