CHAMBER: Renames in dialog.cpp

This commit is contained in:
Eugene Sandulenko committed 2023-02-19 23:51:30 +01:00
1 parent d0eb47fe78
commit 7672a5632e
9 files changed
+109 -109

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ namespace Chamber {
#define TODO(s) \
{ \
printf(s); \
PromptWait(); \
promptWait(); \
for(;;) ; \
}
+20 -20
View File
@@ -39,7 +39,7 @@ uint16 cur_dlg_index;
dirty_rect_t dirty_rects[MAX_DIRTY_RECT];
dirty_rect_t *last_dirty_rect = dirty_rects;
void AddDirtyRect(byte kind, byte x, byte y, byte w, byte h, uint16 offs) {
void addDirtyRect(byte kind, byte x, byte y, byte w, byte h, uint16 offs) {
int16 i;
dirty_rect_t *r = dirty_rects;
for (i = 0; i < MAX_DIRTY_RECT; i++, r++) /*TODO: may go oob*/
@@ -55,7 +55,7 @@ void AddDirtyRect(byte kind, byte x, byte y, byte w, byte h, uint16 offs) {
last_dirty_rect = r;
}
void GetDirtyRect(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs, byte newkind) {
void getDirtyRect(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs, byte newkind) {
*kind = dirty_rects[index].kind;
*offs = dirty_rects[index].offs;
*w = dirty_rects[index].width;
@@ -67,19 +67,19 @@ void GetDirtyRect(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, u
script_byte_vars.dirty_rect_kind = dirty_rects[0].kind;
}
void GetDirtyRectAndFree(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs) {
GetDirtyRect(index - 1, kind, x, y, w, h, offs, DirtyRectFree);
void getDirtyRectAndFree(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs) {
getDirtyRect(index - 1, kind, x, y, w, h, offs, DirtyRectFree);
}
void GetDirtyRectAndSetSprite(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs) {
GetDirtyRect(index - 1, kind, x, y, w, h, offs, DirtyRectSprite);
void getDirtyRectAndSetSprite(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs) {
getDirtyRect(index - 1, kind, x, y, w, h, offs, DirtyRectSprite);
}
int16 FindDirtyRectAndFree(byte kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs) {
int16 findDirtyRectAndFree(byte kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs) {
int16 i;
for (i = 0; i < MAX_DIRTY_RECT; i++) {
if (dirty_rects[i].kind == kind) {
GetDirtyRect(i, &kind, x, y, w, h, offs, DirtyRectFree);
getDirtyRect(i, &kind, x, y, w, h, offs, DirtyRectFree);
return 1;
}
}
@@ -87,11 +87,11 @@ int16 FindDirtyRectAndFree(byte kind, byte *x, byte *y, byte *w, byte *h, uint16
}
/*Restore screen data from back buffer as specified by dirty rects of kind*/
void PopDirtyRects(byte kind) {
void popDirtyRects(byte kind) {
byte x, y;
byte width, height;
uint16 offs;
while (FindDirtyRectAndFree(kind, &x, &y, &width, &height, &offs)) {
while (findDirtyRectAndFree(kind, &x, &y, &width, &height, &offs)) {
cga_CopyScreenBlock(backbuffer, width, height, frontbuffer, offs);
if (kind == DirtyRectBubble) {
/*pop bubble's spike*/
@@ -100,16 +100,16 @@ void PopDirtyRects(byte kind) {
}
}
void DesciTextBox(uint16 x, uint16 y, uint16 width, byte *msg) {
void desciTextBox(uint16 x, uint16 y, uint16 width, byte *msg) {
draw_x = x;
draw_y = y;
char_draw_max_width = width;
cga_DrawTextBox(msg, frontbuffer);
AddDirtyRect(DirtyRectText, draw_x, draw_y, char_draw_max_width + 2, char_draw_coords_y - draw_y + 8, cga_CalcXY_p(draw_x, draw_y));
addDirtyRect(DirtyRectText, draw_x, draw_y, char_draw_max_width + 2, char_draw_coords_y - draw_y + 8, cga_CalcXY_p(draw_x, draw_y));
}
/*Draw dialog bubble with text and spike*/
void DrawPersonBubble(byte x, byte y, byte flags, byte *msg) {
void drawPersonBubble(byte x, byte y, byte flags, byte *msg) {
uint16 ofs;
byte w, h;
uint16 ww, nw;
@@ -176,10 +176,10 @@ void DrawPersonBubble(byte x, byte y, byte flags, byte *msg) {
break;
}
AddDirtyRect(DirtyRectBubble, ofs >> 8, ofs & 255, w, h, cga_CalcXY_p(x, y));
addDirtyRect(DirtyRectBubble, ofs >> 8, ofs & 255, w, h, cga_CalcXY_p(x, y));
}
void ShowPromptAnim(void) {
void showPromptAnim(void) {
if (script_byte_vars.zone_index == 135)
return;
waitVBlank();
@@ -187,14 +187,14 @@ void ShowPromptAnim(void) {
cursor_anim_phase = ~cursor_anim_phase;
}
void PromptWait(void) {
void promptWait(void) {
cursor_anim_phase = 0;
do {
byte ticks = script_byte_vars.timer_ticks;
if ((ticks % 8) == 0 && ticks != cursor_anim_ticks) {
cursor_anim_ticks = ticks;
ShowPromptAnim();
showPromptAnim();
}
PollInputButtonsOnly();
@@ -206,13 +206,13 @@ void PromptWait(void) {
} while (!buttons);
if (cursor_anim_phase)
ShowPromptAnim();
showPromptAnim();
}
/*
Get string with index num from strings bank
*/
byte *SeekToString(byte *bank, uint16 num) {
byte *seekToString(byte *bank, uint16 num) {
byte len;
byte *p = bank;
@@ -231,7 +231,7 @@ byte *SeekToString(byte *bank, uint16 num) {
/*
Get string with index num from strings bank, with large string index support for scripts
*/
byte *SeekToStringScr(byte *bank, uint16 num, byte **ptr) {
byte *seekToStringScr(byte *bank, uint16 num, byte **ptr) {
byte len;
byte *p = bank;
+9 -9
View File
@@ -57,18 +57,18 @@ extern dirty_rect_t *last_dirty_rect;
#define SPIKE_BUBRIGHT 0xC0
#define SPIKE_BUBLEFT 0xE0
void AddDirtyRect(byte kind, byte x, byte y, byte w, byte h, uint16 offs);
void GetDirtyRectAndFree(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs);
void GetDirtyRectAndSetSprite(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs);
void addDirtyRect(byte kind, byte x, byte y, byte w, byte h, uint16 offs);
void getDirtyRectAndFree(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs);
void getDirtyRectAndSetSprite(int16 index, byte *kind, byte *x, byte *y, byte *w, byte *h, uint16 *offs);
void PopDirtyRects(byte kind);
void DrawPersonBubble(byte x, byte y, byte flags, byte *msg);
void DesciTextBox(uint16 x, uint16 y, uint16 width, byte *msg);
void popDirtyRects(byte kind);
void drawPersonBubble(byte x, byte y, byte flags, byte *msg);
void desciTextBox(uint16 x, uint16 y, uint16 width, byte *msg);
void PromptWait(void);
void promptWait(void);
byte *SeekToString(byte *bank, uint16 num);
byte *SeekToStringScr(byte *bank, uint16 num, byte **ptr);
byte *seekToString(byte *bank, uint16 num);
byte *seekToStringScr(byte *bank, uint16 num, byte **ptr);
} // End of namespace Chamber
+1 -1
View File
@@ -149,7 +149,7 @@ int16 AskQuitGame(void) {
int16 quit = -1;
byte *msg = SeekToString(desci_data, 411); /*DO YOU WANT TO QUIT ? (Y OR N).*/
byte *msg = seekToString(desci_data, 411); /*DO YOU WANT TO QUIT ? (Y OR N).*/
char_draw_max_width = 32;
draw_x = 1;
draw_y = 188;
+2 -2
View File
@@ -54,7 +54,7 @@ uint16 cpu_speed_delay;
Prompt user to insert disk #2 to any drive
*/
void AskDisk2(void) {
DrawMessage(SeekToString(vepci_data, 179), frontbuffer);
DrawMessage(seekToString(vepci_data, 179), frontbuffer);
}
void SaveToFile(char *filename, void *data, uint16 size) {
@@ -94,7 +94,7 @@ void Randomize(void) {
}
void TRAP() {
PromptWait();
promptWait();
for (;;) ;
}
+2 -2
View File
@@ -277,7 +277,7 @@ int16 DrawPortrait(byte **desc, byte *x, byte *y, byte *width, byte *height) {
cur_image_size_w = *image++;
cur_image_pixels = image;
cur_image_offs = cga_CalcXY_p(cur_image_coords_x, cur_image_coords_y);
AddDirtyRect(DirtyRectSprite, cur_image_coords_x, cur_image_coords_y, cur_image_size_w, cur_image_size_h, cur_image_offs);
addDirtyRect(DirtyRectSprite, cur_image_coords_x, cur_image_coords_y, cur_image_size_w, cur_image_size_h, cur_image_offs);
/*TODO: remove and use only globals?*/
*x = cur_image_coords_x;
@@ -356,7 +356,7 @@ void AnimPortrait(byte layer, byte index, byte delay) {
ani++;
LoadPortrait(&ani, ani + 3);
}
GetDirtyRectAndSetSprite(layer, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndSetSprite(layer, &kind, &x, &y, &width, &height, &offs);
waitVBlank();
cga_BlitAndWait(cur_image_pixels, width, width, height, CGA_SCREENBUFFER, offs);
waitVBlankTimer();
+1 -1
View File
@@ -260,7 +260,7 @@ void DrawMessage(byte *msg, byte *target) {
cga_BackupImageReal(cga_CalcXY_p(x, y), char_draw_max_width + 2, char_draw_max_height); /*backup orig. screen data*/
cga_DrawTextBox(msg, target); /*draw box with text*/
PromptWait(); /*wait keypress*/
promptWait(); /*wait keypress*/
cga_RestoreBackupImage(target); /*restore screen data*/
}
+6 -6
View File
@@ -602,7 +602,7 @@ void AnimateSpot(const animdesc_t *info) {
cursor_x = found_spot->sx * 4;
cursor_y = found_spot->sy;
if (info->params.desc)
DrawMessage(SeekToString(desci_data, info->params.desc), frontbuffer);
DrawMessage(seekToString(desci_data, info->params.desc), frontbuffer);
playAnim(info->index & ~ANIMFLG_USESPOT, found_spot->sx, found_spot->sy);
} else {
@@ -918,9 +918,9 @@ void DrawZoneSpots(void) {
}
void RefreshZone(void) {
PopDirtyRects(DirtyRectSprite);
PopDirtyRects(DirtyRectBubble);
PopDirtyRects(DirtyRectText);
popDirtyRects(DirtyRectSprite);
popDirtyRects(DirtyRectBubble);
popDirtyRects(DirtyRectText);
if (!skip_zone_transition && !right_button)
DrawBackground(CGA_SCREENBUFFER, 1);
@@ -953,7 +953,7 @@ void DrawObjectHint(void) {
char_draw_coords_x = room_hint_bar_coords_x;
char_draw_coords_y = room_hint_bar_coords_y;
char_xlat_table = chars_color_wonb;
PrintStringCentered(SeekToString(motsi_data, object_hint), backbuffer);
PrintStringCentered(seekToString(motsi_data, object_hint), backbuffer);
#ifdef DEBUG_ZONE
cga_PrintChar(0x20, backbuffer);
@@ -980,7 +980,7 @@ void DrawCommandHint(void) {
char_draw_coords_x = cmd_hint_bar_coords_x;
char_draw_coords_y = cmd_hint_bar_coords_y;
char_xlat_table = chars_color_wonb;
PrintStringCentered(SeekToString(vepci_data, command_hint), backbuffer);
PrintStringCentered(seekToString(vepci_data, command_hint), backbuffer);
}
/*
+67 -67
View File
@@ -108,14 +108,14 @@ enum CommandStatus {
uint16 CMD_TRAP(void) {
printf("CMD TRAP\n");
PromptWait();
promptWait();
for (;;) ;
return 0;
}
uint16 SCR_TRAP(void) {
printf("SCR TRAP 0x%02X @ 0x%lX\n", *script_ptr, script_ptr - templ_data);
PromptWait();
promptWait();
for (;;) ;
return 0;
}
@@ -404,9 +404,9 @@ uint16 SCR_2D_Wait(void) {
/*
Show blinking prompt indicator and wait for a keypress
*/
uint16 SCR_2E_PromptWait(void) {
uint16 SCR_2E_promptWait(void) {
script_ptr++;
PromptWait();
promptWait();
return 0;
}
@@ -472,7 +472,7 @@ uint16 LoadVar(byte **ptr, byte **varptr) {
}
if (varoffs >= maxoffs) {
printf("Scr var out of bounds @ %X (pool %d, ofs 0x%X, max 0x%X)\n", (uint16)(script_ptr - templ_data), vartype & VARTYPE_KIND, varoffs, maxoffs);
PromptWait();
promptWait();
}
}
#endif
@@ -944,7 +944,7 @@ uint16 SCR_10_DrawPortraitZoomed(void) {
#if 0
/*TODO: debug wait*/
PromptWait();
promptWait();
#endif
return 0;
@@ -963,7 +963,7 @@ uint16 SCR_19_HidePortraitLiftLeft(void) {
script_ptr++;
index = *script_ptr++;
GetDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
if (right_button) {
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs);
return 0;
@@ -1009,7 +1009,7 @@ uint16 SCR_1A_HidePortraitLiftRight(void) {
script_ptr++;
index = *script_ptr++;
GetDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
if (right_button) {
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs);
return 0;
@@ -1054,7 +1054,7 @@ uint16 SCR_1B_HidePortraitLiftUp(void) {
script_ptr++;
index = *script_ptr++;
GetDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
if (right_button) {
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs);
return 0;
@@ -1090,7 +1090,7 @@ uint16 SCR_1C_HidePortraitLiftDown(void) {
script_ptr++;
index = *script_ptr++;
GetDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
if (right_button) {
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs);
return 0;
@@ -1126,7 +1126,7 @@ uint16 SCR_1E_HidePortraitTwist(void) {
script_ptr++;
index = *script_ptr++;
GetDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
if (right_button) {
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs);
return 0;
@@ -1150,7 +1150,7 @@ uint16 SCR_1F_HidePortraitArc(void) {
script_ptr++;
index = *script_ptr++;
GetDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
if (right_button) {
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs);
return 0;
@@ -1174,7 +1174,7 @@ uint16 SCR_20_HidePortraitDots(void) {
script_ptr++;
index = *script_ptr++;
GetDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
if (right_button) {
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs);
return 0;
@@ -1586,9 +1586,9 @@ uint16 SCR_3_DrawItemBox(void) {
x = dirty_rects[0].x;
y = dirty_rects[0].y + 70;
msg = SeekToString(desci_data, 274 + item->name);
msg = seekToString(desci_data, 274 + item->name);
DesciTextBox(x, y, 18, msg);
desciTextBox(x, y, 18, msg);
DrawSpriteN(item->sprite, x, y + 1, frontbuffer);
return 0;
@@ -1597,16 +1597,16 @@ uint16 SCR_3_DrawItemBox(void) {
/*
Draw simple bubble with text
*/
uint16 SCR_37_DesciTextBox(void) {
uint16 SCR_37_desciTextBox(void) {
byte x, y, w;
byte *msg;
script_ptr++;
msg = SeekToStringScr(desci_data, *script_ptr, &script_ptr);
msg = seekToStringScr(desci_data, *script_ptr, &script_ptr);
script_ptr++;
x = *script_ptr++;
y = *script_ptr++;
w = *script_ptr++;
DesciTextBox(x, y, w, msg);
desciTextBox(x, y, w, msg);
return 0;
}
@@ -1739,7 +1739,7 @@ uint16 SCR_2A_PopDialogRect(void) {
script_ptr++;
index = *script_ptr++;
GetDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs); /*TODO: implicit target*/
cga_CopyScreenBlock(backbuffer, 2, 21, CGA_SCREENBUFFER, offs = (x << 8) | y); /*TODO: implicit target*/
@@ -1753,7 +1753,7 @@ Restore screen data from back buffer as specified by dirty rect of kind dialog b
*/
uint16 SCR_2B_PopAllBubbles(void) {
script_ptr++;
PopDirtyRects(DirtyRectBubble);
popDirtyRects(DirtyRectBubble);
return 0;
}
@@ -1770,7 +1770,7 @@ uint16 SCR_22_HidePortraitShatter(void) {
script_ptr++;
index = *script_ptr++;
GetDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
if (right_button) {
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs);
return 0;
@@ -1794,7 +1794,7 @@ uint16 SCR_23_HidePortrait(void) {
script_ptr++;
index = *script_ptr++;
GetDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(index, &kind, &x, &y, &width, &height, &offs);
if (right_button) {
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs);
return 0;
@@ -1831,7 +1831,7 @@ Restore screen data from back buffer for all portraits
*/
uint16 SCR_24_PopAllPortraits(void) {
script_ptr++;
PopDirtyRects(DirtyRectSprite);
popDirtyRects(DirtyRectSprite);
return 0;
}
@@ -1840,7 +1840,7 @@ Restore screen data from back buffer for all text bubbles
*/
uint16 SCR_40_PopAllTextBoxes() {
script_ptr++;
PopDirtyRects(DirtyRectText);
popDirtyRects(DirtyRectText);
return 0;
}
@@ -1904,7 +1904,7 @@ uint16 SCR_30_Fight(void) {
BlinkToWhite();
if (pers->name != 44 && pers->name != 56 && pers->name != 51) { /*VORT, MONKEY, TURKEY*/
GetDirtyRectAndFree(1, &kind, &x, &y, &width, &height, &offs);
getDirtyRectAndFree(1, &kind, &x, &y, &width, &height, &offs);
cga_CopyScreenBlock(backbuffer, width, height, CGA_SCREENBUFFER, offs);
}
@@ -2308,7 +2308,7 @@ uint16 SCR_45_DeProfundisRoomEntry(void) {
sprofs = GetPuzzlSprite(119, 128 / 4, 94, &w, &h, &ofs);
cga_BlitScratchBackSprite(sprofs, w, h, CGA_SCREENBUFFER, ofs);
PromptWait();
promptWait();
for (; h; h--) {
waitVBlank();
@@ -3014,7 +3014,7 @@ Draw text box
uint16 SCR_14_DrawDesc(void) {
byte *msg;
script_ptr++;
msg = SeekToStringScr(desci_data, *script_ptr, &script_ptr);
msg = seekToStringScr(desci_data, *script_ptr, &script_ptr);
script_ptr++;
DrawMessage(msg, CGA_SCREENBUFFER);
@@ -3031,19 +3031,19 @@ uint16 SCR_17_DrawPersonThoughtBubbleDialog(void) {
byte x, y;
byte *msg;
script_ptr++;
msg = SeekToStringScr(diali_data, *script_ptr, &script_ptr);
msg = seekToStringScr(diali_data, *script_ptr, &script_ptr);
script_ptr++;
x = found_spot->sx;
y = found_spot->sy;
if (x < 140 / 4)
DrawPersonBubble(found_spot->ex, y - 40, SPIKE_BUBLEFT | 20, msg);
drawPersonBubble(found_spot->ex, y - 40, SPIKE_BUBLEFT | 20, msg);
else
DrawPersonBubble(x - 80 / 4, y - 40, SPIKE_BUBRIGHT | 20, msg);
drawPersonBubble(x - 80 / 4, y - 40, SPIKE_BUBRIGHT | 20, msg);
PromptWait();
PopDirtyRects(DirtyRectBubble);
promptWait();
popDirtyRects(DirtyRectBubble);
return 0;
}
@@ -3051,23 +3051,23 @@ uint16 SCR_17_DrawPersonThoughtBubbleDialog(void) {
Draw dialog bubble with text for a person, wait for a key, then hide. Auto find bubble location
Use normal spike
*/
uint16 SCR_61_DrawPersonBubbleDialog(void) {
uint16 SCR_61_drawPersonBubbleDialog(void) {
byte x, y;
byte *msg;
script_ptr++;
msg = SeekToStringScr(diali_data, *script_ptr, &script_ptr);
msg = seekToStringScr(diali_data, *script_ptr, &script_ptr);
script_ptr++;
x = found_spot->sx;
y = found_spot->sy;
if (x < 140 / 4)
DrawPersonBubble(found_spot->ex, y - 40, SPIKE_DNLEFT | 20, msg);
drawPersonBubble(found_spot->ex, y - 40, SPIKE_DNLEFT | 20, msg);
else
DrawPersonBubble(x - 80 / 4, y - 40, SPIKE_DNRIGHT | 20, msg);
drawPersonBubble(x - 80 / 4, y - 40, SPIKE_DNRIGHT | 20, msg);
PromptWait();
PopDirtyRects(DirtyRectBubble);
promptWait();
popDirtyRects(DirtyRectBubble);
return 0;
}
@@ -3118,10 +3118,10 @@ uint16 SCR_27_DrawGaussBubble(void) {
byte *msg;
script_ptr++;
msg = SeekToStringScr(diali_data, *script_ptr, &script_ptr);
msg = seekToStringScr(diali_data, *script_ptr, &script_ptr);
script_ptr++;
DrawPersonBubble(32 / 4, 20, 15, msg);
drawPersonBubble(32 / 4, 20, 15, msg);
return 0;
}
@@ -3132,7 +3132,7 @@ uint16 SCR_29_DialiTextBox(void) {
byte x, y, f;
byte *msg;
script_ptr++;
msg = SeekToStringScr(diali_data, *script_ptr, &script_ptr);
msg = seekToStringScr(diali_data, *script_ptr, &script_ptr);
cur_dlg_index = cur_str_index; /*TODO: useless?*/
script_ptr++;
@@ -3140,7 +3140,7 @@ uint16 SCR_29_DialiTextBox(void) {
y = *script_ptr++;
f = *script_ptr++;
DrawPersonBubble(x, y, f, msg);
drawPersonBubble(x, y, f, msg);
return 0;
}
@@ -3257,8 +3257,8 @@ uint16 CMD_4_EnergyLevel(void) {
byte *image = energy_image;
byte anim = 40;
PopDirtyRects(DirtyRectSprite);
PopDirtyRects(DirtyRectBubble);
popDirtyRects(DirtyRectSprite);
popDirtyRects(DirtyRectBubble);
cur_dlg_index = 0;
ifgm_flag2 = ~0;
@@ -3277,7 +3277,7 @@ uint16 CMD_4_EnergyLevel(void) {
PollInputButtonsOnly();
} while (buttons == 0);
PopDirtyRects(DirtyRectSprite);
popDirtyRects(DirtyRectSprite);
ifgm_flag2 = 0;
IFGM_StopSample();
@@ -3360,7 +3360,7 @@ uint16 CMD_8_Timer(void) {
PollInputButtonsOnly();
} while (buttons == 0);
PopDirtyRects(DirtyRectSprite);
popDirtyRects(DirtyRectSprite);
return 0;
}
@@ -3646,13 +3646,13 @@ uint16 CMD_11_PsiTuneIn(void) {
return ScriptRerun;
}
msg = SeekToString(diali_data, command);
msg = seekToString(diali_data, command);
cur_dlg_index = cur_str_index; /*TODO: useless?*/
DrawPersonBubble(32 / 4, 20, 15, msg);
drawPersonBubble(32 / 4, 20, 15, msg);
PromptWait();
PopDirtyRects(DirtyRectBubble);
promptWait();
popDirtyRects(DirtyRectBubble);
return 0;
}
@@ -3920,8 +3920,8 @@ uint16 CMD_18_AspirantLeave(void) {
/*TODO: check me*/
static const animdesc_t anim33 = {ANIMFLG_USESPOT | 33, { { 0, 0 } }};
PopDirtyRects(DirtyRectSprite);
PopDirtyRects(DirtyRectText);
popDirtyRects(DirtyRectSprite);
popDirtyRects(DirtyRectText);
aspirant_ptr->area = 0;
script_word_vars.next_aspirant_cmd = BE(0);
@@ -3943,7 +3943,7 @@ uint16 CMD_19_AspirantAppear(void) {
/*TODO: check me*/
static const animdesc_t anim23 = {ANIMFLG_USESPOT | 23, { { 0, 0 } }};
PopDirtyRects(DirtyRectSprite);
popDirtyRects(DirtyRectSprite);
aspirant_ptr->area = script_byte_vars.zone_area;
script_word_vars.next_aspirant_cmd = BE(0xA018); /*leave*/
script_byte_vars.check_used_commands = 3;
@@ -3994,20 +3994,20 @@ uint16 CMD_1B_Holo(void) {
playAnim(42, x + 4 / 4, y + 6);
num = 321 + ((Swap16(script_word_vars.timer_ticks2) < 60 * 60) ? 0 : 4) + (script_byte_vars.rand_value % 4);
msg = SeekToString(diali_data, num);
msg = seekToString(diali_data, num);
cur_dlg_index = cur_str_index; /*TODO: useless?*/
if (x < 140 / 4)
DrawPersonBubble(x + 32 / 4, y - 40, SPIKE_DNLEFT | 20, msg);
drawPersonBubble(x + 32 / 4, y - 40, SPIKE_DNLEFT | 20, msg);
else
DrawPersonBubble(x - 92 / 4, y - 40, SPIKE_DNRIGHT | 20, msg);
drawPersonBubble(x - 92 / 4, y - 40, SPIKE_DNRIGHT | 20, msg);
IFGM_PlaySfx(0);
playAnim(43, x, y);
PromptWait();
PopDirtyRects(DirtyRectBubble);
promptWait();
popDirtyRects(DirtyRectBubble);
IFGM_PlaySample(225);
@@ -4084,21 +4084,21 @@ uint16 CMD_21_VortTalk(void) {
else
num = 35;
msg = SeekToString(diali_data, num);
msg = seekToString(diali_data, num);
cur_dlg_index = cur_str_index; /*TODO: useless?*/
x = found_spot->sx;
y = found_spot->sy;
if (x < 140 / 4)
DrawPersonBubble(found_spot->ex, y - 40, SPIKE_DNLEFT | 20, msg);
drawPersonBubble(found_spot->ex, y - 40, SPIKE_DNLEFT | 20, msg);
else
DrawPersonBubble(x - 80 / 4, y - 40, SPIKE_DNRIGHT | 20, msg);
drawPersonBubble(x - 80 / 4, y - 40, SPIKE_DNRIGHT | 20, msg);
IFGM_PlaySfx(0);
PromptWait();
PopDirtyRects(DirtyRectBubble);
promptWait();
popDirtyRects(DirtyRectBubble);
return 0;
}
@@ -4235,7 +4235,7 @@ cmdhandler_t script_handlers[] = {
SCR_2B_PopAllBubbles,
SCR_2C_Wait4,
SCR_2D_Wait,
SCR_2E_PromptWait,
SCR_2E_promptWait,
SCR_2F_LootAspirantsItem,
SCR_30_Fight, /*30*/
SCR_31_Fight2,
@@ -4244,7 +4244,7 @@ cmdhandler_t script_handlers[] = {
SCR_34_Call,
SCR_35_Ret,
SCR_36_ChangeZone,
SCR_37_DesciTextBox,
SCR_37_desciTextBox,
SCR_38_PlayAnim,
SCR_39_AnimRoomDoorOpen,
SCR_3A_AnimRoomDoorClose,
@@ -4286,7 +4286,7 @@ cmdhandler_t script_handlers[] = {
SCR_5E_SelectTempPalette,
SCR_5F_DrawRoomObjectBack,
SCR_60_ReviveCadaver, /*60*/
SCR_61_DrawPersonBubbleDialog,
SCR_61_drawPersonBubbleDialog,
SCR_62_PsiReaction,
SCR_63_LiftSpot6,
SCR_64_DrawBoxAroundSpot,
@@ -4393,7 +4393,7 @@ again:;
res = RunScript(templ_data + the_command);
break;
case 0x9000:
DrawMessage(SeekToString(desci_data, cmd), CGA_SCREENBUFFER);
DrawMessage(seekToString(desci_data, cmd), CGA_SCREENBUFFER);
break;
case 0xA000:
case 0xB000: