diff --git a/source/core/textures/buildtiles.h b/source/core/textures/buildtiles.h index 309825e65..2370bc264 100644 --- a/source/core/textures/buildtiles.h +++ b/source/core/textures/buildtiles.h @@ -218,7 +218,7 @@ public: void Reload() { - buffer = std::move(Base->GetPalettedPixels(0)); + buffer = Base->GetPalettedPixels(0); } }; @@ -383,7 +383,7 @@ inline const uint8_t* tilePtr(int num) { auto tex = TileFiles.tiledata[num].texture; if (!tex || tex->GetTexelWidth() <= 0 || tex->GetTexelHeight() <= 0) return nullptr; - TileFiles.tiledata[num].rawCache.data = std::move(tex->GetTexture()->Get8BitPixels(false)); + TileFiles.tiledata[num].rawCache.data = tex->GetTexture()->Get8BitPixels(false); } TileFiles.tiledata[num].rawCache.lastUseTime = I_nsTime(); return TileFiles.tiledata[num].rawCache.data.Data(); diff --git a/source/games/duke/src/2d_d.cpp b/source/games/duke/src/2d_d.cpp index 803d04441..1ad0a8ab6 100644 --- a/source/games/duke/src/2d_d.cpp +++ b/source/games/duke/src/2d_d.cpp @@ -454,7 +454,7 @@ public: if (!S_CheckSoundPlaying(ENDSEQVOL3SND8)) { sound++; - waittime = clock + SoundEnabled()? 1'000'000'000 : 5'000'000'000; // if sound is off this wouldn't wait without a longer delay here. + waittime = clock + (SoundEnabled()? 1'000'000'000 : 5'000'000'000); // if sound is off this wouldn't wait without a longer delay here. } break; @@ -663,13 +663,6 @@ void doorders(const CompletionFunc& completion) // //--------------------------------------------------------------------------- -static void PlayBonusMusic() -{ - if (MusicEnabled() && mus_enabled) - S_PlaySound(BONUSMUSIC, CHAN_AUTO, CHANF_UI); - -} - class DDukeMultiplayerBonusScreen : public DScreenJob { int playerswhenstarted; diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 14a8231ee..d5838f2e7 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -2813,7 +2813,7 @@ void handle_se14(int i, bool checkstat, int RPG, int JIBS6) { if (statstate) { - if (!S_CheckSoundPlaying(hittype[i].lastvx) == 0) + if (!S_CheckSoundPlaying(hittype[i].lastvx)) spritesound(hittype[i].lastvx, i); } if ((!checkstat || !statstate) && (ud.monsters_off == 0 && sc->floorpal == 0 && (sc->floorstat & 1) && rnd(8))) diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index ddcfec339..95414d22a 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -4449,7 +4449,7 @@ static int fallspecial(int g_i, int g_p) hittype[g_i].picnum = SHOTSPARK1; hittype[g_i].extra = 1; } - else if (isRRRA() && sector[g_sp->sectnum].floorpicnum == RRTILE7820 || sector[g_sp->sectnum].floorpicnum == RRTILE7768) + else if (isRRRA() && (sector[g_sp->sectnum].floorpicnum == RRTILE7820 || sector[g_sp->sectnum].floorpicnum == RRTILE7768)) { if (g_sp->picnum != MINION && g_sp->pal != 19) { diff --git a/source/games/duke/src/funct.h b/source/games/duke/src/funct.h index 215c8e332..567023817 100644 --- a/source/games/duke/src/funct.h +++ b/source/games/duke/src/funct.h @@ -221,7 +221,6 @@ bool setnextmap(bool checksecretexit); void prelevel_d(int g); void prelevel_r(int g); void e4intro(const CompletionFunc& completion); -void clearfrags(void); void exitlevel(); int enterlevel(MapRecord* mi, int gm); void donewgame(MapRecord* map, int sk); diff --git a/source/games/duke/src/gamedef.cpp b/source/games/duke/src/gamedef.cpp index cc14ea3c1..6f847e4a2 100644 --- a/source/games/duke/src/gamedef.cpp +++ b/source/games/duke/src/gamedef.cpp @@ -77,7 +77,7 @@ public: const char* GetChars() { return text; } int compare(const char* c) const { return strcmp(text, c); } int comparei(const char* c) const { return stricmp(text, c); } - labelstring& operator=(const char* c) { strncpy(text, c, 64); text[63] = 0; } + labelstring& operator=(const char* c) { strncpy(text, c, 64); text[63] = 0; return *this; } }; @@ -471,7 +471,7 @@ int ConCompiler::keyword(void) void ConCompiler::getlabel(void) { - long i; + int i; skipcomments(); diff --git a/source/games/duke/src/gameloop.cpp b/source/games/duke/src/gameloop.cpp index 1c82f9fa7..a26d45b66 100644 --- a/source/games/duke/src/gameloop.cpp +++ b/source/games/duke/src/gameloop.cpp @@ -38,9 +38,6 @@ Modifications for JonoF's port by Jonathon Fowler (jf@jonof.id.au) BEGIN_DUKE_NS -void GetNextInput(); - - //--------------------------------------------------------------------------- // // abstract the queue's implementation diff --git a/source/games/duke/src/gamevar.cpp b/source/games/duke/src/gamevar.cpp index 1198f0fea..5819ac1dd 100644 --- a/source/games/duke/src/gamevar.cpp +++ b/source/games/duke/src/gamevar.cpp @@ -442,7 +442,7 @@ bool IsGameEvent(int i) { if (i<0) return 0; if (i>=MAXGAMEEVENTS) return 0; - return (apScriptGameEvent[i]!=NULL); + return (apScriptGameEvent[i] != 0); } //--------------------------------------------------------------------------- diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index b78559ea1..ee9dcd2d1 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -1774,7 +1774,7 @@ static void onMotorcycle(int snum, ESyncBits &sb_snum) } else if (p->MotoSpeed >= 20 && p->on_ground == 1 && (p->moto_on_mud || p->moto_on_oil)) { - short var9c, vara0, vara4; + short var9c, vara0, vara4=0; var9c = p->MotoSpeed; vara0 = p->getang(); var84 = krand() & 1;