Move ITE_* and IHNM_* to Scene class.
svn-id: r14560
This commit is contained in:
parent
f9b1c3991c
commit
a8ea40756f
8 changed files with 198 additions and 219 deletions
|
@ -31,8 +31,8 @@
|
|||
|
||||
#include "saga/rscfile_mod.h"
|
||||
#include "saga/cvar_mod.h"
|
||||
#include "saga/ite_introproc_mod.h"
|
||||
#include "saga/interface.h"
|
||||
#include "saga/scene.h"
|
||||
|
||||
#include "saga/game_mod.h"
|
||||
#include "saga/game.h"
|
||||
|
@ -364,7 +364,7 @@ int LoadLanguage() {
|
|||
return R_FAILURE;
|
||||
}
|
||||
|
||||
if (ITE_IntroRegisterLang() != R_SUCCESS) {
|
||||
if (_vm->_scene->ITEIntroRegisterLang() != R_SUCCESS) {
|
||||
warning("Error registering intro sequence language cvars");
|
||||
return R_FAILURE;
|
||||
}
|
||||
|
|
|
@ -33,15 +33,9 @@
|
|||
#include "saga/rscfile_mod.h"
|
||||
|
||||
#include "saga/scene.h"
|
||||
#include "saga/ihnm_introproc.h"
|
||||
|
||||
namespace Saga {
|
||||
|
||||
int IHNM_IntroMovieProc1(int param, R_SCENE_INFO *scene_info);
|
||||
int IHNM_IntroMovieProc2(int param, R_SCENE_INFO *scene_info);
|
||||
int IHNM_IntroMovieProc3(int param, R_SCENE_INFO *scene_info);
|
||||
int IHNM_HateProc(int param, R_SCENE_INFO *scene_info);
|
||||
|
||||
R_SCENE_RESLIST IHNM_IntroMovie1RL[] = {
|
||||
{30, SAGA_BG_IMAGE, 0, 0} ,
|
||||
{31, SAGA_ANIM_1, 0, 0}
|
||||
|
@ -87,13 +81,13 @@ R_SCENE_DESC IHNM_IntroMovie4Desc = {
|
|||
};
|
||||
|
||||
R_SCENE_QUEUE IHNM_IntroList[] = {
|
||||
{0, &IHNM_IntroMovie1Desc, BY_DESC, IHNM_IntroMovieProc1, 0, SCENE_NOFADE},
|
||||
{0, &IHNM_IntroMovie2Desc, BY_DESC, IHNM_IntroMovieProc2, 0, SCENE_NOFADE},
|
||||
{0, &IHNM_IntroMovie3Desc, BY_DESC, IHNM_IntroMovieProc3, 0, SCENE_NOFADE},
|
||||
{0, &IHNM_IntroMovie4Desc, BY_DESC, IHNM_HateProc, 0, SCENE_NOFADE}
|
||||
{0, &IHNM_IntroMovie1Desc, BY_DESC, Scene::SC_IHNMIntroMovieProc1, 0, SCENE_NOFADE},
|
||||
{0, &IHNM_IntroMovie2Desc, BY_DESC, Scene::SC_IHNMIntroMovieProc2, 0, SCENE_NOFADE},
|
||||
{0, &IHNM_IntroMovie3Desc, BY_DESC, Scene::SC_IHNMIntroMovieProc3, 0, SCENE_NOFADE},
|
||||
{0, &IHNM_IntroMovie4Desc, BY_DESC, Scene::SC_IHNMHateProc, 0, SCENE_NOFADE}
|
||||
};
|
||||
|
||||
int IHNM_StartProc() {
|
||||
int Scene::IHNMStartProc() {
|
||||
size_t n_introscenes;
|
||||
size_t i;
|
||||
|
||||
|
@ -106,7 +100,11 @@ int IHNM_StartProc() {
|
|||
return R_SUCCESS;
|
||||
}
|
||||
|
||||
int IHNM_IntroMovieProc1(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::SC_IHNMIntroMovieProc1(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->IHNMIntroMovieProc1(param, scene_info);
|
||||
}
|
||||
|
||||
int Scene::IHNMIntroMovieProc1(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
|
||||
switch (param) {
|
||||
|
@ -130,7 +128,11 @@ int IHNM_IntroMovieProc1(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int IHNM_IntroMovieProc2(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::SC_IHNMIntroMovieProc2(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->IHNMIntroMovieProc2(param, scene_info);
|
||||
}
|
||||
|
||||
int Scene::IHNMIntroMovieProc2(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
R_EVENT *q_event;
|
||||
PALENTRY *pal;
|
||||
|
@ -191,7 +193,11 @@ int IHNM_IntroMovieProc2(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int IHNM_IntroMovieProc3(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::SC_IHNMIntroMovieProc3(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->IHNMIntroMovieProc3(param, scene_info);
|
||||
}
|
||||
|
||||
int Scene::IHNMIntroMovieProc3(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
R_EVENT *q_event;
|
||||
PALENTRY *pal;
|
||||
|
@ -250,7 +256,11 @@ int IHNM_IntroMovieProc3(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int IHNM_HateProc(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::SC_IHNMHateProc(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->IHNMHateProc(param, scene_info);
|
||||
}
|
||||
|
||||
int Scene::IHNMHateProc(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
R_EVENT *q_event;
|
||||
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2004 The ScummVM project
|
||||
*
|
||||
* The ReInherit Engine is (C)2000-2003 by Daniel Balsom.
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Header$
|
||||
*
|
||||
*/
|
||||
|
||||
// Intro sequence scene procedures header file
|
||||
|
||||
#ifndef SAGA_IHNM_INTRO_H_
|
||||
#define SAGA_IHNM_INTRO_H_
|
||||
|
||||
namespace Saga {
|
||||
|
||||
#define R_IHNM_PALFADE_TIME 1000
|
||||
#define R_IHNM_INTRO_FRAMETIME 80
|
||||
#define R_IHNM_DGLOGO_TIME 8000
|
||||
#define R_IHNM_TITLE_TIME 16000
|
||||
|
||||
int IHNM_StartProc();
|
||||
|
||||
} // End of namespace Saga
|
||||
|
||||
#endif
|
|
@ -40,20 +40,9 @@
|
|||
#include "saga/music.h"
|
||||
|
||||
#include "saga/scene.h"
|
||||
#include "saga/ite_introproc.h"
|
||||
|
||||
namespace Saga {
|
||||
|
||||
int ITE_IntroAnimProc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITE_IntroCave1Proc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITE_IntroCave2Proc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITE_IntroCave3Proc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITE_IntroCave4Proc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITE_IntroValleyProc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITE_IntroTreeHouseProc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITE_IntroFairePathProc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITE_IntroFaireTentProc(int param, R_SCENE_INFO *scene_info);
|
||||
|
||||
static R_INTRO_DIALOGUE IntroDiag[] = {
|
||||
{
|
||||
CAVE_VOICE_0, "intro1a",
|
||||
|
@ -123,18 +112,18 @@ static R_INTRO_DIALOGUE IntroDiag[] = {
|
|||
};
|
||||
|
||||
R_SCENE_QUEUE ITE_IntroList[] = {
|
||||
{ITE_INTRO_ANIM_SCENE, NULL, BY_RESOURCE, ITE_IntroAnimProc, 0, SCENE_NOFADE},
|
||||
{ITE_CAVE_SCENE_1, NULL, BY_RESOURCE, ITE_IntroCave1Proc, 0, SCENE_FADE_NO_INTERFACE},
|
||||
{ITE_CAVE_SCENE_2, NULL, BY_RESOURCE, ITE_IntroCave2Proc, 0, SCENE_NOFADE},
|
||||
{ITE_CAVE_SCENE_3, NULL, BY_RESOURCE, ITE_IntroCave3Proc, 0, SCENE_NOFADE},
|
||||
{ITE_CAVE_SCENE_4, NULL, BY_RESOURCE, ITE_IntroCave4Proc, 0, SCENE_NOFADE},
|
||||
{ITE_VALLEY_SCENE, NULL, BY_RESOURCE, ITE_IntroValleyProc, 0, SCENE_FADE_NO_INTERFACE},
|
||||
{ITE_TREEHOUSE_SCENE, NULL, BY_RESOURCE, ITE_IntroTreeHouseProc, 0, SCENE_NOFADE},
|
||||
{ITE_FAIREPATH_SCENE, NULL, BY_RESOURCE, ITE_IntroFairePathProc, 0, SCENE_NOFADE},
|
||||
{ITE_FAIRETENT_SCENE, NULL, BY_RESOURCE, ITE_IntroFaireTentProc, 0, SCENE_NOFADE}
|
||||
{ITE_INTRO_ANIM_SCENE, NULL, BY_RESOURCE, Scene::SC_ITEIntroAnimProc, 0, SCENE_NOFADE},
|
||||
{ITE_CAVE_SCENE_1, NULL, BY_RESOURCE, Scene::SC_ITEIntroCave1Proc, 0, SCENE_FADE_NO_INTERFACE},
|
||||
{ITE_CAVE_SCENE_2, NULL, BY_RESOURCE, Scene::SC_ITEIntroCave2Proc, 0, SCENE_NOFADE},
|
||||
{ITE_CAVE_SCENE_3, NULL, BY_RESOURCE, Scene::SC_ITEIntroCave3Proc, 0, SCENE_NOFADE},
|
||||
{ITE_CAVE_SCENE_4, NULL, BY_RESOURCE, Scene::SC_ITEIntroCave4Proc, 0, SCENE_NOFADE},
|
||||
{ITE_VALLEY_SCENE, NULL, BY_RESOURCE, Scene::SC_ITEIntroValleyProc, 0, SCENE_FADE_NO_INTERFACE},
|
||||
{ITE_TREEHOUSE_SCENE, NULL, BY_RESOURCE, Scene::SC_ITEIntroTreeHouseProc, 0, SCENE_NOFADE},
|
||||
{ITE_FAIREPATH_SCENE, NULL, BY_RESOURCE, Scene::SC_ITEIntroFairePathProc, 0, SCENE_NOFADE},
|
||||
{ITE_FAIRETENT_SCENE, NULL, BY_RESOURCE, Scene::SC_ITEIntroFaireTentProc, 0, SCENE_NOFADE}
|
||||
};
|
||||
|
||||
int ITE_StartProc() {
|
||||
int Scene::ITEStartProc() {
|
||||
size_t n_introscenes;
|
||||
size_t i;
|
||||
|
||||
|
@ -160,7 +149,7 @@ int ITE_StartProc() {
|
|||
return R_SUCCESS;
|
||||
}
|
||||
|
||||
int ITE_IntroRegisterLang() {
|
||||
int Scene::ITEIntroRegisterLang() {
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < ARRAYSIZE(IntroDiag); i++) {
|
||||
|
@ -175,8 +164,12 @@ int ITE_IntroRegisterLang() {
|
|||
return R_SUCCESS;
|
||||
}
|
||||
|
||||
int Scene::SC_ITEIntroAnimProc(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->ITEIntroAnimProc(param, scene_info);
|
||||
}
|
||||
|
||||
// Handles the introductory Dreamer's Guild / NWC logo animation scene.
|
||||
int ITE_IntroAnimProc(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::ITEIntroAnimProc(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
|
||||
switch (param) {
|
||||
|
@ -233,8 +226,12 @@ int ITE_IntroAnimProc(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int Scene::SC_ITEIntroCave1Proc(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->ITEIntroCave1Proc(param, scene_info);
|
||||
}
|
||||
|
||||
// Handles first introductory cave painting scene
|
||||
int ITE_IntroCave1Proc(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::ITEIntroCave1Proc(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
R_EVENT *q_event;
|
||||
int event_time = 0;
|
||||
|
@ -321,8 +318,12 @@ int ITE_IntroCave1Proc(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int Scene::SC_ITEIntroCave2Proc(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->ITEIntroCave2Proc(param, scene_info);
|
||||
}
|
||||
|
||||
// Handles second introductory cave painting scene
|
||||
int ITE_IntroCave2Proc(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::ITEIntroCave2Proc(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
R_EVENT *q_event;
|
||||
int event_time = 0;
|
||||
|
@ -417,8 +418,12 @@ int ITE_IntroCave2Proc(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int Scene::SC_ITEIntroCave3Proc(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->ITEIntroCave3Proc(param, scene_info);
|
||||
}
|
||||
|
||||
// Handles third introductory cave painting scene
|
||||
int ITE_IntroCave3Proc(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::ITEIntroCave3Proc(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
R_EVENT *q_event;
|
||||
int event_time = 0;
|
||||
|
@ -514,8 +519,12 @@ int ITE_IntroCave3Proc(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int Scene::SC_ITEIntroCave4Proc(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->ITEIntroCave4Proc(param, scene_info);
|
||||
}
|
||||
|
||||
// Handles fourth introductory cave painting scene
|
||||
int ITE_IntroCave4Proc(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::ITEIntroCave4Proc(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
R_EVENT *q_event;
|
||||
int event_time = 0;
|
||||
|
@ -611,8 +620,12 @@ int ITE_IntroCave4Proc(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int Scene::SC_ITEIntroValleyProc(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->ITEIntroValleyProc(param, scene_info);
|
||||
}
|
||||
|
||||
// Handles intro title scene (valley overlook)
|
||||
int ITE_IntroValleyProc(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::ITEIntroValleyProc(int param, R_SCENE_INFO *scene_info) {
|
||||
R_TEXTLIST_ENTRY text_entry;
|
||||
R_TEXTLIST_ENTRY *entry_p;
|
||||
R_EVENT event;
|
||||
|
@ -752,8 +765,12 @@ int ITE_IntroValleyProc(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int Scene::SC_ITEIntroTreeHouseProc(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->ITEIntroTreeHouseProc(param, scene_info);
|
||||
}
|
||||
|
||||
// Handles second intro credit screen (treehouse view)
|
||||
int ITE_IntroTreeHouseProc(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::ITEIntroTreeHouseProc(int param, R_SCENE_INFO *scene_info) {
|
||||
R_TEXTLIST_ENTRY text_entry;
|
||||
R_TEXTLIST_ENTRY *entry_p;
|
||||
R_EVENT event;
|
||||
|
@ -858,8 +875,12 @@ int ITE_IntroTreeHouseProc(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int Scene::SC_ITEIntroFairePathProc(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->ITEIntroFairePathProc(param, scene_info);
|
||||
}
|
||||
|
||||
// Handles third intro credit screen (path to puzzle tent)
|
||||
int ITE_IntroFairePathProc(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::ITEIntroFairePathProc(int param, R_SCENE_INFO *scene_info) {
|
||||
R_TEXTLIST_ENTRY text_entry;
|
||||
R_TEXTLIST_ENTRY *entry_p;
|
||||
R_EVENT event;
|
||||
|
@ -967,8 +988,12 @@ int ITE_IntroFairePathProc(int param, R_SCENE_INFO *scene_info) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int Scene::SC_ITEIntroFaireTentProc(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->ITEIntroFaireTentProc(param, scene_info);
|
||||
}
|
||||
|
||||
// Handles fourth intro credit screen (treehouse view)
|
||||
int ITE_IntroFaireTentProc(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::ITEIntroFaireTentProc(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
R_EVENT *q_event;
|
||||
R_EVENT *q_event_start;
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2004 The ScummVM project
|
||||
*
|
||||
* The ReInherit Engine is (C)2000-2003 by Daniel Balsom.
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Header$
|
||||
*
|
||||
*/
|
||||
|
||||
// Intro sequence scene procedures header file
|
||||
|
||||
#ifndef SAGA_ITE_INTRO_H_
|
||||
#define SAGA_ITE_INTRO_H_
|
||||
|
||||
namespace Saga {
|
||||
|
||||
#define R_INTRO_STRMAX 256
|
||||
|
||||
#define ITE_INTRO_FRAMETIME 90
|
||||
|
||||
#define INTRO_CAPTION_Y 170
|
||||
#define VOICE_PAD 50
|
||||
#define VOICE_LETTERLEN 90
|
||||
|
||||
#define PALETTE_FADE_DURATION 1000
|
||||
#define DISSOLVE_DURATION 3000
|
||||
#define LOGO_DISSOLVE_DURATION 1000
|
||||
|
||||
#define CREDIT_DURATION1 4000
|
||||
|
||||
enum R_INTRO_SCENE_DIALOGUE_INFO {
|
||||
INTRO_CAVE1_START = 0,
|
||||
INTRO_CAVE1_END = 4,
|
||||
|
||||
INTRO_CAVE2_START = 4,
|
||||
INTRO_CAVE2_END = 7,
|
||||
|
||||
INTRO_CAVE3_START = 7,
|
||||
INTRO_CAVE3_END = 10,
|
||||
|
||||
INTRO_CAVE4_START = 10,
|
||||
INTRO_CAVE4_END = 14
|
||||
};
|
||||
|
||||
struct R_INTRO_DIALOGUE {
|
||||
uint32 i_voice_rn;
|
||||
const char *i_cvar_name;
|
||||
char i_str[R_INTRO_STRMAX];
|
||||
};
|
||||
|
||||
struct INTRO_CAPTION {
|
||||
int res_n;
|
||||
char *caption;
|
||||
};
|
||||
|
||||
struct INTRO_CREDIT {
|
||||
int text_x;
|
||||
int text_y;
|
||||
int delta_time;
|
||||
int duration;
|
||||
const char *string;
|
||||
int font_id;
|
||||
};
|
||||
|
||||
int ITE_StartProc();
|
||||
|
||||
} // End of namespace Saga
|
||||
|
||||
#endif /* SAGA_ITE_INTRO_H_ */
|
|
@ -1,35 +0,0 @@
|
|||
/* ScummVM - Scumm Interpreter
|
||||
* Copyright (C) 2004 The ScummVM project
|
||||
*
|
||||
* The ReInherit Engine is (C)2000-2003 by Daniel Balsom.
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* $Header$
|
||||
*
|
||||
*/
|
||||
|
||||
// Intro sequence scene procedures - public header file
|
||||
|
||||
#ifndef SAGA_ITE_INTROPROC_MOD_H_
|
||||
#define SAGA_ITE_INTROPROC_MOD_H_
|
||||
|
||||
namespace Saga {
|
||||
|
||||
int ITE_IntroRegisterLang(void);
|
||||
|
||||
} // End of namespace Saga
|
||||
|
||||
#endif
|
|
@ -44,17 +44,12 @@
|
|||
#include "saga/music.h"
|
||||
|
||||
#include "saga/scene.h"
|
||||
#include "saga/ite_introproc.h"
|
||||
#include "saga/ihnm_introproc.h"
|
||||
|
||||
namespace Saga {
|
||||
|
||||
static void CF_scenechange(int argc, char *argv[], void *refCon);
|
||||
static void CF_sceneinfo(int argc, char *argv[], void *refCon);
|
||||
|
||||
int defaultScene(int param, R_SCENE_INFO *scene_info);
|
||||
|
||||
|
||||
int Scene::reg() {
|
||||
CVAR_Register_I(&_sceneNumber, "scene", NULL, R_CVAR_READONLY, 0, 0);
|
||||
CVAR_RegisterFunc(CF_scenechange, "scene_change", "<Scene number>", R_CVAR_NONE, 1, 1, this);
|
||||
|
@ -186,10 +181,10 @@ int Scene::startScene() {
|
|||
|
||||
switch (GAME_GetGameType()) {
|
||||
case R_GAMETYPE_ITE:
|
||||
ITE_StartProc();
|
||||
ITEStartProc();
|
||||
break;
|
||||
case R_GAMETYPE_IHNM:
|
||||
IHNM_StartProc();
|
||||
IHNMStartProc();
|
||||
break;
|
||||
default:
|
||||
warning("Scene::start(): Error: Can't start game... gametype not supported");
|
||||
|
@ -321,7 +316,7 @@ int Scene::changeScene(int scene_num) {
|
|||
}
|
||||
|
||||
endScene();
|
||||
loadScene(scene_num, BY_SCENE, defaultScene, NULL, false);
|
||||
loadScene(scene_num, BY_SCENE, SC_defaultScene, NULL, false);
|
||||
|
||||
return R_SUCCESS;
|
||||
}
|
||||
|
@ -540,14 +535,14 @@ int Scene::loadScene(int scene_num, int load_flag, R_SCENE_PROC scene_proc, R_SC
|
|||
}
|
||||
|
||||
if (scene_proc == NULL) {
|
||||
_sceneProc = defaultScene;
|
||||
_sceneProc = SC_defaultScene;
|
||||
} else {
|
||||
_sceneProc = scene_proc;
|
||||
}
|
||||
|
||||
getInfo(&scene_info);
|
||||
|
||||
_sceneProc(SCENE_BEGIN, &scene_info);
|
||||
_sceneProc(SCENE_BEGIN, &scene_info, this);
|
||||
|
||||
return R_SUCCESS;
|
||||
}
|
||||
|
@ -822,7 +817,7 @@ int Scene::endScene() {
|
|||
|
||||
getInfo(&scene_info);
|
||||
|
||||
_sceneProc(SCENE_END, &scene_info);
|
||||
_sceneProc(SCENE_END, &scene_info, this);
|
||||
|
||||
if (_desc.scriptNum > 0) {
|
||||
_vm->_script->freeScript();
|
||||
|
@ -912,7 +907,11 @@ static void CF_sceneinfo(int argc, char *argv[], void *refCon) {
|
|||
((Scene *)refCon)->sceneInfoCmd(argc, argv);
|
||||
}
|
||||
|
||||
int defaultScene(int param, R_SCENE_INFO *scene_info) {
|
||||
int Scene::SC_defaultScene(int param, R_SCENE_INFO *scene_info, void *refCon) {
|
||||
return ((Scene *)refCon)->defaultScene(param, scene_info);
|
||||
}
|
||||
|
||||
int Scene::defaultScene(int param, R_SCENE_INFO *scene_info) {
|
||||
R_EVENT event;
|
||||
|
||||
switch (param) {
|
||||
|
@ -949,6 +948,10 @@ int defaultScene(int param, R_SCENE_INFO *scene_info) {
|
|||
_vm->_anim->setFlag(0, ANIM_LOOP);
|
||||
_vm->_anim->play(0, 0);
|
||||
|
||||
if (_desc.startScriptNum > 0) {
|
||||
debug(0, "Starting start script #%d", _desc.startScriptNum);
|
||||
}
|
||||
|
||||
debug(0, "Scene started");
|
||||
break;
|
||||
case SCENE_END:
|
||||
|
|
101
saga/scene.h
101
saga/scene.h
|
@ -57,7 +57,7 @@ struct R_SCENE_INFO {
|
|||
R_TEXTLIST *text_list;
|
||||
};
|
||||
|
||||
typedef int (R_SCENE_PROC) (int, R_SCENE_INFO *);
|
||||
typedef int (R_SCENE_PROC) (int, R_SCENE_INFO *, void *);
|
||||
|
||||
#define PALETTE_FADE_DURATION 1000
|
||||
|
||||
|
@ -149,6 +149,62 @@ struct R_SCENE_QUEUE {
|
|||
int fadeType;
|
||||
};
|
||||
|
||||
///// IHNM-specific stuff
|
||||
#define R_IHNM_PALFADE_TIME 1000
|
||||
#define R_IHNM_INTRO_FRAMETIME 80
|
||||
#define R_IHNM_DGLOGO_TIME 8000
|
||||
#define R_IHNM_TITLE_TIME 16000
|
||||
|
||||
///// ITE-specific stuff
|
||||
#define R_INTRO_STRMAX 256
|
||||
|
||||
#define ITE_INTRO_FRAMETIME 90
|
||||
|
||||
#define INTRO_CAPTION_Y 170
|
||||
#define VOICE_PAD 50
|
||||
#define VOICE_LETTERLEN 90
|
||||
|
||||
#define PALETTE_FADE_DURATION 1000
|
||||
#define DISSOLVE_DURATION 3000
|
||||
#define LOGO_DISSOLVE_DURATION 1000
|
||||
|
||||
#define CREDIT_DURATION1 4000
|
||||
|
||||
enum R_INTRO_SCENE_DIALOGUE_INFO {
|
||||
INTRO_CAVE1_START = 0,
|
||||
INTRO_CAVE1_END = 4,
|
||||
|
||||
INTRO_CAVE2_START = 4,
|
||||
INTRO_CAVE2_END = 7,
|
||||
|
||||
INTRO_CAVE3_START = 7,
|
||||
INTRO_CAVE3_END = 10,
|
||||
|
||||
INTRO_CAVE4_START = 10,
|
||||
INTRO_CAVE4_END = 14
|
||||
};
|
||||
|
||||
struct R_INTRO_DIALOGUE {
|
||||
uint32 i_voice_rn;
|
||||
const char *i_cvar_name;
|
||||
char i_str[R_INTRO_STRMAX];
|
||||
};
|
||||
|
||||
struct INTRO_CAPTION {
|
||||
int res_n;
|
||||
char *caption;
|
||||
};
|
||||
|
||||
struct INTRO_CREDIT {
|
||||
int text_x;
|
||||
int text_y;
|
||||
int delta_time;
|
||||
int duration;
|
||||
const char *string;
|
||||
int font_id;
|
||||
};
|
||||
|
||||
|
||||
class Scene {
|
||||
public:
|
||||
Scene(SagaEngine *vm);
|
||||
|
@ -209,6 +265,49 @@ class Scene {
|
|||
R_TEXTLIST *_textList;
|
||||
SCENE_IMAGE _bg;
|
||||
SCENE_IMAGE _bgMask;
|
||||
|
||||
static int SC_defaultScene(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
int defaultScene(int param, R_SCENE_INFO *scene_info);
|
||||
|
||||
private:
|
||||
int IHNMStartProc();
|
||||
int ITEStartProc();
|
||||
|
||||
public:
|
||||
static int SC_IHNMIntroMovieProc1(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_IHNMIntroMovieProc2(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_IHNMIntroMovieProc3(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_IHNMHateProc(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
|
||||
private:
|
||||
int IHNMIntroMovieProc1(int param, R_SCENE_INFO *scene_info);
|
||||
int IHNMIntroMovieProc2(int param, R_SCENE_INFO *scene_info);
|
||||
int IHNMIntroMovieProc3(int param, R_SCENE_INFO *scene_info);
|
||||
int IHNMHateProc(int param, R_SCENE_INFO *scene_info);
|
||||
|
||||
public:
|
||||
int ITEIntroRegisterLang(void);
|
||||
static int SC_ITEIntroAnimProc(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_ITEIntroCave1Proc(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_ITEIntroCave2Proc(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_ITEIntroCave3Proc(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_ITEIntroCave4Proc(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_ITEIntroValleyProc(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_ITEIntroTreeHouseProc(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_ITEIntroFairePathProc(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
static int SC_ITEIntroFaireTentProc(int param, R_SCENE_INFO *scene_info, void *refCon);
|
||||
|
||||
private:
|
||||
int ITEIntroAnimProc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITEIntroCave1Proc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITEIntroCave2Proc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITEIntroCave3Proc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITEIntroCave4Proc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITEIntroValleyProc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITEIntroTreeHouseProc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITEIntroFairePathProc(int param, R_SCENE_INFO *scene_info);
|
||||
int ITEIntroFaireTentProc(int param, R_SCENE_INFO *scene_info);
|
||||
|
||||
};
|
||||
|
||||
} // End of namespace Saga
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue