mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-25 21:14:22 +01:00
Yet another round of dead code cleanup
This commit is contained in:
parent
12e1253a54
commit
88f7c29254
@ -42,10 +42,6 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
|
|
||||||
#ifdef __riscos__
|
|
||||||
#include "ROlib.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Prototypes
|
// Prototypes
|
||||||
static bool match(const char *p, const char *n);
|
static bool match(const char *p, const char *n);
|
||||||
|
@ -21,18 +21,8 @@
|
|||||||
#ifndef _DISPLAY_H
|
#ifndef _DISPLAY_H
|
||||||
#define _DISPLAY_H
|
#define _DISPLAY_H
|
||||||
|
|
||||||
#ifdef __BEOS__
|
|
||||||
#include <InterfaceKit.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef AMIGA
|
|
||||||
#include <graphics/rastport.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SDL
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
extern SDL_Surface *real_screen;
|
extern SDL_Surface *real_screen;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Colors for speedometer/drive LEDs
|
// Colors for speedometer/drive LEDs
|
||||||
enum {
|
enum {
|
||||||
@ -46,14 +36,6 @@ enum {
|
|||||||
PALETTE_SIZE = 21,
|
PALETTE_SIZE = 21,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <ddraw.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __riscos__
|
|
||||||
#include "ROlib.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Display dimensions
|
// Display dimensions
|
||||||
#if defined(SMALL_DISPLAY)
|
#if defined(SMALL_DISPLAY)
|
||||||
|
291
Src/Frodo.rc
291
Src/Frodo.rc
@ -1,291 +0,0 @@
|
|||||||
//Microsoft Developer Studio generated resource script.
|
|
||||||
//
|
|
||||||
#include "resource.h"
|
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
|
||||||
//
|
|
||||||
#include <windows.h>
|
|
||||||
#include <commctrl.h>
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// English (U.S.) resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
|
||||||
#ifdef _WIN32
|
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|
||||||
#pragma code_page(1252)
|
|
||||||
#endif //_WIN32
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Icon
|
|
||||||
//
|
|
||||||
|
|
||||||
// Icon with lowest ID value placed first to ensure application icon
|
|
||||||
// remains consistent on all systems.
|
|
||||||
FRODO_ICON ICON DISCARDABLE "Frodo.ico"
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Menu
|
|
||||||
//
|
|
||||||
|
|
||||||
IDR_MAIN_MENU MENU DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
POPUP "&File"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&New", ID_FILE_NEW
|
|
||||||
MENUITEM "&Open...", ID_FILE_OPEN
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "&Save", ID_FILE_SAVE
|
|
||||||
MENUITEM "Save &As...", ID_FILE_SAVEAS
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "E&xit\tF10", ID_FILE_EX
|
|
||||||
END
|
|
||||||
POPUP "&Tools"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&Preferences...", ID_TOOLS_PREFERENCES
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "P&ause\tPause", ID_TOOLS_PAUSE
|
|
||||||
MENUITEM "&Fullscreen\tAlt-Enter", ID_TOOLS_FULLSCREEN
|
|
||||||
MENUITEM "Reset &DirectDraw\tCtrl-Enter", ID_TOOLS_RESETDIRECTDRAW
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "Reset &C64\tF12", ID_TOOLS_RESETC64
|
|
||||||
MENUITEM "&Insert Next Disk", ID_TOOLS_INSERTNEXTDISK
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "&SAM...", ID_TOOLS_SAM, GRAYED
|
|
||||||
END
|
|
||||||
POPUP "&Help"
|
|
||||||
BEGIN
|
|
||||||
MENUITEM "&Contents...", ID_HELP_CONTENTS
|
|
||||||
MENUITEM "&Keyboard...", ID_HELP_KEYBOARD
|
|
||||||
MENUITEM "&Settings...", ID_HELP_SETTINGS
|
|
||||||
MENUITEM SEPARATOR
|
|
||||||
MENUITEM "&About...", ID_HELP_ABOUT
|
|
||||||
END
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// TEXTINCLUDE
|
|
||||||
//
|
|
||||||
|
|
||||||
1 TEXTINCLUDE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"resource.h\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
2 TEXTINCLUDE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"#include <windows.h>\r\n"
|
|
||||||
"#include <commctrl.h>\r\n"
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
3 TEXTINCLUDE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
"\r\n"
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Dialog
|
|
||||||
//
|
|
||||||
|
|
||||||
IDD_PREFERENCES_STANDARD DIALOG DISCARDABLE 0, 0, 272, 221
|
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "Standard"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
GROUPBOX "&Devices",IDC_STATIC,5,0,260,90
|
|
||||||
RTEXT "8",IDC_STATIC,10,10,15,10
|
|
||||||
EDITTEXT IDC_DEVICE8,35,10,160,14,ES_AUTOHSCROLL
|
|
||||||
PUSHBUTTON "Browse...",IDC_BROWSE8,205,10,50,14
|
|
||||||
RTEXT "9",IDC_STATIC,10,30,15,10
|
|
||||||
EDITTEXT IDC_DEVICE9,35,30,160,14,ES_AUTOHSCROLL
|
|
||||||
PUSHBUTTON "Browse...",IDC_BROWSE9,205,30,50,14
|
|
||||||
RTEXT "10",IDC_STATIC,10,50,15,10
|
|
||||||
EDITTEXT IDC_DEVICE10,35,50,160,14,ES_AUTOHSCROLL
|
|
||||||
PUSHBUTTON "Browse...",IDC_BROWSE10,205,50,50,14
|
|
||||||
RTEXT "11",IDC_STATIC,10,70,15,10
|
|
||||||
EDITTEXT IDC_DEVICE11,35,70,160,14,ES_AUTOHSCROLL
|
|
||||||
PUSHBUTTON "Browse...",IDC_BROWSE11,205,70,50,14
|
|
||||||
GROUPBOX "&Parameters",IDC_STATIC,5,95,260,45
|
|
||||||
LTEXT "Normal",IDC_STATIC,15,105,40,8
|
|
||||||
EDITTEXT IDC_NORMAL,15,120,35,14,ES_AUTOHSCROLL
|
|
||||||
CONTROL "Spin1",IDC_NORMAL_SPIN,"msctls_updown32",
|
|
||||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
|
||||||
UDS_ARROWKEYS,40,120,11,14
|
|
||||||
LTEXT "Bad Lines",IDC_STATIC,55,105,40,8
|
|
||||||
EDITTEXT IDC_BADLINES,55,120,35,14,ES_AUTOHSCROLL
|
|
||||||
CONTROL "Spin1",IDC_BADLINES_SPIN,"msctls_updown32",
|
|
||||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
|
||||||
UDS_ARROWKEYS,80,120,11,14
|
|
||||||
LTEXT "CIA",IDC_STATIC,95,105,35,8
|
|
||||||
EDITTEXT IDC_CIA,95,120,35,14,ES_AUTOHSCROLL
|
|
||||||
CONTROL "Spin1",IDC_CIA_SPIN,"msctls_updown32",UDS_SETBUDDYINT |
|
|
||||||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,120,120,
|
|
||||||
11,14
|
|
||||||
LTEXT "Floppy",IDC_STATIC,135,105,40,8
|
|
||||||
EDITTEXT IDC_FLOPPY,135,120,35,14,ES_AUTOHSCROLL
|
|
||||||
CONTROL "Spin1",IDC_FLOPPY_SPIN,"msctls_updown32",
|
|
||||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
|
||||||
UDS_ARROWKEYS,161,120,11,14
|
|
||||||
LTEXT "Draw Every",IDC_STATIC,175,105,45,8
|
|
||||||
EDITTEXT IDC_DRAWEVERY,175,120,35,14,ES_AUTOHSCROLL
|
|
||||||
CONTROL "Spin1",IDC_DRAWEVERY_SPIN,"msctls_updown32",
|
|
||||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
|
||||||
UDS_ARROWKEYS,201,120,11,14
|
|
||||||
LTEXT "REU Size",IDC_STATIC,220,105,40,8
|
|
||||||
COMBOBOX IDC_REUSIZE,220,120,35,95,CBS_DROPDOWNLIST | WS_VSCROLL |
|
|
||||||
WS_TABSTOP
|
|
||||||
GROUPBOX "&Options",IDC_STATIC,5,145,260,70
|
|
||||||
CONTROL "Limit Speed",IDC_LIMITSPEED,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,155,80,10
|
|
||||||
CONTROL "Sprites",IDC_SPRITES,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,101,155,80,10
|
|
||||||
CONTROL "Sprite Collisions",IDC_SPRITECOLLISIONS,"Button",
|
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,185,155,75,10
|
|
||||||
CONTROL "Joystick 1",IDC_JOYSTICK1,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,170,80,10
|
|
||||||
CONTROL "Joystick 2",IDC_JOYSTICK2,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,101,170,80,10
|
|
||||||
CONTROL "Swap Joysticks",IDC_SWAPJOYSTICKS,"Button",
|
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,185,170,75,10
|
|
||||||
CONTROL "Fast Reset",IDC_FASTRESET,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,185,80,10
|
|
||||||
CONTROL "CIA IRQ Hack",IDC_CIAIRQHACK,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,101,185,80,10
|
|
||||||
CONTROL "Map /",IDC_MAPSLASH,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,185,185,75,10
|
|
||||||
CONTROL "SID Emulation",IDC_SIDEMULATION,"Button",
|
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,15,200,80,10
|
|
||||||
CONTROL "SID Filters",IDC_SIDFILTERS,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,100,200,80,10
|
|
||||||
CONTROL "1541 Emulation",IDC_1541EMULATION,"Button",
|
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,185,200,75,10
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_PREFERENCES_WIN32 DIALOG DISCARDABLE 0, 0, 272, 221
|
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
|
||||||
CAPTION "WIN32"
|
|
||||||
FONT 8, "MS Sans Serif"
|
|
||||||
BEGIN
|
|
||||||
GROUPBOX "&Video",IDC_STATIC,5,0,260,60
|
|
||||||
CONTROL "Fullscreen at startup",IDC_FULLSCREEN,"Button",
|
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,15,15,85,10
|
|
||||||
CONTROL "System Memory",IDC_SYSTEMMEMORY,"Button",
|
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,15,30,85,10
|
|
||||||
CONTROL "Always Copy",IDC_ALWAYSCOPY,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,45,85,10
|
|
||||||
LTEXT "View&port",IDC_STATIC,110,20,70,8
|
|
||||||
COMBOBOX IDC_VIEWPORT,110,31,70,184,CBS_DROPDOWN |
|
|
||||||
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
|
|
||||||
LTEXT "Display &Mode",IDC_STATIC,185,20,70,8
|
|
||||||
COMBOBOX IDC_DISPLAYMODE,185,31,70,184,CBS_DROPDOWN |
|
|
||||||
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
|
|
||||||
GROUPBOX "&Window",IDC_STATIC,5,65,260,50
|
|
||||||
CONTROL "Hide Cursor",IDC_HIDECURSOR,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,80,85,10
|
|
||||||
CONTROL "System Keys",IDC_SYSTEMKEYS,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,95,85,10
|
|
||||||
RTEXT "Scaling &Numerator",IDC_STATIC,110,75,95,10
|
|
||||||
EDITTEXT IDC_SCALINGNUMERATOR,215,75,40,14,ES_AUTOHSCROLL
|
|
||||||
CONTROL "Spin1",IDC_SCALINGNUMERATOR_SPIN,"msctls_updown32",
|
|
||||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
|
||||||
UDS_ARROWKEYS,245,75,11,14
|
|
||||||
RTEXT "Scaling &Denominator",IDC_STATIC,110,95,95,10
|
|
||||||
EDITTEXT IDC_SCALINGDENOMINATOR,215,95,40,14,ES_AUTOHSCROLL
|
|
||||||
CONTROL "Spin1",IDC_SCALINGDENOMINATOR_SPIN,"msctls_updown32",
|
|
||||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
|
||||||
UDS_ARROWKEYS,245,95,11,14
|
|
||||||
GROUPBOX "&Sound",IDC_STATIC,5,120,260,45
|
|
||||||
CONTROL "DirectSound",IDC_DIRECTSOUND,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,135,85,10
|
|
||||||
CONTROL "Exclusive",IDC_EXCLUSIVESOUND,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,150,85,10
|
|
||||||
LTEXT "Latency Min",IDC_STATIC,105,130,50,8
|
|
||||||
EDITTEXT IDC_LATENCYMIN,105,140,40,14,ES_AUTOHSCROLL
|
|
||||||
CONTROL "Spin1",IDC_LATENCYMIN_SPIN,"msctls_updown32",
|
|
||||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
|
||||||
UDS_ARROWKEYS,135,140,11,14
|
|
||||||
LTEXT "Latency Max",IDC_STATIC,160,130,50,8
|
|
||||||
EDITTEXT IDC_LATENCYMAX,160,140,40,14,ES_AUTOHSCROLL
|
|
||||||
CONTROL "Spin1",IDC_LATENCYMAX_SPIN,"msctls_updown32",
|
|
||||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
|
||||||
UDS_ARROWKEYS,190,140,11,14
|
|
||||||
LTEXT "Latency Avg",IDC_STATIC,215,130,45,8
|
|
||||||
EDITTEXT IDC_LATENCYAVG,215,140,40,14,ES_AUTOHSCROLL
|
|
||||||
CONTROL "Spin1",IDC_LATENCYAVG_SPIN,"msctls_updown32",
|
|
||||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
|
||||||
UDS_ARROWKEYS,245,140,11,14
|
|
||||||
GROUPBOX "&General",IDC_STATIC,5,170,260,45
|
|
||||||
CONTROL "Auto Pause",IDC_AUTOPAUSE,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,15,185,85,10
|
|
||||||
CONTROL "Show LEDs",IDC_SHOWLEDS,"Button",BS_AUTOCHECKBOX |
|
|
||||||
WS_TABSTOP,105,185,85,10
|
|
||||||
CONTROL "Preferences at startup",IDC_PREFSATSTARTUP,"Button",
|
|
||||||
BS_AUTOCHECKBOX | WS_TABSTOP,15,200,85,10
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// DESIGNINFO
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
GUIDELINES DESIGNINFO DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
IDD_PREFERENCES_STANDARD, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 265
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 214
|
|
||||||
END
|
|
||||||
|
|
||||||
IDD_PREFERENCES_WIN32, DIALOG
|
|
||||||
BEGIN
|
|
||||||
LEFTMARGIN, 7
|
|
||||||
RIGHTMARGIN, 265
|
|
||||||
TOPMARGIN, 7
|
|
||||||
BOTTOMMARGIN, 214
|
|
||||||
END
|
|
||||||
END
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Cursor
|
|
||||||
//
|
|
||||||
|
|
||||||
IDC_INVISIBLE CURSOR DISCARDABLE "Invisible.cur"
|
|
||||||
#endif // English (U.S.) resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 3 resource.
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#endif // not APSTUDIO_INVOKED
|
|
||||||
|
|
@ -1260,5 +1260,6 @@ bool Network::networking_started = false;
|
|||||||
#if defined(GEKKO)
|
#if defined(GEKKO)
|
||||||
#include "NetworkWii.h"
|
#include "NetworkWii.h"
|
||||||
#else
|
#else
|
||||||
|
/* BSD-style sockets */
|
||||||
#include "NetworkUnix.h"
|
#include "NetworkUnix.h"
|
||||||
#endif
|
#endif
|
||||||
|
533
Src/ROlib.h
533
Src/ROlib.h
@ -1,533 +0,0 @@
|
|||||||
/*
|
|
||||||
* ROlib.h - Defines Classes, variables and OS interface calls for Acorn
|
|
||||||
* RISC OS computers
|
|
||||||
*
|
|
||||||
* (C) 1997 Andreas Dehmel
|
|
||||||
*
|
|
||||||
* Frodo (C) 1994-1997,2002-2005 Christian Bauer
|
|
||||||
*
|
|
||||||
* 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; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* 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 for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RO_CUSTOM_LIB
|
|
||||||
#define RO_CUSTOM_LIB
|
|
||||||
|
|
||||||
#include <kernel.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define TASKNAME "Frodo"
|
|
||||||
#define TASK_WORD 0x4b534154
|
|
||||||
|
|
||||||
/* Scrap-file for 1541fs directory function */
|
|
||||||
#define RO_TEMPFILE "<Wimp$ScrapDir>.FrodoDIR"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Icon Flags */
|
|
||||||
#define IFlg_Text 1
|
|
||||||
#define IFlg_Sprite 2
|
|
||||||
#define IFlg_Border 4
|
|
||||||
#define IFlg_HCenter 8
|
|
||||||
#define IFlg_VCenter 16
|
|
||||||
#define IFlg_Filled 32
|
|
||||||
#define IFlg_AntiA 64
|
|
||||||
#define IFlg_AutoRdrw 128
|
|
||||||
#define IFlg_Indir 256
|
|
||||||
#define IFlg_RAdjust 512
|
|
||||||
#define IFlg_Slct (1<<21)
|
|
||||||
#define IFlg_Grey (1<<22)
|
|
||||||
|
|
||||||
/* Menu Flags */
|
|
||||||
#define MFlg_Tick 1
|
|
||||||
#define MFlg_Dotted 2
|
|
||||||
#define MFlg_Writable 4
|
|
||||||
#define MFlg_Warning 8
|
|
||||||
#define MFlg_LastItem 128
|
|
||||||
|
|
||||||
/* Joystick stuff */
|
|
||||||
#define JoyDir_Thresh 32
|
|
||||||
#define JoyButton1 (1<<16)
|
|
||||||
#define JoyButton2 (1<<17)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Size of WIMP data types */
|
|
||||||
#define RO_WINDOW_WORDS 23
|
|
||||||
#define RO_WINDOW_BYTES 92
|
|
||||||
#define RO_ICON_WORDS 8
|
|
||||||
#define RO_ICON_BYTES 32
|
|
||||||
#define RO_MHEAD_WORDS 7
|
|
||||||
#define RO_MHEAD_BYTES 28
|
|
||||||
#define RO_MITEM_WORDS 6
|
|
||||||
#define RO_MITEM_BYTES 24
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Structures for directory scanning (mainly 1541fs) */
|
|
||||||
/* May hold entire pathname, so DON'T REDUCE!!! */
|
|
||||||
#define FILENAME_MAX_CHARS 256 /* must be >= NAMEBUF_LENGTH (256) */
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned int load, exec, length, attrib, otype;
|
|
||||||
char name[FILENAME_MAX_CHARS];
|
|
||||||
} dir_full_info;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int readno, offset, buffsize;
|
|
||||||
char *match;
|
|
||||||
} dir_env;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* WIMP structures: */
|
|
||||||
typedef struct {
|
|
||||||
int *tit, *val;
|
|
||||||
int len;
|
|
||||||
} WIdatI;
|
|
||||||
|
|
||||||
/* data type for window / icon data */
|
|
||||||
typedef union {
|
|
||||||
char strg[12];
|
|
||||||
WIdatI ind;
|
|
||||||
} WIdata;
|
|
||||||
|
|
||||||
|
|
||||||
/* Window descriptor - 23 words = 92 bytes */
|
|
||||||
typedef struct {
|
|
||||||
int Handle;
|
|
||||||
int vminx,vminy,vmaxx,vmaxy;
|
|
||||||
int scrollx,scrolly;
|
|
||||||
int stackpos;
|
|
||||||
unsigned int wflags;
|
|
||||||
char col_tfg, col_tbg, col_wfg, col_wbg; /* title/work_area fore/background colour */
|
|
||||||
char col_sbo, col_sbi, col_tsl, reserved;/* scroll bar inner/outer, title if input focus */
|
|
||||||
int wminx, wminy, wmaxx, wmaxy;
|
|
||||||
unsigned int tflags, waflags;
|
|
||||||
int SpriteAreaPtr;
|
|
||||||
short min_width, min_height;
|
|
||||||
WIdata dat;
|
|
||||||
int icon_no;
|
|
||||||
} RO_Window;
|
|
||||||
|
|
||||||
|
|
||||||
/* Icon descriptor */
|
|
||||||
typedef struct {
|
|
||||||
int minx, miny, maxx, maxy;
|
|
||||||
int iflags;
|
|
||||||
WIdata dat;
|
|
||||||
} RO_Icon;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int WindowHandle;
|
|
||||||
int minx, miny, maxx, maxy;
|
|
||||||
int iflags;
|
|
||||||
WIdata dat;
|
|
||||||
} RO_IconDesc;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
char title[12];
|
|
||||||
char col_tfg, col_tbg, col_wfg, col_wbg;
|
|
||||||
int width, height, vgap;
|
|
||||||
} RO_MenuHead;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned int mflags;
|
|
||||||
RO_MenuHead *submenu;
|
|
||||||
unsigned int iflags;
|
|
||||||
WIdata dat;
|
|
||||||
} RO_MenuItem;
|
|
||||||
|
|
||||||
|
|
||||||
/* Caret descriptor */
|
|
||||||
typedef struct {
|
|
||||||
int WHandle;
|
|
||||||
int IHandle;
|
|
||||||
int offx, offy;
|
|
||||||
int height, index;
|
|
||||||
} RO_Caret;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Joystick key descriptor */
|
|
||||||
typedef struct {
|
|
||||||
unsigned char up, down, left, right, fire;
|
|
||||||
} Joy_Keys;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Declare classes that are needed in the following new classes */
|
|
||||||
class C64Display;
|
|
||||||
class C64;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Very simple class to read the resolution and eigen values */
|
|
||||||
class RORes
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
RORes(void);
|
|
||||||
~RORes(void);
|
|
||||||
|
|
||||||
int resx,resy,eigx,eigy;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Handle current screenmode */
|
|
||||||
class ROScreen
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
_kernel_oserror ModeError;
|
|
||||||
|
|
||||||
public:
|
|
||||||
ROScreen(void);
|
|
||||||
~ROScreen(void);
|
|
||||||
int ReadMode(void);
|
|
||||||
|
|
||||||
int resx, resy, ldbpp, eigx, eigy, ladd;
|
|
||||||
char *scrbase;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class Icon
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
RO_IconDesc icon;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Icon(int IconHandle, const RO_IconDesc *IDesc);
|
|
||||||
~Icon(void);
|
|
||||||
void setstate(unsigned int eor, unsigned int clear);
|
|
||||||
void getstate(void);
|
|
||||||
|
|
||||||
int IHandle;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class Window
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
RO_Window *wind;
|
|
||||||
bool isopen;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Window(const int *WDesc, const char *Title);
|
|
||||||
~Window(void);
|
|
||||||
int MyHandle(void);
|
|
||||||
void GetWorkArea(int *Dest);
|
|
||||||
void RedrawAWindow(int *Block, uint8 *Bitmap, C64Display *Disp);
|
|
||||||
RO_Window *Descriptor(void);
|
|
||||||
RO_Icon *GetIcon(unsigned int number);
|
|
||||||
void SetIconState(unsigned int number, unsigned int eor, unsigned int clear);
|
|
||||||
void GetIconState(unsigned int number, int *Block);
|
|
||||||
void WriteIconText(unsigned int number, const char *text);
|
|
||||||
void WriteIconTextU(unsigned int number, const char *text); // update instead of force redrw
|
|
||||||
void WriteIconNumber(unsigned int number, int value);
|
|
||||||
void WriteIconNumberU(unsigned int number, int value);
|
|
||||||
char *ReadIconText(unsigned int number);
|
|
||||||
int ReadIconNumber(unsigned int number);
|
|
||||||
void ForceIconRedraw(unsigned int number);
|
|
||||||
void UpdateIcon(unsigned int number);
|
|
||||||
void WriteTitle(const char *title);
|
|
||||||
char *ReadTitle(void);
|
|
||||||
void UpdateTitle(void);
|
|
||||||
bool HaveInput(void);
|
|
||||||
bool OpenStatus(void);
|
|
||||||
bool OpenStatus(int *Block);
|
|
||||||
void open(void);
|
|
||||||
void open(int *Block);
|
|
||||||
void close(void);
|
|
||||||
void forceredraw(int minx, int miny, int maxx, int maxy);
|
|
||||||
void update(uint8 *Bitmap, C64Display *Disp);
|
|
||||||
void update(int *Block, uint8 *Bitmap, C64Display *Disp);
|
|
||||||
void redraw(int *Block, uint8 *Bitmap, C64Display *Disp);
|
|
||||||
void extent(int minx, int miny, int maxx, int maxy);
|
|
||||||
void getstate(void);
|
|
||||||
void getstate(int *dest); // read window definition to external block
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class WIMP
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
_kernel_oserror WimpError;
|
|
||||||
int Block[64], AuxBlock[64]; // two WIMP blocks for convenience
|
|
||||||
int Mask;
|
|
||||||
int DragType, CMOS_DragType;
|
|
||||||
bool UseScrap; // Scrap file used (data transfer protocol!)
|
|
||||||
bool EmuPaused;
|
|
||||||
int UseNULL; // Number of clients that need NULL events
|
|
||||||
int RAMsize, RAMtransfered, RAMpartner; // for RAM transfer
|
|
||||||
int LastMenu, LastClick, LastDrag, MenuType, LastIcon, SaveType;
|
|
||||||
int *SpriteArea;
|
|
||||||
RO_Caret LastCaret;
|
|
||||||
int EmuZoom;
|
|
||||||
Joy_Keys NewJoyKeys[2];
|
|
||||||
C64 *the_c64;
|
|
||||||
|
|
||||||
public:
|
|
||||||
WIMP(C64 *my_c64);
|
|
||||||
~WIMP(void);
|
|
||||||
|
|
||||||
// On startup
|
|
||||||
bool LoadATemplate(char *Name, Window **Which);
|
|
||||||
|
|
||||||
// To make window and pane work as a team
|
|
||||||
void OpenEmuWindow(void);
|
|
||||||
void OpenEmuWindow(int *Block); // open at pos
|
|
||||||
void CloseEmuWindow(void);
|
|
||||||
void UpdateEmuWindow(void); // update window and pane
|
|
||||||
void ThePrefsToWindow(void); // write ThePrefs into the window
|
|
||||||
void WindowToThePrefs(void); // update ThePrefs from window
|
|
||||||
void SysConfToWindow(void);
|
|
||||||
void WindowToSysConf(void);
|
|
||||||
void PollSysConfWindow(void); // low-level koyboard scan
|
|
||||||
void DragIconSprite(Window *host, unsigned int number);
|
|
||||||
int CalculateVolume(int *Block);
|
|
||||||
int CheckFilename(char *name);
|
|
||||||
void SnapshotSaved(bool OK);
|
|
||||||
void IssueSnapshotRequest(void);
|
|
||||||
void SetLEDIcons(bool FloppyEmulation);
|
|
||||||
void SetEmuWindowSize(void);
|
|
||||||
void ToggleEmuWindowSize(void);
|
|
||||||
int ReadEmuWindowSize(void);
|
|
||||||
void NewDriveImage(int DrNum, int *MsgBlock, bool SetNow);
|
|
||||||
void SetSpeedLimiter(bool LimitSpeed);
|
|
||||||
|
|
||||||
// Standard WIMP functions
|
|
||||||
void Poll(bool Paused);
|
|
||||||
void Redraw(void);
|
|
||||||
void OpenWindow(void);
|
|
||||||
void CloseWindow(void);
|
|
||||||
void MouseClick(void);
|
|
||||||
void UserDrag(void);
|
|
||||||
void KeyPressed(void);
|
|
||||||
void MenuSelection(void);
|
|
||||||
void UserMessage(void);
|
|
||||||
void UserMessageAck(void);
|
|
||||||
|
|
||||||
// WIMP's Windows and Icons
|
|
||||||
Icon *IBicon;
|
|
||||||
Window *EmuWindow, *EmuPane, *PrefsWindow, *ConfigWindow, *InfoWindow, *SoundWindow, *SaveBox;
|
|
||||||
char SnapFile[256], RAMFile[256];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* system-specific Variables */
|
|
||||||
|
|
||||||
extern RO_IconDesc IBarIcon;
|
|
||||||
extern unsigned int TaskHandle;
|
|
||||||
extern int WimpMessages[];
|
|
||||||
|
|
||||||
|
|
||||||
/* Functions available via ROlib (not RISC OS Lib, mind you)
|
|
||||||
All SWIs are called in the X-Form! */
|
|
||||||
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
|
|
||||||
/* WIMP FUNCTIONS */
|
|
||||||
|
|
||||||
/* returns handle or 0 if error */
|
|
||||||
extern int Wimp_Initialise(int Version, int tw, const char *TaskName, const int *Messages);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_CloseDown(int Handle, int tw);
|
|
||||||
|
|
||||||
/* returns handle or 0 if error */
|
|
||||||
extern int Wimp_CreateWindow(const int *Window);
|
|
||||||
|
|
||||||
extern int Wimp_CreateIcon(int Priority, const RO_IconDesc *Icon);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_DeleteWindow(const int *Window);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_DeleteIcon(int *Block);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_OpenWindow(const int *Window);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_CloseWindow(const int *Window);
|
|
||||||
|
|
||||||
extern int Wimp_Poll(unsigned int Mask, int *Block, int *PollWord);
|
|
||||||
|
|
||||||
/* returns 0 if no more to do or error */
|
|
||||||
extern int Wimp_RedrawWindow(int *Block);
|
|
||||||
|
|
||||||
extern int Wimp_UpdateWindow(int *Block);
|
|
||||||
|
|
||||||
extern int Wimp_GetRectangle(int *Block);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_GetWindowState(int *Block);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_GetWindowInfo(int *Block);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_SetIconState(int *Block);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_GetIconState(int *Block);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_GetPointerInfo(int *Block);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_DragBox(int *Block);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_ForceRedraw(int Handle, int minx, int miny, int maxx, int maxy);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_SetCaretPosition(int WHandle, int IHandle, int xoff, int yoff, int height, int index);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_GetCaretPosition(RO_Caret *Caret);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_CreateMenu(const int *Menu, int cx, int cy);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_SetExtent(int Handle, int *Block);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_OpenTemplate(char *Name);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_CloseTemplate(void);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_LoadTemplate(char **Template, char **Indirect, char *IndirLimit, char *Fonts, char *Name, int *Position);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_ProcessKey(int Key);
|
|
||||||
|
|
||||||
extern int Wimp_StartTask(char *command);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_ReportError(const _kernel_oserror *Error, unsigned int Flags, const char *AppName);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_GetWindowOutline(int *Block);
|
|
||||||
|
|
||||||
extern int Wimp_PollIdle(unsigned int Mask, int *Block, int MinTime, int *PollWord);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_PlotIcon(int *Block);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_SendMessage(int Event, int *Block, int THandle, int IHandle);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_CreateSubMenu(int *MenuBlock, int cx, int xy);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_SpriteOp(int, int, int, int, int, int, int, int);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_BaseOfSprites(int *ROM, int *RAM);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_CommandWindow(int Action);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_TransferBlock(int SHandle, char *SBuff, int DHandle, char *DBuff, int BuffSize);
|
|
||||||
|
|
||||||
extern _kernel_oserror *Wimp_SpriteInfo(char *name, int *width, int *height, int *mode);
|
|
||||||
|
|
||||||
extern _kernel_oserror *DragASprite_Start(unsigned int Flags, int SpriteArea, char *SpriteName, int *Box, int *BBox);
|
|
||||||
|
|
||||||
extern _kernel_oserror *DragASprite_Stop(void);
|
|
||||||
|
|
||||||
extern _kernel_oserror *ColourTrans_SelectTable(int SMode, int SPal, int DMode, int DPal, char **Buffer, unsigned int Flags, int *TransWork, int *TransFunc);
|
|
||||||
|
|
||||||
extern _kernel_oserror *ColourTrans_SetFontColours(int Handle, int BPal, int FPal, int Offset);
|
|
||||||
|
|
||||||
extern _kernel_oserror *ColourTrans_SetColour(int GCOL, unsigned int Flags, int Action);
|
|
||||||
|
|
||||||
extern _kernel_oserror *ColourTrans_SetGCOL(int Palette, unsigned int Flags, int Action);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* OS FUNCTIONS */
|
|
||||||
|
|
||||||
extern int OS_ReadModeVariable(int mode, int var);
|
|
||||||
|
|
||||||
extern int OS_ReadDynamicArea(int area);
|
|
||||||
|
|
||||||
extern int ScanKeys(int keys);
|
|
||||||
|
|
||||||
extern int ReadKeyboardStatus(void);
|
|
||||||
|
|
||||||
extern int ReadDragType(void);
|
|
||||||
|
|
||||||
extern int SetMousePointer(int NewShape);
|
|
||||||
|
|
||||||
|
|
||||||
/* Generic sprite op call */
|
|
||||||
extern _kernel_oserror *OS_SpriteOp(int, int, int, int, int, int, int, int);
|
|
||||||
|
|
||||||
extern _kernel_oserror *OS_Plot(int Command, int x, int y);
|
|
||||||
|
|
||||||
extern _kernel_oserror *MouseBoundingBox(char Box[8]);
|
|
||||||
|
|
||||||
extern int OS_ReadMonotonicTime(void);
|
|
||||||
|
|
||||||
extern _kernel_oserror *OS_ReadC(char *Code);
|
|
||||||
|
|
||||||
/* returns length of characters read; if length negative ==> terminated by escape */
|
|
||||||
extern int OS_ReadLine(char *Buffer, int BuffSize, int minasc, int maxasc, int Echo);
|
|
||||||
|
|
||||||
/* true ==> escape */
|
|
||||||
extern bool OS_ReadEscapeState(void);
|
|
||||||
|
|
||||||
/* File related calls */
|
|
||||||
|
|
||||||
/* Returns object type */
|
|
||||||
extern int ReadCatalogueInfo(char *Name, int Result[4]);
|
|
||||||
|
|
||||||
/* Read the next name in the directory */
|
|
||||||
extern _kernel_oserror *ReadDirName(const char *dirname, char *buffer, dir_env *env);
|
|
||||||
|
|
||||||
/* Read the next entry (name, length, type,...) in the directory */
|
|
||||||
extern _kernel_oserror *ReadDirNameInfo(const char *dirname,dir_full_info *buffer,dir_env *env);
|
|
||||||
|
|
||||||
extern _kernel_oserror *DeleteFile(char *name);
|
|
||||||
|
|
||||||
extern _kernel_oserror *OS_FlushBuffer(int BuffNum);
|
|
||||||
|
|
||||||
/* These functions are more secure than using sprintf because they allow buffersize */
|
|
||||||
/* Return value is a pointer to the terminating null */
|
|
||||||
extern char *ConvertInteger1(int value, char *buffer, int buffsize);
|
|
||||||
extern char *ConvertInteger2(int value, char *buffer, int buffsize);
|
|
||||||
extern char *ConvertInteger3(int value, char *buffer, int buffsize);
|
|
||||||
extern char *ConvertInteger4(int value, char *buffer, int buffsize);
|
|
||||||
|
|
||||||
|
|
||||||
/* Misc */
|
|
||||||
|
|
||||||
extern unsigned int ModeColourNumber(unsigned int pal_entry);
|
|
||||||
|
|
||||||
/* Returns -1 if error in joystick module, -2 if SWI unknown, joystate otherwise */
|
|
||||||
extern int Joystick_Read(int joyno);
|
|
||||||
|
|
||||||
|
|
||||||
/* Sound stuff */
|
|
||||||
|
|
||||||
#define DRState_Active 1
|
|
||||||
#define DRState_NeedData 2
|
|
||||||
#define DRState_Overflow 4
|
|
||||||
|
|
||||||
/* Sound calls */
|
|
||||||
|
|
||||||
extern int Sound_Volume(int volume);
|
|
||||||
|
|
||||||
/* Digital Renderer SWI calls */
|
|
||||||
extern _kernel_oserror *DigitalRenderer_Activate(int Channels, int Length, int SamPeriod);
|
|
||||||
|
|
||||||
extern _kernel_oserror *DigitalRenderer_Deactivate(void);
|
|
||||||
|
|
||||||
extern _kernel_oserror *DigitalRenderer_Pause(void);
|
|
||||||
|
|
||||||
extern _kernel_oserror *DigitalRenderer_Resume(void);
|
|
||||||
|
|
||||||
extern _kernel_oserror *DigitalRenderer_GetTables(uint8 **LinToLog, uint8 **LogScale);
|
|
||||||
|
|
||||||
extern int DigitalRenderer_ReadState(void);
|
|
||||||
|
|
||||||
extern _kernel_oserror *DigitalRenderer_NewSample(uint8 *Sample);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
1167
Src/ROlib.s
1167
Src/ROlib.s
File diff suppressed because it is too large
Load Diff
47
Src/SID.cpp
47
Src/SID.cpp
@ -32,16 +32,6 @@
|
|||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
#include "Network.h"
|
#include "Network.h"
|
||||||
|
|
||||||
#ifdef __mac__
|
|
||||||
#include <Sound.h>
|
|
||||||
#define M_PI 3.14159265358979323846
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
class DigitalPlayer;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_FIXPOINT_MATHS
|
#ifdef USE_FIXPOINT_MATHS
|
||||||
#include "FixPoint.h"
|
#include "FixPoint.h"
|
||||||
#endif
|
#endif
|
||||||
@ -373,35 +363,6 @@ private:
|
|||||||
int devfd, sndbufsize, buffer_rate;
|
int devfd, sndbufsize, buffer_rate;
|
||||||
int16 *sound_buffer;
|
int16 *sound_buffer;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __mac__
|
|
||||||
SndChannelPtr chan1;
|
|
||||||
SndDoubleBufferHeader myDblHeader;
|
|
||||||
SndDoubleBufferPtr sampleBuffer1, sampleBuffer2;
|
|
||||||
SCStatus myStatus;
|
|
||||||
short sndbufsize;
|
|
||||||
OSErr err;
|
|
||||||
|
|
||||||
static void doubleBackProc(SndChannelPtr chan, SndDoubleBufferPtr doubleBuffer);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
public:
|
|
||||||
void VBlank(void);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void StartPlayer(void);
|
|
||||||
void StopPlayer(void);
|
|
||||||
|
|
||||||
BOOL direct_sound;
|
|
||||||
DigitalPlayer *ThePlayer;
|
|
||||||
SWORD *sound_buffer;
|
|
||||||
int to_output;
|
|
||||||
int sb_pos;
|
|
||||||
int divisor;
|
|
||||||
int *lead;
|
|
||||||
int lead_pos;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Static data members
|
// Static data members
|
||||||
@ -1301,15 +1262,7 @@ void MOS6581::open_close_renderer(int old_type, int new_type)
|
|||||||
|
|
||||||
// Create new renderer
|
// Create new renderer
|
||||||
if (new_type == SIDTYPE_DIGITAL)
|
if (new_type == SIDTYPE_DIGITAL)
|
||||||
#if defined(__BEOS__) || defined(__riscos__)
|
|
||||||
the_renderer = new DigitalRenderer(the_c64);
|
|
||||||
#else
|
|
||||||
the_renderer = new DigitalRenderer;
|
the_renderer = new DigitalRenderer;
|
||||||
#endif
|
|
||||||
#ifdef AMIGA
|
|
||||||
else if (new_type == SIDTYPE_SIDCARD)
|
|
||||||
the_renderer = new SIDCardRenderer;
|
|
||||||
#endif
|
|
||||||
else
|
else
|
||||||
the_renderer = NULL;
|
the_renderer = NULL;
|
||||||
|
|
||||||
|
@ -1,92 +0,0 @@
|
|||||||
//{{NO_DEPENDENCIES}}
|
|
||||||
// Microsoft Developer Studio generated include file.
|
|
||||||
// Used by Frodo.rc
|
|
||||||
//
|
|
||||||
#define FRODO_ICON 101
|
|
||||||
#define IDR_MAIN_MENU 101
|
|
||||||
#define IDD_PREFERENCES_STANDARD 102
|
|
||||||
#define IDD_PREFERENCES_WIN32 103
|
|
||||||
#define IDC_INVISIBLE 106
|
|
||||||
#define IDC_NORMAL 1000
|
|
||||||
#define IDC_SPRITES 1001
|
|
||||||
#define IDC_SPRITECOLLISIONS 1002
|
|
||||||
#define IDC_JOYSTICK1 1003
|
|
||||||
#define IDC_JOYSTICK2 1004
|
|
||||||
#define IDC_LIMITSPEED 1005
|
|
||||||
#define IDC_SWAPJOYSTICKS 1006
|
|
||||||
#define IDC_FASTRESET 1007
|
|
||||||
#define IDC_CIAIRQHACK 1008
|
|
||||||
#define IDC_1541EMULATION 1009
|
|
||||||
#define IDC_MAPSLASH 1010
|
|
||||||
#define IDC_SIDEMULATION 1011
|
|
||||||
#define IDC_SIDFILTERS 1012
|
|
||||||
#define IDC_BADLINES 1013
|
|
||||||
#define IDC_NORMAL_SPIN 1014
|
|
||||||
#define IDC_BADLINES_SPIN 1015
|
|
||||||
#define IDC_CIA 1016
|
|
||||||
#define IDC_CIA_SPIN 1017
|
|
||||||
#define IDC_FLOPPY 1018
|
|
||||||
#define IDC_FLOPPY_SPIN 1019
|
|
||||||
#define IDC_DRAWEVERY 1020
|
|
||||||
#define IDC_DRAWEVERY_SPIN 1021
|
|
||||||
#define IDC_DEVICE8 1022
|
|
||||||
#define IDC_DEVICE9 1023
|
|
||||||
#define IDC_BROWSE8 1024
|
|
||||||
#define IDC_BROWSE9 1025
|
|
||||||
#define IDC_DEVICE10 1026
|
|
||||||
#define IDC_BROWSE10 1027
|
|
||||||
#define IDC_DEVICE11 1028
|
|
||||||
#define IDC_BROWSE11 1029
|
|
||||||
#define IDC_FULLSCREEN 1035
|
|
||||||
#define IDC_AUTOPAUSE 1036
|
|
||||||
#define IDC_SYSTEMMEMORY 1037
|
|
||||||
#define IDC_EXCLUSIVESOUND 1038
|
|
||||||
#define IDC_PREFSATSTARTUP 1039
|
|
||||||
#define IDC_VIEWPORT 1040
|
|
||||||
#define IDC_DISPLAYMODE 1041
|
|
||||||
#define IDC_ALWAYSCOPY 1042
|
|
||||||
#define IDC_HIDECURSOR 1043
|
|
||||||
#define IDC_SYSTEMKEYS 1044
|
|
||||||
#define IDC_LATENCYMIN 1045
|
|
||||||
#define IDC_LATENCYMAX 1046
|
|
||||||
#define IDC_LATENCYAVG 1047
|
|
||||||
#define IDC_SCALINGNUMERATOR 1048
|
|
||||||
#define IDC_LATENCYMIN_SPIN 1049
|
|
||||||
#define IDC_LATENCYAVG_SPIN 1050
|
|
||||||
#define IDC_REUSIZE 1050
|
|
||||||
#define IDC_LATENCYMAX_SPIN 1051
|
|
||||||
#define IDC_SCALINGDENOMINATOR 1052
|
|
||||||
#define IDC_SCALINGNUMERATOR_SPIN 1053
|
|
||||||
#define IDC_SCALINGDENOMINATOR_SPIN 1054
|
|
||||||
#define IDC_DIRECTSOUND 1055
|
|
||||||
#define IDC_SHOWLEDS 1056
|
|
||||||
#define ID_FILE_EX 40001
|
|
||||||
#define ID_TOOLS_RESETC64 40002
|
|
||||||
#define ID_TOOLS_SAM 40003
|
|
||||||
#define ID_TOOLS_INSERTNEXTDISK 40004
|
|
||||||
#define ID_TOOLS_PREFERENCES 40005
|
|
||||||
#define ID_HELP_ABOUT 40006
|
|
||||||
#define ID_FILE_NEW 40007
|
|
||||||
#define ID_FILE_OPEN 40009
|
|
||||||
#define ID_FILE_SAVE 40011
|
|
||||||
#define ID_FILE_SAVEAS 40012
|
|
||||||
#define ID_HELP_CONTENTS 40013
|
|
||||||
#define ID_HELP_KEYBOARD 40014
|
|
||||||
#define ID_TOOLS_PAUSE 40015
|
|
||||||
#define ID_HELP_SETTINGS 40016
|
|
||||||
#define ID_TOOLS_FULLSCREEN 40017
|
|
||||||
#define ID_TOOLS_RESETDIRECTDRAW 40018
|
|
||||||
#define IDC_STATIC -1
|
|
||||||
|
|
||||||
// Next default values for new objects
|
|
||||||
//
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
#define _APS_NO_MFC 1
|
|
||||||
#define _APS_3D_CONTROLS 1
|
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40019
|
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1051
|
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
|
||||||
#endif
|
|
||||||
#endif
|
|
@ -117,53 +117,10 @@ using std::vector;
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#if EEXIST == ENOTEMPTY
|
|
||||||
#define BROKEN_OS_PROBABLY_AIX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __NeXT__
|
|
||||||
#define S_IRUSR S_IREAD
|
|
||||||
#define S_IWUSR S_IWRITE
|
|
||||||
#define S_IXUSR S_IEXEC
|
|
||||||
#define S_ISDIR(val) (S_IFDIR & val)
|
|
||||||
struct utimbuf
|
|
||||||
{
|
|
||||||
time_t actime;
|
|
||||||
time_t modtime;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __DOS__
|
|
||||||
#include <pc.h>
|
|
||||||
#include <io.h>
|
|
||||||
#else
|
|
||||||
#undef O_BINARY
|
#undef O_BINARY
|
||||||
#define O_BINARY 0
|
#define O_BINARY 0
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __mac__
|
|
||||||
#define bool Boolean
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __riscos
|
|
||||||
#define bool int
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <windows.h>
|
|
||||||
#include <direct.h>
|
|
||||||
#if !defined(M_PI)
|
|
||||||
#define M_PI 3.14159265358979323846
|
|
||||||
#endif
|
|
||||||
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
|
||||||
#if _MSC_VER < 1100
|
|
||||||
#define bool char
|
|
||||||
#endif
|
|
||||||
#define LITTLE_ENDIAN_UNALIGNED 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If char has more then 8 bits, good night. */
|
/* If char has more then 8 bits, good night. */
|
||||||
#ifndef __BEOS__
|
|
||||||
typedef unsigned char uint8;
|
typedef unsigned char uint8;
|
||||||
typedef signed char int8;
|
typedef signed char int8;
|
||||||
|
|
||||||
@ -206,7 +163,3 @@ typedef int64 intptr;
|
|||||||
#else
|
#else
|
||||||
#error Unsupported size of pointer
|
#error Unsupported size of pointer
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
|
||||||
#include <support/SupportDefs.h>
|
|
||||||
#endif // __BEOS__
|
|
||||||
|
Loading…
Reference in New Issue
Block a user