PDA

View Full Version : Build font size again


DukeRick81
10-07-2002, 01:01 PM
hi everyone

I downloaded the BUILD engine sourcecode from Ken Silverman's website and it's a very interesting thing to check out. There are tricky and fun things too!!! Even though I have read the source code like a million times I still cannot figure out how to change fontsize images/icons/frown.gif Ken did his own "printf" function and I've seen what it does but not HOW it works.....can anyone here help me??? Thanks in advance

Grudge
10-08-2002, 05:49 AM
I recommend posting the bit of the code you want explaining as I certainly can't be arsed to download the code - if you post it I'll see if I can help

Edit: I forgot what forum I was in. Me=Idiot!

[ 10-08-2002, 05:55 AM: Message edited by: Grudge ]

cyborg
10-09-2002, 07:43 AM
Originally posted by DukeRick81:
Ken did his own "printf" function and I've seen what it does but not HOW it works.....can anyone here help me??? <font size="2" face="Verdana, Arial">You're referring to the main text stuff in the 2d mode right? I have a suspicion from the style of the text that it may use the standard ROM font for that video mode - in which case there probably isn't any option to have a window's style scalable font. You'd have to make your own routine - although as a suggestion if you are any good with the windows GUI (and can compile build) have a go at making a new interface. I'm not good enough with C or the GUI but from the looks of it you'd only be interested in all the functions that pertain to getting map data to decide how to draw the map view and the algorithms for performing map changes (although given their buggy nature new ones might be in order - I'm sure builders would thank you greatly images/icons/smile.gif ).
Plus it would help those people who have trouble with the build keys not working in their verison of windows.

The_Shadow
10-15-2002, 02:30 AM
Cyborg: When working on my own 3D engine and combined map editor, Ken Silverman sent me a couple of snippets of font code. I remember him saying something about the fonts in 2D mode being either completely or partially in assembler, which would explain why it's hard to find. The code he sent me was snippets of his simple 6*6 and 8*8 fonts that he had ported into pure C for me. It was just matrices of positions for each character, that were in turn drawn to the screen (Or blitted to a bitmap) using some form of putpixel function.

I find a better option would be to use the bitmapped fonts in ART files, and write your own function to get the related tile numbers. You then can make the font any size you want. Build has support for zooming/stretching sprites, so scalable font sizes wouldn't be too hard either.