View Single Post
Old 22 September 2018, 23:29   #1
Havie
Registered User
 
Havie's Avatar
 
Join Date: Mar 2012
Location: UK
Posts: 1,895
Problems with displaying a screen!

Help - problem driving me mad!

I am simply trying to display a background (320x200 16 colours) on a double buffered screen. When I run the program - it works first time but when it ends I get an error (#80000020) or if I leave it a while it just crashes. If I reload and rerun the program it just crashes and seems to be trying to display the bitmap in different parts of the memory (if that makes sense). If after running once, I reload the bitmap into Deluxe Paint and re-save it then the program runs and crashes again. Whatever is happening initially seems to be corrupting my iff file.

I'm probably doing something stupid - help. Here is the code:

Code:
WBStartup

LoadShape 50,"Background/level1"
LoadPalette 0,"Graphics/palette.pal"

BLITZ

;set up bitmap...
;
BitMap 0,320+16,200,4
BitMap 1,320+16,200,4

InitCopList 0,44,200,$14,8,32,0
DisplayPalette 0,0
CreateDisplay 0

DisplayBitMap 0,0

db=0

Use BitMap 0: Blit 50,0,0
Use BitMap 1: Blit 50,0,0

;while mouse button not hit

While RawStatus(69)=0

	VWait
	Displaybitmap 0, db

	db=1-db

Wend
Havie is offline  
 
Page generated in 0.06961 seconds with 11 queries