Improved the avi playback function

This commit is contained in:
NovaRain
2020-01-17 21:48:54 +08:00
parent 21004e3e63
commit dccd735454
9 changed files with 478 additions and 258 deletions
+6
View File
@@ -399,6 +399,7 @@ const DWORD gsnd_build_weapon_sfx_name_ = 0x451760;
const DWORD gsound_background_pause_ = 0x450B50;
const DWORD gsound_background_stop_ = 0x450AB4;
const DWORD gsound_background_unpause_ = 0x450B64;
const DWORD gsound_background_volume_get_set_ = 0x450620;
const DWORD gsound_play_sfx_file_ = 0x4519A8;
const DWORD gsound_red_butt_press_ = 0x451970;
const DWORD gsound_red_butt_release_ = 0x451978;
@@ -518,6 +519,7 @@ const DWORD mouse_hide_ = 0x4CA534;
const DWORD mouse_in_ = 0x4CA8C8;
const DWORD mouse_show_ = 0x4CA34C;
const DWORD move_inventory_ = 0x474708;
const DWORD movieUpdate_ = 0x487BEC;
const DWORD new_obj_id_ = 0x4A386C;
const DWORD NixHotLines_ = 0x4999C0;
const DWORD nrealloc_ = 0x4F1669;
@@ -1137,6 +1139,10 @@ long __fastcall WordWrap(const char* text, int maxWidth, DWORD* buf, BYTE* count
WRAP_WATCOM_FCALL4(_word_wrap_, text, maxWidth, buf, count)
}
long __stdcall GSoundBackgroundVolumeGetSet(long setVolume) {
WRAP_WATCOM_CALL1(gsound_background_volume_get_set_, setVolume)
}
WINinfo* __stdcall GNWFind(long winRef) {
WRAP_WATCOM_CALL1(GNW_find_, winRef)
}
+5
View File
@@ -228,6 +228,7 @@
#define _stack_offset 0x59E844
#define _stat_data 0x51D53C
#define _stat_flag 0x66452A
#define _subtitles 0x663974
#define _sWindows 0x6727B0
#define _Tag_ 0x5708B0
#define _tag_skill 0x668070
@@ -638,6 +639,7 @@ extern const DWORD gsnd_build_weapon_sfx_name_;
extern const DWORD gsound_background_pause_;
extern const DWORD gsound_background_stop_;
extern const DWORD gsound_background_unpause_;
extern const DWORD gsound_background_volume_get_set_;
extern const DWORD gsound_play_sfx_file_;
extern const DWORD gsound_red_butt_press_;
extern const DWORD gsound_red_butt_release_;
@@ -763,6 +765,7 @@ extern const DWORD mouse_hide_;
extern const DWORD mouse_in_;
extern const DWORD mouse_show_;
extern const DWORD move_inventory_;
extern const DWORD movieUpdate_;
extern const DWORD new_obj_id_;
extern const DWORD NixHotLines_;
extern const DWORD nrealloc_;
@@ -1160,6 +1163,8 @@ long __fastcall GetGameConfigString(const char* outValue, const char* section, c
long __fastcall WordWrap(const char* text, int maxWidth, DWORD* buf, BYTE* count);
long __stdcall GSoundBackgroundVolumeGetSet(long setVolume);
WINinfo* __stdcall GNWFind(long winRef);
DWORD __stdcall WinAdd(long x, long y, long width, long height, long bgColorIndex, long flags);
+162 -73
View File
File diff suppressed because it is too large Load Diff
+5 -3
View File
@@ -27,6 +27,8 @@
extern DWORD GraphicsMode;
extern DWORD GPUBlt;
extern bool PlayAviMovie;
extern IDirect3D9* d3d9;
extern IDirect3DDevice9* d3d9Device;
@@ -55,7 +57,7 @@ int _stdcall GetShaderTexture(DWORD d, DWORD id);
void _stdcall SetShaderTexture(DWORD d, const char* param, DWORD value);
void RefreshGraphics();
void GetFalloutWindowInfo(DWORD* width, DWORD* height, HWND* window);
HWND GetFalloutWindowInfo(RECT* rect);
void SetMovieTexture(void* tex);
void _stdcall PlayMovieFrame();
void Gfx_SetMovieTexture(IDirect3DTexture9* tex);
void Gfx_ShowMovieFrame();
+278 -168
View File
File diff suppressed because it is too large Load Diff
+10 -6
View File
@@ -84,13 +84,13 @@ __declspec(naked) void FakeDirectDrawEnumerateW() {
_asm jmp [ddraw.DirectDrawEnumerateW];
}
//__declspec(naked) void FakeDllCanUnloadNow() {
// _asm jmp [ddraw.DllCanUnloadNow];
//}
__declspec(naked) void FakeDllCanUnloadNow() {
_asm jmp [ddraw.DllCanUnloadNow];
}
//__declspec(naked) void FakeDllGetClassObject() {
// _asm jmp [ddraw.DllGetClassObject];
//}
__declspec(naked) void FakeDllGetClassObject() {
_asm jmp [ddraw.DllGetClassObject];
}
__declspec(naked) void FakeGetDDSurfaceLocal() {
_asm jmp [ddraw.GetDDSurfaceLocal];
@@ -111,3 +111,7 @@ __declspec(naked) void FakeRegisterSpecialCase() {
__declspec(naked) void FakeReleaseDDThreadLock() {
_asm jmp [ddraw.ReleaseDDThreadLock];
}
__declspec(naked) void FakeSetAppCompatData() {
_asm jmp [ddraw.SetAppCompatData];
}
+6 -4
View File
@@ -16,13 +16,15 @@ DirectDrawEnumerateA = FakeDirectDrawEnumerateA @12
DirectDrawEnumerateExA = FakeDirectDrawEnumerateExA @13
DirectDrawEnumerateExW = FakeDirectDrawEnumerateExW @14
DirectDrawEnumerateW = FakeDirectDrawEnumerateW @15
;DllCanUnloadNow = FakeDllCanUnloadNow @16
;DllGetClassObject = FakeDllGetClassObject @17
DllCanUnloadNow = FakeDllCanUnloadNow PRIVATE
DllGetClassObject = FakeDllGetClassObject PRIVATE
GetDDSurfaceLocal = FakeGetDDSurfaceLocal @18
GetOLEThunkData = FakeGetOLEThunkData @19
GetSurfaceFromDC = FakeGetSurfaceFromDC @20
RegisterSpecialCase = FakeRegisterSpecialCase @21
ReleaseDDThreadLock = FakeReleaseDDThreadLock @22
SetAppCompatData = FakeSetAppCompatData @23
DirectDrawCreat2 = FakeDirectDrawCreate2
DirectInputCreateA = FakeDirectInputCreate
; sfall override
DirectDrawCreat2 = FakeDirectDrawCreate2 @24
DirectInputCreateA = FakeDirectInputCreate @25
+3 -2
View File
@@ -825,13 +825,14 @@ static bool LoadOriginalDll(DWORD dwReason) {
ddraw.DirectDrawEnumerateExA = GetProcAddress(ddraw.dll, "DirectDrawEnumerateExA");
ddraw.DirectDrawEnumerateExW = GetProcAddress(ddraw.dll, "DirectDrawEnumerateExW");
ddraw.DirectDrawEnumerateW = GetProcAddress(ddraw.dll, "DirectDrawEnumerateW");
//ddraw.DllCanUnloadNow = GetProcAddress(ddraw.dll, "DllCanUnloadNow");
//ddraw.DllGetClassObject = GetProcAddress(ddraw.dll, "DllGetClassObject");
ddraw.DllCanUnloadNow = GetProcAddress(ddraw.dll, "DllCanUnloadNow");
ddraw.DllGetClassObject = GetProcAddress(ddraw.dll, "DllGetClassObject");
ddraw.GetDDSurfaceLocal = GetProcAddress(ddraw.dll, "GetDDSurfaceLocal");
ddraw.GetOLEThunkData = GetProcAddress(ddraw.dll, "GetOLEThunkData");
ddraw.GetSurfaceFromDC = GetProcAddress(ddraw.dll, "GetSurfaceFromDC");
ddraw.RegisterSpecialCase = GetProcAddress(ddraw.dll, "RegisterSpecialCase");
ddraw.ReleaseDDThreadLock = GetProcAddress(ddraw.dll, "ReleaseDDThreadLock");
ddraw.SetAppCompatData = GetProcAddress(ddraw.dll, "SetAppCompatData");
}
return true;
case DLL_PROCESS_DETACH:
+3 -2
View File
@@ -51,12 +51,13 @@ struct ddrawDll {
FARPROC DirectDrawEnumerateA;
FARPROC DirectDrawEnumerateExW;
FARPROC DirectDrawEnumerateW;
//FARPROC DllCanUnloadNow;
//FARPROC DllGetClassObject;
FARPROC DllCanUnloadNow;
FARPROC DllGetClassObject;
FARPROC GetDDSurfaceLocal;
FARPROC GetOLEThunkData;
FARPROC GetSurfaceFromDC;
FARPROC RegisterSpecialCase;
FARPROC SetAppCompatData;
};
// global flag, indicating that debugging features of Sfall are enabled