Minor code edits

This commit is contained in:
NovaRain
2022-01-19 09:43:05 +08:00
parent 39c5ab3674
commit f77cd85f95
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
;v3.8.33 ;v3.8.33
[Main] [Main]
;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 ;This option is always enabled in 4.3.3/3.8.33 or later. The information is left for reference only
UseCommandLine=0 UseCommandLine=0
+1
View File
@@ -454,6 +454,7 @@ typedef HRESULT (__stdcall *DInputCreateProc)(HINSTANCE a,DWORD b,IDirectInputA*
HRESULT __stdcall FakeDirectInputCreate(HINSTANCE a, DWORD b, IDirectInputA** c, IUnknown* d) { HRESULT __stdcall FakeDirectInputCreate(HINSTANCE a, DWORD b, IDirectInputA** c, IUnknown* d) {
HMODULE dinput = LoadLibraryA("dinput.dll"); HMODULE dinput = LoadLibraryA("dinput.dll");
if (!dinput || dinput == INVALID_HANDLE_VALUE) return -1; if (!dinput || dinput == INVALID_HANDLE_VALUE) return -1;
DInputCreateProc proc = (DInputCreateProc)GetProcAddress(dinput, "DirectInputCreateA"); DInputCreateProc proc = (DInputCreateProc)GetProcAddress(dinput, "DirectInputCreateA");
if (!proc) return -1; if (!proc) return -1;
+2 -3
View File
@@ -680,12 +680,11 @@ public:
int height = mveDesc.dwHeight; int height = mveDesc.dwHeight;
int pitch = dRect.Pitch / 4; int pitch = dRect.Pitch / 4;
DWORD* pBits = (DWORD*)dRect.pBits; DWORD* pBits = (DWORD*)dRect.pBits;
BYTE* target = mveSurface;
while (height--) { while (height--) {
int x = width; int x = width;
while (x--) pBits[x] = palette[target[x]].xRGB; while (x--) pBits[x] = palette[mveSurface[x]].xRGB;
target += width; mveSurface += width;
pBits += pitch; pBits += pitch;
} }
} }
+1 -1
View File
@@ -1106,7 +1106,7 @@ void Sound::init() {
MakeCall(0x4450C5, gdialogFreeSpeech_hack, 2); MakeCall(0x4450C5, gdialogFreeSpeech_hack, 2);
// Prepare // Prepare
LoadLibraryA("quartz.dll"); //LoadLibraryA("quartz.dll");
CreateSndWnd(); CreateSndWnd();
} }