librw/src/rwps2.h

55 lines
1.3 KiB
C
Raw Normal View History

2014-12-20 15:05:34 +01:00
namespace Rw {
2014-12-30 17:39:39 +01:00
namespace Ps2 {
2014-12-20 15:05:34 +01:00
2014-12-30 17:39:39 +01:00
struct InstanceData
2014-12-20 15:05:34 +01:00
{
// 0 - addresses in ref tags need fixing
// 1 - no ref tags, so no fixing
// set by the program:
// 2 - ref tags are fixed, need to unfix before stream write
uint32 arePointersFixed;
2014-12-20 15:05:34 +01:00
uint32 dataSize;
uint8 *data;
Material *material;
};
2014-12-20 15:05:34 +01:00
2014-12-30 17:39:39 +01:00
struct InstanceDataHeader : Rw::InstanceDataHeader
2014-12-20 15:05:34 +01:00
{
uint32 numMeshes;
2014-12-30 17:39:39 +01:00
InstanceData *instanceMeshes;
2014-12-20 15:05:34 +01:00
};
2014-12-30 17:39:39 +01:00
void *DestroyNativeData(void *object, int32, int32);
void ReadNativeData(Stream *stream, int32 len, void *object, int32, int32);
void WriteNativeData(Stream *stream, int32 len, void *object, int32, int32);
int32 GetSizeNativeData(void *object, int32, int32);
void RegisterNativeDataPlugin(void);
void walkDMA(InstanceData *inst, void (*f)(uint32 *data, int32 size));
void sizedebug(InstanceData *inst);
// only RW_PS2
void fixDmaOffsets(InstanceData *inst);
void unfixDmaOffsets(InstanceData *inst);
// Skin plugin
void ReadNativeSkin(Stream *stream, int32, void *object, int32 offset);
void WriteNativeSkin(Stream *stream, int32 len, void *object, int32 offset);
int32 GetSizeNativeSkin(void *object, int32 offset);
// ADC plugin
// The plugin is a little crippled due to lack of documentation
struct ADCData
{
// only information we can get from GTA DFFs :/
uint32 adcFormatted;
};
void RegisterADCPlugin(void);
2014-12-20 15:05:34 +01:00
}
2014-12-30 17:39:39 +01:00
}