Small cleanup
svn-id: r8132
This commit is contained in:
parent
fb5bd02b40
commit
a5b2774685
3 changed files with 26 additions and 37 deletions
|
@ -240,9 +240,9 @@ static const char *const simon1dos_opcode_name_table[256] = {
|
|||
"|VGA_POINTER_OP_1",
|
||||
/* 176 */
|
||||
"|VGA_POINTER_OP_2",
|
||||
"BBI|UNK_177",
|
||||
"BBI|INVENTORY_DESCRIPTION",
|
||||
"WWBB|PATHFIND",
|
||||
"BBB|UNK_179",
|
||||
"BBB|ROOM_DESCRIPTION",
|
||||
/* 180 */
|
||||
"|FORCE_UNLOCK",
|
||||
"|FORCE_LOCK",
|
||||
|
@ -478,9 +478,9 @@ static const char *const simon1talkie_opcode_name_table[256] = {
|
|||
"|VGA_POINTER_OP_1",
|
||||
/* 176 */
|
||||
"|VGA_POINTER_OP_2",
|
||||
"BBI|UNK_177",
|
||||
"BBI|INVENTORY_DESCRIPTION",
|
||||
"WWBB|PATHFIND",
|
||||
"BBB|UNK_179",
|
||||
"BBB|ROOM_DESCRIPTION",
|
||||
/* 180 */
|
||||
"|FORCE_UNLOCK",
|
||||
"|FORCE_LOCK",
|
||||
|
@ -716,9 +716,9 @@ static const char *const simon2dos_opcode_name_table[256] = {
|
|||
"|VGA_POINTER_OP_1",
|
||||
/* 176 */
|
||||
"|VGA_POINTER_OP_2",
|
||||
"BBI|UNK_177",
|
||||
"BBI|INVENTORY_DESCRIPTION",
|
||||
"WWBB|PATHFIND",
|
||||
"BBB|UNK_179",
|
||||
"BBB|ROOM_DESCRIPTION",
|
||||
/* 180 */
|
||||
"|FORCE_UNLOCK",
|
||||
"|FORCE_LOCK",
|
||||
|
@ -958,9 +958,9 @@ static const char *const simon2talkie_opcode_name_table[256] = {
|
|||
"|VGA_POINTER_OP_1",
|
||||
/* 176 */
|
||||
"|VGA_POINTER_OP_2",
|
||||
"BBI|UNK_177",
|
||||
"BBI|INVENTORY_DESCRIPTION",
|
||||
"WWBB|PATHFIND",
|
||||
"BBB|UNK_179",
|
||||
"BBB|ROOM_DESCRIPTION",
|
||||
/* 180 */
|
||||
"|FORCE_UNLOCK",
|
||||
"|FORCE_LOCK",
|
||||
|
|
|
@ -918,6 +918,7 @@ int SimonState::runScript() {
|
|||
break;
|
||||
|
||||
case 163:{ /* sound 1 */
|
||||
// Is this opcode actually used in games?
|
||||
o_unk_163(getVarOrWord());
|
||||
}
|
||||
break;
|
||||
|
@ -969,7 +970,7 @@ int SimonState::runScript() {
|
|||
}
|
||||
break;
|
||||
|
||||
case 177:{ /* Inventory descriptions */
|
||||
case 177:{ /* inventory descriptions */
|
||||
o_inventory_descriptions();
|
||||
}
|
||||
break;
|
||||
|
@ -983,7 +984,7 @@ int SimonState::runScript() {
|
|||
}
|
||||
break;
|
||||
|
||||
case 179:{ /* Room descriptions */
|
||||
case 179:{ /* room descriptions */
|
||||
uint b = getVarOrByte();
|
||||
uint c = getVarOrByte();
|
||||
uint a = getVarOrByte();
|
||||
|
@ -1035,7 +1036,7 @@ int SimonState::runScript() {
|
|||
}
|
||||
break;
|
||||
|
||||
case 185:{
|
||||
case 185:{ /* midi sfx file number */
|
||||
if (_game & GF_SIMON2)
|
||||
goto invalid_opcode;
|
||||
_midi_sfx = getVarOrWord();
|
||||
|
@ -1064,7 +1065,7 @@ int SimonState::runScript() {
|
|||
}
|
||||
break;
|
||||
|
||||
case 189:{
|
||||
case 189:{ /* clear_op189_flag */
|
||||
if (!(_game & GF_SIMON2))
|
||||
goto invalid_opcode;
|
||||
_op_189_flags = 0;
|
||||
|
|
|
@ -1142,7 +1142,6 @@ void SimonState::closeTablesFile_gme(File *in) {
|
|||
// not needed
|
||||
}
|
||||
|
||||
// Simon1DOS load tables file
|
||||
uint SimonState::loadTextFile_simon1(const char *filename, byte *dst) {
|
||||
File fo;
|
||||
fo.open(filename, _gameDataPath);
|
||||
|
@ -2723,8 +2722,7 @@ get_out:;
|
|||
#endif
|
||||
}
|
||||
|
||||
void SimonState::o_wait_for_vga(uint a) {
|
||||
_vga_wait_for = a;
|
||||
void SimonState::o_wait_for_vga(uint _vga_wait_for) {
|
||||
_timer_1 = 0;
|
||||
_exit_cutscene = false;
|
||||
_skip_speech = false;
|
||||
|
@ -3240,44 +3238,34 @@ void SimonState::video_erase(FillOrCopyStruct *fcs) {
|
|||
}
|
||||
|
||||
VgaSprite *SimonState::find_cur_sprite() {
|
||||
if (_game & GF_SIMON2) {
|
||||
VgaSprite *vsp = _vga_sprites;
|
||||
while (vsp->id) {
|
||||
if (_game & GF_SIMON2) {
|
||||
if (vsp->id == _vga_cur_sprite_id && vsp->unk7 == _vga_cur_file_id)
|
||||
break;
|
||||
vsp++;
|
||||
}
|
||||
return vsp;
|
||||
} else {
|
||||
VgaSprite *vsp = _vga_sprites;
|
||||
while (vsp->id) {
|
||||
if (vsp->id == _vga_cur_sprite_id)
|
||||
break;
|
||||
}
|
||||
vsp++;
|
||||
}
|
||||
return vsp;
|
||||
}
|
||||
}
|
||||
|
||||
bool SimonState::has_vgastruct_with_id(uint16 id, uint16 file) {
|
||||
if (_game & GF_SIMON2) {
|
||||
VgaSprite *vsp = _vga_sprites;
|
||||
while (vsp->id) {
|
||||
if (_game & GF_SIMON2) {
|
||||
if (vsp->id == id && vsp->unk7 == file)
|
||||
return true;
|
||||
vsp++;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
VgaSprite *vsp = _vga_sprites;
|
||||
while (vsp->id) {
|
||||
if (vsp->id == id)
|
||||
return true;
|
||||
}
|
||||
vsp++;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void SimonState::processSpecialKeys() {
|
||||
switch (_key_pressed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue