diff --git a/src/Bullet.cpp b/src/Bullet.cpp index 9331717c..a65e43fb 100644 --- a/src/Bullet.cpp +++ b/src/Bullet.cpp @@ -1664,8 +1664,6 @@ void ActBullet_Edge(BULLET *bul) {96, 88, 120, 112}, }; - // Note that 'bul->ani_no' can exceed the size of 'rcLeft' and 'rcRight' - if (bul->direct == 0) bul->rect = rcLeft[bul->ani_no]; else diff --git a/src/Caret.cpp b/src/Caret.cpp index df9686b4..e436942d 100644 --- a/src/Caret.cpp +++ b/src/Caret.cpp @@ -79,8 +79,6 @@ void ActCaret01(CARET *crt) } } - // Note that 'crt->ani_no' can exceed the size of 'rcLeft' and 'rcRight' - if (crt->direct == 0) crt->rect = rcLeft[crt->ani_no]; else @@ -256,8 +254,6 @@ void ActCaret07(CARET *crt) } } - // Note that 'crt->ani_no' can exceed the size of rcLeft - crt->rect = rcLeft[crt->ani_no]; switch (crt->direct) @@ -465,8 +461,6 @@ void ActCaret14(CARET *crt) } } - // Note that 'crt->ani_no' can exceed the size of 'rect' - crt->rect = rect[crt->ani_no]; } @@ -490,8 +484,6 @@ void ActCaret15(CARET *crt) } } - // Note that 'crt->ani_no' can exceed the size of 'rcLeft' - crt->rect = rcLeft[crt->ani_no]; } diff --git a/src/NpcAct120.cpp b/src/NpcAct120.cpp index c29ad5a1..2f61bf63 100644 --- a/src/NpcAct120.cpp +++ b/src/NpcAct120.cpp @@ -591,8 +591,6 @@ void ActNpc127(NPCHAR *npc) } } - // Note that 'npc->ani_no' can exceed the size of 'rcH' and 'rcV' - if (npc->direct == 0) npc->rect = rcH[npc->ani_no]; else @@ -656,8 +654,6 @@ void ActNpc128(NPCHAR *npc) return; // Prevent UB at rc[npc->ani_no] when npc->ani_no == 5 } - // Note that 'npc->ani_no' can exceed the bounds of 'rcLeft', 'rcUp', 'rcRight' and 'rcDown' - switch (npc->direct) { case 0: @@ -715,8 +711,6 @@ void ActNpc129(NPCHAR *npc) npc->y += npc->ym; - // Note that '(npc->direct * 3) + npc->ani_no' can exceed the size of 'rect' - npc->rect = rect[(npc->direct * 3) + npc->ani_no]; } diff --git a/src/NpcAct140.cpp b/src/NpcAct140.cpp index 49986a29..b76a1b79 100644 --- a/src/NpcAct140.cpp +++ b/src/NpcAct140.cpp @@ -759,7 +759,6 @@ void ActNpc146(NPCHAR *npc) break; } - // Note that 'npc->ani_no' can exceed the size of 'rect' npc->rect = rect[npc->ani_no]; } diff --git a/src/NpcAct180.cpp b/src/NpcAct180.cpp index 98d90d26..76f27294 100644 --- a/src/NpcAct180.cpp +++ b/src/NpcAct180.cpp @@ -1434,6 +1434,5 @@ void ActNpc199(NPCHAR *npc) npc->x += npc->xm; npc->y += npc->ym; - // Note that 'npc->ani_no' can exceed the size of 'rect' npc->rect = rect[npc->ani_no]; }