Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UnscramblePic.bas - Rotate picture pieces puzzle
#14
Thanks, GareBare!

I have edited all my programs found here on the forum to fix the _INFLATE error in the BASIMAGE created Subs.  

Also -- I've been trying to narrow down in my code exactly what is causes the _INFLATE error.  _INFLATE works on most of my programs without needing the 2nd parameter given.  It seems _INFLATE only needs it (m.SIZE) only in my BASIMAGE SUBs.  Other routines I use _INFLATE don't given the error (like SUBS made with the BASFILE creator).  I thought perhaps the error may happen only when using _MEM stuff (like BASIMAGE uses), but that doesn't look like it  - - the example below does what a BASIMAGE SUB does, but  m.SIZE is not required for _INFLATE to work here. Wonder why _INFLATE fails in in the BASIMAGE created Subs?

_INFLATE works correct here.  m.SIZE not needed.

Code: (Select All)
Screen _NewImage(800, 600, 32)

Dim m As _MEM: m = _MemImage(0)

'make empty space for screen data
test$ = Space$(m.SIZE): Print Len(test$)

'move screen memory into string data
_MemGet m, m.OFFSET, test$

'Compress that string data
test$ = _Deflate$(test$): Print Len(test$)

'decompress it as it was
test$ = _Inflate$(test$): Print Len(test$)

_MemFree m

- Dav

Find my programs here in Dav's QB64 Corner
Reply


Messages In This Thread
RE: UnscramblePic.bas - Rotate picture pieces puzzle - by Dav - 07-15-2023, 06:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  2048 Puzzle Dav 42 6,854 10-27-2024, 10:08 AM
Last Post: bplus
  Classic 15 puzzle Dav 5 1,155 10-15-2024, 01:08 AM
Last Post: bplus
  Simple Sudoku puzzle (updated with 500 puzzles) Dav 7 2,179 06-12-2024, 05:43 PM
Last Post: Dav
  RocoLoco - Row & Column math puzzle game. Dav 3 1,367 06-07-2024, 12:11 PM
Last Post: Dav
  Make5 - Board clearing puzzle game Dav 9 2,228 07-15-2023, 01:47 AM
Last Post: Dav

Forum Jump:


Users browsing this thread: 1 Guest(s)