Skip to content

Commit

Permalink
Bug Fixes, Added Quit feature
Browse files Browse the repository at this point in the history
-Fixed pause screen for GXC
-Added Quitting by holding esc
-some debug stuff is now easier to use
  • Loading branch information
EvanSkiStudios committed Feb 14, 2022
1 parent 8545c3a commit 0cd1862
Show file tree
Hide file tree
Showing 15 changed files with 84 additions and 19 deletions.
5 changes: 2 additions & 3 deletions Starship_Elemental/Starship_Elemental.yyp

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

4 changes: 2 additions & 2 deletions Starship_Elemental/objects/obj_GXC_ctrl/Draw_64.gml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ draw_set_font(global.font_galatica);
draw_text(GAME_RES_WIDTH/2,30,"WARNING!");

draw_set_font(fnt_highscore);
draw_text_color(GAME_RES_WIDTH/2,100,"This is the Opera GX export of the GMC Jam 43 Edition!\nSome gameplay effects will be affected by this export!\nFor the full intended experience,\nPlease play the itch.io version.\nOtherwise we still hope you have fun!",
draw_text_color(GAME_RES_WIDTH/2,100,"This is the Opera GX export of the GMC Jam 43 Edition!\nSome gameplay effects will be affected by this export!\nFor the full intended experience,\nPlease play the itch.io version.\nOtherwise we still hope you have fun!\n\nMAKE SURE FULLSCREEN IS TURNED ON!!!",
c_white,c_white,C_RAINBOW,C_RAINBOW,1);

if (can_press_anykey){
draw_text_color(GAME_RES_WIDTH/2,180,"Press anykey to start!",
draw_text_color(GAME_RES_WIDTH/2,200,"Press anykey to start!",
c_white,c_white,C_RAINBOW,C_RAINBOW,1);
}
5 changes: 5 additions & 0 deletions Starship_Elemental/objects/obj_ctrl_pause/Alarm_1.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
///@desc Quit timer
var start = Gamepad_start();
if (keyboard_check(vk_escape) || (start)){
game_end();
}
4 changes: 3 additions & 1 deletion Starship_Elemental/objects/obj_ctrl_pause/Create_0.gml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
can_pause = true;
pause_sprite = -4;
pause_sprite = -4;
global.GXC_Pause_Surface = -4;
exiting = false;
21 changes: 20 additions & 1 deletion Starship_Elemental/objects/obj_ctrl_pause/Draw_64.gml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ if !(global.GAMEPaused) return;
if !(global.IS_GX_EXPORT){
draw_sprite_ext(pause_sprite,0,0,0,0.5,0.5,image_angle,c_white,1);
}else{

if (!(surface_exists(global.GXC_Pause_Surface))){
global.GXC_Pause_Surface = surface_create(display_get_gui_width(),display_get_gui_height());
surface_copy(global.GXC_Pause_Surface,0,0, view_surface_id[0]);
}

draw_surface(global.GXC_Pause_Surface,0,0);

/*
draw_set_alpha(1);
draw_rectangle_color(
Expand All @@ -12,6 +21,7 @@ if !(global.IS_GX_EXPORT){
c_black,c_black,c_red,c_red,
false
);
*/
}

draw_set_alpha(0.75);
Expand All @@ -36,6 +46,15 @@ draw_text(GAME_RES_WIDTH/2,( (room_height/2) - 40),"PAUSED");
draw_set_font(fnt_highscore);

var color = C_RAINBOW;
draw_text_color(GAME_RES_WIDTH/2,( (room_height/2) + 20),"Press ANYKEY or START to unpause!",c_white,c_white,color,color,1);
draw_text_color(GAME_RES_WIDTH/2,( (room_height/2) + 20),
"Press ESC or START to unpause!\nHold ESC or START for 3 secs to quit!!",
c_white,c_white,color,color,1);

if (exiting){
draw_set_halign(fa_left);
draw_text_color(100,10,
"Keep Holding ESC or START to quit!!",
c_white,c_white,color,color,1);
}

draw_set_default();
18 changes: 18 additions & 0 deletions Starship_Elemental/objects/obj_ctrl_pause/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ if instance_exists(obj_smartbomb_effect_ice) return;
var start = Gamepad_start();

if keyboard_check_pressed(vk_escape) || (start){
alarm[1] = GAMESPEED * 3;
exiting = true;
if (can_pause){
initAudio();
global.GAMEPaused = !global.GAMEPaused;
Expand All @@ -30,12 +32,21 @@ if keyboard_check_pressed(vk_escape) || (start){

pause_sprite = sprite_add(pause_png,1,false,false,0,0);
}
}else{
if (global.GXC_Pause_Surface == -4){
global.GXC_Pause_Surface = surface_create(display_get_gui_width(),display_get_gui_height());
surface_copy(global.GXC_Pause_Surface,0,0,application_surface);
}
}
alarm[0] = GAMESPEED;
can_pause = false;
}
}

if (keyboard_check_released(vk_escape) || (start)){
exiting = false;
}

if (global.GAMEPaused){

instance_deactivate_all(true);
Expand All @@ -57,6 +68,13 @@ if (global.GAMEPaused){
file_delete(pause_png);
}
}
}else{
if (global.GXC_Pause_Surface != -4){
if (surface_exists(global.GXC_Pause_Surface)){
surface_free(global.GXC_Pause_Surface);
}
global.GXC_Pause_Surface = -4;
}
}

instance_activate_all();
Expand Down

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

9 changes: 4 additions & 5 deletions Starship_Elemental/objects/obj_ctrl_resoultion/Alarm_1.gml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//if (global.IS_GX_EXPORT){
// room_goto(rm_isGXC);
//}else{

if (global.IS_GX_EXPORT) && !(global.DEBUG){
room_goto(rm_isGXC);
}else{
room_goto(rm_intro);
//}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
window_set_fullscreen( !(window_get_fullscreen()) );
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
if !(global.DEBUG) exit;
game_restart();
13 changes: 13 additions & 0 deletions Starship_Elemental/objects/obj_next_room_seq_done/Step_0.gml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
if (global.DEBUG){
var fire = (INPUT.input_pressed(0, input_action.fire1));
var keys = invaild_keys();
if !(keys){
if ( keyboard_check_pressed(vk_anykey) || GAMEPAD_START || fire){
if !(instance_exists(obj_gui_fadeout)){
fadetoroom(rm_mainmenu,2,c_white);;
}
}
}
}


if layer_sequence_is_finished(sequance_id){
if !(instance_exists(obj_gui_fadeout)){
fadetoroom(rm_mainmenu,2,c_white);
Expand Down
3 changes: 2 additions & 1 deletion Starship_Elemental/options/main/options_main.yy

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

9 changes: 8 additions & 1 deletion Starship_Elemental/options/operagx/options_operagx.yy

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

6 changes: 3 additions & 3 deletions Starship_Elemental/rooms/rm_INIT/rm_INIT.yy

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

3 changes: 1 addition & 2 deletions Starship_Elemental/scripts/GXC_HIGHSCORE/GXC_HIGHSCORE.gml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#macro GAME_IS_GX_EXPORT false
#macro GX_EXPORT:GAME_IS_GX_EXPORT true
#macro GAME_IS_GX_EXPORT (os_type == os_operagx)

global.IS_GX_EXPORT = GAME_IS_GX_EXPORT;

Expand Down

0 comments on commit 0cd1862

Please sign in to comment.