engine/include/SalmonEngineInterface.h

150 lines
3.5 KiB
C
Raw Normal View History

2013-01-19 20:02:34 +00:00
#ifndef SALMON_ENGINE_INTERFACE_H_INCLUDED
#define SALMON_ENGINE_INTERFACE_H_INCLUDED
/*
This code combines all headers for Salmon engine into one header file
*/
#include "include/ApplicationInterface.h"
#include "include/Render/SalmonRender/SalmonRenderInterface.h"
#ifdef TARGET_ANDROID
#include "include/Render/SalmonRender/SalmonRenderAndroid.h"
#endif
#ifdef TARGET_WIN32
#include "include/Render/SalmonRender/SalmonRenderWindows.h"
#endif
#ifdef TARGET_IOS
#include "include/Render/SalmonRender/SalmonRenderIos.h"
#endif
#include "include/Render/RenderMisc.h"
#include "include/Animation/SalmonAnimation.h"
#include "include/TextureManager/SalmonTexture.h"
#include "include/ShaderManager/ShaderManager.h"
#include "include/FrameManager/FrameManager.h"
#include "include/LightManager/LightManager.h"
#include "include/ScriptManager/ScriptManager.h"
#ifdef TARGET_ANDROID
#include "include/SoundManager/SoundManagerAndroid.h"
#endif
#ifdef TARGET_WIN32
#include "include/SoundManager/SoundManagerWindows.h"
#endif
#ifdef TARGET_IOS
#include "include/SoundManager/SoundManagerIos.h"
#endif
#include "include/FontManager/FontManager.h"
#include "include/SimpleLand/SimpleLand.h"
#include "include/SmartValueManager/SmartValueManager.h"
#include "include/ModelManager/NewModelManager.h"
2013-01-27 21:31:32 +00:00
#include "include/PhysicsManager/PhysicsManager.h"
#include "include/GUIManager/GUIManager.h"
#include "include/HalibutAnimation/HalibutAnimation.h"
2013-01-19 20:02:34 +00:00
namespace SE
{
class TResourceManager
{
protected:
public:
std::string PathToResources;
2013-02-03 13:11:16 +00:00
boost::thread::id MainThreadId;
std::vector<boost::function<void()>> MainThreadAsyncFunctionArr;
boost::mutex FuncListMutex;
std::list<TFuncToPerform> MainThreadSyncFunctionList;
2013-01-19 20:02:34 +00:00
TTextureListClass TexList;
TModelManager ModelManager;
TFlexModelManager FlexModelManager;
TShaderManager ShaderManager;
TFrameManager FrameManager;
TLightManager LightManager;
TModelAnimManager ModelAnimManager;
TScriptManager ScriptManager;
TFontManager FontManager;
TSmartValueManager SmartValueManager;
2013-01-27 21:31:32 +00:00
TGUIManager GUIManager;
THalibutAnimationManager HalibutAnimationManager;
2013-01-19 20:02:34 +00:00
#ifdef TARGET_ANDROID
TSoundManagerAndroid SoundManager;
#endif
#ifdef TARGET_WIN32
TSoundManagerWindows SoundManager;
#endif
#ifdef TARGET_IOS
TSoundManagerIos SoundManager;
#endif
2013-02-03 13:11:16 +00:00
void Update(cardinal timer);
~TResourceManager();
2013-01-19 20:02:34 +00:00
};
struct TMouseState
{
int X;
int Y;
bool LeftButtonPressed;
bool MiddleButtonPressed;
bool RightButtonPressed;
};
class TApplicationAncestor : public TApplicationInterface
{
protected:
public:
virtual void OuterDraw();
//What to draw
virtual void OuterUpdate(cardinal timer);
//To do on update
virtual void UpdateQuick() { }
//To process input - this method is called more frequently than Update()
2013-01-23 20:58:15 +00:00
virtual void OuterOnTapDown(vec2 p);
virtual void OuterOnTapUp(vec2 p);
2013-01-27 21:31:32 +00:00
virtual void OuterOnTapUpAfterShift(vec2 p);
2013-01-19 20:02:34 +00:00
virtual void OuterOnMove(vec2 shift);
2013-01-23 20:58:15 +00:00
virtual void InnerOnTapDown(vec2 p) { }
virtual void InnerOnTapUp(vec2 p) { }
2013-01-27 21:31:32 +00:00
virtual void InnerOnTapUpAfterShift(vec2 p) { }
2013-01-23 20:58:15 +00:00
2013-01-19 20:02:34 +00:00
virtual void InnerOnMove(vec2 shift) { }
2013-01-23 20:58:15 +00:00
virtual void OnMouseMove(TMouseState& mouseState) { } //Windows only
2013-01-19 20:02:34 +00:00
virtual void OnMouseWheel(short int delta) { }
//To do on mouse wheel move
virtual void OnKeyPress(cardinal key) { } //Try not to override this. But if you need to override, call ancestor!
};
} //namespace SE
#endif