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