Talk:DEF Language: Difference between revisions
Hendricks266 (talk | contribs) No edit summary |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
===cleanup | ==from source== | ||
This seems to be missing the palmap definitions: (defineconv, {bluepal, brownpal, greypal, greenpal, redpal, specpal}), among other things. -[[User:Hendricks 266|Hendricks266]] 17:31, 7 May 2009 (PDT) | |||
typedef struct { char *text; int32_t tokenid; } tokenlist; | |||
static tokenlist basetokens[] = | |||
{ | |||
{ "include", T_INCLUDE }, | |||
{ "#include", T_INCLUDE }, | |||
{ "define", T_DEFINE }, | |||
{ "#define", T_DEFINE }, | |||
// deprecated style | |||
{ "definetexture", T_DEFINETEXTURE }, | |||
{ "defineskybox", T_DEFINESKYBOX }, | |||
{ "definetint", T_DEFINETINT }, | |||
{ "definemodel", T_DEFINEMODEL }, | |||
{ "definemodelframe",T_DEFINEMODELFRAME }, | |||
{ "definemodelanim", T_DEFINEMODELANIM }, | |||
{ "definemodelskin", T_DEFINEMODELSKIN }, | |||
{ "selectmodelskin", T_SELECTMODELSKIN }, | |||
{ "definevoxel", T_DEFINEVOXEL }, | |||
{ "definevoxeltiles",T_DEFINEVOXELTILES }, | |||
// new style | |||
{ "model", T_MODEL }, | |||
{ "voxel", T_VOXEL }, | |||
{ "skybox", T_SKYBOX }, | |||
{ "tint", T_TINT }, | |||
{ "texture", T_TEXTURE }, | |||
{ "tile", T_TEXTURE }, | |||
{ "music", T_MUSIC }, | |||
{ "sound", T_SOUND }, | |||
// other stuff | |||
{ "undefmodel", T_UNDEFMODEL }, | |||
{ "undefmodelrange", T_UNDEFMODELRANGE }, | |||
{ "undefmodelof", T_UNDEFMODELOF }, | |||
{ "undeftexture", T_UNDEFTEXTURE }, | |||
{ "undeftexturerange", T_UNDEFTEXTURERANGE }, | |||
{ "alphahack", T_ALPHAHACK }, | |||
{ "alphahackrange", T_ALPHAHACKRANGE }, | |||
{ "spritecol", T_SPRITECOL }, | |||
{ "2dcol", T_2DCOL }, | |||
{ "fogpal", T_FOGPAL }, | |||
{ "loadgrp", T_LOADGRP }, | |||
{ "dummytile", T_DUMMYTILE }, | |||
{ "dummytilerange", T_DUMMYTILERANGE }, | |||
{ "setuptile", T_SETUPTILE }, | |||
{ "setuptilerange", T_SETUPTILERANGE }, | |||
{ "animtilerange", T_ANIMTILERANGE }, | |||
{ "cachesize", T_CACHESIZE }, | |||
{ "dummytilefrompic",T_IMPORTTILE }, | |||
{ "tilefromtexture", T_TILEFROMTEXTURE }, | |||
}; | |||
static tokenlist modeltokens[] = | |||
{ | |||
{ "scale", T_SCALE }, | |||
{ "shade", T_SHADE }, | |||
{ "zadd", T_ZADD }, | |||
{ "frame", T_FRAME }, | |||
{ "anim", T_ANIM }, | |||
{ "skin", T_SKIN }, | |||
{ "detail", T_DETAIL }, | |||
{ "glow", T_GLOW }, | |||
{ "specular", T_SPECULAR }, | |||
{ "normal", T_NORMAL }, | |||
{ "hud", T_HUD }, | |||
{ "flags", T_FLAGS }, | |||
}; | |||
static tokenlist modelframetokens[] = | |||
{ | |||
{ "pal", T_PAL }, | |||
{ "frame", T_FRAME }, | |||
{ "name", T_FRAME }, | |||
{ "tile", T_TILE }, | |||
{ "tile0", T_TILE0 }, | |||
{ "tile1", T_TILE1 }, | |||
{ "smoothduration", T_SMOOTHDURATION }, | |||
}; | |||
static tokenlist modelanimtokens[] = | |||
{ | |||
{ "frame0", T_FRAME0 }, | |||
{ "frame1", T_FRAME1 }, | |||
{ "fps", T_FPS }, | |||
{ "flags", T_FLAGS }, | |||
}; | |||
static tokenlist modelskintokens[] = | |||
{ | |||
{ "pal", T_PAL }, | |||
{ "file", T_FILE }, | |||
{ "surf", T_SURF }, | |||
{ "surface", T_SURF }, | |||
{ "intensity", T_PARAM }, | |||
{ "scale", T_PARAM }, | |||
{ "detailscale", T_PARAM }, | |||
{ "specpower", T_SPECPOWER }, | |||
{ "specfactor", T_SPECFACTOR }, | |||
}; | |||
static tokenlist modelhudtokens[] = | |||
{ | |||
{ "tile", T_TILE }, | |||
{ "tile0", T_TILE0 }, | |||
{ "tile1", T_TILE1 }, | |||
{ "xadd", T_XADD }, | |||
{ "yadd", T_YADD }, | |||
{ "zadd", T_ZADD }, | |||
{ "angadd", T_ANGADD }, | |||
{ "hide", T_HIDE }, | |||
{ "nobob", T_NOBOB }, | |||
{ "flipped",T_FLIPPED}, | |||
{ "nodepth",T_NODEPTH}, | |||
}; | |||
static tokenlist voxeltokens[] = | |||
{ | |||
{ "tile", T_TILE }, | |||
{ "tile0", T_TILE0 }, | |||
{ "tile1", T_TILE1 }, | |||
{ "scale", T_SCALE }, | |||
}; | |||
static tokenlist skyboxtokens[] = | |||
{ | |||
{ "tile" ,T_TILE }, | |||
{ "pal" ,T_PAL }, | |||
{ "ft" ,T_FRONT },{ "front" ,T_FRONT },{ "forward",T_FRONT }, | |||
{ "rt" ,T_RIGHT },{ "right" ,T_RIGHT }, | |||
{ "bk" ,T_BACK },{ "back" ,T_BACK }, | |||
{ "lf" ,T_LEFT },{ "left" ,T_LEFT },{ "lt" ,T_LEFT }, | |||
{ "up" ,T_TOP },{ "top" ,T_TOP },{ "ceiling",T_TOP },{ "ceil" ,T_TOP }, | |||
{ "dn" ,T_BOTTOM },{ "bottom" ,T_BOTTOM },{ "floor" ,T_BOTTOM },{ "down" ,T_BOTTOM } | |||
}; | |||
static tokenlist tinttokens[] = | |||
{ | |||
{ "pal", T_PAL }, | |||
{ "red", T_RED },{ "r", T_RED }, | |||
{ "green", T_GREEN },{ "g", T_GREEN }, | |||
{ "blue", T_BLUE },{ "b", T_BLUE }, | |||
{ "flags", T_FLAGS } | |||
}; | |||
static tokenlist texturetokens[] = | |||
{ | |||
{ "pal", T_PAL }, | |||
{ "detail", T_DETAIL }, | |||
{ "glow", T_GLOW }, | |||
{ "specular",T_SPECULAR }, | |||
{ "normal", T_NORMAL }, | |||
}; | |||
static tokenlist texturetokens_pal[] = | |||
{ | |||
{ "file", T_FILE },{ "name", T_FILE }, | |||
{ "alphacut", T_ALPHACUT }, | |||
{ "detailscale", T_XSCALE }, { "scale", T_XSCALE }, { "xscale", T_XSCALE }, { "intensity", T_XSCALE }, | |||
{ "yscale", T_YSCALE }, | |||
{ "specpower", T_SPECPOWER }, { "parallaxscale", T_SPECPOWER }, | |||
{ "specfactor", T_SPECFACTOR }, { "parallaxbias", T_SPECFACTOR }, | |||
{ "nocompress", T_NOCOMPRESS }, | |||
{ "nodownsize", T_NODOWNSIZE }, | |||
}; | |||
static tokenlist sound_musictokens[] = | |||
{ | |||
{ "id", T_ID }, | |||
{ "file", T_FILE }, | |||
}; | |||
static tokenlist tilefromtexturetokens[] = | |||
{ | |||
{ "file", T_FILE }, | |||
{ "name", T_FILE }, | |||
{ "alphacut", T_ALPHACUT }, | |||
{ "xoffset", T_XOFFSET }, | |||
{ "xoff", T_XOFFSET }, | |||
{ "yoffset", T_YOFFSET }, | |||
{ "yoff", T_YOFFSET }, | |||
}; | |||
Palmap support was dropped at some point and Polymer specification may not be finalized yet(it still can be changed). Apart from this, the page is up to date. --[[User:One|One]] 04:19, 8 May 2009 (PDT) | |||
:Yes, "palmaps" didn't really work very well and I didn't like how they were implemented so I removed them. They resided in the engine side of things, yet were hard coded to only work with Duke3D's palette configuration. This is a no-no. They also used just as much memory when loaded as just having a complete altered copy of the skin, because the overlays were added in at load time rather than multitextured on during rendering. Therefore, due to their implementation, the ONLY purpose they served was to possibly make the filesize of the HRP smaller, in a world where you can get 1000 GB of HD space for $100 USD. So they're gone. [[User:TX|TX]] 08:14, 8 May 2009 (PDT) | |||
==cleanup== | |||
This page needs some serious cleanup. First, we should get rid of all this EDuke32-native rubbish. Second, there's a lot of stuff that needs to be added, including palmaps by Hunter, normal maps, parallax maps, setuptile, tilefromtexture, (the animation tilefromtexture command), and many more things. The best place to look for a complete index is the source; I'm just not sure where. -[[User:Hendricks 266|Hendricks266]] 19:00, 4 May 2009 (PDT) | This page needs some serious cleanup. First, we should get rid of all this EDuke32-native rubbish. Second, there's a lot of stuff that needs to be added, including palmaps by Hunter, normal maps, parallax maps, setuptile, tilefromtexture, (the animation tilefromtexture command), and many more things. The best place to look for a complete index is the source; I'm just not sure where. -[[User:Hendricks 266|Hendricks266]] 19:00, 4 May 2009 (PDT) | ||
==old comments== | |||
Maybe the commands should just be listed here with links to separate pages for each command(not subcommands). Got a bit to big this way I think. | Maybe the commands should just be listed here with links to separate pages for each command(not subcommands). Got a bit to big this way I think. | ||
Latest revision as of 07:14, 8 May 2009
from source
This seems to be missing the palmap definitions: (defineconv, {bluepal, brownpal, greypal, greenpal, redpal, specpal}), among other things. -Hendricks266 17:31, 7 May 2009 (PDT)
typedef struct { char *text; int32_t tokenid; } tokenlist; static tokenlist basetokens[] = { { "include", T_INCLUDE }, { "#include", T_INCLUDE }, { "define", T_DEFINE }, { "#define", T_DEFINE }, // deprecated style { "definetexture", T_DEFINETEXTURE }, { "defineskybox", T_DEFINESKYBOX }, { "definetint", T_DEFINETINT }, { "definemodel", T_DEFINEMODEL }, { "definemodelframe",T_DEFINEMODELFRAME }, { "definemodelanim", T_DEFINEMODELANIM }, { "definemodelskin", T_DEFINEMODELSKIN }, { "selectmodelskin", T_SELECTMODELSKIN }, { "definevoxel", T_DEFINEVOXEL }, { "definevoxeltiles",T_DEFINEVOXELTILES }, // new style { "model", T_MODEL }, { "voxel", T_VOXEL }, { "skybox", T_SKYBOX }, { "tint", T_TINT }, { "texture", T_TEXTURE }, { "tile", T_TEXTURE }, { "music", T_MUSIC }, { "sound", T_SOUND }, // other stuff { "undefmodel", T_UNDEFMODEL }, { "undefmodelrange", T_UNDEFMODELRANGE }, { "undefmodelof", T_UNDEFMODELOF }, { "undeftexture", T_UNDEFTEXTURE }, { "undeftexturerange", T_UNDEFTEXTURERANGE }, { "alphahack", T_ALPHAHACK }, { "alphahackrange", T_ALPHAHACKRANGE }, { "spritecol", T_SPRITECOL }, { "2dcol", T_2DCOL }, { "fogpal", T_FOGPAL }, { "loadgrp", T_LOADGRP }, { "dummytile", T_DUMMYTILE }, { "dummytilerange", T_DUMMYTILERANGE }, { "setuptile", T_SETUPTILE }, { "setuptilerange", T_SETUPTILERANGE }, { "animtilerange", T_ANIMTILERANGE }, { "cachesize", T_CACHESIZE }, { "dummytilefrompic",T_IMPORTTILE }, { "tilefromtexture", T_TILEFROMTEXTURE }, }; static tokenlist modeltokens[] = { { "scale", T_SCALE }, { "shade", T_SHADE }, { "zadd", T_ZADD }, { "frame", T_FRAME }, { "anim", T_ANIM }, { "skin", T_SKIN }, { "detail", T_DETAIL }, { "glow", T_GLOW }, { "specular", T_SPECULAR }, { "normal", T_NORMAL }, { "hud", T_HUD }, { "flags", T_FLAGS }, }; static tokenlist modelframetokens[] = { { "pal", T_PAL }, { "frame", T_FRAME }, { "name", T_FRAME }, { "tile", T_TILE }, { "tile0", T_TILE0 }, { "tile1", T_TILE1 }, { "smoothduration", T_SMOOTHDURATION }, }; static tokenlist modelanimtokens[] = { { "frame0", T_FRAME0 }, { "frame1", T_FRAME1 }, { "fps", T_FPS }, { "flags", T_FLAGS }, }; static tokenlist modelskintokens[] = { { "pal", T_PAL }, { "file", T_FILE }, { "surf", T_SURF }, { "surface", T_SURF }, { "intensity", T_PARAM }, { "scale", T_PARAM }, { "detailscale", T_PARAM }, { "specpower", T_SPECPOWER }, { "specfactor", T_SPECFACTOR }, }; static tokenlist modelhudtokens[] = { { "tile", T_TILE }, { "tile0", T_TILE0 }, { "tile1", T_TILE1 }, { "xadd", T_XADD }, { "yadd", T_YADD }, { "zadd", T_ZADD }, { "angadd", T_ANGADD }, { "hide", T_HIDE }, { "nobob", T_NOBOB }, { "flipped",T_FLIPPED}, { "nodepth",T_NODEPTH}, }; static tokenlist voxeltokens[] = { { "tile", T_TILE }, { "tile0", T_TILE0 }, { "tile1", T_TILE1 }, { "scale", T_SCALE }, }; static tokenlist skyboxtokens[] = { { "tile" ,T_TILE }, { "pal" ,T_PAL }, { "ft" ,T_FRONT },{ "front" ,T_FRONT },{ "forward",T_FRONT }, { "rt" ,T_RIGHT },{ "right" ,T_RIGHT }, { "bk" ,T_BACK },{ "back" ,T_BACK }, { "lf" ,T_LEFT },{ "left" ,T_LEFT },{ "lt" ,T_LEFT }, { "up" ,T_TOP },{ "top" ,T_TOP },{ "ceiling",T_TOP },{ "ceil" ,T_TOP }, { "dn" ,T_BOTTOM },{ "bottom" ,T_BOTTOM },{ "floor" ,T_BOTTOM },{ "down" ,T_BOTTOM } }; static tokenlist tinttokens[] = { { "pal", T_PAL }, { "red", T_RED },{ "r", T_RED }, { "green", T_GREEN },{ "g", T_GREEN }, { "blue", T_BLUE },{ "b", T_BLUE }, { "flags", T_FLAGS } }; static tokenlist texturetokens[] = { { "pal", T_PAL }, { "detail", T_DETAIL }, { "glow", T_GLOW }, { "specular",T_SPECULAR }, { "normal", T_NORMAL }, }; static tokenlist texturetokens_pal[] = { { "file", T_FILE },{ "name", T_FILE }, { "alphacut", T_ALPHACUT }, { "detailscale", T_XSCALE }, { "scale", T_XSCALE }, { "xscale", T_XSCALE }, { "intensity", T_XSCALE }, { "yscale", T_YSCALE }, { "specpower", T_SPECPOWER }, { "parallaxscale", T_SPECPOWER }, { "specfactor", T_SPECFACTOR }, { "parallaxbias", T_SPECFACTOR }, { "nocompress", T_NOCOMPRESS }, { "nodownsize", T_NODOWNSIZE }, }; static tokenlist sound_musictokens[] = { { "id", T_ID }, { "file", T_FILE }, }; static tokenlist tilefromtexturetokens[] = { { "file", T_FILE }, { "name", T_FILE }, { "alphacut", T_ALPHACUT }, { "xoffset", T_XOFFSET }, { "xoff", T_XOFFSET }, { "yoffset", T_YOFFSET }, { "yoff", T_YOFFSET }, };
Palmap support was dropped at some point and Polymer specification may not be finalized yet(it still can be changed). Apart from this, the page is up to date. --One 04:19, 8 May 2009 (PDT)
- Yes, "palmaps" didn't really work very well and I didn't like how they were implemented so I removed them. They resided in the engine side of things, yet were hard coded to only work with Duke3D's palette configuration. This is a no-no. They also used just as much memory when loaded as just having a complete altered copy of the skin, because the overlays were added in at load time rather than multitextured on during rendering. Therefore, due to their implementation, the ONLY purpose they served was to possibly make the filesize of the HRP smaller, in a world where you can get 1000 GB of HD space for $100 USD. So they're gone. TX 08:14, 8 May 2009 (PDT)
cleanup
This page needs some serious cleanup. First, we should get rid of all this EDuke32-native rubbish. Second, there's a lot of stuff that needs to be added, including palmaps by Hunter, normal maps, parallax maps, setuptile, tilefromtexture, (the animation tilefromtexture command), and many more things. The best place to look for a complete index is the source; I'm just not sure where. -Hendricks266 19:00, 4 May 2009 (PDT)
old comments
Maybe the commands should just be listed here with links to separate pages for each command(not subcommands). Got a bit to big this way I think.
/Parkar
JonoF has a list of the DEF commands here, for additional reference.
Cheers,
Hendricks266 @ 12:22, 18 February 2007 (PST)