mirror of
https://github.com/halpz/re3.git
synced 2025-07-26 08:32:43 +00:00
.ini for scaling, radar, sprites
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "Sprite2d.h"
|
||||
#include "Draw.h"
|
||||
|
||||
enum eBlipType
|
||||
{
|
||||
@ -95,9 +96,11 @@ VALIDATE_SIZE(sRadarTrace, 0x30);
|
||||
#ifdef FIX_RADAR
|
||||
/*
|
||||
The values are from an early screenshot taken before R* broke radar
|
||||
#define RADAR_WIDTH (82.0f)
|
||||
#define RADAR_HEIGHT (82.0f)
|
||||
*/
|
||||
#define RADAR_WIDTH (82.0f)
|
||||
#define RADAR_HEIGHT (82.0f)
|
||||
#define RADAR_WIDTH ((CDraw::ms_bFixRadar) ? (82.0f) : (94.0f))
|
||||
#define RADAR_HEIGHT ((CDraw::ms_bFixRadar) ? (82.0f) : (76.0f))
|
||||
#else
|
||||
/*
|
||||
broken since forever, someone tried to fix size for 640x512(PAL)
|
||||
|
@ -176,6 +176,12 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w)
|
||||
#ifdef ASPECT_RATIO_SCALE
|
||||
#define SCREEN_SCALE_AR(a) ((a) * DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO)
|
||||
#define SCALE_AND_CENTER_X(x) ((SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH) ? (x) : (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X((x)))
|
||||
#ifdef PROPER_SCALING
|
||||
#ifndef FORCE_PC_SCALING
|
||||
#undef SCREEN_SCALE_Y
|
||||
#define SCREEN_SCALE_Y(a) CDraw::ScaleY(SCREEN_STRETCH_Y(a))
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#define SCREEN_SCALE_AR(a) (a)
|
||||
#define SCALE_AND_CENTER_X(x) SCREEN_STRETCH_X(x)
|
||||
|
@ -214,6 +214,16 @@ void LoadINISettings()
|
||||
CustomPipes::LightmapMult = CheckAndReadIniFloat("CustomPipesValues", "LightmapMult", CustomPipes::LightmapMult);
|
||||
CustomPipes::GlossMult = CheckAndReadIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult);
|
||||
#endif
|
||||
|
||||
#ifdef PROPER_SCALING
|
||||
CDraw::ms_bProperScaling = CheckAndReadIniInt("Draw", "ProperScaling", CDraw::ms_bProperScaling);
|
||||
#endif
|
||||
#ifdef FIX_SPRITES
|
||||
CDraw::ms_bFixRadar = CheckAndReadIniInt("Draw", "FixRadar", CDraw::ms_bFixRadar);
|
||||
#endif
|
||||
#ifdef FIX_RADAR
|
||||
CDraw::ms_bFixSprites = CheckAndReadIniInt("Draw", "FixSprites", CDraw::ms_bFixSprites);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SaveINISettings()
|
||||
@ -252,6 +262,16 @@ void SaveINISettings()
|
||||
CheckAndSaveIniFloat("CustomPipesValues", "GlossMult", CustomPipes::GlossMult, changed);
|
||||
#endif
|
||||
|
||||
#ifdef PROPER_SCALING
|
||||
CheckAndSaveIniInt("Draw", "ProperScaling", CDraw::ms_bProperScaling, changed);
|
||||
#endif
|
||||
#ifdef FIX_SPRITES
|
||||
CheckAndSaveIniInt("Draw", "FixRadar", CDraw::ms_bFixRadar, changed);
|
||||
#endif
|
||||
#ifdef FIX_RADAR
|
||||
CheckAndSaveIniInt("Draw", "FixSprites", CDraw::ms_bFixSprites, changed);
|
||||
#endif
|
||||
|
||||
if (changed)
|
||||
cfg.write_file("re3.ini");
|
||||
}
|
||||
|
Reference in New Issue
Block a user