Beispiel #1
0
/**
 *
 *  rct2: 0x006C19AC
 */
void font_sprite_initialise_characters()
{
    uint8* pCharacterWidth = _spriteFontCharacterWidths;
    for (int fontSize = 0; fontSize < FONT_SIZE_COUNT; fontSize++) {
        int glyphOffset = fontSize * FONT_SPRITE_GLYPH_COUNT;
        for (uint8 glyphIndex = 0; glyphIndex < FONT_SPRITE_GLYPH_COUNT; glyphIndex++) {
            rct_g1_element g1 = g1Elements[glyphIndex + SPR_CHAR_START + glyphOffset];

            int width = fontSize == FONT_SIZE_BIG ? g1.width + 1 : g1.width - 1;
            if (glyphIndex >= (FORMAT_ARGUMENT_CODE_START - 32) && glyphIndex < (FORMAT_COLOUR_CODE_END - 32)) {
                width = 0;
            }
            *pCharacterWidth++ = (uint8)width;
        }
    }

    scrolling_text_initialise_bitmaps();

    for (int i = 0; i < 32; i++) {
        rct_g1_element* g1 = &g1Elements[0x606 + i];
        uint8* unknown_pointer = RCT2_ADDRESS(0x009C3852, uint8) + 0xA12 * i;
        g1->offset = unknown_pointer;
        g1->width = 64;
        g1->height = 40;
        *((uint16*)unknown_pointer) = 0xFFFF;
        *((uint32*)(unknown_pointer + 0x0E)) = 0;
    }
}
Beispiel #2
0
/**
 *
 *  rct2: 0x006C19AC
 */
void font_sprite_initialise_characters()
{
    uint8* pCharacterWidth = _spriteFontCharacterWidths;
    for (sint32 fontSize = 0; fontSize < FONT_SIZE_COUNT; fontSize++) {
        sint32 glyphOffset = fontSize * FONT_SPRITE_GLYPH_COUNT;
        for (uint8 glyphIndex = 0; glyphIndex < FONT_SPRITE_GLYPH_COUNT; glyphIndex++) {
            rct_g1_element g1 = g1Elements[glyphIndex + SPR_CHAR_START + glyphOffset];

            sint32 width = fontSize == FONT_SIZE_BIG ? g1.width + 1 : g1.width - 1;
            if (glyphIndex >= (FORMAT_ARGUMENT_CODE_START - 32) && glyphIndex < (FORMAT_COLOUR_CODE_END - 32)) {
                width = 0;
            }
            *pCharacterWidth++ = (uint8)width;
        }
    }

    scrolling_text_initialise_bitmaps();
}