diff --git a/source/rr/src/actors.cpp b/source/rr/src/actors.cpp index dca38624a..ec8593137 100644 --- a/source/rr/src/actors.cpp +++ b/source/rr/src/actors.cpp @@ -3916,15 +3916,15 @@ ACTOR_STATIC void G_MoveActors(void) { int spriteNum; - if (g_jailDoorCnt) + if (!DEER && g_jailDoorCnt) G_DoJailDoor(); - if (g_mineCartCnt) + if (!DEER && g_mineCartCnt) G_MoveMineCart(); int bBoom = 0; - if (RRRA) + if (!DEER && RRRA) { int spriteNum = headspritestat[117]; while (spriteNum >= 0) @@ -4310,7 +4310,7 @@ ACTOR_STATIC void G_MoveActors(void) } } - if (RR) + if (!DEER && RR) { spriteNum = headspritestat[107]; while (spriteNum >= 0) @@ -4537,6 +4537,7 @@ ACTOR_STATIC void G_MoveActors(void) switchPic--; + if (!DEER) switch (DYNAMICTILEMAP(switchPic)) { case DUCK__STATIC: @@ -9691,13 +9692,17 @@ void G_MoveWorld(void) extern double g_moveActorsTime, g_moveWorldTime; const double worldTime = timerGetHiTicks(); - G_MoveZombieActors(); //ST 2 - G_MoveWeapons(); //ST 4 - G_MoveTransports(); //ST 9 + if (!DEER) + { + G_MoveZombieActors(); //ST 2 + G_MoveWeapons(); //ST 4 + G_MoveTransports(); //ST 9 + } G_MovePlayers(); //ST 10 G_MoveFallers(); //ST 12 - G_MoveMisc(); //ST 5 + if (!DEER) + G_MoveMisc(); //ST 5 const double actorsTime = timerGetHiTicks(); @@ -9708,12 +9713,16 @@ void G_MoveWorld(void) // XXX: Has to be before effectors, in particular movers? // TODO: lights in moving sectors ought to be interpolated G_DoEffectorLights(); - G_MoveEffectors(); //ST 3 - G_MoveStandables(); //ST 6 + if (!DEER) + { + G_MoveEffectors(); //ST 3 + G_MoveStandables(); //ST 6 + } G_RefreshLights(); G_DoSectorAnimations(); - G_MoveFX(); //ST 11 + if (!DEER) + G_MoveFX(); //ST 11 if (RR && numplayers < 2 && g_thunderOn) G_Thunder(); diff --git a/source/rr/src/cheats.cpp b/source/rr/src/cheats.cpp index 922eb4bd5..96170b5d4 100644 --- a/source/rr/src/cheats.cpp +++ b/source/rr/src/cheats.cpp @@ -287,6 +287,9 @@ void G_DoCheats(void) int consoleCheat = 0; int cheatNum; + if (DEER) + return; + if (osdcmd_cheatsinfo_stat.cheatnum != -1) { cheatNum = osdcmd_cheatsinfo_stat.cheatnum; diff --git a/source/rr/src/demo.cpp b/source/rr/src/demo.cpp index ff7082f9f..55cad1b9d 100644 --- a/source/rr/src/demo.cpp +++ b/source/rr/src/demo.cpp @@ -83,6 +83,9 @@ static int32_t G_OpenDemoRead(int32_t g_whichDemo) // 0 = mine char demofn[14]; const char *demofnptr; + if (DEER) + return 0; + if (g_whichDemo == 1 && g_firstDemoFile[0]) { demofnptr = g_firstDemoFile; diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index 21f2391e5..c44b3dd02 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -1700,7 +1700,11 @@ int A_Spawn(int spriteNum, int tileNum) pSprite->picnum = BOLT1; else if (!RR && pSprite->picnum >= SIDEBOLT1 && pSprite->picnum <= SIDEBOLT1 + 3) pSprite->picnum = SIDEBOLT1; - if (RRRA && pSprite->picnum == PIG+11) + if (DEER && pSprite->picnum != APLAYER) + { + goto default_case; + } + else if (RRRA && pSprite->picnum == PIG+11) { pSprite->xrepeat = 16; pSprite->yrepeat = 16; @@ -4674,6 +4678,24 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t ourz, int32_t oura if (t->picnum < GREENSLIME || t->picnum > GREENSLIME+7) switch (DYNAMICTILEMAP(t->picnum)) { + case PIG__STATICRR: + case DOGRUN__STATICRR: + case VIXEN__STATICRR: + case CHEER__STATICRR: + if (DEER) + { + if ((t->cstat & 32768) == 0 && (t->cstat & 257) != 0) + { + if (klabs(ourx - t->x) + klabs(oury - t->y) < 46080) + { + if (klabs(oura - (getangle(t->x - ourx, t->y - oury) & 2047)) < 128) + sub_5A250(32); + else + sub_5A250(64); + } + } + } + goto default_case1; case PUKE__STATIC: if (RR) goto default_case1; fallthrough__; @@ -5556,8 +5578,9 @@ skip: #endif ) { + if (DEER && klabs(sector[sect].ceilingheinum - sector[sect].floorheinum) > 576) continue; if (RRRA && sector[sect].lotag == 160) continue; - int const shadowZ = ((sector[sect].lotag & 0xff) > 2 || pSprite->statnum == STAT_PROJECTILE || + int const shadowZ = (DEER || (sector[sect].lotag & 0xff) > 2 || pSprite->statnum == STAT_PROJECTILE || pSprite->statnum == STAT_MISC || pSprite->picnum == DRONE || (!RR && pSprite->picnum == COMMANDER)) ? sector[sect].floorz : actor[i].floorz; @@ -5604,8 +5627,13 @@ skip: } } } - - switch (DYNAMICTILEMAP(pSprite->picnum)) + + if (DEER) + { + if (pSprite->picnum == 806) + t->picnum = 1023; + } + else switch (DYNAMICTILEMAP(pSprite->picnum)) { case LASERLINE__STATIC: if (RR) break; @@ -5935,6 +5963,12 @@ void G_HandleLocalKeys(void) { // CONTROL_ProcessBinds(); + if (DEER) + { + sub_53304(); + return; + } + if (ud.recstat == 2) { ControlInfo noshareinfo; @@ -6976,6 +7010,9 @@ static void G_Startup(void) // initprintf("Loading palette/lookups...\n"); G_LoadLookups(); + if (DEER) + sub_54DE0(); + screenpeek = myconnectindex; } @@ -7278,6 +7315,9 @@ void app_loop() { auto &myplayer = g_player[myconnectindex].ps; + if (DEER) + ghtrophy_loadbestscores(); + MAIN_LOOP_RESTART: totalclock = 0; ototalclock = 0; @@ -7464,6 +7504,9 @@ MAIN_LOOP_RESTART: } frameJustDrawn = true; + + if (DEER) + sub_5A02C(); } if (g_player[myconnectindex].ps->gm&MODE_DEMO) @@ -7498,6 +7541,8 @@ GAME_STATIC GAME_INLINE int32_t G_MoveLoop() int G_DoMoveThings(void) { + if (DEER) + sub_579A0(); ud.camerasprite = -1; lockclock += TICSPERFRAME; @@ -7630,11 +7675,13 @@ int G_DoMoveThings(void) if (sprite[g_player[i].ps->i].pal != 1) sprite[g_player[i].ps->i].pal = g_player[i].pcolor; + if (!DEER) P_HandleSharedKeys(i); if (ud.pause_on == 0) { P_ProcessInput(i); + if (!DEER) P_CheckSectors(i); } } @@ -7649,8 +7696,15 @@ int G_DoMoveThings(void) if ((everyothertime&1) == 0) { + if (DEER) + { + ghsound_ambientlooppoll(); + } + else + { G_AnimateWalls(); A_MoveCyclers(); + } //if (g_netServer && (everyothertime % 10) == 0) //{ diff --git a/source/rr/src/rrdh.cpp b/source/rr/src/rrdh.cpp index d66fff601..0860492e2 100644 --- a/source/rr/src/rrdh.cpp +++ b/source/rr/src/rrdh.cpp @@ -71,6 +71,23 @@ int ghcons_findnewspot(short a1) return 0; } +int dword_AA260; + +int sub_51B68(void) +{ + int r; + if ((int)totalclock - dword_AA260 < 200) + return 0; + if ((rrdh_random() & 127) != 64) + return 0; + + dword_AA260 = (int)totalclock; + + r = 60 + (rrdh_random() % 15); + S_PlaySound(r); + return r; +} + int ghsound_pmadecall(spritetype *a1, short a2) { switch (DYNAMICTILEMAP(a1->picnum)) @@ -194,6 +211,16 @@ int ghsound_pfiredgunnear(spritetype *a1, short a2) return 0; } +void ghsound_ambientlooppoll(void) +{ + // TODO +} + +void sub_53304(void) +{ + // TODO +} + int dword_AA2F4; void sub_535DC(void) @@ -219,6 +246,11 @@ struct struct2B80E0 { struct2B80E0 f2B80E0[20]; +void ghtrophy_loadbestscores(void) +{ + // TODO +} + int ghtrophy_isakill(short a1) { spritetype *spr = &sprite[a1]; @@ -229,6 +261,17 @@ int ghtrophy_isakill(short a1) } return 0; } + +void sub_54DE0(void) +{ + // TODO +} + +void sub_579A0(void) +{ + // TODO +} + int ghtrax_isplrupwind(short a1, short a2) { // TODO @@ -248,3 +291,13 @@ void ghdeploy_bias(short a1) { // TODO } + +void sub_5A02C(void) +{ + // TODO +} + +void sub_5A250(int a1) +{ + // TODO +} \ No newline at end of file diff --git a/source/rr/src/rrdh.h b/source/rr/src/rrdh.h index c045b63c8..295d8cf4e 100644 --- a/source/rr/src/rrdh.h +++ b/source/rr/src/rrdh.h @@ -36,3 +36,11 @@ int ghtrax_isplrupwind(short a1, short a2); int ghsound_pfiredgunnear(spritetype* a1, short a2); int ghsound_pmadesound(spritetype* a1, short a2); int ghsound_pmadecall(spritetype* a1, short a2); +void sub_5A250(int a1); +void sub_53304(void); +void sub_54DE0(void); +void ghtrophy_loadbestscores(void); +void sub_5A02C(void); +void sub_579A0(void); +void ghsound_ambientlooppoll(void); +int sub_51B68(void); diff --git a/source/rr/src/sbar.cpp b/source/rr/src/sbar.cpp index 64e810707..c4354ec10 100644 --- a/source/rr/src/sbar.cpp +++ b/source/rr/src/sbar.cpp @@ -1378,7 +1378,7 @@ void G_DrawBackground(void) if ((g_player[myconnectindex].ps->gm&MODE_GAME) == 0 && ud.recstat != 2) { - const int32_t MENUTILE = MENUSCREEN;//(videoGetRenderMode() == REND_CLASSIC ? MENUSCREEN : LOADSCREEN); + const int32_t MENUTILE = DEER ? 7040 : MENUSCREEN;//(videoGetRenderMode() == REND_CLASSIC ? MENUSCREEN : LOADSCREEN); const int32_t fstilep = tilesiz[MENUTILE].x>=320 && tilesiz[MENUTILE].y==200; int32_t bgtile = (fstilep ? MENUTILE : (RRRA ? RRTILE7629 : BIGHOLE)); @@ -1396,7 +1396,7 @@ void G_DrawBackground(void) for (x=0; x