diff --git a/src/Back.cpp b/src/Back.cpp index 3aa58011..8b2d5fa5 100644 --- a/src/Back.cpp +++ b/src/Back.cpp @@ -167,11 +167,11 @@ void PutFront(int fx, int fy) if (gBack.type == 3) { int x_1 = fx / 0x4000; - int x_2 = fx / 0x4000 + (((WINDOW_WIDTH + 31) >> 5) + 1); + int x_2 = x_1 + (((WINDOW_WIDTH + 31) >> 5) + 1); int y_1 = 0; - int y_2 = 32; + int y_2 = y_1 + 32; - for (int y = 0; y < y_2; y++) + for (int y = y_1; y < y_2; y++) { int ypos = (y << 14) / 0x200 - fy / 0x200 + gWaterY / 0x200; diff --git a/src/Font.cpp b/src/Font.cpp index 561bb90a..a7a77d53 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -58,7 +58,7 @@ static unsigned long UTF8ToCode(const unsigned char *string, unsigned int *bytes case 3: case 4: length = zero_bit; - charcode = string[0] & ((1 << (8 - zero_bit))) - 1; + charcode = string[0] & ((1 << (8 - zero_bit)) - 1); for (unsigned int i = 1; i < zero_bit; ++i) { diff --git a/src/NpcAct160.cpp b/src/NpcAct160.cpp index 6e74a75a..64a0684f 100644 --- a/src/NpcAct160.cpp +++ b/src/NpcAct160.cpp @@ -1178,7 +1178,7 @@ void ActNpc173(NPCHAR *npc) if (npc->ym > 0x5FF) npc->ym = 0x5FF; - if ( npc->ym < -0x5FFu ) + if (npc->ym < -0x5FF) npc->ym = 0x5FF; npc->x += npc->xm; diff --git a/src/NpcAct180.cpp b/src/NpcAct180.cpp index 855f236e..a049f74d 100644 --- a/src/NpcAct180.cpp +++ b/src/NpcAct180.cpp @@ -564,6 +564,7 @@ void ActNpc184(NPCHAR *npc) npc->ani_no = 1; npc->act_wait = 0; npc->bits |= npc_ignoreSolid; + // Fallthrough case 11: switch (npc->direct) { @@ -960,11 +961,6 @@ void ActNpc190(NPCHAR *npc) //Water level void ActNpc191(NPCHAR *npc) { - int v1; // edx - int v2; // edx - int v3; // edx - int v4; // edx - switch ( npc->act_no ) { case 0: diff --git a/src/NpcAct320.cpp b/src/NpcAct320.cpp index fb8f3d4a..b521c224 100644 --- a/src/NpcAct320.cpp +++ b/src/NpcAct320.cpp @@ -515,7 +515,7 @@ void ActNpc326(NPCHAR *npc) npc->act_no = 41; npc->act_wait = 0; npc->ani_no = 0; - //Fallthorugh + //Fallthrough case 41: if (++npc->act_wait == 30) npc->ani_no = 1;