Subversion Repositories eduke32

Compare Revisions

Regard whitespace Rev 3115 → Rev 3114

/polymer/eduke32/source/game.c
1150,19 → 1150,19
{
switch (p->inven_icon)
{
case ICON_FIRSTAID:
case 1:
return p->inv_amount[GET_FIRSTAID];
case ICON_STEROIDS:
case 2:
return ((p->inv_amount[GET_STEROIDS]+3)>>2);
case ICON_HOLODUKE:
case 3:
return ((p->inv_amount[GET_HOLODUKE]+15)/24);
case ICON_JETPACK:
case 4:
return ((p->inv_amount[GET_JETPACK]+15)>>4);
case ICON_HEATS:
case 5:
return p->inv_amount[GET_HEATS]/12;
case ICON_SCUBA:
case 6:
return ((p->inv_amount[GET_SCUBA]+63)>>6);
case ICON_BOOTS:
case 7:
return (p->inv_amount[GET_BOOTS]>>1);
}
 
1173,11 → 1173,11
{
switch (p->inven_icon)
{
case ICON_HOLODUKE:
case 3:
return p->holoduke_on;
case ICON_JETPACK:
case 4:
return p->jetpack_on;
case ICON_HEATS:
case 5:
return p->heat_on;
}
 
1310,7 → 1310,7
{
const int32_t orient = 10+16+permbit+256;
 
i = ((unsigned)p->inven_icon < ICON_MAX) ? item_icons[p->inven_icon] : -1;
i = ((unsigned)p->inven_icon < 8) ? item_icons[p->inven_icon] : -1;
if (i >= 0)
{
if (getrendermode() >= 3 && althud_shadows)
1340,7 → 1340,7
minitext(284-30-o,180-3,"Off",2, orient+ROTATESPRITE_MAX);
}
 
if (p->inven_icon >= ICON_SCUBA)
if (p->inven_icon >= 6)
{
if (getrendermode() >= 3 && althud_shadows)
minitext(284-35-o+1,180-3+1,"Auto",4, POLYMOSTTRANS+orient+ROTATESPRITE_MAX);
1392,7 → 1392,7
{
// orient |= permbit;
 
i = ((unsigned)p->inven_icon < ICON_MAX) ? item_icons[p->inven_icon] : -1;
i = ((unsigned)p->inven_icon < 8) ? item_icons[p->inven_icon] : -1;
if (i >= 0)
rotatesprite_fs(sbarx(231-o), yofssh+sbary(200-21), sb16, 0, i, 0, 0, orient);
 
1412,7 → 1412,7
else if ((uint32_t)j != 0x80000000)
minitext(284-30-o, 180, "Off", 2, orient);
 
if (p->inven_icon >= ICON_SCUBA)
if (p->inven_icon >= 6)
minitext(284-35-o, 180, "Auto", 2, orient);
 
minitext_yofs = 0;
1628,11 → 1628,11
 
if (u&(2048+4096))
{
i = ((unsigned)p->inven_icon < ICON_MAX) ? item_icons[p->inven_icon] : -1;
i = ((unsigned)p->inven_icon < 8) ? item_icons[p->inven_icon] : -1;
// XXX: i < 0?
rotatesprite_fs(sbarx(231-o),sbary(SBY+13),sb16,0,i,0,0,10+16+permbit);
minitext(292-30-o,SBY+24,"%",6,10+16+permbit + ROTATESPRITE_MAX);
if (p->inven_icon >= ICON_SCUBA) minitext(284-35-o,SBY+14,"Auto",2,10+16+permbit + ROTATESPRITE_MAX);
if (p->inven_icon >= 6) minitext(284-35-o,SBY+14,"Auto",2,10+16+permbit + ROTATESPRITE_MAX);
}
 
if (u&(2048+4096))
7268,7 → 7268,7
P_DoQuote(QUOTE_CHEAT_EVERYTHING, g_player[myconnectindex].ps);
 
// P_DoQuote(QUOTE_21,g_player[myconnectindex].ps);
g_player[myconnectindex].ps->inven_icon = ICON_FIRSTAID;
g_player[myconnectindex].ps->inven_icon = 1;
 
end_cheat();
return;
/polymer/eduke32/source/gameexec.c
3147,7 → 3147,7
{
case GET_STEROIDS:
ps->inv_amount[GET_STEROIDS] = *insptr;
ps->inven_icon = ICON_STEROIDS;
ps->inven_icon = 2;
break;
 
case GET_SHIELD:
3158,17 → 3158,17
 
case GET_SCUBA:
ps->inv_amount[GET_SCUBA] = *insptr;// 1600;
ps->inven_icon = ICON_SCUBA;
ps->inven_icon = 6;
break;
 
case GET_HOLODUKE:
ps->inv_amount[GET_HOLODUKE] = *insptr;// 1600;
ps->inven_icon = ICON_HOLODUKE;
ps->inven_icon = 3;
break;
 
case GET_JETPACK:
ps->inv_amount[GET_JETPACK] = *insptr;// 1600;
ps->inven_icon = ICON_JETPACK;
ps->inven_icon = 4;
break;
 
case GET_ACCESS:
3188,16 → 3188,16
 
case GET_HEATS:
ps->inv_amount[GET_HEATS] = *insptr;
ps->inven_icon = ICON_HEATS;
ps->inven_icon = 5;
break;
 
case GET_FIRSTAID:
ps->inven_icon = ICON_FIRSTAID;
ps->inven_icon = 1;
ps->inv_amount[GET_FIRSTAID] = *insptr;
break;
 
case GET_BOOTS:
ps->inven_icon = ICON_BOOTS;
ps->inven_icon = 7;
ps->inv_amount[GET_BOOTS] = *insptr;
break;
default:
/polymer/eduke32/source/global.c
50,7 → 50,7
 
char *ScriptQuotes[MAXQUOTES], *ScriptQuoteRedefinitions[MAXQUOTES];
 
char tempbuf[MAXSECTORS<<1], packbuf[PACKBUF_SIZE], menutextbuf[128], buf[1024];
char tempbuf[2048], packbuf[PACKBUF_SIZE], menutextbuf[128], buf[1024];
 
int16_t camsprite;
int16_t g_mirrorWall[64], g_mirrorSector[64], g_mirrorCount;
/polymer/eduke32/source/global.h
64,7 → 64,7
G_EXTERN char ready2send;
G_EXTERN char setupfilename[BMAX_PATH];
G_EXTERN char szPlayerName[32];
G_EXTERN char tempbuf[MAXSECTORS<<1],packbuf[PACKBUF_SIZE],menutextbuf[128],buf[1024];
G_EXTERN char tempbuf[2048],packbuf[PACKBUF_SIZE],menutextbuf[128],buf[1024];
G_EXTERN char typebuflen,typebuf[141];
G_EXTERN const char *s_buildDate;
G_EXTERN input_t avg;
/polymer/eduke32/source/player.c
3267,7 → 3267,7
if (p->inv_amount[GET_SCUBA] > 0)
{
p->scuba_on = 1;
p->inven_icon = ICON_SCUBA;
p->inven_icon = 6;
P_DoQuote(QUOTE_SCUBA_ON,p);
}
else
3414,20 → 3414,20
void P_SelectNextInvItem(DukePlayer_t *p)
{
if (p->inv_amount[GET_FIRSTAID] > 0)
p->inven_icon = ICON_FIRSTAID;
p->inven_icon = 1;
else if (p->inv_amount[GET_STEROIDS] > 0)
p->inven_icon = ICON_STEROIDS;
p->inven_icon = 2;
else if (p->inv_amount[GET_JETPACK] > 0)
p->inven_icon = ICON_JETPACK;
p->inven_icon = 4;
else if (p->inv_amount[GET_HOLODUKE] > 0)
p->inven_icon = ICON_HOLODUKE;
p->inven_icon = 3;
else if (p->inv_amount[GET_HEATS] > 0)
p->inven_icon = ICON_HEATS;
p->inven_icon = 5;
else if (p->inv_amount[GET_SCUBA] > 0)
p->inven_icon = ICON_SCUBA;
p->inven_icon = 6;
else if (p->inv_amount[GET_BOOTS] > 0)
p->inven_icon = ICON_BOOTS;
else p->inven_icon = ICON_NONE;
p->inven_icon = 7;
else p->inven_icon = 0;
}
 
void P_CheckWeapon(DukePlayer_t *p)
5060,7 → 5060,7
if (p->inv_amount[GET_BOOTS] > 0)
{
p->inv_amount[GET_BOOTS]--;
p->inven_icon = ICON_BOOTS;
p->inven_icon = 7;
if (p->inv_amount[GET_BOOTS] <= 0)
P_SelectNextInvItem(p);
}
/polymer/eduke32/source/player.h
54,19 → 54,6
GET_MAX
};
 
// these are not in the same order as the above, and it can't be changed for compat reasons. lame!
enum dukeinvicon_t {
ICON_NONE,
ICON_FIRSTAID,
ICON_STEROIDS,
ICON_HOLODUKE,
ICON_JETPACK,
ICON_HEATS,
ICON_SCUBA,
ICON_BOOTS,
ICON_MAX
};
 
enum dukeweapon_t {
KNEE_WEAPON, // 0
PISTOL_WEAPON,
/polymer/eduke32/source/premap.c
501,7 → 501,7
 
#ifdef USE_OPENGL
// PRECACHE
if (ud.config.useprecache && bpp > 8)
if (ud.config.useprecache)
{
int32_t k,type;
 
545,7 → 545,7
if ((j&7) == 0)
G_HandleAsync();
 
if (bpp > 8 && totalclock - tc > TICRATE/4)
if (totalclock - tc > TICRATE/4)
{
/*Bsprintf(tempbuf,"%d resources remaining\n",g_precacheCount-pc+1);*/
tc = min(100,100*pc/g_precacheCount);
789,7 → 789,7
if (p->inv_amount[GET_STEROIDS] < 400)
{
p->inv_amount[GET_STEROIDS] = 0;
p->inven_icon = ICON_NONE;
p->inven_icon = 0;
}
p->heat_on = 0;
p->jetpack_on = 0;
863,12 → 863,14
 
Bmemset(p->inv_amount, 0, sizeof(p->inv_amount));
 
p->inven_icon = 0;
p->scuba_on = 0;
p->heat_on = 0;
p->jetpack_on = 0;
p->holoduke_on = -1;
 
p->inv_amount[GET_SHIELD] = g_startArmorAmount;
p->inven_icon = ICON_NONE;
p->inven_icon = 0;
VM_OnEvent(EVENT_RESETINVENTORY, p->i, snum, -1, 0);
}
 
/polymer/eduke32/source/sector.c
2520,6 → 2520,7
}
}
 
// j = sb_snum & ((15<<8)|(1<<12)|(1<<15)|(1<<16)|(1<<22)|(1<<19)|(1<<20)|(1<<21)|(1<<24)|(1<<25)|(1<<27)|(1<<28)|(1<<29)|(1<<30)|(1<<31));
j = sb_snum & ((15<<SK_WEAPON_BITS)|BIT(SK_STEROIDS)|BIT(SK_NIGHTVISION)|BIT(SK_MEDKIT)|BIT(SK_QUICK_KICK)| \
BIT(SK_HOLSTER)|BIT(SK_INV_LEFT)|BIT(SK_PAUSE)|BIT(SK_HOLODUKE)|BIT(SK_JETPACK)|BIT(SK_INV_RIGHT)| \
BIT(SK_TURNAROUND)|BIT(SK_OPEN)|BIT(SK_INVENTORY)|BIT(SK_ESCAPE));
2559,19 → 2560,19
{
switch (p->inven_icon)
{
case ICON_JETPACK:
case 4:
sb_snum |= BIT(SK_JETPACK);
break;
case ICON_HOLODUKE:
case 3:
sb_snum |= BIT(SK_HOLODUKE);
break;
case ICON_HEATS:
case 5:
sb_snum |= BIT(SK_NIGHTVISION);
break;
case ICON_FIRSTAID:
case 1:
sb_snum |= BIT(SK_MEDKIT);
break;
case ICON_STEROIDS:
case 2:
sb_snum |= BIT(SK_STEROIDS);
break;
}
2585,7 → 2586,7
{
p->heat_on = !p->heat_on;
P_UpdateScreenPal(p);
p->inven_icon = ICON_HEATS;
p->inven_icon = 5;
A_PlaySound(NITEVISION_ONOFF,p->i);
P_DoQuote(QUOTE_NVG_OFF-!!p->heat_on,p);
}
2602,7 → 2603,7
P_DoQuote(QUOTE_USED_STEROIDS,p);
}
if (p->inv_amount[GET_STEROIDS] > 0)
p->inven_icon = ICON_STEROIDS;
p->inven_icon = 2;
}
return; // is there significance to returning?
}
2628,44 → 2629,44
 
switch (dainv)
{
case ICON_JETPACK:
case 4:
if (p->inv_amount[GET_JETPACK] > 0 && i > 1)
break;
if (k) dainv++;
else dainv--;
goto CHECKINV1;
case ICON_SCUBA:
case 6:
if (p->inv_amount[GET_SCUBA] > 0 && i > 1)
break;
if (k) dainv++;
else dainv--;
goto CHECKINV1;
case ICON_STEROIDS:
case 2:
if (p->inv_amount[GET_STEROIDS] > 0 && i > 1)
break;
if (k) dainv++;
else dainv--;
goto CHECKINV1;
case ICON_HOLODUKE:
case 3:
if (p->inv_amount[GET_HOLODUKE] > 0 && i > 1)
break;
if (k) dainv++;
else dainv--;
goto CHECKINV1;
case ICON_NONE:
case ICON_FIRSTAID:
case 0:
case 1:
if (p->inv_amount[GET_FIRSTAID] > 0 && i > 1)
break;
if (k) dainv = 2;
else dainv = 7;
goto CHECKINV1;
case ICON_HEATS:
case 5:
if (p->inv_amount[GET_HEATS] > 0 && i > 1)
break;
if (k) dainv++;
else dainv--;
goto CHECKINV1;
case ICON_BOOTS:
case 7:
if (p->inv_amount[GET_BOOTS] > 0 && i > 1)
break;
if (k) dainv = 1;
2887,7 → 2888,7
{
if (p->inv_amount[GET_HOLODUKE] > 0)
{
p->inven_icon = ICON_HOLODUKE;
p->inven_icon = 3;
 
if (p->cursectnum > -1)
{
2926,7 → 2927,7
{
p->inv_amount[GET_FIRSTAID] -= j;
sprite[p->i].extra = p->max_player_health;
p->inven_icon = ICON_FIRSTAID;
p->inven_icon = 1;
}
else
{
2948,7 → 2949,7
p->jetpack_on = !p->jetpack_on;
if (p->jetpack_on)
{
p->inven_icon = ICON_JETPACK;
p->inven_icon = 4;
if (p->scream_voice > FX_Ok)
{
FX_StopSound(p->scream_voice);