363 lines
29 KiB
C++
363 lines
29 KiB
C++
#include "OGL_Class.h"
|
||
#include "SCENE.h"
|
||
|
||
#define font_texture_size_H 256
|
||
#define font_texture_size_V 128
|
||
static u32 texture_font_data[(u32)(font_texture_size_H * font_texture_size_V)];
|
||
/*
|
||
Fizedsys =
|
||
|
||
!"#$%&'()*+,-./0123456789:;<=>?
|
||
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
|
||
`abcdefghijklmnopqrstuvwxyz{|}~
|
||
<09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
嵗╯丰戍貝物洎悖停眾斯須號獄播噶
|
||
擱藏霰匸<E99CB0>帊昅恘倳眑婭笫崷窙嗲睧
|
||
颬睼麧緗鴇膹擨闀貘覷鏷禴矙𡜍𦶠<F0A19C8D>
|
||
*/
|
||
|
||
unsigned char OGLFONT_FixedSys[256][16] = {
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x18,0x3c,0x3c, 0x3c,0x18,0x18,0x00,0x18, 0x18,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x66,0x66,0x66, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x6c,0x6c,0xfe, 0x6c,0x6c,0x6c,0xfe,0x6c, 0x6c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x18,0x18,0x3c,0x66,0x06, 0x0c,0x18,0x30,0x60,0x66, 0x3c,0x18,0x18,0x00,0x00,0x00}, {0x00,0x0e,0x1b,0x5b,0x6e, 0x30,0x18,0x0c,0x76,0xda, 0xd8,0x70,0x00,0x00,0x00,0x00}, {0x00,0x00,0x1c,0x36,0x36, 0x1c,0x06,0xf6,0x66,0x66, 0xdc,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x18,0x18,0x18, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x30,0x18,0x18, 0x0c,0x0c,0x0c,0x0c,0x0c, 0x18,0x18,0x30,0x00,0x00,0x00}, {0x00,0x00,0x0c,0x18,0x18, 0x30,0x30,0x30,0x30,0x30, 0x18,0x18,0x0c,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x6c, 0x38,0xfe,0x38,0x6c,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x18, 0x18,0x7e,0x18,0x18,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x38, 0x38,0x30,0x18,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x7e,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x38, 0x38,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x60,0x60,0x30, 0x30,0x18,0x18,0x0c,0x0c, 0x06,0x06,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x78,0xcc,0xec, 0xec,0xcc,0xdc,0xdc,0xcc, 0x78,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x30,0x38,0x3e, 0x30,0x30,0x30,0x30,0x30, 0x30,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x66, 0x60,0x30,0x18,0x0c,0x06, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x66, 0x60,0x38,0x60,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x0c,0x0c,0x6c, 0x6c,0x6c,0x66,0xfe,0x60, 0x60,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x06,0x06, 0x06,0x3e,0x60,0x60,0x30, 0x1e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x38,0x18,0x0c, 0x3e,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x60,0x30, 0x30,0x18,0x18,0x0c,0x0c, 0x0c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x3c,0x66,0x66, 0x6e,0x3c,0x76,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x66, 0x66,0x66,0x7c,0x30,0x18, 0x1c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x38, 0x38,0x00,0x00,0x00,0x38, 0x38,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x38, 0x38,0x00,0x00,0x00,0x38, 0x38,0x30,0x18,0x00,0x00,0x00},
|
||
{0x00,0x00,0x60,0x30,0x18, 0x0c,0x06,0x0c,0x18,0x30, 0x60,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x7e,0x00,0x7e,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x06,0x0c,0x18, 0x30,0x60,0x30,0x18,0x0c, 0x06,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x66, 0x30,0x18,0x18,0x00,0x18, 0x18,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x7e,0xc3,0xc3, 0xf3,0xdb,0xdb,0xf3,0x03, 0xfe,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x18,0x3c,0x66, 0x66,0x66,0x7e,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3e,0x66,0x66, 0x66,0x3e,0x66,0x66,0x66, 0x3e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x66, 0x06,0x06,0x06,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x1e,0x36,0x66, 0x66,0x66,0x66,0x66,0x36, 0x1e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x06,0x06, 0x06,0x3e,0x06,0x06,0x06, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x06,0x06, 0x06,0x3e,0x06,0x06,0x06, 0x06,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x66, 0x06,0x06,0x76,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x66,0x66,0x66, 0x66,0x7e,0x66,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x18,0x18, 0x18,0x18,0x18,0x18,0x18, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x60,0x60,0x60, 0x60,0x60,0x60,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x66,0x66,0x36, 0x36,0x1e,0x36,0x36,0x66, 0x66,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x06,0x06,0x06, 0x06,0x06,0x06,0x06,0x06, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0xc6,0xc6,0xee, 0xd6,0xd6,0xd6,0xc6,0xc6, 0xc6,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0xc6,0xc6,0xce, 0xde,0xf6,0xe6,0xc6,0xc6, 0xc6,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x3e,0x66,0x66, 0x66,0x3e,0x06,0x06,0x06, 0x06,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x30,0x60,0x00,0x00,0x00}, {0x00,0x00,0x3e,0x66,0x66, 0x66,0x3e,0x36,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x06, 0x0c,0x18,0x30,0x60,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x7e,0x18,0x18, 0x18,0x18,0x18,0x18,0x18, 0x18,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x66,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x66,0x66,0x66, 0x66,0x66,0x66,0x66,0x3c, 0x18,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0xc6,0xc6,0xc6, 0xd6,0xd6,0xd6,0x6c,0x6c, 0x6c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x66,0x66,0x2c, 0x18,0x18,0x34,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x66,0x66,0x66, 0x66,0x3c,0x18,0x18,0x18, 0x18,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x60,0x60, 0x30,0x18,0x0c,0x06,0x06, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x0c,0x0c, 0x0c,0x0c,0x0c,0x0c,0x0c, 0x0c,0x0c,0x0c,0x3c,0x00,0x00},
|
||
{0x00,0x00,0x06,0x06,0x0c, 0x0c,0x18,0x18,0x30,0x30, 0x60,0x60,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x30,0x30, 0x30,0x30,0x30,0x30,0x30, 0x30,0x30,0x30,0x3c,0x00,0x00}, {0x18,0x3c,0x66,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0xff,0x00,0x00},
|
||
{0x1c,0x18,0x30,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x3c, 0x60,0x60,0x7c,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x06,0x06,0x3e, 0x66,0x66,0x66,0x66,0x66, 0x3e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x3c, 0x66,0x06,0x06,0x06,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x60,0x60,0x7c, 0x66,0x66,0x66,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x3c, 0x66,0x66,0x7e,0x06,0x06, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x78,0x0c,0x0c, 0x0c,0x7e,0x0c,0x0c,0x0c, 0x0c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x7c, 0x66,0x66,0x66,0x66,0x66, 0x7c,0x60,0x60,0x3e,0x00,0x00},
|
||
{0x00,0x00,0x06,0x06,0x3e, 0x66,0x66,0x66,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x00,0x18,0x18,0x00,0x1e, 0x18,0x18,0x18,0x18,0x18, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x30,0x30,0x00,0x3c, 0x30,0x30,0x30,0x30,0x30, 0x30,0x30,0x30,0x1e,0x00,0x00}, {0x00,0x00,0x06,0x06,0x66, 0x66,0x36,0x1e,0x36,0x66, 0x66,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x1e,0x18,0x18, 0x18,0x18,0x18,0x18,0x18, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x7e, 0xd6,0xd6,0xd6,0xd6,0xd6, 0xc6,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x3e, 0x66,0x66,0x66,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x3c, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x3e, 0x66,0x66,0x66,0x66,0x66, 0x3e,0x06,0x06,0x06,0x00,0x00}, {0x00,0x00,0x00,0x00,0x7c, 0x66,0x66,0x66,0x66,0x66, 0x7c,0x60,0x60,0x60,0x00,0x00}, {0x00,0x00,0x00,0x00,0x66, 0x76,0x0e,0x06,0x06,0x06, 0x06,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x7c, 0x06,0x06,0x3c,0x60,0x60, 0x3e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x0c,0x0c,0x7e, 0x0c,0x0c,0x0c,0x0c,0x0c, 0x78,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x66, 0x66,0x66,0x66,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x66, 0x66,0x66,0x66,0x66,0x3c, 0x18,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0xc6, 0xd6,0xd6,0xd6,0xd6,0x6c, 0x6c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x66, 0x66,0x3c,0x18,0x3c,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x30,0x18,0x0f,0x00,0x00}, {0x00,0x00,0x00,0x00,0x7e, 0x60,0x30,0x18,0x0c,0x06, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x30,0x18,0x18, 0x18,0x0c,0x06,0x0c,0x18, 0x18,0x18,0x30,0x00,0x00,0x00},
|
||
{0x00,0x00,0x18,0x18,0x18, 0x18,0x18,0x18,0x18,0x18, 0x18,0x18,0x18,0x18,0x00,0x00}, {0x00,0x00,0x0c,0x18,0x18, 0x18,0x30,0x60,0x30,0x18, 0x18,0x18,0x0c,0x00,0x00,0x00}, {0x00,0x00,0x8e,0xdb,0x71, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0xff,0x00},
|
||
{0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x30,0x18,0x38, 0x38,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x38,0x38,0x30, 0x18,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x7e,0x7e,0x7e, 0x7e,0x7e,0x7e,0x7e,0x7e, 0x7e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x0c,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x18,0x18,0x00,0x18,0x18, 0x3c,0x3c,0x3c,0x18,0x30,0x00}, {0x00,0x00,0x18,0x18,0x3c, 0x66,0x06,0x06,0x66,0x3c, 0x18,0x18,0x00,0x00,0x3c,0x00}, {0x00,0x00,0x3c,0x66,0x06, 0x06,0x3f,0x06,0x06,0x03, 0x7f,0x00,0x00,0x00,0xdc,0x00},
|
||
{0x00,0x00,0x00,0x66,0x3c, 0x66,0x66,0x3c,0x66,0x00, 0x00,0x00,0x00,0x00,0x66,0x00}, {0x00,0x00,0x66,0x66,0x66, 0x3c,0x7e,0x18,0x7e,0x18, 0x18,0x00,0x00,0x00,0x3c,0x00}, {0x00,0x00,0x18,0x18,0x18, 0x18,0x18,0x00,0x00,0x18, 0x18,0x18,0x18,0x18,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x06, 0x1c,0x3c,0x66,0x66,0x3c, 0x38,0x60,0x66,0x3c,0x00,0x00},
|
||
{0x00,0x66,0x66,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x0c,0x00}, {0x00,0x00,0x7e,0xc3,0x99, 0xa5,0x85,0xa5,0x99,0xc3, 0x7e,0x00,0x00,0x00,0x30,0x00}, {0x00,0x00,0x3c,0x60,0x7c, 0x66,0x7c,0x00,0x7e,0x00, 0x00,0x00,0x00,0x00,0x3c,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0xcc,0x66,0x33,0x66, 0xcc,0x00,0x00,0x00,0x66,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x7e,0x60,0x60,0x00, 0x00,0x00,0x00,0x00,0x0c,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x7e,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x30,0x00}, {0x00,0x00,0x7e,0xc3,0x9d, 0xa5,0xa5,0x9d,0xa5,0xc3, 0x7e,0x00,0x00,0x00,0x3c,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x66,0x00},
|
||
{0x00,0x3c,0x66,0x66,0x3c, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x18, 0x18,0x7e,0x18,0x18,0x00, 0x7e,0x00,0x00,0x00,0xdc,0x00}, {0x00,0x00,0x1c,0x30,0x18, 0x0c,0x3c,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x0c,0x00}, {0x00,0x00,0x1c,0x30,0x18, 0x30,0x1c,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x30,0x00},
|
||
{0x38,0x18,0x0c,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x3c,0x00}, {0x00,0x00,0x00,0x00,0x66, 0x66,0x66,0x66,0x66,0x66, 0xde,0x06,0x06,0x03,0xdc,0x00}, {0x00,0x00,0xf8,0x7c,0x7e, 0x7e,0x7e,0x7c,0x78,0x60, 0x60,0x60,0x60,0x60,0x66,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x38,0x38,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00, 0x00,0x18,0x30,0x1c,0x00,0x00}, {0x00,0x00,0x18,0x1c,0x18, 0x18,0x18,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x0c,0x00}, {0x00,0x00,0x3c,0x66,0x66, 0x66,0x3c,0x00,0x7e,0x00, 0x00,0x00,0x00,0x00,0x30,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x00,0x33,0x66,0xcc,0x66, 0x33,0x00,0x00,0x00,0x3c,0x00},
|
||
{0x00,0x06,0x07,0xc6,0x66, 0x36,0x18,0xec,0xf6,0xdb, 0xf8,0xc0,0x00,0x00,0x66,0x00}, {0x00,0x06,0x07,0xc6,0x66, 0x36,0x18,0x7c,0xc6,0x63, 0x30,0xf0,0x00,0x00,0x30,0x00}, {0x00,0x07,0x0c,0xc6,0x6c, 0x37,0x18,0xec,0xf6,0xdb, 0xf8,0xc0,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00, 0x18,0x18,0x00,0x18,0x18, 0x0c,0x66,0x66,0x3c,0x00,0x00},
|
||
{0x18,0x00,0x18,0x3c,0x66, 0x66,0x66,0x7e,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x18,0x00,0x18,0x3c,0x66, 0x66,0x66,0x7e,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x66,0x00,0x18,0x3c,0x66, 0x66,0x66,0x7e,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x76,0x00,0x18,0x3c,0x66, 0x66,0x66,0x7e,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00},
|
||
{0x66,0x00,0x18,0x3c,0x66, 0x66,0x66,0x7e,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x66,0x3c,0x18,0x3c,0x66, 0x66,0x66,0x7e,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0xf0,0x38,0x3c, 0x36,0xf6,0x3e,0x36,0x36, 0xf6,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x3c,0x66,0x66, 0x06,0x06,0x06,0x66,0x66, 0x3c,0x18,0x30,0x1c,0x00,0x00},
|
||
{0x18,0x00,0x7e,0x06,0x06, 0x06,0x3e,0x06,0x06,0x06, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x18,0x00,0x7e,0x06,0x06, 0x06,0x3e,0x06,0x06,0x06, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x66,0x00,0x7e,0x06,0x06, 0x06,0x3e,0x06,0x06,0x06, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x66,0x00,0x7e,0x06,0x06, 0x06,0x3e,0x06,0x06,0x06, 0x7e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x18,0x00,0x3c,0x18,0x18, 0x18,0x18,0x18,0x18,0x18, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x18,0x00,0x3c,0x18,0x18, 0x18,0x18,0x18,0x18,0x18, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x66,0x00,0x3c,0x18,0x18, 0x18,0x18,0x18,0x18,0x18, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x66,0x00,0x3c,0x18,0x18, 0x18,0x18,0x18,0x18,0x18, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x1e,0x36,0x66, 0x66,0x6f,0x66,0x66,0x36, 0x1e,0x00,0x00,0x00,0x00,0x00}, {0x76,0x00,0xc6,0xc6,0xce, 0xde,0xf6,0xe6,0xc6,0xc6, 0xc6,0x00,0x00,0x00,0x00,0x00}, {0x18,0x00,0x3c,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x18,0x00,0x3c,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x66,0x00,0x3c,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x76,0x00,0x3c,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x66,0x00,0x3c,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x42,0x66, 0x3c,0x18,0x3c,0x66,0x42, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x7c,0x66,0x76, 0x76,0x7e,0x6e,0x6e,0x66, 0x3e,0x00,0x00,0x00,0x00,0x00}, {0x18,0x00,0x66,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x18,0x00,0x66,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x66,0x00,0x66,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x66,0x00,0x66,0x66,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x18,0x00,0x66,0x66,0x66, 0x66,0x3c,0x18,0x18,0x18, 0x18,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x06,0x06,0x3e, 0x66,0x66,0x66,0x3e,0x06, 0x06,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x1c,0x36,0x36, 0x36,0x66,0x66,0x66,0x66, 0x36,0x00,0x00,0x00,0x00,0x00},
|
||
{0x0e,0x0c,0x18,0x00,0x3c, 0x60,0x60,0x7c,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x70,0x30,0x18,0x00,0x3c, 0x60,0x60,0x7c,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x18,0x3c,0x66,0x00,0x3c, 0x60,0x60,0x7c,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x8e,0xdb,0x71,0x00,0x3c, 0x60,0x60,0x7c,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x66,0x66,0x00,0x3c, 0x60,0x60,0x7c,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x3c,0x66,0x3c,0x00,0x3c, 0x60,0x60,0x7c,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x76, 0xd8,0xd8,0xfe,0x1b,0x1b, 0xee,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x00,0x3c, 0x66,0x06,0x06,0x06,0x66, 0x3c,0x18,0x30,0x1c,0x00,0x00},
|
||
{0x0e,0x0c,0x18,0x00,0x3c, 0x66,0x66,0x7e,0x06,0x06, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x70,0x30,0x18,0x00,0x3c, 0x66,0x66,0x7e,0x06,0x06, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x18,0x3c,0x66,0x00,0x3c, 0x66,0x66,0x7e,0x06,0x06, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x66,0x66,0x00,0x3c, 0x66,0x66,0x7e,0x06,0x06, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x0e,0x0c,0x18,0x00,0x1e, 0x18,0x18,0x18,0x18,0x18, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x70,0x30,0x18,0x00,0x1e, 0x18,0x18,0x18,0x18,0x18, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x18,0x3c,0x66,0x00,0x1e, 0x18,0x18,0x18,0x18,0x18, 0x7e,0x00,0x00,0x00,0x00,0x00}, {0x00,0x66,0x66,0x00,0x1e, 0x18,0x18,0x18,0x18,0x18, 0x7e,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x6c,0x18,0x36, 0x78,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x8e,0xdb,0x71,0x00,0x3e, 0x66,0x66,0x66,0x66,0x66, 0x66,0x00,0x00,0x00,0x00,0x00}, {0x0e,0x0c,0x18,0x00,0x3c, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x70,0x30,0x18,0x00,0x3c, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x18,0x3c,0x66,0x00,0x3c, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x8e,0xdb,0x71,0x00,0x3c, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x66,0x66,0x00,0x3c, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x00,0x00,0x00,0x00,0x00}, {0x00,0x00,0x00,0x18,0x18, 0x00,0x7e,0x00,0x18,0x18, 0x00,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x00,0x00,0x00,0x7c, 0x66,0x76,0x7e,0x6e,0x66, 0x3e,0x00,0x00,0x00,0x00,0x00}, {0x0e,0x0c,0x18,0x00,0x66, 0x66,0x66,0x66,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x70,0x30,0x18,0x00,0x66, 0x66,0x66,0x66,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x18,0x3c,0x66,0x00,0x66, 0x66,0x66,0x66,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00},
|
||
{0x00,0x66,0x66,0x00,0x66, 0x66,0x66,0x66,0x66,0x66, 0x7c,0x00,0x00,0x00,0x00,0x00}, {0x70,0x30,0x18,0x00,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x30,0x18,0x0f,0x00,0x00}, {0x00,0x00,0x06,0x06,0x06, 0x3e,0x66,0x66,0x66,0x66, 0x3e,0x06,0x06,0x06,0x00,0x00}, {0x00,0x66,0x66,0x00,0x66, 0x66,0x66,0x66,0x66,0x66, 0x3c,0x30,0x18,0x0f,0x00,0x00}
|
||
};
|
||
|
||
void OGLFONT_FixedSysCorrect(u8 *FONT)
|
||
{
|
||
static u32 OK = 0;
|
||
u32 Counter,Counter2;
|
||
if (OK) return;
|
||
OK = 1;
|
||
Counter = 255;
|
||
while (Counter > 32)
|
||
{
|
||
Counter2 = 15;
|
||
while (Counter2--)
|
||
OGLFONT_FixedSys[Counter][Counter2 + 1] = OGLFONT_FixedSys[Counter][Counter2];
|
||
OGLFONT_FixedSys[Counter][0] = OGLFONT_FixedSys[Counter - 32][14];
|
||
OGLFONT_FixedSys[Counter][15] = 0;
|
||
Counter--;
|
||
}
|
||
}
|
||
|
||
|
||
u32 OGLFONT_GetBinPixel(u32 Xc,u32 Yc)
|
||
{
|
||
u32 C;
|
||
/* retrieve ascii char */
|
||
C = (Xc >> 3) + ((Yc >> 4) << 5);
|
||
C = OGLFONT_FixedSys[C][(Yc & 15) ^ 15];
|
||
C &= 1 << (Xc & 7);
|
||
|
||
if (C) return 0xffffffff;
|
||
else return 0;
|
||
}
|
||
|
||
void OGL_DI::init_font(void)
|
||
{
|
||
if (FontTextureIndex == -1)
|
||
{
|
||
u32 Xc,Yc;
|
||
OGLFONT_FixedSysCorrect((u8 *)OGLFONT_FixedSys);
|
||
memset(texture_font_data , 0 , sizeof(texture_font_data));
|
||
for (Yc = 0 ; Yc < font_texture_size_V ; Yc ++)
|
||
{
|
||
for (Xc = 0 ; Xc < font_texture_size_H ; Xc ++)
|
||
{
|
||
texture_font_data[(Yc << 8) + Xc] = OGLFONT_GetBinPixel(Xc,Yc);
|
||
}
|
||
}
|
||
FontMap.BASE = (s32 *)texture_font_data;
|
||
FontMap.SX = font_texture_size_H;
|
||
FontMap.SY = font_texture_size_V;
|
||
FontMap.PITCH = font_texture_size_H;
|
||
FontTextureIndex = CreateTexture(&FontMap,0);
|
||
|
||
glBindTexture(GL_TEXTURE_2D, AllRef[FontTextureIndex].OGLRef);
|
||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);//*/
|
||
}
|
||
}
|
||
|
||
|
||
void OGL_DI::DrawText(unsigned char *Txt,float X, float Y, float FX, float FY , u32 ColorRGBA , u32 DrawModeShadow)
|
||
{
|
||
MotherClass->PickReportCurrent.PickFrozed ++;
|
||
RS Nullmlml;
|
||
GLOB_SetDefaultRS(&Nullmlml);
|
||
Nullmlml.NOZTEST = 1;
|
||
Nullmlml.AlphaThreshold = 128;
|
||
#define MAX_MultipleQuads 256
|
||
u32 CurrentIndex = 0;
|
||
u32 SaveCurrentColor = CurrentColor;
|
||
s32 Bounds[MAX_MultipleQuads] ;
|
||
float BoundsUV[MAX_MultipleQuads] ;
|
||
|
||
|
||
float SaveXBase;
|
||
SaveXBase = X;
|
||
while (*Txt)
|
||
{
|
||
float u0,v0,u1,v1;
|
||
if (*Txt == '\n')
|
||
{
|
||
X = SaveXBase;
|
||
Y -=16.0f*FY;
|
||
}
|
||
else
|
||
{
|
||
u0 = (0.5f + ((float)(*Txt & 31)) * 8.0f) / (float)font_texture_size_H;
|
||
v0 = (0.5f + ((float)(*Txt >> 5)) * 16.0f) / (float)font_texture_size_V;
|
||
u1 = 8.0f / (float)font_texture_size_H;
|
||
v1 = 16.0f / (float)font_texture_size_V;
|
||
/* if (DrawModeShadow && ColorRGBA)
|
||
{
|
||
DrawQuad(0|0xff010101,X-1,Y-1,8.0f*FX,16.0f*FY,u0,v0,u1,v1);
|
||
DrawQuad(0|0xff010101,X+1,Y-1,8.0f*FX,16.0f*FY,u0,v0,u1,v1);
|
||
DrawQuad(0|0xff010101,X+1,Y+1,8.0f*FX,16.0f*FY,u0,v0,u1,v1);
|
||
DrawQuad(0|0xff010101,X-1,Y+1,8.0f*FX,16.0f*FY,u0,v0,u1,v1);
|
||
DrawQuad(0|0xff010101,X-1,Y-0,8.0f*FX,16.0f*FY,u0,v0,u1,v1);
|
||
DrawQuad(0|0xff010101,X+1,Y-0,8.0f*FX,16.0f*FY,u0,v0,u1,v1);
|
||
DrawQuad(0|0xff010101,X+0,Y+1,8.0f*FX,16.0f*FY,u0,v0,u1,v1);
|
||
DrawQuad(0|0xff010101,X-0,Y-1,8.0f*FX,16.0f*FY,u0,v0,u1,v1);
|
||
}
|
||
DrawQuad(ColorRGBA|0xff010101,X,Y,8.0f*FX,16.0f*FY,u0,v0,u1,v1);*/
|
||
|
||
Bounds[CurrentIndex++] = X-1;
|
||
Bounds[CurrentIndex++] = X-1 + 8.0f*FX ;
|
||
Bounds[CurrentIndex++] = FB_SY - Y - 1;
|
||
Bounds[CurrentIndex++] = FB_SY - Y - 1-16.0f*FY;
|
||
CurrentIndex -= 4;
|
||
BoundsUV[CurrentIndex++] = u0;
|
||
BoundsUV[CurrentIndex++] = v0;
|
||
BoundsUV[CurrentIndex++] = u1;
|
||
BoundsUV[CurrentIndex++] = v1;
|
||
|
||
X +=8.0f*FX;
|
||
}
|
||
Txt++;
|
||
if ((CurrentIndex == MAX_MultipleQuads) || ((*Txt == 0) && CurrentIndex))
|
||
{
|
||
if (DrawModeShadow && ColorRGBA)
|
||
{
|
||
CurrentColor = 0xff010101;
|
||
DrawMultipleQuads(-1,CurrentIndex>>2,Bounds,BoundsUV,&Nullmlml);
|
||
}
|
||
CurrentColor = ColorRGBA|0xff010101;
|
||
DrawMultipleQuads(FontTextureIndex,CurrentIndex>>2,Bounds,BoundsUV,&Nullmlml);
|
||
CurrentIndex = 0;
|
||
}
|
||
|
||
}//*/
|
||
|
||
CurrentColor = SaveCurrentColor;
|
||
|
||
MotherClass->PickReportCurrent.PickFrozed --;
|
||
}
|
||
|
||
extern u32 GetNumberOfLines(u8 *pTEXT);
|
||
extern u32 GetLenght(u8 *pTEXT);
|
||
|
||
void OGL_DI::DrawTextCentered(unsigned char *pTEXT,u32 Color)
|
||
{
|
||
u32 ulNumberOfLine;
|
||
s32 Y,X,L;
|
||
u32 TX,TY;
|
||
TX = abs(CurrentRect.right - CurrentRect.left);
|
||
TY = abs(CurrentRect.top - CurrentRect.bottom);
|
||
|
||
ulNumberOfLine = GetNumberOfLines((u8*)pTEXT);
|
||
Y = (TY>>1) + (ulNumberOfLine * 16)/2 - 16;
|
||
while (ulNumberOfLine--)
|
||
{
|
||
L = GetLenght((u8*)pTEXT);
|
||
X = (TX >> 1) - 4 * L ;
|
||
if (L & 1) X -= 4;
|
||
DrawText((u8*)pTEXT,X, Y, 1.0f, 1.0f, Color);
|
||
Y-=16;
|
||
pTEXT+=L + 1;
|
||
}
|
||
}
|
||
|
||
void OGL_DI::RenderText(unsigned char *Txt,float X, float Y, float FX, float FY , u32 ColorRGBA, MAP *fontMap, int TextureIdx, SIZE *CharPos, SIZE *CharBounds, u32 optionMask)
|
||
{
|
||
if (fontMap == NULL)
|
||
{
|
||
DrawText(Txt,X, Y, FX, FY , ColorRGBA);
|
||
return;
|
||
}
|
||
u32 CurrentIndex = 0;
|
||
u32 SaveCurrentColor = CurrentColor;
|
||
s32 Bounds[MAX_MultipleQuads] ;
|
||
float BoundsUV[MAX_MultipleQuads] ;
|
||
|
||
MotherClass->PickReportCurrent.PickFrozed ++;
|
||
|
||
|
||
|
||
RS Nullmlml;
|
||
GLOB_SetDefaultRS(&Nullmlml);
|
||
Nullmlml.NOZTEST = 1;
|
||
if (optionMask & 1<<5)
|
||
Nullmlml.BlendingMode = 1;
|
||
else
|
||
{
|
||
Nullmlml.BlendingMode = 0;
|
||
Nullmlml.AlphaThreshold = 128;
|
||
}
|
||
|
||
|
||
float SaveXBase;
|
||
int lineHeight = 0;
|
||
SaveXBase = X;
|
||
while (*Txt)
|
||
{
|
||
float u0,v0,u1,v1;
|
||
if (*Txt == '\n')
|
||
{
|
||
if (lineHeight == 0)
|
||
for (int asc=0; asc<256; asc++)
|
||
if (lineHeight < CharBounds[asc].cy) lineHeight = CharBounds[asc].cy;
|
||
|
||
X = SaveXBase;
|
||
Y += lineHeight*FY;
|
||
}
|
||
else
|
||
{
|
||
u0 = (float)CharPos[*Txt].cx / (float)(fontMap->SX - 1);
|
||
v0 = (float)(fontMap->SY - CharBounds[*Txt].cy - CharPos[*Txt].cy - 1)/ (float)(fontMap->SY - 1);
|
||
u1 = (float)CharBounds[*Txt].cx / (float)(fontMap->SX - 1);
|
||
v1 = (float)CharBounds[*Txt].cy / (float)(fontMap->SY - 1);
|
||
|
||
Bounds[CurrentIndex++] = X-1;
|
||
Bounds[CurrentIndex++] = X-1 + CharBounds[*Txt].cx*FX ;
|
||
Bounds[CurrentIndex++] = FB_SY - Y - 1;
|
||
Bounds[CurrentIndex++] = FB_SY - Y - 1-CharBounds[*Txt].cy*FY;
|
||
CurrentIndex -= 4;
|
||
BoundsUV[CurrentIndex++] = u0;
|
||
BoundsUV[CurrentIndex++] = v0;
|
||
BoundsUV[CurrentIndex++] = u1;
|
||
BoundsUV[CurrentIndex++] = v1;
|
||
X +=CharBounds[*Txt].cx*FX;//+1;
|
||
}
|
||
Txt++;
|
||
|
||
if ((CurrentIndex == MAX_MultipleQuads) || ((*Txt == 0) && CurrentIndex))
|
||
{
|
||
if (optionMask & 1<<4)
|
||
{
|
||
CurrentColor = 0xff010101;
|
||
DrawMultipleQuads(-1,CurrentIndex>>2,Bounds,BoundsUV,&Nullmlml);
|
||
}
|
||
CurrentColor = ColorRGBA|0xff010101;
|
||
DrawMultipleQuads(TextureIdx,CurrentIndex>>2,Bounds,BoundsUV,&Nullmlml);
|
||
CurrentIndex = 0;
|
||
}
|
||
|
||
}
|
||
CurrentColor = SaveCurrentColor;
|
||
|
||
MotherClass->PickReportCurrent.PickFrozed --;
|
||
//*/
|
||
}
|
||
|
||
void OGL_DI::GetTextSize(unsigned char *Txt,s32 *DX,s32 *DY, SIZE *CharBounds)
|
||
{
|
||
s32 MaxW = 0;
|
||
*DX = 0;
|
||
*DY = 0;
|
||
if (CharBounds)
|
||
{
|
||
// Font Text
|
||
int lineHeight = 0;
|
||
for (int asc=0; asc<256; asc++) if (lineHeight < CharBounds[asc].cy) lineHeight = CharBounds[asc].cy;
|
||
*DY = lineHeight;
|
||
while (*Txt)
|
||
{
|
||
MaxW += CharBounds[*Txt].cx;
|
||
if (*Txt == '\n')
|
||
{
|
||
*DY += lineHeight;
|
||
MaxW = 0;
|
||
}
|
||
if (MaxW > *DX) *DX = MaxW;
|
||
Txt ++;
|
||
}
|
||
} else
|
||
{
|
||
// Standard rendering
|
||
*DY = 16;
|
||
while (*Txt)
|
||
{
|
||
MaxW += 8;
|
||
if (*Txt == '\n')
|
||
{
|
||
*DY += 16;
|
||
MaxW = 0;
|
||
}
|
||
if (MaxW > *DX) *DX = MaxW;
|
||
Txt ++;
|
||
}
|
||
}
|
||
}
|