Skip to content

Commit

Permalink
Merge 0.2.9d changes
Browse files Browse the repository at this point in the history
  • Loading branch information
usineur committed Nov 22, 2020
2 parents 21f9147 + 360ae99 commit 912594e
Show file tree
Hide file tree
Showing 36 changed files with 1,570 additions and 1,240 deletions.
17 changes: 17 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
* release 0.2.9d
- added gain to sounds
- added no-hit cheat for 'rock' and 'lava'

* release 0.2.9c
- added original sounds limiter (16 channels)
- fixed checkpoint 7 for 'lar1' screen 19
- fixed some bounding box checks
- fixed sound glitches when resuming the game after a cutscene

* release 0.2.9b
- added PSX hint screens
- added 'volume' submenu
- fixed sounds volume and panning
- fixed walk on chain bridge in 'lar1' screen 3
- fixed gate not closing in 'lar2' screen 8

* release 0.2.9
- added PSP and Wii platforms specific code
- added support for PC demo v1.0 data files
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if(NSWITCH)
add_definitions(-D__SWITCH__)
add_custom_target(${CMAKE_PROJECT_NAME}.nro
DEPENDS ${CMAKE_PROJECT_NAME}
COMMAND nacptool --create "Heart of Darkness" "cyx, usineur" "0.2.9" ${CMAKE_PROJECT_NAME}.nacp
COMMAND nacptool --create "Heart of Darkness" "cyx, usineur" "0.2.9d" ${CMAKE_PROJECT_NAME}.nacp
COMMAND elf2nro ${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_NAME}.nro --icon=${CMAKE_SOURCE_DIR}/3p/res/icon.jpg --nacp=${CMAKE_PROJECT_NAME}.nacp
)
add_custom_target(nxlink
Expand Down
10 changes: 1 addition & 9 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

hode README
Release version: 0.2.9
Release version: 0.2.9d
-------------------------------------------------------------------------------


Expand Down Expand Up @@ -45,14 +45,6 @@ Display and engine settings can be configured in the 'hode.ini' file.
Game progress is saved in 'setup.cfg', similar to the original engine.


Status:
-------

Settings submenu is not implemented.

PSX datafiles can be used, but menu and videos are missing.


Credits:
--------

Expand Down
48 changes: 48 additions & 0 deletions RELEASES.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,54 @@
- rock_hod.mst: 5b49637348f6c6a2737a64cacf01f9bcef8e83f6
- rock_hod.sss: 55c841f6c091c2ae68f0636c075c66405d00cc6a
- setup.dat: 1d476d896cafd3d4af00b15eb2eb695a804a0662
- name: Heart of Darkness German (Win32)
files:
- dark_hod.lvl: e7c188e5c47632d512d96d9da89fc8c060528d45
- dark_hod.mst: 6c2d93b2e31c299215d0fdf05ac1e8e8e95e9042
- dark_hod.sss: 8d5b19842e551b8ec73bda411c210cc96e08569a
- fort_hod.lvl: 82456ed6e29780b5b8031a67ba3dddb8da813c19
- fort_hod.mst: ce55095902ade9f1d8a198f271d0946d6228b90d
- fort_hod.sss: 6ff572b553d93040c9cad74891db05b2cc8267c6
- hod.dem: 5d40f812b6ed1385b7e502527911023f28136341
- hod.paf: f51a9f9addad0b21ab524840838fb8fd6e235396
- hod_res.dll: 09de4fb219ad63fc39f10a3f49bd7d003f3244b7
- hodwin32.exe: eb0f032f343e2c27d60291c79ae667034a0c7389
securom: false
version_info:
- Comments: Release Candidate 0
- CompanyName: Amazing Studio - 9 rue d' Enhgien - 75010 Paris FRANCE - Email: [email protected]
- FileDescription: Heart Of Darkness
- FileVersion: 1, 1, 0, 0
- InternalName: Heart Of Darkness
- LegalCopyright: (c) 1998 by Amazing Studio & Infogrames
- LegalTrademarks: by Amazing Studio - All rights reserved
- OriginalFilename: Heart Of Darkness
- PrivateBuild: HEARTMM5511
- ProductName: Heart Of Darkness - Windows 95 / 98 & NT - DirectX 3.x or greater
- ProductVersion: 1, 1, 0, 0
- SpecialBuild: VC5.0 Sp3
- isld_hod.lvl: f78e9316f2187c0ca9e42abe8a2242b3d3e6feaf
- isld_hod.mst: 448e5dd5bbe59621279562d8695c9a864cb4c286
- isld_hod.sss: 61c5da6dfcf80684c56baebddb04125ca0c1f209
- lar1_hod.lvl: 84f7b33a9b57f2afa68063e0128512991f86dfa0
- lar1_hod.mst: 9db53a4a75327eeca45ffa5b761a9f04af5e5204
- lar1_hod.sss: 72667991fde3caf36978da1fa929695de80abe4b
- lar2_hod.lvl: 999b2548490f586f955c9f5c6db95f88d49102f3
- lar2_hod.mst: 333ea4e6be6ca9aad735fafe59177546aab41c4e
- lar2_hod.sss: c5c655b718ead1d2eb460a058df7eb3b795dea9e
- lava_hod.lvl: 2921eb2f78354e79c1257ef55543bb1a1492e914
- lava_hod.mst: c05ce42c0abdbb2dbfc109cbb4ea7eee1937445d
- lava_hod.sss: 8fc8d2c86f67e13ca840d604c603249b20723f85
- pwr1_hod.lvl: cd6489e11914770d95034aa6afaa2fc67f035ce8
- pwr1_hod.mst: f821e5686ae27b2ed5000ea4b38a464ecebe44a7
- pwr1_hod.sss: cbb39e1bfd24dcbd5bf65f9e0b92faaa9b6b02a6
- pwr2_hod.lvl: 7263ecf8d51d45c2c62dc11701eac03b67738fd8
- pwr2_hod.mst: 132b29e758a28529009e979ef31a29a42d0a5c4b
- pwr2_hod.sss: 24342241b4353777cc22696be8a684d635f9c809
- rock_hod.lvl: cdb3d7ad1ae13f2234380f79bc8ec57e1e505cef
- rock_hod.mst: 5b49637348f6c6a2737a64cacf01f9bcef8e83f6
- rock_hod.sss: 55c841f6c091c2ae68f0636c075c66405d00cc6a
- setup.dat: d362500a5c028a35f9341c2cb5c69901afba87c3
- name: Heart of Darkness Italian (Win32)
files:
- dark_hod.lvl: e7c188e5c47632d512d96d9da89fc8c060528d45
Expand Down
29 changes: 9 additions & 20 deletions andy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1444,20 +1444,9 @@ void Game::setupAndyObjectMoveData(LvlObject *ptr) {
_andyMoveData.yPos = ptr->yPos;
_andyPosX = _res->_screensBasePos[ptr->screenNum].u + _andyMoveData.xPos;
_andyPosY = _res->_screensBasePos[ptr->screenNum].v + _andyMoveData.yPos;
_andyMoveData.anim = ptr->anim;
_andyMoveData.unkA = ptr->currentSprite;
_andyMoveData.frame = ptr->frame;
_andyMoveData.flags0 = ptr->flags0;
_andyMoveData.flags1 = ptr->flags1;
_andyMoveMask = (ptr->flags1 >> 4) & 3;
_andyMoveData.unk16 = ptr->width;
_andyMoveData.unk18 = ptr->height;
const LvlObjectData *dat = ptr->levelData0x2988;
_andyMoveData.unkC = dat->hotspotsCount;
_andyMoveData.unk1C = dat->animsInfoData;
_andyMoveData.framesData = dat->framesData;
_andyMoveData.unk24 = dat->movesData;
_andyMoveData.unk28 = dat->hotspotsData;
_andyLevelData0x288PosTablePtr = ptr->posTable;
}

Expand Down Expand Up @@ -1598,25 +1587,25 @@ void Game::updateAndyObject(LvlObject *ptr) {
uint16_t w, h;
_res->getLvlSpriteFramePtr(dat, ash->firstFrame, &w, &h);

ptr->flags1 = ((ptr->flags1 & 0x30) ^ ((asfh->unk5 & 3) << 4)) | (ptr->flags1 & ~0x30);
ptr->flags1 = ((ptr->flags1 & 0x30) ^ ((asfh->flags & 3) << 4)) | (ptr->flags1 & ~0x30);
int type = (ptr->flags1 >> 4) & 3;

switch (type) {
case 0:
ptr->xPos += asfh->unk6;
ptr->yPos += asfh->unk7;
ptr->xPos += asfh->xOffset;
ptr->yPos += asfh->yOffset;
break;
case 1:
ptr->xPos += ptr->width - asfh->unk6 - w;
ptr->yPos += asfh->unk7;
ptr->xPos += ptr->width - asfh->xOffset - w;
ptr->yPos += asfh->yOffset;
break;
case 2:
ptr->xPos += asfh->unk6;
ptr->yPos += ptr->height - asfh->unk7 - h;
ptr->xPos += asfh->xOffset;
ptr->yPos += ptr->height - asfh->yOffset - h;
break;
case 3:
ptr->xPos += ptr->width - asfh->unk6 - w;
ptr->yPos += ptr->height - asfh->unk7 - h;
ptr->xPos += ptr->width - asfh->xOffset - w;
ptr->yPos += ptr->height - asfh->yOffset - h;
break;
}

Expand Down
2 changes: 1 addition & 1 deletion benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "util.h"
#include "video.h"

uint32_t Game::benchmarkLoop(const uint8_t *p, int count) {
static uint32_t benchmarkLoop(const uint8_t *p, int count) {
uint32_t accum = 0;
count >>= 2; // sizeof(uint32_t)
if (count > 0) {
Expand Down
47 changes: 18 additions & 29 deletions defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ enum {
enum {
kNone = 0xFFFFFFFF, // (uint32_t)-1
kNoScreen = 0xFF, // (uint8_t)-1
kFrameDuration = 80, // original engine frame duration is 80ms (12.5hz)
kLvlAnimHdrOffset = 0x2C,
kMaxScreens = 40,
kMaxSpriteTypes = 32,
kMonsterInfoDataSize = 948 // (32 * 28 + 52)
kMonsterInfoSize = 28,
kMonsterInfoDataSize = 948 // (32 * kMonsterInfoSize + 52)
};

enum {
Expand Down Expand Up @@ -80,33 +82,33 @@ struct Point16_t {

struct AnimBackgroundData {
const uint8_t *currentSpriteData; // 0
uint8_t *nextSpriteData; // 4
uint8_t *otherSpriteData; // 8
const uint8_t *nextSpriteData; // 4
const uint8_t *otherSpriteData; // 8
uint16_t framesCount; // 12
uint16_t currentFrame; // 14
};

struct LvlAnimSeqHeader {
uint16_t firstFrame;
uint16_t unk2;
uint16_t unk2; // unused
int8_t dx; // 4
int8_t dy; // 5
uint8_t count; // 6
uint8_t unk7; // 7
uint8_t unk7; // unused
uint16_t sound;
uint16_t flags0;
uint16_t flags1;
uint16_t unkE;
uint16_t unkE; // unused
uint32_t offset; // 0x10, LvlAnimSeqFrameHeader
} PACKED; // sizeof == 20

struct LvlAnimSeqFrameHeader {
uint16_t move; // 0
uint16_t anim; // 2
uint8_t frame; // 4
uint8_t unk5; // 5
int8_t unk6;
int8_t unk7;
uint8_t flags; // 5
int8_t xOffset; // 6
int8_t yOffset; // 7
} PACKED; // sizeof == 8

struct LvlAnimHeader {
Expand Down Expand Up @@ -195,10 +197,10 @@ struct SssObject {
uint32_t flags0; // 0xC
uint32_t flags1; // 0x10
int32_t panning; // 0x14 panning default:64
int32_t volume; // 0x18 volume (db) default:128
int32_t volume; // 0x18 volume default:128
int panL; // 0x1C
int panR; // 0x20
int panType; // 0x24 : 0: silent, 1:fullRight 2:fullLeft 3:both
int panType; // 0x24 : 0: silent, 1:right 2:left 3:center 4:balance
const int16_t *currentPcmPtr; // 0x28
int32_t pcmFramesCount; // 0x2C
SssObject *prevPtr; // 0x30
Expand All @@ -217,9 +219,9 @@ struct SssObject {
int32_t panningModulateCurrent; // 0x64
int32_t panningModulateDelta; // 0x68
int32_t currentPcmFrame; // 0x6C
int *panningPtr; // 0x70
int *panningPtr; // 0x70 if != 0, panning is relative to the object position
LvlObject *lvlObject; // 0x74
int32_t nextSoundBank; // 0x78 indexes
int32_t nextSoundBank; // 0x78
int32_t nextSoundSample; // 0x7C
SssFilter *filter;
};
Expand Down Expand Up @@ -319,22 +321,9 @@ struct AndyShootData {
struct AndyMoveData {
int32_t xPos;
int32_t yPos;
uint16_t anim; // 8
uint16_t unkA;
uint16_t unkC;
uint16_t unkE;
uint8_t frame; // 0x10
uint8_t unk11;
uint16_t flags0;
uint16_t flags0; // 0x12
uint16_t flags1;
uint16_t unk16;
uint16_t unk18;
uint16_t unk1A;
const uint8_t *unk1C;
const uint8_t *framesData;
const uint8_t *unk24;
const uint8_t *unk28;
}; // sizeof == 0x2C
};

struct MstBoundingBox {
int x1; // 0
Expand Down Expand Up @@ -427,7 +416,7 @@ struct MonsterObject1 {
int collideDistance; // 0xEC
int shootActionIndex; // 0xF0 [0..8]
int shootSource; // 0xF4
uint8_t unkF8; // 0xF8
uint8_t goalDirectionKeyMask; // 0xF8
int shootDirection; // 0xFC
}; // sizeof == 256

Expand Down
Loading

0 comments on commit 912594e

Please sign in to comment.