From c187a3bda9da38080ebd1bfc7401f84e62db0858 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 20 Nov 2015 20:29:55 +0100 Subject: LAB: Add intro.h --- engines/lab/intro.h | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 engines/lab/intro.h (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h new file mode 100644 index 0000000000..724fedaa7e --- /dev/null +++ b/engines/lab/intro.h @@ -0,0 +1,56 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + + /* + * This code is based on Labyrinth of Time code with assistance of + * + * Copyright (c) 1993 Terra Nova Development + * Copyright (c) 2004 The Wyrmkeep Entertainment Co. + * + */ + +#ifndef LAB_INTRO_H +#define LAB_INTRO_H + +#include "lab/intro.h" +#include "lab/text.h" + +namespace Lab { + +class Intro { +public: + Intro(); + void introSequence(); + +private: + void introEatMessages(); + void doPictText(const char *Filename, bool isscreen); + void musicDelay(); + void nReadPict(const char *Filename, bool PlayOnce); + + TextFont _filler, *_msgfont; + bool _quitIntro, _introDoBlack; +}; + +} // End of namespace Lab + +#endif // LAB_INTRO_H -- cgit v1.2.3 From 0fbf62f7f0115a0ad04b594f834e41cb7f719072 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 1 Dec 2015 02:17:26 +0200 Subject: LAB: Plug several font-related memory leaks. Some cleanup --- engines/lab/intro.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index 724fedaa7e..2979bcd334 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -43,11 +43,10 @@ public: private: void introEatMessages(); - void doPictText(const char *Filename, bool isscreen); + void doPictText(const char *Filename, TextFont *msgFont, bool isscreen); void musicDelay(); void nReadPict(const char *Filename, bool PlayOnce); - TextFont _filler, *_msgfont; bool _quitIntro, _introDoBlack; }; -- cgit v1.2.3 From 9ac98357bdf0cfeb51242d84450c865eb5cb61c8 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 2 Dec 2015 23:10:41 +0100 Subject: LAB: Get rid of g_lab in Intro --- engines/lab/intro.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index 2979bcd334..47b61daeca 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -38,7 +38,7 @@ namespace Lab { class Intro { public: - Intro(); + Intro(LabEngine *vm); void introSequence(); private: @@ -47,6 +47,7 @@ private: void musicDelay(); void nReadPict(const char *Filename, bool PlayOnce); + LabEngine *_vm; bool _quitIntro, _introDoBlack; }; -- cgit v1.2.3 From 5636181b78bcffa934cb00b14edb68c2d3319139 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 7 Dec 2015 07:48:54 +0100 Subject: LAB: Move text functions to DisplayMan, some renaming --- engines/lab/intro.h | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index 47b61daeca..c532bdfa1e 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -32,7 +32,6 @@ #define LAB_INTRO_H #include "lab/intro.h" -#include "lab/text.h" namespace Lab { -- cgit v1.2.3 From eccb8527497e7f50d2de9c026e1c4c194096bc5f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 8 Dec 2015 20:31:21 +0100 Subject: LAB: Removed unnecessary includes --- engines/lab/intro.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index c532bdfa1e..323859c152 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -31,8 +31,6 @@ #ifndef LAB_INTRO_H #define LAB_INTRO_H -#include "lab/intro.h" - namespace Lab { class Intro { -- cgit v1.2.3 From 28c74aed05e6b7ea127bb521ea8c456075608b07 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 20 Dec 2015 02:42:52 +0100 Subject: LAB: More work on the comments --- engines/lab/intro.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index 323859c152..ac292d0769 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -36,11 +36,27 @@ namespace Lab { class Intro { public: Intro(LabEngine *vm); + + /** + * Does the introduction sequence for Labyrinth. + */ void introSequence(); private: + /** + * Goes through, and responds to all the intuition messages currently in the + * message queue. + */ void introEatMessages(); + + /** + * Reads in a picture. + */ void doPictText(const char *Filename, TextFont *msgFont, bool isscreen); + + /** + * Does a one second delay, but checks the music while doing it. + */ void musicDelay(); void nReadPict(const char *Filename, bool PlayOnce); -- cgit v1.2.3 From ae9c2fea51adb1e5b713683e1fadfbb11558c267 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 20 Dec 2015 16:02:35 +0100 Subject: LAB: Replace char* by Common::String in several functions --- engines/lab/intro.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index ac292d0769..6f7bc97cfa 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -52,13 +52,13 @@ private: /** * Reads in a picture. */ - void doPictText(const char *Filename, TextFont *msgFont, bool isscreen); + void doPictText(const Common::String Filename, TextFont *msgFont, bool isScreen); /** * Does a one second delay, but checks the music while doing it. */ void musicDelay(); - void nReadPict(const char *Filename, bool PlayOnce); + void nReadPict(const Common::String Filename, bool PlayOnce); LabEngine *_vm; bool _quitIntro, _introDoBlack; -- cgit v1.2.3 From 4dfc428bac7e80a89e9177786b806d8ad0436078 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 20 Dec 2015 16:46:45 +0100 Subject: LAB: Some cleanup and refactoring --- engines/lab/intro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index 6f7bc97cfa..7eb4c6dc78 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -58,7 +58,7 @@ private: * Does a one second delay, but checks the music while doing it. */ void musicDelay(); - void nReadPict(const Common::String Filename, bool PlayOnce); + void nReadPict(const Common::String Filename, bool PlayOnce = true); LabEngine *_vm; bool _quitIntro, _introDoBlack; -- cgit v1.2.3 From e8edff85f395d8c812f154c230300fd70b127171 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 23 Dec 2015 18:15:14 +0100 Subject: LAB: Synchronize function definition in Intro --- engines/lab/intro.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index 7eb4c6dc78..fd72190b61 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -52,13 +52,13 @@ private: /** * Reads in a picture. */ - void doPictText(const Common::String Filename, TextFont *msgFont, bool isScreen); + void doPictText(const Common::String filename, TextFont *msgFont, bool isScreen); /** * Does a one second delay, but checks the music while doing it. */ void musicDelay(); - void nReadPict(const Common::String Filename, bool PlayOnce = true); + void nReadPict(const Common::String filename, bool playOnce = true); LabEngine *_vm; bool _quitIntro, _introDoBlack; -- cgit v1.2.3 From aa104040d47bc280cccb8befd1f7b2bad82b8634 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 24 Dec 2015 01:42:21 +0100 Subject: LAB: Simplify the calls to doPictText --- engines/lab/intro.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index fd72190b61..0c2bc6d99c 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -52,7 +52,7 @@ private: /** * Reads in a picture. */ - void doPictText(const Common::String filename, TextFont *msgFont, bool isScreen); + void doPictText(const Common::String filename, bool isScreen = false); /** * Does a one second delay, but checks the music while doing it. @@ -62,6 +62,7 @@ private: LabEngine *_vm; bool _quitIntro, _introDoBlack; + TextFont *_font; }; } // End of namespace Lab -- cgit v1.2.3 From f4bc3c0ab424ea5c7a123ad21814a6c0fae10847 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 24 Dec 2015 01:47:53 +0100 Subject: LAB: Rename main intro function --- engines/lab/intro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index 0c2bc6d99c..991db2f3f4 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -40,7 +40,7 @@ public: /** * Does the introduction sequence for Labyrinth. */ - void introSequence(); + void play(); private: /** -- cgit v1.2.3 From ba243ea58781a7f52ccee526655e305a3daacfbb Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 24 Dec 2015 02:03:00 +0100 Subject: LAB: Handle intro font in intro constructor and destructor --- engines/lab/intro.h | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index 991db2f3f4..9961be6226 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -36,6 +36,7 @@ namespace Lab { class Intro { public: Intro(LabEngine *vm); + ~Intro(); /** * Does the introduction sequence for Labyrinth. -- cgit v1.2.3 From b72c02bad44749a1355acefdb198e36b2e772575 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 5 Jan 2016 21:46:53 +0200 Subject: LAB: Simplify and clean up the intro code --- engines/lab/intro.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'engines/lab/intro.h') diff --git a/engines/lab/intro.h b/engines/lab/intro.h index 9961be6226..f86d3baf69 100644 --- a/engines/lab/intro.h +++ b/engines/lab/intro.h @@ -55,14 +55,10 @@ private: */ void doPictText(const Common::String filename, bool isScreen = false); - /** - * Does a one second delay, but checks the music while doing it. - */ - void musicDelay(); - void nReadPict(const Common::String filename, bool playOnce = true); + void nReadPict(const Common::String filename, bool playOnce = true, bool noPalChange = false, bool doBlack = false, int wait = 0); LabEngine *_vm; - bool _quitIntro, _introDoBlack; + bool _quitIntro; TextFont *_font; }; -- cgit v1.2.3