From 97a042dcc00821c17852fe728588d04edb91a242 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Sun, 27 Sep 2020 21:12:39 +0100 Subject: [PATCH] Deobfuscate some values --- src/BossOhm.cpp | 6 +++--- src/MyChar.cpp | 22 +++++++++++----------- src/NpcAct020.cpp | 2 +- src/NpcAct120.cpp | 2 +- src/NpcAct180.cpp | 6 +++--- src/NpcAct260.cpp | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/BossOhm.cpp b/src/BossOhm.cpp index a04bbf98..4f94ed4c 100644 --- a/src/BossOhm.cpp +++ b/src/BossOhm.cpp @@ -263,9 +263,9 @@ void ActBossChar_Omega(void) if (gBoss[0].act_wait > 20 && gBoss[0].act_wait < 80 && !(gBoss[0].act_wait % 3)) { if (Random(0, 9) < 8) - SetNpChar(48, gBoss[0].x, gBoss[0].y - (16 * 0x200), Random(-0x100, 0x100), -0x333, 0, NULL, 0x100); + SetNpChar(48, gBoss[0].x, gBoss[0].y - (16 * 0x200), Random(-0x100, 0x100), -0x10 * 0x200 / 10, 0, NULL, 0x100); else - SetNpChar(48, gBoss[0].x, gBoss[0].y - (16 * 0x200), Random(-0x100, 0x100), -0x333, 2, NULL, 0x100); + SetNpChar(48, gBoss[0].x, gBoss[0].y - (16 * 0x200), Random(-0x100, 0x100), -0x10 * 0x200 / 10, 2, NULL, 0x100); PlaySoundObject(39, SOUND_MODE_PLAY); } @@ -384,7 +384,7 @@ void ActBossChar_Omega(void) if (gBoss[0].act_wait < 30 && gBoss[0].act_wait % 5 == 0) { - SetNpChar(48, gBoss[0].x, gBoss[0].y - (16 * 0x200), Random(-341, 341), -0x333, 0, NULL, 0x100); + SetNpChar(48, gBoss[0].x, gBoss[0].y - (16 * 0x200), Random(-341, 341), -0x10 * 0x200 / 10, 0, NULL, 0x100); PlaySoundObject(39, SOUND_MODE_PLAY); } diff --git a/src/MyChar.cpp b/src/MyChar.cpp index 0d90b194..fda96f28 100644 --- a/src/MyChar.cpp +++ b/src/MyChar.cpp @@ -259,14 +259,14 @@ void ActMyChar_Normal(BOOL bKey) if (gMC.flag & 0x100) { - max_dash = 0x196; - max_move = 0x2FF; - gravity1 = 0x28; - gravity2 = 0x10; - jump = 0x280; - dash1 = 0x2A; - dash2 = 0x10; - resist = 0x19; + max_dash = 0x32C / 2; + max_move = 0x5FF / 2; + gravity1 = 0x50 / 2; + gravity2 = 0x20 / 2; + jump = 0x500 / 2; + dash1 = 0x200 / 6 / 2; + dash2 = 0x200 / 16 / 2; + resist = 0x200 / 10 / 2; } else { @@ -275,9 +275,9 @@ void ActMyChar_Normal(BOOL bKey) gravity1 = 0x50; gravity2 = 0x20; jump = 0x500; - dash1 = 0x55; - dash2 = 0x20; - resist = 0x33; + dash1 = 0x200 / 6; + dash2 = 0x200 / 16; + resist = 0x200 / 10; } // Don't create "?" effect diff --git a/src/NpcAct020.cpp b/src/NpcAct020.cpp index ef5e26d8..ce231857 100644 --- a/src/NpcAct020.cpp +++ b/src/NpcAct020.cpp @@ -1241,7 +1241,7 @@ void ActNpc036(NPCHAR *npc) if (npc->act_no != 5) { - npc->ym += 0x33; + npc->ym += 0x200 / 10; if (npc->x < gMC.x) npc->direct = 2; diff --git a/src/NpcAct120.cpp b/src/NpcAct120.cpp index f8b3ce1d..313942ed 100644 --- a/src/NpcAct120.cpp +++ b/src/NpcAct120.cpp @@ -1203,7 +1203,7 @@ void ActNpc135(NPCHAR *npc) npc->direct = 2; } - npc->ym += 0x33; + npc->ym += 0x200 / 10; if (npc->ym > 0x5FF) npc->ym = 0x5FF; diff --git a/src/NpcAct180.cpp b/src/NpcAct180.cpp index c7646495..43b440c0 100644 --- a/src/NpcAct180.cpp +++ b/src/NpcAct180.cpp @@ -271,13 +271,13 @@ void ActNpc180(NPCHAR *npc) #else if (npc->flag && 5) #endif - npc->ym += 0x10; + npc->ym += 0x200 / 32; else - npc->ym += 0x33; + npc->ym += 0x200 / 10; } else { - npc->ym += 0x33; + npc->ym += 0x200 / 10; } } diff --git a/src/NpcAct260.cpp b/src/NpcAct260.cpp index f58b5c3b..7ee88d28 100644 --- a/src/NpcAct260.cpp +++ b/src/NpcAct260.cpp @@ -1320,7 +1320,7 @@ void ActNpc268(NPCHAR *npc) break; } - npc->ym += 0x33; + npc->ym += 0x200 / 10; if (npc->ym > 0x5FF) npc->ym = 0x5FF;