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:
|
||||
$(MAKE) -C ../vendor/librw/src/gl/shaders/ -f Makefile all
|
||||
|
||||
CLEAN:
|
||||
rm ../vendor/librw/src/gl/shaders/*.inc
|
||||
CLEAN: do_nothing
|
||||
|
||||
LIB: do_nothing
|
||||
|
||||
|
|
|
|||
|
|
@ -84,11 +84,7 @@ public:
|
|||
inline float GetTimeLeft() { return hierarchy->totalLength - currentTime; }
|
||||
|
||||
static CAnimBlendAssociation *FromLink(CAnimBlendLink *l) {
|
||||
#ifdef S60V5
|
||||
return (CAnimBlendAssociation*)((uint8*)l - OFFSET_OF(CAnimBlendAssociation, link));
|
||||
#else
|
||||
return (CAnimBlendAssociation*)((uint8*)l - offsetof(CAnimBlendAssociation, link));
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -350,10 +350,12 @@ public:
|
|||
EnableDragEvents();
|
||||
ActivateL();
|
||||
|
||||
#ifdef RW_GL3
|
||||
// VC4 check
|
||||
VersionInfo::TPlatformVersion platformVersion;
|
||||
VersionInfo::GetVersion(platformVersion);
|
||||
moreVram = platformVersion.iMajorVersion == 5 && platformVersion.iMinorVersion >= 4;
|
||||
#endif
|
||||
|
||||
TSize size = Size();
|
||||
RsGlobal.width = size.iWidth;
|
||||
|
|
@ -411,9 +413,6 @@ public:
|
|||
|
||||
openParams.width = RsGlobal.width;
|
||||
openParams.height = RsGlobal.height;
|
||||
#ifndef S60V5
|
||||
openParams.windowtitle = RsGlobal.appName;
|
||||
#endif
|
||||
|
||||
ControlsManager.MakeControllerActionsBlank();
|
||||
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 build = 0xFFFF;
|
||||
#ifdef RW_PS2
|
||||
#ifdef defined RW_PS2
|
||||
int32 platform = PLATFORM_PS2;
|
||||
#elif RW_WDGL
|
||||
#elif defined RW_WDGL
|
||||
int32 platform = PLATFORM_WDGL;
|
||||
#elif RW_GL3
|
||||
#elif defined RW_GL3
|
||||
int32 platform = PLATFORM_GL3;
|
||||
#elif RW_GLES1
|
||||
#elif defined RW_GLES1
|
||||
int32 platform = PLATFORM_GLES1;
|
||||
#elif RW_D3D9
|
||||
#elif defined RW_D3D9
|
||||
int32 platform = PLATFORM_D3D9;
|
||||
#else
|
||||
int32 platform = PLATFORM_NULL;
|
||||
|
|
|
|||
8
vendor/librw/src/d3d/d3d9.cpp
vendored
8
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
|
||||
if(!isPrelit){
|
||||
dcl[i].stream = 2;
|
||||
#ifdef S60V5
|
||||
dcl[i].offset = OFFSET_OF(VertexConstantData, color);
|
||||
#else
|
||||
dcl[i].offset = offsetof(VertexConstantData, color);
|
||||
#endif
|
||||
dcl[i].type = D3DDECLTYPE_D3DCOLOR;
|
||||
dcl[i].method = D3DDECLMETHOD_DEFAULT;
|
||||
dcl[i].usage = D3DDECLUSAGE_COLOR;
|
||||
|
|
@ -567,11 +563,7 @@ defaultInstanceCB(Geometry *geo, InstanceDataHeader *header, bool32 reinstance)
|
|||
}
|
||||
if(geo->numTexCoordSets == 0){
|
||||
dcl[i].stream = 2;
|
||||
#ifdef S60V5
|
||||
dcl[i].offset = OFFSET_OF(VertexConstantData, texCoors);
|
||||
#else
|
||||
dcl[i].offset = offsetof(VertexConstantData, texCoors);
|
||||
#endif
|
||||
dcl[i].type = D3DDECLTYPE_FLOAT2;
|
||||
dcl[i].method = D3DDECLMETHOD_DEFAULT;
|
||||
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.winHeight = openparams->height;
|
||||
glGlobals.winTitle = openparams->windowtitle;
|
||||
|
||||
glGlobals.modes = (DisplayMode*)rwMalloc(sizeof(DisplayMode), ID_DRIVER | MEMDUR_EVENT);
|
||||
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.winHeight = openparams->height;
|
||||
glGlobals.winTitle = openparams->windowtitle;
|
||||
|
||||
glGlobals.modes = (DisplayMode*)rwMalloc(sizeof(DisplayMode), ID_DRIVER | MEMDUR_EVENT);
|
||||
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);
|
||||
glVertexPointer(3, GL_FLOAT, sizeof(Im2DVertex), (void*)0);
|
||||
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);
|
||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im2DVertex), (void*)offsetof(Im2DVertex, u));
|
||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im2DVertex), (void*)OFFSET_OF(Im2DVertex, u));
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
|
|
@ -119,9 +119,9 @@ void im2DRenderIndexedPrimitive(PrimitiveType primType,
|
|||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(3, GL_FLOAT, sizeof(Im2DVertex), (void*)0);
|
||||
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);
|
||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im2DVertex), (void*)offsetof(Im2DVertex, u));
|
||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im2DVertex), (void*)OFFSET_OF(Im2DVertex, u));
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
|
|
@ -151,9 +151,9 @@ static AttribDesc im3dattribDesc[3] = {
|
|||
{ ATTRIB_POS, GL_FLOAT, GL_FALSE, 3,
|
||||
sizeof(Im3DVertex), 0 },
|
||||
{ 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,
|
||||
sizeof(Im3DVertex), offsetof(Im3DVertex, u) },
|
||||
sizeof(Im3DVertex), OFFSET_OF(Im3DVertex, u) },
|
||||
};
|
||||
static uint32 im3DVbo, im3DIbo;
|
||||
static int32 num3DVertices; // not actually needed here
|
||||
|
|
@ -198,9 +198,9 @@ im3DRenderPrimitive(PrimitiveType primType)
|
|||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(3, GL_FLOAT, sizeof(Im3DVertex), (void*)0);
|
||||
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);
|
||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im3DVertex), (void*)offsetof(Im3DVertex, u));
|
||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im3DVertex), (void*)OFFSET_OF(Im3DVertex, u));
|
||||
|
||||
flushCache();
|
||||
glDrawArrays(primTypeMap[primType], 0, num3DVertices);
|
||||
|
|
@ -220,9 +220,9 @@ im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndic
|
|||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glVertexPointer(3, GL_FLOAT, sizeof(Im3DVertex), (void*)0);
|
||||
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);
|
||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im3DVertex), (void*)offsetof(Im3DVertex, u));
|
||||
glTexCoordPointer(2, GL_FLOAT, sizeof(Im3DVertex), (void*)OFFSET_OF(Im3DVertex, u));
|
||||
|
||||
flushCache();
|
||||
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
|
||||
#ifdef S60V5
|
||||
#define OFFSET_OF(type, member) ((size_t)&(((type*)0)->member))
|
||||
#else
|
||||
#define OFFSET_OF offsetof
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue