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:
terminx 2006-12-18 08:37:12 +00:00
parent cb90dc8c83
commit d93dde5a59
8 changed files with 804 additions and 952 deletions

View file

@ -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:

View file

@ -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);

View file

@ -9722,7 +9722,7 @@ void app_main(int argc,char **argv)
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();

File diff suppressed because it is too large Load diff

View file

@ -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;
} }

View file

@ -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;
} }
} }