view LightClone/Source/World.h @ 28:13e53b74aed7

More drag and drop work
author koryspansel
date Mon, 19 Sep 2011 11:27:34 -0700
parents 5656c8e382fc
children c227be6a15fe
line wrap: on
line source

/*
 * World
 */

#ifndef __WORLD_H__
#define __WORLD_H__

#include "Core.h"
#include "ResourceManager.h"
#include "EventSystem.h"
#include "RenderContext.h"
#include "Environment.h"
#include "Bot.h"
#include "Code.h"
#include "Loader.h"
#include "CameraController.h"
#include "InputManager.h"
#include "GuiInterface.h"
#include "GuiImage.h"
#include "GuiButton.h"

/*
 * World
 */
class World
{
	/*
	 * pEventSystem
	 */
	EventSystem* pEventSystem;

	/*
	 * pInputManager
	 */
	InputManager* pInputManager;

	/*
	 * kLoader
	 */
	Loader kLoader;

	/*
	 * kEnvironment
	 */
	Environment kEnvironment;

	/*
	 * kBot
	 */
	Bot kBot;

	/*
	 * kFunction
	 */
	Code* pFunction;

	/*
	 * nGameState
	 */
	uint32 nGameState;

	/*
	 * nSimulationState
	 */
	uint32 nSimulationState;

	/*
	 * nCurrentLevel
	 */
	uint32 nCurrentLevel;

	/*
	 * nCurrentFunction
	 */
	uint32 nCurrentFunction;

	/*
	 * kCameraController
	 */
	CameraController kCameraController;

	/*
	 * kInterface
	 */
	GuiInterface kInterface;

	/*
	 * pBackground
	 */
	GuiImage* pBackground;

	/*
	 * pButtonPlay
	 */
	GuiButton* pButtonPlay;

	/*
	 * pButtonStop
	 */
	GuiButton* pButtonStop;

	/*
	 * pButtonReset
	 */
	GuiButton* pButtonReset;

	/*
	 * pButtonExit
	 */
	GuiButton* pButtonExit;

	/*
	 * pToolbar
	 */
	GuiImage* pToolbar;

	/*
	 * pToolbarSlot
	 */
	GuiImage* pToolbarSlot[8];

	/*
	 * pFunctionMain
	 */
	GuiImage* pFunctionMain;

	/*
	 * pFunctionMainSlot
	 */
	GuiImage* pFunctionMainSlot[16];

	/*
	 * pFunctionA
	 */
	GuiImage* pFunctionA;

	/*
	 * pFunctionASlot
	 */
	GuiImage* pFunctionASlot[16];

	/*
	 * pFunctionB
	 */
	GuiImage* pFunctionB;

	/*
	 * pFunctionBSlot
	 */
	GuiImage* pFunctionBSlot[16];

	/*
	 * pLevelDialog
	 */
	GuiImage* pLevelDialog;

	/*
	 * pLevelDialogOk
	 */
	GuiButton* pLevelDialogOk;

	/*
	 * pGameDialog
	 */
	GuiImage* pGameDialog;

	/*
	 * pGameDialogOk
	 */
	GuiButton* pGameDialogOk;

public:
	
	/*
	 * World
	 */
	World();

	/*
	 * Initialize
	 */
	ErrorCode Initialize(EventSystem* pSystem, ResourceManager* pResource, InputManager* pInput);

	/*
	 * Terminate
	 */
	void Terminate();

	/*
	 * Activate
	 */
	void Activate();

	/*
	 * Deactivate
	 */
	void Deactivate();

	/*
	 * IsActive
	 */
	bool IsActive();

	/*
	 * Load
	 */
	bool Load(const char* pName);

	/*
	 * ResetEnvironment
	 */
	void ResetEnvironment();

	/*
	 * ResetBot
	 */
	void ResetBot();

	/*
	 * ResetCode
	 */
	void ClearCode();

	/*
	 * Update
	 */
	void Update(float fElapsed);

	/*
	 * Render
	 */
	void Render(RenderContext& kContext);

private:

	/*
	 * InitializeInterface
	 */
	ErrorCode InitializeInterface(ResourceManager* pResourceManager);

	/*
	 * Render3D
	 */
	void Render3D(RenderContext& kContext);

	/* 
	 * Render2D
	 */
	void Render2D(RenderContext& kContext);

	/*
	 * 	RenderEnvironment
	 */
	void RenderEnvironment(RenderContext& kContext, Environment* pEnvironment);

	/*
	 * RenderBot
	 */
	void RenderBot(RenderContext& kContext, Environment* pEnvironment, Bot* pBot);

	/*
	 * ProcessInput
	 */
	void ProcessInput(float fElapsed);

	/*
	 * OnPlay
	 */
	void OnPlay(GuiEventArguments& kArguments);

	/*
	 * OnStop
	 */
	void OnStop(GuiEventArguments& kArguments);

	/*
	 * OnReset
	 */
	void OnReset(GuiEventArguments& kArguments);

	/*
	 * OnExit
	 */
	void OnExit(GuiEventArguments& kArguments);
};

#endif //__WORLD_H__