mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-22 17:47:20 +03:00
Fixes
This commit is contained in:
parent
3b6eaf91e3
commit
5c860e4431
9 changed files with 24 additions and 38 deletions
|
|
@ -8,8 +8,7 @@ MAKMAKE: do_nothing
|
||||||
BLD:
|
BLD:
|
||||||
$(MAKE) -C ../vendor/librw/src/gl/shaders/ -f Makefile all
|
$(MAKE) -C ../vendor/librw/src/gl/shaders/ -f Makefile all
|
||||||
|
|
||||||
CLEAN:
|
CLEAN: do_nothing
|
||||||
rm ../vendor/librw/src/gl/shaders/*.inc
|
|
||||||
|
|
||||||
LIB: do_nothing
|
LIB: do_nothing
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,11 +84,7 @@ public:
|
||||||
inline float GetTimeLeft() { return hierarchy->totalLength - currentTime; }
|
inline float GetTimeLeft() { return hierarchy->totalLength - currentTime; }
|
||||||
|
|
||||||
static CAnimBlendAssociation *FromLink(CAnimBlendLink *l) {
|
static CAnimBlendAssociation *FromLink(CAnimBlendLink *l) {
|
||||||
#ifdef S60V5
|
return (CAnimBlendAssociation*)((uint8*)l - OFFSET_OF(CAnimBlendAssociation, link));
|
||||||
return (CAnimBlendAssociation*)((uint8*)l - OFFSET_OF(CAnimBlendAssociation, link));
|
|
||||||
#else
|
|
||||||
return (CAnimBlendAssociation*)((uint8*)l - offsetof(CAnimBlendAssociation, link));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -349,11 +349,13 @@ public:
|
||||||
#endif
|
#endif
|
||||||
EnableDragEvents();
|
EnableDragEvents();
|
||||||
ActivateL();
|
ActivateL();
|
||||||
|
|
||||||
|
#ifdef RW_GL3
|
||||||
// VC4 check
|
// VC4 check
|
||||||
VersionInfo::TPlatformVersion platformVersion;
|
VersionInfo::TPlatformVersion platformVersion;
|
||||||
VersionInfo::GetVersion(platformVersion);
|
VersionInfo::GetVersion(platformVersion);
|
||||||
moreVram = platformVersion.iMajorVersion == 5 && platformVersion.iMinorVersion >= 4;
|
moreVram = platformVersion.iMajorVersion == 5 && platformVersion.iMinorVersion >= 4;
|
||||||
|
#endif
|
||||||
|
|
||||||
TSize size = Size();
|
TSize size = Size();
|
||||||
RsGlobal.width = size.iWidth;
|
RsGlobal.width = size.iWidth;
|
||||||
|
|
@ -411,9 +413,6 @@ public:
|
||||||
|
|
||||||
openParams.width = RsGlobal.width;
|
openParams.width = RsGlobal.width;
|
||||||
openParams.height = RsGlobal.height;
|
openParams.height = RsGlobal.height;
|
||||||
#ifndef S60V5
|
|
||||||
openParams.windowtitle = RsGlobal.appName;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ControlsManager.MakeControllerActionsBlank();
|
ControlsManager.MakeControllerActionsBlank();
|
||||||
ControlsManager.InitDefaultControlConfiguration();
|
ControlsManager.InitDefaultControlConfiguration();
|
||||||
|
|
|
||||||
10
vendor/librw/src/base.cpp
vendored
10
vendor/librw/src/base.cpp
vendored
|
|
@ -26,15 +26,15 @@ namespace rw {
|
||||||
|
|
||||||
int32 version = 0x36003;
|
int32 version = 0x36003;
|
||||||
int32 build = 0xFFFF;
|
int32 build = 0xFFFF;
|
||||||
#ifdef RW_PS2
|
#ifdef defined RW_PS2
|
||||||
int32 platform = PLATFORM_PS2;
|
int32 platform = PLATFORM_PS2;
|
||||||
#elif RW_WDGL
|
#elif defined RW_WDGL
|
||||||
int32 platform = PLATFORM_WDGL;
|
int32 platform = PLATFORM_WDGL;
|
||||||
#elif RW_GL3
|
#elif defined RW_GL3
|
||||||
int32 platform = PLATFORM_GL3;
|
int32 platform = PLATFORM_GL3;
|
||||||
#elif RW_GLES1
|
#elif defined RW_GLES1
|
||||||
int32 platform = PLATFORM_GLES1;
|
int32 platform = PLATFORM_GLES1;
|
||||||
#elif RW_D3D9
|
#elif defined RW_D3D9
|
||||||
int32 platform = PLATFORM_D3D9;
|
int32 platform = PLATFORM_D3D9;
|
||||||
#else
|
#else
|
||||||
int32 platform = PLATFORM_NULL;
|
int32 platform = PLATFORM_NULL;
|
||||||
|
|
|
||||||
12
vendor/librw/src/d3d/d3d9.cpp
vendored
12
vendor/librw/src/d3d/d3d9.cpp
vendored
|
|
@ -554,11 +554,7 @@ defaultInstanceCB(Geometry *geo, InstanceDataHeader *header, bool32 reinstance)
|
||||||
// We expect some attributes to always be there, use the constant buffer as fallback
|
// We expect some attributes to always be there, use the constant buffer as fallback
|
||||||
if(!isPrelit){
|
if(!isPrelit){
|
||||||
dcl[i].stream = 2;
|
dcl[i].stream = 2;
|
||||||
#ifdef S60V5
|
dcl[i].offset = OFFSET_OF(VertexConstantData, color);
|
||||||
dcl[i].offset = OFFSET_OF(VertexConstantData, color);
|
|
||||||
#else
|
|
||||||
dcl[i].offset = offsetof(VertexConstantData, color);
|
|
||||||
#endif
|
|
||||||
dcl[i].type = D3DDECLTYPE_D3DCOLOR;
|
dcl[i].type = D3DDECLTYPE_D3DCOLOR;
|
||||||
dcl[i].method = D3DDECLMETHOD_DEFAULT;
|
dcl[i].method = D3DDECLMETHOD_DEFAULT;
|
||||||
dcl[i].usage = D3DDECLUSAGE_COLOR;
|
dcl[i].usage = D3DDECLUSAGE_COLOR;
|
||||||
|
|
@ -567,11 +563,7 @@ defaultInstanceCB(Geometry *geo, InstanceDataHeader *header, bool32 reinstance)
|
||||||
}
|
}
|
||||||
if(geo->numTexCoordSets == 0){
|
if(geo->numTexCoordSets == 0){
|
||||||
dcl[i].stream = 2;
|
dcl[i].stream = 2;
|
||||||
#ifdef S60V5
|
dcl[i].offset = OFFSET_OF(VertexConstantData, texCoors);
|
||||||
dcl[i].offset = OFFSET_OF(VertexConstantData, texCoors);
|
|
||||||
#else
|
|
||||||
dcl[i].offset = offsetof(VertexConstantData, texCoors);
|
|
||||||
#endif
|
|
||||||
dcl[i].type = D3DDECLTYPE_FLOAT2;
|
dcl[i].type = D3DDECLTYPE_FLOAT2;
|
||||||
dcl[i].method = D3DDECLMETHOD_DEFAULT;
|
dcl[i].method = D3DDECLMETHOD_DEFAULT;
|
||||||
dcl[i].usage = D3DDECLUSAGE_TEXCOORD;
|
dcl[i].usage = D3DDECLUSAGE_TEXCOORD;
|
||||||
|
|
|
||||||
1
vendor/librw/src/gl/gl3device.cpp
vendored
1
vendor/librw/src/gl/gl3device.cpp
vendored
|
|
@ -1633,7 +1633,6 @@ openSymbian(EngineOpenParams *openparams)
|
||||||
{
|
{
|
||||||
glGlobals.winWidth = openparams->width;
|
glGlobals.winWidth = openparams->width;
|
||||||
glGlobals.winHeight = openparams->height;
|
glGlobals.winHeight = openparams->height;
|
||||||
glGlobals.winTitle = openparams->windowtitle;
|
|
||||||
|
|
||||||
glGlobals.modes = (DisplayMode*)rwMalloc(sizeof(DisplayMode), ID_DRIVER | MEMDUR_EVENT);
|
glGlobals.modes = (DisplayMode*)rwMalloc(sizeof(DisplayMode), ID_DRIVER | MEMDUR_EVENT);
|
||||||
glGlobals.modes[0].width = openparams->width;
|
glGlobals.modes[0].width = openparams->width;
|
||||||
|
|
|
||||||
1
vendor/librw/src/gles1/gl1device.cpp
vendored
1
vendor/librw/src/gles1/gl1device.cpp
vendored
|
|
@ -1304,7 +1304,6 @@ openSymbian(EngineOpenParams *openparams)
|
||||||
{
|
{
|
||||||
glGlobals.winWidth = openparams->width;
|
glGlobals.winWidth = openparams->width;
|
||||||
glGlobals.winHeight = openparams->height;
|
glGlobals.winHeight = openparams->height;
|
||||||
glGlobals.winTitle = openparams->windowtitle;
|
|
||||||
|
|
||||||
glGlobals.modes = (DisplayMode*)rwMalloc(sizeof(DisplayMode), ID_DRIVER | MEMDUR_EVENT);
|
glGlobals.modes = (DisplayMode*)rwMalloc(sizeof(DisplayMode), ID_DRIVER | MEMDUR_EVENT);
|
||||||
glGlobals.modes[0].width = openparams->width;
|
glGlobals.modes[0].width = openparams->width;
|
||||||
|
|
|
||||||
20
vendor/librw/src/gles1/gl1immed.cpp
vendored
20
vendor/librw/src/gles1/gl1immed.cpp
vendored
|
|
@ -76,9 +76,9 @@ im2DRenderPrimitive(PrimitiveType primType, void *vertices, int32 numVertices)
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
glVertexPointer(3, GL_FLOAT, sizeof(Im2DVertex), (void*)0);
|
glVertexPointer(3, GL_FLOAT, sizeof(Im2DVertex), (void*)0);
|
||||||
glEnableClientState(GL_COLOR_ARRAY);
|
glEnableClientState(GL_COLOR_ARRAY);
|
||||||
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Im2DVertex), (void*)offsetof(Im2DVertex, r));
|
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Im2DVertex), (void*)OFFSET_OF(Im2DVertex, r));
|
||||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im2DVertex), (void*)offsetof(Im2DVertex, u));
|
glTexCoordPointer(2, GL_FLOAT, sizeof(Im2DVertex), (void*)OFFSET_OF(Im2DVertex, u));
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
@ -119,9 +119,9 @@ void im2DRenderIndexedPrimitive(PrimitiveType primType,
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
glVertexPointer(3, GL_FLOAT, sizeof(Im2DVertex), (void*)0);
|
glVertexPointer(3, GL_FLOAT, sizeof(Im2DVertex), (void*)0);
|
||||||
glEnableClientState(GL_COLOR_ARRAY);
|
glEnableClientState(GL_COLOR_ARRAY);
|
||||||
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Im2DVertex), (void*)offsetof(Im2DVertex, r));
|
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Im2DVertex), (void*)OFFSET_OF(Im2DVertex, r));
|
||||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im2DVertex), (void*)offsetof(Im2DVertex, u));
|
glTexCoordPointer(2, GL_FLOAT, sizeof(Im2DVertex), (void*)OFFSET_OF(Im2DVertex, u));
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
|
@ -151,9 +151,9 @@ static AttribDesc im3dattribDesc[3] = {
|
||||||
{ ATTRIB_POS, GL_FLOAT, GL_FALSE, 3,
|
{ ATTRIB_POS, GL_FLOAT, GL_FALSE, 3,
|
||||||
sizeof(Im3DVertex), 0 },
|
sizeof(Im3DVertex), 0 },
|
||||||
{ ATTRIB_COLOR, GL_UNSIGNED_BYTE, GL_TRUE, 4,
|
{ ATTRIB_COLOR, GL_UNSIGNED_BYTE, GL_TRUE, 4,
|
||||||
sizeof(Im3DVertex), offsetof(Im3DVertex, r) },
|
sizeof(Im3DVertex), OFFSET_OF(Im3DVertex, r) },
|
||||||
{ ATTRIB_TEXCOORDS0, GL_FLOAT, GL_FALSE, 2,
|
{ ATTRIB_TEXCOORDS0, GL_FLOAT, GL_FALSE, 2,
|
||||||
sizeof(Im3DVertex), offsetof(Im3DVertex, u) },
|
sizeof(Im3DVertex), OFFSET_OF(Im3DVertex, u) },
|
||||||
};
|
};
|
||||||
static uint32 im3DVbo, im3DIbo;
|
static uint32 im3DVbo, im3DIbo;
|
||||||
static int32 num3DVertices; // not actually needed here
|
static int32 num3DVertices; // not actually needed here
|
||||||
|
|
@ -198,9 +198,9 @@ im3DRenderPrimitive(PrimitiveType primType)
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
glVertexPointer(3, GL_FLOAT, sizeof(Im3DVertex), (void*)0);
|
glVertexPointer(3, GL_FLOAT, sizeof(Im3DVertex), (void*)0);
|
||||||
glEnableClientState(GL_COLOR_ARRAY);
|
glEnableClientState(GL_COLOR_ARRAY);
|
||||||
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Im3DVertex), (void*)offsetof(Im3DVertex, r));
|
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Im3DVertex), (void*)OFFSET_OF(Im3DVertex, r));
|
||||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im3DVertex), (void*)offsetof(Im3DVertex, u));
|
glTexCoordPointer(2, GL_FLOAT, sizeof(Im3DVertex), (void*)OFFSET_OF(Im3DVertex, u));
|
||||||
|
|
||||||
flushCache();
|
flushCache();
|
||||||
glDrawArrays(primTypeMap[primType], 0, num3DVertices);
|
glDrawArrays(primTypeMap[primType], 0, num3DVertices);
|
||||||
|
|
@ -220,9 +220,9 @@ im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndic
|
||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
glVertexPointer(3, GL_FLOAT, sizeof(Im3DVertex), (void*)0);
|
glVertexPointer(3, GL_FLOAT, sizeof(Im3DVertex), (void*)0);
|
||||||
glEnableClientState(GL_COLOR_ARRAY);
|
glEnableClientState(GL_COLOR_ARRAY);
|
||||||
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Im3DVertex), (void*)offsetof(Im3DVertex, r));
|
glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(Im3DVertex), (void*)OFFSET_OF(Im3DVertex, r));
|
||||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im3DVertex), (void*)offsetof(Im3DVertex, u));
|
glTexCoordPointer(2, GL_FLOAT, sizeof(Im3DVertex), (void*)OFFSET_OF(Im3DVertex, u));
|
||||||
|
|
||||||
flushCache();
|
flushCache();
|
||||||
glDrawElements(primTypeMap[primType], numIndices, GL_UNSIGNED_SHORT, nil);
|
glDrawElements(primTypeMap[primType], numIndices, GL_UNSIGNED_SHORT, nil);
|
||||||
|
|
|
||||||
2
vendor/librw/src/rwbase.h
vendored
2
vendor/librw/src/rwbase.h
vendored
|
|
@ -13,6 +13,8 @@
|
||||||
#define stderr stdout
|
#define stderr stdout
|
||||||
#ifdef S60V5
|
#ifdef S60V5
|
||||||
#define OFFSET_OF(type, member) ((size_t)&(((type*)0)->member))
|
#define OFFSET_OF(type, member) ((size_t)&(((type*)0)->member))
|
||||||
|
#else
|
||||||
|
#define OFFSET_OF offsetof
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue