diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index d9cba10f7..ad3689fd6 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -10534,6 +10534,7 @@ void app_main(int argc,const char **argv) { int i, j; char cwd[BMAX_PATH]; + char root[BMAX_PATH]; extern char datetimestring[]; #ifdef RENDERTYPEWIN @@ -10550,9 +10551,11 @@ void app_main(int argc,const char **argv) #endif #ifdef _WIN32 - tempbuf[GetModuleFileName(NULL,tempbuf,BMAX_PATH)] = 0; - Bcorrectfilename(tempbuf,1); - chdir(tempbuf); + tempbuf[GetModuleFileName(NULL,root,BMAX_PATH)] = 0; + Bcorrectfilename(root,1); + chdir(root); +#else + Bmemset(root,0,sizeof(root)); #endif OSD_SetLogFile("eduke32.log"); @@ -10789,7 +10792,11 @@ void app_main(int argc,const char **argv) } if (mod_dir[0] != '/') + { + Bstrcat(root,mod_dir); + addsearchpath(root); addsearchpath(mod_dir); + } i = initgroupfile(duke3dgrp); diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 491b56282..5260a7c38 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -495,8 +495,7 @@ const memberlabel_t sectorlabels[]= { "floorxpanning", SECTOR_FLOORXPANNING, 0, 0 }, { "floorypanning", SECTOR_FLOORYPANNING, 0, 0 }, { "visibility", SECTOR_VISIBILITY, 0, 0 }, - { "filler", SECTOR_ALIGNTO, 0, 0 }, - { "alignto", SECTOR_ALIGNTO, 0, 0 }, // aka filler, not used + { "alignto", SECTOR_ALIGNTO, 0, 0 }, { "lotag", SECTOR_LOTAG, 0, 0 }, { "hitag", SECTOR_HITAG, 0, 0 }, { "extra", SECTOR_EXTRA, 0, 0 }, @@ -535,8 +534,7 @@ const memberlabel_t actorlabels[]= { "shade", ACTOR_SHADE, 0, 0 }, { "pal", ACTOR_PAL, 0, 0 }, { "clipdist", ACTOR_CLIPDIST, 0, 0 }, - { "filler", ACTOR_DETAIL, 0, 0 }, - { "detail", ACTOR_DETAIL, 0, 0 }, // aka filler, not used + { "detail", ACTOR_DETAIL, 0, 0 }, { "xrepeat", ACTOR_XREPEAT, 0, 0 }, { "yrepeat", ACTOR_YREPEAT, 0, 0 }, { "xoffset", ACTOR_XOFFSET, 0, 0 }, @@ -593,44 +591,19 @@ const memberlabel_t tsprlabels[]= { // tsprite access - { "x", ACTOR_X, 0, 0 }, - { "y", ACTOR_Y, 0, 0 }, - { "z", ACTOR_Z, 0, 0 }, - { "cstat", ACTOR_CSTAT, 0, 0 }, - { "picnum", ACTOR_PICNUM, 0, 0 }, - { "shade", ACTOR_SHADE, 0, 0 }, - { "pal", ACTOR_PAL, 0, 0 }, - { "clipdist", ACTOR_CLIPDIST, 0, 0 }, - { "filler", ACTOR_DETAIL, 0, 0 }, - { "detail", ACTOR_DETAIL, 0, 0 }, // aka filler, not used - { "xrepeat", ACTOR_XREPEAT, 0, 0 }, - { "yrepeat", ACTOR_YREPEAT, 0, 0 }, - { "xoffset", ACTOR_XOFFSET, 0, 0 }, - { "yoffset", ACTOR_YOFFSET, 0, 0 }, - { "sectnum", ACTOR_SECTNUM, 0, 0 }, - { "statnum", ACTOR_STATNUM, 0, 0 }, - { "ang", ACTOR_ANG, 0, 0 }, - { "owner", ACTOR_OWNER, 0, 0 }, - { "xvel", ACTOR_XVEL, 0, 0 }, - { "yvel", ACTOR_YVEL, 0, 0 }, - { "zvel", ACTOR_ZVEL, 0, 0 }, - { "lotag", ACTOR_LOTAG, 0, 0 }, - { "hitag", ACTOR_HITAG, 0, 0 }, - { "extra", ACTOR_EXTRA, 0, 0 }, - - { "tsprx", ACTOR_X, 0, 0 }, - { "tspry", ACTOR_Y, 0, 0 }, - { "tsprz", ACTOR_Z, 0, 0 }, - { "tsprcstat", ACTOR_CSTAT, 0, 0 }, - { "tsprpicnum", ACTOR_PICNUM, 0, 0 }, - { "tsprshade", ACTOR_SHADE, 0, 0 }, - { "tsprpal", ACTOR_PAL, 0, 0 }, - { "tsprxrepeat", ACTOR_XREPEAT, 0, 0 }, - { "tspryrepeat", ACTOR_YREPEAT, 0, 0 }, - { "tsprxoffset", ACTOR_XOFFSET, 0, 0 }, - { "tspryoffset", ACTOR_YOFFSET, 0, 0 }, - { "tsprsectnum", ACTOR_SECTNUM, 0, 0 }, - { "tsprang", ACTOR_ANG, 0, 0 }, + { "tsprx", ACTOR_TSPRX, 0, 0 }, + { "tspry", ACTOR_TSPRY, 0, 0 }, + { "tsprz", ACTOR_TSPRZ, 0, 0 }, + { "tsprcstat", ACTOR_TSPRCSTAT, 0, 0 }, + { "tsprpicnum", ACTOR_TSPRPICNUM, 0, 0 }, + { "tsprshade", ACTOR_TSPRSHADE, 0, 0 }, + { "tsprpal", ACTOR_TSPRPAL, 0, 0 }, + { "tsprxrepeat", ACTOR_TSPRXREPEAT, 0, 0 }, + { "tspryrepeat", ACTOR_TSPRYREPEAT, 0, 0 }, + { "tsprxoffset", ACTOR_TSPRXOFFSET, 0, 0 }, + { "tspryoffset", ACTOR_TSPRYOFFSET, 0, 0 }, + { "tsprsectnum", ACTOR_TSPRSECTNUM, 0, 0 }, + { "tsprang", ACTOR_TSPRANG, 0, 0 }, { "", -1, 0, 0 } // END OF LIST }; diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 0ec01f5c5..5ddd3418d 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -449,6 +449,23 @@ enum actorlabels ACTOR_HTFLAGS, }; +enum tsprlabels +{ + ACTOR_TSPRX, + ACTOR_TSPRY, + ACTOR_TSPRZ, + ACTOR_TSPRCSTAT, + ACTOR_TSPRPICNUM, + ACTOR_TSPRSHADE, + ACTOR_TSPRPAL, + ACTOR_TSPRXREPEAT, + ACTOR_TSPRYREPEAT, + ACTOR_TSPRXOFFSET, + ACTOR_TSPRYOFFSET, + ACTOR_TSPRSECTNUM, + ACTOR_TSPRANG, +}; + enum inputlabels { INPUT_AVEL, diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 602ee888b..48137b5dc 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -3529,7 +3529,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) switch (lLabelID) { - case ACTOR_X: + case ACTOR_TSPRX: if (iSet) { spriteext[iActor].tspr->x=lValue; @@ -3538,7 +3538,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->x,g_i,g_p); return; - case ACTOR_Y: + case ACTOR_TSPRY: if (iSet) { spriteext[iActor].tspr->y=lValue; @@ -3547,7 +3547,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->y,g_i,g_p); return; - case ACTOR_Z: + case ACTOR_TSPRZ: if (iSet) { spriteext[iActor].tspr->z=lValue; @@ -3556,7 +3556,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->z,g_i,g_p); return; - case ACTOR_CSTAT: + case ACTOR_TSPRCSTAT: if (iSet) { spriteext[iActor].tspr->cstat=lValue; @@ -3565,7 +3565,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->cstat,g_i,g_p); return; - case ACTOR_PICNUM: + case ACTOR_TSPRPICNUM: if (iSet) { spriteext[iActor].tspr->picnum=lValue; @@ -3574,7 +3574,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->picnum,g_i,g_p); return; - case ACTOR_SHADE: + case ACTOR_TSPRSHADE: if (iSet) { spriteext[iActor].tspr->shade=lValue; @@ -3583,7 +3583,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->shade,g_i,g_p); return; - case ACTOR_PAL: + case ACTOR_TSPRPAL: if (iSet) { spriteext[iActor].tspr->pal=lValue; @@ -3592,25 +3592,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->pal,g_i,g_p); return; - case ACTOR_CLIPDIST: - if (iSet) - { - spriteext[iActor].tspr->clipdist=lValue; - return; - } - SetGameVarID(lVar2, spriteext[iActor].tspr->clipdist,g_i,g_p); - return; - - case ACTOR_DETAIL: - if (iSet) - { - spriteext[iActor].tspr->filler=lValue; - return; - } - SetGameVarID(lVar2, spriteext[iActor].tspr->filler,g_i,g_p); - return; - - case ACTOR_XREPEAT: + case ACTOR_TSPRXREPEAT: if (iSet) { spriteext[iActor].tspr->xrepeat=lValue; @@ -3619,7 +3601,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->xrepeat,g_i,g_p); return; - case ACTOR_YREPEAT: + case ACTOR_TSPRYREPEAT: if (iSet) { spriteext[iActor].tspr->yrepeat=lValue; @@ -3628,7 +3610,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->yrepeat,g_i,g_p); return; - case ACTOR_XOFFSET: + case ACTOR_TSPRXOFFSET: if (iSet) { spriteext[iActor].tspr->xoffset=lValue; @@ -3637,7 +3619,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->xoffset,g_i,g_p); return; - case ACTOR_YOFFSET: + case ACTOR_TSPRYOFFSET: if (iSet) { spriteext[iActor].tspr->yoffset=lValue; @@ -3646,7 +3628,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->yoffset,g_i,g_p); return; - case ACTOR_SECTNUM: + case ACTOR_TSPRSECTNUM: if (iSet) { spriteext[iActor].tspr->sectnum=lValue; @@ -3655,16 +3637,7 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->sectnum,g_i,g_p); return; - case ACTOR_STATNUM: - if (iSet) - { - spriteext[iActor].tspr->statnum=lValue; - return; - } - SetGameVarID(lVar2, spriteext[iActor].tspr->statnum,g_i,g_p); - return; - - case ACTOR_ANG: + case ACTOR_TSPRANG: if (iSet) { spriteext[iActor].tspr->ang=lValue; @@ -3673,69 +3646,6 @@ static void DoTsprite(int iSet, int lVar1, int lLabelID, int lVar2) SetGameVarID(lVar2, spriteext[iActor].tspr->ang,g_i,g_p); return; - case ACTOR_OWNER: - if (iSet) - { - spriteext[iActor].tspr->owner=lValue; - return; - } - SetGameVarID(lVar2, spriteext[iActor].tspr->owner,g_i,g_p); - return; - - case ACTOR_XVEL: - if (iSet) - { - spriteext[iActor].tspr->xvel=lValue; - return; - } - SetGameVarID(lVar2, spriteext[iActor].tspr->xvel,g_i,g_p); - return; - - case ACTOR_YVEL: - if (iSet) - { - spriteext[iActor].tspr->yvel=lValue; - return; - } - SetGameVarID(lVar2, spriteext[iActor].tspr->yvel,g_i,g_p); - return; - - case ACTOR_ZVEL: - if (iSet) - { - spriteext[iActor].tspr->zvel=lValue; - return; - } - SetGameVarID(lVar2, spriteext[iActor].tspr->zvel,g_i,g_p); - return; - - case ACTOR_LOTAG: - if (iSet) - { - spriteext[iActor].tspr->lotag=lValue; - return; - } - SetGameVarID(lVar2, spriteext[iActor].tspr->lotag,g_i,g_p); - return; - - case ACTOR_HITAG: - if (iSet) - { - spriteext[iActor].tspr->hitag=lValue; - return; - } - SetGameVarID(lVar2, spriteext[iActor].tspr->hitag,g_i,g_p); - return; - - case ACTOR_EXTRA: - if (iSet) - { - spriteext[iActor].tspr->extra=lValue; - return; - } - SetGameVarID(lVar2, spriteext[iActor].tspr->extra,g_i,g_p); - return; - default: return; }