diff --git a/src/editors/xrEditor/entry_point.cpp b/src/editors/xrEditor/entry_point.cpp index 0fc8ddc8fca..18fc39dc853 100644 --- a/src/editors/xrEditor/entry_point.cpp +++ b/src/editors/xrEditor/entry_point.cpp @@ -28,7 +28,7 @@ void UIThreadProc(void*) #ifdef XR_X64 Device.m_sdlWnd = (SDL_Window *)windowIDE->View().GetViewHandle().ToInt64(); #else - Device.m_hWnd = (HWND)windowIDE->View().GetViewHandle().ToInt32(); + Device.m_sdlWnd = (SDL_Window*)windowIDE->View().GetViewHandle().ToInt32(); #endif VERIFY(Device.m_sdlWnd != nullptr); diff --git a/src/xrCore/Debug/DXGetErrorDescription.inl b/src/xrCore/Debug/DXGetErrorDescription.inl index 3b5bb9df6e1..89e20f1e4f6 100644 --- a/src/xrCore/Debug/DXGetErrorDescription.inl +++ b/src/xrCore/Debug/DXGetErrorDescription.inl @@ -143,73 +143,6 @@ switch (hr) CHK_ERR(DDERR_NODRIVERSUPPORT, "The driver does not enumerate display mode refresh rates.") CHK_ERR(DDERR_DEVICEDOESNTOWNSURFACE, "Surfaces created by one direct draw device cannot be used directly by another direct draw device.") - - // ------------------------------------------------------------- - // dinput.h error codes - // ------------------------------------------------------------- - //CHK_ERR(DI_OK, "DI_OK") - //CHK_ERR(DI_NOTATTACHED, "DI_NOTATTACHED") - //CHK_ERR(DI_BUFFEROVERFLOW, "DI_BUFFEROVERFLOW") - //CHK_ERR(DI_PROPNOEFFECT, "DI_PROPNOEFFECT") - //CHK_ERR(DI_NOEFFECT, "DI_NOEFFECT") - //CHK_ERR(DI_POLLEDDEVICE, "DI_POLLEDDEVICE") - //CHK_ERR(DI_DOWNLOADSKIPPED, "DI_DOWNLOADSKIPPED") - //CHK_ERR(DI_EFFECTRESTARTED, "DI_EFFECTRESTARTED") - //CHK_ERR(DI_SETTINGSNOTSAVED_ACCESSDENIED, "DI_SETTINGSNOTSAVED_ACCESSDENIED") - //CHK_ERR(DI_SETTINGSNOTSAVED_DISKFULL, "DI_SETTINGSNOTSAVED_DISKFULL") - //CHK_ERR(DI_TRUNCATED, "DI_TRUNCATED") - //CHK_ERR(DI_TRUNCATEDANDRESTARTED, "DI_TRUNCATEDANDRESTARTED") - //CHK_ERR(DI_WRITEPROTECT, "DI_WRITEPROTECT") - CHK_ERR(DIERR_OLDDIRECTINPUTVERSION, "The application requires a newer version of DirectInput.") - //CHK_ERR(DIERR_GENERIC, "DIERR_GENERIC") - //CHK_ERR(DIERR_OLDDIRECTINPUTVERSION, "DIERR_OLDDIRECTINPUTVERSION") - CHK_ERR(DIERR_BETADIRECTINPUTVERSION, "The application was written for an unsupported prerelease version of DirectInput.") - CHK_ERR(DIERR_BADDRIVERVER, "The object could not be created due to an incompatible driver version or mismatched or incomplete driver components.") - //CHK_ERR(DIERR_DEVICENOTREG, "DIERR_DEVICENOTREG") - //CHK_ERR(DIERR_NOTFOUND, "The requested object does not exist.") - //CHK_ERR(DIERR_OBJECTNOTFOUND, "DIERR_OBJECTNOTFOUND") - //CHK_ERR(DIERR_INVALIDPARAM, "DIERR_INVALIDPARAM") - //CHK_ERR(DIERR_NOINTERFACE, "DIERR_NOINTERFACE") - //CHK_ERR(DIERR_GENERIC, "DIERR_GENERIC") - //CHK_ERR(DIERR_OUTOFMEMORY, "DIERR_OUTOFMEMORY") - //CHK_ERR(DIERR_UNSUPPORTED, "DIERR_UNSUPPORTED") - CHK_ERR(DIERR_NOTINITIALIZED, "This object has not been initialized") - CHK_ERR(DIERR_ALREADYINITIALIZED, "This object is already initialized") - //CHK_ERR(DIERR_NOAGGREGATION, "DIERR_NOAGGREGATION") - //CHK_ERR(DIERR_OTHERAPPHASPRIO, "DIERR_OTHERAPPHASPRIO") - CHK_ERR(DIERR_INPUTLOST, "Access to the device has been lost. It must be re-acquired.") - CHK_ERR(DIERR_ACQUIRED, "The operation cannot be performed while the device is acquired.") - CHK_ERR(DIERR_NOTACQUIRED, "The operation cannot be performed unless the device is acquired.") - //CHK_ERR(DIERR_READONLY, "DIERR_READONLY") - //CHK_ERR(DIERR_HANDLEEXISTS, "DIERR_HANDLEEXISTS") - CHK_ERR(DIERR_INSUFFICIENTPRIVS, "Unable to IDirectInputJoyConfig_Acquire because the user does not have sufficient privileges to change the joystick configuration. & An invalid media type was specified") - CHK_ERR(DIERR_DEVICEFULL, "The device is full. & An invalid media subtype was specified.") - CHK_ERR(DIERR_MOREDATA, "Not all the requested information fit into the buffer. & This object can only be created as an aggregated object.") - CHK_ERR(DIERR_NOTDOWNLOADED, "The effect is not downloaded. & The enumerator has become invalid.") - CHK_ERR(DIERR_HASEFFECTS, "The device cannot be reinitialized because there are still effects attached to it. & At least one of the pins involved in the operation is already connected.") - CHK_ERR(DIERR_NOTEXCLUSIVEACQUIRED, "The operation cannot be performed unless the device is acquired in DISCL_EXCLUSIVE mode. & This operation cannot be performed because the filter is active.") - CHK_ERR(DIERR_INCOMPLETEEFFECT, "The effect could not be downloaded because essential information is missing. For example, no axes have been associated with the effect, or no type-specific information has been created. & One of the specified pins supports no media types.") - CHK_ERR(DIERR_NOTBUFFERED, "Attempted to read buffered device data from a device that is not buffered. & There is no common media type between these pins.") - CHK_ERR(DIERR_EFFECTPLAYING, "An attempt was made to modify parameters of an effect while it is playing. Not all hardware devices support altering the parameters of an effect while it is playing. & Two pins of the same direction cannot be connected together.") - CHK_ERR(DIERR_UNPLUGGED, "The operation could not be completed because the device is not plugged in. & The operation cannot be performed because the pins are not connected.") - CHK_ERR(DIERR_REPORTFULL, "SendDeviceData failed because more information was requested to be sent than can be sent to the device. Some devices have restrictions on how much data can be sent to them. (For example, there might be a limit on the number of buttons that can be pressed at once.) & No sample buffer allocator is available.") - CHK_ERR(DIERR_MAPFILEFAIL, "A mapper file function failed because reading or writing the user or IHV settings file failed. & A run-time error occurred.") - - // ------------------------------------------------------------- - // dinputd.h error codes - // ------------------------------------------------------------- - CHK_ERR(DIERR_NOMOREITEMS, "No more items.") - CHK_ERR(DIERR_DRIVERFIRST, "Device driver-specific codes. Unless the specific driver has been precisely identified, no meaning should be attributed to these values other than that the driver originated the error.") - CHK_ERR(DIERR_DRIVERFIRST+1, "DIERR_DRIVERFIRST+1") - CHK_ERR(DIERR_DRIVERFIRST+2, "DIERR_DRIVERFIRST+2") - CHK_ERR(DIERR_DRIVERFIRST+3, "DIERR_DRIVERFIRST+3") - CHK_ERR(DIERR_DRIVERFIRST+4, "DIERR_DRIVERFIRST+4") - CHK_ERR(DIERR_DRIVERFIRST+5, "DIERR_DRIVERFIRST+5") - CHK_ERR(DIERR_DRIVERLAST, "Device installer errors.") - CHK_ERR(DIERR_INVALIDCLASSINSTALLER, "Registry entry or DLL for class installer invalid or class installer not found.") - CHK_ERR(DIERR_CANCELLED, "The user cancelled the install operation. & The stream already has allocated samples and the surface doesn't match the sample format.") - CHK_ERR(DIERR_BADINF, "The INF file for the selected device could not be found or is invalid or is damaged. & The specified purpose ID can't be used for the call.") - // ------------------------------------------------------------- // d3d9.h error codes // ------------------------------------------------------------- diff --git a/src/xrCore/Debug/DXGetErrorString.inl b/src/xrCore/Debug/DXGetErrorString.inl index 73e3b33d138..e1bb9241015 100644 --- a/src/xrCore/Debug/DXGetErrorString.inl +++ b/src/xrCore/Debug/DXGetErrorString.inl @@ -3048,73 +3048,6 @@ switch (hr) CHK_ERRA(DDERR_NODRIVERSUPPORT) CHK_ERRA(DDERR_DEVICEDOESNTOWNSURFACE) - // ------------------------------------------------------------- - // dinput.h error codes - // ------------------------------------------------------------- - //CHK_ERRA(DI_OK) - //CHK_ERRA(DI_NOTATTACHED) - //CHK_ERRA(DI_BUFFEROVERFLOW) - //CHK_ERRA(DI_PROPNOEFFECT) - //CHK_ERRA(DI_NOEFFECT) - //CHK_ERRA(DI_POLLEDDEVICE) - //CHK_ERRA(DI_DOWNLOADSKIPPED) - //CHK_ERRA(DI_EFFECTRESTARTED) - //CHK_ERRA(DI_SETTINGSNOTSAVED_ACCESSDENIED) - //CHK_ERRA(DI_SETTINGSNOTSAVED_DISKFULL) - //CHK_ERRA(DI_TRUNCATED) - //CHK_ERRA(DI_TRUNCATEDANDRESTARTED) - //CHK_ERRA(DI_WRITEPROTECT) - CHK_ERR(DIERR_INSUFFICIENTPRIVS, "DIERR_INSUFFICIENTPRIVS & VFW_E_INVALIDMEDIATYPE") - CHK_ERR(DIERR_DEVICEFULL, "DIERR_DEVICEFULL & VFW_E_INVALIDSUBTYPE & DMO_E_INVALIDSTREAMINDEX") - CHK_ERR(DIERR_MOREDATA, "DIERR_MOREDATA & VFW_E_NEED_OWNER & DMO_E_INVALIDTYPE") - CHK_ERR(DIERR_NOTDOWNLOADED, "DIERR_NOTDOWNLOADED & VFW_E_ENUM_OUT_OF_SYNC & DMO_E_TYPE_NOT_SET") - CHK_ERR(DIERR_HASEFFECTS, "DIERR_HASEFFECTS & VFW_E_ALREADY_CONNECTED & DMO_E_NOTACCEPTING") - CHK_ERR(DIERR_NOTEXCLUSIVEACQUIRED, "DIERR_NOTEXCLUSIVEACQUIRED & VFW_E_FILTER_ACTIVE & DMO_E_TYPE_NOT_ACCEPTED") - CHK_ERR(DIERR_INCOMPLETEEFFECT, "DIERR_INCOMPLETEEFFECT & VFW_E_NO_TYPES & DMO_E_NO_MORE_ITEMS") - CHK_ERR(DIERR_NOTBUFFERED, "DIERR_NOTBUFFERED & VFW_E_NO_ACCEPTABLE_TYPES") - CHK_ERR(DIERR_EFFECTPLAYING, "DIERR_EFFECTPLAYING & VFW_E_INVALID_DIRECTION") - CHK_ERR(DIERR_UNPLUGGED, "DIERR_UNPLUGGED & VFW_E_NOT_CONNECTED") - CHK_ERR(DIERR_REPORTFULL, "DIERR_REPORTFULL & VFW_E_NO_ALLOCATOR") - CHK_ERR(DIERR_MAPFILEFAIL, "DIERR_MAPFILEFAIL & VFW_E_RUNTIME_ERROR") - //CHK_ERRA(DIERR_OLDDIRECTINPUTVERSION) - //CHK_ERRA(DIERR_GENERIC) - //CHK_ERRA(DIERR_OLDDIRECTINPUTVERSION) - //CHK_ERRA(DIERR_BETADIRECTINPUTVERSION) - //CHK_ERRA(DIERR_BADDRIVERVER) - //CHK_ERRA(DIERR_DEVICENOTREG) - //CHK_ERRA(DIERR_NOTFOUND) - //CHK_ERRA(DIERR_OBJECTNOTFOUND) - //CHK_ERRA(DIERR_INVALIDPARAM) - //CHK_ERRA(DIERR_NOINTERFACE) - //CHK_ERRA(DIERR_GENERIC) - //CHK_ERRA(DIERR_OUTOFMEMORY) - //CHK_ERRA(DIERR_UNSUPPORTED) - //CHK_ERRA(DIERR_NOTINITIALIZED) - //CHK_ERRA(DIERR_ALREADYINITIALIZED) - //CHK_ERRA(DIERR_NOAGGREGATION) - //CHK_ERRA(DIERR_OTHERAPPHASPRIO) - //CHK_ERRA(DIERR_INPUTLOST) - //CHK_ERRA(DIERR_ACQUIRED) - //CHK_ERRA(DIERR_NOTACQUIRED) - //CHK_ERRA(DIERR_READONLY) - //CHK_ERRA(DIERR_HANDLEEXISTS) - - - // ------------------------------------------------------------- - // dinputd.h error - // ------------------------------------------------------------- - //CHK_ERRA(DIERR_NOMOREITEMS) - CHK_ERRA(DIERR_DRIVERFIRST) - CHK_ERR(DIERR_DRIVERFIRST+1, "DIERR_DRIVERFIRST+1") - CHK_ERR(DIERR_DRIVERFIRST+2, "DIERR_DRIVERFIRST+2") - CHK_ERR(DIERR_DRIVERFIRST+3, "DIERR_DRIVERFIRST+3") - CHK_ERR(DIERR_DRIVERFIRST+4, "DIERR_DRIVERFIRST+4") - CHK_ERR(DIERR_DRIVERFIRST+5, "DIERR_DRIVERFIRST+5") - CHK_ERRA(DIERR_DRIVERLAST) - CHK_ERR(DIERR_INVALIDCLASSINSTALLER, "DIERR_INVALIDCLASSINSTALLER") - CHK_ERR(DIERR_CANCELLED, "DIERR_CANCELLED & MS_E_SAMPLEALLOC") - CHK_ERRA(DIERR_BADINF) - // ------------------------------------------------------------- // d3d9.h error codes // ------------------------------------------------------------- diff --git a/src/xrCore/Debug/dxerr.cpp b/src/xrCore/Debug/dxerr.cpp index 8bb164d6436..16c631327e0 100644 --- a/src/xrCore/Debug/dxerr.cpp +++ b/src/xrCore/Debug/dxerr.cpp @@ -21,11 +21,6 @@ #include #include #include -#ifndef DIRECTINPUT_VERSION -#define DIRECTINPUT_VERSION 0x800 -#endif -#include -#include #endif #define XAUDIO2_E_INVALID_CALL 0x88960001 diff --git a/src/xrEngine/stdafx.h b/src/xrEngine/stdafx.h index b5194c3d3ea..9918412ecca 100644 --- a/src/xrEngine/stdafx.h +++ b/src/xrEngine/stdafx.h @@ -33,7 +33,6 @@ extern ENGINE_API CInifile* pGameIni; #pragma comment(lib, "winmm.lib") -#pragma comment(lib, "dinput8.lib") #pragma comment(lib, "dxguid.lib") // XXX: move to script engine headers #ifndef DEBUG diff --git a/src/xrGame/ai/monsters/bloodsucker/bloodsucker.cpp b/src/xrGame/ai/monsters/bloodsucker/bloodsucker.cpp index c9b659f1bfc..72185e99842 100644 --- a/src/xrGame/ai/monsters/bloodsucker/bloodsucker.cpp +++ b/src/xrGame/ai/monsters/bloodsucker/bloodsucker.cpp @@ -856,11 +856,11 @@ void CAI_Bloodsucker::debug_on_key(int key) { switch (key) { - case DIK_MINUS: + case SDL_SCANCODE_MINUS: Actor()->cam_Active()->Move(Random.randI(2) ? kRIGHT : kLEFT, PI_DIV_2); // set_alien_control(true); break; - case DIK_EQUALS: + case SDL_SCANCODE_EQUALS: Actor()->cam_Active()->Move(Random.randI(2) ? kUP : kDOWN, PI_DIV_2); // set_alien_control(false); break; diff --git a/src/xrGame/ai/monsters/controller/controller.cpp b/src/xrGame/ai/monsters/controller/controller.cpp index b6301b2c32b..ed06f04f4fd 100644 --- a/src/xrGame/ai/monsters/controller/controller.cpp +++ b/src/xrGame/ai/monsters/controller/controller.cpp @@ -763,7 +763,7 @@ void CController::debug_on_key(int key) { switch (key) { - case DIK_MINUS: + case SDL_SCANCODE_MINUS: // m_sound_aura_left_channel.play_at_pos(Level().CurrentEntity(), Fvector().set(-1.f, 0.f, 1.f), sm_2D); // m_sound_aura_right_channel.play_at_pos(Level().CurrentEntity(), Fvector().set(1.f, 0.f, 1.f), sm_2D); @@ -786,7 +786,7 @@ void CController::debug_on_key(int key) //} break; - case DIK_EQUALS: + case SDL_SCANCODE_EQUALS: P2.set(Actor()->Position()); DBG().level_info(this).remove_item(1); DBG().level_info(this).add_item(P2, 0.5f, COLOR_GREEN, 1); diff --git a/src/xrGame/ai/monsters/dog/dog.cpp b/src/xrGame/ai/monsters/dog/dog.cpp index a4aed68a85e..8c87702dd4b 100644 --- a/src/xrGame/ai/monsters/dog/dog.cpp +++ b/src/xrGame/ai/monsters/dog/dog.cpp @@ -426,20 +426,20 @@ void CAI_Dog::debug_on_key(int key) switch (key) { - case DIK_1: + case SDL_SCANCODE_1: Msg("Ohhhhhhhhhhhhhhh! Here it is!"); // strafe left // com_man().seq_run(skel->ID_Cycle_Safe("stand_turn_ls_0")); break; - case DIK_2: + case SDL_SCANCODE_2: // strafe right com_man().seq_run(skel->ID_Cycle_Safe("stand_turn_ls_0")); break; - case DIK_3: + case SDL_SCANCODE_3: // threaten com_man().seq_run(skel->ID_Cycle_Safe("stand_threaten_0")); break; - case DIK_0: Msg("Ohhhhhhhhhhhhhhh! Here it is!"); break; + case SDL_SCANCODE_0: Msg("Ohhhhhhhhhhhhhhh! Here it is!"); break; } } #endif diff --git a/src/xrGame/ai/monsters/zombie/zombie.cpp b/src/xrGame/ai/monsters/zombie/zombie.cpp index 65805b3ec8d..7e263f2a49d 100644 --- a/src/xrGame/ai/monsters/zombie/zombie.cpp +++ b/src/xrGame/ai/monsters/zombie/zombie.cpp @@ -225,10 +225,10 @@ void CZombie::debug_on_key(int key) { switch (key) { - case DIK_MINUS: { fake_death_fall_down(); + case SDL_SCANCODE_MINUS: { fake_death_fall_down(); } break; - case DIK_EQUALS: { fake_death_stand_up(); + case SDL_SCANCODE_EQUALS: { fake_death_stand_up(); } break; }