mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-22 17:47:20 +03:00
Fix compilation for windows
This commit is contained in:
parent
20c7bf7818
commit
7f9b635431
12 changed files with 70 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,7 @@
|
||||||
.cproject
|
.cproject
|
||||||
.project
|
.project
|
||||||
*.bat
|
*.bat
|
||||||
|
!/printHash.bat
|
||||||
*.sis
|
*.sis
|
||||||
*.sisx
|
*.sisx
|
||||||
*.d
|
*.d
|
||||||
|
|
|
||||||
26
printHash.bat
Normal file
26
printHash.bat
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
REM creates version.h with HEAD commit hash
|
||||||
|
REM params: $1=full path to output file (usually points version.h)
|
||||||
|
|
||||||
|
setlocal enableextensions enabledelayedexpansion
|
||||||
|
|
||||||
|
cd /d "%~dp0"
|
||||||
|
|
||||||
|
break> %1
|
||||||
|
|
||||||
|
<nul set /p=^"#define GIT_SHA1 ^"^"> %1
|
||||||
|
|
||||||
|
where git
|
||||||
|
if "%errorlevel%" == "0" ( goto :havegit ) else ( goto :writeending )
|
||||||
|
|
||||||
|
:havegit
|
||||||
|
for /f %%v in ('git rev-parse --short HEAD') do set version=%%v
|
||||||
|
<nul set /p="%version%" >> %1
|
||||||
|
|
||||||
|
:writeending
|
||||||
|
|
||||||
|
echo ^" >> %1
|
||||||
|
echo const char* g_GIT_SHA1 = GIT_SHA1; >> %1
|
||||||
|
|
||||||
|
EXIT /B
|
||||||
14
printHash.sh
Normal file
14
printHash.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
if [ -z "${1}" ]
|
||||||
|
then
|
||||||
|
printf "%s\n" "Input the path to the file for writing the commit hash to."
|
||||||
|
else
|
||||||
|
printf "%s" "#define GIT_SHA1 \"" > $1
|
||||||
|
|
||||||
|
if (command -v "git" >/dev/null) then
|
||||||
|
git rev-parse --short HEAD | tr -d '\n' >> $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "%s\n" "\"" >> $1
|
||||||
|
printf "%s\n" "const char* g_GIT_SHA1 = GIT_SHA1;" >> $1
|
||||||
|
fi
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
* Arrays grouping together all the EAX presets in a scenario *
|
* Arrays grouping together all the EAX presets in a scenario *
|
||||||
* *
|
* *
|
||||||
************************************************************************************************/
|
************************************************************************************************/
|
||||||
|
#if 0
|
||||||
#include "eax-util.h"
|
#include "eax-util.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
@ -704,3 +704,4 @@ EAXLISTENERPROPERTIES EAX30_MISC_PRESETS[] =
|
||||||
EAX30_PRESET_SMALLWATERROOM
|
EAX30_PRESET_SMALLWATERROOM
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
* *
|
* *
|
||||||
\*******************************************************************/
|
\*******************************************************************/
|
||||||
|
|
||||||
#ifndef EAXUTIL_INCLUDED
|
#if !defined EAXUTIL_INCLUDED && 0
|
||||||
#define EAXUTIL_INCLUDED
|
#define EAXUTIL_INCLUDED
|
||||||
|
|
||||||
#include <eax.h>
|
#include <eax.h>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
* *
|
* *
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
#ifndef EAX_H_INCLUDED
|
#if !defined EAX_H_INCLUDED && 0
|
||||||
#define EAX_H_INCLUDED
|
#define EAX_H_INCLUDED
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
#undef AUDIO_OAL
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef AUDIO_OAL
|
#ifdef AUDIO_OAL
|
||||||
#include "eax.h"
|
#include "eax.h"
|
||||||
#include "AL/efx.h"
|
#include "AL/efx.h"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
//#define JUICY_OAL
|
//#define JUICY_OAL
|
||||||
|
|
||||||
#ifdef AUDIO_OAL
|
#if defined AUDIO_OAL && 0
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "eax.h"
|
#include "eax.h"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define LOGS
|
#define LOGS
|
||||||
|
#ifdef __SYMBIAN32__
|
||||||
#define LOGS_RDEBUG
|
#define LOGS_RDEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef AUDIO_OAL
|
||||||
|
#undef AUDIO_OAL
|
||||||
|
#endif
|
||||||
|
|
||||||
// disables (most) stuff that wasn't in original gta3.exe
|
// disables (most) stuff that wasn't in original gta3.exe
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
|
|
@ -438,8 +444,8 @@ enum Config {
|
||||||
//#define AUDIO_CACHE
|
//#define AUDIO_CACHE
|
||||||
#define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 44 (PC has 28 originally)
|
#define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 44 (PC has 28 originally)
|
||||||
#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds)
|
#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds)
|
||||||
#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder
|
//#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder
|
||||||
#define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files
|
//#define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files
|
||||||
#define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused
|
#define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused
|
||||||
#define ATTACH_RELEASING_SOUNDS_TO_ENTITIES // sounds would follow ped and vehicles coordinates if not being queued otherwise
|
#define ATTACH_RELEASING_SOUNDS_TO_ENTITIES // sounds would follow ped and vehicles coordinates if not being queued otherwise
|
||||||
#define USE_TIME_SCALE_FOR_AUDIO // slow down/speed up sounds according to the speed of the game
|
#define USE_TIME_SCALE_FOR_AUDIO // slow down/speed up sounds according to the speed of the game
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,9 @@ float Diag_GetFPS()
|
||||||
return 39000.0f / (msCollected[(curMS - 1) % MAX_MS_COLLECTED] - msCollected[curMS % MAX_MS_COLLECTED]);
|
return 39000.0f / (msCollected[(curMS - 1) % MAX_MS_COLLECTED] - msCollected[curMS % MAX_MS_COLLECTED]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LOGS_RDEBUG
|
||||||
extern "C" void RDebug_Printf(const char*, ...);
|
extern "C" void RDebug_Printf(const char*, ...);
|
||||||
|
#endif
|
||||||
|
|
||||||
void tbDisplay()
|
void tbDisplay()
|
||||||
{
|
{
|
||||||
|
|
@ -114,6 +116,7 @@ void tbDisplay()
|
||||||
CFont::SetFontStyle(FONT_BANK);
|
CFont::SetFontStyle(FONT_BANK);
|
||||||
sprintf(temp, "FPS: %.2f", Diag_GetFPS());
|
sprintf(temp, "FPS: %.2f", Diag_GetFPS());
|
||||||
if (frames >= 15) {
|
if (frames >= 15) {
|
||||||
|
//#ifdef LOGS_RDEBUG
|
||||||
// RDebug_Printf("FPS: %.2f", Diag_GetFPS());
|
// RDebug_Printf("FPS: %.2f", Diag_GetFPS());
|
||||||
// RDebug_Printf("vbo: %d, draw: %d, render: %d, matfx: %d, skin: %d, im2d: %d, im3d: %d", vboUploads, draw, render, matfx, skin, im2d, im3d);
|
// RDebug_Printf("vbo: %d, draw: %d, render: %d, matfx: %d, skin: %d, im2d: %d, im3d: %d", vboUploads, draw, render, matfx, skin, im2d, im3d);
|
||||||
// for (uint32 i = 0; i < TimerBar.count; i++) {
|
// for (uint32 i = 0; i < TimerBar.count; i++) {
|
||||||
|
|
@ -124,6 +127,7 @@ void tbDisplay()
|
||||||
// RDebug_Printf("EndOfFrame: %.2f", endOfFrameTime);
|
// RDebug_Printf("EndOfFrame: %.2f", endOfFrameTime);
|
||||||
// RDebug_Printf("Frame Time: %.2f", MaxFrameTime);
|
// RDebug_Printf("Frame Time: %.2f", MaxFrameTime);
|
||||||
// RDebug_Printf(" ");
|
// RDebug_Printf(" ");
|
||||||
|
//#endif
|
||||||
frames = 0;
|
frames = 0;
|
||||||
} else frames++;
|
} else frames++;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -207,12 +207,15 @@ RwTextureGtaStreamRead(RwStream *stream)
|
||||||
if (gGameState == GS_INIT_PLAYING_GAME) {
|
if (gGameState == GS_INIT_PLAYING_GAME) {
|
||||||
texLoadTime = (texNumLoaded * texLoadTime + (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond() - preloadTime) / (float)(texNumLoaded+1);
|
texLoadTime = (texNumLoaded * texLoadTime + (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond() - preloadTime) / (float)(texNumLoaded+1);
|
||||||
texNumLoaded++;
|
texNumLoaded++;
|
||||||
} else if (gGameState != GS_PLAYING_GAME || FrontEndMenuManager.m_bMenuActive) {
|
}
|
||||||
|
#ifdef __SYMBIAN32__
|
||||||
|
else if (gGameState != GS_PLAYING_GAME || FrontEndMenuManager.m_bMenuActive) {
|
||||||
if (tex != nil && tex->raster != nil && (RwRasterGetWidth(tex->raster) > 128 || RwRasterGetHeight(tex->raster) > 128)) {
|
if (tex != nil && tex->raster != nil && (RwRasterGetWidth(tex->raster) > 128 || RwRasterGetHeight(tex->raster) > 128)) {
|
||||||
// debug("downscaling %s", tex->name);
|
// debug("downscaling %s", tex->name);
|
||||||
halveTexture(tex);
|
halveTexture(tex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ANISOTROPIC_FILTERING
|
#ifdef ANISOTROPIC_FILTERING
|
||||||
if(tex && RpAnisotGetMaxSupportedMaxAnisotropy() > 1) // BUG? this was RpAnisotTextureGetMaxAnisotropy, but that doesn't make much sense
|
if(tex && RpAnisotGetMaxSupportedMaxAnisotropy() > 1) // BUG? this was RpAnisotTextureGetMaxAnisotropy, but that doesn't make much sense
|
||||||
|
|
|
||||||
4
vendor/librw/src/rwbase.h
vendored
4
vendor/librw/src/rwbase.h
vendored
|
|
@ -16,7 +16,11 @@
|
||||||
#ifdef OFFSET_OF
|
#ifdef OFFSET_OF
|
||||||
#undef OFFSET_OF
|
#undef OFFSET_OF
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __SYMBIAN32__
|
||||||
#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
|
||||||
|
|
||||||
// TODO: clean up the opengl defines
|
// TODO: clean up the opengl defines
|
||||||
// and figure out what we even want here...
|
// and figure out what we even want here...
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue