fixed incorrect canvase for opengl-scaled savestate thumbnail; rebuild free objects after restoring and remapping the coop players

This commit is contained in:
zicodxx 2012-05-18 10:54:36 +02:00
parent e7c86fd11d
commit 3b8175c3ba
2 changed files with 9 additions and 0 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20120518
--------
main/state.c: fixed incorrect canvase for opengl-scaled savestate thumbnail; rebuild free objects after restoring and remapping the coop players
20120516
--------
main/game.c: In Multiplayer when taking damage, the game will only leave menus when shield drop below 5

View file

@ -505,7 +505,11 @@ int state_callback(newmenu *menu, d_event *event, grs_bitmap *sc_bmp[])
{
if ( sc_bmp[citem-1] ) {
grs_canvas *save_canv = grd_curcanv;
#ifndef OGL
grs_canvas *temp_canv = gr_create_canvas(FSPACX(THUMBNAIL_W),FSPACY(THUMBNAIL_H));
#else
grs_canvas *temp_canv = gr_create_canvas(THUMBNAIL_W*2,(THUMBNAIL_H*24/10));
#endif
grs_point vertbuf[3] = {{0,0}, {0,0}, {i2f(THUMBNAIL_W*2),i2f(THUMBNAIL_H*24/10)} };
gr_set_current_canvas(temp_canv);
scale_bitmap(sc_bmp[citem-1], vertbuf, 0);
@ -1465,6 +1469,7 @@ RetryObjectLoading:
if (!coop_player_got[i] && Players[i].connected == CONNECT_PLAYING)
multi_disconnect_player(i);
Viewer = ConsoleObject = &Objects[Players[Player_num].objnum]; // make sure Viewer and ConsoleObject are set up (which we skipped by not using InitPlayerObject but we need since objects changed while loading)
special_reset_objects(); // since we juggeled around with objects to remap coop players rebuild the index of free objects
}
PHYSFS_close(fp);