about summary refs log tree commit diff
path: root/src/engine
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-10-29 12:14:31 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-10-29 12:14:31 +0000
commite56feb597bc743677633432f77513b02907fd169 (patch)
tree5b6bbb983fcf33cfe5eef8aec1298608257036b5 /src/engine
parent878ede3080ab2cfb627aca505c397d9765052996 (diff)
downloadzcatch-e56feb597bc743677633432f77513b02907fd169.tar.gz
zcatch-e56feb597bc743677633432f77513b02907fd169.zip
added missing headers
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/client/client.h17
-rw-r--r--src/engine/client/editor.h10
-rw-r--r--src/engine/client/graphics.h69
-rw-r--r--src/engine/message.h8
4 files changed, 104 insertions, 0 deletions
diff --git a/src/engine/client/client.h b/src/engine/client/client.h
new file mode 100644
index 00000000..64ef6d9b
--- /dev/null
+++ b/src/engine/client/client.h
@@ -0,0 +1,17 @@
+
+
+class IEngine
+{
+public:
+	virtual ~IEngine() {}
+	virtual class IGraphics *Graphics() = 0;
+};
+
+
+class IGameClient
+{
+public:
+	virtual ~IGameClient() {}
+};
+
+extern IGameClient *CreateGameClient(IEngine *pEngine);
diff --git a/src/engine/client/editor.h b/src/engine/client/editor.h
new file mode 100644
index 00000000..336a46d4
--- /dev/null
+++ b/src/engine/client/editor.h
@@ -0,0 +1,10 @@
+
+class IEditor
+{
+public:
+	virtual ~IEditor() {}
+	virtual void Init(class IGraphics *pGraphics) = 0;
+	virtual void UpdateAndRender() = 0;
+};
+
+extern IEditor *CreateEditor();
diff --git a/src/engine/client/graphics.h b/src/engine/client/graphics.h
new file mode 100644
index 00000000..80dbf1b9
--- /dev/null
+++ b/src/engine/client/graphics.h
@@ -0,0 +1,69 @@
+#include "../e_if_gfx.h"
+
+class IGraphics
+{
+protected:
+	int m_ScreenWidth;
+	int m_ScreenHeight;
+public:
+	virtual ~IGraphics() {}
+	
+	int ScreenWidth() const { return m_ScreenWidth; }
+	int ScreenHeight() const { return m_ScreenHeight; }
+	float ScreenAspect() const { return (float)ScreenWidth()/(float)ScreenHeight(); }
+	
+	virtual void Clear(float r, float g, float b) = 0;
+	
+	virtual void ClipEnable(int x, int y, int w, int h) = 0;
+	virtual void ClipDisable() = 0;
+	
+	virtual void MapScreen(float tl_x, float tl_y, float br_x, float br_y) = 0;
+	virtual void GetScreen(float *tl_x, float *tl_y, float *br_x, float *br_y) = 0;
+	
+	virtual void BlendNone() = 0;
+	virtual void BlendNormal() = 0;
+	virtual void BlendAdditive() = 0;
+	
+	virtual int LoadPNG(IMAGE_INFO *pImg, const char *pFilename) =0;
+	virtual int UnloadTexture(int Index) = 0;
+	virtual int LoadTextureRaw(int Width, int Height, int Format, const void *pData, int StoreFormat, int Flags) = 0;
+	virtual int LoadTexture(const char *pFilename, int StoreFormat, int Flags) = 0;
+	virtual void TextureSet(int TextureID) = 0;
+	
+	virtual void LinesBegin() = 0;
+	virtual void LinesEnd() = 0;
+	virtual void LinesDraw(float x0, float y0, float x1, float y1) = 0;
+	
+	virtual void QuadsBegin() = 0;
+	virtual void QuadsEnd() = 0;
+	virtual void QuadsSetRotation(float Angle) = 0;
+	virtual void QuadsSetSubset(float tl_u, float tl_v, float br_u, float br_v) = 0;
+	virtual void QuadsSetSubsetFree(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) = 0;
+	
+	virtual void QuadsDraw(float x, float y, float w, float h) = 0;
+	virtual void QuadsDrawTL(float x, float y, float w, float h) = 0;
+	virtual void QuadsDrawFreeform(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) = 0;
+	virtual void QuadsText(float x, float y, float Size, float r, float g, float b, float a, const char *pText) = 0;
+	
+	virtual void SetColorVertex(int i, float r, float g, float b, float a) = 0;
+	virtual void SetColor(float r, float g, float b, float a) = 0;
+	
+	virtual void TakeScreenshot() = 0;
+};
+
+class IEngineGraphics : public IGraphics
+{
+public:
+	virtual bool Init() = 0;
+	virtual void Shutdown() = 0;
+	virtual void Swap() = 0;
+	
+	virtual void Minimize() = 0;
+	virtual void Maximize() = 0;
+	
+	virtual int WindowActive() = 0;
+	virtual int WindowOpen() = 0;
+	
+};
+
+extern IEngineGraphics *CreateEngineGraphics();
diff --git a/src/engine/message.h b/src/engine/message.h
new file mode 100644
index 00000000..6de407ed
--- /dev/null
+++ b/src/engine/message.h
@@ -0,0 +1,8 @@
+
+
+class CMessage
+{
+public:
+	virtual bool Pack(void *pData, unsigned MaxDataSize);
+	virtual bool Unpack(const void *pData, unsigned DataSize);
+};