Added log mode, cleaned up pause screen and auto/skip mode display
This commit is contained in:
parent
c6f8f5f466
commit
79097458a4
|
@ -41,10 +41,10 @@ if (global.dialogue_mode) {
|
|||
draw_set_alpha( (-10 - (80 * i) + textlinefadein) / 60 );
|
||||
draw_text(camera_get_view_x(view_camera) + 320, camera_get_view_y(view_camera) + 180 - (20 * textlinecount) + (40 * (i-1)), textlines[i]);
|
||||
}
|
||||
draw_set_alpha(1);
|
||||
}
|
||||
if (text_advance_ready == TEXT_READY && display_mode != DISPLAY_NOTEXT) {
|
||||
loopdoop++;
|
||||
draw_set_alpha(1);
|
||||
draw_sprite( spr_text_arrow, round((loopdoop % 160) / 20), camera_get_view_x(view_camera) + 540, camera_get_view_y(view_camera) + 300 );
|
||||
}
|
||||
if (text_auto_mode == AUTO_ON) {
|
||||
|
|
|
@ -36,6 +36,9 @@ actor_C_sprite = -1;
|
|||
actor_C_anim_frame = 0;
|
||||
actor_C_pos = POSITION_LEFT;
|
||||
|
||||
global.log_text[LOG_LIMIT] = array_create(LOG_LIMIT);
|
||||
global.log_names[LOG_LIMIT] = array_create(LOG_LIMIT);
|
||||
|
||||
bg_test = ds_queue_create();
|
||||
mus_test = ds_queue_create();
|
||||
sound_test = ds_queue_create();
|
||||
|
|
|
@ -135,7 +135,7 @@ if (global.dialogue_mode) {
|
|||
|
||||
//display modes
|
||||
display_mode = ds_queue_dequeue(display_test);
|
||||
if ( display_mode == DISPLAY_NOTEXT && text_auto_mode == AUTO_OFF ) {
|
||||
if ( display_mode == DISPLAY_NOTEXT && text_auto_mode == AUTO_OFF ) { //no text
|
||||
text_auto_mode = AUTO_NEXT;
|
||||
}
|
||||
|
||||
|
@ -358,6 +358,16 @@ if (global.dialogue_mode) {
|
|||
textload = ds_queue_dequeue(text_test);
|
||||
texttarget = string_replace_all(textload, "#", "\n" );
|
||||
|
||||
//add text to log
|
||||
if (global.log_text[0] != 0 && global.log_names[0] != 0) {
|
||||
for( var r = LOG_LIMIT - 1; r >= 0; r--) {
|
||||
global.log_text[r+1] = global.log_text[r];
|
||||
global.log_names[r+1] = global.log_names[r];
|
||||
}
|
||||
}
|
||||
global.log_text[0] = texttarget;
|
||||
global.log_names[0] = speaker_name;
|
||||
|
||||
textspew = "";
|
||||
textlines = [ "", "", "", "", "", "", "" ];
|
||||
textlinecount = 1;
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
pause = false;
|
||||
paused_surface = -1;
|
||||
log_surface = -1;
|
||||
menu_wait = MENU_DELAY;
|
||||
dx = 0;
|
||||
dy = 0;
|
||||
log_dy = 0;
|
||||
surface_mult = global.options[? OPTIONS_WINDOWMULT];
|
||||
|
||||
save_check = false;
|
||||
|
@ -10,3 +12,4 @@ save_allowed = false;
|
|||
unpause_allowed = false;
|
||||
save_display = 0;
|
||||
escape_allowed = false;
|
||||
logmove_allowed = false;
|
||||
|
|
|
@ -6,29 +6,70 @@ if (pause) {
|
|||
if (paused_surface == -1) {
|
||||
instance_deactivate_all(true);
|
||||
}
|
||||
surface_mult = 1;
|
||||
paused_surface = surface_create(view_get_wport(view_camera[0]) * surface_mult, view_get_wport(view_camera[0]) * surface_mult);
|
||||
surface_set_target(paused_surface);
|
||||
draw_surface(application_surface, 0, 0);
|
||||
surface_reset_target();
|
||||
} else {
|
||||
draw_surface_ext(paused_surface, dx, dy, 0.5, 0.5, 0, c_white, 1);
|
||||
draw_surface_ext(paused_surface, dx, dy, 1, 1, 0, c_white, 1);
|
||||
draw_set_alpha(0.5);
|
||||
draw_set_color(c_black);
|
||||
draw_rectangle(0, 0, room_width, room_height, false);
|
||||
draw_set_alpha(1);
|
||||
draw_set_halign(fa_center);
|
||||
draw_rectangle(dx - 1, dy - 1, dx + 641, dy + 30, false);
|
||||
draw_rectangle(dx - 1, dy + 335, dx + 641, dy + 361, false);
|
||||
draw_set_halign(fa_right);
|
||||
draw_set_color(c_fuchsia);
|
||||
draw_text(dx + 320, dy + 170, "Paused, press P to continue");
|
||||
draw_text(dx + 320, dy + 220, "press S to save");
|
||||
draw_text(dx + 320, dy + 270, "press ESC to exit");
|
||||
draw_set_color(c_white);
|
||||
draw_text(dx + 630, dy + 340, "Paused, press P to continue, press S to save, press ESC to exit");
|
||||
draw_set_color(c_orange);
|
||||
draw_set_halign(fa_left);
|
||||
draw_text(dx + 10, dy + 10, "Log mode");
|
||||
if (!surface_exists(log_surface)) {
|
||||
log_surface = surface_create(620,260);
|
||||
}
|
||||
surface_set_target(log_surface);
|
||||
draw_clear_alpha(c_black, 1);
|
||||
textlinescount = 0;
|
||||
textline = "";
|
||||
for (var i = 0; i < 6; i++) {
|
||||
if (log_dy + i < LOG_LIMIT) {
|
||||
if (global.log_text[log_dy + i] != 0) {
|
||||
draw_set_color(c_aqua);
|
||||
draw_text(20, textlinescount * 20, global.log_names[log_dy + i]);
|
||||
textlinescount++;
|
||||
draw_set_color(c_ltgray);
|
||||
draw_text(40, textlinescount * 20, global.log_text[log_dy + i]);
|
||||
textlinescount++;
|
||||
textline = global.log_text[log_dy + i];
|
||||
for(var j = 0; j < string_length(textline); j++) {
|
||||
if (string_char_at(textline, j) == "\n") {
|
||||
textlinescount++;
|
||||
}
|
||||
}
|
||||
textlinescount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
surface_reset_target();
|
||||
draw_set_color(c_black);
|
||||
draw_set_alpha(0.5);
|
||||
draw_rectangle(dx + 10, dy + 35, dx + 630, dy + 295, false);
|
||||
draw_set_alpha(1);
|
||||
gpu_set_blendmode(bm_add);
|
||||
draw_surface_ext(log_surface, dx + 10, dy + 35, 1, 1, 0, c_white, 1);
|
||||
gpu_set_blendmode(bm_normal);
|
||||
surface_free(log_surface);
|
||||
if ( log_dy > 0) {
|
||||
draw_sprite(spr_uparrow, 0, 320, 10);
|
||||
}
|
||||
if ( log_dy < global.loaded_file[? SAVE_LINENUM] ) {
|
||||
draw_sprite(spr_downarrow, 0, 320, 310);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (save_display > 0) {
|
||||
draw_set_halign(fa_right);
|
||||
draw_text_ext_transformed_color_border(600, 320, "Saving...", 20, 150, 1, 1, 0, c_green, c_orange, c_green, c_orange, 1, 1, c_fuchsia);
|
||||
draw_text_ext_transformed_color_border(dx + 600, dy + 10, "Saving...", 20, 150, 1, 1, 0, c_green, c_orange, c_green, c_orange, 1, 1, c_fuchsia);
|
||||
draw_set_halign(fa_left);
|
||||
}
|
|
@ -5,6 +5,7 @@ if menu_wait <= 0 {
|
|||
save_allowed = true;
|
||||
unpause_allowed = true;
|
||||
escape_allowed = true;
|
||||
logmove_allowed = true;
|
||||
}
|
||||
|
||||
if (keyboard_check_pressed(ord("S")) && save_allowed == true) {
|
||||
|
@ -43,3 +44,22 @@ if (keyboard_check_pressed(vk_escape) && escape_allowed == true) {
|
|||
}
|
||||
room_goto(rm_title);
|
||||
}
|
||||
|
||||
if (keyboard_check(vk_up) && logmove_allowed == true) {
|
||||
menu_wait = MENU_DELAY;
|
||||
logmove_allowed = false;
|
||||
log_dy--;
|
||||
if (log_dy < 0) {
|
||||
log_dy = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (keyboard_check(vk_down) && logmove_allowed == true) {
|
||||
menu_wait = MENU_DELAY;
|
||||
logmove_allowed = false;
|
||||
log_dy++;
|
||||
if (log_dy > global.loaded_file[? SAVE_LINENUM]) {
|
||||
log_dy = global.loaded_file[? SAVE_LINENUM];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -195,6 +195,7 @@
|
|||
#macro DISPLAY_ADV_SHOUT 4
|
||||
#macro DISPLAY_WRITER 5
|
||||
|
||||
#macro LOG_LIMIT 1000
|
||||
|
||||
#macro POSITION_LEFT -1
|
||||
#macro POSITION_LEFTCENTER -0.5
|
||||
|
@ -268,6 +269,8 @@ function scr_initialize() {
|
|||
global.autosave_load = false;
|
||||
global.savepoint_numbers = 0;
|
||||
global.savepoint_instances[255] = 0;
|
||||
global.log_text[LOG_LIMIT] = array_create(LOG_LIMIT);
|
||||
global.log_names[LOG_LIMIT] = array_create(LOG_LIMIT);
|
||||
global.load_file_name = "defaults.json";
|
||||
global.file_A_preview_line1 = "---";
|
||||
global.file_B_preview_line1 = "---";
|
||||
|
|
Loading…
Reference in New Issue