[Nicholaus04] GL&HF!
[Deadcode] gl gk!
[Deadcode] pheww
[STF-Campz1] ah
[STF-Campz1] wtf
Nicholaus04 [Tsk, Tsk, Tsk... Too Bad...]
[STF-Campz1] gj
[Deadcode] ty
[Nicholaus04] Nice!
[Deadcode] hmm
[Nicholaus04] Also, the utility i'm making is written in C99. and is mostly meant for UNIX systems only, as it uses the POSIX API.
[Nicholaus04] It could compile on MSYS2 or Cygwin using it's POSIX API.
[Deadcode] Is it a utilty to do something with WA graphics?
[Nicholaus04] Could be used for that, but nope.
[STF-Campz1] hahah
[Deadcode] aww
[Deadcode] damnit
[Deadcode] lol
[STF-Campz1] lmao
[STF-Campz1] bl
[STF-Campz1] sick
[Deadcode] ty
[Nicholaus04] Basically, it's meant to generate PNG images that can be used in my idtech3 fork via one of it's new features.
[Deadcode] not sick
[Nicholaus04] Basically, the ability to draw 2D images on the screen instead of shader scripts.
[Nicholaus04] As in, making most of the HUD software rendered via game code.
[Nicholaus04] They're called raw pictures.
[Nicholaus04] Since they're drawn like regular pics(Shaders) but can have their pixels modified during runtime.
[Deadcode] ahhhh
[Deadcode] vbl
[Nicholaus04] Oop.
[Nicholaus04] Basically what the utility does is this:
[Deadcode] oops
[Nicholaus04] It creates whats called a "fontchunk", which is a 1024x1024 surface.
[Nicholaus04] It creates up to 256 of these.
[Nicholaus04] After it creates them, it places glyphs of each possible character withen the range of a U16(unsigned short) on the fontchunk surface.
[STF-Campz1] nice
[Deadcode] ty
[Nicholaus04] It continues on that chunk until there's not enough space for the next character.
[Nicholaus04] From there, it continues it's work on the next chunk.
[Deadcode] niiiice jump
[Nicholaus04] Basically, rinse and repeat those steps until we scrubbed through every character in the font.
[Nicholaus04] Of course, there's duplicate glyph checks.
[Nicholaus04] Basically, after planting the glyph on a chunk, it stores it's glyph ID in a array.
[Nicholaus04] So, if we find a character sharing the same glyph, we just skip it.
[Nicholaus04] After all the characters are checked for and blitted onto most of the chunks, we save only the processed chunks into seperate PNG files.
[Deadcode] bl phew
[Nicholaus04] The filename of the outputted images is this: %s_%i_%i.png.
[Deadcode] darn
[Deadcode] now scales time
[Nicholaus04] Where: %s = Filename of font, minus the extension. %i 1 = Size ID of font(0 = sml, 1 = std, 2 = med), or the index of a bitmap font. %i 2 = Fontchunk ID(From 1, to 256).
[Nicholaus04] And that's it.
[Nicholaus04] The resulting files get spat out into the working directory.
[Nicholaus04] In addition, a special argument can be given to the utility which will spit out a .lua file containing nothing but a table containing the respective glyphs coords in each image.
[Deadcode] that was a silly idea of mine
[Deadcode] I should've just blowtorched a little higher
[Deadcode] oh
[Nicholaus04] The reason for the lua file is to use it's table as a reference for where each glyph is, and what image file it belongs to.
[Nicholaus04] Though, i might move the font format for my project to use a text file that describes each glyph instead of a Lua table.
[Deadcode] aw
[Deadcode] nice idea
[Nicholaus04] Ditto.
[Nicholaus04] But attempts were made.
[Deadcode] you could've created some crate space for yourself with that
[Deadcode] last girder
[Deadcode] next come petrol, maybe
[STF-Campz1] i'm just having fun for you, coz 0% of winning
[Nicholaus04] Ouchie.
[Deadcode] :-)
[Deadcode] nice
[Nicholaus04] Neato sheep-o!
[STF-Campz1] good games, ocngratz
[Nicholaus04] GG!
[Deadcode] gg. Thanks.
[STF-Campz1] bb