dsda: fix build, spacing
This commit is contained in:
parent
6665e0e35e
commit
4a3ad3a1d1
Binary file not shown.
|
@ -1,148 +1,148 @@
|
|||
#include "BizhawkInterface.h"
|
||||
|
||||
bool foundIWAD = false;
|
||||
|
||||
ECL_EXPORT void dsda_get_audio(int *n, void **buffer)
|
||||
{
|
||||
int nSamples = 0;
|
||||
void* audioBuffer = NULL;
|
||||
audioBuffer = I_CaptureAudio(&nSamples);
|
||||
// printf("audioBuffer: %p - nSamples: %d\n", audioBuffer, nSamples);
|
||||
int nSamples = 0;
|
||||
void* audioBuffer = NULL;
|
||||
audioBuffer = I_CaptureAudio(&nSamples);
|
||||
// printf("audioBuffer: %p - nSamples: %d\n", audioBuffer, nSamples);
|
||||
|
||||
if (n)
|
||||
*n = nSamples;
|
||||
if (buffer)
|
||||
*buffer = audioBuffer;
|
||||
if (n)
|
||||
*n = nSamples;
|
||||
if (buffer)
|
||||
*buffer = audioBuffer;
|
||||
}
|
||||
|
||||
ECL_EXPORT void dsda_get_video(int* w, int* h, int* pitch, uint8_t** buffer, int* paletteSize, uint32_t** paletteBuffer)
|
||||
ECL_EXPORT void dsda_get_video(int *w, int *h, int *pitch, uint8_t **buffer, int *paletteSize, uint32_t **paletteBuffer)
|
||||
{
|
||||
*buffer = (uint8_t*)headlessGetVideoBuffer();
|
||||
*w = headlessGetVideoWidth();
|
||||
*h = headlessGetVideoHeight();
|
||||
*pitch = headlessGetVideoPitch();
|
||||
*paletteSize = PALETTE_SIZE;
|
||||
*buffer = (uint8_t *)headlessGetVideoBuffer();
|
||||
*w = headlessGetVideoWidth();
|
||||
*h = headlessGetVideoHeight();
|
||||
*pitch = headlessGetVideoPitch();
|
||||
*paletteSize = PALETTE_SIZE;
|
||||
|
||||
uint32_t* palette = headlessGetPallette();
|
||||
for (size_t i = 0; i < PALETTE_SIZE; i++)
|
||||
{
|
||||
uint8_t* srcColor = (uint8_t*)&palette[i];
|
||||
uint8_t* dstColor = (uint8_t*)&_convertedPaletteBuffer[i];
|
||||
dstColor[0] = srcColor[2];
|
||||
dstColor[1] = srcColor[1];
|
||||
dstColor[2] = srcColor[0];
|
||||
dstColor[3] = srcColor[3];
|
||||
}
|
||||
uint32_t *palette = headlessGetPallette();
|
||||
for (size_t i = 0; i < PALETTE_SIZE; i++)
|
||||
{
|
||||
uint8_t *srcColor = (uint8_t *)&palette[i];
|
||||
uint8_t *dstColor = (uint8_t *)&_convertedPaletteBuffer[i];
|
||||
dstColor[0] = srcColor[2];
|
||||
dstColor[1] = srcColor[1];
|
||||
dstColor[2] = srcColor[0];
|
||||
dstColor[3] = srcColor[3];
|
||||
}
|
||||
|
||||
*paletteBuffer = _convertedPaletteBuffer;
|
||||
*paletteBuffer = _convertedPaletteBuffer;
|
||||
}
|
||||
|
||||
ECL_EXPORT void dsda_frame_advance(struct PackedPlayerInput *player1Inputs, struct PackedPlayerInput *player2Inputs, struct PackedPlayerInput *player3Inputs, struct PackedPlayerInput *player4Inputs, struct PackedRenderInfo *renderInfo)
|
||||
{
|
||||
// Setting inputs
|
||||
headlessClearTickCommand();
|
||||
// Setting inputs
|
||||
headlessClearTickCommand();
|
||||
|
||||
// Setting Player 1 inputs
|
||||
headlessSetTickCommand
|
||||
(
|
||||
0,
|
||||
player1Inputs->_RunSpeed,
|
||||
player1Inputs->_StrafingSpeed,
|
||||
player1Inputs->_TurningSpeed,
|
||||
player1Inputs->_Fire,
|
||||
player1Inputs->_Action,
|
||||
player1Inputs->_WeaponSelect,
|
||||
player1Inputs->_Automap,
|
||||
player1Inputs->_FlyLook,
|
||||
player1Inputs->_ArtifactUse,
|
||||
player1Inputs->_Jump,
|
||||
player1Inputs->_EndPlayer
|
||||
);
|
||||
// Setting Player 1 inputs
|
||||
headlessSetTickCommand
|
||||
(
|
||||
0,
|
||||
player1Inputs->RunSpeed,
|
||||
player1Inputs->StrafingSpeed,
|
||||
player1Inputs->TurningSpeed,
|
||||
player1Inputs->Fire,
|
||||
player1Inputs->Action,
|
||||
player1Inputs->WeaponSelect,
|
||||
player1Inputs->Automap,
|
||||
player1Inputs->FlyLook,
|
||||
player1Inputs->ArtifactUse,
|
||||
player1Inputs->Jump,
|
||||
player1Inputs->EndPlayer
|
||||
);
|
||||
|
||||
// Setting Player 2 inputs
|
||||
headlessSetTickCommand
|
||||
(
|
||||
1,
|
||||
player2Inputs->_RunSpeed,
|
||||
player2Inputs->_StrafingSpeed,
|
||||
player2Inputs->_TurningSpeed,
|
||||
player2Inputs->_Fire,
|
||||
player2Inputs->_Action,
|
||||
player2Inputs->_WeaponSelect,
|
||||
player2Inputs->_Automap,
|
||||
player2Inputs->_FlyLook,
|
||||
player2Inputs->_ArtifactUse,
|
||||
player2Inputs->_Jump,
|
||||
player2Inputs->_EndPlayer
|
||||
);
|
||||
// Setting Player 2 inputs
|
||||
headlessSetTickCommand
|
||||
(
|
||||
1,
|
||||
player2Inputs->RunSpeed,
|
||||
player2Inputs->StrafingSpeed,
|
||||
player2Inputs->TurningSpeed,
|
||||
player2Inputs->Fire,
|
||||
player2Inputs->Action,
|
||||
player2Inputs->WeaponSelect,
|
||||
player2Inputs->Automap,
|
||||
player2Inputs->FlyLook,
|
||||
player2Inputs->ArtifactUse,
|
||||
player2Inputs->Jump,
|
||||
player2Inputs->EndPlayer
|
||||
);
|
||||
|
||||
// Setting Player 3 inputs
|
||||
headlessSetTickCommand
|
||||
(
|
||||
2,
|
||||
player3Inputs->_RunSpeed,
|
||||
player3Inputs->_StrafingSpeed,
|
||||
player3Inputs->_TurningSpeed,
|
||||
player3Inputs->_Fire,
|
||||
player3Inputs->_Action,
|
||||
player3Inputs->_WeaponSelect,
|
||||
player3Inputs->_Automap,
|
||||
player3Inputs->_FlyLook,
|
||||
player3Inputs->_ArtifactUse,
|
||||
player3Inputs->_Jump,
|
||||
player3Inputs->_EndPlayer
|
||||
);
|
||||
// Setting Player 3 inputs
|
||||
headlessSetTickCommand
|
||||
(
|
||||
2,
|
||||
player3Inputs->RunSpeed,
|
||||
player3Inputs->StrafingSpeed,
|
||||
player3Inputs->TurningSpeed,
|
||||
player3Inputs->Fire,
|
||||
player3Inputs->Action,
|
||||
player3Inputs->WeaponSelect,
|
||||
player3Inputs->Automap,
|
||||
player3Inputs->FlyLook,
|
||||
player3Inputs->ArtifactUse,
|
||||
player3Inputs->Jump,
|
||||
player3Inputs->EndPlayer
|
||||
);
|
||||
|
||||
// Setting Player 4 inputs
|
||||
headlessSetTickCommand
|
||||
(
|
||||
3,
|
||||
player4Inputs->_RunSpeed,
|
||||
player4Inputs->_StrafingSpeed,
|
||||
player4Inputs->_TurningSpeed,
|
||||
player4Inputs->_Fire,
|
||||
player4Inputs->_Action,
|
||||
player4Inputs->_WeaponSelect,
|
||||
player4Inputs->_Automap,
|
||||
player4Inputs->_FlyLook,
|
||||
player4Inputs->_ArtifactUse,
|
||||
player4Inputs->_Jump,
|
||||
player4Inputs->_EndPlayer
|
||||
);
|
||||
// Setting Player 4 inputs
|
||||
headlessSetTickCommand
|
||||
(
|
||||
3,
|
||||
player4Inputs->RunSpeed,
|
||||
player4Inputs->StrafingSpeed,
|
||||
player4Inputs->TurningSpeed,
|
||||
player4Inputs->Fire,
|
||||
player4Inputs->Action,
|
||||
player4Inputs->WeaponSelect,
|
||||
player4Inputs->Automap,
|
||||
player4Inputs->FlyLook,
|
||||
player4Inputs->ArtifactUse,
|
||||
player4Inputs->Jump,
|
||||
player4Inputs->EndPlayer
|
||||
);
|
||||
|
||||
// Enabling/Disabling rendering, as required
|
||||
if (renderInfo->_RenderVideo == 0) headlessDisableVideoRendering();
|
||||
if (renderInfo->_RenderVideo == 1) headlessEnableVideoRendering();
|
||||
if (renderInfo->_RenderAudio == 0) headlessDisableAudioRendering();
|
||||
if (renderInfo->_RenderAudio == 1) headlessEnableAudioRendering();
|
||||
// Enabling/Disabling rendering, as required
|
||||
if (!renderInfo->RenderVideo) headlessDisableVideoRendering();
|
||||
if (renderInfo->RenderVideo) headlessEnableVideoRendering();
|
||||
if (!renderInfo->RenderAudio) headlessDisableAudioRendering();
|
||||
if (renderInfo->RenderAudio) headlessEnableAudioRendering();
|
||||
|
||||
// Running a single tick
|
||||
headlessRunSingleTick();
|
||||
// Running a single tick
|
||||
headlessRunSingleTick();
|
||||
|
||||
// Move positional sounds
|
||||
headlessUpdateSounds();
|
||||
// Move positional sounds
|
||||
headlessUpdateSounds();
|
||||
|
||||
// Updating video
|
||||
if (renderInfo->_RenderVideo == 1)
|
||||
{
|
||||
displayplayer = consoleplayer = renderInfo->_PlayerPointOfView;
|
||||
headlessUpdateVideo();
|
||||
}
|
||||
// Updating video
|
||||
if (renderInfo->RenderVideo)
|
||||
{
|
||||
displayplayer = consoleplayer = renderInfo->PlayerPointOfView;
|
||||
headlessUpdateVideo();
|
||||
}
|
||||
}
|
||||
|
||||
ECL_ENTRY void (*input_callback_cb)(void);
|
||||
|
||||
void real_input_callback(void)
|
||||
{
|
||||
if (input_callback_cb)
|
||||
input_callback_cb();
|
||||
if (input_callback_cb)
|
||||
input_callback_cb();
|
||||
}
|
||||
|
||||
ECL_EXPORT void dsda_set_input_callback(ECL_ENTRY void (*fecb)(void))
|
||||
{
|
||||
input_callback_cb = fecb;
|
||||
input_callback_cb = fecb;
|
||||
}
|
||||
|
||||
bool foundIWAD = false;
|
||||
|
||||
ECL_EXPORT int dsda_init(struct InitSettings *settings, int argc, char **argv)
|
||||
{
|
||||
printf("Passing arguments: \n");
|
||||
|
@ -150,33 +150,33 @@ ECL_EXPORT int dsda_init(struct InitSettings *settings, int argc, char **argv)
|
|||
printf("\n");
|
||||
|
||||
// Setting players in game
|
||||
playeringame[0] = settings->_Player1Present;
|
||||
playeringame[1] = settings->_Player2Present;
|
||||
playeringame[2] = settings->_Player3Present;
|
||||
playeringame[3] = settings->_Player4Present;
|
||||
playeringame[0] = settings->Player1Present;
|
||||
playeringame[1] = settings->Player2Present;
|
||||
playeringame[2] = settings->Player3Present;
|
||||
playeringame[3] = settings->Player4Present;
|
||||
|
||||
// Handle class
|
||||
PlayerClass[0] = (pclass_t)settings->_Player1Class;
|
||||
PlayerClass[1] = (pclass_t)settings->_Player2Class;
|
||||
PlayerClass[2] = (pclass_t)settings->_Player3Class;
|
||||
PlayerClass[3] = (pclass_t)settings->_Player4Class;
|
||||
PlayerClass[0] = (pclass_t)settings->Player1Class;
|
||||
PlayerClass[1] = (pclass_t)settings->Player2Class;
|
||||
PlayerClass[2] = (pclass_t)settings->Player3Class;
|
||||
PlayerClass[3] = (pclass_t)settings->Player4Class;
|
||||
|
||||
// Initializing DSDA core
|
||||
headlessMain(argc, argv);
|
||||
printf("DSDA Initialized\n");
|
||||
|
||||
switch(compatibility_level) {
|
||||
case prboom_6_compatibility:
|
||||
longtics = 1;
|
||||
break;
|
||||
case mbf21_compatibility:
|
||||
longtics = 1;
|
||||
shorttics = !dsda_Flag(dsda_arg_longtics);
|
||||
break;
|
||||
default:
|
||||
longtics = dsda_Flag(dsda_arg_longtics);
|
||||
break;
|
||||
}
|
||||
switch(compatibility_level) {
|
||||
case prboom_6_compatibility:
|
||||
longtics = 1;
|
||||
break;
|
||||
case mbf21_compatibility:
|
||||
longtics = 1;
|
||||
shorttics = !dsda_Flag(dsda_arg_longtics);
|
||||
break;
|
||||
default:
|
||||
longtics = dsda_Flag(dsda_arg_longtics);
|
||||
break;
|
||||
}
|
||||
|
||||
// Initializing audio
|
||||
I_SetSoundCap();
|
||||
|
@ -184,8 +184,8 @@ ECL_EXPORT int dsda_init(struct InitSettings *settings, int argc, char **argv)
|
|||
printf("Audio Initialized\n");
|
||||
|
||||
// If required, prevent level exit and game end triggers
|
||||
preventLevelExit = settings->_PreventLevelExit;
|
||||
preventGameEnd = settings->_PreventGameEnd;
|
||||
preventLevelExit = settings->PreventLevelExit;
|
||||
preventGameEnd = settings->PreventGameEnd;
|
||||
|
||||
printf("Prevent Level Exit: %d\n", preventLevelExit);
|
||||
printf("Prevent Game End: %d\n", preventGameEnd);
|
||||
|
@ -197,19 +197,32 @@ ECL_EXPORT int dsda_init(struct InitSettings *settings, int argc, char **argv)
|
|||
}
|
||||
|
||||
|
||||
ECL_EXPORT int dsda_add_wad_file(const char *filename, const int size, ECL_ENTRY int (*feload_archive_cb)(const char *filename, unsigned char *buffer, int maxsize))
|
||||
ECL_EXPORT int dsda_add_wad_file(const char *filename, const int size, ECL_ENTRY int (*feload_archive_cb)(const char *filename, uint8_t *buffer, int maxsize))
|
||||
{
|
||||
printf("Loading WAD '%s' of size %d...\n", filename, size);
|
||||
unsigned char* wadFileBuffer = (unsigned char*) alloc_invisible(size);
|
||||
uint8_t *wadFileBuffer = (uint8_t *)alloc_invisible(size);
|
||||
|
||||
if (wadFileBuffer == NULL)
|
||||
{
|
||||
fprintf(stderr, "Error creating buffer. Do we have enough memory in the waterbox?\n");
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
printf("Created buffer at address: %p\n", wadFileBuffer);
|
||||
|
||||
if (wadFileBuffer == NULL) { fprintf(stderr, "Error creating buffer. Do we have enough memory in the waterbox?\n"); return 0; }
|
||||
else printf("Created buffer at address: %p\n", wadFileBuffer);
|
||||
|
||||
int loadSize = feload_archive_cb(filename, wadFileBuffer, size);
|
||||
if (loadSize != size) { fprintf(stderr, "Error loading '%s': read %d bytes, but expected %d bytes\n", filename, loadSize, size); return 0; }
|
||||
if (loadSize != size)
|
||||
{
|
||||
fprintf(stderr, "Error loading '%s': read %d bytes, but expected %d bytes\n", filename, loadSize, size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Check size is enough
|
||||
if (size < 5) { fprintf(stderr, "Error loading '%s': read %d bytes, which is too small\n", filename, size); return 0; }
|
||||
if (size < 5)
|
||||
{
|
||||
fprintf(stderr, "Error loading '%s': read %d bytes, which is too small\n", filename, size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Getting wad header
|
||||
char header[5];
|
||||
|
@ -225,11 +238,11 @@ ECL_EXPORT int dsda_add_wad_file(const char *filename, const int size, ECL_ENTRY
|
|||
// Loading PWAD
|
||||
if (!strcmp(header, "PWAD"))
|
||||
{
|
||||
recognizedFormat = true;
|
||||
recognizedFormat = true;
|
||||
|
||||
// Loading PWAD
|
||||
D_AddFile(filename, source_pwad, wadFileBuffer, size);
|
||||
printf("Loaded PWAD '%s' correctly\n", filename);
|
||||
D_AddFile(filename, source_pwad, wadFileBuffer, size);
|
||||
printf("Loaded PWAD '%s' correctly\n", filename);
|
||||
}
|
||||
|
||||
// Loading IWAD
|
||||
|
@ -238,17 +251,25 @@ ECL_EXPORT int dsda_add_wad_file(const char *filename, const int size, ECL_ENTRY
|
|||
recognizedFormat = true;
|
||||
|
||||
// Checking for repeated IWAD
|
||||
if (foundIWAD == true) { fprintf(stderr, "Error with '%s': an IWAD was already loaded before\n", filename); return 0; }
|
||||
foundIWAD = true;
|
||||
if (foundIWAD == true)
|
||||
{
|
||||
fprintf(stderr, "Error with '%s': an IWAD was already loaded before\n", filename);
|
||||
return 0;
|
||||
}
|
||||
foundIWAD = true;
|
||||
|
||||
// Loading IWAD
|
||||
printf("Loading IWAD '%s'...\n", filename);
|
||||
AddIWAD(filename, wadFileBuffer, size);
|
||||
printf("Loading IWAD '%s'...\n", filename);
|
||||
AddIWAD(filename, wadFileBuffer, size);
|
||||
printf("Loaded IWAD '%s' correctly\n", filename);
|
||||
}
|
||||
|
||||
|
||||
// Checking for correct header
|
||||
if (recognizedFormat == false) { fprintf(stderr, "Error with '%s': it contains an unrecognized header '%s'\n", filename, header); return 0; }
|
||||
if (recognizedFormat == false)
|
||||
{
|
||||
fprintf(stderr, "Error with '%s': it contains an unrecognized header '%s'\n", filename, header);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// All ok
|
||||
return 1 << gamemode;
|
||||
|
@ -258,20 +279,22 @@ ECL_EXPORT int dsda_add_wad_file(const char *filename, const int size, ECL_ENTRY
|
|||
// but there's still useful data in memory that we can expose
|
||||
// so we turn it into artificial memory domains, one for each entity array
|
||||
// TODO: expose sectors and linedefs like xdre does (but better)
|
||||
ECL_EXPORT char dsda_read_memory_array(int type, unsigned int addr)
|
||||
ECL_EXPORT char dsda_read_memory_array(int type, uint32_t addr)
|
||||
{
|
||||
char out_of_bounts = 0xFF;
|
||||
char null_thing = 0x88;
|
||||
int padded_size = 512; // sizeof(mobj_t) is 464 but we pad for nice representation
|
||||
|
||||
if (addr >= numthings * padded_size) return out_of_bounts;
|
||||
|
||||
|
||||
if (addr >= numthings * padded_size)
|
||||
return out_of_bounts;
|
||||
|
||||
int index = addr / padded_size;
|
||||
int offset = addr % padded_size;
|
||||
mobj_t *mobj = mobj_ptrs[index];
|
||||
|
||||
if (mobj == NULL) return null_thing;
|
||||
|
||||
|
||||
if (mobj == NULL)
|
||||
return null_thing;
|
||||
|
||||
char *data = (char *)mobj + offset;
|
||||
return *data;
|
||||
}
|
|
@ -3,20 +3,25 @@
|
|||
|
||||
#include "emulibc.h"
|
||||
#include "d_player.h"
|
||||
#include "w_wad.h"
|
||||
#include "p_mobj.h"
|
||||
#include "doomstat.h"
|
||||
#include "g_game.h"
|
||||
|
||||
#include "p_mobj.h"
|
||||
#include "w_wad.h"
|
||||
#include "dsda/args.h"
|
||||
|
||||
extern int headlessMain(int argc, char **argv);
|
||||
extern void headlessRunSingleTick();
|
||||
extern void headlessUpdateSounds(void);
|
||||
extern void headlessClearTickCommand();
|
||||
extern void headlessSetTickCommand(int playerId, int forwardSpeed, int strafingSpeed, int turningSpeed, int fire, int action, int weapon, int automap, int lookfly, int artifact, int jump, int endPlayer);
|
||||
extern void headlessGetMapName(char *outString);
|
||||
extern void headlessSetSaveStatePointer(void *savePtr, int saveStateSize);
|
||||
extern size_t headlessGetEffectiveSaveSize();
|
||||
extern void dsda_ArchiveAll(void);
|
||||
extern void dsda_UnArchiveAll(void);
|
||||
extern void D_AddFile (const char *file, wad_source_t source, void *const buffer, const size_t size);
|
||||
extern void AddIWAD(const char *iwad, void *const buffer, const size_t size);
|
||||
|
||||
// Video-related functions
|
||||
// Video
|
||||
extern void headlessUpdateVideo(void);
|
||||
extern void* headlessGetVideoBuffer();
|
||||
extern int headlessGetVideoPitch();
|
||||
|
@ -24,21 +29,15 @@ extern int headlessGetVideoWidth();
|
|||
extern int headlessGetVideoHeight();
|
||||
extern void headlessEnableVideoRendering();
|
||||
extern void headlessDisableVideoRendering();
|
||||
extern uint32_t* headlessGetPallette();
|
||||
|
||||
// Audio
|
||||
extern void headlessUpdateSounds(void);
|
||||
extern void headlessEnableAudioRendering();
|
||||
extern void headlessDisableAudioRendering();
|
||||
uint32_t* headlessGetPallette();
|
||||
|
||||
extern void headlessSetSaveStatePointer(void* savePtr, int saveStateSize);
|
||||
size_t headlessGetEffectiveSaveSize();
|
||||
extern void dsda_ArchiveAll(void);
|
||||
extern void dsda_UnArchiveAll(void);
|
||||
extern void headlessGetMapName(char* outString);
|
||||
|
||||
extern void D_AddFile (const char *file, wad_source_t source, void* const buffer, const size_t size);
|
||||
extern void AddIWAD(const char *iwad, void* const buffer, const size_t size);
|
||||
extern unsigned char * I_CaptureAudio (int* nsamples);
|
||||
extern void I_InitSound(void);
|
||||
extern void I_SetSoundCap (void);
|
||||
extern uint8_t *I_CaptureAudio (int *nsamples);
|
||||
|
||||
// Players information
|
||||
extern int enableOutput;
|
||||
|
@ -55,45 +54,45 @@ uint32_t _convertedPaletteBuffer[PALETTE_SIZE];
|
|||
|
||||
enum MemoryArrayType
|
||||
{
|
||||
ARRAY_THINGS = 0,
|
||||
ARRAY_LINES = 1,
|
||||
ARRAY_SECTORS = 2
|
||||
ARRAY_THINGS = 0,
|
||||
ARRAY_LINES = 1,
|
||||
ARRAY_SECTORS = 2
|
||||
};
|
||||
|
||||
struct InitSettings
|
||||
{
|
||||
int _Player1Present;
|
||||
int _Player2Present;
|
||||
int _Player3Present;
|
||||
int _Player4Present;
|
||||
int _Player1Class;
|
||||
int _Player2Class;
|
||||
int _Player3Class;
|
||||
int _Player4Class;
|
||||
int _PreventLevelExit;
|
||||
int _PreventGameEnd;
|
||||
int Player1Present;
|
||||
int Player2Present;
|
||||
int Player3Present;
|
||||
int Player4Present;
|
||||
int Player1Class;
|
||||
int Player2Class;
|
||||
int Player3Class;
|
||||
int Player4Class;
|
||||
int PreventLevelExit;
|
||||
int PreventGameEnd;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct PackedPlayerInput
|
||||
{
|
||||
int _RunSpeed;
|
||||
int _StrafingSpeed;
|
||||
int _TurningSpeed;
|
||||
int _WeaponSelect;
|
||||
int _Fire;
|
||||
int _Action;
|
||||
int _Automap;
|
||||
int _FlyLook;
|
||||
int _ArtifactUse;
|
||||
int _Jump;
|
||||
int _EndPlayer;
|
||||
int RunSpeed;
|
||||
int StrafingSpeed;
|
||||
int TurningSpeed;
|
||||
int WeaponSelect;
|
||||
int Fire;
|
||||
int Action;
|
||||
int Automap;
|
||||
int FlyLook;
|
||||
int ArtifactUse;
|
||||
int Jump;
|
||||
int EndPlayer;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct PackedRenderInfo
|
||||
{
|
||||
int _RenderVideo;
|
||||
int _RenderAudio;
|
||||
int _PlayerPointOfView;
|
||||
int RenderVideo;
|
||||
int RenderAudio;
|
||||
int PlayerPointOfView;
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
|
@ -1,5 +1,5 @@
|
|||
CCFLAGS := \
|
||||
-I. \
|
||||
-I. \
|
||||
-I./core/prboom2/src \
|
||||
-Wfatal-errors \
|
||||
-DHAVE_CONFIG_H \
|
||||
|
@ -15,6 +15,22 @@ CCFLAGS := \
|
|||
-Wno-unused-variable \
|
||||
-Wno-deprecated-non-prototype
|
||||
|
||||
CXXFLAGS := \
|
||||
-I. \
|
||||
-I./core/prboom2/src \
|
||||
-Wfatal-errors \
|
||||
-DHAVE_CONFIG_H \
|
||||
-Dstricmp=strcasecmp \
|
||||
-Dstrnicmp=strncasecmp \
|
||||
-DNDEBUG \
|
||||
-ffast-math \
|
||||
-Wno-unused-function \
|
||||
-Wno-switch \
|
||||
-Wno-pointer-sign \
|
||||
-Wno-sign-compare \
|
||||
-Wno-unused-but-set-variable \
|
||||
-Wno-unused-variable
|
||||
|
||||
LDFLAGS :=
|
||||
|
||||
TARGET := dsda.wbx
|
||||
|
|
Loading…
Reference in New Issue