[lugaru] Texture files missing?
Chris Ball
cjb at laptop.org
Tue May 11 19:40:45 EDT 2010
Hi,
Many of the PNGs in Data/Textures/ in the hg repo are zero-length.
Is that intentional? Perhaps as a result, I'm getting a segfault in
Terrain::UpdateVertexArray() (Terrain.cpp:268) when entering the game.
I had to make a few changes to allow compilation. Namely:
diff -r 0b8beb014a87 Source/OpenGL_Windows.cpp
--- a/Source/OpenGL_Windows.cpp Tue May 11 12:25:50 2010 -0400
+++ b/Source/OpenGL_Windows.cpp Tue May 11 19:37:44 2010 -0400
@@ -1522,7 +1522,6 @@
char *retval;
char *envr;
- char *ptr = strrchr(argv0, '/');
if (strchr(argv0, '/'))
{
retval = strdup(argv0);
@@ -1558,7 +1557,7 @@
*ptr = '\0';
}
#endif
- chdir(dir);
+ //chdir(dir);
free(dir);
}
}
@@ -2576,7 +2575,7 @@
#if !USE_DEVIL
static bool load_image(const char *file_name, TGAImageRec &tex)
{
- char *ptr = strrchr(file_name, '.');
+ const char *ptr = strrchr(file_name, '.');
if (ptr)
{
if (stricmp(ptr+1, "png") == 0)
@@ -2740,7 +2739,8 @@
static bool save_image(const char *file_name)
{
- char *ptr = strrchr(file_name, '.');
+ const char *ptr = strrchr(file_name, '.');
+
if (ptr)
{
if (stricmp(ptr+1, "png") == 0)
diff -r 0b8beb014a87 makefile
--- a/makefile Tue May 11 12:25:50 2010 -0400
+++ b/makefile Tue May 11 19:37:44 2010 -0400
@@ -101,9 +101,9 @@
LDFLAGS += -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework Carbon -framework OpenAL
LDFLAGS += ./libSDL-1.2.0.dylib ./libSDLmain-osx.a
else
- CXX := /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++
- CC := /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/gcc
- LD := /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++
+ CXX := g++
+ CC := gcc
+ LD := g++
CFLAGS += -DPLATFORM_LINUX=1
LDFLAGS += ./libSDL-1.2.so.0 -Wl,-rpath,\$$ORIGIN
I'm excited about the source release. Thanks to all involved!
- Chris.
--
Chris Ball <cjb at laptop.org>
More information about the lugaru
mailing list