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

@ -28,4 +28,4 @@ public:
bool WorkToDoForMedics();
};
extern CAccidentManager gAccidentManager;
extern CAccidentManager gAccidentManager;

View file

@ -43,7 +43,7 @@ void CControllerConfigManager::MakeControllerActionsBlank()
}
}
#ifdef RW_GL3
#if defined RW_GL3 || defined RW_GLES1
int MapIdToButtonId(int mapId) {
#ifdef __SYMBIAN32__
// TODO
@ -102,7 +102,7 @@ int32 CControllerConfigManager::GetJoyButtonJustDown()
if (m_NewState.rgbButtons[i] & 0x80 && !(m_OldState.rgbButtons[i] & 0x80))
return i + 1;
}
#elif defined RW_GL3
#elif defined RW_GL3 || defined RW_GLES1
if (m_NewState.isGamepad) {
for (int32 i = 0; i < MAX_BUTTONS; i++) {
if (m_NewState.mappedButtons[i] && !(m_OldState.mappedButtons[i]))
@ -2773,7 +2773,7 @@ void CControllerConfigManager::UpdateJoyButtonState(int32 padnumber)
else
m_aButtonStates[i] = false;
}
#elif defined RW_GL3
#elif defined RW_GL3 || defined RW_GLES1
if (m_NewState.isGamepad) {
for (int32 i = 0; i < MAX_BUTTONS; i++) {
#if !defined __SYMBIAN32__

View file

@ -103,7 +103,7 @@ class CControllerState;
#define ACTIONNAME_LENGTH 40
#ifdef RW_GL3
#if defined RW_GL3 || defined RW_GLES1
struct GlfwJoyState {
int8 id;
bool isGamepad;
@ -129,7 +129,7 @@ public:
};
bool m_bFirstCapture;
#if defined RW_GL3
#if defined RW_GL3 || defined RW_GLES1
GlfwJoyState m_OldState;
GlfwJoyState m_NewState;
#else
@ -219,8 +219,8 @@ public:
void ResetSettingOrder (e_ControllerAction action);
};
#ifndef RW_GL3
#if !defined RW_GL3 && !defined RW_GLES1
VALIDATE_SIZE(CControllerConfigManager, 0x143C);
#endif
extern CControllerConfigManager ControlsManager;
extern CControllerConfigManager ControlsManager;

View file

@ -62,4 +62,4 @@ public:
static void ReportCrimeForEvent(eEventType type, intptr, bool);
};
extern CEvent gaEvent[NUMEVENTS];
extern CEvent gaEvent[NUMEVENTS];

View file

@ -5138,7 +5138,7 @@ CMenuManager::ProcessButtonPresses(void)
ControlsManager.MakeControllerActionsBlank();
ControlsManager.InitDefaultControlConfiguration();
ControlsManager.InitDefaultControlConfigMouse(MousePointerStateHelper.GetMouseSetUp());
#if !defined RW_GL3
#if !defined RW_GL3 && !defined RW_GLES1
if (AllValidWinJoys.m_aJoys[JOYSTICK1].m_bInitialised) {
DIDEVCAPS devCaps;
devCaps.dwSize = sizeof(DIDEVCAPS);

View file

@ -1124,7 +1124,7 @@ CRadar::LoadTextures()
|| (x2 < 1 && y2 == 1)) // one pixel on each side of second to first/last line is transparent
pixels[x + y * 16] = 0;
else if((x2 == 2 && y2 >= 2)|| (y2 == 2 && x2 >= 2) )// colored square inside
#ifdef RW_GL3
#if defined RW_GL3 || defined RW_GLES1
pixels[x + y * 16] = WAYPOINT_R | (WAYPOINT_G << 8) | (WAYPOINT_B << 16) | (255 << 24);
#else
pixels[x + y * 16] = WAYPOINT_B | (WAYPOINT_G << 8) | (WAYPOINT_R << 16) | (255 << 24);

View file

@ -8,4 +8,4 @@ public:
bool IsInRange(CVector2D vec);
void DebugShowRange(float, int);
CVector2D GetRandomPointInRange();
};
};

View file

@ -354,7 +354,7 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
#else
#define debug(f, ...) re3_debug("[DBG]: " f, ## __VA_ARGS__)
#define Error(f, ...) re3_debug("[ERROR]: " f, ## __VA_ARGS__)
#ifndef MASTER
#if !defined MASTER || defined LOGS
#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__)
#define USERERROR(f, ...) re3_usererror(f, ## __VA_ARGS__)
#else
@ -367,7 +367,7 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
#undef ASSERT
#endif
#ifndef MASTER
#if !defined MASTER || defined LOGS
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) )
#else
#define assert(_Expression) (_Expression)

View file

@ -1,5 +1,8 @@
#pragma once
#define LOGS
#define LOGS_RDEBUG
// disables (most) stuff that wasn't in original gta3.exe
#ifdef __MWERKS__
#define VANILLA_DEFINES

View file

@ -1140,6 +1140,8 @@ DisplayGameDebugText()
"D3D8 "
#elif defined RW_GL3
"OpenGL "
#elif defined RW_GLES1
"GLES1 "
#endif
#if defined AUDIO_OAL
"OAL "
@ -1633,7 +1635,7 @@ Idle(void *arg)
if((!FrontEndMenuManager.m_bMenuActive || FrontEndMenuManager.m_bRenderGameInMenu) &&
TheCamera.GetScreenFadeStatus() != FADE_2)
{
#if defined(GTA_PC) && !defined(RW_GL3) && defined(FIX_BUGS)
#if defined(GTA_PC) && !defined(RW_GL3) && !defined(RW_GLES1) && defined(FIX_BUGS)
// This is from SA, but it's nice for windowed mode
if (!FrontEndMenuManager.m_bRenderGameInMenu) {
RwV2d pos;

View file

@ -69,7 +69,7 @@ myrand(void)
{
#ifdef USE_PS2_RAND
// Use our own implementation of rand, stolen from PS2
myrand_seed = 0x5851F42D4C957F2D * myrand_seed + 1;
myrand_seed = 0x5851F42D4C957F2DULL * myrand_seed + 1;
return ((myrand_seed >> 32) & 0x7FFFFFFF);
#else
// or original codewarrior rand
@ -1105,12 +1105,12 @@ extern bool gbRenderWorld2;
#endif
#ifndef __MWERKS__
#ifndef MASTER
#if !defined MASTER || defined LOGS
const int re3_buffsize = 1024;
static char re3_buff[re3_buffsize];
#endif
#ifndef MASTER
#if !defined MASTER || defined LOGS
void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func)
{
#ifdef _WIN32
@ -1166,9 +1166,13 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
}
#endif
#ifdef LOGS_RDEBUG
extern "C" void RDebug_Printf(const char*, ...);
#endif
void re3_debug(const char *format, ...)
{
#ifndef MASTER
#if !defined MASTER || defined LOGS
va_list va;
va_start(va, format);
#ifdef _WIN32
@ -1179,11 +1183,15 @@ void re3_debug(const char *format, ...)
va_end(va);
printf("%s", re3_buff);
#ifdef LOGS_RDEBUG
RDebug_Printf("%s", re3_buff);
#else
CDebug::DebugAddText(re3_buff);
#endif
#endif
}
#ifndef MASTER
#if !defined MASTER || defined LOGS
void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...)
{
char buff[re3_buffsize *2];
@ -1205,7 +1213,7 @@ void re3_trace(const char *filename, unsigned int lineno, const char *func, cons
}
#endif
#ifndef MASTER
#if !defined MASTER || defined LOGS
void re3_usererror(const char *format, ...)
{
va_list va;