Use akgl_heap_release_actor to reset actors
This commit is contained in:
2
deps/libakgl
vendored
2
deps/libakgl
vendored
Submodule deps/libakgl updated: dc2e88b72f...aad196d84e
@@ -70,8 +70,9 @@ akerr_ErrorContext AKERR_NOIGNORE *akgltest_set_gamemode_menu(akgl_Actor *appsta
|
|||||||
// Reset all the actors back to empty (except the player and menupointer)
|
// Reset all the actors back to empty (except the player and menupointer)
|
||||||
for ( int i = 0 ; i < AKGL_MAX_HEAP_ACTOR; i++ ) {
|
for ( int i = 0 ; i < AKGL_MAX_HEAP_ACTOR; i++ ) {
|
||||||
if ( &HEAP_ACTOR[i] != player && &HEAP_ACTOR[i] != menupointer ) {
|
if ( &HEAP_ACTOR[i] != player && &HEAP_ACTOR[i] != menupointer ) {
|
||||||
SDL_ClearProperty(AKGL_REGISTRY_ACTOR, (char *)&HEAP_ACTOR[i].name);
|
PASS(e, akgl_heap_release_actor(&HEAP_ACTOR[i]));
|
||||||
memset(&HEAP_ACTOR[i], 0x00, sizeof(akgl_Actor));
|
//SDL_ClearProperty(AKGL_REGISTRY_ACTOR, (char *)&HEAP_ACTOR[i].name);
|
||||||
|
//memset(&HEAP_ACTOR[i], 0x00, sizeof(akgl_Actor));
|
||||||
} else {
|
} else {
|
||||||
SDL_Log("Preserving menupointer and actor (%p)", &HEAP_ACTOR[i]);
|
SDL_Log("Preserving menupointer and actor (%p)", &HEAP_ACTOR[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user