aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2011-07-10 10:04:41 +1000
committerPaul Gilbert2011-07-10 10:04:41 +1000
commit622dc2d503c247e750d82fb9dea885bcf14881ed (patch)
tree90942a42f8cc341d6001f4ccdc0be8a0a1c0f602 /engines
parent9d40a1ba9d79fd8623dc0525cf25cfc4756a36d2 (diff)
downloadscummvm-rg350-622dc2d503c247e750d82fb9dea885bcf14881ed.tar.gz
scummvm-rg350-622dc2d503c247e750d82fb9dea885bcf14881ed.tar.bz2
scummvm-rg350-622dc2d503c247e750d82fb9dea885bcf14881ed.zip
CGE: Created a CavLight class to encapsulate the PR sprite array
Diffstat (limited to 'engines')
-rw-r--r--engines/cge/cge.cpp5
-rw-r--r--engines/cge/cge_main.cpp1
-rw-r--r--engines/cge/cge_main.h1
-rw-r--r--engines/cge/vga13h.cpp9
-rw-r--r--engines/cge/vga13h.h5
5 files changed, 15 insertions, 6 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp
index 5ce83f109d..6dbe12d9c6 100644
--- a/engines/cge/cge.cpp
+++ b/engines/cge/cge.cpp
@@ -69,8 +69,6 @@ void CGEEngine::setup() {
Talk::init();
// Initialise sprite arrays used by game objects
- PR[0] = new Bitmap("PRESS", true);
- PR[1] = NULL;
SP[0] = new Bitmap("SPK_L", true);
SP[1] = new Bitmap("SPK_R", true);
SP[2] = NULL;
@@ -93,7 +91,7 @@ void CGEEngine::setup() {
_shadow = new Sprite(this, NULL);
_horzLine = new HorizLine(this);
_infoLine = new InfoLine(this, INFO_W);
- _cavLight = new Sprite(this, PR);
+ _cavLight = new CavLight(this);
_debugLine = new InfoLine(this, SCR_WID);
_snail = new Snail(this, false);
_snail_ = new Snail(this, true);
@@ -155,7 +153,6 @@ CGEEngine::~CGEEngine() {
delete _infoLine;
delete _cavLight;
delete _debugLine;
- delete PR[0];
delete SP[0];
delete SP[1];
delete LI[0];
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index 7edfd9b1d1..4632caabfa 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -75,7 +75,6 @@ InfoLine *_infoLine;
Sprite *_cavLight;
InfoLine *_debugLine;
-BMP_PTR PR[2];
BMP_PTR SP[3];
BMP_PTR LI[5];
diff --git a/engines/cge/cge_main.h b/engines/cge/cge_main.h
index 6455b0d3ca..d7594c94d9 100644
--- a/engines/cge/cge_main.h
+++ b/engines/cge/cge_main.h
@@ -180,7 +180,6 @@ extern InfoLine *_infoLine;
extern Sprite *_cavLight;
extern InfoLine *_debugLine;
extern BMP_PTR MC[3];
-extern BMP_PTR PR[2];
extern BMP_PTR SP[3];
extern BMP_PTR LI[5];
extern Snail *_snail;
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index fb1c89ef5e..1f12dd8aa9 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -1371,4 +1371,13 @@ HorizLine::HorizLine(CGEEngine *vm): Sprite(vm, NULL) {
setShapeList(HL);
}
+CavLight::CavLight(CGEEngine *vm): Sprite(vm, NULL) {
+ // Set the sprite list
+ BMP_PTR *PR = new BMP_PTR[2];
+ PR[0] = new Bitmap("PRESS", true);
+ PR[1] = NULL;
+
+ setShapeList(PR);
+}
+
} // End of namespace CGE
diff --git a/engines/cge/vga13h.h b/engines/cge/vga13h.h
index d9aba0468e..6ee4c6f320 100644
--- a/engines/cge/vga13h.h
+++ b/engines/cge/vga13h.h
@@ -311,6 +311,11 @@ public:
HorizLine(CGEEngine *vm);
};
+class CavLight: public Sprite {
+public:
+ CavLight(CGEEngine *vm);
+};
+
Dac mkDac(uint8 r, uint8 g, uint8 b);
Rgb mkRgb(uint8 r, uint8 g, uint8 b);