Rednukem: add dh specific code

# Conflicts:
#	source/rr/src/rrdh.cpp
#	source/rr/src/rrdh.h
This commit is contained in:
nukeykt 2020-02-27 19:00:28 +09:00 committed by Christoph Oelckers
parent 8c37e94061
commit 882b061ee1
7 changed files with 3270 additions and 36 deletions

View file

@ -813,6 +813,7 @@ static struct dynitem g_dynTileList[] =
{ "GUTMETER_LIGHT3", DVPTR(GUTMETER_LIGHT3), 0, GUTMETER_LIGHT3__STATICRR },
{ "GUTMETER_LIGHT4", DVPTR(GUTMETER_LIGHT4), 0, GUTMETER_LIGHT4__STATICRR },
{ "AMMO_ICON", DVPTR(AMMO_ICON), 0, AMMO_ICON__STATICRR },
{ "RRTILE409", DVPTR(RRTILE1076), 0, RRTILE1076__STATICRR },
{ "MUD", DVPTR(MUD), 0, MUD__STATICRR },
{ "EXPLOSION3", DVPTR(EXPLOSION3), 0, EXPLOSION3__STATICRR },
{ "RRTILE1636", DVPTR(RRTILE1636), 0, RRTILE1636__STATICRR },
@ -1134,6 +1135,10 @@ static struct dynitem g_dynTileList[] =
{ "RRTILE5088", DVPTR(RRTILE5088), 0, RRTILE5088__STATICRR },
{ "RRTILE5090", DVPTR(RRTILE5090), 0, RRTILE5090__STATICRR },
{ "RRTILE6144", DVPTR(RRTILE6144), 0, RRTILE6144__STATICRR },
{ "RRTILE7010", DVPTR(RRTILE7110), 0, RRTILE7110__STATICRR },
{ "RRTILE7011", DVPTR(RRTILE7111), 0, RRTILE7111__STATICRR },
{ "RRTILE7012", DVPTR(RRTILE7112), 0, RRTILE7112__STATICRR },
{ "RRTILE7013", DVPTR(RRTILE7113), 0, RRTILE7113__STATICRR },
{ "MOTOGUN", DVPTR(MOTOGUN), 0, MOTOGUN__STATICRR },
{ "RRTILE7169", DVPTR(RRTILE7169), 0, RRTILE7169__STATICRR },
{ "MOTOHIT", DVPTR(MOTOHIT), 0, MOTOHIT__STATICRR },
@ -2229,6 +2234,7 @@ int32_t GUTMETER_LIGHT2 = 0;
int32_t GUTMETER_LIGHT3 = 0;
int32_t GUTMETER_LIGHT4 = 0;
int32_t AMMO_ICON = 0;
int32_t RRTILE1076 = 0;
int32_t MUD = 0;
int32_t EXPLOSION3 = 0;
int32_t RRTILE1636 = 0;
@ -2550,6 +2556,10 @@ int32_t RRTILE5087 = 0;
int32_t RRTILE5088 = 0;
int32_t RRTILE5090 = 0;
int32_t RRTILE6144 = 0;
int32_t RRTILE7110 = 0;
int32_t RRTILE7111 = 0;
int32_t RRTILE7112 = 0;
int32_t RRTILE7113 = 0;
int32_t MOTOGUN = 0;
int32_t RRTILE7169 = 0;
int32_t MOTOHIT = 0;

View file

