mirror of
https://github.com/aap/librw.git
synced 2024-11-25 05:05:42 +00:00
small init changes
This commit is contained in:
parent
53647520bc
commit
454e7b8ac6
@ -8,6 +8,7 @@
|
||||
#include "rwplg.h"
|
||||
#include "rwpipeline.h"
|
||||
#include "rwobjects.h"
|
||||
#include "rwengine.h"
|
||||
#include "rwplugins.h"
|
||||
#include "ps2/rwps2.h"
|
||||
#include "ps2/rwps2plg.h"
|
||||
@ -409,14 +410,9 @@ MatFX::enableEffects(Atomic *atomic)
|
||||
atomic->pipeline = matFXGlobals.pipelines[rw::platform];
|
||||
}
|
||||
|
||||
void
|
||||
registerMatFXPlugin(void)
|
||||
static void*
|
||||
matfxOpen(void*, int32, int32)
|
||||
{
|
||||
ObjPipeline *defpipe = new ObjPipeline(PLATFORM_NULL);
|
||||
defpipe->pluginID = 0; //ID_MATFX;
|
||||
defpipe->pluginData = 0;
|
||||
for(uint i = 0; i < nelem(matFXGlobals.pipelines); i++)
|
||||
matFXGlobals.pipelines[i] = defpipe;
|
||||
matFXGlobals.pipelines[PLATFORM_PS2] =
|
||||
ps2::makeMatFXPipeline();
|
||||
matFXGlobals.pipelines[PLATFORM_XBOX] =
|
||||
@ -429,6 +425,27 @@ registerMatFXPlugin(void)
|
||||
wdgl::makeMatFXPipeline();
|
||||
matFXGlobals.pipelines[PLATFORM_GL3] =
|
||||
gl3::makeMatFXPipeline();
|
||||
}
|
||||
|
||||
static void*
|
||||
matfxClose(void*, int32, int32)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
registerMatFXPlugin(void)
|
||||
{
|
||||
// init dummy pipelines
|
||||
ObjPipeline *defpipe = new ObjPipeline(PLATFORM_NULL);
|
||||
defpipe->pluginID = 0; //ID_MATFX;
|
||||
defpipe->pluginData = 0;
|
||||
for(uint i = 0; i < nelem(matFXGlobals.pipelines); i++)
|
||||
matFXGlobals.pipelines[i] = defpipe;
|
||||
|
||||
// TODO: call platform specific init functions?
|
||||
// have platform specific open functions?
|
||||
|
||||
Engine::registerPlugin(0, ID_MATFX, matfxOpen, matfxClose);
|
||||
|
||||
matFXGlobals.atomicOffset =
|
||||
Atomic::registerPlugin(sizeof(int32), ID_MATFX,
|
||||
|
31
src/skin.cpp
31
src/skin.cpp
@ -8,6 +8,7 @@
|
||||
#include "rwplg.h"
|
||||
#include "rwpipeline.h"
|
||||
#include "rwobjects.h"
|
||||
#include "rwengine.h"
|
||||
#include "rwplugins.h"
|
||||
#include "ps2/rwps2.h"
|
||||
#include "ps2/rwps2plg.h"
|
||||
@ -226,14 +227,9 @@ skinRights(void *object, int32, int32, uint32)
|
||||
Skin::setPipeline((Atomic*)object, 1);
|
||||
}
|
||||
|
||||
void
|
||||
registerSkinPlugin(void)
|
||||
static void*
|
||||
skinOpen(void*, int32, int32)
|
||||
{
|
||||
ObjPipeline *defpipe = new ObjPipeline(PLATFORM_NULL);
|
||||
defpipe->pluginID = ID_SKIN;
|
||||
defpipe->pluginData = 1;
|
||||
for(uint i = 0; i < nelem(skinGlobals.pipelines); i++)
|
||||
skinGlobals.pipelines[i] = defpipe;
|
||||
skinGlobals.pipelines[PLATFORM_PS2] =
|
||||
ps2::makeSkinPipeline();
|
||||
skinGlobals.pipelines[PLATFORM_XBOX] =
|
||||
@ -246,6 +242,27 @@ registerSkinPlugin(void)
|
||||
wdgl::makeSkinPipeline();
|
||||
skinGlobals.pipelines[PLATFORM_GL3] =
|
||||
gl3::makeSkinPipeline();
|
||||
}
|
||||
|
||||
static void*
|
||||
skinClose(void*, int32, int32)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
registerSkinPlugin(void)
|
||||
{
|
||||
// init dummy pipelines
|
||||
ObjPipeline *defpipe = new ObjPipeline(PLATFORM_NULL);
|
||||
defpipe->pluginID = ID_SKIN;
|
||||
defpipe->pluginData = 1;
|
||||
for(uint i = 0; i < nelem(skinGlobals.pipelines); i++)
|
||||
skinGlobals.pipelines[i] = defpipe;
|
||||
|
||||
// TODO: call platform specific init functions?
|
||||
// have platform specific open functions?
|
||||
|
||||
Engine::registerPlugin(0, ID_SKIN, skinOpen, skinClose);
|
||||
|
||||
skinGlobals.offset = Geometry::registerPlugin(sizeof(Skin*), ID_SKIN,
|
||||
createSkin,
|
||||
|
Loading…
Reference in New Issue
Block a user