mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 19:20:38 +00:00
Optimize some of the frequently used CON commands that have nasty overhead
git-svn-id: https://svn.eduke32.com/eduke32@428 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
cb90dc8c83
commit
d93dde5a59
8 changed files with 804 additions and 952 deletions
|
@ -1069,7 +1069,7 @@ static void moveplayers(void) //Players
|
||||||
otherx = 0;
|
otherx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
execute(&i,&s->yvel,&otherx);
|
execute(i,s->yvel,otherx);
|
||||||
|
|
||||||
if (ud.multimode > 1)
|
if (ud.multimode > 1)
|
||||||
if (sprite[ps[otherp].i].extra > 0)
|
if (sprite[ps[otherp].i].extra > 0)
|
||||||
|
@ -2302,11 +2302,11 @@ CLEAR_THE_BOLT:
|
||||||
case STEAM__STATIC:
|
case STEAM__STATIC:
|
||||||
case CEILINGSTEAM__STATIC:
|
case CEILINGSTEAM__STATIC:
|
||||||
p = findplayer(s, &x);
|
p = findplayer(s, &x);
|
||||||
execute(&i,&p,&x);
|
execute(i,p,x);
|
||||||
goto BOLT;
|
goto BOLT;
|
||||||
case WATERBUBBLEMAKER__STATIC:
|
case WATERBUBBLEMAKER__STATIC:
|
||||||
p = findplayer(s, &x);
|
p = findplayer(s, &x);
|
||||||
execute(&i,&p,&x);
|
execute(i,p,x);
|
||||||
goto BOLT;
|
goto BOLT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2772,7 +2772,7 @@ static void moveweapons(void)
|
||||||
if (thisprojectile[i].workslike & PROJECTILE_FLAG_HITSCAN)
|
if (thisprojectile[i].workslike & PROJECTILE_FLAG_HITSCAN)
|
||||||
{
|
{
|
||||||
p = findplayer(s,&x);
|
p = findplayer(s,&x);
|
||||||
execute(&i,&p,&x);
|
execute(i,p,x);
|
||||||
goto BOLT;
|
goto BOLT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3133,7 +3133,7 @@ static void moveweapons(void)
|
||||||
|
|
||||||
case SHOTSPARK1__STATIC:
|
case SHOTSPARK1__STATIC:
|
||||||
p = findplayer(s,&x);
|
p = findplayer(s,&x);
|
||||||
execute(&i,&p,&x);
|
execute(i,p,x);
|
||||||
goto BOLT;
|
goto BOLT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4808,7 +4808,7 @@ DETONATEB:
|
||||||
|
|
||||||
p = findplayer(s,&x);
|
p = findplayer(s,&x);
|
||||||
|
|
||||||
execute(&i,&p,&x);
|
execute(i,p,x);
|
||||||
|
|
||||||
BOLT:
|
BOLT:
|
||||||
|
|
||||||
|
@ -5249,7 +5249,7 @@ static void moveexplosions(void) // STATNUM 5
|
||||||
case TRANSPORTERSTAR__STATIC:
|
case TRANSPORTERSTAR__STATIC:
|
||||||
case TRANSPORTERBEAM__STATIC:
|
case TRANSPORTERBEAM__STATIC:
|
||||||
p = findplayer(s,&x);
|
p = findplayer(s,&x);
|
||||||
execute(&i,&p,&x);
|
execute(i,p,x);
|
||||||
goto BOLT;
|
goto BOLT;
|
||||||
|
|
||||||
case SHELL__STATIC:
|
case SHELL__STATIC:
|
||||||
|
|
|
@ -122,7 +122,7 @@ extern void getglobalz(short sActor);
|
||||||
extern void makeitfall(short sActor);
|
extern void makeitfall(short sActor);
|
||||||
extern void loadefs(char *fn);
|
extern void loadefs(char *fn);
|
||||||
extern short furthestangle(short sActor,short angs);
|
extern short furthestangle(short sActor,short angs);
|
||||||
extern void execute(const short *sActor,const short *sPlayer,const long *lDist);
|
extern void execute(int iActor,int iPlayer,long lDist);
|
||||||
extern void overwritesprite(long thex,long they,short tilenum,signed char shade,char stat,char dapalnum);
|
extern void overwritesprite(long thex,long they,short tilenum,signed char shade,char stat,char dapalnum);
|
||||||
extern inline int gametext(int x,int y,char *t,char s,short dabits);
|
extern inline int gametext(int x,int y,char *t,char s,short dabits);
|
||||||
extern inline int gametextpal(int x,int y,char *t,char s,char p);
|
extern inline int gametextpal(int x,int y,char *t,char s,char p);
|
||||||
|
|
|
@ -1689,32 +1689,32 @@ static void weapon_amounts(struct player_struct *p,long x,long y,long u)
|
||||||
|
|
||||||
if (p->subweapon&(1<<GROW_WEAPON))
|
if (p->subweapon&(1<<GROW_WEAPON))
|
||||||
weaponnum(SHRINKER_WEAPON,x+39,y+12,
|
weaponnum(SHRINKER_WEAPON,x+39,y+12,
|
||||||
p->ammo_amount[GROW_WEAPON],max_ammo_amount[GROW_WEAPON],
|
p->ammo_amount[GROW_WEAPON],max_ammo_amount[GROW_WEAPON],
|
||||||
(!p->gotweapon[GROW_WEAPON]*9)+12-18*
|
(!p->gotweapon[GROW_WEAPON]*9)+12-18*
|
||||||
(cw == GROW_WEAPON));
|
(cw == GROW_WEAPON));
|
||||||
else
|
else
|
||||||
weaponnum(SHRINKER_WEAPON,x+39,y+12,
|
weaponnum(SHRINKER_WEAPON,x+39,y+12,
|
||||||
p->ammo_amount[SHRINKER_WEAPON],max_ammo_amount[SHRINKER_WEAPON],
|
p->ammo_amount[SHRINKER_WEAPON],max_ammo_amount[SHRINKER_WEAPON],
|
||||||
(!p->gotweapon[SHRINKER_WEAPON]*9)+12-18*
|
(!p->gotweapon[SHRINKER_WEAPON]*9)+12-18*
|
||||||
(cw == SHRINKER_WEAPON));
|
(cw == SHRINKER_WEAPON));
|
||||||
}
|
}
|
||||||
if (u&256)
|
if (u&256)
|
||||||
{
|
{
|
||||||
if (u != -1) patchstatusbar(158,178,162+29,178+6); //original code: (166,178,166+8,178+6);
|
if (u != -1) patchstatusbar(158,178,162+29,178+6); //original code: (166,178,166+8,178+6);
|
||||||
|
|
||||||
weaponnum(DEVISTATOR_WEAPON,x+70,y,
|
weaponnum(DEVISTATOR_WEAPON,x+70,y,
|
||||||
p->ammo_amount[DEVISTATOR_WEAPON],max_ammo_amount[DEVISTATOR_WEAPON],
|
p->ammo_amount[DEVISTATOR_WEAPON],max_ammo_amount[DEVISTATOR_WEAPON],
|
||||||
(!p->gotweapon[DEVISTATOR_WEAPON]*9)+12-18*
|
(!p->gotweapon[DEVISTATOR_WEAPON]*9)+12-18*
|
||||||
(cw == DEVISTATOR_WEAPON));
|
(cw == DEVISTATOR_WEAPON));
|
||||||
}
|
}
|
||||||
if (u&512)
|
if (u&512)
|
||||||
{
|
{
|
||||||
if (u != -1) patchstatusbar(158,184,162+29,184+6); //original code: (166,184,166+8,184+6);
|
if (u != -1) patchstatusbar(158,184,162+29,184+6); //original code: (166,184,166+8,184+6);
|
||||||
|
|
||||||
weaponnum(TRIPBOMB_WEAPON,x+70,y+6,
|
weaponnum(TRIPBOMB_WEAPON,x+70,y+6,
|
||||||
p->ammo_amount[TRIPBOMB_WEAPON],max_ammo_amount[TRIPBOMB_WEAPON],
|
p->ammo_amount[TRIPBOMB_WEAPON],max_ammo_amount[TRIPBOMB_WEAPON],
|
||||||
(!p->gotweapon[TRIPBOMB_WEAPON]*9)+12-18*
|
(!p->gotweapon[TRIPBOMB_WEAPON]*9)+12-18*
|
||||||
(cw == TRIPBOMB_WEAPON));
|
(cw == TRIPBOMB_WEAPON));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u&65536L)
|
if (u&65536L)
|
||||||
|
@ -1722,9 +1722,9 @@ static void weapon_amounts(struct player_struct *p,long x,long y,long u)
|
||||||
if (u != -1) patchstatusbar(158,190,162+29,190+6); //original code: (166,190,166+8,190+6);
|
if (u != -1) patchstatusbar(158,190,162+29,190+6); //original code: (166,190,166+8,190+6);
|
||||||
|
|
||||||
weaponnum(-1,x+70,y+12,
|
weaponnum(-1,x+70,y+12,
|
||||||
p->ammo_amount[FREEZE_WEAPON],max_ammo_amount[FREEZE_WEAPON],
|
p->ammo_amount[FREEZE_WEAPON],max_ammo_amount[FREEZE_WEAPON],
|
||||||
(!p->gotweapon[FREEZE_WEAPON]*9)+12-18*
|
(!p->gotweapon[FREEZE_WEAPON]*9)+12-18*
|
||||||
(cw == FREEZE_WEAPON));
|
(cw == FREEZE_WEAPON));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7398,7 +7398,7 @@ FOUNDCHEAT:
|
||||||
levnume--;
|
levnume--;
|
||||||
|
|
||||||
if ((VOLUMEONE && volnume > 0) || volnume > num_volumes-1 ||
|
if ((VOLUMEONE && volnume > 0) || volnume > num_volumes-1 ||
|
||||||
levnume >= MAXLEVELS || level_file_names[volnume*MAXLEVELS+levnume] == NULL)
|
levnume >= MAXLEVELS || level_file_names[volnume*MAXLEVELS+levnume] == NULL)
|
||||||
{
|
{
|
||||||
ps[myconnectindex].cheat_phase = 0;
|
ps[myconnectindex].cheat_phase = 0;
|
||||||
KB_FlushKeyBoardQueue();
|
KB_FlushKeyBoardQueue();
|
||||||
|
@ -9709,24 +9709,24 @@ void app_main(int argc,char **argv)
|
||||||
if (atol(tempbuf) > BUILDDATE)
|
if (atol(tempbuf) > BUILDDATE)
|
||||||
{
|
{
|
||||||
if (wm_ynbox("EDuke32","A new version of EDuke32 is available. "
|
if (wm_ynbox("EDuke32","A new version of EDuke32 is available. "
|
||||||
"Browse to http://eduke32.sourceforge.net now?"))
|
"Browse to http://eduke32.sourceforge.net now?"))
|
||||||
{
|
{
|
||||||
SHELLEXECUTEINFOA sinfo;
|
SHELLEXECUTEINFOA sinfo;
|
||||||
char *p = "http://eduke32.sourceforge.net";
|
char *p = "http://eduke32.sourceforge.net";
|
||||||
|
|
||||||
Bmemset(&sinfo, 0, sizeof(sinfo));
|
Bmemset(&sinfo, 0, sizeof(sinfo));
|
||||||
sinfo.cbSize = sizeof(sinfo);
|
sinfo.cbSize = sizeof(sinfo);
|
||||||
sinfo.fMask = SEE_MASK_CLASSNAME;
|
sinfo.fMask = SEE_MASK_CLASSNAME;
|
||||||
sinfo.lpVerb = "open";
|
sinfo.lpVerb = "open";
|
||||||
sinfo.lpFile = p;
|
sinfo.lpFile = p;
|
||||||
sinfo.nShow = SW_SHOWNORMAL;
|
sinfo.nShow = SW_SHOWNORMAL;
|
||||||
sinfo.lpClass = "http";
|
sinfo.lpClass = "http";
|
||||||
|
|
||||||
if(!ShellExecuteExA(&sinfo))
|
if (!ShellExecuteExA(&sinfo))
|
||||||
initprintf("update: error launching browser!\n");
|
initprintf("update: error launching browser!\n");
|
||||||
CONFIG_SetupMouse();
|
CONFIG_SetupMouse();
|
||||||
CONFIG_SetupJoystick();
|
CONFIG_SetupJoystick();
|
||||||
CONFIG_WriteSetup();
|
CONFIG_WriteSetup();
|
||||||
gameexit(" ");
|
gameexit(" ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -494,7 +494,7 @@ static void dispnames(void)
|
||||||
minitext(c,48+(12*x),ud.savegame[x],2,10+16);
|
minitext(c,48+(12*x),ud.savegame[x],2,10+16);
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearfilenames(void)
|
static void clearfilenames(void)
|
||||||
{
|
{
|
||||||
klistfree(finddirs);
|
klistfree(finddirs);
|
||||||
klistfree(findfiles);
|
klistfree(findfiles);
|
||||||
|
@ -1391,7 +1391,9 @@ void menus(void)
|
||||||
ready2send = 1;
|
ready2send = 1;
|
||||||
totalclock = ototalclock;
|
totalclock = ototalclock;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
cmenu(300);
|
cmenu(300);
|
||||||
probey = last_threehundred;
|
probey = last_threehundred;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1538,15 +1538,15 @@ extern int gotvote[MAXPLAYERS], votes[MAXPLAYERS], voting, vote_map, vote_episod
|
||||||
|
|
||||||
static void getlevelfromfilename(const char *fn, char *volume, char *level)
|
static void getlevelfromfilename(const char *fn, char *volume, char *level)
|
||||||
{
|
{
|
||||||
for ((*volume)=0;(*volume)<MAXVOLUMES;(*volume)++)
|
for (*volume=0;*volume<MAXVOLUMES;(*volume)++)
|
||||||
{
|
{
|
||||||
for ((*level)=0;(*level)<MAXLEVELS;(*level)++)
|
for (*level=0;*level<MAXLEVELS;(*level)++)
|
||||||
{
|
{
|
||||||
if (level_file_names[((*volume)*MAXLEVELS)+(*level)] != NULL)
|
if (level_file_names[(*volume*MAXLEVELS)+*level] != NULL)
|
||||||
if (!Bstrcasecmp(fn, level_file_names[((*volume)*MAXLEVELS)+(*level)]))
|
if (!Bstrcasecmp(fn, level_file_names[(*volume*MAXLEVELS)+*level]))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((*level) != MAXLEVELS)
|
if (*level != MAXLEVELS)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue