aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2012-11-11 17:59:29 +0100
committerStrangerke2012-11-11 17:59:29 +0100
commit49c20931d9230c0b3b4fdd0d03288e798f9e8cf7 (patch)
tree85bc298fc67e6ae6634ce92d0b47bf00c7b9cc68
parent0e11fbbe537ccd3e4bd778a81966f60b25971780 (diff)
downloadscummvm-rg350-49c20931d9230c0b3b4fdd0d03288e798f9e8cf7.tar.gz
scummvm-rg350-49c20931d9230c0b3b4fdd0d03288e798f9e8cf7.tar.bz2
scummvm-rg350-49c20931d9230c0b3b4fdd0d03288e798f9e8cf7.zip
HOPKINS: Implement Credits()
-rw-r--r--engines/hopkins/globals.cpp9
-rw-r--r--engines/hopkins/globals.h9
-rw-r--r--engines/hopkins/hopkins.cpp71
-rw-r--r--engines/hopkins/hopkins.h2
4 files changed, 90 insertions, 1 deletions
diff --git a/engines/hopkins/globals.cpp b/engines/hopkins/globals.cpp
index ae2c1d6d7e..75b3bbabca 100644
--- a/engines/hopkins/globals.cpp
+++ b/engines/hopkins/globals.cpp
@@ -184,6 +184,15 @@ Globals::Globals() {
STOP_BUG = 0;
MAX_COMPTE = 0;
+ Credit_bx = -1;
+ Credit_bx1 = -1;
+ Credit_by = -1;
+ Credit_by1 = -1;
+ Credit_y = 0;
+ Credit_lignes = 0;
+ memset(Credit, 0, 12000);
+ Credit_step = 0;
+
// Initialise pointers
ICONE = NULL;
BUF_ZONE = NULL;
diff --git a/engines/hopkins/globals.h b/engines/hopkins/globals.h
index 06ddfc4ea5..2c04c9fcc2 100644
--- a/engines/hopkins/globals.h
+++ b/engines/hopkins/globals.h
@@ -452,6 +452,15 @@ public:
int old_z_69;
int j_104;
+ int Credit_bx;
+ int Credit_bx1;
+ int Credit_by;
+ int Credit_by1;
+ int Credit_y;
+ int Credit_lignes;
+ char Credit[12000];
+ int Credit_step;
+
Globals();
~Globals();
void setParent(HopkinsEngine *vm);
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index 826cd23ffb..fa319a84b7 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -2215,8 +2215,77 @@ int HopkinsEngine::PWBASE() {
return result;
}
+void HopkinsEngine::Charge_Credits() {
+ warning("STUB - Charge_Credits()");
+}
+
+void HopkinsEngine::CREDIT_AFFICHE(int a1, int a2, char a3) {
+ warning("STUB - CREDIT_AFFICHE");
+}
+
void HopkinsEngine::Credits() {
- warning("STUB - Credits()");
+ warning("Credits()");
+
+ Charge_Credits();
+ _globals.Credit_y = 436;
+ _graphicsManager.LOAD_IMAGE("GENERIC");
+ _graphicsManager.FADE_INW();
+ _soundManager.WSOUND(28);
+ _eventsManager.souris_flag = false;
+ _globals.iRegul = 3;
+ _globals.Credit_bx = _globals.Credit_bx1 = _globals.Credit_by = _globals.Credit_by1 = -1;
+ int soundId = 28;
+ do {
+ for (int i = 0; i < _globals.Credit_lignes; ++i) {
+ if (_globals.Credit[60 * i] == 1) {
+ int nextY = _globals.Credit_y + i * _globals.Credit_step;
+// *(_DWORD *)&Credit[60 * i + 4] = nextY;
+ _globals.Credit[60 * i + 4] = nextY & 0xFF;
+ _globals.Credit[60 * i + 5] = (nextY >> 8) & 0xFF;
+ _globals.Credit[60 * i + 6] = (nextY >> 16) & 0xFF;
+ _globals.Credit[60 * i + 7] = (nextY >> 24) & 0xFF;
+
+ if ((nextY - 21 >= 0) && (nextY - 21 <= 418)) {
+ char tmpVal = _globals.Credit[60 * i + 1];
+ int a1 = 0;
+ if (tmpVal == 49)
+ a1 = 163;
+ if (tmpVal == 50)
+ a1 = 161;
+ if (tmpVal == 51)
+ a1 = 162;
+// if (*(_WORD *)&Credit[60 * i + 8] != -1)
+ if ((_globals.Credit[60 * i + 8] != 0xFF) && _globals.Credit[60 * i + 9] != 0xFF)
+ CREDIT_AFFICHE(nextY, 60 * i + 8, a1);
+ }
+ }
+ }
+ --_globals.Credit_y;
+ if (_globals.Credit_bx != -1 || _globals.Credit_bx1 != -1 || _globals.Credit_by != -1 || _globals.Credit_by1 != -1) {
+ _eventsManager.VBL();
+ _graphicsManager.SCOPY(_graphicsManager.VESA_SCREEN, 60, 50, 520, 380, _graphicsManager.VESA_BUFFER, 60, 50);
+ } else {
+ _eventsManager.VBL();
+ }
+// if (*(_DWORD *)&Credit[20 * (3 * Credit_lignes - 3) + 4] <= 39) {
+ if ( _globals.Credit[20 * (3 * _globals.Credit_lignes - 3) + 4] +
+ (_globals.Credit[20 * (3 * _globals.Credit_lignes - 3) + 4] << 8) +
+ (_globals.Credit[20 * (3 * _globals.Credit_lignes - 3) + 4] << 16) +
+ (_globals.Credit[20 * (3 * _globals.Credit_lignes - 3) + 4] << 24) <= 39) {
+ _globals.Credit_y = 440;
+ ++soundId;
+ if (soundId > 31)
+ soundId = 28;
+ _soundManager.WSOUND(soundId);
+ }
+ _globals.Credit_bx = -1;
+ _globals.Credit_bx1 = -1;
+ _globals.Credit_by = -1;
+ _globals.Credit_by1 = -1;
+ } while (_eventsManager.BMOUSE() != 1);
+ _graphicsManager.FADE_OUTW();
+ _globals.iRegul = 1;
+ _eventsManager.souris_flag = true;
}
void HopkinsEngine::OCEAN(int16 a1, Common::String a2, Common::String a3, int16 a4, int16 a5, int16 a6, int16 a7, int16 a8, int16 a9) {
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
index b6434cadc9..62f3ee6765 100644
--- a/engines/hopkins/hopkins.h
+++ b/engines/hopkins/hopkins.h
@@ -98,6 +98,8 @@ private:
void AVION();
int PWBASE();
void OCEAN(int16 a1, Common::String a2, Common::String a3, int16 a4, int16 a5, int16 a6, int16 a7, int16 a8, int16 a9);
+ void Charge_Credits();
+ void CREDIT_AFFICHE(int a1, int a2, char a3);
void Credits();
bool runLinuxDemo();