Skip to content

Commit

Permalink
TONY: Implemented GfxEngine code
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed May 1, 2012
1 parent 68bcaa6 commit 7d9156b
Show file tree
Hide file tree
Showing 4 changed files with 1,020 additions and 27 deletions.
32 changes: 6 additions & 26 deletions engines/tony/game.cpp
Expand Up @@ -236,26 +236,6 @@ void RMOptionButton::AddToList(RMGfxTargetBuffer &bigBuf) {
}


/****************************************************************************\
* RMOptionSlide methods
\****************************************************************************/

#define INIT_GFX16_FROMRAW(dwRes, buf16) \
raw = new RMResRaw(dwRes); \
assert(raw->IsValid()); \
assert((buf16) == NULL); \
(buf16) = new RMGfxSourceBuffer16(false); \
(buf16)->Init(*raw,raw->Width(),raw->Height()); \
delete raw;

#define INIT_GFX8_FROMRAW(dwRes, buf8) \
raw = new RMResRaw(dwRes); \
assert(raw->IsValid()); \
assert((buf8) == NULL); \
(buf8) = new RMGfxSourceBuffer8RLEByte(); \
(buf8)->Init(*raw, raw->Width(), raw->Height(), true); \
delete raw;

/****************************************************************************\
* Metodi di RMGfxEngine
\****************************************************************************/
Expand Down Expand Up @@ -284,23 +264,23 @@ RMGfxEngine::~RMGfxEngine() {
}

void RMGfxEngine::OpenOptionScreen(int type) {
bool bRes;
bool bRes = false;

switch (type) {
case 0:
bRes=m_opt.Init(m_bigBuf);
bRes = m_opt.Init(m_bigBuf);
break;
case 1:
bRes=m_opt.InitLoadMenuOnly(m_bigBuf, true);
bRes = m_opt.InitLoadMenuOnly(m_bigBuf, true);
break;
case 2:
bRes=m_opt.InitNoLoadSave(m_bigBuf);
bRes = m_opt.InitNoLoadSave(m_bigBuf);
break;
case 3:
bRes=m_opt.InitLoadMenuOnly(m_bigBuf, false);
bRes = m_opt.InitLoadMenuOnly(m_bigBuf, false);
break;
case 4:
bRes=m_opt.InitSaveMenuOnly(m_bigBuf, false);
bRes = m_opt.InitSaveMenuOnly(m_bigBuf, false);
break;
}

Expand Down
37 changes: 37 additions & 0 deletions engines/tony/game.h
Expand Up @@ -56,6 +56,43 @@

namespace Tony {

#define INIT_GFX16_FROMRAW(dwRes, buf16) \
raw = new RMResRaw(dwRes); \
assert(raw->IsValid()); \
assert((buf16) == NULL); \
(buf16) = new RMGfxSourceBuffer16(false); \
(buf16)->Init(*raw,raw->Width(),raw->Height()); \
delete raw;

#define INIT_GFX8_FROMRAW(dwRes, buf8) \
raw = new RMResRaw(dwRes); \
assert(raw->IsValid()); \
assert((buf8) == NULL); \
(buf8) = new RMGfxSourceBuffer8RLEByte(); \
(buf8)->Init(*raw, raw->Width(), raw->Height(), true); \
delete raw;

extern bool bCfgInvLocked;
extern bool bCfgInvNoScroll;
extern bool bCfgTimerizedText;
extern bool bCfgInvUp;
extern bool bCfgAnni30;
extern bool bCfgAntiAlias;
extern bool bCfgSottotitoli;
extern bool bCfgTransparence;
extern bool bCfgInterTips;
extern bool bCfgDubbing;
extern bool bCfgMusic;
extern bool bCfgSFX;
extern int nCfgTonySpeed;
extern int nCfgTextSpeed;
extern int nCfgDubbingVolume;
extern int nCfgMusicVolume;
extern int nCfgSFXVolume;
extern bool bSkipSfxNoLoop;

extern bool bPatIrqFreeze;

class RMPointer : public RMGfxTask {
private:
RMGfxSourceBuffer8 *m_pointer[16];
Expand Down

0 comments on commit 7d9156b

Please sign in to comment.