|
From: <at...@us...> - 2007-01-01 03:31:32
|
Revision: 391
http://svn.sourceforge.net/cadcdev/?rev=391&view=rev
Author: atani
Date: 2006-12-31 19:31:29 -0800 (Sun, 31 Dec 2006)
Log Message:
-----------
Various fixes for Code::Blocks 1.0rc2 and gcc on win32.
Modified Paths:
--------------
tiki/3rdparty/libjpeg/jconfig.h
tiki/3rdparty/libogg/include/ogg/os_types.h
tiki/examples/TikiTest/tikitest.cbp
tiki/examples/TikiTest/tikitest.layout
tiki/src/gl/texture.cpp
tiki/win32/tiki.cbp
tiki/win32/tiki.layout
Modified: tiki/3rdparty/libjpeg/jconfig.h
===================================================================
--- tiki/3rdparty/libjpeg/jconfig.h 2006-12-31 03:17:23 UTC (rev 390)
+++ tiki/3rdparty/libjpeg/jconfig.h 2007-01-01 03:31:29 UTC (rev 391)
@@ -23,7 +23,7 @@
#undef INCOMPLETE_TYPES_BROKEN
/* Define "boolean" as unsigned char, not int, per Windows custom */
-#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
+#if !defined(boolean)
typedef unsigned char boolean;
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
Modified: tiki/3rdparty/libogg/include/ogg/os_types.h
===================================================================
--- tiki/3rdparty/libogg/include/ogg/os_types.h 2006-12-31 03:17:23 UTC (rev 390)
+++ tiki/3rdparty/libogg/include/ogg/os_types.h 2007-01-01 03:31:29 UTC (rev 391)
@@ -24,7 +24,7 @@
#define _ogg_realloc realloc
#define _ogg_free free
-#ifdef _WIN32
+#ifdef _WIN32
# ifndef __GNUC__
/* MSVC/Borland */
@@ -33,14 +33,21 @@
typedef unsigned __int32 ogg_uint32_t;
typedef __int16 ogg_int16_t;
typedef unsigned __int16 ogg_uint16_t;
-# else
+# elif defined(__GNUC__)
+ /* MingW32/GCC */
+ typedef short ogg_int16_t;
+ typedef unsigned short ogg_uint16_t;
+ typedef int ogg_int32_t;
+ typedef unsigned int ogg_uint32_t;
+ typedef long long ogg_int64_t;
+# else
/* Cygwin */
#include <_G_config.h>
typedef _G_int64_t ogg_int64_t;
typedef _G_int32_t ogg_int32_t;
typedef _G_uint32_t ogg_uint32_t;
typedef _G_int16_t ogg_int16_t;
- typedef _G_uint16_t ogg_uint16_t;
+ typedef _G_uint16_t ogg_uint16_t;
# endif
#elif defined(__MACOS__)
Modified: tiki/examples/TikiTest/tikitest.cbp
===================================================================
--- tiki/examples/TikiTest/tikitest.cbp 2006-12-31 03:17:23 UTC (rev 390)
+++ tiki/examples/TikiTest/tikitest.cbp 2007-01-01 03:31:29 UTC (rev 391)
@@ -6,7 +6,7 @@
<Option title="TikiTest"/>
<Option makefile="Makefile"/>
<Option makefile_is_custom="0"/>
- <Option compiler="1"/>
+ <Option compiler="0"/>
<Build>
<Target title="default">
<Option output="C:\projects\tiki\examples\TikiTest\tikitest.exe"/>
@@ -14,7 +14,7 @@
<Option object_output=".objs"/>
<Option deps_output=".deps"/>
<Option type="0"/>
- <Option compiler="1"/>
+ <Option compiler="0"/>
<Option projectResourceIncludeDirsRelation="0"/>
</Target>
</Build>
@@ -26,19 +26,25 @@
<Add library="gdi32"/>
<Add library="user32"/>
<Add library="kernel32"/>
+ <Add library="tiki"/>
+ <Add library="opengl32"/>
+ <Add library="alut"/>
<Add directory="..\..\win32"/>
<Add directory="C:\Program Files\OpenAL 1.1 SDK\libs\Win32"/>
</Linker>
<Unit filename="src\TikiTest.cpp">
<Option compilerVar="CPP"/>
+ <Option objectName="TikiTest.obj"/>
<Option target="default"/>
</Unit>
<Unit filename="src\test.cpp">
<Option compilerVar="CPP"/>
+ <Option objectName="test.obj"/>
<Option target="default"/>
</Unit>
<Unit filename="src\testobj.cpp">
<Option compilerVar="CPP"/>
+ <Option objectName="testobj.obj"/>
<Option target="default"/>
</Unit>
<Unit filename="src\testobj.h">
Modified: tiki/examples/TikiTest/tikitest.layout
===================================================================
--- tiki/examples/TikiTest/tikitest.layout 2006-12-31 03:17:23 UTC (rev 390)
+++ tiki/examples/TikiTest/tikitest.layout 2007-01-01 03:31:29 UTC (rev 391)
@@ -7,6 +7,4 @@
<File name="src\test.cpp" open="0" top="0">
<Cursor position="5471" topLine="217"/>
</File>
- <Expand folder="/Sources/src"/>
- <Expand folder="/Sources"/>
</CodeBlocks_layout_file>
Modified: tiki/src/gl/texture.cpp
===================================================================
--- tiki/src/gl/texture.cpp 2006-12-31 03:17:23 UTC (rev 390)
+++ tiki/src/gl/texture.cpp 2007-01-01 03:31:29 UTC (rev 391)
@@ -65,10 +65,10 @@
void Texture::convertToGl() {
uint16 * src16 = (uint16 *)m_ptr;
uint8 * dst = m_txrdata;
-
+
if (m_fmt == RGBA8888)
return;
-
+
// The data needs to be converted from its source format to ARGB8888, and
// it needs to be Y-inverted as well.
// NOTE: The Y-inversion is only true so "proper" GL coordinates can be obtained.
@@ -117,7 +117,8 @@
}
}
-#if TIKI_PLAT == TIKI_WIN32
+#if TIKI_PLAT == TIKI_WIN32
+#if !defined(__GNUC__)
// Win32 doesn't seem to have this... perhaps it's not really ANSI?
static int strcasecmp(const char * cs,const char * ct) {
int c1, c2, res;
@@ -132,6 +133,7 @@
return res;
}
+#endif
#endif
@@ -211,17 +213,17 @@
/* We'll write the converted data into this buffer */
if (!m_txrdata)
m_txrdata = new uint8[img->w * img->h * 4];
-
+
convertToGl();
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_w, m_h, 0, GL_RGBA, GL_UNSIGNED_BYTE, m_txrdata);
-
+
GLenum err = glGetError();
#elif TIKI_PLAT == TIKI_DC
- m_txrdata = (uint8 *)pvr_mem_malloc(img->w * img->h * 2);
+ m_txrdata = (uint8 *)pvr_mem_malloc(img->w * img->h * 2);
pvr_txr_load_ex(m_ptr, m_txrdata, img->w, img->h, PVR_TXRLOAD_16BPP);
-
+
if(use_alpha) {
glKosTex2D(GL_ARGB4444_TWID, m_w, m_h, m_txrdata);
} else {
@@ -315,15 +317,19 @@
select();
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, gumode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, gvmode);
-
+
// This provides the expected behavior on newer OpenGL impls...
-#if TIKI_PLAT != TIKI_DC
+#if TIKI_PLAT != TIKI_DC
+// for whatever reason the Windows 2003 R2 PSDK is only
+// OpenGL 1.1 which doesnt have GL_CLAMP_TO_EDGE
+#if !defined(GL_VERSION_1_1)
if (gumode == GL_CLAMP)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
if (gvmode == GL_CLAMP)
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-#endif
-#endif
+ glTexParameteri(GL_EXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+#endif // GL_VERSION_1_1
+#endif // TIKI_DC
+#endif // TIKI_NDS
}
void * Texture::canvasLock() {
Modified: tiki/win32/tiki.cbp
===================================================================
--- tiki/win32/tiki.cbp 2006-12-31 03:17:23 UTC (rev 390)
+++ tiki/win32/tiki.cbp 2007-01-01 03:31:29 UTC (rev 391)
@@ -6,15 +6,15 @@
<Option title="Tiki"/>
<Option makefile="Makefile"/>
<Option makefile_is_custom="0"/>
- <Option compiler="1"/>
+ <Option compiler="0"/>
<Build>
<Target title="default">
- <Option output="C:\projects\tiki\win32\tiki.lib"/>
+ <Option output="libtiki.a"/>
<Option working_dir=""/>
<Option object_output=".objs"/>
<Option deps_output=".deps"/>
<Option type="2"/>
- <Option compiler="1"/>
+ <Option compiler="0"/>
<Option projectResourceIncludeDirsRelation="2"/>
</Target>
</Build>
@@ -28,8 +28,10 @@
<Add directory="..\3rdparty\zlib"/>
<Add directory="C:\Program Files\OpenAL 1.1 SDK\include"/>
<Add directory="C:\Program Files\Microsoft DirectX 9.0 SDK (February 2005)\Include"/>
+ <Add directory="..\3rdparty\libvorbis\lib"/>
</Compiler>
<Linker>
+ <Add library="opengl32"/>
<Add directory="C:\Program Files\OpenAL 1.1 SDK\libs\Win32"/>
<Add directory="C:\Program Files\Microsoft DirectX 9.0 SDK (February 2005)\Lib\x86"/>
</Linker>
Modified: tiki/win32/tiki.layout
===================================================================
--- tiki/win32/tiki.layout 2006-12-31 03:17:23 UTC (rev 390)
+++ tiki/win32/tiki.layout 2007-01-01 03:31:29 UTC (rev 391)
@@ -2,11 +2,17 @@
<!DOCTYPE CodeBlocks_layout_file>
<CodeBlocks_layout_file>
<File name="..\3rdparty\libjpeg\jconfig.h" open="0" top="0">
- <Cursor position="116" topLine="0"/>
+ <Cursor position="653" topLine="2"/>
</File>
+ <File name="..\3rdparty\libjpeg\jpeglib.h" open="0" top="0">
+ <Cursor position="1105" topLine="11"/>
+ </File>
<File name="..\3rdparty\libogg\src\bitwise.c" open="0" top="0">
<Cursor position="1119" topLine="0"/>
</File>
+ <File name="..\3rdparty\libvorbis\lib\modes\setup_44.h" open="0" top="0">
+ <Cursor position="956" topLine="1"/>
+ </File>
<File name="..\include\Tiki\stream.h" open="0" top="0">
<Cursor position="471" topLine="26"/>
</File>
@@ -16,9 +22,15 @@
<File name="..\src\audio\oggvorbis\sndoggvorbis.cpp" open="0" top="0">
<Cursor position="205" topLine="0"/>
</File>
+ <File name="..\src\audio\sound.cpp" open="0" top="0">
+ <Cursor position="42" topLine="5"/>
+ </File>
<File name="..\src\gl\animation.cpp" open="0" top="0">
<Cursor position="10" topLine="0"/>
</File>
+ <File name="..\src\gl\texture.cpp" open="0" top="0">
+ <Cursor position="7819" topLine="301"/>
+ </File>
<File name="include\Tiki\glhdrs.h" open="0" top="0">
<Cursor position="123" topLine="0"/>
</File>
@@ -46,12 +58,4 @@
<File name="src\tikitime.cpp" open="0" top="0">
<Cursor position="161" topLine="2"/>
</File>
- <Expand folder="/Sources/win32/src"/>
- <Expand folder="/Sources/win32"/>
- <Expand folder="/Sources"/>
- <Expand folder="/Headers/include"/>
- <Expand folder="/Headers/win32/include/Tiki"/>
- <Expand folder="/Headers/win32/include"/>
- <Expand folder="/Headers/win32"/>
- <Expand folder="/Headers"/>
</CodeBlocks_layout_file>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|