mirror of
https://github.com/halpz/re3.git
synced 2025-07-16 20:48:11 +00:00
Fix build without FIX_BUGS, divide to 0 fixes
This commit is contained in:
@ -93,7 +93,7 @@ MemoryMgrFree(void *ptr)
|
||||
void *
|
||||
RwMallocAlign(RwUInt32 size, RwUInt32 align)
|
||||
{
|
||||
#ifdef FIX_BUGS
|
||||
#if defined (FIX_BUGS) || defined(FIX_BUGS_64)
|
||||
uintptr ptralign = align-1;
|
||||
void *mem = (void *)MemoryMgrMalloc(size + sizeof(uintptr) + ptralign);
|
||||
|
||||
|
@ -255,7 +255,8 @@ SkinGetBonePositionsToTable(RpClump *clump, RwV3d *boneTable)
|
||||
parent = stack[sp--];
|
||||
else
|
||||
parent = i;
|
||||
assert(parent >= 0 && parent < numBones);
|
||||
|
||||
//assert(parent >= 0 && parent < numBones);
|
||||
}
|
||||
}
|
||||
|
||||
@ -263,7 +264,7 @@ RpHAnimAnimation*
|
||||
HAnimAnimationCreateForHierarchy(RpHAnimHierarchy *hier)
|
||||
{
|
||||
int i;
|
||||
#ifdef FIX_BUGS
|
||||
#if defined FIX_BUGS || defined LIBRW
|
||||
int numNodes = hier->numNodes*2; // you're supposed to have at least two KFs per node
|
||||
#else
|
||||
int numNodes = hier->numNodes;
|
||||
@ -277,7 +278,7 @@ HAnimAnimationCreateForHierarchy(RpHAnimHierarchy *hier)
|
||||
frame->q.real = 1.0f;
|
||||
frame->q.imag.x = frame->q.imag.y = frame->q.imag.z = 0.0f;
|
||||
frame->t.x = frame->t.y = frame->t.z = 0.0f;
|
||||
#ifdef FIX_BUGS
|
||||
#if defined FIX_BUGS || defined LIBRW
|
||||
// times are subtracted and divided giving NaNs
|
||||
// so they can't both be 0
|
||||
frame->time = i/hier->numNodes;
|
||||
@ -483,7 +484,7 @@ CameraSize(RwCamera * camera, RwRect * rect,
|
||||
RwRaster *zRaster;
|
||||
|
||||
// BUG: game just changes camera raster's sizes, but this is a hack
|
||||
#ifdef FIX_BUGS
|
||||
#if defined FIX_BUGS || defined LIBRW
|
||||
/*
|
||||
* Destroy rasters...
|
||||
*/
|
||||
|
Reference in New Issue
Block a user