Minor code edits

This commit is contained in:
NovaRain
2022-01-19 09:41:37 +08:00
parent b66cc42fbc
commit e17ad5d11b
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
;The required settings will be read from f2_res.ini configuration file from the original hi-res patch
HiResMode=1
;Set to 1 if you want to use command line args to tell sfall to use another ini file
;Set to 1 if you want to use command line arguments to tell sfall to use another ini file
;This option is always enabled in 4.3.3/3.8.33 or later. The information is left for reference only
UseCommandLine=0
+1 -1
View File
@@ -188,7 +188,7 @@ void Setting::init(const char* exeFileName, std::string &cmdline) {
sf::Translate::Get("sfall", "HiResInfo",
"This version of sfall has its own integrated High Resolution Patch mode, which is compatible with the settings of the High Resolution Patch by Mash.\n\n"
"If you want to continue using the Hi-Res Patch by Mash without seeing this message, disable the 'HiResMode' option in ddraw.ini.\n"
"Or you can disable the external Hi-Res Patch to get new graphic improvements from sfall.\n\n"
"Or you can disable the external Hi-Res Patch to get new graphics improvements from sfall.\n\n"
"Do you want to disable the High Resolution Patch by Mash?", infoMsg, 512);
// replace \n for translated message
+1
View File
@@ -465,6 +465,7 @@ typedef HRESULT (__stdcall *DInputCreateProc)(HINSTANCE a,DWORD b,IDirectInputA*
HRESULT __stdcall FakeDirectInputCreate(HINSTANCE a, DWORD b, IDirectInputA** c, IUnknown* d) {
HMODULE dinput = LoadLibraryA("dinput.dll");
if (!dinput || dinput == INVALID_HANDLE_VALUE) return -1;
DInputCreateProc proc = (DInputCreateProc)GetProcAddress(dinput, "DirectInputCreateA");
if (!proc) return -1;
+2 -3
View File
@@ -658,12 +658,11 @@ public:
int pitch = dRect.Pitch / 4;
DWORD* pBits = (DWORD*)dRect.pBits;
BYTE* target = mveSurface;
while (height--) {
int x = width;
while (x--) pBits[x] = palette[target[x]].xRGB;
target += width;
while (x--) pBits[x] = palette[mveSurface[x]].xRGB;
mveSurface += width;
pBits += pitch;
}
}
+1 -1
View File
@@ -1094,7 +1094,7 @@ void Sound::init() {
MakeCall(0x4450C5, gdialogFreeSpeech_hack, 2);
// Prepare
LoadLibraryA("quartz.dll");
//LoadLibraryA("quartz.dll");
CreateSndWnd();
}