Debian Codegraph @

src/pt2_header.h

raw symbols SCIP
1 #cxx . . $ `<file>/src/pt2_header.h`/pragma once
2
3 #include <SDL2/SDL.h>
4 #include <stdint.h>
5 #include <stdbool.h>
6 #ifdef _DEBUG
7 #include <assert.h>
8 #endif
9 #ifdef _WIN32
10 #define WIN32_MEAN_AND_LEAN
11 #include <windows.h> // MAX_PATH
12 #else
13 #include <limits.h> // PATH_MAX
14 #endif
15 #include <stdint.h>
16 #include "pt2_unicode.h"cxx . . $ `<file>/src/pt2_unicode.h`/
17 #include "pt2_palette.h"cxx . . $ `<file>/src/pt2_palette.h`/
18
19 #define PROG_VER_STRcxx . . $ `src/pt2_header.h:19:9`! "1.90"
20
21 #ifndef ASSERT
22 #ifdef _DEBUG
23 #define ASSERT(x) assert(x)
24 #else
25 #define ASSERTcxx . . $ `src/pt2_header.h:25:9`!(x)
26 #endif
27 #endif
28
29 #ifdef _WIN32
30 #define DIR_DELIMITER '\\'
31 #define PATH_MAX MAX_PATH
32 #else
33 #define DIR_DELIMITERcxx . . $ `src/pt2_header.h:33:9`! '/'
34 #define _stricmpcxx . . $ `src/pt2_header.h:34:9`! strcasecmp
35 #define _strnicmpcxx . . $ `src/pt2_header.h:35:9`! strncasecmp
36 #endif
37
38 #define SAMPLE_VIEW_HEIGHTcxx . . $ `src/pt2_header.h:38:9`! 64
39 #define SAMPLE_AREA_WIDTHcxx . . $ `src/pt2_header.h:39:9`! 314
40
41 #define SCREEN_Wcxx . . $ `src/pt2_header.h:41:9`! 320
42 #define SCREEN_Hcxx . . $ `src/pt2_header.h:42:9`! 255
43
44 #define MIN_AUDIO_FREQUENCYcxx . . $ `src/pt2_header.h:44:9`! 44100
45 #define MAX_AUDIO_FREQUENCYcxx . . $ `src/pt2_header.h:45:9`! 192000
46
47 // main crystal oscillator for PAL Amiga systems
48 #define AMIGA_PAL_XTAL_HZcxx . . $ `src/pt2_header.h:48:9`! 28375160
49 #define AMIGA_PAL_CCK_HZcxx . . $ `src/pt2_header.h:49:9`! (AMIGA_PAL_XTAL_HZcxx . . $ `src/pt2_header.h:48:9`!/8.0)
50 #define CIA_PAL_CLKcxx . . $ `src/pt2_header.h:50:9`! (AMIGA_PAL_CCK_HZ / 5.0)
51
52 // nominal framerate in normal PAL videomodes (~49.92Hz)
53 #define AMIGA_PAL_VBLANK_HZcxx . . $ `src/pt2_header.h:53:9`! (AMIGA_PAL_CCK_HZcxx . . $ `src/pt2_header.h:49:9`! / (double)(313*227))
54
55 /* "60Hz" ranges everywhere from 59..61Hz depending on the monitor, so with
56 ** no vsync we will get stuttering because the rate is not perfect...
57 */
58 #define VBLANK_HZcxx . . $ `src/pt2_header.h:58:9`! 60
59
60 /* Scopes are clocked at 64Hz instead of 60Hz to prevent the small +/- Hz
61 ** interference from monitors not being exactly 60Hz (and unstable non-vsync mode).
62 ** Sadly, the scopes might mildly flicker from this in some cases.
63 */
64 #define SCOPE_HZcxx . . $ `src/pt2_header.h:64:9`! 64
65
66 #ifndef PI
67 #define PIcxx . . $ `src/pt2_header.h:67:9`! 3.14159265358979323846264338327950288
68 #endif
69
70 #define FONT_CHAR_Wcxx . . $ `src/pt2_header.h:70:9`! 8 // actual data length is 7, includes right spacing (1px column)
71 #define FONT_CHAR_Hcxx . . $ `src/pt2_header.h:71:9`! 5
72
73 #define MOD_ROWScxx . . $ `src/pt2_header.h:73:9`! 64
74 #define MOD_SAMPLEScxx . . $ `src/pt2_header.h:74:9`! 31
75 #define MAX_PATTERNScxx . . $ `src/pt2_header.h:75:9`! 100
76
77 #define SCOPE_WIDTHcxx . . $ `src/pt2_header.h:77:9`! 40
78 #define SCOPE_HEIGHTcxx . . $ `src/pt2_header.h:78:9`! 33
79 #define SPECTRUM_BAR_NUMcxx . . $ `src/pt2_header.h:79:9`! 23
80 #define SPECTRUM_BAR_HEIGHTcxx . . $ `src/pt2_header.h:80:9`! 36
81 #define SPECTRUM_BAR_WIDTHcxx . . $ `src/pt2_header.h:81:9`! 6
82
83 // Amount of video frames. 14 (PT on Amiga) -> 17 (converted from 49.92Hz to 60Hz)
84 #define KEYB_REPEAT_DELAYcxx . . $ `src/pt2_header.h:84:9`! 17
85
86 enumcxx . . $ $anonymous_type_972fe43056e06469_0#
87 {
88 FLAG_NOTEcxx . . $ FLAG_NOTE. = 1,
89 FLAG_SAMPLEcxx . . $ FLAG_SAMPLE. = 2,
90 FLAG_NEWSAMPLEcxx . . $ FLAG_NEWSAMPLE. = 4,
91
92 TEMPFLAG_STARTcxx . . $ TEMPFLAG_START. = 1,
93 TEMPFLAG_DELAYcxx . . $ TEMPFLAG_DELAY. = 2,
94
95 NO_CARRYcxx . . $ NO_CARRY. = 0,
96 DO_CARRYcxx . . $ DO_CARRY. = 1,
97
98 INCREMENT_SLOWcxx . . $ INCREMENT_SLOW. = 0,
99 INCREMENT_FASTcxx . . $ INCREMENT_FAST. = 1,
100
101 NO_SAMPLE_CUTcxx . . $ NO_SAMPLE_CUT. = 0,
102 SAMPLE_CUTcxx . . $ SAMPLE_CUT. = 1,
103
104 EDIT_SPECIALcxx . . $ EDIT_SPECIAL. = 0,
105 EDIT_NORMALcxx . . $ EDIT_NORMAL. = 1,
106
107 EDIT_TEXT_NO_UPDATEcxx . . $ EDIT_TEXT_NO_UPDATE. = 0,
108 EDIT_TEXT_UPDATEcxx . . $ EDIT_TEXT_UPDATE. = 1,
109
110 TRANSPOSE_ALLcxx . . $ TRANSPOSE_ALL. = 1,
111
112 MOUSE_BUTTON_NOT_HELDcxx . . $ MOUSE_BUTTON_NOT_HELD. = 0,
113 MOUSE_BUTTON_HELDcxx . . $ MOUSE_BUTTON_HELD. = 1,
114
115 DONT_SET_ORDERcxx . . $ DONT_SET_ORDER. = -1,
116 DONT_SET_PATTERNcxx . . $ DONT_SET_PATTERN. = -1,
117 DONT_SET_ROWcxx . . $ DONT_SET_ROW. = -1,
118
119 REMOVE_SAMPLE_MARKINGcxx . . $ REMOVE_SAMPLE_MARKING. = 0,
120 KEEP_SAMPLE_MARKINGcxx . . $ KEEP_SAMPLE_MARKING. = 1,
121
122 MOD_NOT_MODIFIEDcxx . . $ MOD_NOT_MODIFIED. = 0,
123 MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED. = 1,
124
125 DONT_CHECK_IF_FILE_EXISTcxx . . $ DONT_CHECK_IF_FILE_EXIST. = 0,
126 CHECK_IF_FILE_EXISTcxx . . $ CHECK_IF_FILE_EXIST. = 1,
127
128 DONT_GIVE_NEW_FILENAMEcxx . . $ DONT_GIVE_NEW_FILENAME. = 0,
129 GIVE_NEW_FILENAMEcxx . . $ GIVE_NEW_FILENAME. = 1,
130
131 DONT_DOWNSAMPLEcxx . . $ DONT_DOWNSAMPLE. = 0,
132 DO_DOWNSAMPLEcxx . . $ DO_DOWNSAMPLE. = 1,
133
134 SCREEN_ALLcxx . . $ SCREEN_ALL. = 0,
135 SCREEN_MAINSCREENcxx . . $ SCREEN_MAINSCREEN. = 1,
136 SCREEN_DISKOPcxx . . $ SCREEN_DISKOP. = 2,
137 SCREEN_SAMPLERcxx . . $ SCREEN_SAMPLER. = 4,
138 SCREEN_QUITcxx . . $ SCREEN_QUIT. = 8,
139 SCREEN_CLEARcxx . . $ SCREEN_CLEAR. = 16,
140
141 VISUAL_QUADRASCOPEcxx . . $ VISUAL_QUADRASCOPE. = 0,
142 VISUAL_SPECTRUMcxx . . $ VISUAL_SPECTRUM. = 1,
143
144 MODE_IDLEcxx . . $ MODE_IDLE. = 0,
145 MODE_EDITcxx . . $ MODE_EDIT. = 1,
146 MODE_PLAYcxx . . $ MODE_PLAY. = 2,
147 MODE_RECORDcxx . . $ MODE_RECORD. = 3,
148
149 RECORD_PATTcxx . . $ RECORD_PATT. = 0,
150 RECORD_SONGcxx . . $ RECORD_SONG. = 1,
151
152 CURSOR_NOTEcxx . . $ CURSOR_NOTE. = 0,
153 CURSOR_SAMPLE1cxx . . $ CURSOR_SAMPLE1. = 1,
154 CURSOR_SAMPLE2cxx . . $ CURSOR_SAMPLE2. = 2,
155 CURSOR_CMDcxx . . $ CURSOR_CMD. = 3,
156 CURSOR_PARAM1cxx . . $ CURSOR_PARAM1. = 4,
157 CURSOR_PARAM2cxx . . $ CURSOR_PARAM2. = 5,
158
159 PLAY_MODE_NORMALcxx . . $ PLAY_MODE_NORMAL. = 0,
160 PLAY_MODE_PATTERNcxx . . $ PLAY_MODE_PATTERN. = 1,
161
162 OCTAVE_HIGHcxx . . $ OCTAVE_HIGH. = 0,
163 OCTAVE_LOWcxx . . $ OCTAVE_LOW. = 1,
164
165 DISKOP_MODE_MODcxx . . $ DISKOP_MODE_MOD. = 0,
166 DISKOP_MODE_SMPcxx . . $ DISKOP_MODE_SMP. = 1,
167
168 DISKOP_SMP_WAVcxx . . $ DISKOP_SMP_WAV. = 0,
169 DISKOP_SMP_IFFcxx . . $ DISKOP_SMP_IFF. = 1,
170 DISKOP_SMP_RAWcxx . . $ DISKOP_SMP_RAW. = 2,
171
172 TEMPO_MODE_CIAcxx . . $ TEMPO_MODE_CIA. = 0,
173 TEMPO_MODE_VBLANKcxx . . $ TEMPO_MODE_VBLANK. = 1,
174
175 TEXT_EDIT_STRINGcxx . . $ TEXT_EDIT_STRING. = 0,
176 TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL. = 1,
177 TEXT_EDIT_HEXcxx . . $ TEXT_EDIT_HEX. = 2
178 };