Gamestudio Links
Zorro Links
Newest Posts
FXCM demo test failed
by qin. 01/13/26 13:53
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (Quad, TipmyPip), 6,316 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Access to a Bitmap font's ... bmap #413048
12/06/12 22:05
12/06/12 22:05
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline OP
Expert
Error014  Offline OP
Expert

Joined: Jul 2002
Posts: 3,208
Germany
So I have a Bitmap-font defined like this:

Code:
FONT* mainfont = "HUD\\Font.bmp";



I can use it normally, as expected, in Texts. So far, so good.

Now I want to access it's bitmap content. acktypes.h tells me:

Code:
typedef struct FONT {
	C_LINK link;
	int	dx,dy;		// width/height of a single character for bitmap fonts
	int	num;		// number of characters - 11, 128, or 256
	int	cpl;		// characters per bitmap line, or -1 for a TTF font
	char	*type;		// image file or truetype font name
	BMAP	bmap;		// bitmap that holds the characters
   byte  pad[PAD_FONT];
} FONT;



So shouldn't something like this:

Code:
DEBUG_BMAP( &(mainfont->bmap), 200,1);



show me the bitmap?

It doesn't - it crashes.
I can access dx, dy just fine (used these to test this), and I can even get the correct width of the bitmap via

Code:
error(str_for_int(NULL,(mainfont->bmap).width));



The manual is very sparse about this topic, so I'm a little lost. Can anyone help me out?

Last edited by Error014; 12/06/12 22:08.

Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!
Re: Access to a Bitmap font's ... bmap [Re: Error014] #413104
12/08/12 02:00
12/08/12 02:00
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Off the top of my head, have you tried

DEBUG_BMAP( mainfont->bmap, 200,1);

or

DEBUG_BMAP( mainfont.bmap, 200,1);


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Access to a Bitmap font's ... bmap [Re: EvilSOB] #413105
12/08/12 02:38
12/08/12 02:38
Joined: Jul 2002
Posts: 3,208
Germany
Error014 Offline OP
Expert
Error014  Offline OP
Expert

Joined: Jul 2002
Posts: 3,208
Germany
Thanks for the reply!

Sadly, both of these don't work either.


Perhaps this post will get me points for originality at least.

Check out Dungeon Deities! It's amazing and will make you happy, successful and almost certainly more attractive! It might be true!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1