From dea8c98399b3f30b6c95376cc27052cda2a09d59 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Thu, 15 Sep 2022 18:25:48 +0300 Subject: [PATCH] Decompile square_init --- src/map.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/map.cc b/src/map.cc index 90be828..00da71d 100644 --- a/src/map.cc +++ b/src/map.cc @@ -57,6 +57,7 @@ static int mapLocalVariablesInit(int count); static void mapLocalVariablesFree(); static int mapLocalVariablesLoad(File* stream); static void _map_place_dude_and_mouse(); +static void square_init(); static void _square_reset(); static int _square_load(File* stream, int a2); static int mapHeaderWrite(MapHeader* ptr, File* stream); @@ -165,9 +166,8 @@ int isoInit() tileScrollLimitingDisable(); tileScrollBlockingDisable(); - for (int elevation = 0; elevation < ELEVATION_COUNT; elevation++) { - _square[elevation] = &(_square_data[elevation]); - } + // NOTE: Uninline. + square_init(); gIsoWindow = windowCreate(0, 0, screenGetWidth(), screenGetVisibleHeight(), 256, 10); if (gIsoWindow == -1) { @@ -1605,6 +1605,16 @@ static void _map_place_dude_and_mouse() gameMouseObjectsShow(); } +// NOTE: Inlined. +// +// 0x4841F0 +static void square_init() +{ + for (int elevation = 0; elevation < ELEVATION_COUNT; elevation++) { + _square[elevation] = &(_square_data[elevation]); + } +} + // 0x484210 static void _square_reset() {