@ -1470,6 +1470,7 @@ BEGIN_RR_NS
#define GUTMETER_LIGHT3__STATICRR -922
#define GUTMETER_LIGHT4__STATICRR -923
#define AMMO_ICON__STATICRR -930
#define RRTILE1076__STATICRR -1076
#define MUD__STATICRR -1420
#define EXPLOSION3__STATICRR -1442
#define RRTILE1636__STATICRR -1636
@ -1791,6 +1792,10 @@ BEGIN_RR_NS
#define RRTILE5088__STATICRR -5088
#define RRTILE5090__STATICRR -5090
#define RRTILE6144__STATICRR -6144
#define RRTILE7110__STATICRR -7110
#define RRTILE7111__STATICRR -7111
#define RRTILE7112__STATICRR -7112
#define RRTILE7113__STATICRR -7113
#define MOTOGUN__STATICRR -7168
#define RRTILE7169__STATICRR -7169
#define MOTOHIT__STATICRR -7170
@ -2892,6 +2897,7 @@ extern int32_t GUTMETER_LIGHT2;
extern int32_t GUTMETER_LIGHT3;
extern int32_t GUTMETER_LIGHT4;
extern int32_t AMMO_ICON;
extern int32_t RRTILE1076;
extern int32_t MUD;
extern int32_t EXPLOSION3;
extern int32_t RRTILE1636;
@ -3213,6 +3219,10 @@ extern int32_t RRTILE5087;
extern int32_t RRTILE5088;
extern int32_t RRTILE5090;
extern int32_t RRTILE6144;
extern int32_t RRTILE7110;
extern int32_t RRTILE7111;
extern int32_t RRTILE7112;
extern int32_t RRTILE7113;
extern int32_t MOTOGUN;
extern int32_t RRTILE7169;
extern int32_t MOTOHIT;

View file

@ -4140,12 +4140,12 @@ void P_DHGetInput(int const playerNum)
pPlayer->dhat613 = buttonMap.ButtonDown(gamefunc_Move_Forward) | buttonMap.ButtonDown(gamefunc_Move_Backward);
if (pPlayer->dhat60f)
sub_5A250(256);
dword_A99D4++;
if (dword_A99D4 == 2)
{
sub_53304();
dword_A99D4 = 0;
}
//dword_A99D4++;
//if (dword_A99D4 == 2)
//{
// sub_53304();
// dword_A99D4 = 0;
//}
}
void P_MadeNoise(int playerNum)

View file

@ -324,6 +324,7 @@ int32_t A_GetHitscanRange(int spriteNum);
void P_GetInput(int playerNum);
void P_GetInputMotorcycle(int playerNum);
void P_GetInputBoat(int playerNum);
void sub_299C0(void);
void P_DHGetInput(int const playerNum);
void P_AddAmmo(DukePlayer_t * pPlayer, int weaponNum, int addAmount);
void P_AddWeapon(DukePlayer_t *pPlayer, int weaponNum);

View file

