|
|
1.1 ! root 1: /* ! 2: Hatari - main.h ! 3: ! 4: This file is distributed under the GNU Public License, version 2 or at ! 5: your option any later version. Read the file gpl.txt for details. ! 6: */ ! 7: ! 8: #ifndef HATARI_MAIN_H ! 9: #define HATARI_MAIN_H ! 10: ! 11: ! 12: /* Name and version for window title: */ ! 13: #define PROG_NAME "Previous 2.0" ! 14: ! 15: /* Messages for window title: */ ! 16: #ifdef _WIN32 ! 17: #define MOUSE_LOCK_MSG "Mouse is locked. Press right_ctrl-alt-m to release." ! 18: #elif __linux__ ! 19: #define MOUSE_LOCK_MSG "Mouse is locked. Press right_ctrl-alt-m to release." ! 20: #elif __APPLE__ ! 21: #define MOUSE_LOCK_MSG "Mouse is locked. Press ctrl-alt-m to release." ! 22: #else ! 23: #define MOUSE_LOCK_MSG "Mouse is locked. Press shortcut-m to release." ! 24: #endif ! 25: ! 26: #include "config.h" ! 27: ! 28: #include <stdio.h> ! 29: #include <stdlib.h> ! 30: #include <string.h> ! 31: #include <math.h> ! 32: #include <time.h> ! 33: ! 34: #include <SDL.h> ! 35: #include <stdbool.h> ! 36: ! 37: #if __GNUC__ >= 3 ! 38: # define likely(x) __builtin_expect (!!(x), 1) ! 39: # define unlikely(x) __builtin_expect (!!(x), 0) ! 40: #else ! 41: # define likely(x) (x) ! 42: # define unlikely(x) (x) ! 43: #endif ! 44: ! 45: #ifdef WIN32 ! 46: #define PATHSEP '\\' ! 47: #else ! 48: #define PATHSEP '/' ! 49: #endif ! 50: ! 51: #define CALL_VAR(func) { ((void(*)(void))func)(); } ! 52: ! 53: #define ARRAYSIZE(x) (int)(sizeof(x)/sizeof(x[0])) ! 54: ! 55: /* 68000 operand sizes */ ! 56: #define SIZE_BYTE 1 ! 57: #define SIZE_WORD 2 ! 58: #define SIZE_LONG 4 ! 59: ! 60: enum { ! 61: PAUSE_NONE, ! 62: PAUSE_EMULATION, ! 63: UNPAUSE_EMULATION, ! 64: }; ! 65: ! 66: /* Flag for pausing m68k thread (used by i860 debugger) */ ! 67: extern volatile int mainPauseEmulation; ! 68: ! 69: extern bool bQuitProgram; ! 70: ! 71: bool Main_PauseEmulation(bool visualize); ! 72: bool Main_UnPauseEmulation(void); ! 73: void Main_RequestQuit(void); ! 74: void Main_WarpMouse(int x, int y); ! 75: void Main_EventHandler(void); ! 76: void Main_EventHandlerInterrupt(void); ! 77: void Main_SetTitle(const char *title); ! 78: void Main_SpeedReset(void); ! 79: const char* Main_SpeedMsg(void); ! 80: ! 81: #endif /* ifndef HATARI_MAIN_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.