This commit is contained in:
parent
7b69b4a177
commit
be3f0f9be4
4 changed files with 289 additions and 22 deletions
|
@ -2,7 +2,7 @@
|
||||||
; Please
|
; Please
|
||||||
; DO NOT edit this document with Excel/Word
|
; DO NOT edit this document with Excel/Word
|
||||||
; DO NOT add trailing spaces and tabs
|
; DO NOT add trailing spaces and tabs
|
||||||
; DO NOT Omit text after identifier
|
; DO NOT omit text after identifier
|
||||||
; DO NOT add spaces to identifier
|
; DO NOT add spaces to identifier
|
||||||
; DO NOT add duplicate identifiers
|
; DO NOT add duplicate identifiers
|
||||||
; DO NOT put - or ; characters in text strings :(
|
; DO NOT put - or ; characters in text strings :(
|
||||||
|
@ -43,9 +43,12 @@ eng=SPONGEBOBS UNTITLED ADVENTURE
|
||||||
eng=PRESS START
|
eng=PRESS START
|
||||||
|
|
||||||
[STR__FRONTEND__START_GAME]
|
[STR__FRONTEND__START_GAME]
|
||||||
eng=Start game
|
eng=START GAME
|
||||||
[STR__FRONTEND__OPTIONS]
|
[STR__FRONTEND__OPTIONS]
|
||||||
eng=Options
|
eng=OPTIONS
|
||||||
|
|
||||||
|
[STR__FRONTEND__EXIT]
|
||||||
|
eng=EXIT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,24 +56,6 @@ eng=Options
|
||||||
; Debugging text
|
; Debugging text
|
||||||
; The following texts DO NOT require translation
|
; The following texts DO NOT require translation
|
||||||
; ---------------------------------------------------------------
|
; ---------------------------------------------------------------
|
||||||
[STR__PAULS_TEST_STRING_1]
|
|
||||||
eng=This is a test string.
|
|
||||||
[STR__PAULS_TEST_STRING_2]
|
|
||||||
eng=This is another test string with more text.
|
|
||||||
[STR__PAULS_TEST_STRING_3]
|
|
||||||
eng=Finally, another example containing wordage of increased length.
|
|
||||||
|
|
||||||
[STR__PAULS_TEST__CONTROL_TYPE]
|
|
||||||
eng=CONTROL TYPE
|
|
||||||
[STR__PAULS_TEST__MUSIC]
|
|
||||||
eng=MUSIC
|
|
||||||
[STR__PAULS_TEST__SFX]
|
|
||||||
eng=SFX
|
|
||||||
[STR__PAULS_TEST__EXIT]
|
|
||||||
eng=EXIT
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
208
source/frontend/options.cpp
Normal file
208
source/frontend/options.cpp
Normal file
|
@ -0,0 +1,208 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
options.cpp
|
||||||
|
|
||||||
|
Author: PKG
|
||||||
|
Created:
|
||||||
|
Project: Spongebob
|
||||||
|
Purpose:
|
||||||
|
|
||||||
|
Copyright (c) 2000 Climax Development Ltd
|
||||||
|
|
||||||
|
===========================================================================*/
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Includes
|
||||||
|
-------- */
|
||||||
|
|
||||||
|
#include "frontend\options.h"
|
||||||
|
|
||||||
|
#ifndef __MEMORY_HEADER__
|
||||||
|
#include "mem\memory.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_FADER_H__
|
||||||
|
#include "gfx\fader.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __FRONTEND_SCROLLBG_H__
|
||||||
|
#include "frontend\scrollbg.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PRIM_HEADER__
|
||||||
|
#include "gfx\prim.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GUI_GUI_H__
|
||||||
|
#include "gui\gui.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GUI_GTEXTBOX_H__
|
||||||
|
#include "gui\gtextbox.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GUI_GFRAME_H__
|
||||||
|
#include "gui\gframe.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GUI_GBUTTON_H__
|
||||||
|
#include "gui\gbutton.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __LOCALE_TEXTDBASE_H__
|
||||||
|
#include "locale\textdbase.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Std Lib
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/* Data
|
||||||
|
---- */
|
||||||
|
|
||||||
|
#ifndef __SPR_FRONTEND_H__
|
||||||
|
#include <frontend.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Tyepdefs && Defines
|
||||||
|
------------------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Structure defintions
|
||||||
|
-------------------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function Prototypes
|
||||||
|
------------------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Vars
|
||||||
|
---- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CFrontEndOptions::init()
|
||||||
|
{
|
||||||
|
CGUIGroupFrame *fr;
|
||||||
|
CGUITextBox *tb;
|
||||||
|
CGUIToggleButton *tg;
|
||||||
|
|
||||||
|
m_background=new ("Options Background") CScrollyBackground();
|
||||||
|
m_background->init();
|
||||||
|
|
||||||
|
m_optionsMenu=new ("Options GUI") CGUIControlFrame();
|
||||||
|
m_optionsMenu->init(NULL);
|
||||||
|
m_optionsMenu->setObjectXYWH(50,40,412,176);
|
||||||
|
|
||||||
|
fr=new ("frame") CGUIGroupFrame();
|
||||||
|
fr->init(m_optionsMenu);
|
||||||
|
fr->setObjectXYWH(50,0,200,20);
|
||||||
|
tb=new ("textbox") CGUITextBox();
|
||||||
|
tb->init(fr);
|
||||||
|
tb->setObjectXYWH(0,0,200,20);
|
||||||
|
tb->setText(STR__FRONTEND__EXIT);
|
||||||
|
tg=new ("togglebutton") CGUIToggleButton();
|
||||||
|
tg->init(fr);
|
||||||
|
tg->setButtonTarget(&m_exitFlag);
|
||||||
|
|
||||||
|
m_optionsMenu->select();
|
||||||
|
|
||||||
|
m_exitFlag=false;
|
||||||
|
m_closingDown=false;
|
||||||
|
|
||||||
|
CFader::setFadingIn();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CFrontEndOptions::shutdown()
|
||||||
|
{
|
||||||
|
m_optionsMenu->shutdown();
|
||||||
|
m_background->shutdown(); delete m_background;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
void CFrontEndOptions::render()
|
||||||
|
{
|
||||||
|
POLY_G4 *g4;
|
||||||
|
|
||||||
|
g4=GetPrimG4();
|
||||||
|
setXYWH(g4,0,0,512,256);
|
||||||
|
setRGB0(g4,50, 0, 0);
|
||||||
|
setRGB1(g4, 0, 0,50);
|
||||||
|
setRGB2(g4, 0,50, 0);
|
||||||
|
setRGB3(g4,50, 0,50);
|
||||||
|
AddPrimToList(g4,1001);
|
||||||
|
|
||||||
|
m_background->render();
|
||||||
|
|
||||||
|
m_optionsMenu->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
int ox=-1;
|
||||||
|
int oy=-1;
|
||||||
|
int os=0;
|
||||||
|
void CFrontEndOptions::think(int _frames)
|
||||||
|
{
|
||||||
|
m_background->setSpeed(ox,oy);
|
||||||
|
m_background->setSpeedScale(os);
|
||||||
|
m_background->think(_frames);
|
||||||
|
|
||||||
|
if(!CFader::isFading())
|
||||||
|
{
|
||||||
|
m_optionsMenu->think(_frames);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!m_closingDown&&m_exitFlag)
|
||||||
|
{
|
||||||
|
CFader::setFadingOut();
|
||||||
|
m_closingDown=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
int CFrontEndOptions::isReadyToExit()
|
||||||
|
{
|
||||||
|
return m_closingDown&&!CFader::isFading();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Function:
|
||||||
|
Purpose:
|
||||||
|
Params:
|
||||||
|
Returns:
|
||||||
|
---------------------------------------------------------------------- */
|
||||||
|
CFrontEndScene::FrontEndMode CFrontEndOptions::getNextMode()
|
||||||
|
{
|
||||||
|
return CFrontEndScene::MODE__MAIN_TITLES;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*===========================================================================
|
||||||
|
end */
|
73
source/frontend/options.h
Normal file
73
source/frontend/options.h
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
options.h
|
||||||
|
|
||||||
|
Author: PKG
|
||||||
|
Created:
|
||||||
|
Project: Spongebob
|
||||||
|
Purpose:
|
||||||
|
|
||||||
|
Copyright (c) 2000 Climax Development Ltd
|
||||||
|
|
||||||
|
===========================================================================*/
|
||||||
|
|
||||||
|
#ifndef __FRONTEND_OPTIONS_H__
|
||||||
|
#define __FRONTEND_OPTIONS_H__
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Includes
|
||||||
|
-------- */
|
||||||
|
|
||||||
|
#ifndef __FRONTEND_FRONTENTD_H__
|
||||||
|
#include "frontend\frontend.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Std Lib
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Tyepdefs && Defines
|
||||||
|
------------------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Structure defintions
|
||||||
|
-------------------- */
|
||||||
|
|
||||||
|
class CFrontEndOptions : public CFrontEndMode
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void init();
|
||||||
|
void shutdown();
|
||||||
|
void render();
|
||||||
|
void think(int _frames);
|
||||||
|
|
||||||
|
int isReadyToExit();
|
||||||
|
CFrontEndScene::FrontEndMode getNextMode();
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
class CScrollyBackground *m_background;
|
||||||
|
class CGUIControlFrame *m_optionsMenu;
|
||||||
|
|
||||||
|
int m_exitFlag;
|
||||||
|
|
||||||
|
int m_closingDown;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Globals
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Functions
|
||||||
|
--------- */
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#endif /* __FRONTEND_OPTIONS_H__ */
|
||||||
|
|
||||||
|
/*===========================================================================
|
||||||
|
end */
|
|
@ -117,6 +117,7 @@ static CScrollyBackground *s_bg3;
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
/*
|
||||||
unsigned int str=STR__PAULS_TEST_STRING_1;
|
unsigned int str=STR__PAULS_TEST_STRING_1;
|
||||||
int w=150;
|
int w=150;
|
||||||
int h=40;
|
int h=40;
|
||||||
|
@ -142,7 +143,7 @@ char textEntry[16+1]="SOME TEXT";
|
||||||
|
|
||||||
|
|
||||||
CGUIControlFrame *baseGUIObject;
|
CGUIControlFrame *baseGUIObject;
|
||||||
|
*/
|
||||||
|
|
||||||
void CPaulScene::init()
|
void CPaulScene::init()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue