[xmoto-dev] [patch] make sdl_gfx compile again |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/xmoto-dev Archives
]
- To: xmoto-dev@xxxxxxxxxxxxxxxxxxx
- Subject: [xmoto-dev] [patch] make sdl_gfx compile again
- From: "Kees Jongenburger" <kees.jongenburger@xxxxxxxxx>
- Date: Sun, 14 Dec 2008 20:25:26 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=UyQBdkj2HCZtfsWlAwJPE87IwxoCj+f4JR5XysNBGRY=; b=OKGjelhutxC6DmXii36q0lTow7SvSPqnkxgfgsfenO9t2VzbB2U6+57wAfNasXuxJF Px0JE1XXh2i/Q9W1xXmFAWp6kBM8JI6a4TlKx/251zvObnNcSJodbHiNm+7Jgvh+esPq ucO6aFMA4lwdBzteH/Xlckw8JdrwZMAKC7tYM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=A67fr02dYS1omytyTRNcI+7r+2q8fvF8DQTLUbC01jquOMHKbbdGOUFKivypxmiUXs ropktkBhXfzXTqYo70Z0upTgM1PRE1eJbv2rXlh88gDTOwqZgYkU+nYXMj7VYsIVys7k 1zb/5dC/axVTRK4mICeqxZwvE1Y622/P66k7I=
Hi
Here is a small patch to make the SDL_gfx port compiling again. The feature
that is missing most is currently the text rendering.
greetings
P.S. I was very pleased to see the PSP port . is that going to be merged in svn?
Index: src/PolyDraw.cpp
===================================================================
--- src/PolyDraw.cpp (revision 2732)
+++ src/PolyDraw.cpp (working copy)
@@ -24,6 +24,7 @@
#include <string.h>
+#include "include/xm_SDL.h"
#include "PolyDraw.h"
#if defined(MIN)
Index: src/drawlib/DrawLibSDLgfx.h
===================================================================
--- src/drawlib/DrawLibSDLgfx.h (revision 2732)
+++ src/drawlib/DrawLibSDLgfx.h (working copy)
@@ -22,6 +22,9 @@
#define __DRAWLIBSDLGFX_H__
#include "DrawLib.h"
+#include <vector>
+#include <map>
+
class PolyDraw;
class DrawLibSDLgfx:public DrawLib {
Index: src/drawlib/DrawLibSDLgfx.cpp
===================================================================
--- src/drawlib/DrawLibSDLgfx.cpp (revision 2732)
+++ src/drawlib/DrawLibSDLgfx.cpp (working copy)
@@ -28,6 +28,7 @@
#ifdef ENABLE_SDLGFX
#include "PolyDraw.h"
+#include "VFileIO.h"
#include "SDL_gfxPrimitives.h"
#include "SDL_rotozoom.h"
#include "iqsort.h"
Index: src/Renderer.cpp
===================================================================
--- src/Renderer.cpp (revision 2732)
+++ src/Renderer.cpp (working copy)
@@ -2127,6 +2127,7 @@
void GameRenderer::_RenderBlockEdges(Block* pBlock)
{
DrawLib* pDrawlib = GameApp::instance()->getDrawLib();
+#ifdef ENABLE_OPENGL
if(pDrawlib->getBackend() == DrawLib::backend_OpenGl) {
for(unsigned int i=0; i<pBlock->getEdgeGeoms().size(); i++){
int geom = pBlock->getEdgeGeoms()[i];
@@ -2158,6 +2159,7 @@
} else if(pDrawlib->getBackend() == DrawLib::backend_SdlGFX){
// SDLGFX::TODO
}
+#endif /* ENABLE_OPENGL */
}
/*===========================================================================
Index: src/VFileIO.cpp
===================================================================
--- src/VFileIO.cpp (revision 2732)
+++ src/VFileIO.cpp (working copy)
@@ -1133,7 +1133,7 @@
/* Initialize binary data package if any */
FILE *fp = fopen(m_BinDataFile.c_str(),"rb");
if(fp == NULL) {
- throw Exception("Package " + i_binFile + " not found !");
+ throw Exception("Package " + i_binFile + " ( file " + m_BinDataFile + " ) not found !");
}
char cBuf[256];