@ -142,7 +142,7 @@ static void G_CacheSpriteNum(int32_t i)
break;
case DOGRUN__STATICRR:
for (j = DOGATTACK; j <= DOGATTACK + 35; j++) tloadtile(j,1);
for (j = DOGRUN; j <= DOGRUN + 80; j++) tloadtile(j,1);
for (j = DOGRUN; j <= DOGRUN + 121; j++) tloadtile(j,1);
maxc = 0;
break;
case RABBIT__STATICRR:
@ -173,8 +173,7 @@ static void G_CacheSpriteNum(int32_t i)
break;
case CHEERB__STATICRR:
if (!RRRA) break;
for (j = CHEERB; j <= CHEERB + 83; j++) tloadtile(j,1);
for (j = CHEERB + 157; j <= CHEERB + 157 + 83; j++) tloadtile(j,1);
for (j = CHEERB; j <= CHEERB + 157 + 83; j++) tloadtile(j,1);
maxc = 0;
break;
case MAMA__STATICRR:
@ -211,7 +210,7 @@ static void G_CacheSpriteNum(int32_t i)
break;
case PIG__STATICRR:
case PIGSTAYPUT__STATICRR:
maxc = 68;
maxc = 69;
break;
case TORNADO__STATICRR:
maxc = 7;
@ -1350,6 +1349,7 @@ static void prelevel(char g)
int missedCloudSectors = 0;
if (!DEER)
for (bssize_t i=0; i<numsectors; i++)
{
if (RR && sector[i].ceilingpicnum == RRTILE2577)
@ -1484,6 +1484,7 @@ static void prelevel(char g)
OSD_Printf(OSDTEXT_RED "Map warning: have %d unhandled CLOUDYSKIES ceilings.\n", missedCloudSectors);
// NOTE: must be safe loop because callbacks could delete sprites.
if (!DEER)
for (bssize_t nextSprite, SPRITES_OF_STAT_SAFE(STAT_DEFAULT, i, nextSprite))
{
//A_LoadActor(i);
@ -1611,10 +1612,11 @@ static void prelevel(char g)
for (size_t i = 0; i < MAXSPRITES; i++)
{
if (sprite[i].statnum < MAXSTATUS && (PN(i) != SECTOREFFECTOR || SLT(i) != SE_14_SUBWAY_CAR))
if (sprite[i].statnum < MAXSTATUS && (DEER || PN(i) != SECTOREFFECTOR || SLT(i) != SE_14_SUBWAY_CAR))
A_Spawn(-1, i);
}
if (!DEER)
for (size_t i = 0; i < MAXSPRITES; i++)
{
if (sprite[i].statnum < MAXSTATUS && PN(i) == SECTOREFFECTOR && SLT(i) == SE_14_SUBWAY_CAR)
@ -1630,6 +1632,7 @@ static void prelevel(char g)
//G_SetupRotfixedSprites();
if (!DEER)
for (bssize_t i=headspritestat[STAT_DEFAULT]; i>=0; i=nextspritestat[i])
{
if (PN(i) <= 0) // oob safety for switch below
@ -1667,6 +1670,7 @@ static void prelevel(char g)
}
// initially 'on' SE 12 light (*)
if (!DEER)
for (bssize_t j=headspritestat[STAT_EFFECTOR]; j>=0; j=nextspritestat[j])
{
uint16_t const tag = sprite[j].hitag;
@ -1683,7 +1687,7 @@ static void prelevel(char g)
{
walltype * const pWall = &wall[i];
if (pWall->overpicnum == MIRROR && (pWall->cstat&32) != 0)
if (!DEER && pWall->overpicnum == MIRROR && (pWall->cstat&32) != 0)
{
int const nextSectnum = pWall->nextsector;
@ -1712,6 +1716,12 @@ static void prelevel(char g)
animwall[g_animWallCnt].tag = 0;
animwall[g_animWallCnt].wallnum = 0;
if (DEER)
{
pWall->extra = -1;
continue;
}
int const switchPic = G_GetForcefieldPicnum(i);
if (switchPic >= 0)
@ -1867,6 +1877,9 @@ static void prelevel(char g)
}
G_SetupGlobalPsky();
if (DEER)
sub_52BA8();
}

File diff suppressed because it is too large Load diff

View file

@ -57,6 +57,42 @@ void ghsound_footstepsound(short a1, int a2);
void ghsound_plrtouchedsprite(short a1, short a2);
void ghdeploy_plrtouchedsprite(short a1, short a2);
int sub_57A40(int a1);
void sub_59C20(void);
void sub_52BA8(void);
int sub_57A60(int a1);
void sub_54A2C(void);
void sub_55F8C(void);
void sub_566F0(void);
void sub_558F4(void);
void sub_56AB8(void);
void sub_573C0(void);
void sub_59314(void);
void sub_55184(void);
void sub_57B24(void);
void sub_58388(void);
void sub_59B50(void);
void sub_59F80(int a1);
void sub_535DC(void);
void sub_57AC0(void);
void sub_566E8(void);
void sub_55F68(void);
void sub_558D0(void);
void sub_56AB0(void);
void sub_56780(void);
void sub_56020(void);
void sub_55988(void);
void sub_56B3C(void);
void sub_56724(void);
void sub_55FCC(void);
void sub_55934(void);
void sub_56AE4(void);
void ghdeploy_drop(int a1, int a2);
int sub_57AA0(int a1);
void ghtarget_hit(short a1, int a2);
void gharrow_spawnarrow(short snum);
void sub_58A30(int a1);
int sub_59B44(void);
void ghtarget_setanimal(short a1);
END_RR_NS