- Joined
- Jun 26, 2017
- Messages
- 821
I would like to see the LoadImage() function giving an error message, if the loading fails.
Changes in graphics.cxs
Some beginners including myself stumbled upon this because of a typo and now I use this modification while setting up a new folder structure for my assets.
Changes in graphics.cxs
Code:
Function LoadImage:Image( path$,frameCount=1,flags=Image.DefaultFlags )
Local surf:=device.LoadSurface( FixDataPath(path) )
If surf
Return (New Image).Init(surf, frameCount, flags)
Else
DebugLog "Error - Unable to load image: " + path
EndIf
End