Pulled out debug print function registering into a separate method from init.
This commit is contained in:
+7
-2
@@ -79,13 +79,18 @@ static void free_area( struct Area *area )
|
||||
free( area );
|
||||
}
|
||||
|
||||
SM64_LIB_FN void sm64_global_init( uint8_t *rom, uint8_t *outTexture, SM64DebugPrintFunctionPtr debugPrintFunction )
|
||||
typedef void (*SM64DebugPrintFunctionPtr)( const char * );
|
||||
SM64_LIB_FN void sm64_register_debug_print_function( SM64DebugPrintFunctionPtr debugPrintFunction )
|
||||
{
|
||||
g_debug_print_func = debugPrintFunction;
|
||||
}
|
||||
|
||||
SM64_LIB_FN void sm64_global_init( uint8_t *rom, uint8_t *outTexture )
|
||||
{
|
||||
if( s_init_global )
|
||||
sm64_global_terminate();
|
||||
|
||||
s_init_global = true;
|
||||
g_debug_print_func = debugPrintFunction;
|
||||
|
||||
load_mario_textures_from_rom( rom, outTexture );
|
||||
load_mario_anims_from_rom( rom );
|
||||
|
||||
Reference in New Issue
Block a user