mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 15:22:08 +00:00
- finally managed to get rid of the DWORD type.
This one was particularly nasty because Windows also defines a DWORD, but in Windows it is an unsigned long, not an unsigned int so changing types caused type conflicts and not all could be removed. Those referring to the Windows type have to be kept, fortunately they are mostly in the Win32 directory, with a handful of exceptions elsewhere.
This commit is contained in:
parent
2b0e9650bb
commit
fec958cc0a
54 changed files with 66 additions and 120 deletions
|
@ -3,16 +3,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
// windef.h, included by windows.h, has its own incompatible definition
|
||||
// of DWORD as a long. In files that mix Doom and Windows code, you
|
||||
// must define USE_WINDOWS_DWORD before including doomtype.h so that
|
||||
// you are aware that those files have a different DWORD than the rest
|
||||
// of the source.
|
||||
|
||||
#ifndef USE_WINDOWS_DWORD
|
||||
typedef uint32_t DWORD;
|
||||
#endif
|
||||
typedef uint32_t BITFIELD;
|
||||
typedef uint32_t BITFIELD;
|
||||
typedef int INTBOOL;
|
||||
|
||||
#if !defined(GUID_DEFINED)
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#include "hu_stuff.h"
|
||||
#include "i_system.h"
|
||||
#include "i_video.h"
|
||||
#include "i_input.h"
|
||||
#include "g_input.h"
|
||||
#include "m_swap.h"
|
||||
#include "v_palette.h"
|
||||
#include "v_video.h"
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "v_video.h"
|
||||
#include "gi.h"
|
||||
#include "d_gui.h"
|
||||
#include "i_input.h"
|
||||
#include "g_input.h"
|
||||
#include "templates.h"
|
||||
#include "d_net.h"
|
||||
#include "d_event.h"
|
||||
|
|
|
@ -33,9 +33,7 @@
|
|||
**
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#define USE_WINDOWS_DWORD
|
||||
#endif
|
||||
// This also pulls in windows.h
|
||||
#include "LzmaDec.h"
|
||||
|
||||
#include "files.h"
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "m_random.h"
|
||||
#include "m_crc32.h"
|
||||
#include "i_system.h"
|
||||
#include "i_input.h"
|
||||
#include "p_saveg.h"
|
||||
#include "p_tick.h"
|
||||
#include "d_main.h"
|
||||
|
|
9
src/g_input.h
Normal file
9
src/g_input.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
// These were in i_input.h, which differed between platforms and on Windows caused problems with its
|
||||
// inclusion of system specific data, so it has been separated into this platform independent file.
|
||||
void I_PutInClipboard (const char *str);
|
||||
FString I_GetFromClipboard (bool use_primary_selection);
|
||||
void I_SetMouseCapture();
|
||||
void I_ReleaseMouseCapture();
|
||||
|
|
@ -52,7 +52,6 @@
|
|||
#include "templates.h"
|
||||
#include "i_system.h"
|
||||
#include "i_video.h"
|
||||
#include "i_input.h"
|
||||
#include "v_pfx.h"
|
||||
#include "stats.h"
|
||||
#include "doomerrors.h"
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#include "templates.h"
|
||||
#include "i_system.h"
|
||||
#include "i_video.h"
|
||||
#include "i_input.h"
|
||||
#include "v_pfx.h"
|
||||
#include "stats.h"
|
||||
#include "doomerrors.h"
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <windows.h>
|
||||
#include <intrin.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#elif defined __APPLE__
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
# include <winsock.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
#else
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "hu_stuff.h"
|
||||
#include "gi.h"
|
||||
#include "v_palette.h"
|
||||
#include "i_input.h"
|
||||
#include "g_input.h"
|
||||
#include "gameconfigfile.h"
|
||||
#include "gstrings.h"
|
||||
#include "r_utility.h"
|
||||
|
|
|
@ -34,7 +34,7 @@ static FRandom pr_opl;
|
|||
|
||||
typedef uintptr_t Bitu;
|
||||
typedef intptr_t Bits;
|
||||
typedef DWORD Bit32u;
|
||||
typedef uint32_t Bit32u;
|
||||
typedef int32_t Bit32s;
|
||||
typedef uint16_t Bit16u;
|
||||
typedef int16_t Bit16s;
|
||||
|
|
|
@ -200,11 +200,11 @@ public:
|
|||
if (File != NULL)
|
||||
{
|
||||
long where_am_i = ftell(File);
|
||||
DWORD len[2];
|
||||
uint32_t len[2];
|
||||
|
||||
fseek(File, 12, SEEK_SET);
|
||||
len[0] = LittleLong(CurIntTime);
|
||||
len[1] = LittleLong(DWORD(where_am_i - 24));
|
||||
len[1] = LittleLong(uint32_t(where_am_i - 24));
|
||||
fwrite(len, 4, 2, File);
|
||||
fclose(File);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
typedef uintptr_t Bitu;
|
||||
typedef intptr_t Bits;
|
||||
typedef DWORD Bit32u;
|
||||
typedef uint32_t Bit32u;
|
||||
typedef int32_t Bit32s;
|
||||
typedef uint16_t Bit16u;
|
||||
typedef int16_t Bit16s;
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#ifndef __I_INPUT_H__
|
||||
#define __I_INPUT_H__
|
||||
|
||||
void I_PutInClipboard (const char *str);
|
||||
FString I_GetFromClipboard (bool use_primary_selection);
|
||||
void I_SetMouseCapture();
|
||||
void I_ReleaseMouseCapture();
|
||||
|
||||
#endif
|
||||
|
|
@ -32,10 +32,8 @@
|
|||
**
|
||||
**
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#define USE_WINDOWS_DWORD
|
||||
#endif
|
||||
|
||||
// Note that 7z made the unwise decision to include windows.h :(
|
||||
#include "7z.h"
|
||||
#include "7zCrc.h"
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
extern HWND Window;
|
||||
#define USE_WINDOWS_DWORD
|
||||
#else
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
virtual MIDIDevice* CreateMIDIDevice() const override;
|
||||
|
||||
private:
|
||||
DWORD ActiveFMODVersion;
|
||||
uint32_t ActiveFMODVersion;
|
||||
int SFXPaused;
|
||||
bool InitSuccess;
|
||||
bool DSPLocked;
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#define USE_WINDOWS_DWORD
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0400
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#endif
|
||||
#ifndef USE_WINDOWS_DWORD
|
||||
#define USE_WINDOWS_DWORD
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#else
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "resource.h"
|
||||
extern HWND Window;
|
||||
extern HINSTANCE g_hInst;
|
||||
#define USE_WINDOWS_DWORD
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
#endif
|
||||
|
||||
#include "mpg123_decoder.h"
|
||||
|
|
|
@ -210,20 +210,20 @@ void AudioToolboxMIDIDevice::Stop()
|
|||
int AudioToolboxMIDIDevice::PrepareHeader(MidiHeader* data)
|
||||
{
|
||||
MidiHeader* events = data;
|
||||
DWORD position = 0;
|
||||
uint32_t position = 0;
|
||||
|
||||
while (nullptr != events)
|
||||
{
|
||||
DWORD* const event = reinterpret_cast<DWORD*>(events->lpData + position);
|
||||
const DWORD message = event[2];
|
||||
uint32_t* const event = reinterpret_cast<uint32_t*>(events->lpData + position);
|
||||
const uint32_t message = event[2];
|
||||
|
||||
if (0 == MEVENT_EVENTTYPE(message))
|
||||
{
|
||||
static const DWORD VOLUME_CHANGE_EVENT = 7;
|
||||
static const uint32_t VOLUME_CHANGE_EVENT = 7;
|
||||
|
||||
const DWORD status = message & 0xFF;
|
||||
const DWORD param1 = (message >> 8) & 0x7F;
|
||||
const DWORD param2 = (message >> 16) & 0x7F;
|
||||
const uint32_t status = message & 0xFF;
|
||||
const uint32_t param1 = (message >> 8) & 0x7F;
|
||||
const uint32_t param2 = (message >> 16) & 0x7F;
|
||||
|
||||
if (nullptr != m_audioUnit && MIDI_CTRLCHANGE == status && VOLUME_CHANGE_EVENT == param1)
|
||||
{
|
||||
|
|
|
@ -78,7 +78,7 @@ protected:
|
|||
|
||||
typedef struct tagITFILEHEADER
|
||||
{
|
||||
DWORD id; // 0x4D504D49
|
||||
uint32_t id; // 0x4D504D49
|
||||
char songname[26];
|
||||
uint16_t reserved1; // 0x1004
|
||||
uint16_t ordnum;
|
||||
|
@ -96,8 +96,8 @@ typedef struct tagITFILEHEADER
|
|||
uint8_t sep;
|
||||
uint8_t zero;
|
||||
uint16_t msglength;
|
||||
DWORD msgoffset;
|
||||
DWORD reserved2;
|
||||
uint32_t msgoffset;
|
||||
uint32_t reserved2;
|
||||
uint8_t chnpan[64];
|
||||
uint8_t chnvol[64];
|
||||
} FORCE_PACKED ITFILEHEADER, *PITFILEHEADER;
|
||||
|
@ -274,16 +274,16 @@ static bool ReadIT(const uint8_t * ptr, unsigned size, input_mod *info, bool met
|
|||
unsigned msgoffset = LittleLong(pifh->msgoffset);
|
||||
unsigned msgend = msgoffset + LittleShort(pifh->msglength);
|
||||
|
||||
DWORD * offset;
|
||||
uint32_t * offset;
|
||||
// FString name;
|
||||
|
||||
if (meta)
|
||||
{
|
||||
offset = (DWORD *)(ptr + 0xC0 + LittleShort(pifh->ordnum) + LittleShort(pifh->insnum) * 4);
|
||||
offset = (uint32_t *)(ptr + 0xC0 + LittleShort(pifh->ordnum) + LittleShort(pifh->insnum) * 4);
|
||||
|
||||
for (n = 0, l = LittleShort(pifh->smpnum); n < l; n++, offset++)
|
||||
{
|
||||
DWORD offset_n = LittleLong( *offset );
|
||||
uint32_t offset_n = LittleLong( *offset );
|
||||
if ( offset_n >= msgoffset && offset_n < msgend ) msgend = offset_n;
|
||||
if ((!offset_n) || (offset_n + 0x14 + 26 + 2 >= size)) continue;
|
||||
// XXX
|
||||
|
@ -304,11 +304,11 @@ static bool ReadIT(const uint8_t * ptr, unsigned size, input_mod *info, bool met
|
|||
#endif
|
||||
}
|
||||
|
||||
offset = (DWORD *)(ptr + 0xC0 + LittleShort(pifh->ordnum));
|
||||
offset = (uint32_t *)(ptr + 0xC0 + LittleShort(pifh->ordnum));
|
||||
|
||||
for (n = 0, l = LittleShort(pifh->insnum); n < l; n++, offset++)
|
||||
{
|
||||
DWORD offset_n = LittleLong( *offset );
|
||||
uint32_t offset_n = LittleLong( *offset );
|
||||
if ( offset_n >= msgoffset && offset_n < msgend ) msgend = offset_n;
|
||||
if ((!offset_n) || (offset_n + 0x20 + 26 >= size)) continue;
|
||||
#if 0
|
||||
|
@ -340,9 +340,9 @@ static bool ReadIT(const uint8_t * ptr, unsigned size, input_mod *info, bool met
|
|||
}
|
||||
}
|
||||
|
||||
if ((pos + 8 < size) && (*(DWORD *)(ptr + pos) == MAKE_ID('P','N','A','M')))
|
||||
if ((pos + 8 < size) && (*(uint32_t *)(ptr + pos) == MAKE_ID('P','N','A','M')))
|
||||
{
|
||||
unsigned len = LittleLong(*(DWORD *)(ptr + pos + 4));
|
||||
unsigned len = LittleLong(*(uint32_t *)(ptr + pos + 4));
|
||||
pos += 8;
|
||||
if ((pos + len <= size) && (len <= 240 * 32) && (len >= 32))
|
||||
{
|
||||
|
@ -366,9 +366,9 @@ static bool ReadIT(const uint8_t * ptr, unsigned size, input_mod *info, bool met
|
|||
}
|
||||
}
|
||||
|
||||
if ((pos + 8 < size) && (*(DWORD *)(ptr + pos) == MAKE_ID('C','N','A','M')))
|
||||
if ((pos + 8 < size) && (*(uint32_t *)(ptr + pos) == MAKE_ID('C','N','A','M')))
|
||||
{
|
||||
unsigned len = LittleLong(*(DWORD *)(ptr + pos + 4));
|
||||
unsigned len = LittleLong(*(uint32_t *)(ptr + pos + 4));
|
||||
pos += 8;
|
||||
if ((pos + len <= size) && (len <= 64 * 20) && (len >= 20))
|
||||
{
|
||||
|
@ -393,14 +393,14 @@ static bool ReadIT(const uint8_t * ptr, unsigned size, input_mod *info, bool met
|
|||
}
|
||||
}
|
||||
|
||||
offset = (DWORD *)(ptr + 0xC0 + LittleShort(pifh->ordnum) + LittleShort(pifh->insnum) * 4 + LittleShort(pifh->smpnum) * 4);
|
||||
offset = (uint32_t *)(ptr + 0xC0 + LittleShort(pifh->ordnum) + LittleShort(pifh->insnum) * 4 + LittleShort(pifh->smpnum) * 4);
|
||||
|
||||
uint8_t chnmask[64];
|
||||
|
||||
for (n = 0, l = LittleShort(pifh->patnum); n < l; n++)
|
||||
{
|
||||
memset(chnmask, 0, sizeof(chnmask));
|
||||
DWORD offset_n = LittleLong( offset[n] );
|
||||
uint32_t offset_n = LittleLong( offset[n] );
|
||||
if ((!offset_n) || (offset_n + 4 >= size)) continue;
|
||||
unsigned len = LittleShort(*(uint16_t *)(ptr + offset_n));
|
||||
unsigned rows = LittleShort(*(uint16_t *)(ptr + offset_n + 2));
|
||||
|
@ -759,7 +759,7 @@ MusInfo *MOD_OpenSong(FileReader &reader)
|
|||
union
|
||||
{
|
||||
uint8_t start[64];
|
||||
DWORD dstart[64/4];
|
||||
uint32_t dstart[64/4];
|
||||
};
|
||||
dumbfile_mem_status filestate;
|
||||
DUMBFILE *f = NULL;
|
||||
|
@ -845,7 +845,7 @@ MusInfo *MOD_OpenSong(FileReader &reader)
|
|||
/*start_order = 0;*/
|
||||
}
|
||||
}
|
||||
else if (size >= 4 && dstart[0] == (DWORD)MAKE_ID('P','S','M',254))
|
||||
else if (size >= 4 && dstart[0] == (uint32_t)MAKE_ID('P','S','M',254))
|
||||
{
|
||||
if ((f = dumb_read_allfile(&filestate, start, reader, headsize, size)))
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "v_text.h"
|
||||
#include "menu/menu.h"
|
||||
|
||||
static DWORD nummididevices;
|
||||
static uint32_t nummididevices;
|
||||
static bool nummididevicesset;
|
||||
|
||||
#ifdef HAVE_FLUIDSYNTH
|
||||
|
@ -117,7 +117,7 @@ void I_BuildMIDIMenuList (FOptionValues *opt)
|
|||
{
|
||||
AddDefaultMidiDevices(opt);
|
||||
|
||||
for (DWORD id = 0; id < nummididevices; ++id)
|
||||
for (uint32_t id = 0; id < nummididevices; ++id)
|
||||
{
|
||||
MIDIOUTCAPS caps;
|
||||
MMRESULT res;
|
||||
|
@ -133,7 +133,7 @@ void I_BuildMIDIMenuList (FOptionValues *opt)
|
|||
}
|
||||
}
|
||||
|
||||
static void PrintMidiDevice (int id, const char *name, uint16_t tech, DWORD support)
|
||||
static void PrintMidiDevice (int id, const char *name, uint16_t tech, uint32_t support)
|
||||
{
|
||||
if (id == snd_mididevice)
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
||||
|
||||
static void WriteVarLen (TArray<uint8_t> &file, DWORD value);
|
||||
static void WriteVarLen (TArray<uint8_t> &file, uint32_t value);
|
||||
|
||||
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
||||
|
||||
|
@ -496,7 +496,7 @@ void MIDIStreamer::MusicVolumeChanged()
|
|||
if (MIDI != NULL && MIDI->FakeVolume())
|
||||
{
|
||||
float realvolume = clamp<float>(snd_musicvolume * relative_volume, 0.f, 1.f);
|
||||
Volume = clamp<DWORD>((DWORD)(realvolume * 65535.f), 0, 65535);
|
||||
Volume = clamp<uint32_t>((uint32_t)(realvolume * 65535.f), 0, 65535);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -773,7 +773,7 @@ int MIDIStreamer::FillBuffer(int buffer_num, int max_events, uint32_t max_time)
|
|||
{
|
||||
// Be more responsive when unpausing by only playing each buffer
|
||||
// for a third of the maximum time.
|
||||
events[0] = MAX<DWORD>(1, (max_time / 3) * Division / Tempo);
|
||||
events[0] = MAX<uint32_t>(1, (max_time / 3) * Division / Tempo);
|
||||
events[1] = 0;
|
||||
events[2] = MEVENT_NOP << 24;
|
||||
events += 3;
|
||||
|
@ -828,7 +828,7 @@ int MIDIStreamer::FillStopBuffer(int buffer_num)
|
|||
|
||||
memset(&Buffer[buffer_num], 0, sizeof(MidiHeader));
|
||||
Buffer[buffer_num].lpData = (uint8_t*)Events[buffer_num];
|
||||
Buffer[buffer_num].dwBufferLength = DWORD((uint8_t*)events - Buffer[buffer_num].lpData);
|
||||
Buffer[buffer_num].dwBufferLength = uint32_t((uint8_t*)events - Buffer[buffer_num].lpData);
|
||||
Buffer[buffer_num].dwBytesRecorded = Buffer[buffer_num].dwBufferLength;
|
||||
if (0 != (i = MIDI->PrepareHeader(&Buffer[buffer_num])))
|
||||
{
|
||||
|
@ -974,7 +974,7 @@ void MIDIStreamer::Precache()
|
|||
|
||||
void MIDIStreamer::CreateSMF(TArray<uint8_t> &file, int looplimit)
|
||||
{
|
||||
DWORD delay = 0;
|
||||
uint32_t delay = 0;
|
||||
uint8_t running_status = 255;
|
||||
|
||||
// Always create songs aimed at GM devices.
|
||||
|
@ -1066,7 +1066,7 @@ void MIDIStreamer::CreateSMF(TArray<uint8_t> &file, int looplimit)
|
|||
file.Push(0);
|
||||
|
||||
// Fill in track length
|
||||
DWORD len = file.Size() - 22;
|
||||
uint32_t len = file.Size() - 22;
|
||||
file[18] = uint8_t(len >> 24);
|
||||
file[19] = uint8_t(len >> 16);
|
||||
file[20] = uint8_t(len >> 8);
|
||||
|
@ -1081,9 +1081,9 @@ void MIDIStreamer::CreateSMF(TArray<uint8_t> &file, int looplimit)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
static void WriteVarLen (TArray<uint8_t> &file, DWORD value)
|
||||
static void WriteVarLen (TArray<uint8_t> &file, uint32_t value)
|
||||
{
|
||||
DWORD buffer = value & 0x7F;
|
||||
uint32_t buffer = value & 0x7F;
|
||||
|
||||
while ( (value >>= 7) )
|
||||
{
|
||||
|
|
|
@ -261,7 +261,7 @@ int SoftSynthMIDIDevice::StreamOut(MidiHeader *header)
|
|||
if (Events == NULL)
|
||||
{
|
||||
Events = header;
|
||||
NextTickIn = SamplesPerTick * *(DWORD *)header->lpData;
|
||||
NextTickIn = SamplesPerTick * *(uint32_t *)header->lpData;
|
||||
Position = 0;
|
||||
}
|
||||
else
|
||||
|
@ -302,11 +302,11 @@ bool SoftSynthMIDIDevice::Pause(bool paused)
|
|||
|
||||
int SoftSynthMIDIDevice::PlayTick()
|
||||
{
|
||||
DWORD delay = 0;
|
||||
uint32_t delay = 0;
|
||||
|
||||
while (delay == 0 && Events != NULL)
|
||||
{
|
||||
DWORD *event = (DWORD *)(Events->lpData + Position);
|
||||
uint32_t *event = (uint32_t *)(Events->lpData + Position);
|
||||
if (MEVENT_EVENTTYPE(event[2]) == MEVENT_TEMPO)
|
||||
{
|
||||
SetTempo(MEVENT_EVENTPARM(event[2]));
|
||||
|
@ -373,7 +373,7 @@ int SoftSynthMIDIDevice::PlayTick()
|
|||
return int(Division);
|
||||
}
|
||||
|
||||
delay = *(DWORD *)(Events->lpData + Position);
|
||||
delay = *(uint32_t *)(Events->lpData + Position);
|
||||
}
|
||||
return delay;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
#endif
|
||||
|
||||
#include "sndfile_decoder.h"
|
||||
|
|
|
@ -31,7 +31,7 @@ struct GF1PatchHeader
|
|||
uint8_t Channels;
|
||||
uint16_t WaveForms;
|
||||
uint16_t MasterVolume;
|
||||
DWORD DataSize;
|
||||
uint32_t DataSize;
|
||||
uint8_t Reserved[PATCH_HEADER_RESERVED_SIZE];
|
||||
} GCC_PACKED;
|
||||
|
||||
|
|
|
@ -255,6 +255,8 @@ typedef int16_t SHORT;
|
|||
typedef uint16_t USHORT;
|
||||
typedef int32_t LONG;
|
||||
typedef uint32_t ULONG;
|
||||
typedef uint32_t DWORD;
|
||||
|
||||
#define mmioFOURCC MAKE_ID
|
||||
#define DEFINE_GUID(A, B, C, E, F, G, H, I, J, K, L, M)
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#ifndef _WINNT_
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
#endif
|
||||
|
||||
class FInternalCriticalSection
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "resource.h"
|
||||
#include "s_sound.h"
|
||||
#include "templates.h"
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "doomtype.h"
|
||||
|
||||
#include "c_dispatch.h"
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include <d3d9.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "doomtype.h"
|
||||
#include "f_wipe.h"
|
||||
#include "win32iface.h"
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include <ddraw.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "doomtype.h"
|
||||
|
||||
#include "c_dispatch.h"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "hardware.h"
|
||||
#include "win32iface.h"
|
||||
#include "i_video.h"
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "doomtype.h"
|
||||
#include "c_cvars.h"
|
||||
#include "c_dispatch.h"
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
#include <uxtheme.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "doomtype.h"
|
||||
#include "resource.h"
|
||||
#include "version.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include <oleauto.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "i_input.h"
|
||||
#include "i_system.h"
|
||||
#include "d_event.h"
|
||||
|
|
|
@ -77,7 +77,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "c_dispatch.h"
|
||||
#include "doomtype.h"
|
||||
#include "doomdef.h"
|
||||
|
|
|
@ -37,13 +37,8 @@
|
|||
#include "doomtype.h"
|
||||
#include "doomdef.h"
|
||||
|
||||
void I_SetMouseCapture();
|
||||
void I_ReleaseMouseCapture();
|
||||
|
||||
bool I_InitInput (void *hwnd);
|
||||
void I_ShutdownInput ();
|
||||
void I_PutInClipboard (const char *str);
|
||||
FString I_GetFromClipboard (bool windows_has_no_selection_clipboard);
|
||||
|
||||
void I_GetEvent();
|
||||
|
||||
|
@ -56,7 +51,7 @@ enum
|
|||
};
|
||||
|
||||
|
||||
#ifdef USE_WINDOWS_DWORD
|
||||
#ifdef _WIN32
|
||||
#include "m_joy.h"
|
||||
|
||||
// Don't make these definitions available to the main body of the source code.
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <windows.h>
|
||||
#include <dinput.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "i_input.h"
|
||||
#include "i_system.h"
|
||||
#include "d_event.h"
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "doomerrors.h"
|
||||
#include "hardware.h"
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <windows.h>
|
||||
#include <dinput.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "i_input.h"
|
||||
#include "i_system.h"
|
||||
#include "d_event.h"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <malloc.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "i_input.h"
|
||||
#include "i_system.h"
|
||||
#include "d_event.h"
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include <windows.h>
|
||||
#include <lmcons.h>
|
||||
#include <shlobj.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
|
||||
#include "cmdlib.h"
|
||||
#include "m_misc.h"
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
#include <richedit.h>
|
||||
#include <wincrypt.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "hardware.h"
|
||||
#include "doomerrors.h"
|
||||
#include <math.h>
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <malloc.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "i_input.h"
|
||||
#include "i_system.h"
|
||||
#include "d_event.h"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#define USE_WINDOWS_DWORD
|
||||
|
||||
#include "i_module.h"
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include <stdio.h>
|
||||
#include "resource.h"
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "st_start.h"
|
||||
#include "resource.h"
|
||||
#include "templates.h"
|
||||
|
@ -659,7 +658,7 @@ FHexenStartupScreen::FHexenStartupScreen(int max_progress, HRESULT &hr)
|
|||
union
|
||||
{
|
||||
RGBQUAD color;
|
||||
DWORD quad;
|
||||
uint32_t quad;
|
||||
} c;
|
||||
|
||||
Wads.ReadLump (startup_lump, startup_screen);
|
||||
|
@ -1332,8 +1331,8 @@ void ST_Util_DrawBlock (BITMAPINFO *bitmap_info, const uint8_t *src, int x, int
|
|||
{ // progress notches
|
||||
for (; height > 0; --height)
|
||||
{
|
||||
((DWORD *)dest)[0] = ((const DWORD *)src)[0];
|
||||
((DWORD *)dest)[1] = ((const DWORD *)src)[1];
|
||||
((uint32_t *)dest)[0] = ((const uint32_t *)src)[0];
|
||||
((uint32_t *)dest)[1] = ((const uint32_t *)src)[1];
|
||||
dest += destpitch;
|
||||
src += 8;
|
||||
}
|
||||
|
@ -1395,7 +1394,7 @@ void ST_Util_ClearBlock (BITMAPINFO *bitmap_info, uint8_t fill, int x, int y, in
|
|||
|
||||
BITMAPINFO *ST_Util_CreateBitmap (int width, int height, int color_bits)
|
||||
{
|
||||
DWORD size_image = (width * height) >> int(color_bits == 4);
|
||||
uint32_t size_image = (width * height) >> int(color_bits == 4);
|
||||
BITMAPINFO *bitmap_info = (BITMAPINFO *)M_Malloc (sizeof(BITMAPINFOHEADER) +
|
||||
(sizeof(RGBQUAD) << color_bits) + size_image);
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include <GL/gl.h>
|
||||
#include "wglext.h"
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "win32iface.h"
|
||||
#include "win32gliface.h"
|
||||
//#include "gl/gl_intern.h"
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define USE_WINDOWS_DWORD
|
||||
#include "doomtype.h"
|
||||
|
||||
#include "c_dispatch.h"
|
||||
|
|
Loading…
Reference in a new issue