From d6f93d06eeb5e8e8b8d14fbce887db7830baa568 Mon Sep 17 00:00:00 2001 From: uruk Date: Sat, 20 Jul 2013 12:16:06 +0200 Subject: AVALANCHE: Move flesh_colours() from Lucerna to Graph. Implement it. --- engines/avalanche/graph.cpp | 7 +++++++ engines/avalanche/graph.h | 2 ++ engines/avalanche/lucerna2.cpp | 32 ++------------------------------ 3 files changed, 11 insertions(+), 30 deletions(-) (limited to 'engines') diff --git a/engines/avalanche/graph.cpp b/engines/avalanche/graph.cpp index 7748dad083..078842a05f 100644 --- a/engines/avalanche/graph.cpp +++ b/engines/avalanche/graph.cpp @@ -66,6 +66,13 @@ Graph::~Graph() { _surface.free(); } + +void Graph::flesh_colours() +{ + g_system->getPaletteManager()->setPalette(_egaPalette[39], 13, 1); +} + + byte *Graph::getPixel(int16 x, int16 y) { return (byte *)_surface.getBasePtr(x, y); } diff --git a/engines/avalanche/graph.h b/engines/avalanche/graph.h index 4682ca67f8..7d6db70a13 100644 --- a/engines/avalanche/graph.h +++ b/engines/avalanche/graph.h @@ -67,6 +67,8 @@ public: ~Graph(); + void flesh_colours(); + byte *getPixel(int16 x, int16 y); void drawBar(int16 x1, int16 y1, int16 x2, int16 y2, int16 color); diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp index 614a08157d..5d60c75cd1 100644 --- a/engines/avalanche/lucerna2.cpp +++ b/engines/avalanche/lucerna2.cpp @@ -216,10 +216,10 @@ void Lucerna::load(byte n) { /* Load2, actually */ _vm->_gyro.off(); _vm->_gyro.clear_vmc(); + + _vm->_graph.flesh_colours(); xx = _vm->_gyro.strf(n); - flesh_colours(); - Common::String filename; filename = filename.format("place%s.avd", xx.c_str()); if (!f.open(filename)) { @@ -1283,34 +1283,6 @@ uint16 Lucerna::bearing(byte whichped) { return bearing_result; } -void Lucerna::flesh_colours() /* assembler; -asm - mov ax,$1012; - mov bx,21; { 21 = light pink (why?) } - mov cx,1; - mov dx,seg @flesh; - mov es,dx; - mov dx,offset @flesh; - int $10; - - mov dx,seg @darkflesh; - mov es,dx; - mov dx,offset @darkflesh; - mov bx,5; { 5 = dark pink. } - int $10; - - jmp @TheEnd; - - @flesh: - db 56,35,35; - - @darkflesh: - db 43,22,22; - - @TheEnd: */ -{ -} - void Lucerna::sprite_run() { /* A sprite run is performed before displaying a scroll, if not all the sprites are still. It performs two fast cycles, only using a few of -- cgit v1.2.3