/*
Moonfall Copyright (C) 2008 Alex Yatskov
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#pragma once
class ActorScript;
class WorldScript;
class Surface;
class Sprite;
class Animation;
class Actor;
class Window;
class WindowDialogue;
class Font;
class IWorldContext;
class IEventHandler;
struct World;
struct ActorSummary;
struct SpriteSummary;
struct WorldSummary;
struct ScriptSummary;
struct ScriptParameter;
struct InputKey;
struct InputMouse;
namespace System
{
// File
int SaveFileManifest(const char* filename, const std::vector& files);
bool LoadFileManifest(const char* filename);
void ClearFileManifest();
boost::shared_ptr LoadFile(const char* filename);
bool SaveFile(const char* filename, const Buffer& buffer);
void FlushFile(const char* filename);
void FlushFiles();
// Surface
boost::weak_ptr CreateFramebufferSurface(const Vector2i& size, ColorMode mode);
boost::shared_ptr CreateSurface(const Vector2i& size, ColorMode mode);
boost::shared_ptr LoadSurface(const char* filename);
void FlushSurfaces();
// Sprite
bool LoadSpriteManifest(const char* filename);
void ClearSpriteManifest();
boost::shared_ptr LoadSprite(const char* spriteAlias);
void SummarizeSprites(std::vector* summary);
// Animation
bool LoadAnimationManifest(const char* filename);
void ClearAnimationManifest();
boost::shared_ptr LoadAnimation(const char* animationAlias);
// Font
bool LoadFontManifest(const char* filename);
void ClearFontManifest();
boost::shared_ptr LoadFont(const char* fontAlias);
// Script
bool LoadScriptManifest(const char* filename);
void ClearScriptManifest();
boost::shared_ptr LoadActorScript(const char* scriptAlias);
boost::shared_ptr LoadWorldScript(const char* scriptAlias);
boost::shared_ptr LoadScriptCode(const char* scriptAlias);
void SummarizeScripts(std::vector* summary);
// Dialogue
bool LoadDialogueManifest(const char* filename);
void ClearDialogueManifest();
boost::shared_ptr LoadDialogue(const char* dialogueAlias, int maxWidth);
// Actor
bool LoadActorManifest(const char* filename);
void ClearActorManifest();
void SummarizeActors(std::vector* summary);
bool SummarizeActor(const char* actorAlias, ActorSummary* summary);
boost::shared_ptr CreateActor(const char* actorAlias, const char* actorName, unsigned actorAllowedProperties = static_cast(-1));
// World
bool LoadWorldManifest(const char* filename);
void ClearWorldManifest();
boost::shared_ptr LoadWorld(const char* worldAlias, const ParameterMap& parameters = ParameterMap());
bool SaveWorld(const char* worldAlias, const boost::shared_ptr& world);
void SummarizeWorlds(std::vector* summary);
// Editor
void RegisterWorldContext(IWorldContext* context);
void UnregisterWorldContext(IWorldContext* context);
IWorldContext* QueryWorldContext();
// Event
void AddEventHandler(IEventHandler* handler);
void RemoveEventHandler(IEventHandler* handler);
// Window
void EnqueueWindow(const boost::shared_ptr& window);
void RenderWindow();
void UpdateWindow(float elapsed);
// Misc
void Reset();
}