World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл GUIFont.cpp

См. исходные тексты.

Классы

struct  GUICharMetric
 
struct  FontData
 

Функции

void DrawCharToBuff (uint32_t *draw_buff, uint8_t *pCharPixels, int uCharWidth, int uCharHeight, uint8_t *pFontPalette, uint16_t draw_color, int line_width)
 

Переменные

LODFile_IconsBitmapspIcons_LOD
 
GUIFontpAutonoteFont = nullptr
 
GUIFontpSpellFont = nullptr
 
GUIFontpFontArrus = nullptr
 
GUIFontpFontLucida = nullptr
 
GUIFontpBook2Font = nullptr
 
GUIFontpBookFont = nullptr
 
GUIFontpFontCreate = nullptr
 
GUIFontpFontCChar = nullptr
 
GUIFontpFontComic = nullptr
 
GUIFontpFontSmallnum = nullptr
 
char temp_string [2048]
 
std::array< char, 10000 > pTmpBuf3
 

Функции

◆ DrawCharToBuff()

void DrawCharToBuff ( uint32_t draw_buff,
uint8_t pCharPixels,
int  uCharWidth,
int  uCharHeight,
uint8_t pFontPalette,
uint16_t  draw_color,
int  line_width 
)

См. определение в файле GUIFont.cpp строка 138

139  {
140  uint8_t *pPixels = pCharPixels;
141  for (int y = 0; y < uCharHeight; ++y) {
142  for (int x = 0; x < uCharWidth; ++x) {
143  uint8_t char_pxl = *pPixels++;
144  if (char_pxl) {
145  if (char_pxl == 1) {
146  uint8_t r = pFontPalette[3];
147  uint8_t g = pFontPalette[4];
148  uint8_t b = pFontPalette[5];
149  *draw_buff = Color32(r, g, b);
150  } else {
151  *draw_buff = Color32(draw_color);
152  }
153  }
154  ++draw_buff;
155  }
156  draw_buff += line_width - uCharWidth;
157  }
158 }

Перекрестные ссылки Color32().

Используется в GUIFont::DrawTextLineToBuff().

+ Граф вызовов:
+ Граф вызова функции:

Переменные

◆ pIcons_LOD

◆ pAutonoteFont

GUIFont* pAutonoteFont = nullptr

◆ pSpellFont

GUIFont* pSpellFont = nullptr

См. определение в файле GUIFont.cpp строка 17

Используется в GUIWindow_Book::InitializeFonts(), GUIWindow_Book::Release() и GUIWindow_LloydsBook::Update().

◆ pFontArrus

◆ pFontLucida

◆ pBook2Font

◆ pBookFont

GUIFont* pBookFont = nullptr

См. определение в файле GUIFont.cpp строка 21

Используется в GUIWindow_Book::InitializeFonts(), GUIWindow_Book::Release() и GUIWindow_CalendarBook::Update().

◆ pFontCreate

◆ pFontCChar

GUIFont* pFontCChar = nullptr

См. определение в файле GUIFont.cpp строка 23

◆ pFontComic

◆ pFontSmallnum

◆ temp_string

char temp_string[2048]

См. определение в файле GUIFont.cpp строка 27

Используется в GUIFont::FitTextInAWindow().

◆ pTmpBuf3

std::array<char, 10000> pTmpBuf3

См. определение в файле GUIFont.cpp строка 29

Используется в GUIFont::FitTwoFontStringINWindow().

Color32
uint32_t Color32(uint16_t color16)
Definition: Engine.cpp:135
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
uint8_t
unsigned __int8 uint8_t
Definition: SDL_config.h:35
b
GLboolean GLboolean GLboolean b
Definition: SDL_opengl_glext.h:1112
r
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2079
g
GLboolean GLboolean g
Definition: SDL_opengl_glext.h:1112