Legacy GM Switching between views turns the screen blank after a small but random nr. of switches

M

Master_of_Balls

Guest
I'm trying to make a room where you can switch part of it (view 0) to another view that's about 2/3 of the port size (view 1). Kind of like those menus where you have a character avatar, say, on the left side of the screen, and then you can switch the windows to the right of it - for example one window is an inventory and another is a stats display - while the character always remains in view.

I have something vaguely like it, and it works as intended for a few view (window) switches, then the whole screen goes grey.

I switch between views with a button in each view

obj_arrowDown, mouse event, view 0 (upper side of the room):
Code:
view_visible[1] = true;
obj_arrowUp. mouse event, view 1 (lower side of the room):
Code:
view_visible[1] = false;
The room is 720*960, "draw background color" is unchecked, "clear background with window color" is unchecked, view 0 is visible when the room starts, view 1 is not.

View 0 in room is drawn at 0, 0, w720, h480, same as it's port, view 1 in room is drawn at 240, 480, w480, h480, and it's port is 240, 0, w480, h480

I'm drawing everything directly on the application surface.

edit: I forgot to mention that I also have a persistent GUI layer at the top of the screen that takes up one tenth of it, 720*48, drawn on the same sized surface, if that helps
 
Last edited by a moderator:
Top