mirror of https://github.com/aap/librw.git
Some fixes.
This commit is contained in:
parent
ad21deaf0f
commit
5247d1c26e
|
@ -75,7 +75,7 @@ Texture::read(const char *name, const char *mask)
|
|||
Raster *raster = NULL;
|
||||
Texture *tex;
|
||||
|
||||
if((tex = currentTexDictionary->find(name)))
|
||||
if(currentTexDictionary && (tex = currentTexDictionary->find(name)))
|
||||
return tex;
|
||||
tex = new Texture;
|
||||
strncpy(tex->name, name, 32);
|
||||
|
@ -90,6 +90,7 @@ Texture::read(const char *name, const char *mask)
|
|||
delete img;
|
||||
}
|
||||
tex->raster = raster;
|
||||
if(currentTexDictionary)
|
||||
currentTexDictionary->add(tex);
|
||||
return tex;
|
||||
}
|
||||
|
|
|
@ -187,9 +187,11 @@ init(void)
|
|||
rw::Image::setSearchPath(
|
||||
"/home/aap/gamedata/ps2/gta3/MODELS/gta3_archive/txd_extracted/;//home/aap/gamedata/ps2/gtavc/MODELS/gta3_archive/txd_extracted/;/home/aap/gamedata/ps2/gtasa/models/gta3_archive/txd_extracted/");
|
||||
//"D:\\rockstargames\\ps2\\gtavc\\MODELS\\gta3_archive\\txd_extracted\\;D:\\rockstargames\\ps2\\gtasa\\models\\gta3_archive\\txd_extracted\\");
|
||||
|
||||
rw::gl::registerNativeRaster();
|
||||
rw::registerMaterialRightsPlugin();
|
||||
gta::registerEnvSpecPlugin();
|
||||
rw::registerMatFXPlugin();
|
||||
rw::registerMaterialRightsPlugin();
|
||||
rw::registerAtomicRightsPlugin();
|
||||
rw::registerHAnimPlugin();
|
||||
gta::registerNodeNamePlugin();
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
CC=ee-gcc
|
||||
CXX=ee-g++
|
||||
AS=ee-g++
|
||||
LD=ee-g++ -v
|
||||
LD=ee-g++
|
||||
DVPAS=ee-dvp-as
|
||||
|
||||
LINK=-T$(PS2SDK)/ee/startup/linkfile
|
||||
LIBPATH=-L$(PS2SDK)/ee/lib
|
||||
INCPATH=-I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include -I$(HOME)/src/librw
|
||||
LIBS=$(HOME)/src/librw/librw-ps2.a -lc -lc -lkernel -lmf # g++ throws one -lc away, why? (unless -nostdlib)
|
||||
INCPATH=-I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include -I../..
|
||||
LIBS=../../librw-ps2.a -lc -lc -lkernel -lmf # g++ throws one -lc away, why? (unless -nostdlib)
|
||||
|
||||
CFLAGS = -c -Wall -nostdlib -fno-common -DPS2_EE $(INCPATH)
|
||||
ASFLAGS = -c -xassembler-with-cpp
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
//#include <cstdio>
|
||||
//#include <cstring>
|
||||
//#define _USE_MATH_DEFINES
|
||||
//#include <cmath>
|
||||
//#include <cassert>
|
||||
#include <fstream>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
#include <cassert>
|
||||
|
||||
#include <rw.h>
|
||||
#include <src/gtaplg.h>
|
||||
|
@ -121,11 +120,12 @@ main()
|
|||
gsCurState->clearcol = 0x80404040;
|
||||
|
||||
gsInit();
|
||||
printf("hallo\n");
|
||||
|
||||
rw::registerMaterialRightsPlugin();
|
||||
gta::registerEnvSpecPlugin();
|
||||
rw::registerMatFXPlugin();
|
||||
rw::registerMaterialRightsPlugin();
|
||||
rw::registerAtomicRightsPlugin();
|
||||
rw::registerHAnimPlugin();
|
||||
gta::registerNodeNamePlugin();
|
||||
gta::registerBreakableModelPlugin();
|
||||
gta::registerExtraVertColorPlugin();
|
||||
|
|
Loading…
Reference in New Issue