diff options
author | Paul Gilbert | 2012-10-21 16:10:13 +1100 |
---|---|---|
committer | Paul Gilbert | 2012-10-21 16:10:13 +1100 |
commit | 32f67c58e16a8e3b403208f9e3e2a40f8d1359f1 (patch) | |
tree | fbd6cd8c2c7d9a995ee906b8b0e1e75ac583d18d /engines | |
parent | 762b11aece04df992d4d4c16ceaf6a9a70e8bb1f (diff) | |
parent | b4247f6265e980b65aeb3c97f3c8875892cb8e92 (diff) | |
download | scummvm-rg350-32f67c58e16a8e3b403208f9e3e2a40f8d1359f1.tar.gz scummvm-rg350-32f67c58e16a8e3b403208f9e3e2a40f8d1359f1.tar.bz2 scummvm-rg350-32f67c58e16a8e3b403208f9e3e2a40f8d1359f1.zip |
Merge branch 'hopkins' of github.com:dreammaster/scummvm into hopkins
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hopkins/anim.cpp | 5 | ||||
-rw-r--r-- | engines/hopkins/events.cpp | 11 | ||||
-rw-r--r-- | engines/hopkins/files.cpp | 13 | ||||
-rw-r--r-- | engines/hopkins/font.cpp | 7 | ||||
-rw-r--r-- | engines/hopkins/globals.cpp | 5 | ||||
-rw-r--r-- | engines/hopkins/graphics.cpp | 13 | ||||
-rw-r--r-- | engines/hopkins/lines.cpp | 12 | ||||
-rw-r--r-- | engines/hopkins/menu.cpp | 4 | ||||
-rw-r--r-- | engines/hopkins/objects.cpp | 19 |
9 files changed, 87 insertions, 2 deletions
diff --git a/engines/hopkins/anim.cpp b/engines/hopkins/anim.cpp index 42aef7dd1d..c01ac7409a 100644 --- a/engines/hopkins/anim.cpp +++ b/engines/hopkins/anim.cpp @@ -38,6 +38,7 @@ AnimationManager::AnimationManager() { NO_SEQ = false; } +// Play Anim void AnimationManager::PLAY_ANM(const Common::String &filename, uint32 rate1, uint32 rate2, uint32 rate3) { signed __int16 v4; signed __int16 v5; @@ -239,6 +240,7 @@ LABEL_58: _vm->_graphicsManager.NOLOCK = 0; } +// Play Anim 2 void AnimationManager::PLAY_ANM2(const Common::String &filename, uint32 a2, uint32 a3, uint32 a4) { byte *v4; int v5; @@ -671,6 +673,7 @@ bool AnimationManager::REDRAW_ANIM() { return false; } +// Load Anim void AnimationManager::CHARGE_ANIM(const Common::String &animName) { byte v20[15]; char header[10]; @@ -746,6 +749,7 @@ void AnimationManager::CLEAR_ANIM() { } } +// Load Sprite Bank 1 int AnimationManager::CHARGE_BANK_SPRITE1(int idx, const Common::String &filename) { byte *v3; byte *v4; @@ -843,6 +847,7 @@ int AnimationManager::CHARGE_BANK_SPRITE1(int idx, const Common::String &filenam return result; } +// Search Anim void AnimationManager::RECHERCHE_ANIM(const byte *data, int animIndex, int count) { int v3; const byte *v5; diff --git a/engines/hopkins/events.cpp b/engines/hopkins/events.cpp index 030e321316..1504a85fe2 100644 --- a/engines/hopkins/events.cpp +++ b/engines/hopkins/events.cpp @@ -54,10 +54,12 @@ void EventsManager::setParent(HopkinsEngine *vm) { _vm = vm; } +// Install Mouse void EventsManager::INSTALL_SOURIS() { // No implementation in original } +// Mouse On void EventsManager::souris_on() { souris_flag = true; @@ -78,14 +80,17 @@ void EventsManager::souris_on() { souris_xy(150, 100); } +// Set Mouse position void EventsManager::souris_xy(int xp, int yp) { g_system->warpMouse(xp, yp); } +// Mouse Max void EventsManager::souris_max() { // No implementation in original } +// Get Mouse X int EventsManager::XMOUSE() { souris_x = start_x + g_system->getEventManager()->getMousePos().x; souris_y = g_system->getEventManager()->getMousePos().y; @@ -93,6 +98,7 @@ int EventsManager::XMOUSE() { return souris_x + ofset_souris_x; } +// Get Mouse Y int EventsManager::YMOUSE() { souris_x = start_x + g_system->getEventManager()->getMousePos().x; souris_y = g_system->getEventManager()->getMousePos().y; @@ -100,22 +106,26 @@ int EventsManager::YMOUSE() { return souris_y + ofset_souris_y; } +// Get Mouse Button int EventsManager::BMOUSE() { CONTROLE_MES(); return souris_bb; } +// Mouse Off void EventsManager::MOUSE_OFF() { souris_flag = false; g_system->showMouse(false); } +// Mouse On void EventsManager::MOUSE_ON() { souris_on(); souris_flag = true; g_system->showMouse(true); } +// Change Mouse Cursor void EventsManager::CHANGE_MOUSE(int id) { int cursorId = id; @@ -182,6 +192,7 @@ void EventsManager::CHANGE_MOUSE(int id) { } } +// Check Events void EventsManager::CONTROLE_MES() { pollEvents(); } diff --git a/engines/hopkins/files.cpp b/engines/hopkins/files.cpp index de501d884c..1fe4eba2ac 100644 --- a/engines/hopkins/files.cpp +++ b/engines/hopkins/files.cpp @@ -46,6 +46,7 @@ void FileManager::initSaves() { SAUVE_FICHIER(dataFilename, data, 100); } +// Save File bool FileManager::SAUVE_FICHIER(const Common::String &file, const void *buf, size_t n) { return bsave(file, buf, n); } @@ -63,6 +64,7 @@ bool FileManager::bsave(const Common::String &file, const void *buf, size_t n) { return false; } +// Load INI File void FileManager::Chage_Inifile(Common::StringMap &iniParams) { char *iniData = (char *)CHARGE_FICHIER("config.ini"); char *ptr = iniData; @@ -105,6 +107,7 @@ void FileManager::Chage_Inifile(Common::StringMap &iniParams) { free(iniData); } +// Load File byte *FileManager::CHARGE_FICHIER(const Common::String &file) { DMESS1(); @@ -124,6 +127,7 @@ byte *FileManager::CHARGE_FICHIER(const Common::String &file) { return data; } +// Load File 2 void FileManager::CHARGE_FICHIER2(const Common::String &file, byte *buf) { Common::File f; size_t filesize; @@ -137,10 +141,12 @@ void FileManager::CHARGE_FICHIER2(const Common::String &file, byte *buf) { f.close(); } +// Guess: Debug Message void FileManager::DMESS() { // No implementation in original } +// Guess: Debug Message 1 void FileManager::DMESS1() { // No implementation in original } @@ -158,6 +164,7 @@ int FileManager::bload_it(Common::ReadStream &stream, void *buf, size_t nbytes) return stream.read(buf, nbytes); } +// Censorship void FileManager::F_Censure() { _vm->_globals.CENSURE = false; @@ -176,11 +183,13 @@ void FileManager::F_Censure() { free(data); } +// Build System int FileManager::CONSTRUIT_SYSTEM(const Common::String &file) { _vm->_globals.NFICHIER = Common::String::format("system/%s", file.c_str()); return _vm->_globals.NFICHIER.size(); } +// Build File void FileManager::CONSTRUIT_FICHIER(const Common::String &hop, const Common::String &file) { // At this point, the original program did a big switch statement to determine // whether to preprend the CD or installed directory path into REPJEU @@ -192,11 +201,13 @@ void FileManager::CONSTRUIT_FICHIER(const Common::String &hop, const Common::Str _vm->_globals.NFICHIER = Common::String::format("%s/%s", hop.c_str(), file.c_str()); } +// Free File byte *FileManager::LIBERE_FICHIER(byte *ptr) { free(ptr); return g_PTRNUL; } +// Search Cat byte *FileManager::RECHERCHE_CAT(const Common::String &file, int a2) { byte *ptr = NULL; Common::File f; @@ -344,6 +355,7 @@ byte *FileManager::RECHERCHE_CAT(const Common::String &file, int a2) { return result; } +// File Size uint32 FileManager::FLONG(const Common::String &filename) { Common::File f; uint32 size; @@ -357,6 +369,7 @@ uint32 FileManager::FLONG(const Common::String &filename) { return size; } +// Build Linux Common::String FileManager::CONSTRUIT_LINUX(const Common::String &file) { return file; } diff --git a/engines/hopkins/font.cpp b/engines/hopkins/font.cpp index a2c3713d87..fdcf86ea1b 100644 --- a/engines/hopkins/font.cpp +++ b/engines/hopkins/font.cpp @@ -51,6 +51,7 @@ void FontManager::clearAll() { } } +// Text On void FontManager::TEXTE_ON(int idx) { if ((idx - 5) > 11) error("Attempted to display text > MAX_TEXT."); @@ -65,7 +66,7 @@ void FontManager::TEXTE_ON(int idx) { } } - +// Text Off void FontManager::TEXTE_OFF(int idx) { if ((idx - 5) > 11) error("Attempted to display text > MAX_TEXT."); @@ -80,10 +81,12 @@ void FontManager::TEXTE_OFF(int idx) { } } +// Text Color void FontManager::COUL_TXT(int idx, byte colByte) { Txt[idx - 5].colour = colByte; } +// Text Optimal Color void FontManager::OPTI_COUL_TXT(int idx1, int idx2, int idx3, int idx4) { COUL_TXT(idx1, 255); COUL_TXT(idx2, 255); @@ -91,6 +94,7 @@ void FontManager::OPTI_COUL_TXT(int idx1, int idx2, int idx3, int idx4) { COUL_TXT(idx4, 253); } +// void FontManager::DOS_TEXT(int idx, int messageId, const Common::String &filename, int xp, int yp, int a6, int a7, int a8, int a9, int colour) { if ((idx - 5) > 11) error("Attempted to display text > MAX_TEXT."); @@ -108,6 +112,7 @@ void FontManager::DOS_TEXT(int idx, int messageId, const Common::String &filenam txt.colour = colour; } +// Box void FontManager::BOITE(int idx, int messageId, const Common::String &filename, int xp, int yp) { int filesize; byte *v9; diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp index 46b7eb3756..bd95ade47f 100644 --- a/engines/hopkins/globals.cpp +++ b/engines/hopkins/globals.cpp @@ -443,6 +443,7 @@ void Globals::CLEAR_VBOB() { } } +// Load Object void Globals::CHARGE_OBJET() { _vm->_fileManager.CONSTRUIT_SYSTEM("OBJET.DAT"); byte *data = _vm->_fileManager.CHARGE_FICHIER(NFICHIER); @@ -475,11 +476,13 @@ byte *Globals::dos_free2(byte *p) { return g_PTRNUL; } +// Free File byte *Globals::LIBERE_FICHIER(byte *p) { dos_free2(p); return g_PTRNUL; } +// Reset Cache void Globals::RESET_CACHE() { byte *dataP; @@ -509,6 +512,7 @@ void Globals::RESET_CACHE() { void Globals::CACHE_ON() { CACHEFLAG = 1; } + // TODO: Find why some calls have a parameter value void Globals::CACHE_OFF(int v1) { CACHEFLAG = 0; @@ -522,6 +526,7 @@ void Globals::CACHE_ADD(int idx) { Cache[idx].fieldA = 1; } +// Load Cache void Globals::CHARGE_CACHE(const Common::String &file) { byte *v2 = g_PTRNUL; int v4; diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp index 3798711a49..c42ea8cfa0 100644 --- a/engines/hopkins/graphics.cpp +++ b/engines/hopkins/graphics.cpp @@ -158,6 +158,7 @@ void GraphicsManager::DD_Unlock() { } } +// Clear Screen void GraphicsManager::Cls_Video() { assert(VideoPtr); @@ -170,6 +171,7 @@ void GraphicsManager::LOAD_IMAGE(const Common::String &file) { INIT_TABLE(165, 170, Palette); } +// Load Screen void GraphicsManager::CHARGE_ECRAN(const Common::String &file) { bool flag; Common::File f; @@ -259,6 +261,7 @@ void GraphicsManager::INIT_TABLE(int a1, int a2, byte *palette) { TABLE_COUL[0] = 1; } +// Scroll Screen int GraphicsManager::SCROLL_ECRAN(int amount) { int result = CLIP(amount, 0, SCREEN_WIDTH); _vm->_eventsManager.start_x = result; @@ -483,6 +486,7 @@ void GraphicsManager::A_PCX640_480(byte *surface, const Common::String &file, by _vm->_globals.dos_free2(ptr); } +// Clear Palette void GraphicsManager::Cls_Pal() { Common::fill(&cmap[0], &cmap[PALETTE_BLOCK_SIZE], 0); SD_PIXELS[0] = 0; @@ -492,6 +496,7 @@ void GraphicsManager::Cls_Pal() { } } +// TODO: Check if it's normal it's defined two times (also in events). void GraphicsManager::souris_max() { // Original has no implementation } @@ -1495,6 +1500,7 @@ void GraphicsManager::RESET_SEGMENT_VESA() { } } +// Add VESA Segment void GraphicsManager::Ajoute_Segment_Vesa(int x1, int y1, int x2, int y2) { int v4; int v5; @@ -1553,6 +1559,7 @@ int GraphicsManager::Magic_Number(signed int v) { return result; } +// Display VESA Segment void GraphicsManager::Affiche_Segment_Vesa() { if (_vm->_globals.NBBLOC == 0) return; @@ -1748,6 +1755,7 @@ int GraphicsManager::Asm_Reduc(int v, int percentage) { return v; } +// Display 'Perfect?' void GraphicsManager::Affiche_Perfect(byte *surface, const byte *srcData, int xp300, int yp300, int spriteIndex, int a6, int a7, int a8) { const byte *v8; int i; @@ -2165,6 +2173,7 @@ Aff_Zoom_Larg_Cont1: } } +// Display Speed void GraphicsManager::AFFICHE_SPEED(const byte *spriteData, int xp, int yp, int spriteIndex) { int width, height; @@ -2242,6 +2251,7 @@ void GraphicsManager::Copy_Mem(const byte *srcSurface, int x1, int y1, unsigned } while (yCurrent != 1); } +// Display Font void GraphicsManager::Affiche_Fonte(byte *surface, const byte *spriteData, int xp, int yp, int characterIndex, int colour) { const byte *v6; @@ -2291,10 +2301,12 @@ void GraphicsManager::Affiche_Fonte(byte *surface, const byte *spriteData, int x } while (v16 != 1); } +// Init Screen void GraphicsManager::INI_ECRAN(const Common::String &file) { OPTI_INI(file, 0); } +// Init Screen 2 void GraphicsManager::INI_ECRAN2(const Common::String &file) { OPTI_INI(file, 2); } @@ -2483,6 +2495,7 @@ Video_Cont_Vbe: } } +// Reduce Screen // TODO: Check that v9 doesn't get set anywhere (apart from the current init to zero) void GraphicsManager::Reduc_Ecran(byte *a1, byte *a2, int a3, int a4, int a5, int a6, int a7) { byte *v7; diff --git a/engines/hopkins/lines.cpp b/engines/hopkins/lines.cpp index 550cabd168..e307a0ee2f 100644 --- a/engines/hopkins/lines.cpp +++ b/engines/hopkins/lines.cpp @@ -59,6 +59,7 @@ void LinesManager::CLEAR_ZONE() { next_ligne = 0; } +// Object Zone int LinesManager::ZONE_OBJET(int a1, int a2) { int v2; @@ -127,6 +128,7 @@ int LinesManager::OPTI_ZONE(int a1, int a2, int a3) { return v3; } +// Remove Line Zone void LinesManager::RETIRE_LIGNE_ZONE(int idx) { if (idx > 400) error("Attempting to add a line obstacle > MAX_LIGNE."); @@ -136,7 +138,7 @@ void LinesManager::RETIRE_LIGNE_ZONE(int idx) { _vm->_linesManager.LigneZone[idx].zoneData = (int16 *)g_PTRNUL; } - +// Add Line Zone void LinesManager::AJOUTE_LIGNE_ZONE(int idx, int a2, int a3, int a4, int a5, int a6) { int v8; int v9; @@ -223,6 +225,7 @@ void LinesManager::RESET_OBSTACLE() { } } +// Remove Line void LinesManager::RETIRE_LIGNE(int idx) { if (idx > 400) error("Attempting to add a line obstacle > MAX_LIGNE."); @@ -231,6 +234,7 @@ void LinesManager::RETIRE_LIGNE(int idx) { Ligne[idx].lineData = (int16 *)g_PTRNUL; } +// Add Line void LinesManager::AJOUTE_LIGNE(int idx, int a2, int a3, int a4, int a5, int a6, int a7) { int v7; int v8; @@ -381,6 +385,7 @@ void LinesManager::AJOUTE_LIGNE(int idx, int a2, int a3, int a4, int a5, int a6, Ligne[idx].field4 = a2; } +// Line Collision 2 int LinesManager::colision2_ligne(int a1, int a2, int *a3, int *a4, int a5, int a6) { int v6; int16 *v7; @@ -587,6 +592,7 @@ LABEL_46: return result; } +// Init route void LinesManager::INIPARCOURS() { int v0; int v1; @@ -649,6 +655,7 @@ void LinesManager::INIPARCOURS() { } while (v8 != 400); } +// Avoid int LinesManager::CONTOURNE(int a1, int a2, int a3, int a4, int a5, int16 *a6, int a7) { int v7; int v8; @@ -788,6 +795,7 @@ int LinesManager::CONTOURNE(int a1, int a2, int a3, int a4, int a5, int16 *a6, i return v8; } +// Avoid 1 int LinesManager::CONTOURNE1(int a1, int a2, int a3, int a4, int a5, int16 *a6, int a7, int a8, int a9) { int v9; int v10; @@ -1681,6 +1689,7 @@ LABEL_17: return v99; } +// Avoid 2 // TODO: method casting int arrays as byte pointers. Double-check later whether // we can convert the return to a uint16 * int16 *LinesManager::PARCOURS2(int a1, int a2, int a3, int a4) { @@ -3816,6 +3825,7 @@ LABEL_60: return 1; } +// Test line int LinesManager::TEST_LIGNE(int a1, int a2, int *a3, int *a4, int *a5) { int i; int v6; diff --git a/engines/hopkins/menu.cpp b/engines/hopkins/menu.cpp index fcebb2ce8b..a4bd9c13c9 100644 --- a/engines/hopkins/menu.cpp +++ b/engines/hopkins/menu.cpp @@ -233,6 +233,7 @@ int MenuManager::MENU() { return v6; } +// Load Game void MenuManager::CHARGE_PARTIE() { int v1; char v3; @@ -304,6 +305,7 @@ void MenuManager::CHARGE_PARTIE() { _vm->_objectsManager.CHANGE_OBJET(14); } +// Save Game void MenuManager::SAUVE_PARTIE() { byte *v1; int v2; @@ -559,6 +561,7 @@ void MenuManager::COMPUT_HOPKINS(int idx) { */ } +// Load Save void MenuManager::LOAD_SAUVE(int a1) { int v1; byte *v2; @@ -638,6 +641,7 @@ void MenuManager::LOAD_SAUVE(int a1) { _vm->_objectsManager.SL_Y = 0; } +// Search Game int MenuManager::CHERCHE_PARTIE() { int v0; int v1; diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 9ce0b3b6cd..102ad21ee8 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -110,6 +110,7 @@ void ObjectsManager::setParent(HopkinsEngine *vm) { _vm = vm; } +// Change Object byte *ObjectsManager::CHANGE_OBJET(int objIndex) { byte *result = ObjectsManager::CAPTURE_OBJET(objIndex, 1); _vm->_globals.Bufferobjet = result; @@ -170,6 +171,7 @@ byte *ObjectsManager::CAPTURE_OBJET(int objIndex, int mode) { return result; } +// Delete Object void ObjectsManager::DELETE_OBJET(int objIndex) { int v1; int v2; @@ -240,6 +242,7 @@ int ObjectsManager::get_offsety(const byte *spriteData, int spriteIndex, bool is return result; } +// Get Width int ObjectsManager::Get_Largeur(const byte *objectData, int idx) { const byte *rectP = objectData + 3; for (int i = idx; i; --i) @@ -248,6 +251,7 @@ int ObjectsManager::Get_Largeur(const byte *objectData, int idx) { return (int16)READ_LE_UINT16(rectP + 4); } +// Get height int ObjectsManager::Get_Hauteur(const byte *objectData, int idx) { const byte *rectP = objectData + 3; for (int i = idx; i; --i) @@ -279,6 +283,7 @@ byte *ObjectsManager::DEL_FICHIER_OBJ() { return result; } +// Load Sprite byte *ObjectsManager::CHARGE_SPRITE(const Common::String &file) { _vm->_fileManager.DMESS1(); return _vm->_fileManager.CHARGE_FICHIER(file); @@ -297,6 +302,7 @@ int ObjectsManager::capture_mem_sprite(const byte *objectData, byte *sprite, int return result; } +// Add Object int ObjectsManager::AJOUTE_OBJET(int objIndex) { bool flag = false; int arrIndex = 0; @@ -312,6 +318,7 @@ int ObjectsManager::AJOUTE_OBJET(int objIndex) { return arrIndex; } +// Display Sprite void ObjectsManager::AFF_SPRITES() { int v0; int v1; @@ -1139,6 +1146,7 @@ void ObjectsManager::DEF_CACHE(int idx) { _vm->_globals.Cache[idx].field4 + _vm->_globals.Cache[idx].field8); } +// Compute Sprite void ObjectsManager::CALCUL_SPRITE(int idx) { int width, height; int v3; @@ -1262,6 +1270,7 @@ void ObjectsManager::CALCUL_SPRITE(int idx) { } } +// Before Sort int ObjectsManager::AvantTri(int a1, int a2, int a3) { int result; @@ -1277,6 +1286,7 @@ int ObjectsManager::AvantTri(int a1, int a2, int a3) { return result; } +// Display BOB Anim void ObjectsManager::AFF_BOB_ANIM() { int v1; int v2; @@ -1465,6 +1475,7 @@ LABEL_38: } while (v28 != 35); } +// Display VBOB void ObjectsManager::AFF_VBOB() { int width, height; @@ -1723,6 +1734,7 @@ void ObjectsManager::SETYSPR(int idx, int yp) { Sprite[idx].spritePos.y = yp; } +// Set Sprite Size void ObjectsManager::SETTAILLESPR(int idx, int a2) { if (idx > 5) error("Set the Coord. there a sprite> MAX_SPRITE."); @@ -2448,6 +2460,7 @@ LABEL_19: } } +// Load Obstacle void ObjectsManager::CHARGE_OBSTACLE(const Common::String &file) { __int16 v1; byte *ptr; @@ -2481,6 +2494,7 @@ void ObjectsManager::CHARGE_OBSTACLE(const Common::String &file) { _vm->_globals.dos_free2(ptr); } +// Load Zone void ObjectsManager::CHARGE_ZONE(const Common::String &file) { signed int v1; int v2; @@ -2592,6 +2606,7 @@ void ObjectsManager::CHARGE_ZONE(const Common::String &file) { _vm->_objectsManager.CARRE_ZONE(); } +// Square Zone void ObjectsManager::CARRE_ZONE() { int16 *dataP; int v4; @@ -2783,6 +2798,7 @@ void ObjectsManager::PLAN_BETA() { _vm->_globals.PLAN_FLAG = 0; } +// Left Button void ObjectsManager::BTGAUCHE() { int v0; int v1; @@ -3086,6 +3102,7 @@ LABEL_64: GOACTION = 0; } +// Clear Screen void ObjectsManager::CLEAR_ECRAN() { int v1; int v2; @@ -3340,6 +3357,7 @@ LABEL_7: } } +// Change Face/Head void ObjectsManager::CHANGE_TETE(int a1, int a2) { int v2; Sauvegarde1 *v3; @@ -3454,6 +3472,7 @@ LABEL_9: } } +// Check Size void ObjectsManager::VERIFTAILLE() { int v0; int v1; |