From fcf3f17e30f393b8d728e71ed8410b513594e02f Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 19 Jul 2008 07:39:51 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@869 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/osd.c | 7 +++- polymer/eduke32/source/gamedef.c | 24 ++++++------- polymer/eduke32/source/gameexec.c | 57 +++++++++++++++++-------------- 3 files changed, 50 insertions(+), 38 deletions(-) diff --git a/polymer/build/src/osd.c b/polymer/build/src/osd.c index 3879854c6..b079695a4 100644 --- a/polymer/build/src/osd.c +++ b/polymer/build/src/osd.c @@ -119,7 +119,12 @@ const char *stripcolorcodes(const char *t) t++; continue; } - if (*t == '^' && (Btoupper(*(t+1)) == 'S'||Btoupper(*(t+1)) == 'O')) + if (*t == '^' && (Btoupper(*(t+1)) == 'S')) + { + t += 3; + continue; + } + if (*t == '^' && (Btoupper(*(t+1)) == 'O')) { t += 2; continue; diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 3b9d6be88..ca38ed30f 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -555,7 +555,7 @@ const memberlabel_t actorlabels[]= { "htbposx", ACTOR_HTBPOSX, 0, 0 }, { "htbposy", ACTOR_HTBPOSY, 0, 0 }, { "htbposz", ACTOR_HTBPOSZ, 0, 0 }, - { "htg_t", ACTOR_HTG_T, LABEL_HASPARM2, 8 }, + { "htg_t", ACTOR_HTG_T, LABEL_HASPARM2, 9 }, // model flags @@ -598,8 +598,8 @@ const memberlabel_t playerlabels[]= { "zoom", PLAYER_ZOOM, 0, 0 }, { "exitx", PLAYER_EXITX, 0, 0 }, { "exity", PLAYER_EXITY, 0, 0 }, - { "loogiex", PLAYER_LOOGIEX, LABEL_HASPARM2, 64 }, - { "loogiey", PLAYER_LOOGIEY, LABEL_HASPARM2, 64 }, + { "loogiex", PLAYER_LOOGIEX, LABEL_HASPARM2, 63 }, + { "loogiey", PLAYER_LOOGIEY, LABEL_HASPARM2, 63 }, { "numloogs", PLAYER_NUMLOOGS, 0, 0 }, { "loogcnt", PLAYER_LOOGCNT, 0, 0 }, { "posx", PLAYER_POSX, 0, 0 }, @@ -725,7 +725,7 @@ const memberlabel_t playerlabels[]= { "hard_landing", PLAYER_HARD_LANDING, 0, 0 }, { "max_secret_rooms", PLAYER_MAX_SECRET_ROOMS, 0, 0 }, { "secret_rooms", PLAYER_SECRET_ROOMS, 0, 0 }, - { "pals", PLAYER_PALS, LABEL_HASPARM2, 2 }, + { "pals", PLAYER_PALS, LABEL_HASPARM2, 3 }, { "max_actors_killed", PLAYER_MAX_ACTORS_KILLED, 0, 0 }, { "actors_killed", PLAYER_ACTORS_KILLED, 0, 0 }, { "return_to_center", PLAYER_RETURN_TO_CENTER, 0, 0 }, @@ -1839,7 +1839,7 @@ static int parsecommand(void) // get the ID of the DEF // if (tw == CON_SETTHISPROJECTILE) -// labelsonly = 1; + labelsonly = 1; transvar(); labelsonly = 0; // now get name of .xxx @@ -2735,7 +2735,7 @@ static int parsecommand(void) textptr++; // get the ID of the DEF -// labelsonly = 1; + labelsonly = 1; transvar(); labelsonly = 0; // now get name of .xxx @@ -2866,7 +2866,7 @@ static int parsecommand(void) textptr++; // get the ID of the DEF -// labelsonly = 1; + labelsonly = 1; transvar(); labelsonly = 0; // now get name of .xxx @@ -2929,7 +2929,7 @@ static int parsecommand(void) textptr++; // get the ID of the DEF -// labelsonly = 1; + labelsonly = 1; transvar(); labelsonly = 0; // now get name of .xxx @@ -3006,7 +3006,7 @@ static int parsecommand(void) textptr++; // get the ID of the DEF -// labelsonly = 1; + labelsonly = 1; transvar(); labelsonly = 0; // now get name of .xxx @@ -3119,7 +3119,7 @@ static int parsecommand(void) textptr++; // get the ID of the DEF -// labelsonly = 1; + labelsonly = 1; transvar(); labelsonly = 0; // now get name of . @@ -3254,7 +3254,7 @@ static int parsecommand(void) textptr++; // get the ID of the DEF -// labelsonly = 1; + labelsonly = 1; transvar(); labelsonly = 0; // now get name of .xxx @@ -3335,7 +3335,7 @@ static int parsecommand(void) textptr++; // get the ID of the DEF -// labelsonly = 1; + labelsonly = 1; transvar(); labelsonly = 0; // now get name of .xxx diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 83e71c116..d3aa8009f 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -1150,7 +1150,6 @@ static void DoThisProjectile(int iSet, int lVar1, int lLabelID, int lVar2) static void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) { int lValue; - int lTemp; int iPlayer=g_p; if (lVar1 != g_iThisActorID) @@ -1159,13 +1158,21 @@ static void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) if (iPlayer<0 || iPlayer >= ud.multimode) { // OSD_Printf("DoPlayer(): invalid target player (%d) %d\n",iPlayer,g_i); - OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoPlayer(): tried to %s %s on invalid target player (%d) %d from %s\n", + OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoPlayer(): tried to %s %s on invalid target player (%d) from spr %d gv %s\n", iSet?"set":"get",playerlabels[lLabelID].name,iPlayer,g_i, (lVar1 playerlabels[lLabelID].maxParm2) + { + OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoPlayer(): tried to %s invalid %s position %d on player (%d) from spr %d\n", + iSet?"set":"get",playerlabels[lLabelID].name,lParm2,iPlayer,g_i); + insptr += (lVar2 == MAXGAMEVARS); + return; + } + if (iSet) lValue=GetGameVarID(lVar2, g_i, g_p); @@ -1199,23 +1206,21 @@ static void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) return; case PLAYER_LOOGIEX: - lTemp=lParm2; if (iSet) { - g_player[iPlayer].ps->loogiex[lTemp]=lValue; + g_player[iPlayer].ps->loogiex[lParm2]=lValue; return; } - SetGameVarID(lVar2, g_player[iPlayer].ps->loogiex[lTemp], g_i, g_p); + SetGameVarID(lVar2, g_player[iPlayer].ps->loogiex[lParm2], g_i, g_p); return; case PLAYER_LOOGIEY: - lTemp=lParm2; if (iSet) { - g_player[iPlayer].ps->loogiey[lTemp]=lValue; + g_player[iPlayer].ps->loogiey[lParm2]=lValue; return; } - SetGameVarID(lVar2, g_player[iPlayer].ps->loogiey[lTemp], g_i, g_p); + SetGameVarID(lVar2, g_player[iPlayer].ps->loogiey[lParm2], g_i, g_p); return; case PLAYER_NUMLOOGS: @@ -1552,13 +1557,12 @@ static void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) return; case PLAYER_AMMO_AMOUNT: - lTemp=lParm2; if (iSet) { - g_player[iPlayer].ps->ammo_amount[lTemp]=lValue; + g_player[iPlayer].ps->ammo_amount[lParm2]=lValue; return; } - SetGameVarID(lVar2, g_player[iPlayer].ps->ammo_amount[lTemp], g_i, g_p); + SetGameVarID(lVar2, g_player[iPlayer].ps->ammo_amount[lParm2], g_i, g_p); return; case PLAYER_WACKEDBYACTOR: @@ -2261,13 +2265,12 @@ static void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) return; case PLAYER_GOTWEAPON: - lTemp=lParm2; if (iSet) { - g_player[iPlayer].ps->gotweapon[lTemp]=lValue; + g_player[iPlayer].ps->gotweapon[lParm2]=lValue; return; } - SetGameVarID(lVar2, g_player[iPlayer].ps->gotweapon[lTemp], g_i, g_p); + SetGameVarID(lVar2, g_player[iPlayer].ps->gotweapon[lParm2], g_i, g_p); return; case PLAYER_REFRESH_INVENTORY: @@ -2354,13 +2357,12 @@ static void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) return; case PLAYER_PALS: - lTemp=lParm2; if (iSet) { - g_player[iPlayer].ps->pals[lTemp]=lValue; + g_player[iPlayer].ps->pals[lParm2]=lValue; return; } - SetGameVarID(lVar2, g_player[iPlayer].ps->pals[lTemp], g_i, g_p); + SetGameVarID(lVar2, g_player[iPlayer].ps->pals[lParm2], g_i, g_p); return; case PLAYER_MAX_ACTORS_KILLED: @@ -2481,13 +2483,12 @@ static void DoPlayer(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) return; case PLAYER_MAX_AMMO_AMOUNT: - lTemp=lParm2; if (iSet) { - g_player[iPlayer].ps->max_ammo_amount[lTemp]=lValue; + g_player[iPlayer].ps->max_ammo_amount[lParm2]=lValue; return; } - SetGameVarID(lVar2, g_player[iPlayer].ps->max_ammo_amount[lTemp], g_i, g_p); + SetGameVarID(lVar2, g_player[iPlayer].ps->max_ammo_amount[lParm2], g_i, g_p); return; default: @@ -2980,7 +2981,6 @@ static void DoSector(int iSet, int lVar1, int lLabelID, int lVar2) static void DoActor(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) { int lValue; - int lTemp; int iActor=g_i; if (lVar1 != g_iThisActorID) @@ -2988,13 +2988,21 @@ static void DoActor(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) if (iActor < 0 || iActor >= MAXSPRITES) { - OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoActor(): tried to %s %s on invalid target sprite (%d) %d %d from %s\n", + OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoActor(): tried to %s %s on invalid target sprite (%d) from spr %d pic %d gv %s\n", iSet?"set":"get",actorlabels[lLabelID].name,iActor,g_i,g_sp->picnum, (lVar1 actorlabels[lLabelID].maxParm2) + { + OSD_Printf(OSDTEXT_DARKRED OSDTEXT_BRIGHT "DoActor(): tried to %s invalid %s position %d on sprite (%d) from spr %d\n", + iSet?"set":"get",actorlabels[lLabelID].name,lParm2,iActor,g_i); + insptr += (lVar2 == MAXGAMEVARS); + return; + } + if (iSet) lValue=GetGameVarID(lVar2, g_i, g_p); @@ -3361,13 +3369,12 @@ static void DoActor(int iSet, int lVar1, int lLabelID, int lVar2, int lParm2) return; case ACTOR_HTG_T: - lTemp=lParm2; if (iSet) { - hittype[iActor].temp_data[lTemp]=lValue; + hittype[iActor].temp_data[lParm2]=lValue; return; } - SetGameVarID(lVar2, hittype[iActor].temp_data[lTemp], g_i, g_p); + SetGameVarID(lVar2, hittype[iActor].temp_data[lParm2], g_i, g_p); return; case ACTOR_ANGOFF: