File tree Expand file tree Collapse file tree 7 files changed +48
-10
lines changed Expand file tree Collapse file tree 7 files changed +48
-10
lines changed Original file line number Diff line number Diff line change @@ -386,10 +386,6 @@ void AdlEngine::initState() {
386
386
initGameState ();
387
387
}
388
388
389
- void AdlEngine::printRoomDescription () {
390
- printString (_roomData.description );
391
- }
392
-
393
389
byte AdlEngine::roomArg (byte room) const {
394
390
return room;
395
391
}
Original file line number Diff line number Diff line change @@ -241,7 +241,6 @@ friend class Console;
241
241
242
242
virtual void setupOpcodeTables ();
243
243
virtual void initState ();
244
- virtual void printRoomDescription ();
245
244
virtual byte roomArg (byte room) const ;
246
245
virtual void advanceClock () { }
247
246
Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ void AdlEngine_v2::showRoom() {
278
278
drawItems ();
279
279
280
280
_display->updateHiResScreen ();
281
- printRoomDescription ( );
281
+ printString (_roomData. description );
282
282
283
283
// FIXME: move to main loop?
284
284
_linesPrinted = 0 ;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class AdlEngine_v2 : public AdlEngine {
51
51
void drawItems ();
52
52
void drawItem (Item &item, const Common::Point &pos);
53
53
void loadRoom (byte roomNr);
54
- void showRoom ();
54
+ virtual void showRoom ();
55
55
void takeItem (byte noun);
56
56
57
57
virtual void applyDataBlockOffset (byte &track, byte §or) const { }
Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ void HiRes1Engine::showRoom() {
348
348
349
349
_display->updateHiResScreen ();
350
350
_messageDelay = false ;
351
- printRoomDescription ( );
351
+ printString (_roomData. description );
352
352
_messageDelay = true ;
353
353
}
354
354
Original file line number Diff line number Diff line change @@ -240,9 +240,51 @@ void HiRes6Engine::initGameState() {
240
240
_currVerb = _currNoun = 0 ;
241
241
}
242
242
243
- void HiRes6Engine::printRoomDescription () {
243
+ void HiRes6Engine::showRoom () {
244
+ bool redrawPic = false ;
245
+
246
+ if (getVar (26 ) == 0xfe )
247
+ setVar (26 , 0 );
248
+ else if (getVar (26 ) != 0xff )
249
+ setVar (26 , _state.room );
250
+
251
+ if (_state.room != _roomOnScreen) {
252
+ loadRoom (_state.room );
253
+
254
+ if (getVar (26 ) < 0x80 && getCurRoom ().isFirstTime )
255
+ setVar (26 , 0 );
256
+
257
+ clearScreen ();
258
+
259
+ if (!_state.isDark )
260
+ redrawPic = true ;
261
+ } else {
262
+ if (getCurRoom ().curPicture != _picOnScreen || _itemRemoved)
263
+ redrawPic = true ;
264
+ }
265
+
266
+ if (redrawPic) {
267
+ _roomOnScreen = _state.room ;
268
+ _picOnScreen = getCurRoom ().curPicture ;
269
+
270
+ drawPic (getCurRoom ().curPicture );
271
+ _itemRemoved = false ;
272
+ _itemsOnScreen = 0 ;
273
+
274
+ Common::List<Item>::iterator item;
275
+ for (item = _state.items .begin (); item != _state.items .end (); ++item)
276
+ item->isOnScreen = false ;
277
+ }
278
+
279
+ if (!_state.isDark )
280
+ drawItems ();
281
+
282
+ _display->updateHiResScreen ();
244
283
setVar (2 , 0xff );
245
- AdlEngine_v3::printRoomDescription ();
284
+ printString (_roomData.description );
285
+
286
+ // FIXME: move to main loop?
287
+ _linesPrinted = 0 ;
246
288
}
247
289
248
290
void HiRes6Engine::applyDataBlockOffset (byte &track, byte §or) const {
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ class HiRes6Engine : public AdlEngine_v3 {
58
58
void init ();
59
59
void initGameState ();
60
60
void printRoomDescription ();
61
+ void showRoom ();
61
62
62
63
// AdlEngine_v2
63
64
void printString (const Common::String &str);
You can’t perform that action at this time.
0 commit comments