AppCore integrated into Application
This commit is contained in:
parent
407ec539e6
commit
2d6fba1784
@ -1 +0,0 @@
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Application.hpp,v 1.12 2005/08/08 06:50:18 cozman Exp $
|
||||
// $Id: Application.hpp,v 1.13 2005/08/08 07:00:46 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_APPLICATION_HPP
|
||||
#define PHOTON_APPLICATION_HPP
|
||||
@ -60,9 +60,8 @@ public:
|
||||
// Default destructor, shuts down dependencies.
|
||||
virtual ~Application();
|
||||
|
||||
// Group: Video
|
||||
// Group: Window
|
||||
public:
|
||||
|
||||
// Function: createDisplay
|
||||
// This function attempts to create a display with the given parameters.
|
||||
//
|
||||
@ -97,9 +96,37 @@ public:
|
||||
uint depthBits, uint stencilBits, bool fullscreen,
|
||||
const std::string& title="Photon App");
|
||||
|
||||
// Function: setTitle
|
||||
// Sets title of application that shows up in title bar.
|
||||
//
|
||||
// Parameters:
|
||||
// title - New title of application.
|
||||
void setTitle(const std::string& title);
|
||||
|
||||
// Function: getDisplayWidth
|
||||
// Get the width of the display.
|
||||
//
|
||||
// Returns:
|
||||
// Width of display in pixels.
|
||||
uint getDisplayWidth();
|
||||
|
||||
// Function: getDisplayHeight
|
||||
// Get the height of the display.
|
||||
//
|
||||
// Returns:
|
||||
// Height of display in pixels.
|
||||
uint getDisplayHeight();
|
||||
|
||||
// Function: isActive
|
||||
// Checks if application is active, which on most systems simply means it
|
||||
// has focus.
|
||||
//
|
||||
// Returns:
|
||||
// True if application is active, false otherwise.
|
||||
bool isActive();
|
||||
|
||||
// Group: Input
|
||||
public:
|
||||
|
||||
// Function: keyPressed
|
||||
// Check if a given key is currently pressed.
|
||||
//
|
||||
@ -151,7 +178,6 @@ public:
|
||||
|
||||
// Group: Input Listeners
|
||||
public:
|
||||
|
||||
// Function: addInputListener
|
||||
// Registers an <InputListener> to listen for any input events so that it
|
||||
// is notified when they occur.
|
||||
@ -184,32 +210,6 @@ public:
|
||||
// been running.
|
||||
scalar getTime();
|
||||
|
||||
// Group: General
|
||||
public:
|
||||
|
||||
// Function: setTitle
|
||||
// Sets title of application that shows up in title bar.
|
||||
//
|
||||
// Parameters:
|
||||
// title - New title of application.
|
||||
void setTitle(const std::string& title);
|
||||
|
||||
// Function: isActive
|
||||
// Checks if application is active, which on most systems simply means it
|
||||
// has focus.
|
||||
//
|
||||
// Returns:
|
||||
// True if application is active, false otherwise.
|
||||
bool isActive();
|
||||
|
||||
// Function: isRunning
|
||||
// Checks if application is running, which means that no quit has been
|
||||
// requested.
|
||||
//
|
||||
// Returns:
|
||||
// True if application is running, false otherwise.
|
||||
bool isRunning();
|
||||
|
||||
// Function: getElapsedTime
|
||||
// Finds the amount of time passed between frames, useful for time-based
|
||||
// movement.
|
||||
@ -242,23 +242,6 @@ public:
|
||||
void initVideoCore(uint width, uint height);
|
||||
void initAudioCore(const std::string& deviceName);
|
||||
|
||||
// Group: Accessors
|
||||
public:
|
||||
// Function: getDisplayWidth
|
||||
// Get the width of the display.
|
||||
//
|
||||
// Returns:
|
||||
// Width of display in pixels.
|
||||
uint getDisplayWidth();
|
||||
|
||||
// Function: getDisplayHeight
|
||||
// Get the height of the display.
|
||||
//
|
||||
// Returns:
|
||||
// Height of display in pixels.
|
||||
uint getDisplayHeight();
|
||||
|
||||
|
||||
// Group: API Initialization
|
||||
private:
|
||||
util::VersionInfo initPhysFS(const std::string& arg0);
|
||||
@ -289,7 +272,6 @@ private:
|
||||
scalar pausedTime_;
|
||||
scalar secPerFrame_;
|
||||
scalar lastUpdate_;
|
||||
bool quitRequested_;
|
||||
};
|
||||
|
||||
// StateUpdate
|
||||
@ -333,7 +315,7 @@ private:
|
||||
shared_ptr<StateUpdate> stateUpdate_;
|
||||
shared_ptr<StateRender> stateRender_;
|
||||
|
||||
// input monitoring variables
|
||||
// input system variables
|
||||
static std::vector<InputListener*> listeners_;
|
||||
static std::vector<KeyCode> pressedKeys_;
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Application.cpp,v 1.16 2005/08/08 06:50:18 cozman Exp $
|
||||
// $Id: Application.cpp,v 1.17 2005/08/08 07:00:46 cozman Exp $
|
||||
|
||||
#include "Application.hpp"
|
||||
|
||||
@ -322,11 +322,6 @@ bool Application::isActive()
|
||||
return updateTask_->active_;
|
||||
}
|
||||
|
||||
bool Application::isRunning()
|
||||
{
|
||||
return !updateTask_->quitRequested_;
|
||||
}
|
||||
|
||||
double Application::getElapsedTime()
|
||||
{
|
||||
return updateTask_->secPerFrame_;
|
||||
@ -347,6 +342,8 @@ uint Application::getDisplayHeight()
|
||||
return dispHeight_;
|
||||
}
|
||||
|
||||
// API initialization
|
||||
|
||||
util::VersionInfo Application::initPhysFS(const std::string& arg0)
|
||||
{
|
||||
PHYSFS_Version ver;
|
||||
@ -367,13 +364,14 @@ util::VersionInfo Application::initGLFW()
|
||||
return util::VersionInfo(maj,min,patch);
|
||||
}
|
||||
|
||||
// Application's Tasks
|
||||
|
||||
Application::UpdateTask::UpdateTask() :
|
||||
Task("Application::UpdateTask", PRI_APP_UPDATE),
|
||||
mouseX_(0), mouseY_(0),
|
||||
active_(false), timerPaused_(false),
|
||||
unpauseOnActive_(false), lastPause_(0), pausedTime_(0),
|
||||
secPerFrame_(0), lastUpdate_(0),
|
||||
quitRequested_(false)
|
||||
secPerFrame_(0), lastUpdate_(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: AudioCore.cpp,v 1.11 2005/08/02 23:07:52 cozman Exp $
|
||||
// $Id: AudioCore.cpp,v 1.12 2005/08/08 07:00:46 cozman Exp $
|
||||
|
||||
#ifdef PHOTON_USE_OPENAL
|
||||
|
||||
@ -146,12 +146,6 @@ util::VersionInfo AudioCore::initOpenAL(const std::string& deviceName)
|
||||
return util::VersionInfo(major,minor,patch);
|
||||
}
|
||||
|
||||
void AudioCore::initAudioDevice(const std::string& deviceName)
|
||||
{
|
||||
// new AudioCore(deviceName);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user