Day 31 complete

This commit is contained in:
2023-10-07 02:33:39 -04:00
parent cb3c71705f
commit dd00713c9e
29 changed files with 340 additions and 159 deletions

View File

@ -35,11 +35,6 @@
// # define CONST const
// #endif
// SAL BS
#ifndef _In_
# define _In_
#endif
#define NS_WIN32_BEGIN namespace win32 {
#define NS_WIN32_END }
@ -130,18 +125,6 @@ ProcSignature* get_procedure_from_library( HMODULE library_module, char const* s
}
#pragma region XInput
WIN_LIB_API DWORD WINAPI XInputGetState
(
DWORD dwUserIndex, // Index of the gamer associated with the device
XINPUT_STATE* pState // Receives the current state
);
WIN_LIB_API DWORD WINAPI XInputSetState
(
DWORD dwUserIndex, // Index of the gamer associated with the device
XINPUT_VIBRATION* pVibration // The vibration information to send to the controller
);
DWORD WINAPI xinput_get_state_stub( DWORD dwUserIndex, XINPUT_STATE* pVibration ) {
do_once_start
OutputDebugStringA( "xinput_get_state stubbed!\n");

View File

@ -1,7 +1,11 @@
#include "platform/platform.hpp"
#if INTELLISENSE_DIRECTIVES
#include "platform.hpp"
#include "engine/engine.hpp"
#include "win32.hpp"
#endif
NS_PLATFORM_BEGIN
using namespace win32;
// TODO : This will def need to be looked over.
struct DirectSoundBuffer

View File

@ -1,15 +1,19 @@
#include "platform/platform.hpp"
#include "platform/jsl.hpp"
#if INTELLISENSE_DIRECTIVES
#include "platform.hpp"
#include "engine/engine.hpp"
#include "jsl.hpp"
#include "win32.hpp"
#endif
NS_PLATFORM_BEGIN
using namespace win32;
// Max controllers for the platform layer and thus for all other layers is 4. (Sanity and xinput limit)
constexpr u32 Max_Controllers = 4;
using JSL_DeviceHandle = int;
using JSL_DeviceHandle = int;
using EngineXInputPadStates = engine::XInputPadState[ Max_Controllers ];
using EngineDSPadStates = engine::DualsensePadState[Max_Controllers];
using EngineDSPadStates = engine::DualsensePadState[Max_Controllers];
internal void
input_process_digital_btn( engine::DigitalBtn* old_state, engine::DigitalBtn* new_state, u32 raw_btns, u32 btn_flag )

View File

@ -1,3 +1,11 @@
#if INTELLISENSE_DIRECTIVES
#include "platform/platform.hpp"
#include "engine/engine.hpp"
#include "engine/engine_to_platform_api.hpp"
#include "gen/engine_symbol_table.hpp"
#include "win32.hpp"
#include "jsl.hpp"
#endif
/*
TODO : This is not a final platform layer
@ -17,17 +25,6 @@
- GetKeyboardLayout (for French keyboards, international WASD support)
*/
// Platform Layer headers
#include "platform/platform.hpp"
#include "platform/jsl.hpp" // Using this to get dualsense controllers
#include "win32.hpp"
// Engine layer headers
#include "engine/engine.hpp"
#include "engine/engine_to_platform_api.hpp"
#include "gen/engine_symbol_table.hpp"
NS_PLATFORM_BEGIN
using namespace win32;

View File

@ -1,6 +1,8 @@
#include "platform/platform.hpp"
#include "platform/jsl.hpp"
#if INTELLISENSE_DIRECTIVES
#include "platform.hpp"
#include "jsl.hpp"
#include "win32.hpp"
#endif
NS_PLATFORM_BEGIN