mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-23 12:32:13 +00:00
- exported RR's remaining controllers.
This commit is contained in:
parent
98d5a2686e
commit
f2d802b537
19 changed files with 180 additions and 107 deletions
|
@ -2638,7 +2638,7 @@ void handle_se25(DDukeActor* actor, int snd1, int snd2)
|
|||
if (sec->ceilingz > sec->floorz)
|
||||
{
|
||||
sec->setceilingz(sec->floorz);
|
||||
if (pistonsound && snd1 >= 0)
|
||||
if (ud.pistonsound && snd1 >= 0)
|
||||
S_PlayActorSound(snd1, actor);
|
||||
}
|
||||
}
|
||||
|
@ -2648,7 +2648,7 @@ void handle_se25(DDukeActor* actor, int snd1, int snd2)
|
|||
if (sec->ceilingz < actor->temp_pos.Z)
|
||||
{
|
||||
sec->setceilingz(actor->temp_pos.Z);
|
||||
if (pistonsound && snd2 >= 0)
|
||||
if (ud.pistonsound && snd2 >= 0)
|
||||
S_PlayActorSound(snd2, actor);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1612,7 +1612,7 @@ void destroyit(DDukeActor *actor)
|
|||
DukeSectIterator it1(actor->sector());
|
||||
while (auto a2 = it1.Next())
|
||||
{
|
||||
if (a2->spr.picnum == RTILE_RRTILE63)
|
||||
if (a2->spr.picnum == RTILE_DESTROYTAGS)
|
||||
{
|
||||
lotag = a2->spr.lotag;
|
||||
spr = a2;
|
||||
|
@ -1691,7 +1691,7 @@ void destroyit(DDukeActor *actor)
|
|||
switch (a2->spr.picnum)
|
||||
{
|
||||
case RTILE_DESTRUCTO:
|
||||
case RTILE_RRTILE63:
|
||||
case RTILE_DESTROYTAGS:
|
||||
case RTILE_TORNADO:
|
||||
case RTILE_APLAYER:
|
||||
case RTILE_COOT:
|
||||
|
|
|
@ -243,36 +243,6 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
drawshadows(tsprites, t, h);
|
||||
}
|
||||
|
||||
|
||||
switch (h->spr.picnum)
|
||||
{
|
||||
case RTILE_CRYSTALAMMO:
|
||||
t->shade = int(BobVal(PlayClock << 4) * 16);
|
||||
break;
|
||||
|
||||
case RTILE_SBMOVE:
|
||||
if (!isRRRA())
|
||||
t->shade = -127;
|
||||
break;
|
||||
|
||||
case RTILE_EXPLOSION3:
|
||||
t->shade = -127;
|
||||
break;
|
||||
case RTILE_UFOBEAM:
|
||||
case RTILE_RRTILE3586:
|
||||
case RTILE_LADDER:
|
||||
t->cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
h->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
break;
|
||||
case RTILE_DESTRUCTO:
|
||||
t->cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
break;
|
||||
|
||||
case RTILE_LETSBOWL:
|
||||
t->picnum = RTILE_LETSBOWL + ((PlayClock >> 2) & 1);
|
||||
break;
|
||||
}
|
||||
|
||||
h->dispicnum = t->picnum;
|
||||
if (t->sectp->floortexture == mirrortex)
|
||||
t->scale = DVector2(0, 0);
|
||||
|
|
|
@ -192,7 +192,6 @@ void initactorflags_r()
|
|||
RTILE_FORCESPHERE,
|
||||
RTILE_BURNING,
|
||||
RTILE_ATOMICHEALTH,
|
||||
RTILE_CRYSTALAMMO,
|
||||
RTILE_SHITBALL,
|
||||
RTILE_RPG,
|
||||
RTILE_RECON,
|
||||
|
|
|
@ -67,7 +67,7 @@ int lastlevel; // Set at the end of RRRA's E2L7.
|
|||
short fakebubba_spawn, mamaspawn_count, banjosound; // RRRA special effects
|
||||
int WindTime;
|
||||
DAngle WindDir;
|
||||
uint8_t enemysizecheat /*raat607*/, pistonsound, chickenphase /* raat605*/, RRRA_ExitedLevel, fogactive;
|
||||
uint8_t enemysizecheat /*raat607*/, chickenphase /* raat605*/, RRRA_ExitedLevel;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
|
|
|
@ -128,7 +128,7 @@ extern TArray<DVector2> mspos;
|
|||
extern int WindTime;
|
||||
extern DAngle WindDir;
|
||||
extern short fakebubba_spawn, mamaspawn_count, banjosound;
|
||||
extern uint8_t enemysizecheat /*raat607*/, pistonsound, chickenphase /* raat605*/, RRRA_ExitedLevel, fogactive;
|
||||
extern uint8_t enemysizecheat /*raat607*/, chickenphase /* raat605*/, RRRA_ExitedLevel;
|
||||
extern player_orig po[MAXPLAYERS];
|
||||
extern int32_t g_cdTrack;
|
||||
|
||||
|
|
|
@ -30,8 +30,6 @@ x(BATTERYAMMO, 41)
|
|||
x(DEVISTATORAMMO, 42)
|
||||
x(SAWAMMO, 43)
|
||||
x(RPGAMMO, 44)
|
||||
x(GROWAMMO, 45)
|
||||
x(CRYSTALAMMO, 46)
|
||||
x(HBOMBAMMO, 47)
|
||||
x(AMMOLOTS, 48)
|
||||
x(SHOTGUNAMMO, 49)
|
||||
|
@ -46,7 +44,7 @@ x(HEATSENSOR, 59)
|
|||
x(ACCESSCARD, 60)
|
||||
x(BOOTS, 61)
|
||||
x(GUTMETER, 62)
|
||||
y(RRTILE63, 63)
|
||||
y(DESTROYTAGS, 63)
|
||||
y(RRMINECART, 64)
|
||||
y(RRMINECARTSOUND, 65)
|
||||
y(RRMINECARTINNER, 66)
|
||||
|
@ -675,6 +673,7 @@ x(BOWLINGLANE2, 2026)
|
|||
x(BOWLINGLANE3, 2027)
|
||||
x(BOWLINGLANE4, 2028)
|
||||
y(LETSBOWL, 2034)
|
||||
y(LETSBOWL1, 2035)
|
||||
y(RRTILE2050, 2050)
|
||||
y(RRTILE2052, 2052)
|
||||
y(RRTILE2053, 2053)
|
||||
|
|
|
@ -641,7 +641,7 @@ void prelevel_common(int g)
|
|||
auto p = &ps[screenpeek];
|
||||
p->sea_sick_stat = 0;
|
||||
ud.ufospawnsminion = 0;
|
||||
pistonsound = 0;
|
||||
ud.pistonsound = 0;
|
||||
p->SlotWin = 0;
|
||||
enemysizecheat = 0;
|
||||
p->MamaEnd = 0;
|
||||
|
@ -660,7 +660,7 @@ void prelevel_common(int g)
|
|||
mamaspawn_count = currentLevel->rr_mamaspawn;
|
||||
|
||||
// RRRA E2L1 fog handling.
|
||||
fogactive = 0;
|
||||
ud.fogactive = 0;
|
||||
|
||||
resetprestat(0, g);
|
||||
numclouds = 0;
|
||||
|
|
|
@ -227,14 +227,14 @@ void displayrooms(int snum, double interpfrac, bool sceneonly)
|
|||
return;
|
||||
|
||||
// Do not light up the fog in RRRA's E2L1. Ideally this should apply to all foggy levels but all others use lookup table hacks for their fog.
|
||||
if (isRRRA() && fogactive)
|
||||
if (ud.fogactive)
|
||||
{
|
||||
p->visibility = ud.const_visibility;
|
||||
}
|
||||
g_visibility = ud.const_visibility;
|
||||
g_relvisibility = p->visibility - ud.const_visibility;
|
||||
GlobalMapFog = fogactive ? 0x999999 : 0;
|
||||
GlobalFogDensity = fogactive ? 350.f : 0.f;
|
||||
GlobalMapFog = ud.fogactive ? 0x999999 : 0;
|
||||
GlobalFogDensity = ud.fogactive ? 350.f : 0.f;
|
||||
|
||||
DoInterpolations(interpfrac);
|
||||
|
||||
|
@ -341,7 +341,7 @@ void displayrooms(int snum, double interpfrac, bool sceneonly)
|
|||
//GLInterface.SetMapFog(false);
|
||||
RestoreInterpolations();
|
||||
|
||||
if (!fogactive)
|
||||
if (!ud.fogactive)
|
||||
{
|
||||
if (PlayClock < lastvisinc)
|
||||
{
|
||||
|
|
|
@ -430,10 +430,10 @@ void GameInterface::SerializeGameState(FSerializer& arc)
|
|||
("mamaspawn_count", mamaspawn_count)
|
||||
("banjosound", banjosound)
|
||||
("enemysizecheat", enemysizecheat)
|
||||
("pistonsound", pistonsound)
|
||||
("pistonsound", ud.pistonsound)
|
||||
("chickenphase", chickenphase)
|
||||
("RRRA_ExitedLevel", RRRA_ExitedLevel)
|
||||
("fogactive", fogactive)
|
||||
("fogactive", ud.fogactive)
|
||||
("thunder_brightness", thunder_brightness)
|
||||
.Array("po", po, ud.multimode)
|
||||
("rrcdtrack", g_cdTrack)
|
||||
|
|
|
@ -64,52 +64,6 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
if (!badguy(act) || commonEnemySetup(act, actj))
|
||||
CallInitialize(act);
|
||||
break;
|
||||
case RTILE_RRTILE7936:
|
||||
if (!isRRRA()) goto default_case;
|
||||
act->spr.scale = DVector2(0, 0);
|
||||
fogactive = 1;
|
||||
break;
|
||||
case RTILE_RRTILE6144:
|
||||
if (!isRRRA()) goto default_case;
|
||||
act->spr.scale = DVector2(0, 0);
|
||||
ps[screenpeek].sea_sick_stat = 1;
|
||||
break;
|
||||
case RTILE_RRTILE8193:
|
||||
if (!isRRRA()) goto default_case;
|
||||
act->spr.scale = DVector2(0, 0);
|
||||
pistonsound = 1;
|
||||
break;
|
||||
|
||||
case RTILE_GRATE1:
|
||||
act->clipdist = 8;
|
||||
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
|
||||
ChangeActorStat(act, 0);
|
||||
break;
|
||||
case RTILE_EXPLOSION3:
|
||||
if (actj)
|
||||
{
|
||||
act->spr.Angles.Yaw = actj->spr.Angles.Yaw;
|
||||
act->spr.shade = -64;
|
||||
act->spr.cstat = CSTAT_SPRITE_YCENTER | randomXFlip();
|
||||
}
|
||||
|
||||
else if (act->spr.picnum == RTILE_EXPLOSION3)
|
||||
{
|
||||
act->spr.scale = DVector2(2, 2);
|
||||
act->spr.shade = -127;
|
||||
act->spr.cstat |= CSTAT_SPRITE_YCENTER;
|
||||
}
|
||||
|
||||
if (actj)
|
||||
{
|
||||
double x = getflorzofslopeptr(act->sector(), act->spr.pos);
|
||||
if (act->spr.pos.Z > x - 12)
|
||||
act->spr.pos.Z = x - 12;
|
||||
}
|
||||
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
|
||||
break;
|
||||
|
||||
case RTILE_APLAYER:
|
||||
{
|
||||
|
@ -124,6 +78,14 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
/* animate
|
||||
case RTILE_SBMOVE:
|
||||
if (!isRRRA())
|
||||
t->shade = -127;
|
||||
break;
|
||||
|
||||
*/
|
||||
// this is not really nice...
|
||||
case RTILE_BIKERB:
|
||||
case RTILE_BIKERBV2:
|
||||
|
@ -355,8 +317,6 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case RTILE_SHOTGUNAMMO:
|
||||
case RTILE_FREEZEAMMO:
|
||||
case RTILE_HBOMBAMMO:
|
||||
case RTILE_CRYSTALAMMO:
|
||||
case RTILE_GROWAMMO:
|
||||
case RTILE_DEVISTATORAMMO:
|
||||
case RTILE_RPGAMMO:
|
||||
case RTILE_BOOTS:
|
||||
|
@ -366,6 +326,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case RTILE_FIRSTAID:
|
||||
|
||||
case RTILE_SAWAMMO:
|
||||
|
||||
if (actj)
|
||||
{
|
||||
act->spr.lotag = 0;
|
||||
|
@ -485,16 +446,6 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
}
|
||||
act->spr.shade = act->sector()->floorshade;
|
||||
break;
|
||||
case RTILE_CEILINGSTEAM:
|
||||
ChangeActorStat(act, STAT_STANDABLE);
|
||||
break;
|
||||
|
||||
case RTILE_RRTILE63:
|
||||
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
act->spr.scale = DVector2(REPEAT_SCALE, REPEAT_SCALE);
|
||||
act->clipdist = 0.25;
|
||||
ChangeActorStat(act, 100);
|
||||
break;
|
||||
}
|
||||
return act;
|
||||
}
|
||||
|
|
|
@ -157,6 +157,7 @@ struct user_defs
|
|||
uint8_t clipping;
|
||||
uint8_t user_pals[MAXPLAYERS];
|
||||
uint8_t ufospawnsminion;
|
||||
uint8_t pistonsound, fogactive;
|
||||
|
||||
short from_bonus;
|
||||
short last_level, secretlevel;
|
||||
|
|
|
@ -1478,6 +1478,8 @@ DEFINE_FIELD_X(DukeUserDefs, user_defs, monsters_off);
|
|||
DEFINE_FIELD_X(DukeUserDefs, user_defs, brightness);
|
||||
DEFINE_FIELD_X(DukeUserDefs, user_defs, ffire);
|
||||
DEFINE_FIELD_X(DukeUserDefs, user_defs, multimode);
|
||||
DEFINE_FIELD_X(DukeUserDefs, user_defs, pistonsound);
|
||||
DEFINE_FIELD_X(DukeUserDefs, user_defs, fogactive);
|
||||
DEFINE_FIELD_X(DukeUserDefs, user_defs, player_skill);
|
||||
DEFINE_FIELD_X(DukeUserDefs, user_defs, marker);
|
||||
DEFINE_FIELD_X(DukeUserDefs, user_defs, bomb_tag);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
spawnclasses
|
||||
{
|
||||
7936 = RedneckFogEnabler
|
||||
6144 = RedneckSeasickEnabler
|
||||
8193 = RedneckPistonSoundEnabler
|
||||
|
||||
3464 = RedneckCheerBomb
|
||||
2430 = RedneckCactusLargeYellow
|
||||
2431 = RedneckCactusLargeGreen
|
||||
|
|
|
@ -16,6 +16,15 @@ spawnclasses
|
|||
68 = DukeShadeCtrl
|
||||
67 = DukeMinecartKiller
|
||||
71 = DukeSoundFX
|
||||
252 = RedneckUfoBeam
|
||||
2586 = RedneckInvisible
|
||||
3587 = RedneckLadder
|
||||
36 = RedneckDestructo
|
||||
63 = RedneckDestroyTags
|
||||
7936 = RedneckFogEnabler
|
||||
6144 = RedneckSeasickEnabler
|
||||
8193 = RedneckPistonSoundEnabler
|
||||
|
||||
|
||||
64 = RedneckMinecartDef
|
||||
65 = RedneckMinecartSound
|
||||
|
@ -271,6 +280,8 @@ spawnclasses
|
|||
3171 = DukeActor, "*RRTILE3171"
|
||||
3216 = DukeActor, "*RRTILE3216"
|
||||
3720 = DukeActor, "*RRTILE3720"
|
||||
2944 = DukeActor, "*PULSELAMP"
|
||||
2034 = RedneckLetsBowl
|
||||
|
||||
// the following actors use CON
|
||||
|
||||
|
@ -280,6 +291,7 @@ spawnclasses
|
|||
1494 = DukeBurning
|
||||
1495 = RedneckFire
|
||||
1441 = DukeExplosion2
|
||||
1442 = RedneckExplosion3
|
||||
41 = RedneckRifleAmmo
|
||||
52 = RedneckPorkRinds
|
||||
5595 = RedneckGoogooCluster
|
||||
|
@ -292,6 +304,7 @@ spawnclasses
|
|||
1391 = RedneckBlood
|
||||
3998 = RedneckPlayerLyingDead
|
||||
3860 = DukePlayerOnWater
|
||||
1332 = DukeCeilingSteam
|
||||
|
||||
|
||||
4861 = RedneckHen
|
||||
|
|
|
@ -195,3 +195,106 @@ class RedneckKeyinfoSetter : DukeActor
|
|||
{
|
||||
}
|
||||
|
||||
class RedneckUfoBeam : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "UFOBEAM";
|
||||
}
|
||||
|
||||
override bool animate(tspritetype t)
|
||||
{
|
||||
t.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class RedneckInvisible : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "RRTILE3586";
|
||||
}
|
||||
|
||||
override bool animate(tspritetype t)
|
||||
{
|
||||
t.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class RedneckLadder : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "Ladder";
|
||||
}
|
||||
|
||||
override bool animate(tspritetype t)
|
||||
{
|
||||
t.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class RedneckDestructo : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "DESTRUCTO";
|
||||
statnum STAT_DESTRUCT;
|
||||
}
|
||||
|
||||
override bool animate(tspritetype t)
|
||||
{
|
||||
t.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class RedneckDestroyTags : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "DESTROYTAGS";
|
||||
}
|
||||
override void Initialize()
|
||||
{
|
||||
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
self.scale = (REPEAT_SCALE, REPEAT_SCALE);
|
||||
self.clipdist = 0.25;
|
||||
self.ChangeStat(STAT_DESTRUCT);
|
||||
}
|
||||
}
|
||||
|
||||
class RedneckPistonSoundEnabler : DukeActor
|
||||
{
|
||||
override void StaticSetup()
|
||||
{
|
||||
ud.pistonsound = true;
|
||||
self.Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
class RedneckFogEnabler : DukeActor
|
||||
{
|
||||
override void StaticSetup()
|
||||
{
|
||||
ud.fogactive = true;
|
||||
self.Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
class RedneckSeasickEnabler : DukeActor
|
||||
{
|
||||
override void StaticSetup()
|
||||
{
|
||||
// this is so wrong... :(
|
||||
Duke.GetViewPlayer().sea_sick_stat = true;
|
||||
self.Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,3 +47,21 @@ class DukeExplosion2Bot : DukeExplosion2
|
|||
}
|
||||
}
|
||||
|
||||
class RedneckExplosion3 : DukeExplosion2
|
||||
{
|
||||
default
|
||||
{
|
||||
pic "EXPLOSION3";
|
||||
}
|
||||
|
||||
override void Initialize()
|
||||
{
|
||||
self.scale = (2, 2);
|
||||
}
|
||||
|
||||
override bool animate(tspritetype t)
|
||||
{
|
||||
t.shade = -127;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,3 +108,16 @@ class RedneckBellSwitch : DukeActor
|
|||
}
|
||||
}
|
||||
|
||||
class RedneckLetsBowl : DukeActor
|
||||
{
|
||||
default
|
||||
{
|
||||
spriteset "LETSBOWL", "LETSBOWL1";
|
||||
}
|
||||
|
||||
override bool animate(tspritetype t)
|
||||
{
|
||||
t.SetspritePic(self, (PlayClock >> 2) & 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -477,7 +477,7 @@ struct DukeUserDefs native
|
|||
native readonly int player_skill, marker;
|
||||
|
||||
native int earthquaketime, chickenplant;
|
||||
native uint8 ufospawnsminion;
|
||||
native uint8 ufospawnsminion, pistonsound, fogactive;
|
||||
native int16 bomb_tag;
|
||||
native DukeActor cameraactor;
|
||||
native bool joe9000;
|
||||
|
|
Loading…
Reference in a new issue