mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Fix the shrinker problem for real this time
git-svn-id: https://svn.eduke32.com/eduke32@1185 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4516eb5ec8
commit
bfd5282986
5 changed files with 45 additions and 32 deletions
|
@ -204,7 +204,7 @@ extern void G_DrawTXDigiNumZ(int starttile, int x,int y,int n,int s,int pal,int
|
|||
extern void G_DrawTileSmall(int x,int y,int tilenum,int shade,int orientation);
|
||||
extern void G_DrawTilePalSmall(int x,int y,int tilenum,int shade,int orientation,int p);
|
||||
extern void Gv_ResetVars(void);
|
||||
extern void A_ResetVars(int iActor);
|
||||
extern inline void A_ResetVars(int iActor);
|
||||
|
||||
extern int minitext_(int x,int y,const char *t,int s,int p,int sb);
|
||||
|
||||
|
|
|
@ -2085,10 +2085,10 @@ static int C_ParseCommand(void)
|
|||
C_ReportError(WARNING_BADGAMEVAR);
|
||||
}
|
||||
Gv_NewVar(label+(g_numLabels<<6),*(g_scriptPtr-2),
|
||||
(*(g_scriptPtr-1))
|
||||
// can't define default or secret
|
||||
& (~(GAMEVAR_DEFAULT | GAMEVAR_SECRET))
|
||||
);
|
||||
(*(g_scriptPtr-1))
|
||||
// can't define default or secret
|
||||
& (~(GAMEVAR_DEFAULT | GAMEVAR_SECRET))
|
||||
);
|
||||
//AddLog("Added gamevar");
|
||||
g_scriptPtr -= 3; // no need to save in script...
|
||||
return 0;
|
||||
|
|
|
@ -337,10 +337,10 @@ void A_Fall(int iActor)
|
|||
{
|
||||
if (sector[s->sectnum].lotag == 2 && s->zvel > 3122)
|
||||
s->zvel = 3144;
|
||||
/* if (s->zvel < 6144)
|
||||
s->zvel += c;
|
||||
else s->zvel = 6144;
|
||||
s->z += s->zvel; */
|
||||
/* if (s->zvel < 6144)
|
||||
s->zvel += c;
|
||||
else s->zvel = 6144;
|
||||
s->z += s->zvel; */
|
||||
s->z += s->zvel = min(6144, s->zvel+c);
|
||||
}
|
||||
if (s->z >= ActorExtra[iActor].floorz-(FOURSLEIGHT))
|
||||
|
@ -4283,22 +4283,22 @@ void A_Execute(int iActor,int iPlayer,int lDist)
|
|||
}
|
||||
|
||||
X_Move();
|
||||
/*
|
||||
if (ud.angleinterpolation)
|
||||
{
|
||||
temp = (g_sp->ang & 2047) - sprpos[g_i].ang;
|
||||
sprpos[g_i].oldang = sprpos[g_i].ang;
|
||||
if (temp)
|
||||
/*
|
||||
if (ud.angleinterpolation)
|
||||
{
|
||||
temp2 = temp/klabs(temp);
|
||||
if (klabs(temp) > 1024) temp2 = -(temp2);
|
||||
sprpos[g_i].angdir = temp2;
|
||||
sprpos[g_i].angdif = min(ud.angleinterpolation,klabs(temp));
|
||||
sprpos[g_i].ang += sprpos[g_i].angdif * sprpos[g_i].angdir;
|
||||
sprpos[g_i].ang &= 2047;
|
||||
temp = (g_sp->ang & 2047) - sprpos[g_i].ang;
|
||||
sprpos[g_i].oldang = sprpos[g_i].ang;
|
||||
if (temp)
|
||||
{
|
||||
temp2 = temp/klabs(temp);
|
||||
if (klabs(temp) > 1024) temp2 = -(temp2);
|
||||
sprpos[g_i].angdir = temp2;
|
||||
sprpos[g_i].angdif = min(ud.angleinterpolation,klabs(temp));
|
||||
sprpos[g_i].ang += sprpos[g_i].angdif * sprpos[g_i].angdir;
|
||||
sprpos[g_i].ang &= 2047;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
if (g_sp->statnum == 6)
|
||||
switch (DynamicTileMap[g_sp->picnum])
|
||||
{
|
||||
|
|
|
@ -102,7 +102,7 @@ int Gv_ReadSave(int fil)
|
|||
// AddLog("Reading gamevars from savegame");
|
||||
|
||||
Gv_Free(); // nuke 'em from orbit, it's the only way to be sure...
|
||||
HASH_init(&gamevarH);
|
||||
|
||||
// Bsprintf(g_szBuf,"CP:%s %d",__FILE__,__LINE__);
|
||||
// AddLog(g_szBuf);
|
||||
|
||||
|
@ -527,8 +527,7 @@ int Gv_NewVar(const char *pszLabel, int lValue, unsigned int dwFlags)
|
|||
if (i == g_gameVarCount)
|
||||
{
|
||||
// we're adding a new one.
|
||||
HASH_add(&gamevarH, aGameVars[i].szLabel, i);
|
||||
g_gameVarCount++;
|
||||
HASH_add(&gamevarH, aGameVars[i].szLabel, g_gameVarCount++);
|
||||
}
|
||||
|
||||
if (aGameVars[i].dwFlags & GAMEVAR_PERPLAYER)
|
||||
|
@ -548,7 +547,7 @@ int Gv_NewVar(const char *pszLabel, int lValue, unsigned int dwFlags)
|
|||
return 1;
|
||||
}
|
||||
|
||||
void A_ResetVars(int iActor)
|
||||
inline void A_ResetVars(int iActor)
|
||||
{
|
||||
int i=(MAXGAMEVARS-1);
|
||||
// OSD_Printf("resetting vars for actor %d\n",iActor);
|
||||
|
@ -562,7 +561,13 @@ void A_ResetVars(int iActor)
|
|||
|
||||
static inline int Gv_GetVarIndex(const char *szGameLabel)
|
||||
{
|
||||
return HASH_find(&gamevarH,szGameLabel);
|
||||
int i = HASH_find(&gamevarH,szGameLabel);
|
||||
if (i == -1)
|
||||
{
|
||||
OSD_Printf(OSD_ERROR "Gv_GetVarDataPtr(): INTERNAL ERROR: couldn't find gamevar %s!\n",szGameLabel);
|
||||
return 0;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
int __fastcall Gv_GetVar(int id, int iActor, int iPlayer)
|
||||
|
@ -718,7 +723,7 @@ int Gv_GetVarByLabel(const char *szGameLabel, int lDefault, int iActor, int iPla
|
|||
|
||||
static intptr_t *Gv_GetVarDataPtr(const char *szGameLabel)
|
||||
{
|
||||
int i = HASH_find(&gamevarH, szGameLabel);
|
||||
int i = HASH_find(&gamevarH,szGameLabel);
|
||||
|
||||
if (i < 0)
|
||||
return NULL;
|
||||
|
@ -1466,11 +1471,11 @@ void Gv_RefreshPointers(void)
|
|||
aGameVars[Gv_GetVarIndex("lastvisinc")].lValue = (intptr_t)&lastvisinc;
|
||||
aGameVars[Gv_GetVarIndex("numsectors")].lValue = (intptr_t)&numsectors;
|
||||
aGameVars[Gv_GetVarIndex("numplayers")].lValue = (intptr_t)&numplayers;
|
||||
aGameVars[Gv_GetVarIndex("cenu")].lValue = (intptr_t)&g_currentMenu;
|
||||
aGameVars[Gv_GetVarIndex("current_menu")].lValue = (intptr_t)&g_currentMenu;
|
||||
aGameVars[Gv_GetVarIndex("viewingrange")].lValue = (intptr_t)&viewingrange;
|
||||
aGameVars[Gv_GetVarIndex("yxaspect")].lValue = (intptr_t)&yxaspect;
|
||||
aGameVars[Gv_GetVarIndex("gravitationalconstant")].lValue = (intptr_t)&g_spriteGravity;
|
||||
aGameVars[Gv_GetVarIndex("gametypeflags")].lValue = (intptr_t)&GametypeFlags[ud.coop];
|
||||
aGameVars[Gv_GetVarIndex("gametype_flags")].lValue = (intptr_t)&GametypeFlags[ud.coop];
|
||||
aGameVars[Gv_GetVarIndex("framerate")].lValue = (intptr_t)&g_currentFrameRate;
|
||||
|
||||
aGameVars[Gv_GetVarIndex("camerax")].lValue = (intptr_t)&ud.camerax;
|
||||
|
|
|
@ -64,7 +64,15 @@ char EpisodeNames[MAXVOLUMES][33] = { "L.A. MELTDOWN", "LUNAR APOCALYPSE", "SHRA
|
|||
char SkillNames[5][33] = { "PIECE OF CAKE", "LET'S ROCK", "COME GET SOME", "DAMN I'M GOOD" };
|
||||
|
||||
char GametypeNames[MAXGAMETYPES][33] = { "DUKEMATCH (SPAWN)","COOPERATIVE PLAY","DUKEMATCH (NO SPAWN)","TEAM DM (SPAWN)","TEAM DM (NO SPAWN)"};
|
||||
int GametypeFlags[MAXGAMETYPES] = {4+8+16+1024+2048+16384,1+2+32+64+128+256+512+4096+8192+32768,2+4+8+16+16384,4+8+16+1024+2048+16384+65536+131072,2+4+8+16+16384+65536+131072};
|
||||
|
||||
int GametypeFlags[MAXGAMETYPES] =
|
||||
{
|
||||
4+8+16+1024+2048+16384,
|
||||
1+2+32+64+128+256+512+4096+8192+32768,
|
||||
2+4+8+16+16384,
|
||||
4+8+16+1024+2048+16384+65536+131072,
|
||||
2+4+8+16+16384+65536+131072
|
||||
};
|
||||
char g_numGametypes = 5;
|
||||
|
||||
int g_currentFrameRate;
|
||||
|
|
Loading…
Reference in a new issue