diff options
Diffstat (limited to 'simon')
-rw-r--r-- | simon/charset.cpp | 2 | ||||
-rw-r--r-- | simon/intern.h | 2 | ||||
-rw-r--r-- | simon/items.cpp | 16 | ||||
-rw-r--r-- | simon/saveload.cpp | 2 | ||||
-rw-r--r-- | simon/simon.cpp | 33 | ||||
-rw-r--r-- | simon/simon.h | 10 | ||||
-rw-r--r-- | simon/verb.cpp | 4 |
7 files changed, 34 insertions, 35 deletions
diff --git a/simon/charset.cpp b/simon/charset.cpp index 5e403c18cc..1ad9322783 100644 --- a/simon/charset.cpp +++ b/simon/charset.cpp @@ -55,7 +55,7 @@ void SimonEngine::print_char_helper_6(uint i) { if (_fcsData2[i]) { lock(); fcs = _fcsPtrArray3[i]; - fcs_unk_proc_1(i, fcs->fcs_data->item_ptr, fcs->fcs_data->unk1, fcs->fcs_data->unk2); + drawIconArray(i, fcs->fcs_data->item_ptr, fcs->fcs_data->unk1, fcs->fcs_data->unk2); _fcsData2[i] = 0; unlock(); } diff --git a/simon/intern.h b/simon/intern.h index d435611f28..279f66127b 100644 --- a/simon/intern.h +++ b/simon/intern.h @@ -79,7 +79,7 @@ struct FillOrCopyData { int16 unk1; Item *item_ptr; FillOrCopyDataEntry e[64]; - int16 unk3, unk4; + int16 upArrow, downArrow; uint16 unk2; }; diff --git a/simon/items.cpp b/simon/items.cpp index 0c6d770c13..c8ba3db449 100644 --- a/simon/items.cpp +++ b/simon/items.cpp @@ -145,7 +145,7 @@ int SimonEngine::runScript() { break; case 23:{ - condition = o_unk_23(getVarOrWord()); + condition = o_chance(getVarOrWord()); } break; @@ -646,7 +646,7 @@ int SimonEngine::runScript() { Item *item = getNextItemPtr(); uint fcs_index = getVarOrByte(); lock(); - fcs_unk_proc_1(fcs_index, item, 0, 0); + drawIconArray(fcs_index, item, 0, 0); unlock(); } break; @@ -701,7 +701,7 @@ int SimonEngine::runScript() { uint fcs_index = getVarOrByte(); uint a = 1 << getVarOrByte(); lock(); - fcs_unk_proc_1(fcs_index, item, 1, a); + drawIconArray(fcs_index, item, 1, a); unlock(); } break; @@ -775,7 +775,7 @@ int SimonEngine::runScript() { break; case 137:{ - o_unk_137(getVarOrByte()); + o_restoreIconArray(getVarOrByte()); } break; @@ -1267,7 +1267,7 @@ void SimonEngine::o_waitForMark(uint i) { } -bool SimonEngine::o_unk_23(uint a) { +bool SimonEngine::o_chance(uint a) { if (a == 0) return 0; @@ -1427,13 +1427,13 @@ void SimonEngine::o_quit_if_user_presses_y() { } } -void SimonEngine::o_unk_137(uint fcs_index) { +void SimonEngine::o_restoreIconArray(uint fcs_index) { FillOrCopyStruct *fcs; fcs = _fcsPtrArray3[fcs_index & 7]; if (fcs->fcs_data == NULL) return; - fcs_unk_proc_1(fcs_index, fcs->fcs_data->item_ptr, fcs->fcs_data->unk1, fcs->fcs_data->unk2); + drawIconArray(fcs_index, fcs->fcs_data->item_ptr, fcs->fcs_data->unk1, fcs->fcs_data->unk2); } void SimonEngine::o_unk_138() { @@ -1648,7 +1648,7 @@ void SimonEngine::o_unk_160(uint a) { void SimonEngine::o_unk_103() { lock(); - fcs_unk1(_fcsUnk1); + removeIconArray(_fcsUnk1); showMessageFormat("\x0C"); unlock(); } diff --git a/simon/saveload.cpp b/simon/saveload.cpp index 363c2c4fa9..426617928a 100644 --- a/simon/saveload.cpp +++ b/simon/saveload.cpp @@ -123,7 +123,7 @@ void SimonEngine::quick_load_or_save() { } else { // Redraw Inventory lock(); - fcs_unk_proc_1(2, getItem1Ptr(), 0, 0); + drawIconArray(2, getItem1Ptr(), 0, 0); unlock(); // Reset engine? vc_set_bit_to(97, true); diff --git a/simon/simon.cpp b/simon/simon.cpp index 8bb06e2a0a..98380e5c47 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -75,7 +75,7 @@ static const SimonGameSettings simon_settings[] = { {"simon2mac", "Simon the Sorcerer 2 Talkie (Amiga or Mac)", GAME_SIMON2WIN, 0}, {"simon1cd32", "Simon the Sorcerer 1 Talkie (Amiga CD32)", GAME_SIMON1CD32, "gameamiga"}, {"simon1demo", "Simon the Sorcerer 1 (DOS Demo)", GAME_SIMON1DEMO, "GDEMO"}, -// {"feeble", "The Feeble Files", GAME_FEEBLEFILES, "GAME22"}, + {"feeble", "The Feeble Files", GAME_FEEBLEFILES, "GAME22"}, {NULL, NULL, 0, NULL} }; @@ -1232,7 +1232,7 @@ void SimonEngine::itemChildrenChanged(Item *item) { _fcsData2[i] = true; } else { _fcsData2[i] = false; - fcs_unk_proc_1(i, item, fcs->fcs_data->unk1, fcs->fcs_data->unk2); + drawIconArray(i, item, fcs->fcs_data->unk1, fcs->fcs_data->unk2); } } } @@ -1829,7 +1829,7 @@ get_out: _needHitAreaRecalc = 0; } -void SimonEngine::fcs_unk_proc_1(uint fcs_index, Item *item_ptr, int unk1, int unk2) { +void SimonEngine::drawIconArray(uint fcs_index, Item *item_ptr, int unk1, int unk2) { Item *item_ptr_org = item_ptr; FillOrCopyStruct *fcs_ptr; uint width_div_3, height_div_3; @@ -1853,12 +1853,12 @@ void SimonEngine::fcs_unk_proc_1(uint fcs_index, Item *item_ptr, int unk1, int u return; if (fcs_ptr->fcs_data) - fcs_unk1(fcs_index); + removeIconArray(fcs_index); fcs_ptr->fcs_data = (FillOrCopyData *) malloc(sizeof(FillOrCopyData)); fcs_ptr->fcs_data->item_ptr = item_ptr; - fcs_ptr->fcs_data->unk3 = -1; - fcs_ptr->fcs_data->unk4 = -1; + fcs_ptr->fcs_data->upArrow = -1; + fcs_ptr->fcs_data->downArrow = -1; fcs_ptr->fcs_data->unk1 = unk1; fcs_ptr->fcs_data->unk2 = unk2; @@ -1930,8 +1930,8 @@ void SimonEngine::fcs_unk_proc_1(uint fcs_index, Item *item_ptr, int unk1, int u void SimonEngine::fcs_unk_proc_2(FillOrCopyStruct *fcs, uint fcs_index) { setup_hit_areas(fcs, fcs_index); - fcs->fcs_data->unk3 = _scrollUpHitArea; - fcs->fcs_data->unk4 = _scrollDownHitArea; + fcs->fcs_data->upArrow = _scrollUpHitArea; + fcs->fcs_data->downArrow = _scrollDownHitArea; } void SimonEngine::setup_hit_areas(FillOrCopyStruct *fcs, uint fcs_index) { @@ -3040,7 +3040,7 @@ bool SimonEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) { void SimonEngine::fcs_delete(uint a) { if (_fcsPtrArray3[a] == NULL) return; - fcs_unk1(a); + removeIconArray(a); video_copy_if_flag_0x8_c(_fcsPtrArray3[a]); _fcsPtrArray3[a] = NULL; if (_fcsUnk1 == a) { @@ -3064,8 +3064,7 @@ void SimonEngine::fcs_unk_2(uint a) { } // OK -FillOrCopyStruct *SimonEngine::fcs_alloc(uint x, uint y, uint w, uint h, uint flags, uint fill_color, - uint unk4) { +FillOrCopyStruct *SimonEngine::fcs_alloc(uint x, uint y, uint w, uint h, uint flags, uint fill_color, uint text_color) { FillOrCopyStruct *fcs; fcs = _fcs_list; @@ -3079,7 +3078,7 @@ FillOrCopyStruct *SimonEngine::fcs_alloc(uint x, uint y, uint w, uint h, uint fl fcs->height = h; fcs->flags = flags; fcs->fill_color = fill_color; - fcs->text_color = unk4; + fcs->text_color = text_color; fcs->textColumn = 0; fcs->textRow = 0; fcs->textColumnOffset = 0; @@ -3142,7 +3141,7 @@ void SimonEngine::o_pathfind(int x, int y, uint var_1, uint var_2) { } // ok -void SimonEngine::fcs_unk1(uint fcs_index) { +void SimonEngine::removeIconArray(uint fcs_index) { FillOrCopyStruct *fcs; uint16 fcsunk1; uint16 i; @@ -3161,12 +3160,12 @@ void SimonEngine::fcs_unk1(uint fcs_index) { delete_hitarea_by_index(fcs->fcs_data->e[i].hit_area); } - if (fcs->fcs_data->unk3 != -1) { - delete_hitarea_by_index(fcs->fcs_data->unk3); + if (fcs->fcs_data->upArrow != -1) { + delete_hitarea_by_index(fcs->fcs_data->upArrow); } - if (fcs->fcs_data->unk4 != -1) { - delete_hitarea_by_index(fcs->fcs_data->unk4); + if (fcs->fcs_data->downArrow != -1) { + delete_hitarea_by_index(fcs->fcs_data->downArrow); if (!(_game & GF_SIMON2)) fcs_unk_5(fcs, fcs_index); } diff --git a/simon/simon.h b/simon/simon.h index 262394a7f8..fd455367e3 100644 --- a/simon/simon.h +++ b/simon/simon.h @@ -465,7 +465,7 @@ protected: void unlinkItem(Item *item); void linkItem(Item *item, Item *parent); - bool o_unk_23(uint a); + bool o_chance(uint a); void o_kill_sprite_simon1(uint a); void o_kill_sprite_simon2(uint a, uint b); @@ -496,7 +496,7 @@ protected: void o_save_game(); void o_load_game(); void o_quit_if_user_presses_y(); - void o_unk_137(uint a); + void o_restoreIconArray(uint a); void o_unk_138(); void killAllTimers(); @@ -524,7 +524,7 @@ protected: void lock(); void unlock(); - void fcs_unk_proc_1(uint i, Item *item_ptr, int unk1, int unk2); + void drawIconArray(uint i, Item *item_ptr, int unk1, int unk2); void loadTextIntoMem(uint string_id); void loadTablesIntoMem(uint subr_id); @@ -572,7 +572,7 @@ protected: void pollMouseXY(); void draw_mouse_pointer(); - void fcs_unk1(uint fcs_index); + void removeIconArray(uint fcs_index); void draw_icon_c(FillOrCopyStruct *fcs, uint icon, uint x, uint y); bool has_item_childflag_0x10(Item *item); uint item_get_icon_number(Item *item); @@ -599,7 +599,7 @@ protected: void o_unk26_helper(uint a, uint b, uint c, uint d, uint e, uint f, uint g, uint h); void talk_with_speech(uint speech_id, uint vga_sprite_id); void talk_with_text(uint vga_sprite_id, uint color, const char *string_ptr, int16 x, int16 y, int16 width); - FillOrCopyStruct *fcs_alloc(uint x, uint y, uint w, uint h, uint flags, uint fill_color, uint unk4); + FillOrCopyStruct *fcs_alloc(uint x, uint y, uint w, uint h, uint flags, uint fill_color, uint text_color); void render_string_amiga(uint vga_sprite_id, uint color, uint width, uint height, const char *txt); void render_string(uint vga_sprite_id, uint color, uint width, uint height, const char *txt); diff --git a/simon/verb.cpp b/simon/verb.cpp index b38cb53d37..aa7733393e 100644 --- a/simon/verb.cpp +++ b/simon/verb.cpp @@ -436,7 +436,7 @@ void SimonEngine::handle_uparrow_hitarea(FillOrCopyStruct *fcs) { return; lock(); - fcs_unk_proc_1(index, fcs->fcs_data->item_ptr, fcs->fcs_data->unk1 - 1, fcs->fcs_data->unk2); + drawIconArray(index, fcs->fcs_data->item_ptr, fcs->fcs_data->unk1 - 1, fcs->fcs_data->unk2); unlock(); } @@ -446,7 +446,7 @@ void SimonEngine::handle_downarrow_hitarea(FillOrCopyStruct *fcs) { index = get_fcs_ptr_3_index(fcs); lock(); - fcs_unk_proc_1(index, fcs->fcs_data->item_ptr, fcs->fcs_data->unk1 + 1, fcs->fcs_data->unk2); + drawIconArray(index, fcs->fcs_data->item_ptr, fcs->fcs_data->unk1 + 1, fcs->fcs_data->unk2); unlock(); } |