aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/sprites.cpp27
-rw-r--r--engines/mads/sprites.h4
2 files changed, 26 insertions, 5 deletions
diff --git a/engines/mads/sprites.cpp b/engines/mads/sprites.cpp
index 8979fdb12c..be066ba2db 100644
--- a/engines/mads/sprites.cpp
+++ b/engines/mads/sprites.cpp
@@ -414,15 +414,34 @@ ImageInterEntry::ImageInterEntry() {
/*------------------------------------------------------------------------*/
-int ImageInterEntries::add(int field0, int field2) {
+void ImageInterEntries::add(int v1, int v2) {
ImageInterEntry ie;
- ie._field0 = field0;
- ie._field2 = field2;
+ ie._field0 = -2;
+ ie._field2 = -1;
+
+ push_back(ie);
+}
+
+void ImageInterEntries::add(int v1, int v2, int v3, int v4) {
+ assert(size() < 50);
+
+ ImageInterEntry ie;
+ ie._field0 = -3;
+ ie._field2 = 201;
+ ie._field6 = v1;
+ ie._field8 = v2;
+ ie._field4 = v3;
+ ie._field3 = v4;
push_back(ie);
- return size() - 1;
}
+ImageInterEntry &ImageInterEntries::add() {
+ resize(size() + 1);
+ return (*this)[size() - 1];
+}
+
+
void ImageInterEntries::call(int v1, int v2) {
debug("TODO: ImageInterEntries::call");
}
diff --git a/engines/mads/sprites.h b/engines/mads/sprites.h
index 2d5b2089b9..82f0a9b10d 100644
--- a/engines/mads/sprites.h
+++ b/engines/mads/sprites.h
@@ -240,7 +240,9 @@ public:
class ImageInterEntries: public Common::Array<ImageInterEntry> {
public:
- int add(int field0, int field2);
+ void add(int v1, int v2);
+ void add(int v1, int v2, int v3, int v4);
+ ImageInterEntry &add();
void call(int v1, int v2);
};