Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Classic 15 puzzle
#5
Yeah, that's it.  I made a little test.  Once the _DEST image is freed, the _DEST will reset to 0, not to whatever _DEST was before _DESTing to that image.  I guess _DEST cur& should be added before exiting the Text SUB.

- Dav

Code: (Select All)
Screen _NewImage(640, 480, 32)

num2& = _NewImage(640, 480, 32) 'a second screen
_Dest num2& 'dest to this just for a test

dotest 'call a sub (we are in _DEST num2&...)

Print "Hello" 'This will show in _DEST 0

Sub dotest

    test& = _NewImage(640, 480, 32) 'another screen
    _Dest test& 'point there
    Print "Test page."
    _FreeImage test& 'remove it, DEST will be removed

    '(_DEST will not go back to num&, but 0)

End Sub

Find my programs here in Dav's QB64 Corner
Reply


Messages In This Thread
Classic 15 puzzle - by Dav - 10-14-2024, 12:36 PM
RE: Classic 15 puzzle - by bplus - 10-14-2024, 01:50 PM
RE: Classic 15 puzzle - by Dav - 10-14-2024, 05:50 PM
RE: Classic 15 puzzle - by bplus - 10-14-2024, 06:10 PM
RE: Classic 15 puzzle - by Dav - 10-14-2024, 11:48 PM
RE: Classic 15 puzzle - by bplus - 10-15-2024, 01:08 AM



Users browsing this thread: 1 Guest(s)