2009-01-25 23:07:15 +00:00
|
|
|
|
// Copyright (C) 2003-2008 Dolphin Project.
|
|
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
|
|
#ifndef MAIN_H
|
|
|
|
|
#define MAIN_H
|
|
|
|
|
|
2009-02-04 00:06:11 +00:00
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// Includes
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-01-25 23:07:15 +00:00
|
|
|
|
#include <iostream> // System
|
2009-02-04 00:06:11 +00:00
|
|
|
|
////////////////////////////////
|
2009-01-25 23:07:15 +00:00
|
|
|
|
|
2009-02-04 00:06:11 +00:00
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// Definitions and declarations
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2009-02-03 22:06:18 +00:00
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
#define sleep(x) Sleep(x)
|
|
|
|
|
#else
|
2009-02-03 22:09:13 +00:00
|
|
|
|
#define sleep(x) usleep(x*1000)
|
2009-01-25 23:07:15 +00:00
|
|
|
|
#endif
|
2009-02-04 00:06:11 +00:00
|
|
|
|
|
|
|
|
|
|
2009-01-25 23:07:15 +00:00
|
|
|
|
void DoInitialize();
|
2009-01-28 16:09:08 +00:00
|
|
|
|
double GetDoubleTime();
|
|
|
|
|
int GetUpdateRate();
|
2009-02-01 13:01:50 +00:00
|
|
|
|
void InterruptDebugging(bool Emu, const void* _pData);
|
2009-02-04 06:40:05 +00:00
|
|
|
|
void ReadDebugging(bool Emu, const void* _pData, int Size);
|
2009-02-01 15:40:13 +00:00
|
|
|
|
bool IsFocus();
|
2009-01-28 16:09:08 +00:00
|
|
|
|
|
2009-02-04 00:06:11 +00:00
|
|
|
|
|
2009-01-28 16:09:08 +00:00
|
|
|
|
// Movement recording
|
|
|
|
|
#define RECORDING_ROWS 15
|
2009-02-03 00:59:26 +00:00
|
|
|
|
#define WM_RECORDING_WIIMOTE 0
|
|
|
|
|
#define WM_RECORDING_NUNCHUCK 1
|
|
|
|
|
#define WM_RECORDING_IR 2
|
2009-01-28 16:09:08 +00:00
|
|
|
|
struct SRecording
|
|
|
|
|
{
|
|
|
|
|
u8 x;
|
|
|
|
|
u8 y;
|
|
|
|
|
u8 z;
|
|
|
|
|
double Time;
|
2009-02-03 00:59:26 +00:00
|
|
|
|
u8 IR[12];
|
2009-01-28 16:09:08 +00:00
|
|
|
|
};
|
|
|
|
|
struct SRecordingAll
|
|
|
|
|
{
|
|
|
|
|
std::vector<SRecording> Recording;
|
|
|
|
|
int HotKey;
|
|
|
|
|
int PlaybackSpeed;
|
2009-02-03 00:59:26 +00:00
|
|
|
|
int IRBytes;
|
2009-01-28 16:09:08 +00:00
|
|
|
|
};
|
2009-01-25 23:07:15 +00:00
|
|
|
|
|
|
|
|
|
#ifndef EXCLUDEMAIN_H
|
2009-02-01 13:01:50 +00:00
|
|
|
|
// General
|
2009-01-25 23:07:15 +00:00
|
|
|
|
extern bool g_EmulatorRunning;
|
|
|
|
|
extern bool g_FrameOpen;
|
|
|
|
|
extern bool g_RealWiiMotePresent;
|
|
|
|
|
extern bool g_RealWiiMoteInitialized;
|
2009-01-26 07:01:43 +00:00
|
|
|
|
extern bool g_EmulatedWiiMoteInitialized;
|
2009-02-07 03:16:41 +00:00
|
|
|
|
extern bool g_WiimoteUnexpectedDisconnect;
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
extern HWND g_ParentHWND;
|
|
|
|
|
#endif
|
2009-01-28 16:09:08 +00:00
|
|
|
|
|
2009-02-01 13:01:50 +00:00
|
|
|
|
// Settings
|
|
|
|
|
extern accel_cal g_accel;
|
2009-02-07 03:16:41 +00:00
|
|
|
|
extern nu_cal g_nu;
|
2009-02-01 13:01:50 +00:00
|
|
|
|
|
|
|
|
|
// Debugging
|
|
|
|
|
extern bool g_DebugAccelerometer;
|
|
|
|
|
extern bool g_DebugData;
|
|
|
|
|
extern bool g_DebugComm;
|
2009-02-08 10:15:55 +00:00
|
|
|
|
extern bool g_DebugSoundData;
|
2009-02-07 03:16:41 +00:00
|
|
|
|
extern bool g_DebugCustom;
|
2009-02-01 13:01:50 +00:00
|
|
|
|
|
2009-01-28 16:09:08 +00:00
|
|
|
|
// Update speed
|
|
|
|
|
extern int g_UpdateCounter;
|
|
|
|
|
extern double g_UpdateTime;
|
|
|
|
|
extern int g_UpdateWriteScreen;
|
|
|
|
|
extern int g_UpdateRate;
|
|
|
|
|
extern std::vector<int> g_UpdateTimeList;
|
2009-01-26 07:01:43 +00:00
|
|
|
|
|
2009-01-28 16:09:08 +00:00
|
|
|
|
// Movement recording
|
|
|
|
|
extern std::vector<SRecordingAll> VRecording;
|
|
|
|
|
|
|
|
|
|
//#if defined(HAVE_WX) && HAVE_WX && defined(__CONFIGDIALOG_h__)
|
|
|
|
|
// extern ConfigDialog *frame;
|
|
|
|
|
//#endif
|
2009-01-25 23:07:15 +00:00
|
|
|
|
#endif
|
|
|
|
|
////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
2009-02-03 22:06:18 +00:00
|
|
|
|
#endif // MAIN_H
|