o Implemented pDrawLetter
o F5 now can be used to open menu o Minor cleanup svn-id: r17414
This commit is contained in:
parent
224b2afbf1
commit
a1769f0eae
4 changed files with 32 additions and 17 deletions
|
@ -65,7 +65,31 @@ void VGAVideoDriver::putPixel(int16 x, int16 y, byte color, SurfaceDesc *dest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void VGAVideoDriver::drawLetter(char item, int16 x, int16 y, FontDesc *fontDesc, byte color1, byte color2, byte transp, SurfaceDesc *dest) {
|
void VGAVideoDriver::drawLetter(char item, int16 x, int16 y, FontDesc *fontDesc, byte color1, byte color2, byte transp, SurfaceDesc *dest) {
|
||||||
STUB_FUNC;
|
byte *src, *dst;
|
||||||
|
uint16 data;
|
||||||
|
int i, j;
|
||||||
|
|
||||||
|
src = (byte *)fontDesc->dataPtr + (item - fontDesc->startItem) * (fontDesc->itemSize & 0xff);
|
||||||
|
dst = dest->vidPtr + x + dest->width * y;
|
||||||
|
|
||||||
|
for (i = 0; i < fontDesc->itemHeight; i++) {
|
||||||
|
data = READ_BE_UINT16(src);
|
||||||
|
src += 2;
|
||||||
|
if (fontDesc->itemSize <= 8)
|
||||||
|
src--;
|
||||||
|
|
||||||
|
for (j = 0; j < fontDesc->itemWidth; j++) {
|
||||||
|
if (data & 0x8000) {
|
||||||
|
*dst = color2;
|
||||||
|
} else {
|
||||||
|
if (color1 == 0)
|
||||||
|
*dst = transp;
|
||||||
|
}
|
||||||
|
dst++;
|
||||||
|
data <<= 1;
|
||||||
|
}
|
||||||
|
dst += dest->width - fontDesc->itemWidth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void VGAVideoDriver::drawLine(SurfaceDesc *dest, int16 x0, int16 y0, int16 x1, int16 y1, byte color) {
|
void VGAVideoDriver::drawLine(SurfaceDesc *dest, int16 x0, int16 y0, int16 x1, int16 y1, byte color) {
|
||||||
|
|
|
@ -840,7 +840,6 @@ int16 game_inputArea(int16 xPos, int16 yPos, int16 width, int16 height, int16 ba
|
||||||
case 0x3c00: // F2
|
case 0x3c00: // F2
|
||||||
case 0x3d00: // F3
|
case 0x3d00: // F3
|
||||||
case 0x3e00: // F4
|
case 0x3e00: // F4
|
||||||
case 0x3f00: // F5
|
|
||||||
case 0x4000: // F6
|
case 0x4000: // F6
|
||||||
case 0x4100: // F7
|
case 0x4100: // F7
|
||||||
case 0x4200: // F8
|
case 0x4200: // F8
|
||||||
|
@ -1693,6 +1692,7 @@ void game_loadImFile(void) {
|
||||||
char path[20];
|
char path[20];
|
||||||
int16 handle;
|
int16 handle;
|
||||||
|
|
||||||
|
// If demo
|
||||||
if (game_totFileData[0x3d] != 0 && game_totFileData[0x3b] == 0)
|
if (game_totFileData[0x3d] != 0 && game_totFileData[0x3b] == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ void inter_printText(void) {
|
||||||
char buf[60];
|
char buf[60];
|
||||||
int16 i;
|
int16 i;
|
||||||
|
|
||||||
debug(0, "inter_printText");
|
debug(3, "inter_printText");
|
||||||
draw_destSpriteX = parse_parseValExpr();
|
draw_destSpriteX = parse_parseValExpr();
|
||||||
draw_destSpriteY = parse_parseValExpr();
|
draw_destSpriteY = parse_parseValExpr();
|
||||||
|
|
||||||
|
@ -811,9 +811,9 @@ void inter_loadCursor(void) {
|
||||||
debug(0, "inter_loadCursor");
|
debug(0, "inter_loadCursor");
|
||||||
id = inter_load16();
|
id = inter_load16();
|
||||||
index = *inter_execPtr++;
|
index = *inter_execPtr++;
|
||||||
|
|
||||||
itemPtr = &game_totResourceTable->items[id];
|
itemPtr = &game_totResourceTable->items[id];
|
||||||
offset = itemPtr->offset;
|
offset = itemPtr->offset;
|
||||||
|
|
||||||
if (offset >= 0) {
|
if (offset >= 0) {
|
||||||
dataBuf =
|
dataBuf =
|
||||||
((char *)game_totResourceTable) + szGame_TotResTable +
|
((char *)game_totResourceTable) + szGame_TotResTable +
|
||||||
|
@ -895,7 +895,6 @@ void inter_storeKey(int16 key) {
|
||||||
else if ((key & 0xff) != 0)
|
else if ((key & 0xff) != 0)
|
||||||
key &= 0xff;
|
key &= 0xff;
|
||||||
|
|
||||||
debug(0, "key: %d", key);
|
|
||||||
WRITE_LE_UINT32(inter_variables, key);
|
WRITE_LE_UINT32(inter_variables, key);
|
||||||
|
|
||||||
if (key != 0)
|
if (key != 0)
|
||||||
|
|
16
gob/util.cpp
16
gob/util.cpp
|
@ -47,9 +47,9 @@ int16 util_translateKey(int16 key) {
|
||||||
int16 from;
|
int16 from;
|
||||||
int16 to;
|
int16 to;
|
||||||
} keys[] = {
|
} keys[] = {
|
||||||
{8, 0xe08 }, // Backspace
|
{8, 0x0e08}, // Backspace
|
||||||
{13, 0x1C0D }, // Enter
|
{13, 0x1C0D}, // Enter
|
||||||
{27, 0x11b }, // ESC
|
{27, 0x011b}, // ESC
|
||||||
{127, 0x5300}, // Del
|
{127, 0x5300}, // Del
|
||||||
{273, 0x4800}, // Up arrow
|
{273, 0x4800}, // Up arrow
|
||||||
{274, 0x5000}, // Down arrow
|
{274, 0x5000}, // Down arrow
|
||||||
|
@ -59,7 +59,7 @@ int16 util_translateKey(int16 key) {
|
||||||
{283, 0x3c00}, // F2
|
{283, 0x3c00}, // F2
|
||||||
{284, 0x3d00}, // F3
|
{284, 0x3d00}, // F3
|
||||||
{285, 0x3E00}, // F4
|
{285, 0x3E00}, // F4
|
||||||
{286, 0x3F00}, // F5
|
{286, 0x011b}, // F5
|
||||||
{287, 0x4000}, // F6
|
{287, 0x4000}, // F6
|
||||||
{288, 0x4100}, // F7
|
{288, 0x4100}, // F7
|
||||||
{289, 0x4200}, // F8
|
{289, 0x4200}, // F8
|
||||||
|
@ -136,19 +136,11 @@ void util_processInput() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void util_getMouseState(int16 *pX, int16 *pY, int16 *pButtons) {
|
void util_getMouseState(int16 *pX, int16 *pY, int16 *pButtons) {
|
||||||
// int16 x = 0;
|
|
||||||
// int16 y = 0;
|
|
||||||
// int16 buttons = 0;
|
|
||||||
|
|
||||||
*pX = _mouseX;
|
*pX = _mouseX;
|
||||||
*pY = _mouseY;
|
*pY = _mouseY;
|
||||||
|
|
||||||
if (pButtons != 0)
|
if (pButtons != 0)
|
||||||
*pButtons = _mouseButtons;
|
*pButtons = _mouseButtons;
|
||||||
// if (pX != 0)
|
|
||||||
// *pX = x >> mouseXShift;
|
|
||||||
// if (pY != 0)
|
|
||||||
// *pY = y >> mouseYShift;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void util_setMousePos(int16 x, int16 y) {
|
void util_setMousePos(int16 x, int16 y) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue