Interesting Mac problem I had

Previous topic - Next topic

MrTAToad

Recently had an interesting problem on a Mac - loading a sprite after loading a font, could corrupt the font (just get a grey box for each letter).  As far as I could tell, the sprite was overwriting the font graphic (obviously they share the same sprite index).

The way around it is to make sure each sprite uses a number generated by GENSPRITE()

Kitty Hello

can you verify what sprite/font ID you had that caused the overwrite?

MrTAToad

I will do - once I can get on my Mac :)

MrTAToad

Okay - using FONT 1, it becomes a mass of grey when loading in sprite 0

I use the following :

Code (glbasic) Select
SETFONT 1
PRINT "Loading sprite : "+l.idNumber%,100,100
SHOWSCREEN
KEYWAIT

LOADSPRITE file$,l.idNumber%

SETFONT 1
PRINT "here",100,100
SHOWSCREEN
KEYWAIT


Scott_AW

#4
Why not distance your sprites from the font index, like maybe start sprite indexes at 10.  Never mind, reverse that.  Stick the font index at a higher number, like 255. 

Isn't loading a font treated like a animation, each character has an index?
Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

MrTAToad

Its a bit of waste of indexes doing that unfortunately.