various platform cleanups
This commit is contained in:
parent
2748ca071d
commit
efd7972d7f
6
makefile
6
makefile
|
@ -16,13 +16,13 @@ export
|
|||
#
|
||||
|
||||
# Inluclude Unicode support
|
||||
UNICODE = 1
|
||||
#UNICODE = 1
|
||||
|
||||
# Build A68K ASM 68000 core
|
||||
BUILD_A68K = 1
|
||||
#BUILD_A68K = 1
|
||||
|
||||
# Include x86 Assembly routines
|
||||
BUILD_X86_ASM = 1
|
||||
#BUILD_X86_ASM = 1
|
||||
|
||||
# Build for x64 targets (MinGW64 and MSVC only, this will undefine BUILD_A68K and BUILD_X86_ASM)
|
||||
#BUILD_X64_EXE = 1
|
||||
|
|
10
makefile.sdl
10
makefile.sdl
|
@ -76,8 +76,6 @@ incdir = $(foreach dir,$(alldir),-I$(srcdir)$(dir)) -I$(objdir)depend/generated
|
|||
|
||||
lib += `sdl-config --libs`
|
||||
|
||||
depobj += resource.o \
|
||||
|
||||
autdep = $(depobj:.o=.d)
|
||||
|
||||
ifdef BUILD_A68K
|
||||
|
@ -163,7 +161,7 @@ ASFLAGS = -O1 -f coff -w-orphan-labels
|
|||
# D3DUtils & D3DMath need these
|
||||
# DEF = -Dsinf=\(float\)sin -Dcosf=\(float\)cos -Dasinf=\(float\)asin -Dacosf=\(float\)acos -Dsqrtf=\(float\)sqrt
|
||||
|
||||
DEF := -DUSE_SPEEDHACKS -DFILENAME=$(NAME) -DMMX=0
|
||||
DEF := -DBUILD_SDL -DUSE_SPEEDHACKS -DFILENAME=$(NAME) -DMMX=0
|
||||
|
||||
ifdef UNICODE
|
||||
DEF := $(DEF) -D_UNICODE
|
||||
|
@ -328,7 +326,7 @@ endif
|
|||
ifdef BUILD_A68K
|
||||
$(a68k.o): fba_make68k.c
|
||||
@echo Compiling A68K MC68000 core...
|
||||
@$(CC) -mconsole $(CFLAGS) $(LDFLAGS) -DWIN32 -Wno-unused -Wno-conversion -Wno-missing-prototypes \
|
||||
@$(CC) $(CFLAGS) $(LDFLAGS) -DWIN32 -Wno-unused -Wno-conversion -Wno-missing-prototypes \
|
||||
-s $< -o $(subst $(srcdir),$(objdir),$(<D))/$(<F:.c=.exe)
|
||||
@$(subst $(srcdir),$(objdir),$(<D))/$(<F:.c=.exe) $(@:.o=.asm) \
|
||||
$(@D)/a68k_tab.asm 00 $(ppro)
|
||||
|
@ -374,7 +372,7 @@ ctv.d ctv.o: $(ctv.h)
|
|||
|
||||
$(ctv.h): ctv_make.cpp
|
||||
@echo Generating $(srcdir)depend/generated/$(@F)...
|
||||
@$(CC) -mconsole $(CXXFLAGS) $(LDFLAGS) $< \
|
||||
@$(CC) $(CXXFLAGS) $(LDFLAGS) $< \
|
||||
-o $(subst $(srcdir),$(objdir),$(<D))/$(<F:.cpp=.exe)
|
||||
@$(subst $(srcdir),$(objdir),$(<D))/$(<F:.cpp=.exe) >$@
|
||||
|
||||
|
@ -431,7 +429,7 @@ pgm_draw.d pgm_draw.o: $(pgm_sprite.h)
|
|||
|
||||
$(pgm_sprite.h): pgm_sprite_create.cpp
|
||||
@echo Generating $(srcdir)depend/generated/$(@F)...
|
||||
@$(CC) -mconsole $(CXXFLAGS) $(LDFLAGS) $< \
|
||||
@$(CC) $(CXXFLAGS) $(LDFLAGS) $< \
|
||||
-o $(subst $(srcdir),$(objdir),$(<D))/$(<F:.cpp=.exe)
|
||||
@$(subst $(srcdir),$(objdir),$(<D))/$(<F:.cpp=.exe) >$@
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ alldir = burn burn/devices burn/sound burn/drivers burn/drivers/capcom burn/dri
|
|||
cpu/arm cpu/arm7 cpu/h6280 cpu/hd6309 cpu/i8039 cpu/konami cpu/m68k cpu/m6502 cpu/m6800 cpu/m6805 cpu/m6809 cpu/nec \
|
||||
cpu/s2650 cpu/sh2 cpu/z80 depend/kaillera/client depend/libs/libpng depend/libs/zlib interface interface/video \
|
||||
interface/video/scalers interface/video/sdl interface/audio interface/audio/sdl interface/input \
|
||||
interface/input/sdl interface/cd interface/cd/sdl \
|
||||
interface/input/sdl interface/cd interface/cd/sdl interface/perfcount \
|
||||
depend/generated
|
||||
|
||||
drvobj = d_dodonpachi.o d_donpachi.o d_esprade.o d_feversos.o d_gaia.o d_guwange.o d_hotdogst.o d_korokoro.o d_mazinger.o \
|
||||
|
@ -66,7 +66,7 @@ drvobj = d_dodonpachi.o d_donpachi.o d_esprade.o d_feversos.o d_gaia.o d_guwang
|
|||
\
|
||||
d_snes.o
|
||||
|
||||
depobj := main.o stringset.o drv.o load.o misc.o \
|
||||
depobj := main.o drv.o load.o misc.o \
|
||||
vid_sdlfx.o vid_softfx.o vid_interface.o vid_support.o config.o \
|
||||
state.o stated.o statec.o run.o inpdipsw.o gami.o gamc.o \
|
||||
cheat.o vid_sdlopengl.o \
|
||||
|
@ -93,14 +93,8 @@ depobj := main.o stringset.o drv.o load.o misc.o \
|
|||
arm.o arm7.o h6280.o hd6309.o i8039.o konami.o m6502.o m6800.o m6805.o m6809.o nec.o s2650.o sh2.o v25.o z80.o \
|
||||
z80daisy.o \
|
||||
\
|
||||
aud_dsp.o aud_interface.o cd_interface.o inp_interface.o interface.o lowpass2.o prf_interface.o vid_interface.o \
|
||||
vid_softfx.o vid_support.o \
|
||||
\
|
||||
2xpm.o 2xsai.o epx.o hq2xs.o hq2xs_16.o \
|
||||
\
|
||||
aud_dsound3.o aud_xaudio2.o cd_isowav.o cdsound.o ddraw_core.o dinput_core.o directx9_core.o dsound_core.o \
|
||||
inp_dinput.o prf_performance_counter.o vid_d3d.o vid_ddraw.o vid_ddrawfx.o vid_directx9.o vid_directx_support.o \
|
||||
\
|
||||
cave.o cave_palette.o cave_sprite.o cave_tile.o \
|
||||
\
|
||||
cps2_crpt.o cps.o cps_config.o cps_draw.o cps_mem.o cps_obj.o cps_pal.o cps_run.o cps_rw.o cps_scr.o cpsr.o cpsrd.o \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// FB Alpha sample player module
|
||||
|
||||
#include "burnint.h"
|
||||
#include "direct.h"
|
||||
//#include "direct.h"
|
||||
#include "samples.h"
|
||||
|
||||
#define SAMPLE_DIRECTORY szAppSamplesPath
|
||||
|
|
|
@ -40,6 +40,17 @@
|
|||
|
||||
#include "interface.h"
|
||||
|
||||
typedef struct tagIMAGE {
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int rowbytes;
|
||||
unsigned int imgbytes;
|
||||
unsigned char** rowptr;
|
||||
unsigned char* bmpbits;
|
||||
unsigned int flags;
|
||||
} IMAGE;
|
||||
|
||||
|
||||
#define IMG_FREE (1 << 0)
|
||||
|
||||
// Macros for parsing text
|
||||
|
|
|
@ -190,6 +190,9 @@ TCHAR* DecorateGenreInfo()
|
|||
_stprintf(szDecoratedGenre, _T(""));
|
||||
_stprintf(szFamily, _T(""));
|
||||
|
||||
#ifdef BUILD_WIN32
|
||||
//TODO: Translations are not working in non-win32 builds. This needs to be fixed
|
||||
|
||||
if (nGenre) {
|
||||
if (nGenre & GBF_HORSHOOT) {
|
||||
_stprintf(szDecoratedGenre, _T("%s%s, "), szDecoratedGenre, FBALoadStringEx(hAppInst, IDS_GENRE_HORSHOOT, true));
|
||||
|
@ -316,7 +319,7 @@ TCHAR* DecorateGenreInfo()
|
|||
szFamily[_tcslen(szFamily) - 2] = _T(')');
|
||||
szFamily[_tcslen(szFamily) - 1] = _T('\0');
|
||||
}
|
||||
|
||||
#endif
|
||||
_stprintf(szDecoratedGenre, _T("%s%s"), szDecoratedGenre, szFamily);
|
||||
|
||||
return szDecoratedGenre;
|
||||
|
|
|
@ -52,49 +52,8 @@ void InpDIPSWResetDIPs();
|
|||
int InputInit();
|
||||
int InputExit();
|
||||
int InputMake(bool bCopy);
|
||||
extern int nAppVirtualFps; // virtual fps
|
||||
|
||||
extern TCHAR szAppExeName[EXE_NAME_SIZE + 1];
|
||||
extern TCHAR szAppBurnVer[16];
|
||||
|
||||
extern bool bCmdOptUsed;
|
||||
extern bool bAlwaysProcessKeyboardInput;
|
||||
|
||||
extern bool bNoChangeNumLock;
|
||||
extern bool bMonitorAutoCheck;
|
||||
|
||||
// Used for the load/save dialog in commdlg.h
|
||||
extern TCHAR szChoice[MAX_PATH]; // File chosen by the user
|
||||
|
||||
// Used to convert strings when possibly needed
|
||||
/* const */ char* TCHARToANSI(const TCHAR* pszInString, char* pszOutString, int nOutSize);
|
||||
/* const */ TCHAR* ANSIToTCHAR(const char* pszString, TCHAR* pszOutString, int nOutSize);
|
||||
|
||||
CHAR *astring_from_utf8(const char *s);
|
||||
char *utf8_from_astring(const CHAR *s);
|
||||
|
||||
WCHAR *wstring_from_utf8(const char *s);
|
||||
char *utf8_from_wstring(const WCHAR *s);
|
||||
|
||||
#ifdef _UNICODE
|
||||
#define tstring_from_utf8 wstring_from_utf8
|
||||
#define utf8_from_tstring utf8_from_wstring
|
||||
#else // !_UNICODE
|
||||
#define tstring_from_utf8 astring_from_utf8
|
||||
#define utf8_from_tstring utf8_from_astring
|
||||
#endif // _UNICODE
|
||||
|
||||
int dprintf(TCHAR* pszFormat, ...); // Use instead of printf() in the UI
|
||||
|
||||
void MonitorAutoCheck();
|
||||
//TODO:
|
||||
#define szAppBurnVer 1
|
||||
|
||||
|
||||
// Misc
|
||||
#define _TtoA(a) TCHARToANSI(a, NULL, 0)
|
||||
#define _AtoT(a) ANSIToTCHAR(a, NULL, 0)
|
||||
int __cdecl ZipLoadOneFile(const char* arcName, const char* fileName, void** Dest, int* pnWrote);
|
||||
|
||||
// numpluscommas.cpp
|
||||
TCHAR* FormatCommasNumber(__int64);
|
||||
#define _uInt64ToCommaFormattedTCHAR(szOUT, nIN) \
|
||||
_stprintf(szOUT, _T("%s"), FormatCommasNumber(nIN));
|
||||
|
|
|
@ -13,10 +13,6 @@ static int DoLibInit() // Do Init of Burn library driver
|
|||
|
||||
BzipOpen(false);
|
||||
|
||||
// If there is an error with the romset, report it
|
||||
if (nBzipError) {
|
||||
}
|
||||
|
||||
//ProgressCreate();
|
||||
|
||||
nRet = BurnDrvInit();
|
||||
|
@ -62,10 +58,11 @@ int DrvInit(int nDrvNum, bool bRestore)
|
|||
|
||||
nBurnSoundRate = 0; // Assume no sound
|
||||
pBurnSoundOut = NULL;
|
||||
if (bAudOkay) {
|
||||
nBurnSoundRate = nAudSampleRate;
|
||||
nBurnSoundLen = nAudSegLen;
|
||||
} nBurnDrvSelect = nDrvNum; // Set the driver number
|
||||
// if (bAudOkay) {
|
||||
// nBurnSoundRate = nAudSampleRate;
|
||||
// nBurnSoundLen = nAudSegLen;
|
||||
// }
|
||||
nBurnDrvSelect[0] = nDrvNum; // Set the driver number
|
||||
|
||||
// Define nMaxPlayers early; GameInpInit() needs it (normally defined in DoLibInit()).
|
||||
nMaxPlayers = BurnDrvGetMaxPlayers();
|
||||
|
@ -99,7 +96,7 @@ int DrvInit(int nDrvNum, bool bRestore)
|
|||
|
||||
int DrvInitCallback()
|
||||
{
|
||||
return DrvInit(nBurnDrvSelect, false);
|
||||
return DrvInit(nBurnDrvSelect[0], false);
|
||||
}
|
||||
|
||||
int DrvExit()
|
||||
|
@ -107,7 +104,7 @@ int DrvExit()
|
|||
if (bDrvOkay) {
|
||||
VidExit();
|
||||
|
||||
if (nBurnDrvSelect < nBurnDrvCount) {
|
||||
if (nBurnDrvSelect[0] < nBurnDrvCount) {
|
||||
if (bSaveRAM) {
|
||||
|
||||
bSaveRAM = false;
|
||||
|
@ -129,7 +126,7 @@ int DrvExit()
|
|||
memset(nAudNextSound, 0, nAudSegLen << 2);
|
||||
}
|
||||
|
||||
nBurnDrvSelect = ~0U; // no driver selected
|
||||
nBurnDrvSelect[0] = ~0U; // no driver selected
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ void ProcessCommandLine(int argc, char *argv[])
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
unsigned int i=0;
|
||||
UINT32 i=0;
|
||||
|
||||
ConfigAppLoad();
|
||||
|
||||
|
@ -53,7 +53,7 @@ int main(int argc, char *argv[])
|
|||
if (argc == 2)
|
||||
{
|
||||
for (i = 0; i < nBurnDrvCount; i++) {
|
||||
nBurnDrvSelect = i;
|
||||
nBurnDrvSelect[0] = i;
|
||||
if (strcmp(BurnDrvGetTextA(0), argv[1]) == 0) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -291,17 +291,6 @@ extern bool bNeoCDListScanOnlyISO;
|
|||
extern TCHAR szNeoCDCoverDir[MAX_PATH];
|
||||
extern TCHAR szNeoCDGamesDir[MAX_PATH];
|
||||
|
||||
// image_win32.cpp
|
||||
typedef struct tagIMAGE {
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int rowbytes;
|
||||
unsigned int imgbytes;
|
||||
unsigned char** rowptr;
|
||||
unsigned char* bmpbits;
|
||||
unsigned int flags;
|
||||
} IMAGE;
|
||||
|
||||
HBITMAP ImageToBitmap(HWND hwnd, IMAGE* img);
|
||||
HBITMAP PNGLoadBitmap(HWND hWnd, FILE* fp, int nWidth, int nHeight, int nPreset);
|
||||
HBITMAP LoadBitmap(HWND hWnd, FILE* fp, int nWidth, int nHeight, int nPreset);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// 68000 (Sixty Eight K) Interface - header file
|
||||
|
||||
#include <stdint.h>
|
||||
#ifndef FASTCALL
|
||||
#undef __fastcall
|
||||
#define __fastcall
|
||||
|
|
|
@ -408,8 +408,11 @@ const TCHAR* VidGetModuleName()
|
|||
if (pszName) {
|
||||
return pszName;
|
||||
}
|
||||
|
||||
#if defined (BUILD_WIN32)
|
||||
return FBALoadStringEx(hAppInst, IDS_ERR_UNKNOWN, true);
|
||||
#else
|
||||
return "There was an error with the video";
|
||||
#endif
|
||||
}
|
||||
|
||||
InterfaceInfo* VidGetInfo()
|
||||
|
|
Loading…
Reference in New Issue