Trying to untangle the horrible web of file dependencies
This commit is contained in:
parent
49b05ff178
commit
7b75fb1448
|
@ -50,26 +50,11 @@
|
||||||
#include "tracer.h"
|
#include "tracer.h"
|
||||||
#include "cdlogger.h"
|
#include "cdlogger.h"
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
#include "basicbot.h"
|
#include "basicbot.h"
|
||||||
#include "args.h"
|
#include "args.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
// #defines
|
|
||||||
|
|
||||||
#define VNSCLIP ((eoptions&EO_CLIPSIDES)?8:0)
|
|
||||||
#define VNSWID ((eoptions&EO_CLIPSIDES)?240:256)
|
|
||||||
|
|
||||||
#define SO_FORCE8BIT 1
|
|
||||||
#define SO_SECONDARY 2
|
|
||||||
#define SO_GFOCUS 4
|
|
||||||
#define SO_D16VOL 8
|
|
||||||
#define SO_MUTEFA 16
|
|
||||||
#define SO_OLDUP 32
|
|
||||||
|
|
||||||
#define GOO_DISABLESS 1 /* Disable screen saver when game is loaded. */
|
|
||||||
#define GOO_CONFIRMEXIT 2 /* Confirmation before exiting. */
|
|
||||||
#define GOO_POWERRESET 4 /* Confirm on power/reset. */
|
|
||||||
|
|
||||||
//---------------------------
|
//---------------------------
|
||||||
//mbg merge 6/29/06 - new aboutbox
|
//mbg merge 6/29/06 - new aboutbox
|
||||||
|
|
||||||
|
@ -106,6 +91,8 @@ void ApplyDefaultCommandMapping(void);
|
||||||
uint8 *xbsave = NULL;
|
uint8 *xbsave = NULL;
|
||||||
int eoptions = EO_BGRUN | EO_FORCEISCALE;
|
int eoptions = EO_BGRUN | EO_FORCEISCALE;
|
||||||
|
|
||||||
|
int soundoptions = SO_SECONDARY | SO_GFOCUS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle of the main window.
|
* Handle of the main window.
|
||||||
**/
|
**/
|
||||||
|
@ -118,20 +105,6 @@ HINSTANCE fceu_hInstance;
|
||||||
|
|
||||||
HRESULT ddrval;
|
HRESULT ddrval;
|
||||||
|
|
||||||
/**
|
|
||||||
* Contains the names of the overridden standard directories
|
|
||||||
* in the order cheats, misc, nonvol, states, snaps, ..., base
|
|
||||||
**/
|
|
||||||
static char *directory_names[6] = {0, 0, 0, 0, 0, 0};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Contains the names of the default directories.
|
|
||||||
**/
|
|
||||||
static const char *default_directory_names[5] = {"cheats", "sav", "fcs", "snaps", "movie"};
|
|
||||||
|
|
||||||
#define NUMBER_OF_DIRECTORIES sizeof(directory_names) / sizeof(*directory_names)
|
|
||||||
#define NUMBER_OF_DEFAULT_DIRECTORIES sizeof(default_directory_names) / sizeof(*default_directory_names)
|
|
||||||
|
|
||||||
static char TempArray[2048];
|
static char TempArray[2048];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -142,49 +115,18 @@ static char BaseDirectory[2048];
|
||||||
static int exiting = 0;
|
static int exiting = 0;
|
||||||
static volatile int moocow = 0;
|
static volatile int moocow = 0;
|
||||||
|
|
||||||
/* Some timing-related variables (now ignored). */
|
|
||||||
static int maxconbskip = 32; /* Maximum consecutive blit skips. */
|
|
||||||
static int ffbskip = 32; /* Blit skips per blit when FF-ing */
|
|
||||||
|
|
||||||
static int moviereadonly = 1;
|
|
||||||
|
|
||||||
static int fullscreen = 0;
|
|
||||||
static int soundflush = 0;
|
|
||||||
// Flag that indicates whether Game Genie is enabled or not.
|
|
||||||
static int genie = 0;
|
|
||||||
|
|
||||||
// Flag that indicates whether PAL Emulation is enabled or not.
|
|
||||||
static int pal_emulation = 0;
|
|
||||||
static int status_icon = 1;
|
|
||||||
static int windowedfailed;
|
static int windowedfailed;
|
||||||
static double saspectw = 1, saspecth = 1;
|
|
||||||
static double winsizemulx = 1, winsizemuly = 1;
|
|
||||||
static int winwidth, winheight;
|
|
||||||
static int ismaximized = 0;
|
|
||||||
|
|
||||||
static volatile int nofocus = 0;
|
static volatile int nofocus = 0;
|
||||||
static volatile int _userpause = 0; //mbg merge 7/18/06 changed tasbuild was using this only in a couple of places
|
static volatile int _userpause = 0; //mbg merge 7/18/06 changed tasbuild was using this only in a couple of places
|
||||||
|
|
||||||
static uint32 goptions = GOO_DISABLESS;
|
|
||||||
|
|
||||||
static int soundrate = 44100;
|
|
||||||
static int soundbuftime = 50;
|
|
||||||
/*static*/ int soundoptions = SO_SECONDARY | SO_GFOCUS;
|
|
||||||
static int soundvolume = 100;
|
|
||||||
static int soundquality = 0;
|
|
||||||
extern int autoHoldKey, autoHoldClearKey;
|
extern int autoHoldKey, autoHoldClearKey;
|
||||||
extern int frame_display, input_display;
|
extern int frame_display, input_display;
|
||||||
|
|
||||||
//mbg merge 7/17/06 did these have to be unsigned?
|
//mbg merge 7/17/06 did these have to be unsigned?
|
||||||
static int srendline, erendline;
|
static int srendline, erendline;
|
||||||
static int srendlinen = 8;
|
|
||||||
static int erendlinen = 231;
|
|
||||||
static int srendlinep = 0;
|
|
||||||
static int erendlinep = 239;
|
|
||||||
static int totallines;
|
static int totallines;
|
||||||
|
|
||||||
static uint8 cpalette[192];
|
|
||||||
static int vmod = 0;
|
|
||||||
int soundo = 1;
|
int soundo = 1;
|
||||||
static int ntsccol = 0, ntsctint, ntschue;
|
static int ntsccol = 0, ntsctint, ntschue;
|
||||||
|
|
||||||
|
@ -291,7 +233,6 @@ void CreateDirs(void)
|
||||||
DefaultDirectoryWalker(DirectoryCreator);
|
DefaultDirectoryWalker(DirectoryCreator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *gfsdir=0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fills the BaseDirectory string
|
* Fills the BaseDirectory string
|
||||||
|
@ -440,7 +381,7 @@ void DoPriority(void)
|
||||||
|
|
||||||
// TODO: HORRIBLE
|
// TODO: HORRIBLE
|
||||||
|
|
||||||
#include "sound.cpp"
|
//#include "sound.cpp"
|
||||||
#include "video.cpp"
|
#include "video.cpp"
|
||||||
#include "window.cpp"
|
#include "window.cpp"
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,74 @@
|
||||||
|
#ifndef WIN_MAIN_H
|
||||||
|
#define WIN_MAIN_H
|
||||||
|
|
||||||
#include "../../types.h"
|
#include "../../types.h"
|
||||||
|
|
||||||
static int genie;
|
// #defines
|
||||||
static int pal_emulation;
|
|
||||||
static int status_icon;
|
#define VNSCLIP ((eoptions&EO_CLIPSIDES)?8:0)
|
||||||
static int fullscreen;
|
#define VNSWID ((eoptions&EO_CLIPSIDES)?240:256)
|
||||||
static int vmod;
|
|
||||||
static char *gfsdir;
|
#define SO_FORCE8BIT 1
|
||||||
static char *directory_names[6];
|
#define SO_SECONDARY 2
|
||||||
static double winsizemulx, winsizemuly;
|
#define SO_GFOCUS 4
|
||||||
static double saspectw, saspecth;
|
#define SO_D16VOL 8
|
||||||
static int soundrate;
|
#define SO_MUTEFA 16
|
||||||
static int soundbuftime;
|
#define SO_OLDUP 32
|
||||||
static int soundvolume;
|
|
||||||
static int soundquality;
|
#define GOO_DISABLESS 1 /* Disable screen saver when game is loaded. */
|
||||||
static uint32 goptions;
|
#define GOO_CONFIRMEXIT 2 /* Confirmation before exiting. */
|
||||||
|
#define GOO_POWERRESET 4 /* Confirm on power/reset. */
|
||||||
|
|
||||||
|
/* Some timing-related variables (now ignored). */
|
||||||
|
static int maxconbskip = 32; /* Maximum consecutive blit skips. */
|
||||||
|
static int ffbskip = 32; /* Blit skips per blit when FF-ing */
|
||||||
|
|
||||||
|
static int moviereadonly = 1;
|
||||||
|
|
||||||
|
static int fullscreen = 0;
|
||||||
|
static int soundflush = 0;
|
||||||
|
// Flag that indicates whether Game Genie is enabled or not.
|
||||||
|
static int genie = 0;
|
||||||
|
|
||||||
|
// Flag that indicates whether PAL Emulation is enabled or not.
|
||||||
|
static int pal_emulation = 0;
|
||||||
|
static int status_icon = 1;
|
||||||
|
|
||||||
|
static int vmod = 0;
|
||||||
|
static char *gfsdir=0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the names of the overridden standard directories
|
||||||
|
* in the order cheats, misc, nonvol, states, snaps, ..., base
|
||||||
|
**/
|
||||||
|
static char *directory_names[6] = {0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the names of the default directories.
|
||||||
|
**/
|
||||||
|
static const char *default_directory_names[5] = {"cheats", "sav", "fcs", "snaps", "movie"};
|
||||||
|
|
||||||
|
#define NUMBER_OF_DIRECTORIES sizeof(directory_names) / sizeof(*directory_names)
|
||||||
|
#define NUMBER_OF_DEFAULT_DIRECTORIES sizeof(default_directory_names) / sizeof(*default_directory_names)
|
||||||
|
|
||||||
|
static double saspectw = 1, saspecth = 1;
|
||||||
|
static double winsizemulx = 1, winsizemuly = 1;
|
||||||
|
static int winwidth, winheight;
|
||||||
|
static int ismaximized = 0;
|
||||||
|
static uint32 goptions = GOO_DISABLESS;
|
||||||
|
|
||||||
|
static int soundrate = 44100;
|
||||||
|
static int soundbuftime = 50;
|
||||||
|
static int soundvolume = 100;
|
||||||
|
static int soundquality = 0;
|
||||||
static uint8 cpalette[192];
|
static uint8 cpalette[192];
|
||||||
static int srendlinen;
|
static int srendlinen = 8;
|
||||||
static int erendlinen;
|
static int erendlinen = 231;
|
||||||
static int srendlinep;
|
static int srendlinep = 0;
|
||||||
static int erendlinep;
|
static int erendlinep = 239;
|
||||||
static int ismaximized;
|
|
||||||
static int maxconbskip;
|
|
||||||
static int ffbskip;
|
|
||||||
static int moviereadonly;
|
|
||||||
|
|
||||||
extern int soundo;
|
extern int soundo;
|
||||||
extern int eoptions;
|
extern int eoptions;
|
||||||
extern int soundoptions;
|
extern int soundoptions;
|
||||||
|
|
||||||
|
#endif
|
|
@ -19,6 +19,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include "common.h"
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
/// controls whether playback is muted
|
/// controls whether playback is muted
|
||||||
static bool mute = false;
|
static bool mute = false;
|
||||||
|
@ -502,7 +504,7 @@ BOOL CALLBACK SoundConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
|
||||||
/**
|
/**
|
||||||
* Shows the sounds configuration dialog.
|
* Shows the sounds configuration dialog.
|
||||||
**/
|
**/
|
||||||
void ConfigSound(void)
|
void ConfigSound()
|
||||||
{
|
{
|
||||||
if(!uug)
|
if(!uug)
|
||||||
{
|
{
|
||||||
|
@ -551,7 +553,7 @@ static int32 fps_scale_table[]=
|
||||||
{ 3, 3, 4, 8, 16, 32, 64, 128, 192, 256, 384, 512, 768, 1024, 2048, 4096, 8192, 16384, 16384};
|
{ 3, 3, 4, 8, 16, 32, 64, 128, 192, 256, 384, 512, 768, 1024, 2048, 4096, 8192, 16384, 16384};
|
||||||
int32 fps_scale = 256;
|
int32 fps_scale = 256;
|
||||||
|
|
||||||
static void RefreshThrottleFPS(void)
|
void RefreshThrottleFPS()
|
||||||
{
|
{
|
||||||
printf("WTF\n");
|
printf("WTF\n");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
@ -597,4 +599,4 @@ void FCEUD_SetEmulationSpeed(int cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#include "wave.cpp"
|
//#include "wave.cpp"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
extern int32 fps_scale;
|
||||||
|
|
||||||
|
void RefreshThrottleFPS();
|
||||||
|
void ConfigSound();
|
||||||
|
int InitSound();
|
||||||
|
void TrashSound();
|
||||||
|
void win_SoundSetScale(int scale);
|
||||||
|
void win_SoundWriteData(int32 *buffer, int count);
|
||||||
|
void win_Throttle();
|
|
@ -18,7 +18,11 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int CloseWave(void)
|
|
||||||
|
#include "common.h"
|
||||||
|
#include "../../wave.h"
|
||||||
|
|
||||||
|
int CloseWave()
|
||||||
{
|
{
|
||||||
|
|
||||||
return(FCEUI_EndWaveRecord());
|
return(FCEUI_EndWaveRecord());
|
||||||
|
@ -29,7 +33,7 @@ int CloseWave(void)
|
||||||
*
|
*
|
||||||
* @return Flag that indicates failure (0) or success (1).
|
* @return Flag that indicates failure (0) or success (1).
|
||||||
**/
|
**/
|
||||||
int CreateSoundSave(void)
|
int CreateSoundSave()
|
||||||
{
|
{
|
||||||
const char filter[]="MS WAVE(*.wav)\0*.wav\0";
|
const char filter[]="MS WAVE(*.wav)\0*.wav\0";
|
||||||
char nameo[2048];
|
char nameo[2048];
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
|
|
||||||
#include "state.cpp" /* Save/Load state AS */
|
#include "state.cpp" /* Save/Load state AS */
|
||||||
|
|
||||||
|
#include "sound.h"
|
||||||
|
#include "wave.h"
|
||||||
|
|
||||||
// #defines
|
// #defines
|
||||||
|
|
||||||
#define MAX(x,y) ((x)<(y)?(y):(x))
|
#define MAX(x,y) ((x)<(y)?(y):(x))
|
||||||
|
@ -382,7 +385,7 @@ void UpdateRecentArray(const char* addString, char** bufferArray, unsigned int a
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move the other items down.
|
// Move the other items down.
|
||||||
for(x = arrayLen - 1; x; x--)
|
for(unsigned int x = arrayLen - 1; x; x--)
|
||||||
{
|
{
|
||||||
bufferArray[x] = bufferArray[x - 1];
|
bufferArray[x] = bufferArray[x - 1];
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ void FCEU_WriteWaveData(int32 *Buffer, int Count)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int FCEUI_EndWaveRecord(void)
|
int FCEUI_EndWaveRecord()
|
||||||
{
|
{
|
||||||
long s;
|
long s;
|
||||||
|
|
||||||
|
|
|
@ -1 +1,4 @@
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
void FCEU_WriteWaveData(int32 *Buffer, int Count);
|
void FCEU_WriteWaveData(int32 *Buffer, int Count);
|
||||||
|
int FCEUI_EndWaveRecord();
|
|
@ -1010,6 +1010,32 @@
|
||||||
RelativePath="..\src\drivers\win\resource.h"
|
RelativePath="..\src\drivers\win\resource.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\src\drivers\win\sound.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||||
|
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||||
|
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\src\drivers\win\sound.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\drivers\win\tracer.cpp"
|
RelativePath="..\src\drivers\win\tracer.cpp"
|
||||||
>
|
>
|
||||||
|
@ -1022,6 +1048,32 @@
|
||||||
RelativePath="..\src\drivers\win\video.h"
|
RelativePath="..\src\drivers\win\video.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\src\drivers\win\wave.cpp"
|
||||||
|
>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||||
|
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Release|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||||
|
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\src\drivers\win\wave.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\drivers\win\window.h"
|
RelativePath="..\src\drivers\win\window.h"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue