precompiled exe for commandline (and/or send to folder)
https://bitbucket.org/CBMFreak/md2model ... deldef.exe
header file
https://bitbucket.org/CBMFreak/md2model ... r/anorms.h
main file
https://bitbucket.org/CBMFreak/md2model ... ter/main.c
there can still be bugs though... it seems that not all md2 files that have another name than tris.md2 gets their texture detected ... but I will fix that
Code: Select all
C:\gcc-prj\md2modeldef\bin\Debug>md2modeldef.exe tris.md2
standard md2...
skin name: players\crakhor\crakhor.pcx
standard md2 open...
getting size...
temp : players\crakhor
temp2: crakhor
temp3: crakhor.pcx
string: players\crakhor\crakhor.pcx
temp2: crakhor
creating filename... crakhor.modeldef
continue...
completing header...
writing frames...
temp: 01
temp:
writing frame...
write: sta
new set: 1
frame letter: A
---------------------------------------
local: 0
global: 1
sprite val new: 1
sprite val old: 0
sprite name: sta0
frame old:
frame set: stand
frame nr: 0
frame name: stand01
---------------------------------------
written (1 of 10) sprite name: sta0
temp: 02
temp: 01
writing frame...
same set
frame letter: B
---------------------------------------
local: 1
global: 2
sprite val new: 2
sprite val old: 1
sprite name: sta0
frame old: stand
frame set: stand
frame nr: 1
frame name: stand02
---------------------------------------
written (1 of 10) sprite name: sta0
temp: 03
temp: 02
writing frame...
same set
frame letter: C
---------------------------------------
local: 2
global: 3
sprite val new: 3
.......
---------------------------------------
offset_skins: 68
offset_st: 132
offset_tris: 1736
offset_frames: 8936
offset_glcmds: 259208
offset_end: 271200
---------------------------------------
wrote file : crakhor.modeldef
C:\gcc-prj\md2modeldef\bin\Debug>type crakhor.modeldef
MODEL crakhor
{
Path "Models/crakhor"
SKIN 0 "crakhor.pcx"
MODEL 0 "tris.md2"
SKIN 1 "weapon.pcx"
MODEL 1 "weapon.md2"
Scale 1.2 1.2 1.2
zoffset 20
// stand01 set 1
frame sta0 A 0 "stand01"
frame sta0 A 1 "stand01"
frame sta0 B 0 "stand02"
frame sta0 B 1 "stand02"
frame sta0 C 0 "stand03"
frame sta0 C 1 "stand03"
frame sta0 D 0 "stand04"
frame sta0 D 1 "stand04"
frame sta0 E 0 "stand05"
frame sta0 E 1 "stand05"
frame sta0 F 0 "stand06"
frame sta0 F 1 "stand06"
frame sta0 G 0 "stand07"
frame sta0 G 1 "stand07"
frame sta0 H 0 "stand08"
frame sta0 H 1 "stand08"
frame sta0 I 0 "stand09"
frame sta0 I 1 "stand09"
frame sta0 J 0 "stand10"
frame sta0 J 1 "stand10"
frame sta1 A 0 "stand11"
frame sta1 A 1 "stand11"
frame sta1 B 0 "stand12"
frame sta1 B 1 "stand12"
frame sta1 C 0 "stand13"
frame sta1 C 1 "stand13"
frame sta1 D 0 "stand14"
frame sta1 D 1 "stand14"
frame sta1 E 0 "stand15"
frame sta1 E 1 "stand15"
frame sta1 F 0 "stand16"
frame sta1 F 1 "stand16"
frame sta1 G 0 "stand17"
frame sta1 G 1 "stand17"
frame sta1 H 0 "stand18"
frame sta1 H 1 "stand18"
frame sta1 I 0 "stand19"
frame sta1 I 1 "stand19"
frame sta1 J 0 "stand20"
frame sta1 J 1 "stand20"
frame sta2 A 0 "stand21"
frame sta2 A 1 "stand21"
frame sta2 B 0 "stand22"
frame sta2 B 1 "stand22"
frame sta2 C 0 "stand23"
frame sta2 C 1 "stand23"
frame sta2 D 0 "stand24"
frame sta2 D 1 "stand24"
frame sta2 E 0 "stand25"
frame sta2 E 1 "stand25"
frame sta2 F 0 "stand26"
frame sta2 F 1 "stand26"
frame sta2 G 0 "stand27"
frame sta2 G 1 "stand27"
frame sta2 H 0 "stand28"
frame sta2 H 1 "stand28"
frame sta2 I 0 "stand29"
frame sta2 I 1 "stand29"
frame sta2 J 0 "stand30"
frame sta2 J 1 "stand30"
frame sta3 A 0 "stand31"
frame sta3 A 1 "stand31"
frame sta3 B 0 "stand32"
frame sta3 B 1 "stand32"
frame sta3 C 0 "stand33"
frame sta3 C 1 "stand33"
frame sta3 D 0 "stand34"
frame sta3 D 1 "stand34"
frame sta3 E 0 "stand35"
frame sta3 E 1 "stand35"
frame sta3 F 0 "stand36"
frame sta3 F 1 "stand36"
frame sta3 G 0 "stand37"
frame sta3 G 1 "stand37"
frame sta3 H 0 "stand38"
frame sta3 H 1 "stand38"
frame sta3 I 0 "stand39"
frame sta3 I 1 "stand39"
frame sta3 J 0 "stand40"
frame sta3 J 1 "stand40"
// run1 set 2
frame run0 A 0 "run1"
frame run0 A 1 "run1"
frame run0 B 0 "run2"
frame run0 B 1 "run2"
frame run0 C 0 "run3"
frame run0 C 1 "run3"
frame run0 D 0 "run4"
frame run0 D 1 "run4"
frame run0 E 0 "run5"
frame run0 E 1 "run5"
frame run0 F 0 "run6"
frame run0 F 1 "run6"
// attack1 set 3
frame att0 A 0 "attack1"
frame att0 A 1 "attack1"
frame att0 B 0 "attack2"
frame att0 B 1 "attack2"
frame att0 C 0 "attack3"
frame att0 C 1 "attack3"
frame att0 D 0 "attack4"
frame att0 D 1 "attack4"
frame att0 E 0 "attack5"
frame att0 E 1 "attack5"
frame att0 F 0 "attack6"
frame att0 F 1 "attack6"
frame att0 G 0 "attack7"
frame att0 G 1 "attack7"
frame att0 H 0 "attack8"
frame att0 H 1 "attack8"
// pain101 set 4
frame pai1 A 0 "pain101"
frame pai1 A 1 "pain101"
frame pai1 B 0 "pain102"
frame pai1 B 1 "pain102"
frame pai1 C 0 "pain103"
frame pai1 C 1 "pain103"
frame pai1 D 0 "pain104"
frame pai1 D 1 "pain104"
frame pai2 A 0 "pain201"
frame pai2 A 1 "pain201"
frame pai2 B 0 "pain202"
frame pai2 B 1 "pain202"
frame pai2 C 0 "pain203"
frame pai2 C 1 "pain203"
frame pai2 D 0 "pain204"
frame pai2 D 1 "pain204"
frame pai3 A 0 "pain301"
frame pai3 A 1 "pain301"
frame pai3 B 0 "pain302"
frame pai3 B 1 "pain302"
frame pai4 A 0 "pain303"
frame pai4 A 1 "pain303"
frame pai4 B 0 "pain304"
frame pai4 B 1 "pain304"
// jump1 set 5
//frame jum0 A 0 "jump1"
//frame jum0 A 1 "jump1"
//frame jum0 B 0 "jump2"
//frame jum0 B 1 "jump2"
//frame jum0 C 0 "jump3"
//frame jum0 C 1 "jump3"
//frame jum0 D 0 "jump4"
//frame jum0 D 1 "jump4"
//frame jum0 E 0 "jump5"
//frame jum0 E 1 "jump5"
//frame jum0 F 0 "jump6"
//frame jum0 F 1 "jump6"
// flip01 set 6
//frame fli0 A 0 "flip01"
//frame fli0 A 1 "flip01"
//frame fli0 B 0 "flip02"
//frame fli0 B 1 "flip02"
//frame fli0 C 0 "flip03"
//frame fli0 C 1 "flip03"
//frame fli0 D 0 "flip04"
//frame fli0 D 1 "flip04"
//frame fli0 E 0 "flip05"
//frame fli0 E 1 "flip05"
//frame fli0 F 0 "flip06"
//frame fli0 F 1 "flip06"
//frame fli0 G 0 "flip07"
//frame fli0 G 1 "flip07"
//frame fli0 H 0 "flip08"
//frame fli0 H 1 "flip08"
//frame fli0 I 0 "flip09"
//frame fli0 I 1 "flip09"
//frame fli0 J 0 "flip10"
//frame fli0 J 1 "flip10"
//frame fli1 A 0 "flip11"
//frame fli1 A 1 "flip11"
//frame fli1 B 0 "flip12"
//frame fli1 B 1 "flip12"
// salute01 set 7
//frame sal0 A 0 "salute01"
//frame sal0 A 1 "salute01"
//frame sal0 B 0 "salute02"
//frame sal0 B 1 "salute02"
//frame sal0 C 0 "salute03"
//frame sal0 C 1 "salute03"
//frame sal0 D 0 "salute04"
//frame sal0 D 1 "salute04"
//frame sal0 E 0 "salute05"
//frame sal0 E 1 "salute05"
//frame sal0 F 0 "salute06"
//frame sal0 F 1 "salute06"
//frame sal0 G 0 "salute07"
//frame sal0 G 1 "salute07"
//frame sal0 H 0 "salute08"
//frame sal0 H 1 "salute08"
//frame sal0 I 0 "salute09"
//frame sal0 I 1 "salute09"
//frame sal0 J 0 "salute10"
//frame sal0 J 1 "salute10"
//frame sal1 A 0 "salute11"
//frame sal1 A 1 "salute11"
// taunt01 set 8
//frame tau0 A 0 "taunt01"
//frame tau0 A 1 "taunt01"
//frame tau0 B 0 "taunt02"
//frame tau0 B 1 "taunt02"
//frame tau0 C 0 "taunt03"
//frame tau0 C 1 "taunt03"
//frame tau0 D 0 "taunt04"
//frame tau0 D 1 "taunt04"
//frame tau0 E 0 "taunt05"
//frame tau0 E 1 "taunt05"
//frame tau0 F 0 "taunt06"
//frame tau0 F 1 "taunt06"
//frame tau0 G 0 "taunt07"
//frame tau0 G 1 "taunt07"
//frame tau0 H 0 "taunt08"
//frame tau0 H 1 "taunt08"
//frame tau0 I 0 "taunt09"
//frame tau0 I 1 "taunt09"
//frame tau0 J 0 "taunt10"
//frame tau0 J 1 "taunt10"
//frame tau1 A 0 "taunt11"
//frame tau1 A 1 "taunt11"
//frame tau1 B 0 "taunt12"
//frame tau1 B 1 "taunt12"
//frame tau1 C 0 "taunt13"
//frame tau1 C 1 "taunt13"
//frame tau1 D 0 "taunt14"
//frame tau1 D 1 "taunt14"
//frame tau1 E 0 "taunt15"
//frame tau1 E 1 "taunt15"
//frame tau1 F 0 "taunt16"
//frame tau1 F 1 "taunt16"
//frame tau1 G 0 "taunt17"
//frame tau1 G 1 "taunt17"
// wave01 set 9
//frame wav0 A 0 "wave01"
//frame wav0 A 1 "wave01"
//frame wav0 B 0 "wave02"
//frame wav0 B 1 "wave02"
//frame wav0 C 0 "wave03"
//frame wav0 C 1 "wave03"
//frame wav0 D 0 "wave04"
//frame wav0 D 1 "wave04"
//frame wav0 E 0 "wave05"
//frame wav0 E 1 "wave05"
//frame wav0 F 0 "wave06"
//frame wav0 F 1 "wave06"
//frame wav0 G 0 "wave07"
//frame wav0 G 1 "wave07"
//frame wav0 H 0 "wave08"
//frame wav0 H 1 "wave08"
//frame wav0 I 0 "wave09"
//frame wav0 I 1 "wave09"
//frame wav0 J 0 "wave10"
//frame wav0 J 1 "wave10"
//frame wav1 A 0 "wave11"
//frame wav1 A 1 "wave11"
// point01 set 10
//frame poi0 A 0 "point01"
//frame poi0 A 1 "point01"
//frame poi0 B 0 "point02"
//frame poi0 B 1 "point02"
//frame poi0 C 0 "point03"
//frame poi0 C 1 "point03"
//frame poi0 D 0 "point04"
//frame poi0 D 1 "point04"
//frame poi0 E 0 "point05"
//frame poi0 E 1 "point05"
//frame poi0 F 0 "point06"
//frame poi0 F 1 "point06"
//frame poi0 G 0 "point07"
//frame poi0 G 1 "point07"
//frame poi0 H 0 "point08"
//frame poi0 H 1 "point08"
//frame poi0 I 0 "point09"
//frame poi0 I 1 "point09"
//frame poi0 J 0 "point10"
//frame poi0 J 1 "point10"
//frame poi1 A 0 "point11"
//frame poi1 A 1 "point11"
//frame poi1 B 0 "point12"
//frame poi1 B 1 "point12"
// crstnd01 set 11
frame crs0 A 0 "crstnd01"
frame crs0 A 1 "crstnd01"
frame crs0 B 0 "crstnd02"
frame crs0 B 1 "crstnd02"
frame crs0 C 0 "crstnd03"
frame crs0 C 1 "crstnd03"
frame crs0 D 0 "crstnd04"
frame crs0 D 1 "crstnd04"
frame crs0 E 0 "crstnd05"
frame crs0 E 1 "crstnd05"
frame crs0 F 0 "crstnd06"
frame crs0 F 1 "crstnd06"
frame crs0 G 0 "crstnd07"
frame crs0 G 1 "crstnd07"
frame crs0 H 0 "crstnd08"
frame crs0 H 1 "crstnd08"
frame crs0 I 0 "crstnd09"
frame crs0 I 1 "crstnd09"
frame crs0 J 0 "crstnd10"
frame crs0 J 1 "crstnd10"
frame crs1 A 0 "crstnd11"
frame crs1 A 1 "crstnd11"
frame crs1 B 0 "crstnd12"
frame crs1 B 1 "crstnd12"
frame crs1 C 0 "crstnd13"
frame crs1 C 1 "crstnd13"
frame crs1 D 0 "crstnd14"
frame crs1 D 1 "crstnd14"
frame crs1 E 0 "crstnd15"
frame crs1 E 1 "crstnd15"
frame crs1 F 0 "crstnd16"
frame crs1 F 1 "crstnd16"
frame crs1 G 0 "crstnd17"
frame crs1 G 1 "crstnd17"
frame crs1 H 0 "crstnd18"
frame crs1 H 1 "crstnd18"
frame crs1 I 0 "crstnd19"
frame crs1 I 1 "crstnd19"
// crwalk1 set 12
frame crw0 A 0 "crwalk1"
frame crw0 A 1 "crwalk1"
frame crw0 B 0 "crwalk2"
frame crw0 B 1 "crwalk2"
frame crw0 C 0 "crwalk3"
frame crw0 C 1 "crwalk3"
frame crw0 D 0 "crwalk4"
frame crw0 D 1 "crwalk4"
frame crw0 E 0 "crwalk5"
frame crw0 E 1 "crwalk5"
frame crw0 F 0 "crwalk6"
frame crw0 F 1 "crwalk6"
// crattak1 set 13
frame cra0 A 0 "crattak1"
frame cra0 A 1 "crattak1"
frame cra0 B 0 "crattak2"
frame cra0 B 1 "crattak2"
frame cra0 C 0 "crattak3"
frame cra0 C 1 "crattak3"
frame cra0 D 0 "crattak4"
frame cra0 D 1 "crattak4"
frame cra0 E 0 "crattak5"
frame cra0 E 1 "crattak5"
frame cra0 F 0 "crattak6"
frame cra0 F 1 "crattak6"
frame cra0 G 0 "crattak7"
frame cra0 G 1 "crattak7"
frame cra0 H 0 "crattak8"
frame cra0 H 1 "crattak8"
frame cra0 I 0 "crattak9"
frame cra0 I 1 "crattak9"
// crpain1 set 14
frame crp0 A 0 "crpain1"
frame crp0 A 1 "crpain1"
frame crp0 B 0 "crpain2"
frame crp0 B 1 "crpain2"
frame crp0 C 0 "crpain3"
frame crp0 C 1 "crpain3"
frame crp0 D 0 "crpain4"
frame crp0 D 1 "crpain4"
// crdeath1 set 15
frame crd0 A 0 "crdeath1"
frame crd0 A 1 "crdeath1"
frame crd0 B 0 "crdeath2"
frame crd0 B 1 "crdeath2"
frame crd0 C 0 "crdeath3"
frame crd0 C 1 "crdeath3"
frame crd0 D 0 "crdeath4"
frame crd0 D 1 "crdeath4"
frame crd0 E 0 "crdeath5"
frame crd0 E 1 "crdeath5"
// death101 set 16
frame dea1 A 0 "death101"
frame dea1 A 1 "death101"
frame dea1 B 0 "death102"
frame dea1 B 1 "death102"
frame dea1 C 0 "death103"
frame dea1 C 1 "death103"
frame dea1 D 0 "death104"
frame dea1 D 1 "death104"
frame dea1 E 0 "death105"
frame dea1 E 1 "death105"
frame dea1 F 0 "death106"
frame dea1 F 1 "death106"
frame dea2 A 0 "death201"
frame dea2 A 1 "death201"
frame dea2 B 0 "death202"
frame dea2 B 1 "death202"
frame dea2 C 0 "death203"
frame dea2 C 1 "death203"
frame dea2 D 0 "death204"
frame dea2 D 1 "death204"
frame dea3 A 0 "death205"
frame dea3 A 1 "death205"
frame dea3 B 0 "death206"
frame dea3 B 1 "death206"
frame dea4 A 0 "death301"
frame dea4 A 1 "death301"
frame dea4 B 0 "death302"
frame dea4 B 1 "death302"
frame dea4 C 0 "death303"
frame dea4 C 1 "death303"
frame dea4 D 0 "death304"
frame dea4 D 1 "death304"
frame dea4 E 0 "death305"
frame dea4 E 1 "death305"
frame dea4 F 0 "death306"
frame dea4 F 1 "death306"
frame dea4 G 0 "death307"
frame dea4 G 1 "death307"
frame dea4 H 0 "death308"
frame dea4 H 1 "death308"
}
C:\gcc-prj\md2modeldef\bin\Debug>