Skip to content

Commit 439a86c

Browse files
committed
More fixes to load/save
1 parent de953ca commit 439a86c

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

actors.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,7 @@ int Monster_actor::is_blocked
14361436
int new_lift;
14371437
Chunk_object_list *olist = gwin->get_objects(
14381438
x/tiles_per_chunk, cy);
1439+
olist->setup_cache();
14391440
if (olist->is_blocked(height, lift, x%tiles_per_chunk,
14401441
rty, new_lift) ||
14411442
new_lift != lift)
@@ -1451,6 +1452,7 @@ int Monster_actor::is_blocked
14511452
int new_lift;
14521453
Chunk_object_list *olist = gwin->get_objects(
14531454
cx, y/tiles_per_chunk);
1455+
olist->setup_cache();
14541456
if (olist->is_blocked(height, lift, rtx,
14551457
y%tiles_per_chunk, new_lift) ||
14561458
new_lift != lift)

exult.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ int Modal_gump
969969
gwin->get_win()->put(back, box.x, box.y);
970970
delete back;
971971
mouse->set_shape(saveshape);
972-
mouse->show();
972+
// Leave mouse off.
973973
gwin->set_painted();
974974
gwin->show();
975975
return (!escaped);

gamewin.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,11 +795,13 @@ int Game_window::read
795795
)
796796
{
797797
clear_world(); // Wipe clean.
798+
if (!read_gwin()) // Read our data.
799+
return (0);
800+
main_actor_inside = 0;
801+
end_gump_mode(); // Kill gumps, and paint new data.
798802
read_npcs(); // Read in NPC's, monsters.
799803
if (!usecode->read()) // Usecode.dat (party, global flags).
800804
return (0);
801-
if (!read_gwin()) // Read our data.
802-
return (0);
803805
clock.set_palette(); // Set palette for time-of-day.
804806
return (1);
805807
}

gumps.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ int Gump_text::mouse_clicked
297297
{
298298
if (!on_widget(gwin, mx, my)) // Not in our area?
299299
return (0);
300-
mx -= textx; // Get pt. rel. to text area.
300+
mx -= textx + parent->get_x(); // Get pt. rel. to text area.
301301
if (!focus) // Gaining focus?
302302
{
303303
focus = 1; // We have focus now.
@@ -434,8 +434,10 @@ void Disk_gump_button::activate
434434
// Did user restore a game?
435435
int restored = fileio->restored_game();
436436
delete fileio;
437+
#if 0
437438
if (restored)
438439
parent->close(gwin); // If so, close gump.
440+
#endif
439441
}
440442

441443
/*
@@ -1888,9 +1890,9 @@ void Yesno_gump_object::key_down
18881890
int chr
18891891
)
18901892
{
1891-
if (chr == 'y' || chr == 'Y')
1893+
if (chr == 'y' || chr == 'Y' || chr == SDLK_RETURN)
18921894
set_answer(1);
1893-
else if (chr == 'n' || chr == 'N')
1895+
else if (chr == 'n' || chr == 'N' || chr == SDLK_ESCAPE)
18941896
set_answer(0);
18951897
}
18961898

0 commit comments

Comments
 (0)