From 108a20ef274b3cd7e595ce739e0fd30d32f1b3c8 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Thu, 15 Sep 2022 18:22:27 +0300 Subject: [PATCH] Decompile mapLocalVariablesLoad --- src/map.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/map.cc b/src/map.cc index 29f1391..90be828 100644 --- a/src/map.cc +++ b/src/map.cc @@ -55,6 +55,7 @@ static void mapGlobalVariablesFree(); static int mapGlobalVariablesLoad(File* stream); static int mapLocalVariablesInit(int count); static void mapLocalVariablesFree(); +static int mapLocalVariablesLoad(File* stream); static void _map_place_dude_and_mouse(); static void _square_reset(); static int _square_load(File* stream, int a2); @@ -841,7 +842,8 @@ static int mapLoad(File* stream) } error = "Error loading local vars"; - if (fileReadInt32List(stream, gMapLocalVars, gMapLocalVarsLength) != 0) { + // NOTE: Uninline. + if (mapLocalVariablesLoad(stream) != 0) { goto err; } @@ -1564,6 +1566,18 @@ static void mapLocalVariablesFree() } } +// NOTE: Inlined. +// +// 0x4840F8 +static int mapLocalVariablesLoad(File* stream) +{ + if (fileReadInt32List(stream, gMapLocalVars, gMapLocalVarsLength) != 0) { + return -1; + } + + return 0; +} + // 0x48411C static void _map_place_dude_and_mouse() {