Show DialogState.cpp syntax highlighted
/**
**************************************************************************************
*Palisma - Secrets of the Illuminati is an open-source 2D RPG *
*Copyright (C) 2006, Tony Sparks *
* *
*This library is free software; you can redistribute it and/or *
*modify it under the terms of the GNU Lesser General Public *
*License as published by the Free Software Foundation; either *
*version 2.1 of the License, or (at your option) any later version. *
* *
*This library 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 *
*Lesser General Public License for more details. *
* *
*You should have received a copy of the GNU Lesser General Public *
*License along with this library; if not, write to the Free Software *
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
**************************************************************************************
*/
#include "StdAfx.h"
#include "DialogState.h"
#include "../kernel.h"
extern Kernel* g_kernel;
/*-------------------------------------------------------------
Define shortcuts
--------------------------------------------------------------*/
#define JOYSTICK_XAXIS ( g_kernel->GetInput()->GetJoystickX() )
#define JOYSTICK_YAXIS ( g_kernel->GetInput()->GetJoystickY() )
#define JOYSTICK_BUTTON( str ) ( g_kernel->GetInput()->IsJoystickButtonDown( g_kernel->GetCvars()->GetFloatValue( str ) ) )
#define KEY_BUTTON( str ) ( g_kernel->GetInput()->IsKeyDown( g_kernel->GetCvars()->GetFloatValue( str ) ) )
#define TIME (g_kernel->GetTime())
/*--------------------------------------------------------------
Dialog State
--------------------------------------------------------------*/
DialogState::DialogState(void)
{
SetName( "DialogState" );
SetID( 0 );
}
DialogState::~DialogState(void)
{
}
int DialogState::Init()
{
return 0;
}
// State functions
int DialogState::Start()
{
return 0;
}
void DialogState::Update(long dt)
{
gui::GUI_Manager::GetInstance()->Update( dt );
}
void DialogState::Exit()
{
}
/** Shutdown the dialog state */
void DialogState::Shutdown()
{
}
/** Retrieve user input */
void DialogState::GetInput()
{
gui::GUI_Manager::GetInstance()->PumpInput();
}
See more files for this project here