27 #ifndef ICB_INCLUDED_TEXT_SPRITES_H 28 #define ICB_INCLUDED_TEXT_SPRITES_H 30 #include "engines/icb/p4_generic.h" 31 #include "engines/icb/common/px_bitmap.h" 32 #include "engines/icb/common/px_game_object.h" 33 #include "engines/icb/debug.h" 38 #define TEXT_SPRITE_SIZE (300 * 150 * 4) 40 #define TS_NON_SPOKEN_LINE '&' 41 #define TS_SPOKEN_LINE '*' 42 #define TS_LINENO_OPEN '{' 43 #define TS_LINENO_CLOSE '}' 47 extern _rgb *psTempSpeechColour;
71 PIN_AT_CENTRE_OF_BASE,
72 PIN_AT_CENTRE_OF_LEFT,
73 PIN_AT_CENTRE_OF_RIGHT,
81 #define MAX_LINES 48 // max character lines in output sprite 92 uint8 m_bLeftFormatted;
100 const char *fontResource;
101 uint32 fontResource_hash;
113 uint8 sprite[TEXT_SPRITE_SIZE];
122 _TSrtn BuildTextSprite(int32 stopAtLine = -1, bool8 bRemoraLeftFormatting = FALSE8);
123 uint32 CharWidth(
const uint8 ch,
const char *fontRes, uint32 fontRes_hash);
124 void CopyChar(
_pxSprite *charPtr, uint8 *spritePtr, uint8 *pal);
125 _TSrtn CheckFontResource(
const char *fontRes, uint32 fontRes_hash);
126 _pxBitmap *LoadFont(
const char *fontRes, uint32 fontRes_hash);
137 _TSrtn AnalyseSentence(
void);
141 _TSrtn MakeTextSprite(bool8 analysisAlreadyDone = FALSE8, int32 stopAtLine = -1, bool8 bRemoraLeftFormatting = FALSE8);
144 _TSrtn GetRenderCoords(
const int32 pinX,
146 const _pin_position pinPos,
149 uint32 CharHeight(
const char *fontRes, uint32 fontRes_hash);
153 uint8 *GetSprite(
void) {
156 uint32 GetWidth(
void) {
159 uint32 GetHeight(
void) {
162 uint32 GetSize(
void) {
171 void SetSurface(uint32 sid) { surfaceId = sid; }
172 uint32 GetSurface()
const {
return surfaceId; }
180 #endif // INCLUDED_TEXT_SPRITES_H Definition: px_common.h:109
Definition: px_bitmap_pc.h:44
Definition: px_bitmap_pc.h:51
Definition: text_sprites.h:83
Definition: text_sprites.h:98
Definition: text_sprites.h:111
Definition: text_sprites.h:88