Skip to content

Commit

Permalink
Merge pull request #247 from Antidissmist/main
Browse files Browse the repository at this point in the history
Let there be no memory leaks πŸ§™β€β™‚οΈπŸ’₯✨
  • Loading branch information
spacebake authored Jul 17, 2024
2 parents 754524f + d268861 commit 1715e0f
Show file tree
Hide file tree
Showing 15 changed files with 262 additions and 50 deletions.
1 change: 1 addition & 0 deletions Loungeware/Loungeware.resource_order
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
{"name":"space_lander_obj_rocket","order":1,"path":"objects/space_lander_obj_rocket/space_lander_obj_rocket.yy",},
{"name":"katsaii_witchwanda_spr_island_floating","order":3,"path":"sprites/katsaii_witchwanda_spr_island_floating/katsaii_witchwanda_spr_island_floating.yy",},
{"name":"___spr_spotlight","order":13,"path":"sprites/___spr_spotlight/___spr_spotlight.yy",},
{"name":"___program_wide_init","order":16,"path":"scripts/___program_wide_init/___program_wide_init.yy",},
{"name":"giz_beast_bullet_spr_larold_face_mask","order":5,"path":"sprites/giz_beast_bullet_spr_larold_face_mask/giz_beast_bullet_spr_larold_face_mask.yy",},
{"name":"orphillius_fail","order":1,"path":"sounds/orphillius_fail/orphillius_fail.yy",},
{"name":"katsaii_witchball_lilghost","order":8,"path":"sprites/katsaii_witchball_lilghost/katsaii_witchball_lilghost.yy",},
Expand Down
1 change: 1 addition & 0 deletions Loungeware/Loungeware.yyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Loungeware/objects/___MG_MNGR/CleanUp_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ if (surface_exists(surf_master)) surface_free(surf_master);
if (surface_exists(surf_gameboy)) surface_free(surf_gameboy);
if (surface_exists(surf_transition_circle)) surface_free(surf_transition_circle);
if (surface_exists(surf_reflection)) surface_free(surf_reflection);
if (surface_exists(surf_cart)) surface_free(surf_cart);
if (surface_exists(ou_surf_circle)) surface_free(ou_surf_circle);
if (surface_exists(es_surf_circle)) surface_free(es_surf_circle);
if (surface_exists(ec_surface)) surface_free(ec_surface);

if sprite_exists(cart_sprite) sprite_delete(cart_sprite);
if sprite_exists(prompt_sprite) sprite_delete(prompt_sprite);

ds_list_destroy(transition_garbo_sprites);
___reset_draw_vars();
workspace_end();
Expand Down
2 changes: 2 additions & 0 deletions Loungeware/objects/___MG_MNGR/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ if (state == "playing_microgame"){
gbo_timerbar_visible = true;
transition_circle_rad = 0;
prompt_alpha = 1;
if sprite_exists(prompt_sprite) sprite_delete(prompt_sprite);
prompt_sprite = ___prompt_sprite_create(prompt);
substate = 0;
}
Expand Down Expand Up @@ -662,6 +663,7 @@ if (state == "game_switch"){
prompt_scale = 0;
prompt_scale_done = false;
prompt = microgame_get_prompt(microgame_next_name);
if sprite_exists(prompt_sprite) sprite_delete(prompt_sprite);
prompt_sprite = ___prompt_sprite_create(prompt);
wait = 5/transition_speed;
}
Expand Down
7 changes: 7 additions & 0 deletions Loungeware/objects/___global/CleanUp_0.gml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
ds_list_destroy(___song_stop_list);
ds_list_destroy(___audio_active_list);

ds_map_destroy(gp_to_str);
ds_map_destroy(_DTA_FONT_Y_OFFSET_MAP);

// text alive
ds_list_destroy(active_char_id_list);
ds_list_destroy(active_char_timer_list);
ds_list_destroy(active_char_potential_letters);

font_delete(___fnt_transition_score);
font_delete(___fnt_gallery);

5 changes: 5 additions & 0 deletions Loungeware/objects/___global/KeyPress_118.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// @desc Toggle debug menu

if !___DEBUG_MENU_STRUCT.accessible exit;

___DEBUG_MENU_STRUCT.toggle();
1 change: 1 addition & 0 deletions Loungeware/objects/___global/___global.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Loungeware/objects/___obj_dev_menu/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ menu = [
game_keylist = ___microgame_get_keylist_chronological();
cursor2 = 0;
cart_sprite = noone;
surf_cart = noone;
skip_possible = true;

wait = 20;
Expand Down
1 change: 1 addition & 0 deletions Loungeware/objects/___obj_pause/CleanUp_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
//if (file_exists(filename)) file_delete(filename);
//surface_resize(application_surface, store_appsurf_w, store_appsurf_h);
audio_stop_sound(jam_id);
ds_list_destroy(used_frames);
2 changes: 2 additions & 0 deletions Loungeware/scripts/___MNGR_functions/___MNGR_functions.gml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function ___MG_MNGR_declare_functions(){

microgame_won = false;
microgame_timer_skip = false;
if sprite_exists(cart_sprite) sprite_delete(cart_sprite);
cart_sprite = ___cart_sprite_create(_metadata);
gbo_timerbar_visible = true;
transition_appsurf_zoomscale = 1;
Expand Down Expand Up @@ -174,6 +175,7 @@ function ___MG_MNGR_declare_functions(){

var _cart = ___get_fake_label();
_cart.cartridge_label = ___spr_fake_labels;
if sprite_exists(cart_sprite) sprite_delete(cart_sprite);
cart_sprite = ___cart_sprite_create(_cart);
microgame_current_metadata = _cart;
cart_change(microgame_current_metadata);
Expand Down
1 change: 0 additions & 1 deletion Loungeware/scripts/___MNGR_variables/___MNGR_variables.gml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ canvas_y = gbo_padding_y;
surf_master = noone;
surf_gameboy = noone;
surf_transition_circle = noone;
surf_cart = noone;
surf_reflection = noone;

//--------------------------------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 1715e0f

Please sign in to comment.