Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 4901 → Rev 4902

/polymer/eduke32/source/gamedef.c
124,55 → 124,10
 
#ifdef LUNATIC
weapondata_t g_playerWeapon[MAXPLAYERS][MAX_WEAPONS];
#else
// pointers to weapon gamevar data
intptr_t *aplWeaponClip[MAX_WEAPONS]; // number of items in magazine
intptr_t *aplWeaponReload[MAX_WEAPONS]; // delay to reload (include fire)
intptr_t *aplWeaponFireDelay[MAX_WEAPONS]; // delay to fire
intptr_t *aplWeaponHoldDelay[MAX_WEAPONS]; // delay after release fire button to fire (0 for none)
intptr_t *aplWeaponTotalTime[MAX_WEAPONS]; // The total time the weapon is cycling before next fire.
intptr_t *aplWeaponFlags[MAX_WEAPONS]; // Flags for weapon
intptr_t *aplWeaponShoots[MAX_WEAPONS]; // what the weapon shoots
intptr_t *aplWeaponSpawnTime[MAX_WEAPONS]; // the frame at which to spawn an item
intptr_t *aplWeaponSpawn[MAX_WEAPONS]; // the item to spawn
intptr_t *aplWeaponShotsPerBurst[MAX_WEAPONS]; // number of shots per 'burst' (one ammo per 'burst')
intptr_t *aplWeaponWorksLike[MAX_WEAPONS]; // What original the weapon works like
intptr_t *aplWeaponInitialSound[MAX_WEAPONS]; // Sound made when weapon starts firing. zero for no sound
intptr_t *aplWeaponFireSound[MAX_WEAPONS]; // Sound made when firing (each time for automatic)
intptr_t *aplWeaponSound2Time[MAX_WEAPONS]; // Alternate sound time
intptr_t *aplWeaponSound2Sound[MAX_WEAPONS]; // Alternate sound sound ID
intptr_t *aplWeaponReloadSound1[MAX_WEAPONS]; // Sound of magazine being removed
intptr_t *aplWeaponReloadSound2[MAX_WEAPONS]; // Sound of magazine being inserted
intptr_t *aplWeaponSelectSound[MAX_WEAPONS]; // Sound of weapon being selected
intptr_t *aplWeaponFlashColor[MAX_WEAPONS]; // Muzzle flash color
#endif
 
int32_t g_iReturnVarID=-1; // var ID of "RETURN"
int32_t g_iWeaponVarID=-1; // var ID of "WEAPON"
int32_t g_iWorksLikeVarID=-1; // var ID of "WORKSLIKE"
int32_t g_iZRangeVarID=-1; // var ID of "ZRANGE"
int32_t g_iAngRangeVarID=-1; // var ID of "ANGRANGE"
int32_t g_iAimAngleVarID=-1; // var ID of "AUTOAIMANGLE"
int32_t g_iLoTagID=-1; // var ID of "LOTAG"
int32_t g_iHiTagID=-1; // var ID of "HITAG"
int32_t g_iTextureID=-1; // var ID of "TEXTURE"
int32_t g_iThisActorID=-1; // var ID of "THISACTOR"
int32_t g_iSpriteVarID=-1;
int32_t g_iSectorVarID=-1;
int32_t g_iWallVarID=-1;
int32_t g_iPlayerVarID=-1;
int32_t g_iActorVarID=-1;
 
intptr_t *apScriptGameEvent[MAXGAMEEVENTS];
 
#if !defined LUNATIC
static intptr_t *g_parsingEventPtr=NULL;
 
gamevar_t aGameVars[MAXGAMEVARS];
gamearray_t aGameArrays[MAXGAMEARRAYS];
int32_t g_gameVarCount=0;
int32_t g_gameArrayCount=0;
 
static char *textptr;
#endif
 
2348,102 → 2303,101
 
