[Scummvm-git-logs] scummvm master -> 0effcbeb24ac096514ead22c19de1e07afb093c0
bluegr
noreply at scummvm.org
Tue Dec 20 15:07:06 UTC 2022
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a96a72f04a NEVERHOOD: Fix notes used for Japanese version
1425b701d8 NEVERHOOD: Add extra Japanese credits
0effcbeb24 NEVERHOOD: Disable Hall of Records in Japanese version
Commit: a96a72f04a1e51477ea7e7650690267275692f84
https://github.com/scummvm/scummvm/commit/a96a72f04a1e51477ea7e7650690267275692f84
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2022-12-20T17:07:00+02:00
Commit Message:
NEVERHOOD: Fix notes used for Japanese version
Changed paths:
engines/neverhood/modules/module1000.cpp
diff --git a/engines/neverhood/modules/module1000.cpp b/engines/neverhood/modules/module1000.cpp
index fd0d8a799ad..03d2793207b 100644
--- a/engines/neverhood/modules/module1000.cpp
+++ b/engines/neverhood/modules/module1000.cpp
@@ -601,19 +601,82 @@ uint32 Scene1005::handleMessage(int messageNum, const MessageParam ¶m, Entit
}
void Scene1005::drawTextToBackground() {
- TextResource textResource(_vm);
- const char *textStart, *textEnd;
- int16 y = 36;
uint32 textIndex = getTextIndex();
- FontSurface *fontSurface = FontSurface::createFontSurface(_vm, getGlobalVar(V_ENTRANCE_OPEN) ? 0x283CE401 : 0xC6604282);
- textResource.load(0x80283101);
- textStart = textResource.getString(textIndex, textEnd);
- while (textStart < textEnd) {
- fontSurface->drawString(_background->getSurface(), 188, y, (const byte*)textStart);
- y += 36;
- textStart += strlen(textStart) + 1;
+ if (_vm->getLanguage() == Common::Language::JA_JPN) {
+ static const struct {
+ uint32 image_id;
+ int x, y;
+ } jp_images[] = {
+ /* default */ { 0xB1048044, 205, 39 },
+ /* default */ { 0xB1048044, 205, 39 },
+ /* 2 */ { 0x31048045, 201, 54 },
+ /* 3 */ { 0x31048046, 193, 37 },
+ /* 4 */ { 0x31048040, 192, 57 },
+ /* 5 */ { 0x3104804C, 195, 43 },
+ /* 6 */ { 0x31048054, 188, 32 },
+ /* 7 */ { 0x31048064, 201, 52 },
+ /* 8 */ { 0x31048004, 191, 51 },
+ /* 9 */ { 0x310480C4, 197, 58 },
+ /* 10 */ { 0xB2048044, 196, 65 },
+ /* 11 */ { 0x32048045, 188, 53 },
+ /* 12 */ { 0x32048046, 190, 71 },
+ /* 13 */ { 0x32048040, 210, 45 },
+ /* 14 */ { 0x3204804C, 199, 67 },
+ /* 15 */ { 0x32048054, 214, 58 },
+ /* 16 */ { 0x32048064, 201, 52 },
+ /* 17 */ { 0x32048004, 205, 57 },
+ /* 18 */ { 0x320480C4, 215, 65 },
+ /* 19 */ { 0x32048144, 223, 85 },
+ /* 20 */ { 0x34048045, 208, 82 },
+ /* 21 */ { 0x34048046, 200, 66 },
+ /* 22 */ { 0x34048040, 209, 76 },
+ /* 23 */ { 0x3404804C, 211, 80 },
+ /* 24 */ { 0x34048054, 211, 50 },
+ /* 25 */ { 0x34048064, 224, 76 },
+ /* 26 */ { 0x34048004, 209, 85 },
+ /* 27 */ { 0x340480C4, 202, 61 },
+ /* 28 */ { 0x34048144, 206, 79 },
+ /* 29 */ { 0x34048244, 219, 71 },
+ /* 30 */ { 0x38048046, 200, 87 },
+ /* 31 */ { 0x38048040, 215, 85 },
+ /* 32 */ { 0x3804804C, 209, 87 },
+ /* 33 */ { 0x38048054, 201, 62 },
+ /* 34 */ { 0x38048064, 213, 95 },
+ /* 35 */ { 0x38048004, 204, 90 },
+ /* 36 */ { 0x380480C4, 214, 77 },
+ /* 37 */ { 0x38048144, 211, 96 },
+ /* 38 */ { 0x38048244, 207, 91 },
+ /* 39 */ { 0x38048444, 207, 71 },
+ /* 40 */ { 0x20048040, 206, 68 },
+ /* 41 */ { 0x2004804C, 201, 140 },
+ /* 42 */ { 0x20048054, 218, 122 },
+ /* 43 */ { 0x20048064, 219, 107 },
+ /* 44 */ { 0x20048004, 214, 115 },
+ /* 45 */ { 0x200480C4, 193, 142 },
+ /* 46 */ { 0x20048144, 210, 130 },
+ /* 47 */ { 0x20048244, 208, 110 },
+ /* 48 */ { 0x20048444, 213, 112 },
+ /* 49 */ { 0x20048844, 221, 112 },
+ /* 50 */ { 0x1004804C, 207, 133 },
+ /* 51 */ { 0x10048054, 209, 111 },
+ };
+ if (textIndex >= ARRAYSIZE(jp_images))
+ textIndex = 0;
+ addSprite(new StaticSprite(_vm, jp_images[textIndex].image_id, kSLFSetPosition, jp_images[textIndex].x, jp_images[textIndex].y));
+ } else {
+ TextResource textResource(_vm);
+ const char *textStart, *textEnd;
+ int16 y = 36;
+ FontSurface *fontSurface = FontSurface::createFontSurface(_vm, getGlobalVar(V_ENTRANCE_OPEN) ? 0x283CE401 : 0xC6604282);
+ textResource.load(0x80283101);
+ textStart = textResource.getString(textIndex, textEnd);
+ while (textStart < textEnd) {
+ fontSurface->drawString(_background->getSurface(), 188, y, (const byte*)textStart);
+ y += 36;
+ textStart += strlen(textStart) + 1;
+ }
+ delete fontSurface;
}
- delete fontSurface;
}
uint32 Scene1005::getTextIndex() {
Commit: 1425b701d88d5bb6c04aec180cfded79a7a6067d
https://github.com/scummvm/scummvm/commit/1425b701d88d5bb6c04aec180cfded79a7a6067d
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2022-12-20T17:07:00+02:00
Commit Message:
NEVERHOOD: Add extra Japanese credits
Changed paths:
engines/neverhood/menumodule.cpp
diff --git a/engines/neverhood/menumodule.cpp b/engines/neverhood/menumodule.cpp
index 832b51d8cbd..724936b6661 100644
--- a/engines/neverhood/menumodule.cpp
+++ b/engines/neverhood/menumodule.cpp
@@ -399,7 +399,7 @@ uint32 MainMenu::handleMessage(int messageNum, const MessageParam ¶m, Entity
return 0;
}
-static const uint32 kCreditsSceneFileHashes[] = {
+static const uint32 kCreditsSceneFileHashesIntl[] = {
0x6081128C, 0x608112BC, 0x608112DC,
0x6081121C, 0x6081139C, 0x6081109C,
0x6081169C, 0x60811A9C, 0x6081029C,
@@ -407,10 +407,27 @@ static const uint32 kCreditsSceneFileHashes[] = {
0x008112DC, 0x0081121C, 0x0081139C,
0x0081109C, 0x0081169C, 0x00811A9C,
0x0081029C, 0x0081329C, 0xC08112BC,
- 0xC08112DC, 0xC081121C, 0xC081139C,
- 0
+ 0xC08112DC, 0xC081121C
+};
+
+static const uint32 kCreditsSceneFileHashesJp[] = {
+ 0xC183121C, 0xC283121C, 0xC483121C, 0xC883121C
};
+static uint32 getCreditFileHash(NeverhoodEngine *vm, int num) {
+ if (num < ARRAYSIZE(kCreditsSceneFileHashesIntl))
+ return kCreditsSceneFileHashesIntl[num];
+ num -= ARRAYSIZE(kCreditsSceneFileHashesIntl);
+ if (vm->getLanguage() == Common::Language::JA_JPN) {
+ if (num < ARRAYSIZE(kCreditsSceneFileHashesJp))
+ return kCreditsSceneFileHashesJp[num];
+ num -= ARRAYSIZE(kCreditsSceneFileHashesJp);
+ }
+
+ if (num == 0)
+ return 0xC081139C;
+ return 0;
+}
CreditsScene::CreditsScene(NeverhoodEngine *vm, Module *parentModule, bool canAbort)
: Scene(vm, parentModule), _canAbort(canAbort), _screenIndex(0), _ticksDuration(0),
_countdown(216) {
@@ -437,22 +454,25 @@ CreditsScene::~CreditsScene() {
void CreditsScene::update() {
Scene::update();
if (_countdown != 0) {
- if (_screenIndex == 23 && _vm->_system->getMillis() > _ticksTime)
+ int lastScreen = (_vm->getLanguage() == Common::Language::JA_JPN)
+ ? ARRAYSIZE(kCreditsSceneFileHashesIntl) + ARRAYSIZE(kCreditsSceneFileHashesJp)
+ : ARRAYSIZE(kCreditsSceneFileHashesIntl);
+ if (_screenIndex == lastScreen && _vm->_system->getMillis() > _ticksTime)
leaveScene(0);
else if ((--_countdown) == 0) {
- ++_screenIndex;
- if (kCreditsSceneFileHashes[_screenIndex] == 0)
+ uint32 fileHash = getCreditFileHash(_vm, ++_screenIndex);
+ if (fileHash == 0)
leaveScene(0);
else {
- _background->load(kCreditsSceneFileHashes[_screenIndex]);
- _palette->addPalette(kCreditsSceneFileHashes[_screenIndex], 0, 256, 0);
+ _background->load(fileHash);
+ _palette->addPalette(fileHash, 0, 256, 0);
if (_screenIndex < 5)
_countdown = 192;
else if (_screenIndex < 15)
_countdown = 144;
else if (_screenIndex < 16)
_countdown = 216;
- else if (_screenIndex < 23)
+ else if (_screenIndex < lastScreen)
_countdown = 144;
else
_countdown = 1224;
Commit: 0effcbeb24ac096514ead22c19de1e07afb093c0
https://github.com/scummvm/scummvm/commit/0effcbeb24ac096514ead22c19de1e07afb093c0
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2022-12-20T17:07:00+02:00
Commit Message:
NEVERHOOD: Disable Hall of Records in Japanese version
Changed paths:
engines/neverhood/modules/module2200.cpp
engines/neverhood/modules/module2200.h
diff --git a/engines/neverhood/modules/module2200.cpp b/engines/neverhood/modules/module2200.cpp
index cc37ec667a8..85f5134df54 100644
--- a/engines/neverhood/modules/module2200.cpp
+++ b/engines/neverhood/modules/module2200.cpp
@@ -46,14 +46,18 @@ Module2200::~Module2200() {
_vm->_soundMan->deleteGroup(0x11391412);
}
+bool Module2200::shouldSkipHall() {
+ return ConfMan.getBool("skiphallofrecordsscenes") || _vm->getLanguage() == Common::Language::JA_JPN;
+}
+
void Module2200::createScene(int sceneNum, int which) {
- if (sceneNum == 46 && ConfMan.getBool("skiphallofrecordsscenes")) {
+ if (sceneNum == 46 && shouldSkipHall()) {
// Skip the whole Hall of Records storyboard scenes,
// and teleport to the last scene
sceneNum = 41;
}
- if (sceneNum == 40 && ConfMan.getBool("skiphallofrecordsscenes")) {
+ if (sceneNum == 40 && shouldSkipHall()) {
// Skip the whole Hall of Records storyboard scenes,
// and teleport back to the first scene
sceneNum = 5;
diff --git a/engines/neverhood/modules/module2200.h b/engines/neverhood/modules/module2200.h
index 0add754a12a..08e0da5a291 100644
--- a/engines/neverhood/modules/module2200.h
+++ b/engines/neverhood/modules/module2200.h
@@ -39,6 +39,7 @@ protected:
void createScene(int sceneNum, int which);
void updateScene();
void createHallOfRecordsScene(int which, uint32 hallOfRecordsInfoId);
+ bool shouldSkipHall();
};
class Scene2201 : public Scene {
More information about the Scummvm-git-logs
mailing list