Skip to content

Commit

Permalink
ADL: Load verbs and nouns for hires2
Browse files Browse the repository at this point in the history
  • Loading branch information
waltervn committed Jun 6, 2016
1 parent e49085b commit ebb6ceb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
10 changes: 10 additions & 0 deletions engines/adl/hires2.cpp
Expand Up @@ -51,6 +51,16 @@ void HiRes2Engine::runIntro() const {
}

void HiRes2Engine::loadData() {
Common::File f;

if (!f.open(IDS_HR2_DISK_IMAGE))
error("Failed to open file '" IDS_HR2_DISK_IMAGE "'");

f.seek(IDI_HR2_OFS_VERBS);
loadWords(f, _verbs);

f.seek(IDI_HR2_OFS_NOUNS);
loadWords(f, _nouns);
}

void HiRes2Engine::initState() {
Expand Down
6 changes: 5 additions & 1 deletion engines/adl/hires2.h
Expand Up @@ -37,9 +37,13 @@ namespace Adl {
#define IDS_HR2_DISK_IMAGE "WIZARD.DSK"

// Track, sector, offset
#define TSO(T, S, O) (((T) * 16 + (S)) * 256 + (O))
#define TSO(TRACK, SECTOR, OFFSET) (((TRACK) * 16 + (SECTOR)) * 256 + (OFFSET))
#define TS(TRACK, SECTOR) TSO(TRACK, SECTOR, 0)
#define T(TRACK) TS(TRACK, 0)

#define IDI_HR2_OFS_INTRO_TEXT TSO(0x00, 0xd, 0x17)
#define IDI_HR2_OFS_VERBS T(0x19)
#define IDI_HR2_OFS_NOUNS TS(0x22, 0x2)

class HiRes2Engine : public AdlEngine {
public:
Expand Down

0 comments on commit ebb6ceb

Please sign in to comment.