Merge gles1 and master

# Conflicts:
#	TODO.md
#	group/bld.inf
#	group/common.mmh
#	src/skel/symbian/symbian.cpp
This commit is contained in:
Shinovon 2026-05-06 22:01:55 +05:00
commit 55aecc66f3
82 changed files with 4082 additions and 129 deletions

View file

@ -9,11 +9,19 @@
#include <eikstart.h>
#include <hal.h>
#include <pthread.h>
#include <gles2/gl2.h>
#ifdef RW_GL3
#include <EGL/egl.h>
#else
#include <GLES/egl.h>
#endif
#include <locale.h>
#include <versioninfo.h>
#include <aknwseventobserver.h>
#include <featdiscovery.h>
#include <aknutils.h>
#ifndef KFeatureIdQwertyInput
#include <featureinfo.h>
#endif
#include "common.h"
#include "rwcore.h"
@ -79,10 +87,12 @@ static psGlobalType PsGlobal;
static TBool foreground;
bool moreVram;
static bool spinning;
bool qwerty;
bool touch;
bool moreVram;
void _InputTranslateShiftKeyUpDown(RsKeyCodes *rs) {
}
@ -292,22 +302,40 @@ static int MapScanCode(TInt aScanCode, TInt aModifiers) {
return JOY_DPAD_RIGHT;
}
return JOY_DPAD_DOWN;
case 'z':
case 'Z':
case '1':
return JOY_B;
case 'x':
case 'X':
case '2':
return JOY_X;
case 'c':
case 'C':
case 'a':
case 'A':
case '4':
return JOY_A;
case 's':
case 'S':
case '3':
return JOY_Y;
case '5':
return JOY_L1;
case '6':
return JOY_R1;
case '7':
return JOY_L2;
case '8':
return JOY_R2;
case EStdKeyDevice0:
return JOY_BACK;
case EStdKeyDevice1:
case EStdKeySpace:
case ' ':
return JOY_START;
case EStdKeyEnter:
case EStdKeyNkpEnter:
case EStdKeyDevice3:
return JOY_Y;
}
return -1;
}
@ -414,39 +442,54 @@ public:
CreateWindowL();
iAppUi->SetOrientationL(CAknAppUiBase::EAppUiOrientationLandscape);
SetExtentToWholeScreen();
SetFocus(ETrue);
#ifdef RW_GL3
Window().EnableAdvancedPointers();
#endif
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;
RsGlobal.height = size.iHeight;
EGLint attribs[] = {
EGL_BUFFER_SIZE, 16,
EGL_BUFFER_SIZE, 24,
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, 0,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
#ifdef RW_GL3
EGL_SAMPLES, 0,
EGL_COLOR_BUFFER_TYPE, EGL_RGB_BUFFER,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
#endif
EGL_NONE
};
eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
eglInitialize(eglDisplay, NULL, NULL);
#ifdef RW_GL3
eglBindAPI(EGL_OPENGL_ES_API);
#endif
EGLint numConfigs;
eglChooseConfig(eglDisplay, attribs, &eglConfig, 1, &numConfigs);
#ifdef RW_GL3
EGLint contextAttribs[ 3 ] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE };
eglContext = eglCreateContext(eglDisplay, eglConfig, EGL_NO_CONTEXT, contextAttribs);
#else
eglContext = eglCreateContext(eglDisplay, eglConfig, EGL_NO_CONTEXT, NULL);
#endif
RWindow& window = Window();
eglSurface = eglCreateWindowSurface(eglDisplay, eglConfig, &window, NULL);
@ -458,6 +501,9 @@ public:
setlocale(LC_COLLATE, "C");
setlocale(LC_NUMERIC, "C");
touch = AknLayoutUtils::PenEnabled();
TRAP_IGNORE(qwerty = CFeatureDiscovery::IsFeatureSupportedL(KFeatureIdQwertyInput));
chdir("E:\\Data\\gta3\\");
gGameState = GS_START_UP;
FrontEndMenuManager.LoadSettings();
@ -471,7 +517,6 @@ public:
openParams.width = RsGlobal.width;
openParams.height = RsGlobal.height;
openParams.windowtitle = RsGlobal.appName;
ControlsManager.MakeControllerActionsBlank();
ControlsManager.InitDefaultControlConfiguration();
@ -523,9 +568,12 @@ public:
// CCoeControl::HandlePointerEventL(aPointerEvent);
// return;
// }
#ifdef RW_GL3
const TAdvancedPointerEvent* advpointer = aPointerEvent.AdvancedPointerEvent();
int i = advpointer != NULL ? advpointer->PointerNumber() : 0;
#else
int i = 0;
#endif
static int activeZone[10];
static int stickCenterX[10];