mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 19:51:49 +00:00
CGE: Remove useless function
This commit is contained in:
parent
f3884d1a98
commit
b94b4e631b
@ -192,61 +192,6 @@ Bitmap *Talk::box(uint16 w, uint16 h) {
|
||||
return new Bitmap(_vm, w, h, b);
|
||||
}
|
||||
|
||||
void Talk::putLine(int line, const char *text) {
|
||||
// Note: (_ts[0]._w % 4) must be 0
|
||||
uint16 w = _ts[0]->_w;
|
||||
uint16 h = _ts[0]->_h;
|
||||
uint8 *v = _ts[0]->_v;
|
||||
uint16 dsiz = w >> 2; // data size (1 plane line size)
|
||||
uint16 lsiz = 2 + dsiz + 2; // uint16 for line header, uint16 for gap
|
||||
uint16 psiz = h * lsiz; // - last gap, but + plane trailer
|
||||
uint16 size = 4 * psiz; // whole map size
|
||||
uint16 rsiz = kFontHigh * lsiz; // length of whole text row map
|
||||
|
||||
// set desired line pointer
|
||||
v += (kTextVMargin + (kFontHigh + kTextLineSpace) * line) * lsiz;
|
||||
uint8 *p = v; // assume blanked line above text
|
||||
|
||||
// clear whole rectangle
|
||||
assert((rsiz % lsiz) == 0);
|
||||
for (int planeCtr = 0; planeCtr < 4; planeCtr++, p += psiz) {
|
||||
for (byte *pDest = p; pDest < (p + (rsiz - lsiz)); pDest += lsiz)
|
||||
Common::copy(p - lsiz, p, pDest);
|
||||
}
|
||||
|
||||
// paint text line
|
||||
if (!text)
|
||||
return;
|
||||
p = v + 2 + (kTextHMargin / 4) + (kTextHMargin % 4) * psiz;
|
||||
uint8 *q = v + size;
|
||||
|
||||
while (*text) {
|
||||
uint16 cw = _vm->_font->_widthArr[(unsigned char)*text];
|
||||
uint8 *fp = _vm->_font->_map + _vm->_font->_pos[(unsigned char)*text];
|
||||
|
||||
// Handle properly space size, after it was enlarged to display properly
|
||||
// 'F1' text.
|
||||
int8 fontStart = 0;
|
||||
if ((*text == 0x20) && (cw > 4) && (!_wideSpace))
|
||||
fontStart = 2;
|
||||
|
||||
for (int i = fontStart; i < cw; i++) {
|
||||
uint16 b = fp[i];
|
||||
uint16 n;
|
||||
for (n = 0; n < kFontHigh; n++) {
|
||||
if (b & 1)
|
||||
*p = kTextColFG;
|
||||
b >>= 1;
|
||||
p += lsiz;
|
||||
}
|
||||
p = p - rsiz + psiz;
|
||||
if (p >= q)
|
||||
p = p - size + 1;
|
||||
}
|
||||
text++;
|
||||
}
|
||||
}
|
||||
|
||||
InfoLine::InfoLine(CGEEngine *vm, uint16 w) : Talk(vm), _oldText(NULL), _vm(vm) {
|
||||
if (!_ts) {
|
||||
_ts = new BitmapPtr[2];
|
||||
|
@ -58,7 +58,6 @@ public:
|
||||
Talk(CGEEngine *vm);
|
||||
|
||||
virtual void update(const char *text);
|
||||
void putLine(int line, const char *text);
|
||||
private:
|
||||
CGEEngine *_vm;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user