From 2fb9edc4ee80c99b5a56a66cf52c614939748bd9 Mon Sep 17 00:00:00 2001
From: Paul Gilbert
Date: Sat, 15 Mar 2014 21:51:40 -0400
Subject: MADS: Added some more ImageInterEntries methods

---
 engines/mads/sprites.cpp | 27 +++++++++++++++++++++++----
 engines/mads/sprites.h   |  4 +++-
 2 files changed, 26 insertions(+), 5 deletions(-)

(limited to 'engines/mads')

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);
 };
-- 
cgit v1.2.3