aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorJoost Peters2003-04-29 20:05:47 +0000
committerJoost Peters2003-04-29 20:05:47 +0000
commit89b808cb18143de3bd3280b93486b1fd6fe12cb8 (patch)
tree9343a58b33093384bdd1a09aa69800d0523f4f84 /sky
parent5ea40b6778726f80e53a409f7cc8c5d75709aca3 (diff)
downloadscummvm-rg350-89b808cb18143de3bd3280b93486b1fd6fe12cb8.tar.gz
scummvm-rg350-89b808cb18143de3bd3280b93486b1fd6fe12cb8.tar.bz2
scummvm-rg350-89b808cb18143de3bd3280b93486b1fd6fe12cb8.zip
enabled lowTextManager
svn-id: r7203
Diffstat (limited to 'sky')
-rw-r--r--sky/logic.cpp10
-rw-r--r--sky/logic.h5
-rw-r--r--sky/sky.cpp5
3 files changed, 11 insertions, 9 deletions
diff --git a/sky/logic.cpp b/sky/logic.cpp
index 3b5498fe60..5c72b38549 100644
--- a/sky/logic.cpp
+++ b/sky/logic.cpp
@@ -48,9 +48,10 @@ static const LogicTable logicTable[] = {
&SkyLogic::simpleAnim, // 16 Module anim without x,y's
};
-SkyLogic::SkyLogic(SkyDisk *skyDisk, SkyGrid *skyGrid) {
+SkyLogic::SkyLogic(SkyDisk *skyDisk, SkyGrid *skyGrid, SkyText *skyText) {
_skyDisk = skyDisk;
_skyGrid = skyGrid;
+ _skyText = skyText;
_skyAutoRoute = new SkyAutoRoute(_skyGrid);
for (uint i = 0; i < sizeof(_moduleList)/sizeof(uint16*); i++)
@@ -952,8 +953,7 @@ uint32 SkyLogic::fnSpeakWaitDir(uint32 a, uint32 b, uint32 c) {
}
uint32 SkyLogic::fnChooser(uint32 a, uint32 b, uint32 c) {
- warning("fnChooser: lowTextManager unimplented");
- return 1;
+
// setup the text questions to be clicked on
// read from TEXT1 until 0
@@ -967,7 +967,9 @@ uint32 SkyLogic::fnChooser(uint32 a, uint32 b, uint32 c) {
while (*p) {
uint32 textNum = *p++;
- uint8 *data; // = lowTextManager(textNum, GAME_SCREEN_WIDTH, 0, 241, 0);
+ struct lowTextManager_t lowText = _skyText->lowTextManager(textNum, GAME_SCREEN_WIDTH, 0, 241, 0);
+
+ uint8 *data = lowText.textData;
// stipple the text
uint16 height = ((dataFileHeader *)data)->s_height;
diff --git a/sky/logic.h b/sky/logic.h
index 414b4acd33..40ac2aa717 100644
--- a/sky/logic.h
+++ b/sky/logic.h
@@ -29,7 +29,7 @@
class SkyLogic {
public:
- SkyLogic(SkyDisk *skyDisk, SkyGrid *skyGrid);
+ SkyLogic(SkyDisk *skyDisk, SkyGrid *skyGrid, SkyText *skyText);
void engine();
void lreturn();
@@ -167,7 +167,7 @@ public:
uint32 fnUnPauseFx(uint32 a, uint32 b, uint32 c);
uint32 fnPrintf(uint32 a, uint32 b, uint32 c);
- static uint16 SkyLogic::_screen;
+ static uint16 _screen;
protected:
void push(uint32);
@@ -185,6 +185,7 @@ protected:
SkyDisk *_skyDisk;
SkyGrid *_skyGrid;
+ SkyText *_skyText;
SkyAutoRoute *_skyAutoRoute;
};
diff --git a/sky/sky.cpp b/sky/sky.cpp
index bd944300d1..1f1d0e3924 100644
--- a/sky/sky.cpp
+++ b/sky/sky.cpp
@@ -106,7 +106,7 @@ void SkyState::initialise(void) {
_sound = new SkySound(_mixer);
_skyDisk = new SkyDisk(_gameDataPath);
- _music = new SkyMusic(_mixer,_skyDisk);
+ _music = new SkyMusic(_mixer, _skyDisk);
_gameVersion = _skyDisk->determineGameVersion();
_skyText = getSkyText();
@@ -116,9 +116,8 @@ void SkyState::initialise(void) {
initItemList();
//initScript();
//initialiseRouter();
- _skyText = getSkyText();
_grid = new SkyGrid(_skyDisk);
- _skyLogic = new SkyLogic(_skyDisk, _grid);
+ _skyLogic = new SkyLogic(_skyDisk, _grid, _skyText);
}
void SkyState::initItemList() {