void C_InitQuotes(void)
{
int32_t i;
for (int i = 0; i < 128; i++) C_AllocQuote(i);
 
for (i=127; i>=0; i--)
C_AllocQuote(i);
 
for (i=MAXQUOTELEN-7; i>=0; i--)
if (Bstrncmp(&ScriptQuotes[13][i],"SPACE",5) == 0)
#if defined(__ANDROID__)
Bsprintf(ScriptQuotes[13], "TOUCH ANYWHERE TO CONTINUE");
#else
for (int i = MAXQUOTELEN - 7; i >= 0; i--)
if (Bstrncmp(&ScriptQuotes[13][i], "SPACE", 5) == 0)
{
Bmemset(tempbuf,0,sizeof(tempbuf));
Bstrncpy(tempbuf,ScriptQuotes[13],i);
Bstrcat(tempbuf,"OPEN");
Bstrcat(tempbuf,&ScriptQuotes[13][i+5]);
Bstrncpy(ScriptQuotes[13],tempbuf,MAXQUOTELEN-1);
i = MAXQUOTELEN-7;
Bmemset(tempbuf, 0, sizeof(tempbuf));
Bstrncpy(tempbuf, ScriptQuotes[13], i);
Bstrcat(tempbuf, "USE");
Bstrcat(tempbuf, &ScriptQuotes[13][i + 5]);
Bstrncpy(ScriptQuotes[13], tempbuf, MAXQUOTELEN - 1);
i = MAXQUOTELEN - 7;
}
#endif
 
// most of these are based on Blood, obviously
const char *PlayerObituaries[] =
{
const char *PlayerObituaries[] =
{
"^02%s^02 beat %s^02 like a cur",
"^02%s^02 broke %s",
"^02%s^02 body bagged %s",
"^02%s^02 boned %s^02 like a fish",
"^02%s^02 castrated %s",
"^02%s^02 creamed %s",
"^02%s^02 crushed %s",
"^02%s^02 destroyed %s",
"^02%s^02 diced %s",
"^02%s^02 disemboweled %s",
"^02%s^02 erased %s",
"^02%s^02 eviscerated %s",
"^02%s^02 flailed %s",
"^02%s^02 flattened %s",
"^02%s^02 gave AnAl MaDnEsS to %s",
"^02%s^02 gave %s^02 Anal Justice",
"^02%s^02 hosed %s",
"^02%s^02 hurt %s^02 real bad",
"^02%s^02 killed %s",
"^02%s^02 made dog meat out of %s",
"^02%s^02 made mincemeat out of %s",
"^02%s^02 manhandled %s",
"^02%s^02 massacred %s",
"^02%s^02 mutilated %s",
"^02%s^02 murdered %s",
"^02%s^02 neutered %s",
"^02%s^02 punted %s",
"^02%s^02 reamed %s",
"^02%s^02 ripped %s^02 a new orifice",
"^02%s^02 rocked %s",
"^02%s^02 sent %s^02 to hell",
"^02%s^02 shredded %s",
"^02%s^02 slashed %s",
"^02%s^02 slaughtered %s",
"^02%s^02 sliced %s",
"^02%s^02 smacked %s around",
"^02%s^02 smashed %s",
"^02%s^02 snuffed %s",
"^02%s^02 sodomized %s",
"^02%s^02 splattered %s",
"^02%s^02 sprayed %s",
"^02%s^02 squashed %s",
"^02%s^02 throttled %s",
"^02%s^02 toasted %s",
"^02%s^02 vented %s",
"^02%s^02 ventilated %s",
"^02%s^02 wasted %s",
"^02%s^02 wrecked %s",
};
"^02%s^02 beat %s^02 like a cur",
"^02%s^02 broke %s",
"^02%s^02 body bagged %s",
"^02%s^02 boned %s^02 like a fish",
"^02%s^02 castrated %s",
"^02%s^02 creamed %s",
"^02%s^02 crushed %s",
"^02%s^02 destroyed %s",
"^02%s^02 diced %s",
"^02%s^02 disemboweled %s",
"^02%s^02 erased %s",
"^02%s^02 eviscerated %s",
"^02%s^02 flailed %s",
"^02%s^02 flattened %s",
"^02%s^02 gave AnAl MaDnEsS to %s",
"^02%s^02 gave %s^02 Anal Justice",
"^02%s^02 hosed %s",
"^02%s^02 hurt %s^02 real bad",
"^02%s^02 killed %s",
"^02%s^02 made dog meat out of %s",
"^02%s^02 made mincemeat out of %s",
"^02%s^02 manhandled %s",
"^02%s^02 massacred %s",
"^02%s^02 mutilated %s",
"^02%s^02 murdered %s",
"^02%s^02 neutered %s",
"^02%s^02 punted %s",
"^02%s^02 reamed %s",
"^02%s^02 ripped %s^02 a new orifice",
"^02%s^02 rocked %s",
"^02%s^02 sent %s^02 to hell",
"^02%s^02 shredded %s",
"^02%s^02 slashed %s",
"^02%s^02 slaughtered %s",
"^02%s^02 sliced %s",
"^02%s^02 smacked %s around",
"^02%s^02 smashed %s",
"^02%s^02 snuffed %s",
"^02%s^02 sodomized %s",
"^02%s^02 splattered %s",
"^02%s^02 sprayed %s",
"^02%s^02 squashed %s",
"^02%s^02 throttled %s",
"^02%s^02 toasted %s",
"^02%s^02 vented %s",
"^02%s^02 ventilated %s",
"^02%s^02 wasted %s",
"^02%s^02 wrecked %s",
};
 
const char *PlayerSelfObituaries[] =
{
"^02%s^02 is excrement",
"^02%s^02 is hamburger",
"^02%s^02 suffered scrotum separation",
"^02%s^02 volunteered for population control",
"^02%s^02 has suicided",
"^02%s^02 bled out",
};
const char *PlayerSelfObituaries[] =
{
"^02%s^02 is excrement",
"^02%s^02 is hamburger",
"^02%s^02 suffered scrotum separation",
"^02%s^02 volunteered for population control",
"^02%s^02 has suicided",
"^02%s^02 bled out",
};
 
EDUKE32_STATIC_ASSERT(OBITQUOTEINDEX + ARRAY_SIZE(PlayerObituaries)-1 < MAXQUOTES);
EDUKE32_STATIC_ASSERT(SUICIDEQUOTEINDEX + ARRAY_SIZE(PlayerSelfObituaries)-1 < MAXQUOTES);
EDUKE32_STATIC_ASSERT(OBITQUOTEINDEX + ARRAY_SIZE(PlayerObituaries)-1 < MAXQUOTES);
EDUKE32_STATIC_ASSERT(SUICIDEQUOTEINDEX + ARRAY_SIZE(PlayerSelfObituaries)-1 < MAXQUOTES);
 
g_numObituaries = ARRAY_SIZE(PlayerObituaries);
for (i=g_numObituaries-1; i>=0; i--)
{
if (C_AllocQuote(i+OBITQUOTEINDEX))
Bstrcpy(ScriptQuotes[i+OBITQUOTEINDEX],PlayerObituaries[i]);
}
g_numObituaries = ARRAY_SIZE(PlayerObituaries);
for (int i = g_numObituaries - 1; i >= 0; i--)
{
if (C_AllocQuote(i + OBITQUOTEINDEX))
Bstrcpy(ScriptQuotes[i + OBITQUOTEINDEX], PlayerObituaries[i]);
}
 
g_numSelfObituaries = ARRAY_SIZE(PlayerSelfObituaries);
for (i=g_numSelfObituaries-1; i>=0; i--)
{
if (C_AllocQuote(i+SUICIDEQUOTEINDEX))
Bstrcpy(ScriptQuotes[i+SUICIDEQUOTEINDEX],PlayerSelfObituaries[i]);
}
g_numSelfObituaries = ARRAY_SIZE(PlayerSelfObituaries);
for (int i = g_numSelfObituaries - 1; i >= 0; i--)
{
if (C_AllocQuote(i + SUICIDEQUOTEINDEX))
Bstrcpy(ScriptQuotes[i + SUICIDEQUOTEINDEX], PlayerSelfObituaries[i]);
}
}