Debian Codegraph @

src/pt2_mouse.c

raw symbols SCIP
1 // for finding memory leaks in debug mode with Visual Studio cxx . . $ `<file>/src/pt2_mouse.c`/
2 #if defined _DEBUG && defined _MSC_VER
3 #include <crtdbg.h>
4 #endif
5
6 #include <ctype.h>
7 #include <math.h>
8 #include <stdint.h>
9 #include <stdbool.h>
10 #include <string.h>
11 #ifndef _WIN32
12 #include <unistd.h>
13 #endif
14 #include <stdio.h>
15 #include "pt2_helpers.h"cxx . . $ `<file>/src/pt2_helpers.h`/
16 #include "pt2_diskop.h"cxx . . $ `<file>/src/pt2_diskop.h`/
17 #include "pt2_sampler.h"cxx . . $ `<file>/src/pt2_sampler.h`/
18 #include "pt2_module_saver.h"cxx . . $ `<file>/src/pt2_module_saver.h`/
19 #include "pt2_edit.h"cxx . . $ `<file>/src/pt2_edit.h`/
20 #include "pt2_sample_saver.h"cxx . . $ `<file>/src/pt2_sample_saver.h`/
21 #include "pt2_visuals.h"cxx . . $ `<file>/src/pt2_visuals.h`/
22 #include "pt2_tables.h"cxx . . $ `<file>/src/pt2_tables.h`/
23 #include "pt2_audio.h"cxx . . $ `<file>/src/pt2_audio.h`/
24 #include "pt2_textout.h"cxx . . $ `<file>/src/pt2_textout.h`/
25 #include "pt2_keyboard.h"cxx . . $ `<file>/src/pt2_keyboard.h`/
26 #include "pt2_config.h"cxx . . $ `<file>/src/pt2_config.h`/
27 #include "pt2_bmp.h"cxx . . $ `<file>/src/pt2_bmp.h`/
28 #include "pt2_sampling.h"cxx . . $ `<file>/src/pt2_sampling.h`/
29 #include "pt2_chordmaker.h"cxx . . $ `<file>/src/pt2_chordmaker.h`/
30 #include "pt2_pat2smp.h"cxx . . $ `<file>/src/pt2_pat2smp.h`/
31 #include "pt2_mod2wav.h"cxx . . $ `<file>/src/pt2_mod2wav.h`/
32 #include "pt2_askbox.h"cxx . . $ `<file>/src/pt2_askbox.h`/
33 #include "pt2_replayer.h"cxx . . $ `<file>/src/pt2_replayer.h`/
34 #include "pt2_posed.h"cxx . . $ `<file>/src/pt2_posed.h`/
35 #include "pt2_textedit.h"cxx . . $ `<file>/src/pt2_textedit.h`/
36
37 SDL_Cursorcxx . . $ SDL_Cursor# *cursorscxx . . $ cursors.[NUM_CURSORScxx . . $ `src/pt2_mouse.h:244:9`!]; // globalized
38
39 static int32_tcxx . . $ int32_t# checkGUIButtonscxx . . $ checkGUIButtons(b126dc7c1de90089).(void);
40 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! handleRightMouseButtoncxx . . $ handleRightMouseButton(c9857a73d68e59ba).(void);
41 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! handleLeftMouseButtoncxx . . $ handleLeftMouseButton(c9857a73d68e59ba).(void);
42 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! handleGUIButtonscxx . . $ handleGUIButtons(83c267b20bac841a).(int32_tcxx . . $ int32_t# button);
43 static void handleRepeatedGUIButtonscxx . . $ handleRepeatedGUIButtons(49f6e7a06ebc5aa8).(void);
44 static void handleRepeatedSamplerFilterButtonscxx . . $ handleRepeatedSamplerFilterButtons(49f6e7a06ebc5aa8).(void);
45
46 #if defined __APPLE__ && defined __aarch64__
47 void armMacGhostMouseCursorFix(void)
48 {
49 /* M E G A K L U D G E:
50 ** The mouse cursor can sometimes change back to OS stock
51 ** (or show both stock and custom mouse) on Macs with a notch
52 ** (ARM based) in fullscreen mode. Weird, right?!
53 **
54 ** XXX: Can this cause stuttering or performance issues?
55 */
56 if (video.fullscreen)
57 SDL_SetCursor(NULL); // forces redraw
58 }
59 #endif
60
61 void sampleUpButtoncxx . . $ sampleUpButton(49f6e7a06ebc5aa8).(void)
62 {
63 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
64 {
65 editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
66 editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample. = 0;
67 }
68 else if (editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample. < 30)
69 {
70 editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.++;
71 }
72
73 updateCurrSamplecxx . . $ updateCurrSample(49f6e7a06ebc5aa8).();
74 }
75
76 void sampleDownButtoncxx . . $ sampleDownButton(49f6e7a06ebc5aa8).(void)
77 {
78 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. && editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample. > 0)
79 {
80 editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.--;
81 updateCurrSamplecxx . . $ updateCurrSample(49f6e7a06ebc5aa8).();
82 }
83 }
84
85 static void pointerSetColorcxx . . $ pointerSetColor(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# cursorColorIndex)
86 {
87 ASSERTcxx . . $ `src/pt2_header.h:25:9`!(cursorColorIndex <= 5);
88
89 videocxx . . $ video..palettecxx . . $ video_t#palette.[PAL_MOUSE_1cxx . . $ PAL_MOUSE_1.] = cursorColorscxx . . $ cursorColors.[cursorColorIndex][0];
90 videocxx . . $ video..palettecxx . . $ video_t#palette.[PAL_MOUSE_2cxx . . $ PAL_MOUSE_2.] = cursorColorscxx . . $ cursorColors.[cursorColorIndex][1];
91 videocxx . . $ video..palettecxx . . $ video_t#palette.[PAL_MOUSE_3cxx . . $ PAL_MOUSE_3.] = cursorColorscxx . . $ cursorColors.[cursorColorIndex][2];
92
93 if (configcxx . . $ config..hwMousecxx . . $ config_t#hwMouse.)
94 setSystemCursorcxx . . $ setSystemCursor(cf05e5bff5fdf007).(cursorscxx . . $ cursors.[cursorColorIndex]);
95 }
96
97 void updatePointerColorcxx . . $ updatePointerColor(49f6e7a06ebc5aa8).(void)
98 {
99 switch (uicxx . . $ ui..pointerModecxx . . $ ui_t#pointerMode.)
100 {
101 case POINTER_MODE_IDLEcxx . . $ POINTER_MODE_IDLE.: pointerSetColorcxx . . $ pointerSetColor(ac50b47256ae7414).(POINTER_GRAYcxx . . $ POINTER_GRAY.); break;
102 case POINTER_MODE_PLAYcxx . . $ POINTER_MODE_PLAY.: pointerSetColorcxx . . $ pointerSetColor(ac50b47256ae7414).(POINTER_YELLOWcxx . . $ POINTER_YELLOW.); break;
103 case POINTER_MODE_EDITcxx . . $ POINTER_MODE_EDIT.: pointerSetColorcxx . . $ pointerSetColor(ac50b47256ae7414).(POINTER_BLUEcxx . . $ POINTER_BLUE.); break;
104 case POINTER_MODE_RECORDcxx . . $ POINTER_MODE_RECORD.: pointerSetColorcxx . . $ pointerSetColor(ac50b47256ae7414).(POINTER_BLUEcxx . . $ POINTER_BLUE.); break;
105 case POINTER_MODE_MSG1cxx . . $ POINTER_MODE_MSG1.: pointerSetColorcxx . . $ pointerSetColor(ac50b47256ae7414).(POINTER_PURPLEcxx . . $ POINTER_PURPLE.); break;
106 case POINTER_MODE_MSG2cxx . . $ POINTER_MODE_MSG2.: pointerSetColorcxx . . $ pointerSetColor(ac50b47256ae7414).(POINTER_GREENcxx . . $ POINTER_GREEN.); break;
107 default: break;
108 }
109 }
110
111 void pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(uint8_tcxx . . $ uint8_t# pointerMode, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! carry)
112 {
113 ASSERTcxx . . $ `src/pt2_header.h:25:9`!(pointerMode <= 5);
114
115 uicxx . . $ ui..pointerModecxx . . $ ui_t#pointerMode. = pointerMode;
116 if (carry)
117 uicxx . . $ ui..previousPointerModecxx . . $ ui_t#previousPointerMode. = uicxx . . $ ui..pointerModecxx . . $ ui_t#pointerMode.;
118
119 updatePointerColorcxx . . $ updatePointerColor(49f6e7a06ebc5aa8).();
120 }
121
122 void pointerSetModeThreadSafecxx . . $ pointerSetModeThreadSafe(f2ac3508b56cd10).(uint8_tcxx . . $ uint8_t# pointerMode, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! carry)
123 {
124 ASSERTcxx . . $ `src/pt2_header.h:25:9`!(pointerMode <= 5);
125
126 uicxx . . $ ui..pointerModecxx . . $ ui_t#pointerMode. = pointerMode;
127 if (carry)
128 uicxx . . $ ui..previousPointerModecxx . . $ ui_t#previousPointerMode. = uicxx . . $ ui..pointerModecxx . . $ ui_t#pointerMode.;
129
130 // in hardware mouse mode, the pointer color can only be changed from the main thread
131 if (configcxx . . $ config..hwMousecxx . . $ config_t#hwMouse.)
132 mousecxx . . $ mouse..updatePointerColorFlagcxx . . $ mouse_t#updatePointerColorFlag. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
133 else
134 updatePointerColorcxx . . $ updatePointerColor(49f6e7a06ebc5aa8).();
135 }
136
137 void pointerSetPreviousModecxx . . $ pointerSetPreviousMode(49f6e7a06ebc5aa8).(void)
138 {
139 if (uicxx . . $ ui..editTextFlagcxx . . $ ui_t#editTextFlag. || uicxx . . $ ui..askBoxShowncxx . . $ ui_t#askBoxShown.)
140 pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(POINTER_MODE_MSG1cxx . . $ POINTER_MODE_MSG1., NO_CARRYcxx . . $ NO_CARRY.);
141 else
142 pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(uicxx . . $ ui..previousPointerModecxx . . $ ui_t#previousPointerMode., NO_CARRYcxx . . $ NO_CARRY.);
143 }
144
145 void setMsgPointercxx . . $ setMsgPointer(49f6e7a06ebc5aa8).(void)
146 {
147 pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(POINTER_MODE_MSG2cxx . . $ POINTER_MODE_MSG2., falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!);
148 }
149
150 void setErrPointercxx . . $ setErrPointer(49f6e7a06ebc5aa8).(void)
151 {
152 pointerSetColorcxx . . $ pointerSetColor(ac50b47256ae7414).(POINTER_REDcxx . . $ POINTER_RED.);
153 }
154
155 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! setSystemCursorcxx . . $ setSystemCursor(cf05e5bff5fdf007).(SDL_Cursorcxx . . $ SDL_Cursor# *cur)
156 {
157 if (cur == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
158 {
159 SDL_SetCursorcxx . . $ SDL_SetCursor(8aaebebf3e7c9aed).(SDL_GetDefaultCursorcxx . . $ SDL_GetDefaultCursor(bca84900059c411a).());
160 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
161 }
162
163 SDL_SetCursorcxx . . $ SDL_SetCursor(8aaebebf3e7c9aed).(cur);
164 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
165 }
166
167 void freeMouseCursorscxx . . $ freeMouseCursors(49f6e7a06ebc5aa8).(void)
168 {
169 SDL_SetCursorcxx . . $ SDL_SetCursor(8aaebebf3e7c9aed).(SDL_GetDefaultCursorcxx . . $ SDL_GetDefaultCursor(bca84900059c411a).());
170 for (uint32_tcxx . . $ uint32_t# i = 0; i < NUM_CURSORScxx . . $ `src/pt2_mouse.h:244:9`!; i++)
171 {
172 if (cursorscxx . . $ cursors.[i] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
173 {
174 SDL_FreeCursorcxx . . $ SDL_FreeCursor(8aaebebf3e7c9aed).(cursorscxx . . $ cursors.[i]);
175 cursorscxx . . $ cursors.[i] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
176 }
177 }
178 }
179
180 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! createMouseCursorscxx . . $ createMouseCursors(c9857a73d68e59ba).(void) // creates scaled SDL surfaces for current mouse pointer shape
181 {
182 freeMouseCursorscxx . . $ freeMouseCursors(49f6e7a06ebc5aa8).();
183
184 uint32_tcxx . . $ uint32_t# scaleFactor = videocxx . . $ video..mouseCursorUpscaleFactorcxx . . $ video_t#mouseCursorUpscaleFactor.;
185 if (scaleFactor > 8) // just in case
186 scaleFactor = 8;
187
188 for (uint32_tcxx . . $ uint32_t# i = 0; i < NUM_CURSORScxx . . $ `src/pt2_mouse.h:244:9`!; i++)
189 {
190 SDL_Surfacecxx . . $ SDL_Surface# *surface = SDL_CreateRGBSurfacecxx . . $ SDL_CreateRGBSurface(98f97871e32d858).(0, POINTER_Wcxx . . $ POINTER_W.*scaleFactor, POINTER_Hcxx . . $ POINTER_H.*scaleFactor, 32, 0, 0, 0, 0);
191 if (surface == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
192 {
193 freeMouseCursorscxx . . $ freeMouseCursors(49f6e7a06ebc5aa8).();
194 configcxx . . $ config..hwMousecxx . . $ config_t#hwMouse. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; // enable software mouse
195 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
196 }
197
198 uint32_tcxx . . $ uint32_t# color1 = cursorColorscxx . . $ cursorColors.[i][0];
199 uint32_tcxx . . $ uint32_t# color2 = cursorColorscxx . . $ cursorColors.[i][1];
200 uint32_tcxx . . $ uint32_t# color3 = cursorColorscxx . . $ cursorColors.[i][2];
201 uint32_tcxx . . $ uint32_t# colorkey = 0x12345678;
202
203 color1 = SDL_MapRGBcxx . . $ SDL_MapRGB(495601ea59c5b7cb).(surface->formatcxx . . $ SDL_Surface#format., R24cxx . . $ `src/pt2_helpers.h:49:9`!(color1), G24cxx . . $ `src/pt2_helpers.h:50:9`!(color1), B24cxx . . $ `src/pt2_helpers.h:51:9`!(color1));
204 color2 = SDL_MapRGBcxx . . $ SDL_MapRGB(495601ea59c5b7cb).(surface->formatcxx . . $ SDL_Surface#format., R24cxx . . $ `src/pt2_helpers.h:49:9`!(color2), G24cxx . . $ `src/pt2_helpers.h:50:9`!(color2), B24cxx . . $ `src/pt2_helpers.h:51:9`!(color2));
205 color3 = SDL_MapRGBcxx . . $ SDL_MapRGB(495601ea59c5b7cb).(surface->formatcxx . . $ SDL_Surface#format., R24cxx . . $ `src/pt2_helpers.h:49:9`!(color3), G24cxx . . $ `src/pt2_helpers.h:50:9`!(color3), B24cxx . . $ `src/pt2_helpers.h:51:9`!(color3));
206 colorkey = SDL_MapRGBcxx . . $ SDL_MapRGB(495601ea59c5b7cb).(surface->formatcxx . . $ SDL_Surface#format., R24cxx . . $ `src/pt2_helpers.h:49:9`!(colorkey), G24cxx . . $ `src/pt2_helpers.h:50:9`!(colorkey), B24cxx . . $ `src/pt2_helpers.h:51:9`!(colorkey));
207
208 SDL_SetSurfaceBlendModecxx . . $ SDL_SetSurfaceBlendMode(392d4ee6d5a1ba55).(surface, SDL_BLENDMODE_NONEcxx . . $ SDL_BLENDMODE_NONE.);
209 SDL_SetColorKeycxx . . $ SDL_SetColorKey(5977e8c1a70e9356).(surface, SDL_TRUEcxx . . $ SDL_TRUE., colorkey);
210 SDL_SetSurfaceRLEcxx . . $ SDL_SetSurfaceRLE(a05f7e622fcabba7).(surface, SDL_TRUEcxx . . $ SDL_TRUE.);
211
212 const uint8_tcxx . . $ uint8_t# *srcPixels8 = mousePointerBMPcxx . . $ mousePointerBMP.;
213 SDL_LockSurfacecxx . . $ SDL_LockSurface(c1571c2e4543798c).(surface);
214
215 uint32_tcxx . . $ uint32_t# *dstPixels32 = (uint32_tcxx . . $ uint32_t# *)surface->pixelscxx . . $ SDL_Surface#pixels.;
216 for (int32_tcxx . . $ int32_t# k = 0; k < surface->wcxx . . $ SDL_Surface#w.*surface->hcxx . . $ SDL_Surface#h.; k++) // fill surface with colorkey pixels
217 dstPixels32[k] = colorkey;
218
219 // blit upscaled cursor to surface
220 for (uint32_tcxx . . $ uint32_t# y = 0; y < POINTER_Hcxx . . $ POINTER_H.; y++)
221 {
222 uint32_tcxx . . $ uint32_t# *outX = &dstPixels32[(y * scaleFactor) * surface->wcxx . . $ SDL_Surface#w.];
223 for (uint32_tcxx . . $ uint32_t# yScale = 0; yScale < scaleFactor; yScale++)
224 {
225 for (uint32_tcxx . . $ uint32_t# x = 0; x < POINTER_Wcxx . . $ POINTER_W.; x++)
226 {
227 uint8_tcxx . . $ uint8_t# srcPix = srcPixels8[(y * POINTER_Wcxx . . $ POINTER_W.) + x];
228 if (srcPix != PAL_COLORKEYcxx . . $ PAL_COLORKEY.)
229 {
230 uint32_tcxx . . $ uint32_t# pixel = colorkey; // make compiler happy
231
232 if (srcPix == PAL_MOUSE_1cxx . . $ PAL_MOUSE_1.) pixel = color1;
233 else if (srcPix == PAL_MOUSE_2cxx . . $ PAL_MOUSE_2.) pixel = color2;
234 else if (srcPix == PAL_MOUSE_3cxx . . $ PAL_MOUSE_3.) pixel = color3;
235
236 for (uint32_tcxx . . $ uint32_t# xScale = 0; xScale < scaleFactor; xScale++)
237 outX[xScale] = pixel;
238 }
239
240 outX += scaleFactor;
241 }
242 }
243 }
244
245 SDL_UnlockSurfacecxx . . $ SDL_UnlockSurface(60a0b30a00b4fc6d).(surface);
246
247 cursorscxx . . $ cursors.[i] = SDL_CreateColorCursorcxx . . $ SDL_CreateColorCursor(f93fe9f03061c156).(surface, 0, 0);
248 if (cursorscxx . . $ cursors.[i] == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
249 {
250 SDL_FreeSurfacecxx . . $ SDL_FreeSurface(60a0b30a00b4fc6d).(surface);
251 freeMouseCursorscxx . . $ freeMouseCursors(49f6e7a06ebc5aa8).();
252 configcxx . . $ config..hwMousecxx . . $ config_t#hwMouse. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; // enable software mouse
253 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
254 }
255
256 SDL_FreeSurfacecxx . . $ SDL_FreeSurface(60a0b30a00b4fc6d).(surface);
257 }
258
259 pointerSetPreviousModecxx . . $ pointerSetPreviousMode(49f6e7a06ebc5aa8).(); // this sets the appropriate the hardware cursor
260 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
261 }
262
263 void updateMouseScalingcxx . . $ updateMouseScaling(49f6e7a06ebc5aa8).(void)
264 {
265 if (videocxx . . $ video..renderWcxx . . $ video_t#renderW. > 0) videocxx . . $ video..dMouseXMulcxx . . $ video_t#dMouseXMul. = (double)SCREEN_Wcxx . . $ `src/pt2_header.h:41:9`! / videocxx . . $ video..renderWcxx . . $ video_t#renderW.;
266 if (videocxx . . $ video..renderHcxx . . $ video_t#renderH. > 0) videocxx . . $ video..dMouseYMulcxx . . $ video_t#dMouseYMul. = (double)SCREEN_Hcxx . . $ `src/pt2_header.h:42:9`! / videocxx . . $ video..renderHcxx . . $ video_t#renderH.;
267 }
268
269 void readMouseXYcxx . . $ readMouseXY(49f6e7a06ebc5aa8).(void)
270 {
271 int32_tcxx . . $ int32_t# mx, my, windowX, windowY;
272
273 if (mousecxx . . $ mouse..updatePointerColorFlagcxx . . $ mouse_t#updatePointerColorFlag.) // used when changing pointer color from other threads
274 {
275 mousecxx . . $ mouse..updatePointerColorFlagcxx . . $ mouse_t#updatePointerColorFlag. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
276 updatePointerColorcxx . . $ updatePointerColor(49f6e7a06ebc5aa8).();
277 }
278
279 if (mousecxx . . $ mouse..setPosFlagcxx . . $ mouse_t#setPosFlag.)
280 {
281 if (!videocxx . . $ video..windowHiddencxx . . $ video_t#windowHidden.)
282 SDL_WarpMouseInWindowcxx . . $ SDL_WarpMouseInWindow(1d6b903408df08ed).(videocxx . . $ video..windowcxx . . $ video_t#window., mousecxx . . $ mouse..setPosXcxx . . $ mouse_t#setPosX., mousecxx . . $ mouse..setPosYcxx . . $ mouse_t#setPosY.);
283
284 mousecxx . . $ mouse..setPosFlagcxx . . $ mouse_t#setPosFlag. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
285 return;
286 }
287
288 if (videocxx . . $ video..fullscreencxx . . $ video_t#fullscreen.)
289 {
290 mousecxx . . $ mouse..buttonStatecxx . . $ mouse_t#buttonState. = SDL_GetMouseStatecxx . . $ SDL_GetMouseState(ef0362c0d321f56b).(&mx, &my);
291
292 mousecxx . . $ mouse..absXcxx . . $ mouse_t#absX. = mx;
293 mousecxx . . $ mouse..absYcxx . . $ mouse_t#absY. = my;
294 }
295 else
296 {
297 mousecxx . . $ mouse..buttonStatecxx . . $ mouse_t#buttonState. = SDL_GetGlobalMouseStatecxx . . $ SDL_GetGlobalMouseState(ef0362c0d321f56b).(&mx, &my);
298
299 mousecxx . . $ mouse..absXcxx . . $ mouse_t#absX. = mx;
300 mousecxx . . $ mouse..absYcxx . . $ mouse_t#absY. = my;
301
302 // convert desktop coords to window coords
303 SDL_GetWindowPositioncxx . . $ SDL_GetWindowPosition(9db8dd3ac7233d99).(videocxx . . $ video..windowcxx . . $ video_t#window., &windowX, &windowY);
304
305 mx -= windowX;
306 my -= windowY;
307 }
308
309 mousecxx . . $ mouse..rawXcxx . . $ mouse_t#rawX. = mx;
310 mousecxx . . $ mouse..rawYcxx . . $ mouse_t#rawY. = my;
311
312 if (videocxx . . $ video..fullscreencxx . . $ video_t#fullscreen.)
313 {
314 // if software mouse is enabled, warp mouse inside render space
315 if (!configcxx . . $ config..hwMousecxx . . $ config_t#hwMouse.)
316 {
317 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! warpMouse = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
318
319 if (mx < videocxx . . $ video..renderXcxx . . $ video_t#renderX.)
320 {
321 mx = videocxx . . $ video..renderXcxx . . $ video_t#renderX.;
322 warpMouse = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
323 }
324 else if (mx >= videocxx . . $ video..renderXcxx . . $ video_t#renderX.+videocxx . . $ video..renderWcxx . . $ video_t#renderW.)
325 {
326 mx = (videocxx . . $ video..renderXcxx . . $ video_t#renderX. + videocxx . . $ video..renderWcxx . . $ video_t#renderW.) - 1;
327 warpMouse = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
328 }
329
330 if (my < videocxx . . $ video..renderYcxx . . $ video_t#renderY.)
331 {
332 my = videocxx . . $ video..renderYcxx . . $ video_t#renderY.;
333 warpMouse = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
334 }
335 else if (my >= videocxx . . $ video..renderYcxx . . $ video_t#renderY.+videocxx . . $ video..renderHcxx . . $ video_t#renderH.)
336 {
337 my = (videocxx . . $ video..renderYcxx . . $ video_t#renderY. + videocxx . . $ video..renderHcxx . . $ video_t#renderH.) - 1;
338 warpMouse = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
339 }
340
341 if (warpMouse)
342 SDL_WarpMouseInWindowcxx . . $ SDL_WarpMouseInWindow(1d6b903408df08ed).(videocxx . . $ video..windowcxx . . $ video_t#window., mx, my);
343 }
344
345 // convert fullscreen coords to window (centered image) coords
346 mx -= videocxx . . $ video..renderXcxx . . $ video_t#renderX.;
347 my -= videocxx . . $ video..renderYcxx . . $ video_t#renderY.;
348 }
349
350 // kludge: this can happen and prevent buttons from pressing on the very first row of pixels
351 if (mx == -1) mx = 0;
352 if (my == -1) my = 0;
353
354 // multiply coords by video upscaling factors
355 mousecxx . . $ mouse..xcxx . . $ mouse_t#x. = (int32_tcxx . . $ int32_t#)floor(mx * videocxx . . $ video..dMouseXMulcxx . . $ video_t#dMouseXMul.);
356 mousecxx . . $ mouse..ycxx . . $ mouse_t#y. = (int32_tcxx . . $ int32_t#)floor(my * videocxx . . $ video..dMouseYMulcxx . . $ video_t#dMouseYMul.);
357
358 if (configcxx . . $ config..hwMousecxx . . $ config_t#hwMouse.)
359 {
360 // hardware mouse mode (OS)
361 hideSpritecxx . . $ hideSprite(d4f767463ce0a6b3).(SPRITE_MOUSE_POINTERcxx . . $ SPRITE_MOUSE_POINTER.);
362 }
363 else
364 {
365 // software mouse mode (PT mouse)
366 setSpritePoscxx . . $ setSpritePos(b1146eedae1e1d0b).(SPRITE_MOUSE_POINTERcxx . . $ SPRITE_MOUSE_POINTER., mousecxx . . $ mouse..xcxx . . $ mouse_t#x., mousecxx . . $ mouse..ycxx . . $ mouse_t#y.);
367 }
368 }
369
370 void mouseButtonUpHandlercxx . . $ mouseButtonUpHandler(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# mouseButton)
371 {
372 mousecxx . . $ mouse..buttonWaitCountercxx . . $ mouse_t#buttonWaitCounter. = 0;
373 mousecxx . . $ mouse..buttonWaitingcxx . . $ mouse_t#buttonWaiting. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
374
375 if (mouseButton == SDL_BUTTON_LEFTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:445:9`!)
376 {
377 mousecxx . . $ mouse..leftButtonPressedcxx . . $ mouse_t#leftButtonPressed. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
378
379 uicxx . . $ ui..forceSampleDragcxx . . $ ui_t#forceSampleDrag. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
380 uicxx . . $ ui..forceVolDragcxx . . $ ui_t#forceVolDrag. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
381 uicxx . . $ ui..leftLoopPinMovingcxx . . $ ui_t#leftLoopPinMoving. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
382 uicxx . . $ ui..rightLoopPinMovingcxx . . $ ui_t#rightLoopPinMoving. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
383 uicxx . . $ ui..sampleMarkingPoscxx . . $ ui_t#sampleMarkingPos. = -1;
384
385 switch (mousecxx . . $ mouse..lastGUIButtoncxx . . $ mouse_t#lastGUIButton.)
386 {
387 case PTB_SLENGTHUcxx . . $ PTB_SLENGTHU.:
388 case PTB_SLENGTHDcxx . . $ PTB_SLENGTHD.:
389 {
390 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
391 redrawSamplecxx . . $ redrawSample(49f6e7a06ebc5aa8).();
392
393 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
394 updateSamplePoscxx . . $ updateSamplePos(49f6e7a06ebc5aa8).();
395
396 uicxx . . $ ui..updateSongSizecxx . . $ ui_t#updateSongSize. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
397 }
398 break;
399
400 case PTB_LENGTHUcxx . . $ PTB_LENGTHU.:
401 case PTB_LENGTHDcxx . . $ PTB_LENGTHD.:
402 case PTB_PATTERNUcxx . . $ PTB_PATTERNU.:
403 case PTB_PATTERNDcxx . . $ PTB_PATTERND.:
404 {
405 uicxx . . $ ui..updateSongSizecxx . . $ ui_t#updateSongSize. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
406 if (uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
407 uicxx . . $ ui..updatePosEdcxx . . $ ui_t#updatePosEd. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
408 }
409 break;
410
411 default:
412 break;
413 }
414
415 mousecxx . . $ mouse..lastGUIButtoncxx . . $ mouse_t#lastGUIButton. = -1;
416 mousecxx . . $ mouse..lastSmpFilterButtoncxx . . $ mouse_t#lastSmpFilterButton. = -1;
417 mousecxx . . $ mouse..lastSamplingButtoncxx . . $ mouse_t#lastSamplingButton. = -1;
418 }
419
420 if (mouseButton == SDL_BUTTON_RIGHTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:447:9`!)
421 {
422 mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
423 uicxx . . $ ui..forceSampleEditcxx . . $ ui_t#forceSampleEdit. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
424 }
425 }
426
427 void mouseButtonDownHandlercxx . . $ mouseButtonDownHandler(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# mouseButton)
428 {
429 if (mouseButton == SDL_BUTTON_LEFTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:445:9`!)
430 {
431 mousecxx . . $ mouse..leftButtonPressedcxx . . $ mouse_t#leftButtonPressed. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
432 mousecxx . . $ mouse..buttonWaitingcxx . . $ mouse_t#buttonWaiting. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
433 }
434
435 if (mouseButton == SDL_BUTTON_RIGHTcxx . . $ `<external>/13849749812924280863/SDL_mouse.h:447:9`!)
436 mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
437
438 // when red mouse pointer (error), block further input for a while
439 if (editorcxx . . $ editor..errorMsgActivecxx . . $ editor_t#errorMsgActive. && editorcxx . . $ editor..errorMsgBlockcxx . . $ editor_t#errorMsgBlock.)
440 return;
441
442 if (handleRightMouseButtoncxx . . $ handleRightMouseButton(c9857a73d68e59ba).() || handleLeftMouseButtoncxx . . $ handleLeftMouseButton(c9857a73d68e59ba).())
443 return;
444
445 handleTextEditingcxx . . $ handleTextEditing(ac50b47256ae7414).(mouseButton);
446 }
447
448 void handleGUIButtonRepeatcxx . . $ handleGUIButtonRepeat(49f6e7a06ebc5aa8).(void)
449 {
450 if (!mousecxx . . $ mouse..leftButtonPressedcxx . . $ mouse_t#leftButtonPressed.)
451 {
452 // left mouse button released, stop repeating buttons
453 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
454 return;
455 }
456
457 if (uicxx . . $ ui..samplerFiltersBoxShowncxx . . $ ui_t#samplerFiltersBoxShown.)
458 {
459 handleRepeatedSamplerFilterButtonscxx . . $ handleRepeatedSamplerFilterButtons(49f6e7a06ebc5aa8).();
460 return;
461 }
462
463 if (uicxx . . $ ui..samplingBoxShowncxx . . $ ui_t#samplingBoxShown.)
464 {
465 handleRepeatedSamplingButtonscxx . . $ handleRepeatedSamplingButtons(49f6e7a06ebc5aa8).();
466 return;
467 }
468
469 if (mousecxx . . $ mouse..lastGUIButtoncxx . . $ mouse_t#lastGUIButton. != checkGUIButtonscxx . . $ checkGUIButtons(b126dc7c1de90089).()) // FIXME: This can potentially do a ton of iterations, bad design!
470 {
471 // only repeat the button that was first clicked (e.g. if you hold and move mouse to another button)
472 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
473 return;
474 }
475
476 handleRepeatedGUIButtonscxx . . $ handleRepeatedGUIButtons(49f6e7a06ebc5aa8).();
477 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter.++;
478 }
479
480 static void edNote1UpButtoncxx . . $ edNote1UpButton(49f6e7a06ebc5aa8).(void)
481 {
482 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
483 editorcxx . . $ editor..note1cxx . . $ editor_t#note1. += 12;
484 else
485 editorcxx . . $ editor..note1cxx . . $ editor_t#note1.++;
486
487 if (editorcxx . . $ editor..note1cxx . . $ editor_t#note1. > 36)
488 editorcxx . . $ editor..note1cxx . . $ editor_t#note1. = 36;
489
490 uicxx . . $ ui..updateChordNote1Textcxx . . $ ui_t#updateChordNote1Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
491 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
492 }
493
494 static void edNote1DownButtoncxx . . $ edNote1DownButton(49f6e7a06ebc5aa8).(void)
495 {
496 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
497 editorcxx . . $ editor..note1cxx . . $ editor_t#note1. -= 12;
498 else
499 editorcxx . . $ editor..note1cxx . . $ editor_t#note1.--;
500
501 if (editorcxx . . $ editor..note1cxx . . $ editor_t#note1. < 0)
502 editorcxx . . $ editor..note1cxx . . $ editor_t#note1. = 0;
503
504 uicxx . . $ ui..updateChordNote1Textcxx . . $ ui_t#updateChordNote1Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
505 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
506 }
507
508 static void edNote2UpButtoncxx . . $ edNote2UpButton(49f6e7a06ebc5aa8).(void)
509 {
510 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
511 editorcxx . . $ editor..note2cxx . . $ editor_t#note2. += 12;
512 else
513 editorcxx . . $ editor..note2cxx . . $ editor_t#note2.++;
514
515 if (editorcxx . . $ editor..note2cxx . . $ editor_t#note2. > 36)
516 editorcxx . . $ editor..note2cxx . . $ editor_t#note2. = 36;
517
518 uicxx . . $ ui..updateChordNote2Textcxx . . $ ui_t#updateChordNote2Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
519 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
520 }
521
522 static void edNote2DownButtoncxx . . $ edNote2DownButton(49f6e7a06ebc5aa8).(void)
523 {
524 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
525 editorcxx . . $ editor..note2cxx . . $ editor_t#note2. -= 12;
526 else
527 editorcxx . . $ editor..note2cxx . . $ editor_t#note2.--;
528
529 if (editorcxx . . $ editor..note2cxx . . $ editor_t#note2. < 0)
530 editorcxx . . $ editor..note2cxx . . $ editor_t#note2. = 0;
531
532 uicxx . . $ ui..updateChordNote2Textcxx . . $ ui_t#updateChordNote2Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
533 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
534 }
535
536 static void edNote3UpButtoncxx . . $ edNote3UpButton(49f6e7a06ebc5aa8).(void)
537 {
538 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
539 editorcxx . . $ editor..note3cxx . . $ editor_t#note3. += 12;
540 else
541 editorcxx . . $ editor..note3cxx . . $ editor_t#note3.++;
542
543 if (editorcxx . . $ editor..note3cxx . . $ editor_t#note3. > 36)
544 editorcxx . . $ editor..note3cxx . . $ editor_t#note3. = 36;
545
546 uicxx . . $ ui..updateChordNote3Textcxx . . $ ui_t#updateChordNote3Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
547 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
548 }
549
550 static void edNote3DownButtoncxx . . $ edNote3DownButton(49f6e7a06ebc5aa8).(void)
551 {
552 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
553 editorcxx . . $ editor..note3cxx . . $ editor_t#note3. -= 12;
554 else
555 editorcxx . . $ editor..note3cxx . . $ editor_t#note3.--;
556
557 if (editorcxx . . $ editor..note3cxx . . $ editor_t#note3. < 0)
558 editorcxx . . $ editor..note3cxx . . $ editor_t#note3. = 0;
559
560 uicxx . . $ ui..updateChordNote3Textcxx . . $ ui_t#updateChordNote3Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
561 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
562 }
563
564 static void edNote4UpButtoncxx . . $ edNote4UpButton(49f6e7a06ebc5aa8).(void)
565 {
566 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
567 editorcxx . . $ editor..note4cxx . . $ editor_t#note4. += 12;
568 else
569 editorcxx . . $ editor..note4cxx . . $ editor_t#note4.++;
570
571 if (editorcxx . . $ editor..note4cxx . . $ editor_t#note4. > 36)
572 editorcxx . . $ editor..note4cxx . . $ editor_t#note4. = 36;
573
574 uicxx . . $ ui..updateChordNote4Textcxx . . $ ui_t#updateChordNote4Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
575 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
576 }
577
578 static void edNote4DownButtoncxx . . $ edNote4DownButton(49f6e7a06ebc5aa8).(void)
579 {
580 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
581 editorcxx . . $ editor..note4cxx . . $ editor_t#note4. -= 12;
582 else
583 editorcxx . . $ editor..note4cxx . . $ editor_t#note4.--;
584
585 if (editorcxx . . $ editor..note4cxx . . $ editor_t#note4. < 0)
586 editorcxx . . $ editor..note4cxx . . $ editor_t#note4. = 0;
587
588 uicxx . . $ ui..updateChordNote4Textcxx . . $ ui_t#updateChordNote4Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
589 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
590 }
591
592 static void edPosUpButtoncxx . . $ edPosUpButton(b45ddcbc8423892c).(boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! fast)
593 {
594 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
595 {
596 if (fast)
597 {
598 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. <= configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.-64)
599 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. += 64;
600 else
601 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.;
602 }
603 else
604 {
605 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. <= configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.-16)
606 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. += 16;
607 else
608 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.;
609 }
610 }
611 else
612 {
613 if (fast)
614 {
615 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. <= configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.-64)
616 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. += 64;
617 else
618 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.;
619 }
620 else
621 {
622 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. < configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.)
623 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.++;
624 else
625 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.;
626 }
627 }
628
629 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. > songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length.)
630 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length.;
631
632 uicxx . . $ ui..updatePosTextcxx . . $ ui_t#updatePosText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
633 }
634
635 static void edPosDownButtoncxx . . $ edPosDownButton(b45ddcbc8423892c).(boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! fast)
636 {
637 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
638 {
639 if (fast)
640 {
641 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. > 64)
642 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. -= 64;
643 else
644 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = 0;
645 }
646 else
647 {
648 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. > 16)
649 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. -= 16;
650 else
651 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = 0;
652 }
653 }
654 else
655 {
656 if (fast)
657 {
658 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. > 64)
659 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. -= 64;
660 else
661 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = 0;
662 }
663 else
664 {
665 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. > 0)
666 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.--;
667 else
668 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = 0;
669 }
670 }
671
672 uicxx . . $ ui..updatePosTextcxx . . $ ui_t#updatePosText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
673 }
674
675 static void edModUpButtoncxx . . $ edModUpButton(49f6e7a06ebc5aa8).(void)
676 {
677 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
678 editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed. += 10;
679 else
680 editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed.++;
681
682 if (editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed. > 127)
683 editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed. = 127;
684
685 uicxx . . $ ui..updateModTextcxx . . $ ui_t#updateModText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
686 }
687
688 static void edModDownButtoncxx . . $ edModDownButton(49f6e7a06ebc5aa8).(void)
689 {
690 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
691 {
692 editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed. -= 10;
693 }
694 else
695 {
696 editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed.--;
697 }
698
699 if (editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed. < -128)
700 editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed. = -128;
701
702 uicxx . . $ ui..updateModTextcxx . . $ ui_t#updateModText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
703 }
704
705 static void edVolUpButtoncxx . . $ edVolUpButton(49f6e7a06ebc5aa8).(void)
706 {
707 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
708 {
709 if (editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol. <= 999-10)
710 editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol. += 10;
711 else
712 editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol. = 999;
713 }
714 else
715 {
716 if (editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol. < 999)
717 editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol.++;
718 }
719
720 uicxx . . $ ui..updateVolTextcxx . . $ ui_t#updateVolText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
721 }
722
723 static void edVolDownButtoncxx . . $ edVolDownButton(49f6e7a06ebc5aa8).(void)
724 {
725 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
726 {
727 if (editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol. >= 10)
728 editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol. -= 10;
729 else
730 editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol. = 0;
731 }
732 else
733 {
734 if (editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol. > 0)
735 editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol.--;
736 }
737
738 uicxx . . $ ui..updateVolTextcxx . . $ ui_t#updateVolText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
739 }
740
741 static void sampleFineTuneUpButtoncxx . . $ sampleFineTuneUpButton(49f6e7a06ebc5aa8).(void)
742 {
743 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
744 return;
745
746 int8_tcxx . . $ int8_t# finetune = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].fineTunecxx . . $ moduleSample_t#fineTune. & 0xF;
747 if (finetune != 7)
748 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].fineTunecxx . . $ moduleSample_t#fineTune. = (finetune + 1) & 0xF;
749
750 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
751 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].fineTunecxx . . $ moduleSample_t#fineTune. = 0;
752
753 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
754 uicxx . . $ ui..updateCurrSampleFineTunecxx . . $ ui_t#updateCurrSampleFineTune. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
755 }
756
757 static void sampleFineTuneDownButtoncxx . . $ sampleFineTuneDownButton(49f6e7a06ebc5aa8).(void)
758 {
759 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
760 return;
761
762 int8_tcxx . . $ int8_t# finetune = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].fineTunecxx . . $ moduleSample_t#fineTune. & 0xF;
763 if (finetune != 8)
764 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].fineTunecxx . . $ moduleSample_t#fineTune. = (finetune - 1) & 0xF;
765
766 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
767 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].fineTunecxx . . $ moduleSample_t#fineTune. = 0;
768
769 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
770 uicxx . . $ ui..updateCurrSampleFineTunecxx . . $ ui_t#updateCurrSampleFineTune. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
771 }
772
773 static void sampleVolumeUpButtoncxx . . $ sampleVolumeUpButton(49f6e7a06ebc5aa8).(void)
774 {
775 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
776 return;
777
778 int8_tcxx . . $ int8_t# val = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].volumecxx . . $ moduleSample_t#volume.;
779
780 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
781 val += 16;
782 else
783 val++;
784
785 if (val > 64)
786 val = 64;
787
788 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].volumecxx . . $ moduleSample_t#volume. = (uint8_tcxx . . $ uint8_t#)val;
789 uicxx . . $ ui..updateCurrSampleVolumecxx . . $ ui_t#updateCurrSampleVolume. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
790 }
791
792 static void sampleVolumeDownButtoncxx . . $ sampleVolumeDownButton(49f6e7a06ebc5aa8).(void)
793 {
794 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
795 return;
796
797 int8_tcxx . . $ int8_t# val = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].volumecxx . . $ moduleSample_t#volume.;
798
799 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
800 val -= 16;
801 else
802 val--;
803
804 if (val < 0)
805 val = 0;
806
807 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].volumecxx . . $ moduleSample_t#volume. = (uint8_tcxx . . $ uint8_t#)val;
808 uicxx . . $ ui..updateCurrSampleVolumecxx . . $ ui_t#updateCurrSampleVolume. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
809 }
810
811 static void sampleLengthUpButtoncxx . . $ sampleLengthUpButton(b45ddcbc8423892c).(boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! fast)
812 {
813 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. || songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length. == configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.)
814 return;
815
816 int32_tcxx . . $ int32_t# val = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length.;
817 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
818 {
819 if (fast)
820 val += 64;
821 else
822 val += 16;
823 }
824 else
825 {
826 if (fast)
827 val += 10;
828 else
829 val += 2;
830 }
831
832 if (val > configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.)
833 val = configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.;
834
835 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length. = val;
836 uicxx . . $ ui..updateCurrSampleLengthcxx . . $ ui_t#updateCurrSampleLength. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
837 }
838
839 static void sampleLengthDownButtoncxx . . $ sampleLengthDownButton(b45ddcbc8423892c).(boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! fast)
840 {
841 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
842 return;
843
844 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
845 if (s->loopStartcxx . . $ moduleSample_t#loopStart.+s->loopLengthcxx . . $ moduleSample_t#loopLength. > 2)
846 {
847 if (s->lengthcxx . . $ moduleSample_t#length. == s->loopStartcxx . . $ moduleSample_t#loopStart.+s->loopLengthcxx . . $ moduleSample_t#loopLength.)
848 return;
849 }
850 else
851 {
852 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
853 return;
854 }
855
856 int32_tcxx . . $ int32_t# val = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length.;
857 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
858 {
859 if (fast)
860 val -= 64;
861 else
862 val -= 16;
863 }
864 else
865 {
866 if (fast)
867 val -= 10;
868 else
869 val -= 2;
870 }
871
872 if (val < 0)
873 val = 0;
874
875 if (s->loopStartcxx . . $ moduleSample_t#loopStart.+s->loopLengthcxx . . $ moduleSample_t#loopLength. > 2)
876 {
877 if (val < s->loopStartcxx . . $ moduleSample_t#loopStart.+s->loopLengthcxx . . $ moduleSample_t#loopLength.)
878 val = s->loopStartcxx . . $ moduleSample_t#loopStart.+s->loopLengthcxx . . $ moduleSample_t#loopLength.;
879 }
880
881 s->lengthcxx . . $ moduleSample_t#length. = val;
882
883 uicxx . . $ ui..updateCurrSampleLengthcxx . . $ ui_t#updateCurrSampleLength. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
884 }
885
886 static void sampleRepeatUpButtoncxx . . $ sampleRepeatUpButton(b45ddcbc8423892c).(boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! fast)
887 {
888 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
889 return;
890
891 int32_tcxx . . $ int32_t# val = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart.;
892 int32_tcxx . . $ int32_t# loopLen = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength.;
893 int32_tcxx . . $ int32_t# len = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length.;
894
895 if (len == 0)
896 {
897 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart. = 0;
898 return;
899 }
900
901 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
902 {
903 if (fast)
904 val += 64;
905 else
906 val += 16;
907 }
908 else
909 {
910 if (fast)
911 val += 10;
912 else
913 val += 2;
914 }
915
916 if (val > len-loopLen)
917 val = len-loopLen;
918
919 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart. = val;
920 uicxx . . $ ui..updateCurrSampleRepeatcxx . . $ ui_t#updateCurrSampleRepeat. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
921
922 updatePaulaLoopscxx . . $ updatePaulaLoops(49f6e7a06ebc5aa8).();
923
924 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
925 setLoopSpritescxx . . $ setLoopSprites(49f6e7a06ebc5aa8).();
926
927 if (uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown. && uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 3) // sample chord editor
928 uicxx . . $ ui..updateChordLengthTextcxx . . $ ui_t#updateChordLengthText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
929 }
930
931 static void sampleRepeatDownButtoncxx . . $ sampleRepeatDownButton(b45ddcbc8423892c).(boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! fast)
932 {
933 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
934 return;
935
936 int32_tcxx . . $ int32_t# val = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart.;
937 int32_tcxx . . $ int32_t# len = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length.;
938
939 if (len == 0)
940 {
941 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart. = 0;
942 return;
943 }
944
945 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
946 {
947 if (fast)
948 val -= 64;
949 else
950 val -= 16;
951 }
952 else
953 {
954 if (fast)
955 val -= 10;
956 else
957 val -= 2;
958 }
959
960 if (val < 0)
961 val = 0;
962
963 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart. = val;
964 uicxx . . $ ui..updateCurrSampleRepeatcxx . . $ ui_t#updateCurrSampleRepeat. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
965
966 updatePaulaLoopscxx . . $ updatePaulaLoops(49f6e7a06ebc5aa8).();
967
968 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
969 setLoopSpritescxx . . $ setLoopSprites(49f6e7a06ebc5aa8).();
970
971 if (uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown. && uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 3) // sample chord editor
972 uicxx . . $ ui..updateChordLengthTextcxx . . $ ui_t#updateChordLengthText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
973 }
974
975 static void sampleRepeatLengthUpButtoncxx . . $ sampleRepeatLengthUpButton(b45ddcbc8423892c).(boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! fast)
976 {
977 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
978 return;
979
980 int32_tcxx . . $ int32_t# val = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength.;
981 int32_tcxx . . $ int32_t# loopStart = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart.;
982 int32_tcxx . . $ int32_t# len = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length.;
983
984 if (len == 0)
985 {
986 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength. = 2;
987 return;
988 }
989
990 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
991 {
992 if (fast)
993 val += 64;
994 else
995 val += 16;
996 }
997 else
998 {
999 if (fast)
1000 val += 10;
1001 else
1002 val += 2;
1003 }
1004
1005 if (val > len-loopStart)
1006 val = len-loopStart;
1007
1008 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength. = val;
1009 uicxx . . $ ui..updateCurrSampleReplencxx . . $ ui_t#updateCurrSampleReplen. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1010
1011 updatePaulaLoopscxx . . $ updatePaulaLoops(49f6e7a06ebc5aa8).();
1012
1013 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
1014 setLoopSpritescxx . . $ setLoopSprites(49f6e7a06ebc5aa8).();
1015
1016 if (uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown. && uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 3) // sample chord editor
1017 uicxx . . $ ui..updateChordLengthTextcxx . . $ ui_t#updateChordLengthText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1018 }
1019
1020 static void sampleRepeatLengthDownButtoncxx . . $ sampleRepeatLengthDownButton(b45ddcbc8423892c).(boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! fast)
1021 {
1022 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
1023 return;
1024
1025 int32_tcxx . . $ int32_t# val = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength.;
1026 int32_tcxx . . $ int32_t# len = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length.;
1027
1028 if (len == 0)
1029 {
1030 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength. = 2;
1031 return;
1032 }
1033
1034 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1035 {
1036 if (fast)
1037 val -= 64;
1038 else
1039 val -= 16;
1040 }
1041 else
1042 {
1043 if (fast)
1044 val -= 10;
1045 else
1046 val -= 2;
1047 }
1048
1049 if (val < 2)
1050 val = 2;
1051
1052 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength. = val;
1053 uicxx . . $ ui..updateCurrSampleReplencxx . . $ ui_t#updateCurrSampleReplen. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1054
1055 updatePaulaLoopscxx . . $ updatePaulaLoops(49f6e7a06ebc5aa8).();
1056
1057 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
1058 setLoopSpritescxx . . $ setLoopSprites(49f6e7a06ebc5aa8).();
1059
1060 if (uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown. && uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 3) // sample chord editor
1061 uicxx . . $ ui..updateChordLengthTextcxx . . $ ui_t#updateChordLengthText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1062 }
1063
1064 static void tempoUpButtoncxx . . $ tempoUpButton(49f6e7a06ebc5aa8).(void)
1065 {
1066 if (editorcxx . . $ editor..timingModecxx . . $ editor_t#timingMode. == TEMPO_MODE_VBLANKcxx . . $ TEMPO_MODE_VBLANK.)
1067 return;
1068
1069 int32_tcxx . . $ int32_t# val = songcxx . . $ song.->currBPMcxx . . $ module_t#currBPM.;
1070 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1071 val += 10;
1072 else
1073 val++;
1074
1075 if (val > 255)
1076 val = 255;
1077
1078 songcxx . . $ song.->currBPMcxx . . $ module_t#currBPM. = val;
1079 modSetTempocxx . . $ modSetTempo(918ebd27a9ddbad3).(songcxx . . $ song.->currBPMcxx . . $ module_t#currBPM., truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!);
1080 uicxx . . $ ui..updateSongBPMcxx . . $ ui_t#updateSongBPM. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1081 }
1082
1083 static void tempoDownButtoncxx . . $ tempoDownButton(49f6e7a06ebc5aa8).(void)
1084 {
1085 if (editorcxx . . $ editor..timingModecxx . . $ editor_t#timingMode. == TEMPO_MODE_VBLANKcxx . . $ TEMPO_MODE_VBLANK.)
1086 return;
1087
1088 int32_tcxx . . $ int32_t# val = songcxx . . $ song.->currBPMcxx . . $ module_t#currBPM.;
1089 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1090 val -= 10;
1091 else
1092 val--;
1093
1094 if (val < 32)
1095 val = 32;
1096
1097 songcxx . . $ song.->currBPMcxx . . $ module_t#currBPM. = val;
1098 modSetTempocxx . . $ modSetTempo(918ebd27a9ddbad3).(songcxx . . $ song.->currBPMcxx . . $ module_t#currBPM., truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!);
1099 uicxx . . $ ui..updateSongBPMcxx . . $ ui_t#updateSongBPM. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1100 }
1101
1102 static void songLengthUpButtoncxx . . $ songLengthUpButton(49f6e7a06ebc5aa8).(void)
1103 {
1104 int16_tcxx . . $ int16_t# val = songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.;
1105 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1106 val += 10;
1107 else
1108 val++;
1109
1110 if (val > 128)
1111 val = 128;
1112
1113 songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength. = (uint8_tcxx . . $ uint8_t#)val;
1114
1115 val = songcxx . . $ song.->currPoscxx . . $ module_t#currPos.;
1116 if (val > songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.-1)
1117 val = songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.-1;
1118
1119 editorcxx . . $ editor..currPosEdPattDispcxx . . $ editor_t#currPosEdPattDisp. = &songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[val];
1120 uicxx . . $ ui..updateSongLengthcxx . . $ ui_t#updateSongLength. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1121 }
1122
1123 static void songLengthDownButtoncxx . . $ songLengthDownButton(49f6e7a06ebc5aa8).(void)
1124 {
1125 int16_tcxx . . $ int16_t# val = songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.;
1126
1127 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1128 val -= 10;
1129 else
1130 val--;
1131
1132 if (val < 1)
1133 val = 1;
1134
1135 songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength. = (uint8_tcxx . . $ uint8_t#)val;
1136
1137 val = songcxx . . $ song.->currPoscxx . . $ module_t#currPos.;
1138 if (val > songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.-1)
1139 val = songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.-1;
1140
1141 editorcxx . . $ editor..currPosEdPattDispcxx . . $ editor_t#currPosEdPattDisp. = &songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[val];
1142 uicxx . . $ ui..updateSongLengthcxx . . $ ui_t#updateSongLength. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1143 }
1144
1145 static void patternUpButtoncxx . . $ patternUpButton(49f6e7a06ebc5aa8).(void)
1146 {
1147 int16_tcxx . . $ int16_t# val = songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[songcxx . . $ song.->currPoscxx . . $ module_t#currPos.];
1148
1149 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1150 val += 10;
1151 else
1152 val++;
1153
1154 if (val > MAX_PATTERNScxx . . $ `src/pt2_header.h:75:9`!-1)
1155 val = MAX_PATTERNScxx . . $ `src/pt2_header.h:75:9`!-1;
1156
1157 songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[songcxx . . $ song.->currPoscxx . . $ module_t#currPos.] = (uint8_tcxx . . $ uint8_t#)val;
1158
1159 if (uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
1160 uicxx . . $ ui..updatePosEdcxx . . $ ui_t#updatePosEd. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1161
1162 uicxx . . $ ui..updateSongPatterncxx . . $ ui_t#updateSongPattern. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1163 }
1164
1165 static void patternDownButtoncxx . . $ patternDownButton(49f6e7a06ebc5aa8).(void)
1166 {
1167 int16_tcxx . . $ int16_t# val = songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[songcxx . . $ song.->currPoscxx . . $ module_t#currPos.];
1168
1169 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1170 val -= 10;
1171 else
1172 val--;
1173
1174 if (val < 0)
1175 val = 0;
1176
1177 songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[songcxx . . $ song.->currPoscxx . . $ module_t#currPos.] = (uint8_tcxx . . $ uint8_t#)val;
1178
1179 if (uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
1180 uicxx . . $ ui..updatePosEdcxx . . $ ui_t#updatePosEd. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1181
1182 uicxx . . $ ui..updateSongPatterncxx . . $ ui_t#updateSongPattern. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1183 }
1184
1185 static void positionUpButtoncxx . . $ positionUpButton(49f6e7a06ebc5aa8).(void)
1186 {
1187 int16_tcxx . . $ int16_t# val = songcxx . . $ song.->currPoscxx . . $ module_t#currPos.;
1188
1189 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1190 val += 10;
1191 else
1192 val++;
1193
1194 if (val > 127)
1195 val = 127;
1196
1197 modSetPoscxx . . $ modSetPos(af780a7c10c7990f).(val, DONT_SET_ROWcxx . . $ DONT_SET_ROW.);
1198 }
1199
1200 static void positionDownButtoncxx . . $ positionDownButton(49f6e7a06ebc5aa8).(void)
1201 {
1202 int16_tcxx . . $ int16_t# val = songcxx . . $ song.->currPoscxx . . $ module_t#currPos.;
1203
1204 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1205 val -= 10;
1206 else
1207 val--;
1208
1209 if (val < 0)
1210 val = 0;
1211
1212 modSetPoscxx . . $ modSetPos(af780a7c10c7990f).(val, DONT_SET_ROWcxx . . $ DONT_SET_ROW.);
1213 }
1214
1215 static void handleSamplerVolumeBoxcxx . . $ handleSamplerVolumeBox(49f6e7a06ebc5aa8).(void)
1216 {
1217 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1218 {
1219 if (uicxx . . $ ui..editTextFlagcxx . . $ ui_t#editTextFlag.)
1220 {
1221 leaveTextEditModecxx . . $ leaveTextEditMode(b45ddcbc8423892c).(EDIT_TEXT_NO_UPDATEcxx . . $ EDIT_TEXT_NO_UPDATE.);
1222 }
1223 else
1224 {
1225 uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1226 removeSamplerVolBoxcxx . . $ removeSamplerVolBox(49f6e7a06ebc5aa8).();
1227 }
1228
1229 return;
1230 }
1231
1232 if (uicxx . . $ ui..editTextFlagcxx . . $ ui_t#editTextFlag.)
1233 return;
1234
1235 // check buttons
1236 if (mousecxx . . $ mouse..leftButtonPressedcxx . . $ mouse_t#leftButtonPressed.)
1237 {
1238 // MAIN SCREEN STOP
1239 if (!uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown. && !uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
1240 {
1241 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 182 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 243 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 0 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 10)
1242 {
1243 modStopcxx . . $ modStop(49f6e7a06ebc5aa8).();
1244 return;
1245 }
1246 }
1247
1248 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 32 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 95)
1249 {
1250 // SAMPLER SCREEN PLAY WAVEFORM
1251 if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 211 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 221)
1252 {
1253 samplerPlayWaveformcxx . . $ samplerPlayWaveform(49f6e7a06ebc5aa8).();
1254 return;
1255 }
1256
1257 // SAMPLER SCREEN PLAY DISPLAY
1258 else if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 222 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 232)
1259 {
1260 samplerPlayDisplaycxx . . $ samplerPlayDisplay(49f6e7a06ebc5aa8).();
1261 return;
1262 }
1263
1264 // SAMPLER SCREEN PLAY RANGE
1265 else if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 233 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 243)
1266 {
1267 samplerPlayRangecxx . . $ samplerPlayRange(49f6e7a06ebc5aa8).();
1268 return;
1269 }
1270 }
1271
1272 // SAMPLER SCREEN STOP
1273 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 0 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 31 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 222 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 243)
1274 {
1275 turnOffVoicescxx . . $ turnOffVoices(49f6e7a06ebc5aa8).();
1276 return;
1277 }
1278
1279 // VOLUME button (toggle)
1280 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 96 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 135 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 244 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 254)
1281 {
1282 uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1283 removeSamplerVolBoxcxx . . $ removeSamplerVolBox(49f6e7a06ebc5aa8).();
1284 return;
1285 }
1286
1287 // DRAG BOXES
1288 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 72 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 173 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 154 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 175)
1289 {
1290 volBoxBarPressedcxx . . $ volBoxBarPressed(b45ddcbc8423892c).(MOUSE_BUTTON_NOT_HELDcxx . . $ MOUSE_BUTTON_NOT_HELD.);
1291 return;
1292 }
1293
1294 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 174 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 207)
1295 {
1296 // FROM NUM
1297 if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 154 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 164)
1298 {
1299 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = editorcxx . . $ editor..vol1cxx . . $ editor_t#vol1.;
1300 editorcxx . . $ editor..vol1Dispcxx . . $ editor_t#vol1Disp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
1301 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
1302 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 3;
1303 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 176;
1304 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 162;
1305 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_SA_VOL_FROM_NUMcxx . . $ PTB_SA_VOL_FROM_NUM.);
1306 return;
1307 }
1308
1309 // TO NUM
1310 else if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 165 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 175)
1311 {
1312 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = editorcxx . . $ editor..vol2cxx . . $ editor_t#vol2.;
1313 editorcxx . . $ editor..vol2Dispcxx . . $ editor_t#vol2Disp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
1314 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
1315 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 3;
1316 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 176;
1317 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 173;
1318 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_SA_VOL_TO_NUMcxx . . $ PTB_SA_VOL_TO_NUM.);
1319 return;
1320 }
1321 }
1322
1323 if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 176 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 186)
1324 {
1325 // NORMALIZE
1326 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 101 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 143)
1327 {
1328 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
1329 {
1330 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
1331 return;
1332 }
1333
1334 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
1335 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
1336 {
1337 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
1338 return;
1339 }
1340
1341 int8_tcxx . . $ int8_t# *sampleData = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.];
1342
1343 int32_tcxx . . $ int32_t# from = 0;
1344 int32_tcxx . . $ int32_t# to = s->lengthcxx . . $ moduleSample_t#length.;
1345
1346 if (editorcxx . . $ editor..markStartOfscxx . . $ editor_t#markStartOfs. != -1)
1347 {
1348 from = editorcxx . . $ editor..markStartOfscxx . . $ editor_t#markStartOfs.;
1349 to = editorcxx . . $ editor..markEndOfscxx . . $ editor_t#markEndOfs.;
1350
1351 if (to > s->lengthcxx . . $ moduleSample_t#length.)
1352 to = s->lengthcxx . . $ moduleSample_t#length.;
1353
1354 if (from == to || from >= s->lengthcxx . . $ moduleSample_t#length. || to < from)
1355 {
1356 from = 0;
1357 to = s->lengthcxx . . $ moduleSample_t#length.;
1358 }
1359 }
1360
1361 int32_tcxx . . $ int32_t# hi = 0;
1362 for (int32_tcxx . . $ int32_t# i = from; i < to; i++)
1363 {
1364 const int32_tcxx . . $ int32_t# sample = ABScxx . . $ `src/pt2_helpers.h:33:9`!(sampleData[i]);
1365 if (sample > hi)
1366 hi = sample;
1367 }
1368
1369 if (hi <= 0 || hi > 127)
1370 {
1371 editorcxx . . $ editor..vol1cxx . . $ editor_t#vol1. = 100;
1372 editorcxx . . $ editor..vol2cxx . . $ editor_t#vol2. = 100;
1373 }
1374 else if (hi < 64)
1375 {
1376 editorcxx . . $ editor..vol1cxx . . $ editor_t#vol1. = 200;
1377 editorcxx . . $ editor..vol2cxx . . $ editor_t#vol2. = 200;
1378 }
1379 else
1380 {
1381 editorcxx . . $ editor..vol1cxx . . $ editor_t#vol1. = (uint16_tcxx . . $ uint16_t#)((100 * 127) / hi);
1382 editorcxx . . $ editor..vol2cxx . . $ editor_t#vol2. = (uint16_tcxx . . $ uint16_t#)((100 * 127) / hi);
1383 }
1384
1385 uicxx . . $ ui..updateVolFromTextcxx . . $ ui_t#updateVolFromText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1386 uicxx . . $ ui..updateVolToTextcxx . . $ ui_t#updateVolToText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1387
1388 showVolFromSlidercxx . . $ showVolFromSlider(49f6e7a06ebc5aa8).();
1389 showVolToSlidercxx . . $ showVolToSlider(49f6e7a06ebc5aa8).();
1390 return;
1391 }
1392
1393 // RAMP DOWN
1394 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 144 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 153)
1395 {
1396 editorcxx . . $ editor..vol1cxx . . $ editor_t#vol1. = 100;
1397 editorcxx . . $ editor..vol2cxx . . $ editor_t#vol2. = 0;
1398 uicxx . . $ ui..updateVolFromTextcxx . . $ ui_t#updateVolFromText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1399 uicxx . . $ ui..updateVolToTextcxx . . $ ui_t#updateVolToText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1400 showVolFromSlidercxx . . $ showVolFromSlider(49f6e7a06ebc5aa8).();
1401 showVolToSlidercxx . . $ showVolToSlider(49f6e7a06ebc5aa8).();
1402 return;
1403 }
1404
1405 // RAMP UP
1406 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 154 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 163)
1407 {
1408 editorcxx . . $ editor..vol1cxx . . $ editor_t#vol1. = 0;
1409 editorcxx . . $ editor..vol2cxx . . $ editor_t#vol2. = 100;
1410 uicxx . . $ ui..updateVolFromTextcxx . . $ ui_t#updateVolFromText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1411 uicxx . . $ ui..updateVolToTextcxx . . $ ui_t#updateVolToText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1412 showVolFromSlidercxx . . $ showVolFromSlider(49f6e7a06ebc5aa8).();
1413 showVolToSlidercxx . . $ showVolToSlider(49f6e7a06ebc5aa8).();
1414 return;
1415 }
1416
1417 // RAMP UNITY
1418 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 164 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 173)
1419 {
1420 editorcxx . . $ editor..vol1cxx . . $ editor_t#vol1. = 100;
1421 editorcxx . . $ editor..vol2cxx . . $ editor_t#vol2. = 100;
1422 uicxx . . $ ui..updateVolFromTextcxx . . $ ui_t#updateVolFromText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1423 uicxx . . $ ui..updateVolToTextcxx . . $ ui_t#updateVolToText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1424 showVolFromSlidercxx . . $ showVolFromSlider(49f6e7a06ebc5aa8).();
1425 showVolToSlidercxx . . $ showVolToSlider(49f6e7a06ebc5aa8).();
1426 return;
1427 }
1428
1429 // CANCEL
1430 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 174 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 207)
1431 {
1432 uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1433 removeSamplerVolBoxcxx . . $ removeSamplerVolBox(49f6e7a06ebc5aa8).();
1434 return;
1435 }
1436
1437 // RAMP
1438 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 72 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 100)
1439 {
1440 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
1441 {
1442 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
1443 return;
1444 }
1445
1446 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
1447 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
1448 {
1449 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
1450 return;
1451 }
1452
1453 if (editorcxx . . $ editor..vol1cxx . . $ editor_t#vol1. == 100 && editorcxx . . $ editor..vol2cxx . . $ editor_t#vol2. == 100)
1454 {
1455 uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1456 removeSamplerVolBoxcxx . . $ removeSamplerVolBox(49f6e7a06ebc5aa8).();
1457 return;
1458 }
1459
1460 int8_tcxx . . $ int8_t# *sampleData = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.];
1461
1462 int32_tcxx . . $ int32_t# from = 0;
1463 int32_tcxx . . $ int32_t# to = s->lengthcxx . . $ moduleSample_t#length.;
1464
1465 if (editorcxx . . $ editor..markStartOfscxx . . $ editor_t#markStartOfs. != -1)
1466 {
1467 from = editorcxx . . $ editor..markStartOfscxx . . $ editor_t#markStartOfs.;
1468 to = editorcxx . . $ editor..markEndOfscxx . . $ editor_t#markEndOfs.;
1469
1470 if (to > s->lengthcxx . . $ moduleSample_t#length.)
1471 to = s->lengthcxx . . $ moduleSample_t#length.;
1472
1473 if (from == to || from >= s->lengthcxx . . $ moduleSample_t#length. || to < from)
1474 {
1475 from = 0;
1476 to = s->lengthcxx . . $ moduleSample_t#length.;
1477 }
1478 }
1479
1480 const int32_tcxx . . $ int32_t# markLength = to - from;
1481
1482 double dToFrac = 0.0;
1483 double dFromFrac = editorcxx . . $ editor..vol1cxx . . $ editor_t#vol1.;
1484
1485 double dToDelta = (double)editorcxx . . $ editor..vol2cxx . . $ editor_t#vol2. / markLength;
1486 double dFromDelta = (double)editorcxx . . $ editor..vol1cxx . . $ editor_t#vol1. / markLength;
1487
1488 for (int32_tcxx . . $ int32_t# i = from; i < to; i++)
1489 {
1490 double dSmp = ((dToFrac + dFromFrac) * sampleData[i]) * (1.0 / 100.0);
1491 int32_tcxx . . $ int32_t# smp32 = (int32_tcxx . . $ int32_t#)dSmp;
1492 sampleData[i] = (int8_tcxx . . $ int8_t#)(CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(smp32, INT8_MINcxx . . $ `<external>/3415975807581488833/stdint.h:105:10`!, INT8_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:110:10`!));
1493
1494 dToFrac += dToDelta;
1495 dFromFrac -= dFromDelta;
1496 }
1497
1498 fixSampleBeepcxx . . $ fixSampleBeep(60146f4515acbace).(s);
1499
1500 uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1501 removeSamplerVolBoxcxx . . $ removeSamplerVolBox(49f6e7a06ebc5aa8).();
1502
1503 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
1504 }
1505 }
1506 }
1507 }
1508
1509 static void handleRepeatedSamplerFilterButtonscxx . . $ handleRepeatedSamplerFilterButtons(49f6e7a06ebc5aa8).(void)
1510 {
1511 if (!mousecxx . . $ mouse..leftButtonPressedcxx . . $ mouse_t#leftButtonPressed. || mousecxx . . $ mouse..lastSmpFilterButtoncxx . . $ mouse_t#lastSmpFilterButton. == -1)
1512 return;
1513
1514 switch (mousecxx . . $ mouse..lastSmpFilterButtoncxx . . $ mouse_t#lastSmpFilterButton.)
1515 {
1516 case 0: // low-pass cutoff up
1517 {
1518 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1519 {
1520 if (editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. <= 0xFFFF-50)
1521 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. += 50;
1522 else
1523 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = 0xFFFF;
1524 }
1525 else
1526 {
1527 if (editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. < 0xFFFF)
1528 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff.++;
1529 else
1530 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = 0xFFFF;
1531 }
1532
1533 if (editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. > (uint16_tcxx . . $ uint16_t#)(FILTERS_BASE_FREQcxx . . $ `src/pt2_audio.h:8:9`!/2))
1534 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = (uint16_tcxx . . $ uint16_t#)(FILTERS_BASE_FREQcxx . . $ `src/pt2_audio.h:8:9`!/2);
1535
1536 uicxx . . $ ui..updateLPTextcxx . . $ ui_t#updateLPText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1537 }
1538 break;
1539
1540 case 1: // low-pass cutoff down
1541 {
1542 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1543 {
1544 if (editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. >= 50)
1545 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. -= 50;
1546 else
1547 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = 0;
1548 }
1549 else
1550 {
1551 if (editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. > 0)
1552 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff.--;
1553 else
1554 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = 0;
1555 }
1556
1557 uicxx . . $ ui..updateLPTextcxx . . $ ui_t#updateLPText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1558 }
1559 break;
1560
1561 case 2: // high-pass cutoff up
1562 {
1563 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1564 {
1565 if (editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. <= 0xFFFF-50)
1566 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. += 50;
1567 else
1568 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = 0xFFFF;
1569 }
1570 else
1571 {
1572 if (editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. < 0xFFFF)
1573 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff.++;
1574 else
1575 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = 0xFFFF;
1576 }
1577
1578 if (editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. > (uint16_tcxx . . $ uint16_t#)(FILTERS_BASE_FREQcxx . . $ `src/pt2_audio.h:8:9`!/2))
1579 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = (uint16_tcxx . . $ uint16_t#)(FILTERS_BASE_FREQcxx . . $ `src/pt2_audio.h:8:9`!/2);
1580
1581 uicxx . . $ ui..updateHPTextcxx . . $ ui_t#updateHPText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1582 }
1583 break;
1584
1585 case 3: // high-pass cutoff down
1586 {
1587 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1588 {
1589 if (editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. >= 50)
1590 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. -= 50;
1591 else
1592 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = 0;
1593 }
1594 else
1595 {
1596 if (editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. > 0)
1597 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff.--;
1598 else
1599 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = 0;
1600 }
1601
1602 uicxx . . $ ui..updateHPTextcxx . . $ ui_t#updateHPText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1603 }
1604 break;
1605
1606 default: break;
1607 }
1608 }
1609
1610 static void handleSamplerFiltersBoxcxx . . $ handleSamplerFiltersBox(49f6e7a06ebc5aa8).(void)
1611 {
1612 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed. && uicxx . . $ ui..editTextFlagcxx . . $ ui_t#editTextFlag.)
1613 {
1614 leaveTextEditModecxx . . $ leaveTextEditMode(b45ddcbc8423892c).(EDIT_TEXT_NO_UPDATEcxx . . $ EDIT_TEXT_NO_UPDATE.);
1615 return;
1616 }
1617
1618 if (uicxx . . $ ui..editTextFlagcxx . . $ ui_t#editTextFlag. || mousecxx . . $ mouse..lastSmpFilterButtoncxx . . $ mouse_t#lastSmpFilterButton. > -1 || !mousecxx . . $ mouse..leftButtonPressedcxx . . $ mouse_t#leftButtonPressed.)
1619 return;
1620
1621 // FILTERS button (toggle)
1622 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 211 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 245 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 244 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 254)
1623 {
1624 uicxx . . $ ui..samplerFiltersBoxShowncxx . . $ ui_t#samplerFiltersBoxShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1625 removeSamplerFiltersBoxcxx . . $ removeSamplerFiltersBox(49f6e7a06ebc5aa8).();
1626 return;
1627 }
1628
1629 // MAIN SCREEN STOP
1630 if (!uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown. && !uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
1631 {
1632 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 182 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 243 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 0 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 10)
1633 {
1634 modStopcxx . . $ modStop(49f6e7a06ebc5aa8).();
1635 return;
1636 }
1637 }
1638
1639 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 32 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 95)
1640 {
1641 // SAMPLER SCREEN PLAY WAVEFORM
1642 if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 211 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 221)
1643 {
1644 samplerPlayWaveformcxx . . $ samplerPlayWaveform(49f6e7a06ebc5aa8).();
1645 return;
1646 }
1647
1648 // SAMPLER SCREEN PLAY DISPLAY
1649 else if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 222 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 232)
1650 {
1651 samplerPlayDisplaycxx . . $ samplerPlayDisplay(49f6e7a06ebc5aa8).();
1652 return;
1653 }
1654
1655 // SAMPLER SCREEN PLAY RANGE
1656 else if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 233 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 243)
1657 {
1658 samplerPlayRangecxx . . $ samplerPlayRange(49f6e7a06ebc5aa8).();
1659 return;
1660 }
1661 }
1662
1663 // SAMPLER SCREEN STOP
1664 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 0 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 31 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 222 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 243)
1665 {
1666 turnOffVoicescxx . . $ turnOffVoices(49f6e7a06ebc5aa8).();
1667 return;
1668 }
1669
1670 // UNDO
1671 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 65 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 75 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 154 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 184)
1672 {
1673 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
1674 {
1675 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
1676 return;
1677 }
1678
1679 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
1680 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
1681 {
1682 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
1683 }
1684 else
1685 {
1686 memcpycxx . . $ memcpy(cc817cb175f282d).(&songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.], samplercxx . . $ sampler..sampleUndoCopycxx . . $ sampler_t#sampleUndoCopy., configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.);
1687 redrawSamplecxx . . $ redrawSample(49f6e7a06ebc5aa8).();
1688 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
1689 renderSamplerFiltersBoxcxx . . $ renderSamplerFiltersBox(49f6e7a06ebc5aa8).();
1690 }
1691
1692 return;
1693 }
1694
1695 if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 154 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 164)
1696 {
1697 // DO LOW-PASS FILTER
1698 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 76 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 165)
1699 {
1700 lowPassSamplecxx . . $ lowPassSample(d4f767463ce0a6b3).(editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff.);
1701 renderSamplerFiltersBoxcxx . . $ renderSamplerFiltersBox(49f6e7a06ebc5aa8).();
1702 return;
1703 }
1704
1705 // LOW-PASS CUTOFF
1706 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 166 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 217)
1707 {
1708 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1709 {
1710 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = 0;
1711 uicxx . . $ ui..updateLPTextcxx . . $ ui_t#updateLPText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1712 }
1713 else
1714 {
1715 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff.;
1716 editorcxx . . $ editor..lpCutOffDispcxx . . $ editor_t#lpCutOffDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
1717 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
1718 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 4;
1719 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 168;
1720 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 162;
1721 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_SA_FIL_LP_CUTOFFcxx . . $ PTB_SA_FIL_LP_CUTOFF.);
1722 }
1723
1724 return;
1725 }
1726
1727 // LOW-PASS CUTOFF UP
1728 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 218 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 228)
1729 {
1730 mousecxx . . $ mouse..lastSmpFilterButtoncxx . . $ mouse_t#lastSmpFilterButton. = 0;
1731 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1732 {
1733 if (editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. <= 0xFFFF-100)
1734 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. += 100;
1735 else
1736 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = 0xFFFF;
1737 }
1738 else
1739 {
1740 if (editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. < 0xFFFF)
1741 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff.++;
1742 else
1743 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = 0xFFFF;
1744 }
1745
1746 if (editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. > (uint16_tcxx . . $ uint16_t#)(FILTERS_BASE_FREQcxx . . $ `src/pt2_audio.h:8:9`!/2))
1747 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = (uint16_tcxx . . $ uint16_t#)(FILTERS_BASE_FREQcxx . . $ `src/pt2_audio.h:8:9`!/2);
1748
1749 uicxx . . $ ui..updateLPTextcxx . . $ ui_t#updateLPText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1750 return;
1751 }
1752
1753 // LOW-PASS CUTOFF DOWN
1754 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 229 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 239)
1755 {
1756 mousecxx . . $ mouse..lastSmpFilterButtoncxx . . $ mouse_t#lastSmpFilterButton. = 1;
1757 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1758 {
1759 if (editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. >= 100)
1760 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. -= 100;
1761 else
1762 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = 0;
1763 }
1764 else
1765 {
1766 if (editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. > 0)
1767 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff.--;
1768 else
1769 editorcxx . . $ editor..lpCutOffcxx . . $ editor_t#lpCutOff. = 0;
1770 }
1771
1772 uicxx . . $ ui..updateLPTextcxx . . $ ui_t#updateLPText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1773 return;
1774 }
1775 }
1776
1777 if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 164 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 174)
1778 {
1779 // DO HIGH-PASS FILTER
1780 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 76 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 165)
1781 {
1782 highPassSamplecxx . . $ highPassSample(d4f767463ce0a6b3).(editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff.);
1783 renderSamplerFiltersBoxcxx . . $ renderSamplerFiltersBox(49f6e7a06ebc5aa8).();
1784 return;
1785 }
1786
1787 // HIGH-PASS CUTOFF
1788 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 166 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 217)
1789 {
1790 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1791 {
1792 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = 0;
1793 uicxx . . $ ui..updateHPTextcxx . . $ ui_t#updateHPText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1794 }
1795 else
1796 {
1797 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff.;
1798 editorcxx . . $ editor..hpCutOffDispcxx . . $ editor_t#hpCutOffDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
1799 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
1800 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 4;
1801 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 168;
1802 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 173;
1803 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_SA_FIL_HP_CUTOFFcxx . . $ PTB_SA_FIL_HP_CUTOFF.);
1804 }
1805
1806 return;
1807 }
1808
1809 // HIGH-PASS CUTOFF UP
1810 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 218 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 228)
1811 {
1812 mousecxx . . $ mouse..lastSmpFilterButtoncxx . . $ mouse_t#lastSmpFilterButton. = 2;
1813 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1814 {
1815 if (editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. <= 0xFFFF-100)
1816 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. += 100;
1817 else
1818 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = 0xFFFF;
1819 }
1820 else
1821 {
1822 if (editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. < 0xFFFF)
1823 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff.++;
1824 else
1825 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = 0xFFFF;
1826 }
1827
1828 if (editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. > (uint16_tcxx . . $ uint16_t#)(FILTERS_BASE_FREQcxx . . $ `src/pt2_audio.h:8:9`!/2))
1829 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = (uint16_tcxx . . $ uint16_t#)(FILTERS_BASE_FREQcxx . . $ `src/pt2_audio.h:8:9`!/2);
1830
1831 uicxx . . $ ui..updateHPTextcxx . . $ ui_t#updateHPText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1832 return;
1833 }
1834
1835 // HIGH-PASS CUTOFF DOWN
1836 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 229 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 239)
1837 {
1838 mousecxx . . $ mouse..lastSmpFilterButtoncxx . . $ mouse_t#lastSmpFilterButton. = 3;
1839 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
1840 {
1841 if (editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. >= 100)
1842 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. -= 100;
1843 else
1844 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = 0;
1845 }
1846 else
1847 {
1848 if (editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. > 0)
1849 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff.--;
1850 else
1851 editorcxx . . $ editor..hpCutOffcxx . . $ editor_t#hpCutOff. = 0;
1852 }
1853
1854 uicxx . . $ ui..updateHPTextcxx . . $ ui_t#updateHPText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1855 return;
1856 }
1857 }
1858
1859 // NORMALIZE SAMPLE FLAG
1860 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 76 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 239 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 174 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 186)
1861 {
1862 editorcxx . . $ editor..normalizeFiltersFlagcxx . . $ editor_t#normalizeFiltersFlag. ^= 1;
1863 uicxx . . $ ui..updateNormFlagcxx . . $ ui_t#updateNormFlag. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1864 return;
1865 }
1866
1867 // EXIT
1868 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 240 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 250 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 154 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 186)
1869 {
1870 uicxx . . $ ui..samplerFiltersBoxShowncxx . . $ ui_t#samplerFiltersBoxShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1871 removeSamplerFiltersBoxcxx . . $ removeSamplerFiltersBox(49f6e7a06ebc5aa8).();
1872 }
1873 }
1874
1875 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! withinButtonRectcxx . . $ withinButtonRect(af1d4efca8998838).(const guiButton_tcxx . . $ guiButton_t# *b)
1876 {
1877 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= b->x1cxx . . $ guiButton_t#x1. && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= b->x2cxx . . $ guiButton_t#x2. && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= b->y1cxx . . $ guiButton_t#y1. && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= b->y2cxx . . $ guiButton_t#y2.)
1878 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1879
1880 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
1881 }
1882
1883 #define TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bStruct, bNum) \
1884 for (uint32_t i = 0; i < bNum; i++) \
1885 if (withinButtonRect(&bStruct[i])) \
1886 return bStruct[i].b; \
1887
1888 static int32_tcxx . . $ int32_t# checkGUIButtonscxx . . $ checkGUIButtons(b126dc7c1de90089).(void)
1889 {
1890 // QUIT (xy 0,0) works on all screens except for ask/clear screen
1891 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. == 0 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. == 0)
1892 return PTB_QUITcxx . . $ PTB_QUIT.;
1893
1894 // top screen buttons
1895 if (uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown.)
1896 {
1897 TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bDiskOp, DISKOP_BUTTONScxx . . $ `src/pt2_tables.h:32:9`!);
1898 }
1899 else
1900 {
1901 if (uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
1902 {
1903 TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bPosEd, POSED_BUTTONScxx . . $ `src/pt2_tables.h:33:9`!);
1904 }
1905 else if (uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown.)
1906 {
1907 switch (uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen.)
1908 {
1909 default:
1910 case 0: TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bEditOp1, EDITOP1_BUTTONScxx . . $ `src/pt2_tables.h:34:9`!); break;
1911 case 1: TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bEditOp2, EDITOP2_BUTTONScxx . . $ `src/pt2_tables.h:35:9`!); break;
1912 case 2: TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bEditOp3, EDITOP3_BUTTONScxx . . $ `src/pt2_tables.h:36:9`!); break;
1913 case 3: TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bEditOp4, EDITOP4_BUTTONScxx . . $ `src/pt2_tables.h:37:9`!); break;
1914 }
1915 }
1916
1917 TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bTopScreen, TOPSCREEN_BUTTONScxx . . $ `src/pt2_tables.h:29:9`!);
1918 }
1919
1920 // middle buttons (always present)
1921 TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bMidScreen, MIDSCREEN_BUTTONScxx . . $ `src/pt2_tables.h:30:9`!);
1922
1923 // bottom screen buttons
1924 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
1925 {
1926 TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bSampler, SAMPLER_BUTTONScxx . . $ `src/pt2_tables.h:38:9`!);
1927 }
1928 else
1929 {
1930 TEST_BUTTONScxx . . $ `src/pt2_mouse.c:1883:9`!(bBotScreen, BOTSCREEN_BUTTONScxx . . $ `src/pt2_tables.h:31:9`!);
1931 }
1932
1933 return -1;
1934 }
1935
1936 void mouseWheelUpHandlercxx . . $ mouseWheelUpHandler(49f6e7a06ebc5aa8).(void)
1937 {
1938 if (uicxx . . $ ui..editTextFlagcxx . . $ ui_t#editTextFlag. || uicxx . . $ ui..askBoxShowncxx . . $ ui_t#askBoxShown. || editorcxx . . $ editor..swapChannelFlagcxx . . $ editor_t#swapChannelFlag. ||
1939 uicxx . . $ ui..samplingBoxShowncxx . . $ ui_t#samplingBoxShown. || uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. || uicxx . . $ ui..samplerFiltersBoxShowncxx . . $ ui_t#samplerFiltersBoxShown.)
1940 return;
1941
1942 if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. < 121)
1943 {
1944 // upper part of screen
1945 if (uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown.)
1946 {
1947 if (diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. > 0)
1948 {
1949 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset.--;
1950 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1951 }
1952 }
1953 else if (uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
1954 {
1955 posEdScrollUpcxx . . $ posEdScrollUp(49f6e7a06ebc5aa8).();
1956 }
1957 }
1958 else if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.) // lower part of screen
1959 {
1960 samplerZoomInMouseWheelcxx . . $ samplerZoomInMouseWheel(49f6e7a06ebc5aa8).();
1961 }
1962 else if (!editorcxx . . $ editor..songPlayingcxx . . $ editor_t#songPlaying. && songcxx . . $ song.->currRowcxx . . $ module_t#currRow. > 0)
1963 {
1964 modSetPoscxx . . $ modSetPos(af780a7c10c7990f).(DONT_SET_ORDERcxx . . $ DONT_SET_ORDER., songcxx . . $ song.->currRowcxx . . $ module_t#currRow. - 1); // pattern data
1965 }
1966 }
1967
1968 void mouseWheelDownHandlercxx . . $ mouseWheelDownHandler(49f6e7a06ebc5aa8).(void)
1969 {
1970 if (uicxx . . $ ui..editTextFlagcxx . . $ ui_t#editTextFlag. || uicxx . . $ ui..askBoxShowncxx . . $ ui_t#askBoxShown. || editorcxx . . $ editor..swapChannelFlagcxx . . $ editor_t#swapChannelFlag. ||
1971 uicxx . . $ ui..samplingBoxShowncxx . . $ ui_t#samplingBoxShown. || uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. || uicxx . . $ ui..samplerFiltersBoxShowncxx . . $ ui_t#samplerFiltersBoxShown.)
1972 return;
1973
1974 if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. < 121)
1975 {
1976 // upper part of screen
1977 if (uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown.)
1978 {
1979 if (diskopcxx . . $ diskop..numEntriescxx . . $ diskop_t#numEntries. > DISKOP_LINEScxx . . $ `src/pt2_diskop.h:13:9`! && diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. < diskopcxx . . $ diskop..numEntriescxx . . $ diskop_t#numEntries.-DISKOP_LINEScxx . . $ `src/pt2_diskop.h:13:9`!)
1980 {
1981 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset.++;
1982 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
1983 }
1984 }
1985 else if (uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
1986 {
1987 posEdScrollDowncxx . . $ posEdScrollDown(49f6e7a06ebc5aa8).();
1988 }
1989 }
1990 else if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.) // lower part of screen
1991 {
1992 if (!uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. && !uicxx . . $ ui..samplerFiltersBoxShowncxx . . $ ui_t#samplerFiltersBoxShown.)
1993 samplerZoomOutMouseWheelcxx . . $ samplerZoomOutMouseWheel(49f6e7a06ebc5aa8).();
1994 }
1995 else if (!editorcxx . . $ editor..songPlayingcxx . . $ editor_t#songPlaying. && songcxx . . $ song.->currRowcxx . . $ module_t#currRow. < MOD_ROWScxx . . $ `src/pt2_header.h:73:9`!)
1996 {
1997 modSetPoscxx . . $ modSetPos(af780a7c10c7990f).(DONT_SET_ORDERcxx . . $ DONT_SET_ORDER., songcxx . . $ song.->currRowcxx . . $ module_t#currRow. + 1); // pattern data
1998 }
1999 }
2000
2001 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! handleRightMouseButtoncxx . . $ handleRightMouseButton(c9857a73d68e59ba).(void)
2002 {
2003 if (!mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
2004 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2005
2006 // exit sample swap mode with right mouse button (if present)
2007 if (editorcxx . . $ editor..swapChannelFlagcxx . . $ editor_t#swapChannelFlag.)
2008 {
2009 editorcxx . . $ editor..swapChannelFlagcxx . . $ editor_t#swapChannelFlag. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2010 pointerSetPreviousModecxx . . $ pointerSetPreviousMode(49f6e7a06ebc5aa8).();
2011 setPrevStatusMessagecxx . . $ setPrevStatusMessage(49f6e7a06ebc5aa8).();
2012 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2013 }
2014
2015 // toggle channel muting with right mouse button
2016 if (uicxx . . $ ui..visualizerModecxx . . $ ui_t#visualizerMode. == VISUAL_QUADRASCOPEcxx . . $ VISUAL_QUADRASCOPE. && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 55 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 87)
2017 {
2018 if (!uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown. && !uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown. && !uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown. &&
2019 !uicxx . . $ ui..aboutScreenShowncxx . . $ ui_t#aboutScreenShown. && !uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. &&
2020 !uicxx . . $ ui..samplerFiltersBoxShowncxx . . $ ui_t#samplerFiltersBoxShown. && !uicxx . . $ ui..samplingBoxShowncxx . . $ ui_t#samplingBoxShown. &&
2021 !editorcxx . . $ editor..mod2WavOngoingcxx . . $ editor_t#mod2WavOngoing.)
2022 {
2023 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. > 127 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 167) editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[0] ^= 1;
2024 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. > 175 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 215) editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[1] ^= 1;
2025 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. > 223 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 263) editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[2] ^= 1;
2026 else if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. > 271 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= 311) editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[3] ^= 1;
2027
2028 renderMuteButtonscxx . . $ renderMuteButtons(49f6e7a06ebc5aa8).();
2029 }
2030 }
2031
2032 // sample hand drawing
2033 if (mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 138 && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= 201 && uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown. &&
2034 !uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. && !uicxx . . $ ui..samplerFiltersBoxShowncxx . . $ ui_t#samplerFiltersBoxShown. && !uicxx . . $ ui..samplingBoxShowncxx . . $ ui_t#samplingBoxShown.)
2035 {
2036 samplerEditSamplecxx . . $ samplerEditSample(b45ddcbc8423892c).(falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!);
2037 }
2038
2039 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2040 }
2041
2042 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! handleLeftMouseButtoncxx . . $ handleLeftMouseButton(c9857a73d68e59ba).(void)
2043 {
2044 if (editorcxx . . $ editor..swapChannelFlagcxx . . $ editor_t#swapChannelFlag. || uicxx . . $ ui..editTextFlagcxx . . $ ui_t#editTextFlag.)
2045 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2046
2047 // handle volume toolbox in sampler screen
2048 if (uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown.)
2049 {
2050 handleSamplerVolumeBoxcxx . . $ handleSamplerVolumeBox(49f6e7a06ebc5aa8).();
2051 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2052 }
2053
2054 // handle filters toolbox in sampler screen
2055 else if (uicxx . . $ ui..samplerFiltersBoxShowncxx . . $ ui_t#samplerFiltersBoxShown.)
2056 {
2057 handleSamplerFiltersBoxcxx . . $ handleSamplerFiltersBox(49f6e7a06ebc5aa8).();
2058 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2059 }
2060
2061 // handle sampling toolbox in sampler screen
2062 else if (uicxx . . $ ui..samplingBoxShowncxx . . $ ui_t#samplingBoxShown.)
2063 {
2064 handleSamplingBoxcxx . . $ handleSamplingBox(49f6e7a06ebc5aa8).();
2065 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2066 }
2067
2068 // cancel note input gadgets with left/right mouse button
2069 if (uicxx . . $ ui..changingSmpResamplecxx . . $ ui_t#changingSmpResample. || uicxx . . $ ui..changingChordNotecxx . . $ ui_t#changingChordNote. || uicxx . . $ ui..changingDrumPadNotecxx . . $ ui_t#changingDrumPadNote. || uicxx . . $ ui..changingSamplingNotecxx . . $ ui_t#changingSamplingNote.)
2070 {
2071 if (mousecxx . . $ mouse..leftButtonPressedcxx . . $ mouse_t#leftButtonPressed. || mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
2072 {
2073 uicxx . . $ ui..changingSmpResamplecxx . . $ ui_t#changingSmpResample. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2074 uicxx . . $ ui..changingSamplingNotecxx . . $ ui_t#changingSamplingNote. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2075 uicxx . . $ ui..changingChordNotecxx . . $ ui_t#changingChordNote. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2076 uicxx . . $ ui..changingDrumPadNotecxx . . $ ui_t#changingDrumPadNote. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2077
2078 uicxx . . $ ui..updateResampleNotecxx . . $ ui_t#updateResampleNote. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2079 uicxx . . $ ui..updateChordNote1Textcxx . . $ ui_t#updateChordNote1Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2080 uicxx . . $ ui..updateChordNote2Textcxx . . $ ui_t#updateChordNote2Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2081 uicxx . . $ ui..updateChordNote3Textcxx . . $ ui_t#updateChordNote3Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2082 uicxx . . $ ui..updateChordNote4Textcxx . . $ ui_t#updateChordNote4Text. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2083
2084 setPrevStatusMessagecxx . . $ setPrevStatusMessage(49f6e7a06ebc5aa8).();
2085 pointerSetPreviousModecxx . . $ pointerSetPreviousMode(49f6e7a06ebc5aa8).();
2086 }
2087
2088 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2089 }
2090
2091 if (!mousecxx . . $ mouse..leftButtonPressedcxx . . $ mouse_t#leftButtonPressed.)
2092 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2093
2094 // if MOD2WAV is ongoing, only check CANCEL button
2095 if (editorcxx . . $ editor..mod2WavOngoingcxx . . $ editor_t#mod2WavOngoing.)
2096 {
2097 if (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= MOD2WAV_CANCEL_BTN_X1cxx . . $ `src/pt2_mod2wav.h:5:9`! && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. <= MOD2WAV_CANCEL_BTN_X2cxx . . $ `src/pt2_mod2wav.h:6:9`! &&
2098 mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= MOD2WAV_CANCEL_BTN_Y1cxx . . $ `src/pt2_mod2wav.h:7:9`! && mousecxx . . $ mouse..ycxx . . $ mouse_t#y. <= MOD2WAV_CANCEL_BTN_Y2cxx . . $ `src/pt2_mod2wav.h:8:9`!)
2099 {
2100 editorcxx . . $ editor..abortMod2Wavcxx . . $ editor_t#abortMod2Wav. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2101 }
2102
2103 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; // don't handle other buttons
2104 }
2105
2106 // if in fullscreen mode and the image isn't filling the whole screen, handle top left corner as quit
2107 if (videocxx . . $ video..fullscreencxx . . $ video_t#fullscreen. && (videocxx . . $ video..renderXcxx . . $ video_t#renderX. > 0 || videocxx . . $ video..renderYcxx . . $ video_t#renderY. > 0) && (mousecxx . . $ mouse..rawXcxx . . $ mouse_t#rawX. == 0 && mousecxx . . $ mouse..rawYcxx . . $ mouse_t#rawY. == 0))
2108 return handleGUIButtonscxx . . $ handleGUIButtons(83c267b20bac841a).(PTB_QUITcxx . . $ PTB_QUIT.);
2109
2110 int32_tcxx . . $ int32_t# guiButton = checkGUIButtonscxx . . $ checkGUIButtons(b126dc7c1de90089).();
2111 if (guiButton == -1)
2112 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2113
2114 return handleGUIButtonscxx . . $ handleGUIButtons(83c267b20bac841a).(guiButton);
2115 }
2116
2117 void updateMouseCounterscxx . . $ updateMouseCounters(49f6e7a06ebc5aa8).(void)
2118 {
2119 if (mousecxx . . $ mouse..buttonWaitingcxx . . $ mouse_t#buttonWaiting.)
2120 {
2121 if (++mousecxx . . $ mouse..buttonWaitCountercxx . . $ mouse_t#buttonWaitCounter. > VBLANK_HZcxx . . $ `src/pt2_header.h:58:9`!/4) // quarter of a second
2122 {
2123 mousecxx . . $ mouse..buttonWaitCountercxx . . $ mouse_t#buttonWaitCounter. = 0;
2124 mousecxx . . $ mouse..buttonWaitingcxx . . $ mouse_t#buttonWaiting. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2125 }
2126 }
2127
2128 if (editorcxx . . $ editor..errorMsgActivecxx . . $ editor_t#errorMsgActive.)
2129 {
2130 if (++editorcxx . . $ editor..errorMsgCountercxx . . $ editor_t#errorMsgCounter. >= VBLANK_HZcxx . . $ `src/pt2_header.h:58:9`!) // 1 second
2131 {
2132 editorcxx . . $ editor..errorMsgCountercxx . . $ editor_t#errorMsgCounter. = 0;
2133
2134 // don't reset status text/mouse color during certain modes
2135 if (!uicxx . . $ ui..askBoxShowncxx . . $ ui_t#askBoxShown. && !uicxx . . $ ui..changingChordNotecxx . . $ ui_t#changingChordNote. && !uicxx . . $ ui..changingDrumPadNotecxx . . $ ui_t#changingDrumPadNote. &&
2136 !uicxx . . $ ui..changingSmpResamplecxx . . $ ui_t#changingSmpResample. && !editorcxx . . $ editor..swapChannelFlagcxx . . $ editor_t#swapChannelFlag. && !uicxx . . $ ui..changingSamplingNotecxx . . $ ui_t#changingSamplingNote.)
2137 {
2138 pointerSetPreviousModecxx . . $ pointerSetPreviousMode(49f6e7a06ebc5aa8).();
2139 setPrevStatusMessagecxx . . $ setPrevStatusMessage(49f6e7a06ebc5aa8).();
2140 }
2141
2142 editorcxx . . $ editor..errorMsgActivecxx . . $ editor_t#errorMsgActive. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2143 editorcxx . . $ editor..errorMsgBlockcxx . . $ editor_t#errorMsgBlock. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2144
2145 if (uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown.)
2146 diskOpShowSelectTextcxx . . $ diskOpShowSelectText(49f6e7a06ebc5aa8).();
2147 }
2148 }
2149 }
2150
2151 static boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! handleGUIButtonscxx . . $ handleGUIButtons(83c267b20bac841a).(int32_tcxx . . $ int32_t# button) // are you prepared to enter the jungle?
2152 {
2153 textEditcxx . . $ textEdit..force32BitNumPtrcxx . . $ textEdit_t#force32BitNumPtr. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2154
2155 switch (button)
2156 {
2157 case PTB_DUMMYcxx . . $ PTB_DUMMY.: return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; // for gaps / empty spaces / dummies
2158
2159 case PTB_PAT2SMPcxx . . $ PTB_PAT2SMP.:
2160 {
2161 if (askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_PAT2SMPcxx . . $ ASKBOX_PAT2SMP., "PLEASE SELECT"))
2162 pat2SmpRendercxx . . $ pat2SmpRender(49f6e7a06ebc5aa8).();
2163 }
2164 break;
2165
2166 // Edit Op. All Screens
2167 case PTB_EO_TITLEBARcxx . . $ PTB_EO_TITLEBAR.:
2168 {
2169 if (uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 0) editorcxx . . $ editor..sampleAllFlagcxx . . $ editor_t#sampleAllFlag. ^= 1;
2170 else if (uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 1) editorcxx . . $ editor..trackPattFlagcxx . . $ editor_t#trackPattFlag. = (editorcxx . . $ editor..trackPattFlagcxx . . $ editor_t#trackPattFlag. + 1) % 3;
2171 else if (uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 2) editorcxx . . $ editor..halveSampleFlagcxx . . $ editor_t#halveSampleFlag. ^= 1;
2172 else if (uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 3) editorcxx . . $ editor..newOldFlagcxx . . $ editor_t#newOldFlag. ^= 1;
2173
2174 renderEditOpModecxx . . $ renderEditOpMode(49f6e7a06ebc5aa8).();
2175 }
2176 break;
2177
2178 case PTB_EO_1cxx . . $ PTB_EO_1.:
2179 {
2180 uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. = 0;
2181 renderEditOpScreencxx . . $ renderEditOpScreen(49f6e7a06ebc5aa8).();
2182 }
2183 break;
2184
2185 case PTB_EO_2cxx . . $ PTB_EO_2.:
2186 {
2187 uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. = 1;
2188 renderEditOpScreencxx . . $ renderEditOpScreen(49f6e7a06ebc5aa8).();
2189 }
2190 break;
2191
2192 case PTB_EO_3cxx . . $ PTB_EO_3.:
2193 {
2194 uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. = 2;
2195 renderEditOpScreencxx . . $ renderEditOpScreen(49f6e7a06ebc5aa8).();
2196 }
2197 break;
2198
2199 case PTB_EO_EXITcxx . . $ PTB_EO_EXIT.:
2200 {
2201 uicxx . . $ ui..aboutScreenShowncxx . . $ ui_t#aboutScreenShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2202 uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2203 displayMainScreencxx . . $ displayMainScreen(49f6e7a06ebc5aa8).();
2204 }
2205 break;
2206 // ----------------------------------------------------------
2207
2208 // Edit Op. Screen #1
2209 case PTB_EO_TRACK_NOTE_UPcxx . . $ PTB_EO_TRACK_NOTE_UP.: trackNoteUpcxx . . $ trackNoteUp(8f46639a028bea30).(editorcxx . . $ editor..sampleAllFlagcxx . . $ editor_t#sampleAllFlag., 0, MOD_ROWScxx . . $ `src/pt2_header.h:73:9`! - 1); break;
2210 case PTB_EO_TRACK_NOTE_DOWNcxx . . $ PTB_EO_TRACK_NOTE_DOWN.: trackNoteDowncxx . . $ trackNoteDown(8f46639a028bea30).(editorcxx . . $ editor..sampleAllFlagcxx . . $ editor_t#sampleAllFlag., 0, MOD_ROWScxx . . $ `src/pt2_header.h:73:9`! - 1); break;
2211 case PTB_EO_TRACK_OCTA_UPcxx . . $ PTB_EO_TRACK_OCTA_UP.: trackOctaUpcxx . . $ trackOctaUp(8f46639a028bea30).(editorcxx . . $ editor..sampleAllFlagcxx . . $ editor_t#sampleAllFlag., 0, MOD_ROWScxx . . $ `src/pt2_header.h:73:9`! - 1); break;
2212 case PTB_EO_TRACK_OCTA_DOWNcxx . . $ PTB_EO_TRACK_OCTA_DOWN.: trackOctaDowncxx . . $ trackOctaDown(8f46639a028bea30).(editorcxx . . $ editor..sampleAllFlagcxx . . $ editor_t#sampleAllFlag., 0, MOD_ROWScxx . . $ `src/pt2_header.h:73:9`! - 1); break;
2213 case PTB_EO_PATT_NOTE_UPcxx . . $ PTB_EO_PATT_NOTE_UP.: pattNoteUpcxx . . $ pattNoteUp(b45ddcbc8423892c).(editorcxx . . $ editor..sampleAllFlagcxx . . $ editor_t#sampleAllFlag.); break;
2214 case PTB_EO_PATT_NOTE_DOWNcxx . . $ PTB_EO_PATT_NOTE_DOWN.: pattNoteDowncxx . . $ pattNoteDown(b45ddcbc8423892c).(editorcxx . . $ editor..sampleAllFlagcxx . . $ editor_t#sampleAllFlag.); break;
2215 case PTB_EO_PATT_OCTA_UPcxx . . $ PTB_EO_PATT_OCTA_UP.: pattOctaUpcxx . . $ pattOctaUp(b45ddcbc8423892c).(editorcxx . . $ editor..sampleAllFlagcxx . . $ editor_t#sampleAllFlag.); break;
2216 case PTB_EO_PATT_OCTA_DOWNcxx . . $ PTB_EO_PATT_OCTA_DOWN.: pattOctaDowncxx . . $ pattOctaDown(b45ddcbc8423892c).(editorcxx . . $ editor..sampleAllFlagcxx . . $ editor_t#sampleAllFlag.); break;
2217 // ----------------------------------------------------------
2218
2219 // Edit Op. Screen #2
2220 case PTB_EO_RECORDcxx . . $ PTB_EO_RECORD.:
2221 {
2222 editorcxx . . $ editor..recordModecxx . . $ editor_t#recordMode. ^= 1;
2223 uicxx . . $ ui..updateRecordTextcxx . . $ ui_t#updateRecordText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2224 }
2225 break;
2226
2227 case PTB_EO_DELETEcxx . . $ PTB_EO_DELETE.: delSampleTrackcxx . . $ delSampleTrack(49f6e7a06ebc5aa8).(); break;
2228 case PTB_EO_EXCHGEcxx . . $ PTB_EO_EXCHGE.: exchSampleTrackcxx . . $ exchSampleTrack(49f6e7a06ebc5aa8).(); break;
2229 case PTB_EO_COPYcxx . . $ PTB_EO_COPY.: copySampleTrackcxx . . $ copySampleTrack(49f6e7a06ebc5aa8).(); break;
2230
2231 case PTB_EO_FROMcxx . . $ PTB_EO_FROM.:
2232 {
2233 editorcxx . . $ editor..sampleFromcxx . . $ editor_t#sampleFrom. = editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample. + 1;
2234 uicxx . . $ ui..updateFromTextcxx . . $ ui_t#updateFromText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2235 }
2236 break;
2237
2238 case PTB_EO_TOcxx . . $ PTB_EO_TO.:
2239 {
2240 editorcxx . . $ editor..sampleTocxx . . $ editor_t#sampleTo. = editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample. + 1;
2241 uicxx . . $ ui..updateToTextcxx . . $ ui_t#updateToText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2242 }
2243 break;
2244
2245 case PTB_EO_KILLcxx . . $ PTB_EO_KILL.:
2246 {
2247 if (askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_YES_NOcxx . . $ ASKBOX_YES_NO., "KILL SAMPLE ?"))
2248 killSamplecxx . . $ killSample(49f6e7a06ebc5aa8).();
2249 }
2250 break;
2251
2252 case PTB_EO_QUANTIZEcxx . . $ PTB_EO_QUANTIZE.:
2253 {
2254 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = configcxx . . $ config..quantizeValuecxx . . $ config_t#quantizeValue.;
2255 editorcxx . . $ editor..quantizeValueDispcxx . . $ editor_t#quantizeValueDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
2256 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
2257 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 2;
2258 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 192;
2259 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 74;
2260 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_EO_QUANTIZEcxx . . $ PTB_EO_QUANTIZE.);
2261 }
2262 break;
2263
2264 case PTB_EO_METRO_1cxx . . $ PTB_EO_METRO_1.: // metronome speed
2265 {
2266 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = editorcxx . . $ editor..metroSpeedcxx . . $ editor_t#metroSpeed.;
2267 editorcxx . . $ editor..metroSpeedDispcxx . . $ editor_t#metroSpeedDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
2268 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
2269 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 2;
2270 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 168;
2271 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 85;
2272 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_EO_METRO_1cxx . . $ PTB_EO_METRO_1.);
2273 }
2274 break;
2275
2276 case PTB_EO_METRO_2cxx . . $ PTB_EO_METRO_2.: // metronome channel
2277 {
2278 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = editorcxx . . $ editor..metroChannelcxx . . $ editor_t#metroChannel.;
2279 editorcxx . . $ editor..metroChannelDispcxx . . $ editor_t#metroChannelDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
2280 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
2281 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 2;
2282 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 192;
2283 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 85;
2284 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_EO_METRO_2cxx . . $ PTB_EO_METRO_2.);
2285 }
2286 break;
2287
2288 case PTB_EO_FROM_NUMcxx . . $ PTB_EO_FROM_NUM.:
2289 {
2290 textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8. = editorcxx . . $ editor..sampleFromcxx . . $ editor_t#sampleFrom.;
2291 editorcxx . . $ editor..sampleFromDispcxx . . $ editor_t#sampleFromDisp. = &textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8.;
2292 textEditcxx . . $ textEdit..numPtr8cxx . . $ textEdit_t#numPtr8. = &textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8.;
2293 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 2;
2294 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 8;
2295 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 264;
2296 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 85;
2297 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_HEXcxx . . $ TEXT_EDIT_HEX., PTB_EO_FROM_NUMcxx . . $ PTB_EO_FROM_NUM.);
2298 }
2299 break;
2300
2301 case PTB_EO_TO_NUMcxx . . $ PTB_EO_TO_NUM.:
2302 {
2303 textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8. = editorcxx . . $ editor..sampleTocxx . . $ editor_t#sampleTo.;
2304 editorcxx . . $ editor..sampleToDispcxx . . $ editor_t#sampleToDisp. = &textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8.;
2305 textEditcxx . . $ textEdit..numPtr8cxx . . $ textEdit_t#numPtr8. = &textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8.;
2306 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 2;
2307 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 8;
2308 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 264;
2309 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 96;
2310 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_HEXcxx . . $ TEXT_EDIT_HEX., PTB_EO_TO_NUMcxx . . $ PTB_EO_TO_NUM.);
2311 }
2312 break;
2313
2314 case PTB_EO_FROM_UPcxx . . $ PTB_EO_FROM_UP.:
2315 {
2316 if (editorcxx . . $ editor..sampleFromcxx . . $ editor_t#sampleFrom. < 0x1F)
2317 {
2318 editorcxx . . $ editor..sampleFromcxx . . $ editor_t#sampleFrom.++;
2319 uicxx . . $ ui..updateFromTextcxx . . $ ui_t#updateFromText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2320 }
2321 }
2322 break;
2323
2324 case PTB_EO_FROM_DOWNcxx . . $ PTB_EO_FROM_DOWN.:
2325 {
2326 if (editorcxx . . $ editor..sampleFromcxx . . $ editor_t#sampleFrom. > 0x00)
2327 {
2328 editorcxx . . $ editor..sampleFromcxx . . $ editor_t#sampleFrom.--;
2329 uicxx . . $ ui..updateFromTextcxx . . $ ui_t#updateFromText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2330 }
2331 }
2332 break;
2333
2334 case PTB_EO_TO_UPcxx . . $ PTB_EO_TO_UP.:
2335 {
2336 if (editorcxx . . $ editor..sampleTocxx . . $ editor_t#sampleTo. < 0x1F)
2337 {
2338 editorcxx . . $ editor..sampleTocxx . . $ editor_t#sampleTo.++;
2339 uicxx . . $ ui..updateToTextcxx . . $ ui_t#updateToText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2340 }
2341 }
2342 break;
2343
2344 case PTB_EO_TO_DOWNcxx . . $ PTB_EO_TO_DOWN.:
2345 {
2346 if (editorcxx . . $ editor..sampleTocxx . . $ editor_t#sampleTo. > 0x00)
2347 {
2348 editorcxx . . $ editor..sampleTocxx . . $ editor_t#sampleTo.--;
2349 uicxx . . $ ui..updateToTextcxx . . $ ui_t#updateToText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2350 }
2351 }
2352 break;
2353
2354 case PTB_EO_KEYScxx . . $ PTB_EO_KEYS.:
2355 {
2356 editorcxx . . $ editor..multiFlagcxx . . $ editor_t#multiFlag. ^= 1;
2357 uicxx . . $ ui..updateTrackerFlagscxx . . $ ui_t#updateTrackerFlags. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2358 uicxx . . $ ui..updateKeysTextcxx . . $ ui_t#updateKeysText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2359 }
2360 break;
2361 // ----------------------------------------------------------
2362
2363 // Edit Op. Screen #3
2364
2365 case PTB_EO_MIXcxx . . $ PTB_EO_MIX.:
2366 {
2367 if (!mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
2368 {
2369 editorcxx . . $ editor..mixFlagcxx . . $ editor_t#mixFlag. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2370 uicxx . . $ ui..updateMixTextcxx . . $ ui_t#updateMixText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2371
2372 textEditcxx . . $ textEdit..textStartPtrcxx . . $ textEdit_t#textStartPtr. = editorcxx . . $ editor..mixTextcxx . . $ editor_t#mixText.;
2373 textEditcxx . . $ textEdit..textEndPtrcxx . . $ textEdit_t#textEndPtr. = editorcxx . . $ editor..mixTextcxx . . $ editor_t#mixText. + 15;
2374 textEditcxx . . $ textEdit..numBlockscxx . . $ textEdit_t#numBlocks. = 16;
2375 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 128;
2376 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 52;
2377 textEditcxx . . $ textEdit..scrollablecxx . . $ textEdit_t#scrollable. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
2378 enterTextEditModecxx . . $ enterTextEditMode(68e3ae50fe6578a9).(PTB_EO_MIXcxx . . $ PTB_EO_MIX.);
2379 }
2380 else // right mouse button = special, mix sample with itself (w/ modulation)
2381 {
2382 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2383 {
2384 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2385 break;
2386 }
2387
2388 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2389 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2390 {
2391 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2392 break;
2393 }
2394
2395 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. >= s->lengthcxx . . $ moduleSample_t#length.)
2396 {
2397 displayErrorMsgcxx . . $ displayErrorMsg(85c52e162fed56f9).("INVALID POS !");
2398 break;
2399 }
2400
2401 int8_tcxx . . $ int8_t# *sampleData = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.];
2402
2403 // make copy of sample data
2404 int8_tcxx . . $ int8_t# *sampleCopy = (int8_tcxx . . $ int8_t# *)malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(s->lengthcxx . . $ moduleSample_t#length.);
2405 if (sampleCopy == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
2406 {
2407 statusOutOfMemorycxx . . $ statusOutOfMemory(49f6e7a06ebc5aa8).();
2408 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2409 }
2410
2411 memcpycxx . . $ memcpy(cc817cb175f282d).(sampleCopy, sampleData, s->lengthcxx . . $ moduleSample_t#length.);
2412
2413 int8_tcxx . . $ int8_t# *mixPtr = sampleData + editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.;
2414 const int32_tcxx . . $ int32_t# mixLength = s->lengthcxx . . $ moduleSample_t#length. - editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.;
2415
2416 if (editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed. == 0) // no modulation
2417 {
2418 for (int32_tcxx . . $ int32_t# j = 0; j < mixLength; j++)
2419 {
2420 int16_tcxx . . $ int16_t# tmp16 = mixPtr[j] + sampleCopy[j];
2421 if (editorcxx . . $ editor..halveSampleFlagcxx . . $ editor_t#halveSampleFlag.)
2422 tmp16 >>= 1;
2423
2424 mixPtr[j] = (int8_tcxx . . $ int8_t#)(CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(tmp16, INT8_MINcxx . . $ `<external>/3415975807581488833/stdint.h:105:10`!, INT8_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:110:10`!));
2425 }
2426 }
2427 else // modulation
2428 {
2429 int32_tcxx . . $ int32_t# modTableOffset = 0;
2430 uint32_tcxx . . $ uint32_t# modOffset = 0; // 21.11fp
2431
2432 for (int32_tcxx . . $ int32_t# j = 0; j < mixLength; j++)
2433 {
2434 const int32_tcxx . . $ int32_t# sampleReadPos = modOffset >> 11;
2435 int16_tcxx . . $ int16_t# tmp16 = mixPtr[j] + sampleCopy[MINcxx . . $ `src/pt2_helpers.h:34:9`!(sampleReadPos, s->length-1)];
2436 if (editorcxx . . $ editor..halveSampleFlagcxx . . $ editor_t#halveSampleFlag.)
2437 tmp16 >>= 1;
2438
2439 mixPtr[j] = (int8_tcxx . . $ int8_t#)(CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(tmp16, INT8_MINcxx . . $ `<external>/3415975807581488833/stdint.h:105:10`!, INT8_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:110:10`!));
2440
2441 modTableOffset += editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed.;
2442 modOffset += modulationTablecxx . . $ modulationTable.[(modTableOffset >> 12) & 63];
2443 }
2444 }
2445
2446 freecxx . . $ free(5d22bdacc48458e8).(sampleCopy);
2447
2448 fixSampleBeepcxx . . $ fixSampleBeep(60146f4515acbace).(s);
2449 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
2450 displaySamplecxx . . $ displaySample(49f6e7a06ebc5aa8).();
2451
2452 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2453 }
2454 }
2455 break;
2456
2457 case PTB_EO_ECHOcxx . . $ PTB_EO_ECHO.:
2458 {
2459 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2460 {
2461 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2462 break;
2463 }
2464
2465 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2466 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2467 {
2468 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2469 break;
2470 }
2471
2472 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. == 0)
2473 {
2474 displayErrorMsgcxx . . $ displayErrorMsg(85c52e162fed56f9).("SET SAMPLE POS !");
2475 break;
2476 }
2477
2478 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. >= s->lengthcxx . . $ moduleSample_t#length.)
2479 {
2480 displayErrorMsgcxx . . $ displayErrorMsg(85c52e162fed56f9).("INVALID POS !");
2481 break;
2482 }
2483
2484 int8_tcxx . . $ int8_t# *sampleData = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.];
2485
2486 if (editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed. == 0) // no modulation
2487 {
2488 for (int32_tcxx . . $ int32_t# j = 0; j < s->lengthcxx . . $ moduleSample_t#length.; j++)
2489 {
2490 int16_tcxx . . $ int16_t# tmp16 = (sampleData[editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.+j] + sampleData[j]) >> 1;
2491 sampleData[editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.+j] = (int8_tcxx . . $ int8_t#)(CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(tmp16, INT8_MINcxx . . $ `<external>/3415975807581488833/stdint.h:105:10`!, INT8_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:110:10`!));
2492 }
2493 }
2494 else // modulation
2495 {
2496 int32_tcxx . . $ int32_t# modTableOffset = 0;
2497 uint32_tcxx . . $ uint32_t# modOffset = 0; // 21.11fp
2498
2499 for (int32_tcxx . . $ int32_t# j = 0; j < s->lengthcxx . . $ moduleSample_t#length.; j++)
2500 {
2501 const int32_tcxx . . $ int32_t# sampleReadPos = modOffset >> 11;
2502 int16_tcxx . . $ int16_t# tmp16 = (sampleData[editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.+j] + sampleData[MINcxx . . $ `src/pt2_helpers.h:34:9`!(sampleReadPos, s->length-1)]) >> 1;
2503 sampleData[editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.+j] = (int8_tcxx . . $ int8_t#)(CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(tmp16, INT8_MINcxx . . $ `<external>/3415975807581488833/stdint.h:105:10`!, INT8_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:110:10`!));
2504
2505 modTableOffset += editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed.;
2506 modOffset += modulationTablecxx . . $ modulationTable.[(modTableOffset >> 12) & 63];
2507 }
2508 }
2509
2510 if (!editorcxx . . $ editor..halveSampleFlagcxx . . $ editor_t#halveSampleFlag.)
2511 {
2512 for (int32_tcxx . . $ int32_t# j = 0; j < s->lengthcxx . . $ moduleSample_t#length.; j++)
2513 {
2514 int16_tcxx . . $ int16_t# tmp16 = (int16_tcxx . . $ int16_t#)sampleData[j] * 2;
2515 sampleData[j] = (int8_tcxx . . $ int8_t#)(CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(tmp16, INT8_MINcxx . . $ `<external>/3415975807581488833/stdint.h:105:10`!, INT8_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:110:10`!));
2516 }
2517 }
2518
2519 fixSampleBeepcxx . . $ fixSampleBeep(60146f4515acbace).(s);
2520 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
2521 displaySamplecxx . . $ displaySample(49f6e7a06ebc5aa8).();
2522
2523 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2524 }
2525 break;
2526
2527 case PTB_EO_POS_NUMcxx . . $ PTB_EO_POS_NUM.:
2528 {
2529 if (configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. == 65534 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. < 244) // yuck!
2530 break;
2531
2532 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
2533 {
2534 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = 0;
2535 uicxx . . $ ui..updatePosTextcxx . . $ ui_t#updatePosText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2536 }
2537 else
2538 {
2539 textEditcxx . . $ textEdit..force32BitNumPtrcxx . . $ textEdit_t#force32BitNumPtr. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2540
2541 textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32. = editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.;
2542 editorcxx . . $ editor..samplePosDispcxx . . $ editor_t#samplePosDisp. = &textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32.;
2543 textEditcxx . . $ textEdit..numPtr32cxx . . $ textEdit_t#numPtr32. = &textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32.;
2544
2545 if (configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. == 65534)
2546 {
2547 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 4;
2548 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 16;
2549 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 248;
2550 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 63;
2551 }
2552 else
2553 {
2554 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 5;
2555 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 17;
2556 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 240;
2557 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 63;
2558 }
2559
2560 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_HEXcxx . . $ TEXT_EDIT_HEX., PTB_EO_POS_NUMcxx . . $ PTB_EO_POS_NUM.);
2561 }
2562 }
2563 break;
2564
2565 case PTB_EO_POS_UPcxx . . $ PTB_EO_POS_UP.: edPosUpButtoncxx . . $ edPosUpButton(b45ddcbc8423892c).(INCREMENT_SLOWcxx . . $ INCREMENT_SLOW.); break;
2566 case PTB_EO_POS_DOWNcxx . . $ PTB_EO_POS_DOWN.: edPosDownButtoncxx . . $ edPosDownButton(b45ddcbc8423892c).(INCREMENT_SLOWcxx . . $ INCREMENT_SLOW.); break;
2567
2568 case PTB_EO_BOOSTcxx . . $ PTB_EO_BOOST.: // this is actually treble increase
2569 {
2570 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2571 {
2572 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2573 break;
2574 }
2575
2576 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2577 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2578 {
2579 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2580 break;
2581 }
2582
2583 boostSamplecxx . . $ boostSample(918ebd27a9ddbad3).(editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample., falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!);
2584 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
2585 displaySamplecxx . . $ displaySample(49f6e7a06ebc5aa8).();
2586
2587 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2588 }
2589 break;
2590
2591 case PTB_EO_FILTERcxx . . $ PTB_EO_FILTER.: // this is actually treble decrease
2592 {
2593 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2594 {
2595 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2596 break;
2597 }
2598
2599 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2600 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2601 {
2602 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2603 break;
2604 }
2605
2606 filterSamplecxx . . $ filterSample(918ebd27a9ddbad3).(editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample., falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!);
2607 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
2608 displaySamplecxx . . $ displaySample(49f6e7a06ebc5aa8).();
2609
2610 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2611 }
2612 break;
2613
2614 case PTB_EO_MOD_NUMcxx . . $ PTB_EO_MOD_NUM.:
2615 {
2616 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
2617 {
2618 editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed. = 0;
2619 uicxx . . $ ui..updateModTextcxx . . $ ui_t#updateModText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2620 }
2621 }
2622 break;
2623
2624 case PTB_EO_MODcxx . . $ PTB_EO_MOD.: // modulate sample data
2625 {
2626 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2627 {
2628 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2629 break;
2630 }
2631
2632 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2633 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2634 {
2635 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2636 break;
2637 }
2638
2639 if (editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed. == 0)
2640 {
2641 displayErrorMsgcxx . . $ displayErrorMsg(85c52e162fed56f9).("SET MOD. SPEED !");
2642 break;
2643 }
2644
2645 int8_tcxx . . $ int8_t# *sampleData = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.];
2646
2647 // make copy of sample data
2648 int8_tcxx . . $ int8_t# *sampleCopy = (int8_tcxx . . $ int8_t# *)malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(s->lengthcxx . . $ moduleSample_t#length.);
2649 if (sampleCopy == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
2650 {
2651 statusOutOfMemorycxx . . $ statusOutOfMemory(49f6e7a06ebc5aa8).();
2652 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2653 }
2654
2655 memcpycxx . . $ memcpy(cc817cb175f282d).(sampleCopy, sampleData, s->lengthcxx . . $ moduleSample_t#length.);
2656
2657 int32_tcxx . . $ int32_t# modTableOffset = 0;
2658 uint32_tcxx . . $ uint32_t# modOffset = 0; // 21.11fp
2659
2660 for (int32_tcxx . . $ int32_t# j = 0; j < s->lengthcxx . . $ moduleSample_t#length.; j++)
2661 {
2662 const int32_tcxx . . $ int32_t# sampleReadPos = modOffset >> 11;
2663 sampleData[j] = sampleCopy[MINcxx . . $ `src/pt2_helpers.h:34:9`!(sampleReadPos, s->length-1)];
2664
2665 modTableOffset += editorcxx . . $ editor..modulateSpeedcxx . . $ editor_t#modulateSpeed.;
2666 modOffset += modulationTablecxx . . $ modulationTable.[(modTableOffset >> 12) & 63];
2667 }
2668
2669 freecxx . . $ free(5d22bdacc48458e8).(sampleCopy);
2670
2671 fixSampleBeepcxx . . $ fixSampleBeep(60146f4515acbace).(s);
2672 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
2673 displaySamplecxx . . $ displaySample(49f6e7a06ebc5aa8).();
2674
2675 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2676 }
2677 break;
2678
2679 case PTB_EO_MOD_UPcxx . . $ PTB_EO_MOD_UP.: edModUpButtoncxx . . $ edModUpButton(49f6e7a06ebc5aa8).(); break;
2680 case PTB_EO_MOD_DOWNcxx . . $ PTB_EO_MOD_DOWN.: edModDownButtoncxx . . $ edModDownButton(49f6e7a06ebc5aa8).(); break;
2681
2682 case PTB_EO_X_FADEcxx . . $ PTB_EO_X_FADE.:
2683 {
2684 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2685 {
2686 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2687 break;
2688 }
2689
2690 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2691
2692 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2693 {
2694 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2695 break;
2696 }
2697
2698 int8_tcxx . . $ int8_t# *sampleData = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.];
2699 int32_tcxx . . $ int32_t# lastSamplePoint = s->lengthcxx . . $ moduleSample_t#length. - 1;
2700
2701 for (int32_tcxx . . $ int32_t# j = 0; j < s->lengthcxx . . $ moduleSample_t#length. / 2; j++)
2702 {
2703 int16_tcxx . . $ int16_t# tmp16 = sampleData[j] + sampleData[lastSamplePoint-j];
2704 if (editorcxx . . $ editor..halveSampleFlagcxx . . $ editor_t#halveSampleFlag.)
2705 tmp16 >>= 1;
2706
2707 int8_tcxx . . $ int8_t# tmpSmp = (int8_tcxx . . $ int8_t#)(CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(tmp16, INT8_MINcxx . . $ `<external>/3415975807581488833/stdint.h:105:10`!, INT8_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:110:10`!));
2708
2709 sampleData[j] = tmpSmp;
2710 sampleData[lastSamplePoint-j] = tmpSmp;
2711 }
2712
2713 fixSampleBeepcxx . . $ fixSampleBeep(60146f4515acbace).(s);
2714 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
2715 displaySamplecxx . . $ displaySample(49f6e7a06ebc5aa8).();
2716
2717 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2718 }
2719 break;
2720
2721 case PTB_EO_BACKWDcxx . . $ PTB_EO_BACKWD.:
2722 {
2723 int8_tcxx . . $ int8_t# *ptr8_1, *ptr8_2;
2724
2725 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2726 {
2727 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2728 break;
2729 }
2730
2731 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2732 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2733 {
2734 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2735 break;
2736 }
2737
2738 int32_tcxx . . $ int32_t# length;
2739 if (editorcxx . . $ editor..markStartOfscxx . . $ editor_t#markStartOfs. != -1 && editorcxx . . $ editor..markStartOfscxx . . $ editor_t#markStartOfs. != editorcxx . . $ editor..markEndOfscxx . . $ editor_t#markEndOfs. && editorcxx . . $ editor..markEndOfscxx . . $ editor_t#markEndOfs. != 0)
2740 {
2741 ptr8_1 = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.+editorcxx . . $ editor..markStartOfscxx . . $ editor_t#markStartOfs.];
2742 ptr8_2 = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.+editorcxx . . $ editor..markEndOfscxx . . $ editor_t#markEndOfs.-1];
2743 length = editorcxx . . $ editor..markEndOfscxx . . $ editor_t#markEndOfs. - editorcxx . . $ editor..markStartOfscxx . . $ editor_t#markStartOfs.;
2744 }
2745 else
2746 {
2747 ptr8_1 = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.];
2748 ptr8_2 = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.+s->lengthcxx . . $ moduleSample_t#length.-1];
2749 length = s->lengthcxx . . $ moduleSample_t#length.;
2750 }
2751
2752 for (int32_tcxx . . $ int32_t# j = 0; j < length / 2; j++)
2753 {
2754 const int8_tcxx . . $ int8_t# tmpSmp = *ptr8_1;
2755 *ptr8_1++ = *ptr8_2;
2756 *ptr8_2-- = tmpSmp;
2757 }
2758
2759 fixSampleBeepcxx . . $ fixSampleBeep(60146f4515acbace).(s);
2760 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
2761 displaySamplecxx . . $ displaySample(49f6e7a06ebc5aa8).();
2762
2763 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2764 }
2765 break;
2766
2767 case PTB_EO_CBcxx . . $ PTB_EO_CB.:
2768 {
2769 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2770 {
2771 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2772 break;
2773 }
2774
2775 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2776 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2777 {
2778 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2779 break;
2780 }
2781
2782 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. == 0)
2783 {
2784 displayErrorMsgcxx . . $ displayErrorMsg(85c52e162fed56f9).("SET SAMPLE POS !");
2785 break;
2786 }
2787
2788 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. >= s->lengthcxx . . $ moduleSample_t#length.)
2789 {
2790 displayErrorMsgcxx . . $ displayErrorMsg(85c52e162fed56f9).("INVALID POS !");
2791 break;
2792 }
2793
2794 turnOffVoicescxx . . $ turnOffVoices(49f6e7a06ebc5aa8).();
2795
2796 memcpycxx . . $ memcpy(cc817cb175f282d).(&songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.], &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset. + editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.], configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. - editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.);
2797 memsetcxx . . $ memset(d1de1e4fb215f1c6).(&songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset. + (configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. - editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.)], 0, editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.);
2798
2799 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. > s->loopStartcxx . . $ moduleSample_t#loopStart.)
2800 {
2801 s->loopStartcxx . . $ moduleSample_t#loopStart. = 0;
2802 s->loopLengthcxx . . $ moduleSample_t#loopLength. = 2;
2803 }
2804 else
2805 {
2806 s->loopStartcxx . . $ moduleSample_t#loopStart. = (s->loopStartcxx . . $ moduleSample_t#loopStart. - editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.) & configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.;
2807 }
2808
2809 s->lengthcxx . . $ moduleSample_t#length. = (s->lengthcxx . . $ moduleSample_t#length. - editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.) & configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.;
2810
2811 editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. = 0;
2812 fixSampleBeepcxx . . $ fixSampleBeep(60146f4515acbace).(s);
2813 updateCurrSamplecxx . . $ updateCurrSample(49f6e7a06ebc5aa8).();
2814
2815 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2816 }
2817 break;
2818
2819 case PTB_EO_CHORDcxx . . $ PTB_EO_CHORD.:
2820 {
2821 uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. = 3;
2822 renderEditOpScreencxx . . $ renderEditOpScreen(49f6e7a06ebc5aa8).();
2823 }
2824 break;
2825
2826 // fade up
2827 case PTB_EO_FUcxx . . $ PTB_EO_FU.:
2828 {
2829 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2830 {
2831 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2832 break;
2833 }
2834
2835 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2836 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2837 {
2838 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2839 break;
2840 }
2841
2842 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. == 0)
2843 {
2844 displayErrorMsgcxx . . $ displayErrorMsg(85c52e162fed56f9).("INVALID POS !");
2845 break;
2846 }
2847
2848 double dDelta = 1.0 / editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.;
2849 double dPos = 0.0;
2850
2851 int8_tcxx . . $ int8_t# *ptr8 = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.];
2852 for (int32_tcxx . . $ int32_t# j = 0; j < editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.; j++)
2853 {
2854 int32_tcxx . . $ int32_t# smp32 = (int32_tcxx . . $ int32_t#)((*ptr8) * dPos);
2855 *ptr8++ = (int8_tcxx . . $ int8_t#)(CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(smp32, INT8_MINcxx . . $ `<external>/3415975807581488833/stdint.h:105:10`!, INT8_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:110:10`!));
2856
2857 dPos += dDelta;
2858 }
2859
2860 fixSampleBeepcxx . . $ fixSampleBeep(60146f4515acbace).(s);
2861 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
2862 displaySamplecxx . . $ displaySample(49f6e7a06ebc5aa8).();
2863
2864 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2865 }
2866 break;
2867
2868 // fade down
2869 case PTB_EO_FDcxx . . $ PTB_EO_FD.:
2870 {
2871 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2872 {
2873 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2874 break;
2875 }
2876
2877 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2878 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2879 {
2880 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2881 break;
2882 }
2883
2884 if (editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos. >= s->lengthcxx . . $ moduleSample_t#length.-1)
2885 {
2886 displayErrorMsgcxx . . $ displayErrorMsg(85c52e162fed56f9).("INVALID POS !");
2887 break;
2888 }
2889
2890 int32_tcxx . . $ int32_t# tmp32 = (s->lengthcxx . . $ moduleSample_t#length. - 1) - editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.;
2891 if (tmp32 == 0)
2892 tmp32 = 1;
2893
2894 double dDelta = 1.0 / tmp32;
2895 double dPos = 0.0;
2896
2897 int8_tcxx . . $ int8_t# *ptr8 = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.+s->lengthcxx . . $ moduleSample_t#length.-1];
2898 for (int32_tcxx . . $ int32_t# j = editorcxx . . $ editor..samplePoscxx . . $ editor_t#samplePos.; j < s->lengthcxx . . $ moduleSample_t#length.; j++)
2899 {
2900 int32_tcxx . . $ int32_t# smp32 = (int32_tcxx . . $ int32_t#)((*ptr8) * dPos);
2901 *ptr8-- = (int8_tcxx . . $ int8_t#)(CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(smp32, INT8_MINcxx . . $ `<external>/3415975807581488833/stdint.h:105:10`!, INT8_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:110:10`!));
2902
2903 dPos += dDelta;
2904 }
2905
2906 fixSampleBeepcxx . . $ fixSampleBeep(60146f4515acbace).(s);
2907 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
2908 displaySamplecxx . . $ displaySample(49f6e7a06ebc5aa8).();
2909
2910 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2911 }
2912 break;
2913
2914 case PTB_EO_UPSAMPcxx . . $ PTB_EO_UPSAMP.:
2915 {
2916 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2917 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2918 {
2919 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2920 break;
2921 }
2922
2923 if (askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_YES_NOcxx . . $ ASKBOX_YES_NO., "UPSAMPLE ?"))
2924 upSamplecxx . . $ upSample(49f6e7a06ebc5aa8).();
2925 }
2926 break;
2927
2928 case PTB_EO_DNSAMPcxx . . $ PTB_EO_DNSAMP.:
2929 {
2930 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2931 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2932 {
2933 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2934 break;
2935 }
2936
2937 if (askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_YES_NOcxx . . $ ASKBOX_YES_NO., "DOWNSAMPLE ?"))
2938 downSamplecxx . . $ downSample(49f6e7a06ebc5aa8).();
2939 }
2940 break;
2941
2942 case PTB_EO_VOL_NUMcxx . . $ PTB_EO_VOL_NUM.:
2943 {
2944 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
2945 {
2946 editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol. = 100;
2947 uicxx . . $ ui..updateVolTextcxx . . $ ui_t#updateVolText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
2948 }
2949 else
2950 {
2951 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol.;
2952 editorcxx . . $ editor..sampleVolDispcxx . . $ editor_t#sampleVolDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
2953 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
2954 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 3;
2955 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 248;
2956 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 96;
2957 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_EO_VOL_NUMcxx . . $ PTB_EO_VOL_NUM.);
2958 }
2959 }
2960 break;
2961
2962 case PTB_EO_VOLcxx . . $ PTB_EO_VOL.:
2963 {
2964 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
2965 {
2966 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
2967 break;
2968 }
2969
2970 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
2971 if (s->lengthcxx . . $ moduleSample_t#length. == 0)
2972 {
2973 statusSampleIsEmptycxx . . $ statusSampleIsEmpty(49f6e7a06ebc5aa8).();
2974 break;
2975 }
2976
2977 if (editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol. != 100)
2978 {
2979 int8_tcxx . . $ int8_t# *ptr8 = &songcxx . . $ song.->sampleDatacxx . . $ module_t#sampleData.[s->offsetcxx . . $ moduleSample_t#offset.];
2980 int32_tcxx . . $ int32_t# sampleMul = (((1UL << 19) * editorcxx . . $ editor..sampleVolcxx . . $ editor_t#sampleVol.) + 50) / 100;
2981
2982 for (int32_tcxx . . $ int32_t# j = 0; j < s->lengthcxx . . $ moduleSample_t#length.; j++)
2983 {
2984 int16_tcxx . . $ int16_t# tmp16 = (ptr8[j] * sampleMul) >> 19;
2985 ptr8[j] = (int8_tcxx . . $ int8_t#)(CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(tmp16, INT8_MINcxx . . $ `<external>/3415975807581488833/stdint.h:105:10`!, INT8_MAXcxx . . $ `<external>/3415975807581488833/stdint.h:110:10`!));
2986 }
2987
2988 fixSampleBeepcxx . . $ fixSampleBeep(60146f4515acbace).(s);
2989 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
2990 displaySamplecxx . . $ displaySample(49f6e7a06ebc5aa8).();
2991
2992 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
2993 }
2994 }
2995 break;
2996
2997 case PTB_EO_VOL_UPcxx . . $ PTB_EO_VOL_UP.: edVolUpButtoncxx . . $ edVolUpButton(49f6e7a06ebc5aa8).(); break;
2998 case PTB_EO_VOL_DOWNcxx . . $ PTB_EO_VOL_DOWN.: edVolDownButtoncxx . . $ edVolDownButton(49f6e7a06ebc5aa8).(); break;
2999 // ----------------------------------------------------------
3000
3001 // Edit Op. Screen #4 (chord maker)
3002
3003 case PTB_EO_DOCHORDcxx . . $ PTB_EO_DOCHORD.:
3004 {
3005 if (askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_YES_NOcxx . . $ ASKBOX_YES_NO., "MAKE CHORD?"))
3006 mixChordSamplecxx . . $ mixChordSample(49f6e7a06ebc5aa8).();
3007 }
3008 break;
3009
3010 case PTB_EO_NOTE1cxx . . $ PTB_EO_NOTE1.: selectChordNote1cxx . . $ selectChordNote1(49f6e7a06ebc5aa8).(); break;
3011 case PTB_EO_NOTE2cxx . . $ PTB_EO_NOTE2.: selectChordNote2cxx . . $ selectChordNote2(49f6e7a06ebc5aa8).(); break;
3012 case PTB_EO_NOTE3cxx . . $ PTB_EO_NOTE3.: selectChordNote3cxx . . $ selectChordNote3(49f6e7a06ebc5aa8).(); break;
3013 case PTB_EO_NOTE4cxx . . $ PTB_EO_NOTE4.: selectChordNote4cxx . . $ selectChordNote4(49f6e7a06ebc5aa8).(); break;
3014 case PTB_EO_NOTE1_UPcxx . . $ PTB_EO_NOTE1_UP.: edNote1UpButtoncxx . . $ edNote1UpButton(49f6e7a06ebc5aa8).(); break;
3015 case PTB_EO_NOTE1_DOWNcxx . . $ PTB_EO_NOTE1_DOWN.: edNote1DownButtoncxx . . $ edNote1DownButton(49f6e7a06ebc5aa8).(); break;
3016 case PTB_EO_NOTE2_UPcxx . . $ PTB_EO_NOTE2_UP.: edNote2UpButtoncxx . . $ edNote2UpButton(49f6e7a06ebc5aa8).(); break;
3017 case PTB_EO_NOTE2_DOWNcxx . . $ PTB_EO_NOTE2_DOWN.: edNote2DownButtoncxx . . $ edNote2DownButton(49f6e7a06ebc5aa8).(); break;
3018 case PTB_EO_NOTE3_UPcxx . . $ PTB_EO_NOTE3_UP.: edNote3UpButtoncxx . . $ edNote3UpButton(49f6e7a06ebc5aa8).(); break;
3019 case PTB_EO_NOTE3_DOWNcxx . . $ PTB_EO_NOTE3_DOWN.: edNote3DownButtoncxx . . $ edNote3DownButton(49f6e7a06ebc5aa8).(); break;
3020 case PTB_EO_NOTE4_UPcxx . . $ PTB_EO_NOTE4_UP.: edNote4UpButtoncxx . . $ edNote4UpButton(49f6e7a06ebc5aa8).(); break;
3021 case PTB_EO_NOTE4_DOWNcxx . . $ PTB_EO_NOTE4_DOWN.: edNote4DownButtoncxx . . $ edNote4DownButton(49f6e7a06ebc5aa8).(); break;
3022 case PTB_EO_RESETcxx . . $ PTB_EO_RESET.: resetChordcxx . . $ resetChord(49f6e7a06ebc5aa8).(); break;
3023 case PTB_EO_UNDOcxx . . $ PTB_EO_UNDO.: undoChordcxx . . $ undoChord(49f6e7a06ebc5aa8).(); break;
3024
3025 case PTB_EO_LENGTHcxx . . $ PTB_EO_LENGTH.:
3026 {
3027 if (configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. != 65534 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. > 157) // yuck!
3028 break;
3029
3030 toggleChordLengthcxx . . $ toggleChordLength(49f6e7a06ebc5aa8).();
3031 }
3032 break;
3033
3034 case PTB_EO_MAJORcxx . . $ PTB_EO_MAJOR.: setChordMajorcxx . . $ setChordMajor(49f6e7a06ebc5aa8).(); break;
3035 case PTB_EO_MINORcxx . . $ PTB_EO_MINOR.: setChordMinorcxx . . $ setChordMinor(49f6e7a06ebc5aa8).(); break;
3036 case PTB_EO_SUS4cxx . . $ PTB_EO_SUS4.: setChordSus4cxx . . $ setChordSus4(49f6e7a06ebc5aa8).(); break;
3037 case PTB_EO_MAJOR7cxx . . $ PTB_EO_MAJOR7.: setChordMajor7cxx . . $ setChordMajor7(49f6e7a06ebc5aa8).(); break;
3038 case PTB_EO_MINOR7cxx . . $ PTB_EO_MINOR7.: setChordMinor7cxx . . $ setChordMinor7(49f6e7a06ebc5aa8).(); break;
3039 case PTB_EO_MAJOR6cxx . . $ PTB_EO_MAJOR6.: setChordMajor6cxx . . $ setChordMajor6(49f6e7a06ebc5aa8).(); break;
3040 case PTB_EO_MINOR6cxx . . $ PTB_EO_MINOR6.: setChordMinor6cxx . . $ setChordMinor6(49f6e7a06ebc5aa8).(); break;
3041 // ----------------------------------------------------------
3042
3043 case PTB_ABOUTcxx . . $ PTB_ABOUT.:
3044 {
3045 uicxx . . $ ui..aboutScreenShowncxx . . $ ui_t#aboutScreenShown. ^= 1;
3046
3047 if (uicxx . . $ ui..aboutScreenShowncxx . . $ ui_t#aboutScreenShown.)
3048 renderAboutScreencxx . . $ renderAboutScreen(49f6e7a06ebc5aa8).();
3049 else if (uicxx . . $ ui..visualizerModecxx . . $ ui_t#visualizerMode. == VISUAL_QUADRASCOPEcxx . . $ VISUAL_QUADRASCOPE.)
3050 renderQuadrascopeBgcxx . . $ renderQuadrascopeBg(49f6e7a06ebc5aa8).();
3051 else if (uicxx . . $ ui..visualizerModecxx . . $ ui_t#visualizerMode. == VISUAL_SPECTRUMcxx . . $ VISUAL_SPECTRUM.)
3052 renderSpectrumAnalyzerBgcxx . . $ renderSpectrumAnalyzerBg(49f6e7a06ebc5aa8).();
3053 }
3054 break;
3055
3056 case PTB_PE_PATTcxx . . $ PTB_PE_PATT.:
3057 {
3058 if (editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. == MODE_IDLEcxx . . $ MODE_IDLE. || editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. == MODE_EDITcxx . . $ MODE_EDIT.)
3059 {
3060 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = songcxx . . $ song.->currPoscxx . . $ module_t#currPos.;
3061 if (textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. > songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.-1)
3062 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.-1;
3063
3064 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.];
3065 editorcxx . . $ editor..currPosEdPattDispcxx . . $ editor_t#currPosEdPattDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
3066 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
3067 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 2;
3068 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 160;
3069 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 58;
3070 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_PE_PATTcxx . . $ PTB_PE_PATT.);
3071 }
3072 }
3073 break;
3074
3075 case PTB_PE_PATTNAMEcxx . . $ PTB_PE_PATTNAME.: posEdEditNamecxx . . $ posEdEditName(49f6e7a06ebc5aa8).(); break;
3076 case PTB_PE_SCROLLTOPcxx . . $ PTB_PE_SCROLLTOP.: posEdScrollToTopcxx . . $ posEdScrollToTop(49f6e7a06ebc5aa8).(); break;
3077 case PTB_PE_SCROLLUPcxx . . $ PTB_PE_SCROLLUP.: posEdScrollUpcxx . . $ posEdScrollUp(49f6e7a06ebc5aa8).(); break;
3078 case PTB_PE_SCROLLDOWNcxx . . $ PTB_PE_SCROLLDOWN.: posEdScrollDowncxx . . $ posEdScrollDown(49f6e7a06ebc5aa8).(); break;
3079 case PTB_PE_SCROLLBOTcxx . . $ PTB_PE_SCROLLBOT.: posEdScrollToBottomcxx . . $ posEdScrollToBottom(49f6e7a06ebc5aa8).(); break;
3080
3081 case PTB_PE_EXITcxx . . $ PTB_PE_EXIT.:
3082 {
3083 uicxx . . $ ui..aboutScreenShowncxx . . $ ui_t#aboutScreenShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3084 uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3085 displayMainScreencxx . . $ displayMainScreen(49f6e7a06ebc5aa8).();
3086 }
3087 break;
3088
3089 case PTB_POScxx . . $ PTB_POS.:
3090 case PTB_POSEDcxx . . $ PTB_POSED.:
3091 posEdTogglecxx . . $ posEdToggle(49f6e7a06ebc5aa8).();
3092 break;
3093
3094 case PTB_POSScxx . . $ PTB_POSS.:
3095 {
3096 if (editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. == MODE_IDLEcxx . . $ MODE_IDLE. || editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. == MODE_EDITcxx . . $ MODE_EDIT.)
3097 {
3098 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3099 {
3100 songcxx . . $ song.->currPoscxx . . $ module_t#currPos. = 0;
3101 editorcxx . . $ editor..currPatternDispcxx . . $ editor_t#currPatternDisp. = &songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[songcxx . . $ song.->currPoscxx . . $ module_t#currPos.];
3102
3103 if (uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
3104 uicxx . . $ ui..updatePosEdcxx . . $ ui_t#updatePosEd. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3105 }
3106 else
3107 {
3108 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = songcxx . . $ song.->currPoscxx . . $ module_t#currPos.;
3109 editorcxx . . $ editor..currPosDispcxx . . $ editor_t#currPosDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
3110 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
3111 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 3;
3112 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 72;
3113 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 8;
3114 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_POSScxx . . $ PTB_POSS.);
3115 }
3116 }
3117 }
3118 break;
3119
3120 case PTB_PATTERNScxx . . $ PTB_PATTERNS.:
3121 {
3122 if (editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. == MODE_IDLEcxx . . $ MODE_IDLE. || editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. == MODE_EDITcxx . . $ MODE_EDIT.)
3123 {
3124 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3125 {
3126 songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[songcxx . . $ song.->currPoscxx . . $ module_t#currPos.] = 0;
3127
3128 uicxx . . $ ui..updateSongSizecxx . . $ ui_t#updateSongSize. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3129 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
3130
3131 if (uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
3132 uicxx . . $ ui..updatePosEdcxx . . $ ui_t#updatePosEd. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3133 }
3134 else
3135 {
3136 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[songcxx . . $ song.->currPoscxx . . $ module_t#currPos.];
3137 editorcxx . . $ editor..currPatternDispcxx . . $ editor_t#currPatternDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
3138 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
3139 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 2;
3140 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 80;
3141 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 19;
3142 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_PATTERNScxx . . $ PTB_PATTERNS.);
3143 }
3144 }
3145 }
3146 break;
3147
3148 case PTB_LENGTHScxx . . $ PTB_LENGTHS.:
3149 {
3150 if (editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. == MODE_IDLEcxx . . $ MODE_IDLE. || editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. == MODE_EDITcxx . . $ MODE_EDIT.)
3151 {
3152 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3153 {
3154 songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength. = 1;
3155
3156 int16_tcxx . . $ int16_t# tmp16 = songcxx . . $ song.->currPoscxx . . $ module_t#currPos.;
3157 if (tmp16 > songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.-1)
3158 tmp16 = songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.-1;
3159
3160 editorcxx . . $ editor..currPosEdPattDispcxx . . $ editor_t#currPosEdPattDisp. = &songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[tmp16];
3161
3162 uicxx . . $ ui..updateSongSizecxx . . $ ui_t#updateSongSize. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3163 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
3164
3165 if (uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown.)
3166 uicxx . . $ ui..updatePosEdcxx . . $ ui_t#updatePosEd. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3167 }
3168 else
3169 {
3170 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength.;
3171 editorcxx . . $ editor..currLengthDispcxx . . $ editor_t#currLengthDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
3172 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
3173 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 3;
3174 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 72;
3175 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 30;
3176 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_LENGTHScxx . . $ PTB_LENGTHS.);
3177 }
3178 }
3179 }
3180 break;
3181
3182 // pattern editor main area (sets current pattern number to edit)
3183 case PTB_PATTBOXcxx . . $ PTB_PATTBOX.:
3184 case PTB_PATTDATAcxx . . $ PTB_PATTDATA.:
3185 {
3186 if (editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. == MODE_IDLEcxx . . $ MODE_IDLE. || editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. == MODE_EDITcxx . . $ MODE_EDIT. || editorcxx . . $ editor..playModecxx . . $ editor_t#playMode. != PLAY_MODE_NORMALcxx . . $ PLAY_MODE_NORMAL.)
3187 {
3188 // limit click coordinate to pattern edit number box if needed
3189 if (configcxx . . $ config..restrictedPattEditClickcxx . . $ config_t#restrictedPattEditClick. && (mousecxx . . $ mouse..xcxx . . $ mouse_t#x. < 6 || mousecxx . . $ mouse..ycxx . . $ mouse_t#y. < 124 || mousecxx . . $ mouse..xcxx . . $ mouse_t#x. >= 26 || mousecxx . . $ mouse..ycxx . . $ mouse_t#y. >= 135))
3190 break;
3191
3192 textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16. = songcxx . . $ song.->currPatterncxx . . $ module_t#currPattern.;
3193 editorcxx . . $ editor..currEditPatternDispcxx . . $ editor_t#currEditPatternDisp. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
3194 textEditcxx . . $ textEdit..numPtr16cxx . . $ textEdit_t#numPtr16. = &textEditcxx . . $ textEdit..tmpDisp16cxx . . $ textEdit_t#tmpDisp16.;
3195 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 2;
3196 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 8;
3197 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 132;
3198 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_DECIMALcxx . . $ TEXT_EDIT_DECIMAL., PTB_PATTDATAcxx . . $ PTB_PATTDATA.);
3199 }
3200 }
3201 break;
3202
3203 case PTB_SAMPLEScxx . . $ PTB_SAMPLES.:
3204 {
3205 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
3206 {
3207 editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3208 uicxx . . $ ui..updateCurrSampleNumcxx . . $ ui_t#updateCurrSampleNum. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3209 }
3210
3211 textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8. = editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.;
3212 editorcxx . . $ editor..currSampleDispcxx . . $ editor_t#currSampleDisp. = &textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8.;
3213 textEditcxx . . $ textEdit..numPtr8cxx . . $ textEdit_t#numPtr8. = &textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8.;
3214 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 2;
3215 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 8;
3216 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 80;
3217 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 52;
3218 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_HEXcxx . . $ TEXT_EDIT_HEX., PTB_SAMPLEScxx . . $ PTB_SAMPLES.);
3219 }
3220 break;
3221
3222 case PTB_SVOLUMEScxx . . $ PTB_SVOLUMES.:
3223 {
3224 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
3225 {
3226 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
3227 break;
3228 }
3229
3230 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3231 {
3232 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].volumecxx . . $ moduleSample_t#volume. = 0;
3233 }
3234 else
3235 {
3236 textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8. = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].volumecxx . . $ moduleSample_t#volume.;
3237 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].volumeDispcxx . . $ moduleSample_t#volumeDisp. = &textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8.;
3238 textEditcxx . . $ textEdit..numPtr8cxx . . $ textEdit_t#numPtr8. = &textEditcxx . . $ textEdit..tmpDisp8cxx . . $ textEdit_t#tmpDisp8.;
3239 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 2;
3240 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 8;
3241 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 80;
3242 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 63;
3243 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_HEXcxx . . $ TEXT_EDIT_HEX., PTB_SVOLUMEScxx . . $ PTB_SVOLUMES.);
3244 }
3245 }
3246 break;
3247
3248 case PTB_SLENGTHScxx . . $ PTB_SLENGTHS.:
3249 {
3250 if (configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. == 65534 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. < 62) // yuck!
3251 break;
3252
3253 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
3254 {
3255 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
3256 break;
3257 }
3258
3259 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3260 {
3261 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
3262
3263 turnOffVoicescxx . . $ turnOffVoices(49f6e7a06ebc5aa8).();
3264
3265 s->lengthcxx . . $ moduleSample_t#length. = 0;
3266 if (s->loopStartcxx . . $ moduleSample_t#loopStart.+s->loopLengthcxx . . $ moduleSample_t#loopLength. > 2)
3267 {
3268 if (s->lengthcxx . . $ moduleSample_t#length. < s->loopStartcxx . . $ moduleSample_t#loopStart.+s->loopLengthcxx . . $ moduleSample_t#loopLength.)
3269 s->lengthcxx . . $ moduleSample_t#length. = s->loopStartcxx . . $ moduleSample_t#loopStart.+s->loopLengthcxx . . $ moduleSample_t#loopLength.;
3270 }
3271
3272 uicxx . . $ ui..updateSongSizecxx . . $ ui_t#updateSongSize. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3273 uicxx . . $ ui..updateCurrSampleLengthcxx . . $ ui_t#updateCurrSampleLength. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3274
3275 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
3276 redrawSamplecxx . . $ redrawSample(49f6e7a06ebc5aa8).();
3277
3278 recalcChordLengthcxx . . $ recalcChordLength(49f6e7a06ebc5aa8).();
3279 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
3280 }
3281 else
3282 {
3283 textEditcxx . . $ textEdit..force32BitNumPtrcxx . . $ textEdit_t#force32BitNumPtr. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3284
3285 textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32. = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length.;
3286 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthDispcxx . . $ moduleSample_t#lengthDisp. = &textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32.;
3287 textEditcxx . . $ textEdit..numPtr32cxx . . $ textEdit_t#numPtr32. = &textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32.;
3288
3289 if (configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. == 65534)
3290 {
3291 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 4;
3292 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 16;
3293 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 64;
3294 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 74;
3295 }
3296 else
3297 {
3298 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 5;
3299 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 17;
3300 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 56;
3301 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 74;
3302 }
3303
3304 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_HEXcxx . . $ TEXT_EDIT_HEX., PTB_SLENGTHScxx . . $ PTB_SLENGTHS.);
3305 }
3306 }
3307 break;
3308
3309 case PTB_SREPEATScxx . . $ PTB_SREPEATS.:
3310 {
3311 if (configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. == 65534 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. < 62) // yuck!
3312 break;
3313
3314 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
3315 {
3316 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
3317 break;
3318 }
3319
3320 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3321 {
3322 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
3323
3324 s->loopStartcxx . . $ moduleSample_t#loopStart. = 0;
3325 if (s->lengthcxx . . $ moduleSample_t#length. >= s->loopLengthcxx . . $ moduleSample_t#loopLength.)
3326 {
3327 if (s->loopStartcxx . . $ moduleSample_t#loopStart.+s->loopLengthcxx . . $ moduleSample_t#loopLength. > s->lengthcxx . . $ moduleSample_t#length.)
3328 s->loopStartcxx . . $ moduleSample_t#loopStart. = s->lengthcxx . . $ moduleSample_t#length.-s->loopLengthcxx . . $ moduleSample_t#loopLength.;
3329 }
3330 else
3331 {
3332 s->loopStartcxx . . $ moduleSample_t#loopStart. = 0;
3333 }
3334
3335 uicxx . . $ ui..updateCurrSampleRepeatcxx . . $ ui_t#updateCurrSampleRepeat. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3336 if (uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown. && uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 3)
3337 uicxx . . $ ui..updateChordLengthTextcxx . . $ ui_t#updateChordLengthText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3338
3339 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
3340 setLoopSpritescxx . . $ setLoopSprites(49f6e7a06ebc5aa8).();
3341
3342 updatePaulaLoopscxx . . $ updatePaulaLoops(49f6e7a06ebc5aa8).();
3343 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
3344 }
3345 else
3346 {
3347 textEditcxx . . $ textEdit..force32BitNumPtrcxx . . $ textEdit_t#force32BitNumPtr. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3348
3349 textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32. = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart.;
3350 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartDispcxx . . $ moduleSample_t#loopStartDisp. = &textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32.;
3351 textEditcxx . . $ textEdit..numPtr32cxx . . $ textEdit_t#numPtr32. = &textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32.;
3352
3353 if (configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. == 65534)
3354 {
3355 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 4;
3356 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 16;
3357 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 64;
3358 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 85;
3359 }
3360 else
3361 {
3362 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 5;
3363 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 17;
3364 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 56;
3365 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 85;
3366 }
3367
3368 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_HEXcxx . . $ TEXT_EDIT_HEX., PTB_SREPEATScxx . . $ PTB_SREPEATS.);
3369 }
3370 }
3371 break;
3372
3373 case PTB_SREPLENScxx . . $ PTB_SREPLENS.:
3374 {
3375 if (configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. == 65534 && mousecxx . . $ mouse..xcxx . . $ mouse_t#x. < 62) // yuck!
3376 break;
3377
3378 if (editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
3379 {
3380 statusNotSampleZerocxx . . $ statusNotSampleZero(49f6e7a06ebc5aa8).();
3381 break;
3382 }
3383
3384 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3385 {
3386 moduleSample_tcxx . . $ moduleSample_t# *s = &songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.];
3387
3388 s->loopLengthcxx . . $ moduleSample_t#loopLength. = 0;
3389 if (s->lengthcxx . . $ moduleSample_t#length. >= s->loopStartcxx . . $ moduleSample_t#loopStart.)
3390 {
3391 if (s->loopStartcxx . . $ moduleSample_t#loopStart.+s->loopLengthcxx . . $ moduleSample_t#loopLength. > s->lengthcxx . . $ moduleSample_t#length.)
3392 s->loopLengthcxx . . $ moduleSample_t#loopLength. = s->lengthcxx . . $ moduleSample_t#length.-s->loopStartcxx . . $ moduleSample_t#loopStart.;
3393 }
3394 else
3395 {
3396 s->loopLengthcxx . . $ moduleSample_t#loopLength. = 2;
3397 }
3398
3399 if (s->loopLengthcxx . . $ moduleSample_t#loopLength. < 2)
3400 s->loopLengthcxx . . $ moduleSample_t#loopLength. = 2;
3401
3402 uicxx . . $ ui..updateCurrSampleReplencxx . . $ ui_t#updateCurrSampleReplen. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3403 if (uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown. && uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 3)
3404 uicxx . . $ ui..updateChordLengthTextcxx . . $ ui_t#updateChordLengthText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3405
3406 if (uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
3407 setLoopSpritescxx . . $ setLoopSprites(49f6e7a06ebc5aa8).();
3408
3409 updatePaulaLoopscxx . . $ updatePaulaLoops(49f6e7a06ebc5aa8).();
3410 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
3411 }
3412 else
3413 {
3414 textEditcxx . . $ textEdit..force32BitNumPtrcxx . . $ textEdit_t#force32BitNumPtr. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3415
3416 textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32. = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength.;
3417 songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthDispcxx . . $ moduleSample_t#loopLengthDisp. = &textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32.;
3418 textEditcxx . . $ textEdit..numPtr32cxx . . $ textEdit_t#numPtr32. = &textEditcxx . . $ textEdit..tmpDisp32cxx . . $ textEdit_t#tmpDisp32.;
3419
3420 if (configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength. == 0xFFFE)
3421 {
3422 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 4;
3423 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 16;
3424 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 64;
3425 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 96;
3426 }
3427 else
3428 {
3429 textEditcxx . . $ textEdit..numDigitscxx . . $ textEdit_t#numDigits. = 5;
3430 textEditcxx . . $ textEdit..numBitscxx . . $ textEdit_t#numBits. = 17;
3431 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 56;
3432 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 96;
3433 }
3434
3435 enterNumberEditModecxx . . $ enterNumberEditMode(1a1cb793af1dcc7a).(TEXT_EDIT_HEXcxx . . $ TEXT_EDIT_HEX., PTB_SREPLENScxx . . $ PTB_SREPLENS.);
3436 }
3437 }
3438 break;
3439
3440 case PTB_EDITOPcxx . . $ PTB_EDITOP.:
3441 {
3442 if (uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown.)
3443 {
3444 if (uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. == 3)
3445 uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. = 0;
3446 else
3447 uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. = (uicxx . . $ ui..editOpScreencxx . . $ ui_t#editOpScreen. + 1) % 3;
3448 }
3449 else
3450 {
3451 uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3452 }
3453
3454 renderEditOpScreencxx . . $ renderEditOpScreen(49f6e7a06ebc5aa8).();
3455 }
3456 break;
3457
3458 case PTB_DO_LOADMODULEcxx . . $ PTB_DO_LOADMODULE.:
3459 {
3460 diskopcxx . . $ diskop..modecxx . . $ diskop_t#mode. = DISKOP_MODE_MODcxx . . $ DISKOP_MODE_MOD.;
3461 setPathFromDiskOpModecxx . . $ setPathFromDiskOpMode(49f6e7a06ebc5aa8).();
3462 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = 0;
3463 diskopcxx . . $ diskop..cachedcxx . . $ diskop_t#cached. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3464 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3465 uicxx . . $ ui..updateLoadModecxx . . $ ui_t#updateLoadMode. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3466 }
3467 break;
3468
3469 case PTB_DO_LOADSAMPLEcxx . . $ PTB_DO_LOADSAMPLE.:
3470 {
3471 diskopcxx . . $ diskop..modecxx . . $ diskop_t#mode. = DISKOP_MODE_SMPcxx . . $ DISKOP_MODE_SMP.;
3472 setPathFromDiskOpModecxx . . $ setPathFromDiskOpMode(49f6e7a06ebc5aa8).();
3473 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = 0;
3474 diskopcxx . . $ diskop..cachedcxx . . $ diskop_t#cached. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3475 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3476 uicxx . . $ ui..updateLoadModecxx . . $ ui_t#updateLoadMode. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3477 }
3478 break;
3479
3480 case PTB_LOADSAMPLEcxx . . $ PTB_LOADSAMPLE.: // "LOAD" button next to sample name
3481 {
3482 uicxx . . $ ui..posEdScreenShowncxx . . $ ui_t#posEdScreenShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3483 diskopcxx . . $ diskop..modecxx . . $ diskop_t#mode. = DISKOP_MODE_SMPcxx . . $ DISKOP_MODE_SMP.;
3484 setPathFromDiskOpModecxx . . $ setPathFromDiskOpMode(49f6e7a06ebc5aa8).();
3485 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = 0;
3486 diskopcxx . . $ diskop..cachedcxx . . $ diskop_t#cached. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3487
3488 if (!uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown.)
3489 {
3490 uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3491 renderDiskOpScreencxx . . $ renderDiskOpScreen(49f6e7a06ebc5aa8).();
3492 }
3493 else
3494 {
3495 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3496 uicxx . . $ ui..updateLoadModecxx . . $ ui_t#updateLoadMode. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3497 }
3498 }
3499 break;
3500
3501 case PTB_DO_SAVESAMPLEcxx . . $ PTB_DO_SAVESAMPLE.:
3502 {
3503 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! changeLoadMode = (diskopcxx . . $ diskop..modecxx . . $ diskop_t#mode. != DISKOP_MODE_SMPcxx . . $ DISKOP_MODE_SMP.);
3504 if (changeLoadMode)
3505 {
3506 diskopcxx . . $ diskop..modecxx . . $ diskop_t#mode. = DISKOP_MODE_SMPcxx . . $ DISKOP_MODE_SMP.;
3507 setPathFromDiskOpModecxx . . $ setPathFromDiskOpMode(49f6e7a06ebc5aa8).();
3508 uicxx . . $ ui..updateLoadModecxx . . $ ui_t#updateLoadMode. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; // redraw load mode cursor
3509 updateDiskOpcxx . . $ updateDiskOp(49f6e7a06ebc5aa8).();
3510 }
3511
3512 if (askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_YES_NOcxx . . $ ASKBOX_YES_NO., "SAVE SAMPLE ?"))
3513 saveSamplecxx . . $ saveSample(f2cb034b043a1ce9).(CHECK_IF_FILE_EXISTcxx . . $ CHECK_IF_FILE_EXIST., DONT_GIVE_NEW_FILENAMEcxx . . $ DONT_GIVE_NEW_FILENAME.); // also updates file list
3514
3515 // if we changed mode, re-read directory in Disk Op.
3516 if (changeLoadMode)
3517 {
3518 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = 0;
3519 diskopcxx . . $ diskop..cachedcxx . . $ diskop_t#cached. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; // read new directory
3520 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3521 updateDiskOpcxx . . $ updateDiskOp(49f6e7a06ebc5aa8).();
3522 }
3523 }
3524 break;
3525
3526 case PTB_MOD2WAVcxx . . $ PTB_MOD2WAV.:
3527 {
3528 if (askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_MOD2WAVcxx . . $ ASKBOX_MOD2WAV., "PLEASE SELECT"))
3529 {
3530 char fileName[20 + 4 + 1];
3531
3532 memsetcxx . . $ memset(d1de1e4fb215f1c6).(fileName, 0, sizeof (fileName));
3533
3534 if (songcxx . . $ song.->headercxx . . $ module_t#header..namecxx . . $ moduleHeader_t#name.[0] != '\0')
3535 {
3536 for (int32_tcxx . . $ int32_t# i = 0; i < 20; i++)
3537 {
3538 fileName[i] = (char)tolowercxx . . $ `<external>/17904084882347303253/ctype.h:220:11`!(song->header.name[i]);
3539 if (fileName[i] == '\0') break;
3540 sanitizeFilenameCharcxx . . $ sanitizeFilenameChar(fda57c8427c60377).(&fileName[i]);
3541 }
3542
3543 strcatcxx . . $ strcat(b7b3a83273496486).(fileName, ".wav");
3544 }
3545 else
3546 {
3547 strcpycxx . . $ strcpy(b7b3a83273496486).(fileName, "untitled.wav");
3548 }
3549
3550 mod2WavRendercxx . . $ mod2WavRender(c6b7e35ff6de5671).(fileName);
3551 }
3552 }
3553 break;
3554
3555 case PTB_SA_SAMPLEcxx . . $ PTB_SA_SAMPLE.:
3556 {
3557 uicxx . . $ ui..samplingBoxShowncxx . . $ ui_t#samplingBoxShown. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3558 renderSamplingBoxcxx . . $ renderSamplingBox(49f6e7a06ebc5aa8).();
3559 }
3560 break;
3561
3562 case PTB_SA_RESAMPLEcxx . . $ PTB_SA_RESAMPLE.:
3563 {
3564 if (askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_YES_NOcxx . . $ ASKBOX_YES_NO., "RESAMPLE?"))
3565 samplerResamplecxx . . $ samplerResample(49f6e7a06ebc5aa8).();
3566 }
3567 break;
3568
3569 case PTB_SA_RESAMPLENOTEcxx . . $ PTB_SA_RESAMPLENOTE.:
3570 {
3571 uicxx . . $ ui..changingSmpResamplecxx . . $ ui_t#changingSmpResample. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3572 uicxx . . $ ui..updateResampleNotecxx . . $ ui_t#updateResampleNote. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3573 setStatusMessagecxx . . $ setStatusMessage(90ef5b561fbcb8de).("SELECT NOTE", NO_CARRYcxx . . $ NO_CARRY.);
3574 pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(POINTER_MODE_MSG1cxx . . $ POINTER_MODE_MSG1., NO_CARRYcxx . . $ NO_CARRY.);
3575 }
3576 break;
3577
3578 case PTB_SA_SAMPLEAREAcxx . . $ PTB_SA_SAMPLEAREA.:
3579 {
3580 if (uicxx . . $ ui..sampleMarkingPoscxx . . $ ui_t#sampleMarkingPos. == -1)
3581 {
3582 samplerSamplePressedcxx . . $ samplerSamplePressed(b45ddcbc8423892c).(MOUSE_BUTTON_NOT_HELDcxx . . $ MOUSE_BUTTON_NOT_HELD.);
3583 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3584 }
3585 }
3586 break;
3587
3588 case PTB_SA_ZOOMBARAREAcxx . . $ PTB_SA_ZOOMBARAREA.:
3589 {
3590 mousecxx . . $ mouse..lastGUIButtoncxx . . $ mouse_t#lastGUIButton. = button;
3591 if (!uicxx . . $ ui..forceSampleDragcxx . . $ ui_t#forceSampleDrag.)
3592 {
3593 samplerBarPressedcxx . . $ samplerBarPressed(b45ddcbc8423892c).(MOUSE_BUTTON_NOT_HELDcxx . . $ MOUSE_BUTTON_NOT_HELD.);
3594 return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3595 }
3596 }
3597 break;
3598
3599 case PTB_SA_FIXDCcxx . . $ PTB_SA_FIXDC.: samplerRemoveDcOffsetcxx . . $ samplerRemoveDcOffset(49f6e7a06ebc5aa8).(); break;
3600 case PTB_SA_CUTcxx . . $ PTB_SA_CUT.: samplerSamDeletecxx . . $ samplerSamDelete(ac50b47256ae7414).(SAMPLE_CUTcxx . . $ SAMPLE_CUT.); break;
3601 case PTB_SA_PASTEcxx . . $ PTB_SA_PASTE.: samplerSamPastecxx . . $ samplerSamPaste(49f6e7a06ebc5aa8).(); break;
3602 case PTB_SA_COPYcxx . . $ PTB_SA_COPY.: samplerSamCopycxx . . $ samplerSamCopy(49f6e7a06ebc5aa8).(); break;
3603 case PTB_SA_LOOPcxx . . $ PTB_SA_LOOP.: samplerLoopTogglecxx . . $ samplerLoopToggle(49f6e7a06ebc5aa8).(); break;
3604 case PTB_SA_PLAYWAVEcxx . . $ PTB_SA_PLAYWAVE.: samplerPlayWaveformcxx . . $ samplerPlayWaveform(49f6e7a06ebc5aa8).(); break;
3605 case PTB_SA_PLAYDISPLAYcxx . . $ PTB_SA_PLAYDISPLAY.: samplerPlayDisplaycxx . . $ samplerPlayDisplay(49f6e7a06ebc5aa8).(); break;
3606 case PTB_SA_PLAYRANGEcxx . . $ PTB_SA_PLAYRANGE.: samplerPlayRangecxx . . $ samplerPlayRange(49f6e7a06ebc5aa8).(); break;
3607 case PTB_SA_RANGEALLcxx . . $ PTB_SA_RANGEALL.: samplerRangeAllcxx . . $ samplerRangeAll(49f6e7a06ebc5aa8).(); break;
3608 case PTB_SA_SHOWALLcxx . . $ PTB_SA_SHOWALL.: samplerShowAllcxx . . $ samplerShowAll(49f6e7a06ebc5aa8).(); break;
3609 case PTB_SA_SHOWRANGEcxx . . $ PTB_SA_SHOWRANGE.: samplerShowRangecxx . . $ samplerShowRange(49f6e7a06ebc5aa8).(); break;
3610 case PTB_SA_RANGECENTERcxx . . $ PTB_SA_RANGECENTER.: sampleMarkerToCentercxx . . $ sampleMarkerToCenter(49f6e7a06ebc5aa8).(); break;
3611 case PTB_SA_RANGEBEGcxx . . $ PTB_SA_RANGEBEG.: sampleMarkerToBegcxx . . $ sampleMarkerToBeg(49f6e7a06ebc5aa8).(); break;
3612 case PTB_SA_RANGEENDcxx . . $ PTB_SA_RANGEEND.: sampleMarkerToEndcxx . . $ sampleMarkerToEnd(49f6e7a06ebc5aa8).(); break;
3613 case PTB_SA_ZOOMOUTcxx . . $ PTB_SA_ZOOMOUT.: samplerZoomOut2xcxx . . $ samplerZoomOut2x(49f6e7a06ebc5aa8).(); break;
3614
3615 case PTB_SA_VOLUMEcxx . . $ PTB_SA_VOLUME.:
3616 {
3617 uicxx . . $ ui..samplerVolBoxShowncxx . . $ ui_t#samplerVolBoxShown. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3618 renderSamplerVolBoxcxx . . $ renderSamplerVolBox(49f6e7a06ebc5aa8).();
3619 }
3620 break;
3621
3622 case PTB_SA_FILTERScxx . . $ PTB_SA_FILTERS.:
3623 {
3624 uicxx . . $ ui..samplerFiltersBoxShowncxx . . $ ui_t#samplerFiltersBoxShown. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3625 renderSamplerFiltersBoxcxx . . $ renderSamplerFiltersBox(49f6e7a06ebc5aa8).();
3626 fillSampleFilterUndoBuffercxx . . $ fillSampleFilterUndoBuffer(49f6e7a06ebc5aa8).();
3627 }
3628 break;
3629
3630 case PTB_SA_STOPcxx . . $ PTB_SA_STOP.: turnOffVoicescxx . . $ turnOffVoices(49f6e7a06ebc5aa8).(); break;
3631
3632 case PTB_DO_REFRESHcxx . . $ PTB_DO_REFRESH.:
3633 {
3634 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = 0;
3635 diskopcxx . . $ diskop..cachedcxx . . $ diskop_t#cached. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3636 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3637 }
3638 break;
3639
3640 // TODO: Find a PowerPacker packer and enable this
3641 // case PTB_DO_PACKMOD: diskop.modPackFlg ^= 1; break;
3642
3643 case PTB_DO_SAMPLEFORMATcxx . . $ PTB_DO_SAMPLEFORMAT.:
3644 {
3645 diskopcxx . . $ diskop..smpSaveTypecxx . . $ diskop_t#smpSaveType. = (diskopcxx . . $ diskop..smpSaveTypecxx . . $ diskop_t#smpSaveType. + 1) % 3;
3646 uicxx . . $ ui..updateSaveFormatTextcxx . . $ ui_t#updateSaveFormatText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3647 }
3648 break;
3649
3650 case PTB_DO_MODARROWcxx . . $ PTB_DO_MODARROW.:
3651 {
3652 diskopcxx . . $ diskop..modecxx . . $ diskop_t#mode. = DISKOP_MODE_MODcxx . . $ DISKOP_MODE_MOD.;
3653 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = 0;
3654 diskopcxx . . $ diskop..cachedcxx . . $ diskop_t#cached. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3655 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3656 uicxx . . $ ui..updateLoadModecxx . . $ ui_t#updateLoadMode. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3657 }
3658 break;
3659
3660 case PTB_DO_SAMPLEARROWcxx . . $ PTB_DO_SAMPLEARROW.:
3661 {
3662 diskopcxx . . $ diskop..modecxx . . $ diskop_t#mode. = DISKOP_MODE_SMPcxx . . $ DISKOP_MODE_SMP.;
3663 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = 0;
3664 diskopcxx . . $ diskop..cachedcxx . . $ diskop_t#cached. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3665 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3666 uicxx . . $ ui..updateLoadModecxx . . $ ui_t#updateLoadMode. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3667 }
3668 break;
3669
3670 case PTB_SA_TUNETONEcxx . . $ PTB_SA_TUNETONE.: toggleTuningTonecxx . . $ toggleTuningTone(49f6e7a06ebc5aa8).(); break;
3671
3672 case PTB_POSINScxx . . $ PTB_POSINS.: posEdInsertcxx . . $ posEdInsert(49f6e7a06ebc5aa8).(); break;
3673 case PTB_POSDELcxx . . $ PTB_POSDEL.: posEdDeletecxx . . $ posEdDelete(49f6e7a06ebc5aa8).(); break;
3674
3675 case PTB_DO_SAVEMODULEcxx . . $ PTB_DO_SAVEMODULE.:
3676 {
3677 boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! changeLoadMode = (diskopcxx . . $ diskop..modecxx . . $ diskop_t#mode. != DISKOP_MODE_MODcxx . . $ DISKOP_MODE_MOD.);
3678 if (changeLoadMode)
3679 {
3680 diskopcxx . . $ diskop..modecxx . . $ diskop_t#mode. = DISKOP_MODE_MODcxx . . $ DISKOP_MODE_MOD.;
3681 setPathFromDiskOpModecxx . . $ setPathFromDiskOpMode(49f6e7a06ebc5aa8).();
3682 uicxx . . $ ui..updateLoadModecxx . . $ ui_t#updateLoadMode. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; // redraw load mode cursor
3683 updateDiskOpcxx . . $ updateDiskOp(49f6e7a06ebc5aa8).();
3684 }
3685
3686 if (askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_YES_NOcxx . . $ ASKBOX_YES_NO., "SAVE MODULE ?"))
3687 saveModulecxx . . $ saveModule(f2cb034b043a1ce9).(CHECK_IF_FILE_EXISTcxx . . $ CHECK_IF_FILE_EXIST., DONT_GIVE_NEW_FILENAMEcxx . . $ DONT_GIVE_NEW_FILENAME.); // also updates file list
3688
3689 // if we changed mode, re-read directory in Disk Op.
3690 if (changeLoadMode)
3691 {
3692 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = 0;
3693 diskopcxx . . $ diskop..cachedcxx . . $ diskop_t#cached. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; // read new directory
3694 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3695 updateDiskOpcxx . . $ updateDiskOp(49f6e7a06ebc5aa8).();
3696 }
3697 }
3698 break;
3699
3700 case PTB_DO_DATAPATHcxx . . $ PTB_DO_DATAPATH.:
3701 {
3702 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3703 {
3704 memsetcxx . . $ memset(d1de1e4fb215f1c6).(editorcxx . . $ editor..currPathcxx . . $ editor_t#currPath., 0, PATH_MAXcxx . . $ `<external>/6347054901304145714/limits.h:13:9`! + 1);
3705 uicxx . . $ ui..updateDiskOpPathTextcxx . . $ ui_t#updateDiskOpPathText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3706 }
3707
3708 textEditcxx . . $ textEdit..textStartPtrcxx . . $ textEdit_t#textStartPtr. = editorcxx . . $ editor..currPathcxx . . $ editor_t#currPath.;
3709 textEditcxx . . $ textEdit..textEndPtrcxx . . $ textEdit_t#textEndPtr. = &editorcxx . . $ editor..currPathcxx . . $ editor_t#currPath.[PATH_MAXcxx . . $ `<external>/6347054901304145714/limits.h:13:9`! - 1];
3710 textEditcxx . . $ textEdit..numBlockscxx . . $ textEdit_t#numBlocks. = 26;
3711 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 24;
3712 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 30;
3713 textEditcxx . . $ textEdit..scrollablecxx . . $ textEdit_t#scrollable. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3714 enterTextEditModecxx . . $ enterTextEditMode(68e3ae50fe6578a9).(PTB_DO_DATAPATHcxx . . $ PTB_DO_DATAPATH.);
3715 }
3716 break;
3717
3718 case PTB_SONGNAMEcxx . . $ PTB_SONGNAME.:
3719 {
3720 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3721 {
3722 memsetcxx . . $ memset(d1de1e4fb215f1c6).(songcxx . . $ song.->headercxx . . $ module_t#header..namecxx . . $ moduleHeader_t#name., 0, sizeof (songcxx . . $ song.->headercxx . . $ module_t#header..namecxx . . $ moduleHeader_t#name.));
3723 uicxx . . $ ui..updateSongNamecxx . . $ ui_t#updateSongName. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3724 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
3725 }
3726 else
3727 {
3728 textEditcxx . . $ textEdit..textStartPtrcxx . . $ textEdit_t#textStartPtr. = songcxx . . $ song.->headercxx . . $ module_t#header..namecxx . . $ moduleHeader_t#name.;
3729 textEditcxx . . $ textEdit..textEndPtrcxx . . $ textEdit_t#textEndPtr. = songcxx . . $ song.->headercxx . . $ module_t#header..namecxx . . $ moduleHeader_t#name. + 19;
3730 textEditcxx . . $ textEdit..numBlockscxx . . $ textEdit_t#numBlocks. = 20;
3731 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 104;
3732 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 107;
3733 textEditcxx . . $ textEdit..scrollablecxx . . $ textEdit_t#scrollable. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3734 enterTextEditModecxx . . $ enterTextEditMode(68e3ae50fe6578a9).(PTB_SONGNAMEcxx . . $ PTB_SONGNAME.);
3735 }
3736 }
3737 break;
3738
3739 case PTB_SAMPLENAMEcxx . . $ PTB_SAMPLENAME.:
3740 {
3741 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3742 {
3743 memsetcxx . . $ memset(d1de1e4fb215f1c6).(songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].textcxx . . $ moduleSample_t#text., 0, sizeof (songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].textcxx . . $ moduleSample_t#text.));
3744 uicxx . . $ ui..updateCurrSampleNamecxx . . $ ui_t#updateCurrSampleName. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3745 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
3746 }
3747 else
3748 {
3749 textEditcxx . . $ textEdit..textStartPtrcxx . . $ textEdit_t#textStartPtr. = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].textcxx . . $ moduleSample_t#text.;
3750 textEditcxx . . $ textEdit..textEndPtrcxx . . $ textEdit_t#textEndPtr. = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].textcxx . . $ moduleSample_t#text. + 21;
3751 textEditcxx . . $ textEdit..numBlockscxx . . $ textEdit_t#numBlocks. = 22;
3752 textEditcxx . . $ textEdit..cursorStartXcxx . . $ textEdit_t#cursorStartX. = 104;
3753 textEditcxx . . $ textEdit..cursorStartYcxx . . $ textEdit_t#cursorStartY. = 118;
3754 textEditcxx . . $ textEdit..scrollablecxx . . $ textEdit_t#scrollable. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3755 enterTextEditModecxx . . $ enterTextEditMode(68e3ae50fe6578a9).(PTB_SAMPLENAMEcxx . . $ PTB_SAMPLENAME.);
3756 }
3757 }
3758 break;
3759
3760 case PTB_VISUALScxx . . $ PTB_VISUALS.:
3761 {
3762 if (uicxx . . $ ui..aboutScreenShowncxx . . $ ui_t#aboutScreenShown.)
3763 {
3764 uicxx . . $ ui..aboutScreenShowncxx . . $ ui_t#aboutScreenShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3765 }
3766 else if (!mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3767 {
3768 uicxx . . $ ui..visualizerModecxx . . $ ui_t#visualizerMode. = (uicxx . . $ ui..visualizerModecxx . . $ ui_t#visualizerMode. + 1) % 2;
3769 if (uicxx . . $ ui..visualizerModecxx . . $ ui_t#visualizerMode. == VISUAL_SPECTRUMcxx . . $ VISUAL_SPECTRUM.)
3770 memsetcxx . . $ memset(d1de1e4fb215f1c6).((int8_tcxx . . $ int8_t# *)editorcxx . . $ editor..spectrumVolumescxx . . $ editor_t#spectrumVolumes., 0, sizeof (editorcxx . . $ editor..spectrumVolumescxx . . $ editor_t#spectrumVolumes.));
3771 }
3772
3773 if (uicxx . . $ ui..visualizerModecxx . . $ ui_t#visualizerMode. == VISUAL_QUADRASCOPEcxx . . $ VISUAL_QUADRASCOPE.)
3774 renderQuadrascopeBgcxx . . $ renderQuadrascopeBg(49f6e7a06ebc5aa8).();
3775 else if (uicxx . . $ ui..visualizerModecxx . . $ ui_t#visualizerMode. == VISUAL_SPECTRUMcxx . . $ VISUAL_SPECTRUM.)
3776 renderSpectrumAnalyzerBgcxx . . $ renderSpectrumAnalyzerBg(49f6e7a06ebc5aa8).();
3777 }
3778 break;
3779
3780 case PTB_QUITcxx . . $ PTB_QUIT.:
3781 {
3782 if (askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_YES_NOcxx . . $ ASKBOX_YES_NO., "REALLY QUIT ?"))
3783 uicxx . . $ ui..throwExitcxx . . $ ui_t#throwExit. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3784 }
3785 break;
3786
3787 case PTB_CHAN1cxx . . $ PTB_CHAN1.:
3788 {
3789 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3790 {
3791 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[0] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3792 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[1] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3793 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[2] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3794 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[3] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3795 }
3796 else
3797 {
3798 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[0] ^= 1;
3799 }
3800
3801 renderMuteButtonscxx . . $ renderMuteButtons(49f6e7a06ebc5aa8).();
3802 }
3803 break;
3804
3805 case PTB_CHAN2cxx . . $ PTB_CHAN2.:
3806 {
3807 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3808 {
3809 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[0] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3810 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[1] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3811 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[2] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3812 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[3] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3813 }
3814 else
3815 {
3816 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[1] ^= 1;
3817 }
3818
3819 renderMuteButtonscxx . . $ renderMuteButtons(49f6e7a06ebc5aa8).();
3820 }
3821 break;
3822
3823 case PTB_CHAN3cxx . . $ PTB_CHAN3.:
3824 {
3825 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3826 {
3827 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[0] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3828 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[1] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3829 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[2] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3830 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[3] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3831 }
3832 else
3833 {
3834 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[2] ^= 1;
3835 }
3836
3837 renderMuteButtonscxx . . $ renderMuteButtons(49f6e7a06ebc5aa8).();
3838 }
3839 break;
3840
3841 case PTB_CHAN4cxx . . $ PTB_CHAN4.:
3842 {
3843 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3844 {
3845 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[0] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3846 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[1] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3847 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[2] = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3848 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[3] = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3849 }
3850 else
3851 {
3852 editorcxx . . $ editor..mutedcxx . . $ editor_t#muted.[3] ^= 1;
3853 }
3854
3855 renderMuteButtonscxx . . $ renderMuteButtons(49f6e7a06ebc5aa8).();
3856 }
3857 break;
3858
3859 case PTB_SAMPLERcxx . . $ PTB_SAMPLER.: samplerScreencxx . . $ samplerScreen(49f6e7a06ebc5aa8).(); break;
3860 case PTB_SA_EXITcxx . . $ PTB_SA_EXIT.: exitFromSamcxx . . $ exitFromSam(49f6e7a06ebc5aa8).(); break;
3861
3862 case PTB_DO_FILEAREAcxx . . $ PTB_DO_FILEAREA.: diskOpLoadFilecxx . . $ diskOpLoadFile(ee2069353d7cc01f).((mousecxx . . $ mouse..ycxx . . $ mouse_t#y. - 34) / 6, truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!); break;
3863 case PTB_DO_PARENTcxx . . $ PTB_DO_PARENT.:
3864 {
3865 #ifdef _WIN32
3866 diskOpSetPath(L"..", DISKOP_CACHE);
3867 #else
3868 diskOpSetPathcxx . . $ diskOpSetPath(b66281b8031ad34f).("..", DISKOP_CACHEcxx . . $ DISKOP_CACHE.);
3869 #endif
3870 }
3871 break;
3872
3873 case PTB_DISKOPcxx . . $ PTB_DISKOP.:
3874 {
3875 editorcxx . . $ editor..blockMarkFlagcxx . . $ editor_t#blockMarkFlag. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3876 uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3877 renderDiskOpScreencxx . . $ renderDiskOpScreen(49f6e7a06ebc5aa8).();
3878 }
3879 break;
3880
3881 case PTB_DO_EXITcxx . . $ PTB_DO_EXIT.:
3882 {
3883 uicxx . . $ ui..aboutScreenShowncxx . . $ ui_t#aboutScreenShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3884 uicxx . . $ ui..diskOpScreenShowncxx . . $ ui_t#diskOpScreenShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3885 editorcxx . . $ editor..blockMarkFlagcxx . . $ editor_t#blockMarkFlag. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
3886 pointerSetPreviousModecxx . . $ pointerSetPreviousMode(49f6e7a06ebc5aa8).();
3887 setPrevStatusMessagecxx . . $ setPrevStatusMessage(49f6e7a06ebc5aa8).();
3888 displayMainScreencxx . . $ displayMainScreen(49f6e7a06ebc5aa8).();
3889 }
3890 break;
3891
3892 case PTB_DO_SCROLLUPcxx . . $ PTB_DO_SCROLLUP.:
3893 {
3894 if (diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. > 0)
3895 {
3896 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset.--;
3897 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3898 }
3899 }
3900 break;
3901
3902 case PTB_DO_SCROLLTOPcxx . . $ PTB_DO_SCROLLTOP.:
3903 {
3904 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = 0;
3905 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3906 }
3907 break;
3908
3909 case PTB_DO_SCROLLDOWNcxx . . $ PTB_DO_SCROLLDOWN.:
3910 {
3911 if (diskopcxx . . $ diskop..numEntriescxx . . $ diskop_t#numEntries. > DISKOP_LINEScxx . . $ `src/pt2_diskop.h:13:9`! && diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. < diskopcxx . . $ diskop..numEntriescxx . . $ diskop_t#numEntries.-DISKOP_LINEScxx . . $ `src/pt2_diskop.h:13:9`!)
3912 {
3913 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset.++;
3914 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3915 }
3916 }
3917 break;
3918
3919 case PTB_DO_SCROLLBOTcxx . . $ PTB_DO_SCROLLBOT.:
3920 {
3921 if (diskopcxx . . $ diskop..numEntriescxx . . $ diskop_t#numEntries. > DISKOP_LINEScxx . . $ `src/pt2_diskop.h:13:9`!)
3922 {
3923 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = diskopcxx . . $ diskop..numEntriescxx . . $ diskop_t#numEntries. - DISKOP_LINEScxx . . $ `src/pt2_diskop.h:13:9`!;
3924 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
3925 }
3926 }
3927 break;
3928
3929 case PTB_STOPcxx . . $ PTB_STOP.:
3930 {
3931 editorcxx . . $ editor..playModecxx . . $ editor_t#playMode. = PLAY_MODE_NORMALcxx . . $ PLAY_MODE_NORMAL.;
3932 modStopcxx . . $ modStop(49f6e7a06ebc5aa8).();
3933 editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. = MODE_IDLEcxx . . $ MODE_IDLE.;
3934 pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(POINTER_MODE_IDLEcxx . . $ POINTER_MODE_IDLE., DO_CARRYcxx . . $ DO_CARRY.);
3935 statusAllRightcxx . . $ statusAllRight(49f6e7a06ebc5aa8).();
3936 }
3937 break;
3938
3939 case PTB_PLAYcxx . . $ PTB_PLAY.:
3940 {
3941 editorcxx . . $ editor..playModecxx . . $ editor_t#playMode. = PLAY_MODE_NORMALcxx . . $ PLAY_MODE_NORMAL.;
3942
3943 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3944 modPlaycxx . . $ modPlay(7b7bc4ff97a2e5fe).(DONT_SET_PATTERNcxx . . $ DONT_SET_PATTERN., songcxx . . $ song.->currPoscxx . . $ module_t#currPos., songcxx . . $ song.->currRowcxx . . $ module_t#currRow.);
3945 else
3946 modPlaycxx . . $ modPlay(7b7bc4ff97a2e5fe).(DONT_SET_PATTERNcxx . . $ DONT_SET_PATTERN., songcxx . . $ song.->currPoscxx . . $ module_t#currPos., DONT_SET_ROWcxx . . $ DONT_SET_ROW.);
3947
3948 editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. = MODE_PLAYcxx . . $ MODE_PLAY.;
3949 pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(POINTER_MODE_PLAYcxx . . $ POINTER_MODE_PLAY., DO_CARRYcxx . . $ DO_CARRY.);
3950 statusAllRightcxx . . $ statusAllRight(49f6e7a06ebc5aa8).();
3951 }
3952 break;
3953
3954 case PTB_PATTERNcxx . . $ PTB_PATTERN.:
3955 {
3956 editorcxx . . $ editor..playModecxx . . $ editor_t#playMode. = PLAY_MODE_PATTERNcxx . . $ PLAY_MODE_PATTERN.;
3957
3958 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3959 modPlaycxx . . $ modPlay(7b7bc4ff97a2e5fe).(songcxx . . $ song.->currPatterncxx . . $ module_t#currPattern., DONT_SET_ORDERcxx . . $ DONT_SET_ORDER., songcxx . . $ song.->currRowcxx . . $ module_t#currRow.);
3960 else
3961 modPlaycxx . . $ modPlay(7b7bc4ff97a2e5fe).(songcxx . . $ song.->currPatterncxx . . $ module_t#currPattern., DONT_SET_ORDERcxx . . $ DONT_SET_ORDER., DONT_SET_ROWcxx . . $ DONT_SET_ROW.);
3962
3963 editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. = MODE_PLAYcxx . . $ MODE_PLAY.;
3964 pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(POINTER_MODE_PLAYcxx . . $ POINTER_MODE_PLAY., DO_CARRYcxx . . $ DO_CARRY.);
3965 statusAllRightcxx . . $ statusAllRight(49f6e7a06ebc5aa8).();
3966 }
3967 break;
3968
3969 case PTB_EDITcxx . . $ PTB_EDIT.:
3970 {
3971 if (!uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
3972 {
3973 editorcxx . . $ editor..playModecxx . . $ editor_t#playMode. = PLAY_MODE_NORMALcxx . . $ PLAY_MODE_NORMAL.;
3974 modStopcxx . . $ modStop(49f6e7a06ebc5aa8).();
3975 editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. = MODE_EDITcxx . . $ MODE_EDIT.;
3976 pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(POINTER_MODE_EDITcxx . . $ POINTER_MODE_EDIT., DO_CARRYcxx . . $ DO_CARRY.);
3977 statusAllRightcxx . . $ statusAllRight(49f6e7a06ebc5aa8).();
3978 }
3979 }
3980 break;
3981
3982 case PTB_RECORDcxx . . $ PTB_RECORD.:
3983 {
3984 if (!uicxx . . $ ui..samplerScreenShowncxx . . $ ui_t#samplerScreenShown.)
3985 {
3986 editorcxx . . $ editor..playModecxx . . $ editor_t#playMode. = PLAY_MODE_PATTERNcxx . . $ PLAY_MODE_PATTERN.;
3987
3988 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
3989 modPlaycxx . . $ modPlay(7b7bc4ff97a2e5fe).(songcxx . . $ song.->currPatterncxx . . $ module_t#currPattern., DONT_SET_ORDERcxx . . $ DONT_SET_ORDER., songcxx . . $ song.->currRowcxx . . $ module_t#currRow.);
3990 else
3991 modPlaycxx . . $ modPlay(7b7bc4ff97a2e5fe).(songcxx . . $ song.->currPatterncxx . . $ module_t#currPattern., DONT_SET_ORDERcxx . . $ DONT_SET_ORDER., DONT_SET_ROWcxx . . $ DONT_SET_ROW.);
3992
3993 editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. = MODE_RECORDcxx . . $ MODE_RECORD.;
3994 pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(POINTER_MODE_EDITcxx . . $ POINTER_MODE_EDIT., DO_CARRYcxx . . $ DO_CARRY.);
3995 statusAllRightcxx . . $ statusAllRight(49f6e7a06ebc5aa8).();
3996 }
3997 }
3998 break;
3999
4000 case PTB_CLEARcxx . . $ PTB_CLEAR.:
4001 {
4002 int32_tcxx . . $ int32_t# result = askBoxcxx . . $ askBox(7371ee129cebb502).(ASKBOX_CLEARcxx . . $ ASKBOX_CLEAR., "PLEASE SELECT");
4003 if (result == ASKBOX_CLEAR_CANCELcxx . . $ ASKBOX_CLEAR_CANCEL.)
4004 break;
4005
4006 editorcxx . . $ editor..playModecxx . . $ editor_t#playMode. = PLAY_MODE_NORMALcxx . . $ PLAY_MODE_NORMAL.;
4007 modStopcxx . . $ modStop(49f6e7a06ebc5aa8).();
4008
4009 if (result == ASKBOX_CLEAR_SONGcxx . . $ ASKBOX_CLEAR_SONG.)
4010 {
4011 clearSongcxx . . $ clearSong(49f6e7a06ebc5aa8).();
4012 }
4013 else if (result == ASKBOX_CLEAR_SAMPLEScxx . . $ ASKBOX_CLEAR_SAMPLES.)
4014 {
4015 clearSamplescxx . . $ clearSamples(49f6e7a06ebc5aa8).();
4016 }
4017 else if (result == ASKBOX_CLEAR_ALLcxx . . $ ASKBOX_CLEAR_ALL.)
4018 {
4019 clearSongcxx . . $ clearSong(49f6e7a06ebc5aa8).();
4020 clearSamplescxx . . $ clearSamples(49f6e7a06ebc5aa8).();
4021 }
4022
4023 editorcxx . . $ editor..currModecxx . . $ editor_t#currMode. = MODE_IDLEcxx . . $ MODE_IDLE.;
4024 pointerSetModecxx . . $ pointerSetMode(f2ac3508b56cd10).(POINTER_MODE_IDLEcxx . . $ POINTER_MODE_IDLE., DO_CARRYcxx . . $ DO_CARRY.);
4025 statusAllRightcxx . . $ statusAllRight(49f6e7a06ebc5aa8).();
4026
4027 // hide edit op. and about screen, and redraw visualizer
4028
4029 uicxx . . $ ui..editOpScreenShowncxx . . $ ui_t#editOpScreenShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
4030 uicxx . . $ ui..aboutScreenShowncxx . . $ ui_t#aboutScreenShown. = falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
4031
4032 if (uicxx . . $ ui..visualizerModecxx . . $ ui_t#visualizerMode. == VISUAL_QUADRASCOPEcxx . . $ VISUAL_QUADRASCOPE.) renderQuadrascopeBgcxx . . $ renderQuadrascopeBg(49f6e7a06ebc5aa8).();
4033 else if (uicxx . . $ ui..visualizerModecxx . . $ ui_t#visualizerMode. == VISUAL_SPECTRUMcxx . . $ VISUAL_SPECTRUM.) renderSpectrumAnalyzerBgcxx . . $ renderSpectrumAnalyzerBg(49f6e7a06ebc5aa8).();
4034
4035 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4036 }
4037 break;
4038
4039 case PTB_SAMPLEUcxx . . $ PTB_SAMPLEU.:
4040 {
4041 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
4042 {
4043 editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4044 uicxx . . $ ui..updateCurrSampleNumcxx . . $ ui_t#updateCurrSampleNum. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4045 }
4046 else
4047 {
4048 sampleUpButtoncxx . . $ sampleUpButton(49f6e7a06ebc5aa8).();
4049 }
4050 }
4051 break;
4052
4053 case PTB_SAMPLEDcxx . . $ PTB_SAMPLED.:
4054 {
4055 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
4056 {
4057 editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4058 uicxx . . $ ui..updateCurrSampleNumcxx . . $ ui_t#updateCurrSampleNum. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4059 }
4060 else
4061 {
4062 sampleDownButtoncxx . . $ sampleDownButton(49f6e7a06ebc5aa8).();
4063 }
4064 }
4065 break;
4066
4067 case PTB_FTUNEUcxx . . $ PTB_FTUNEU.:
4068 {
4069 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. && (songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].fineTunecxx . . $ moduleSample_t#fineTune. & 0xF) != 7)
4070 {
4071 sampleFineTuneUpButtoncxx . . $ sampleFineTuneUpButton(49f6e7a06ebc5aa8).();
4072 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4073 }
4074 }
4075 break;
4076
4077 case PTB_FTUNEDcxx . . $ PTB_FTUNED.:
4078 {
4079 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. && (songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].fineTunecxx . . $ moduleSample_t#fineTune. & 0xF) != 8)
4080 {
4081 sampleFineTuneDownButtoncxx . . $ sampleFineTuneDownButton(49f6e7a06ebc5aa8).();
4082 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4083 }
4084 }
4085 break;
4086
4087 case PTB_SVOLUMEUcxx . . $ PTB_SVOLUMEU.:
4088 {
4089 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. && songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].volumecxx . . $ moduleSample_t#volume. < 64)
4090 {
4091 sampleVolumeUpButtoncxx . . $ sampleVolumeUpButton(49f6e7a06ebc5aa8).();
4092 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4093 }
4094 }
4095 break;
4096
4097 case PTB_SVOLUMEDcxx . . $ PTB_SVOLUMED.:
4098 {
4099 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. && songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].volumecxx . . $ moduleSample_t#volume. > 0)
4100 {
4101 sampleVolumeDownButtoncxx . . $ sampleVolumeDownButton(49f6e7a06ebc5aa8).();
4102 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4103 }
4104 }
4105 break;
4106
4107 case PTB_SLENGTHUcxx . . $ PTB_SLENGTHU.:
4108 {
4109 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. && songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length. < configcxx . . $ config..maxSampleLengthcxx . . $ config_t#maxSampleLength.)
4110 {
4111 sampleLengthUpButtoncxx . . $ sampleLengthUpButton(b45ddcbc8423892c).(INCREMENT_SLOWcxx . . $ INCREMENT_SLOW.);
4112 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4113 }
4114 }
4115 break;
4116
4117 case PTB_SLENGTHDcxx . . $ PTB_SLENGTHD.:
4118 {
4119 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero. && songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].lengthcxx . . $ moduleSample_t#length. > 0)
4120 {
4121 sampleLengthDownButtoncxx . . $ sampleLengthDownButton(b45ddcbc8423892c).(INCREMENT_SLOWcxx . . $ INCREMENT_SLOW.);
4122 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4123 }
4124 }
4125 break;
4126
4127 case PTB_SREPEATUcxx . . $ PTB_SREPEATU.:
4128 {
4129 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
4130 {
4131 int32_tcxx . . $ int32_t# oldVal = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart.;
4132 sampleRepeatUpButtoncxx . . $ sampleRepeatUpButton(b45ddcbc8423892c).(INCREMENT_SLOWcxx . . $ INCREMENT_SLOW.);
4133 if (songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart. != oldVal)
4134 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4135 }
4136 }
4137 break;
4138
4139 case PTB_SREPEATDcxx . . $ PTB_SREPEATD.:
4140 {
4141 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
4142 {
4143 int32_tcxx . . $ int32_t# oldVal = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart.;
4144 sampleRepeatDownButtoncxx . . $ sampleRepeatDownButton(b45ddcbc8423892c).(INCREMENT_SLOWcxx . . $ INCREMENT_SLOW.);
4145 if (songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopStartcxx . . $ moduleSample_t#loopStart. != oldVal)
4146 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4147 }
4148 }
4149 break;
4150
4151 case PTB_SREPLENUcxx . . $ PTB_SREPLENU.:
4152 {
4153 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
4154 {
4155 int32_tcxx . . $ int32_t# oldVal = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength.;
4156 sampleRepeatLengthUpButtoncxx . . $ sampleRepeatLengthUpButton(b45ddcbc8423892c).(INCREMENT_SLOWcxx . . $ INCREMENT_SLOW.);
4157 if (songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength. != oldVal)
4158 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4159 }
4160 }
4161 break;
4162
4163 case PTB_SREPLENDcxx . . $ PTB_SREPLEND.:
4164 {
4165 if (!editorcxx . . $ editor..sampleZerocxx . . $ editor_t#sampleZero.)
4166 {
4167 int32_tcxx . . $ int32_t# oldVal = songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength.;
4168 sampleRepeatLengthDownButtoncxx . . $ sampleRepeatLengthDownButton(b45ddcbc8423892c).(INCREMENT_SLOWcxx . . $ INCREMENT_SLOW.);
4169 if (songcxx . . $ song.->samplescxx . . $ module_t#samples.[editorcxx . . $ editor..currSamplecxx . . $ editor_t#currSample.].loopLengthcxx . . $ moduleSample_t#loopLength. != oldVal)
4170 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4171 }
4172 }
4173 break;
4174
4175 case PTB_TEMPOUcxx . . $ PTB_TEMPOU.: tempoUpButtoncxx . . $ tempoUpButton(49f6e7a06ebc5aa8).(); break;
4176 case PTB_TEMPODcxx . . $ PTB_TEMPOD.: tempoDownButtoncxx . . $ tempoDownButton(49f6e7a06ebc5aa8).(); break;
4177
4178 case PTB_LENGTHUcxx . . $ PTB_LENGTHU.:
4179 {
4180 if (songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength. < 128)
4181 {
4182 songLengthUpButtoncxx . . $ songLengthUpButton(49f6e7a06ebc5aa8).();
4183 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4184 }
4185 }
4186 break;
4187
4188 case PTB_LENGTHDcxx . . $ PTB_LENGTHD.:
4189 {
4190 if (songcxx . . $ song.->headercxx . . $ module_t#header..songLengthcxx . . $ moduleHeader_t#songLength. > 1)
4191 {
4192 songLengthDownButtoncxx . . $ songLengthDownButton(49f6e7a06ebc5aa8).();
4193 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4194 }
4195 }
4196 break;
4197
4198 case PTB_PATTERNUcxx . . $ PTB_PATTERNU.:
4199 {
4200 if (songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[songcxx . . $ song.->currPoscxx . . $ module_t#currPos.] < 99)
4201 {
4202 patternUpButtoncxx . . $ patternUpButton(49f6e7a06ebc5aa8).();
4203 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4204 }
4205 }
4206 break;
4207
4208 case PTB_PATTERNDcxx . . $ PTB_PATTERND.:
4209 {
4210 if (songcxx . . $ song.->headercxx . . $ module_t#header..patternTablecxx . . $ moduleHeader_t#patternTable.[songcxx . . $ song.->currPoscxx . . $ module_t#currPos.] > 0)
4211 {
4212 patternDownButtoncxx . . $ patternDownButton(49f6e7a06ebc5aa8).();
4213 updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(MOD_IS_MODIFIEDcxx . . $ MOD_IS_MODIFIED.);
4214 }
4215 }
4216 break;
4217
4218 case PTB_POSUcxx . . $ PTB_POSU.: positionUpButtoncxx . . $ positionUpButton(49f6e7a06ebc5aa8).(); break;
4219 case PTB_POSDcxx . . $ PTB_POSD.: positionDownButtoncxx . . $ positionDownButton(49f6e7a06ebc5aa8).(); break;
4220
4221 default: displayErrorMsgcxx . . $ displayErrorMsg(85c52e162fed56f9).("NOT IMPLEMENTED"); return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; // button not mapped
4222 }
4223
4224 mousecxx . . $ mouse..lastGUIButtoncxx . . $ mouse_t#lastGUIButton. = button;
4225 return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!;
4226 }
4227
4228 static void handleRepeatedGUIButtonscxx . . $ handleRepeatedGUIButtons(49f6e7a06ebc5aa8).(void)
4229 {
4230 // repeat button
4231 switch (mousecxx . . $ mouse..lastGUIButtoncxx . . $ mouse_t#lastGUIButton.)
4232 {
4233 case PTB_EO_NOTE1_UPcxx . . $ PTB_EO_NOTE1_UP.:
4234 {
4235 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 4)
4236 {
4237 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4238 edNote1UpButtoncxx . . $ edNote1UpButton(49f6e7a06ebc5aa8).();
4239 }
4240 }
4241 break;
4242
4243 case PTB_EO_NOTE1_DOWNcxx . . $ PTB_EO_NOTE1_DOWN.:
4244 {
4245 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 4)
4246 {
4247 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4248 edNote1DownButtoncxx . . $ edNote1DownButton(49f6e7a06ebc5aa8).();
4249 }
4250 }
4251 break;
4252
4253 case PTB_EO_NOTE2_UPcxx . . $ PTB_EO_NOTE2_UP.:
4254 {
4255 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 4)
4256 {
4257 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4258 edNote2UpButtoncxx . . $ edNote2UpButton(49f6e7a06ebc5aa8).();
4259 }
4260 }
4261 break;
4262
4263 case PTB_EO_NOTE2_DOWNcxx . . $ PTB_EO_NOTE2_DOWN.:
4264 {
4265 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 4)
4266 {
4267 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4268 edNote2DownButtoncxx . . $ edNote2DownButton(49f6e7a06ebc5aa8).();
4269 }
4270 }
4271 break;
4272
4273 case PTB_EO_NOTE3_UPcxx . . $ PTB_EO_NOTE3_UP.:
4274 {
4275 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 4)
4276 {
4277 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4278 edNote3UpButtoncxx . . $ edNote3UpButton(49f6e7a06ebc5aa8).();
4279 }
4280 }
4281 break;
4282
4283 case PTB_EO_NOTE3_DOWNcxx . . $ PTB_EO_NOTE3_DOWN.:
4284 {
4285 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 4)
4286 {
4287 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4288 edNote3DownButtoncxx . . $ edNote3DownButton(49f6e7a06ebc5aa8).();
4289 }
4290 }
4291 break;
4292
4293 case PTB_EO_NOTE4_UPcxx . . $ PTB_EO_NOTE4_UP.:
4294 {
4295 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 4)
4296 {
4297 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4298 edNote4UpButtoncxx . . $ edNote4UpButton(49f6e7a06ebc5aa8).();
4299 }
4300 }
4301 break;
4302
4303 case PTB_EO_NOTE4_DOWNcxx . . $ PTB_EO_NOTE4_DOWN.:
4304 {
4305 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 4)
4306 {
4307 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4308 edNote4DownButtoncxx . . $ edNote4DownButton(49f6e7a06ebc5aa8).();
4309 }
4310 }
4311 break;
4312
4313 case PTB_EO_VOL_UPcxx . . $ PTB_EO_VOL_UP.:
4314 {
4315 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 2)
4316 {
4317 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4318 edVolUpButtoncxx . . $ edVolUpButton(49f6e7a06ebc5aa8).();
4319 }
4320 }
4321 break;
4322
4323 case PTB_EO_VOL_DOWNcxx . . $ PTB_EO_VOL_DOWN.:
4324 {
4325 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 2)
4326 {
4327 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4328 edVolDownButtoncxx . . $ edVolDownButton(49f6e7a06ebc5aa8).();
4329 }
4330 }
4331 break;
4332
4333 case PTB_EO_MOD_UPcxx . . $ PTB_EO_MOD_UP.:
4334 {
4335 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 2)
4336 {
4337 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4338 edModUpButtoncxx . . $ edModUpButton(49f6e7a06ebc5aa8).();
4339 }
4340 }
4341 break;
4342
4343 case PTB_EO_MOD_DOWNcxx . . $ PTB_EO_MOD_DOWN.:
4344 {
4345 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 2)
4346 {
4347 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4348 edModDownButtoncxx . . $ edModDownButton(49f6e7a06ebc5aa8).();
4349 }
4350 }
4351 break;
4352
4353 case PTB_EO_POS_UPcxx . . $ PTB_EO_POS_UP.:
4354 {
4355 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 1)
4356 {
4357 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4358 edPosUpButtoncxx . . $ edPosUpButton(b45ddcbc8423892c).(INCREMENT_FASTcxx . . $ INCREMENT_FAST.);
4359 }
4360 }
4361 break;
4362
4363 case PTB_EO_POS_DOWNcxx . . $ PTB_EO_POS_DOWN.:
4364 {
4365 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 1)
4366 {
4367 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4368 edPosDownButtoncxx . . $ edPosDownButton(b45ddcbc8423892c).(INCREMENT_FASTcxx . . $ INCREMENT_FAST.);
4369 }
4370 }
4371 break;
4372
4373 case PTB_EO_FROM_UPcxx . . $ PTB_EO_FROM_UP.:
4374 {
4375 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 2)
4376 {
4377 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4378 if (editorcxx . . $ editor..sampleFromcxx . . $ editor_t#sampleFrom. < 0x1F)
4379 {
4380 editorcxx . . $ editor..sampleFromcxx . . $ editor_t#sampleFrom.++;
4381 uicxx . . $ ui..updateFromTextcxx . . $ ui_t#updateFromText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4382 }
4383 }
4384 }
4385 break;
4386
4387 case PTB_EO_FROM_DOWNcxx . . $ PTB_EO_FROM_DOWN.:
4388 {
4389 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 2)
4390 {
4391 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4392 if (editorcxx . . $ editor..sampleFromcxx . . $ editor_t#sampleFrom. > 0x00)
4393 {
4394 editorcxx . . $ editor..sampleFromcxx . . $ editor_t#sampleFrom.--;
4395 uicxx . . $ ui..updateFromTextcxx . . $ ui_t#updateFromText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4396 }
4397 }
4398 }
4399 break;
4400
4401 case PTB_EO_TO_UPcxx . . $ PTB_EO_TO_UP.:
4402 {
4403 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 2)
4404 {
4405 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4406 if (editorcxx . . $ editor..sampleTocxx . . $ editor_t#sampleTo. < 0x1F)
4407 {
4408 editorcxx . . $ editor..sampleTocxx . . $ editor_t#sampleTo.++;
4409 uicxx . . $ ui..updateToTextcxx . . $ ui_t#updateToText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4410 }
4411 }
4412 }
4413 break;
4414
4415 case PTB_EO_TO_DOWNcxx . . $ PTB_EO_TO_DOWN.:
4416 {
4417 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 2)
4418 {
4419 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4420 if (editorcxx . . $ editor..sampleTocxx . . $ editor_t#sampleTo. > 0x00)
4421 {
4422 editorcxx . . $ editor..sampleTocxx . . $ editor_t#sampleTo.--;
4423 uicxx . . $ ui..updateToTextcxx . . $ ui_t#updateToText. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4424 }
4425 }
4426 }
4427 break;
4428
4429 case PTB_SAMPLEUcxx . . $ PTB_SAMPLEU.:
4430 {
4431 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 5)
4432 {
4433 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4434 if (!mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
4435 sampleUpButtoncxx . . $ sampleUpButton(49f6e7a06ebc5aa8).();
4436 else
4437 uicxx . . $ ui..updateCurrSampleNumcxx . . $ ui_t#updateCurrSampleNum. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4438 }
4439 }
4440 break;
4441
4442 case PTB_SAMPLEDcxx . . $ PTB_SAMPLED.:
4443 {
4444 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 5)
4445 {
4446 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4447 if (!mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
4448 sampleDownButtoncxx . . $ sampleDownButton(49f6e7a06ebc5aa8).();
4449 else
4450 uicxx . . $ ui..updateCurrSampleNumcxx . . $ ui_t#updateCurrSampleNum. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4451 }
4452 }
4453 break;
4454
4455 case PTB_FTUNEUcxx . . $ PTB_FTUNEU.:
4456 {
4457 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 5)
4458 {
4459 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4460 sampleFineTuneUpButtoncxx . . $ sampleFineTuneUpButton(49f6e7a06ebc5aa8).();
4461 }
4462 }
4463 break;
4464
4465 case PTB_FTUNEDcxx . . $ PTB_FTUNED.:
4466 {
4467 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 5)
4468 {
4469 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4470 sampleFineTuneDownButtoncxx . . $ sampleFineTuneDownButton(49f6e7a06ebc5aa8).();
4471 }
4472 }
4473 break;
4474
4475 case PTB_SVOLUMEUcxx . . $ PTB_SVOLUMEU.:
4476 {
4477 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 5)
4478 {
4479 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4480 sampleVolumeUpButtoncxx . . $ sampleVolumeUpButton(49f6e7a06ebc5aa8).();
4481 }
4482 }
4483 break;
4484
4485 case PTB_SVOLUMEDcxx . . $ PTB_SVOLUMED.:
4486 {
4487 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 5)
4488 {
4489 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4490 sampleVolumeDownButtoncxx . . $ sampleVolumeDownButton(49f6e7a06ebc5aa8).();
4491 }
4492 }
4493 break;
4494
4495 case PTB_SLENGTHUcxx . . $ PTB_SLENGTHU.:
4496 {
4497 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed. || mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 1)
4498 {
4499 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4500 sampleLengthUpButtoncxx . . $ sampleLengthUpButton(b45ddcbc8423892c).(INCREMENT_FASTcxx . . $ INCREMENT_FAST.);
4501 }
4502 }
4503 break;
4504
4505 case PTB_SLENGTHDcxx . . $ PTB_SLENGTHD.:
4506 {
4507 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed. || mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 1)
4508 {
4509 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4510 sampleLengthDownButtoncxx . . $ sampleLengthDownButton(b45ddcbc8423892c).(INCREMENT_FASTcxx . . $ INCREMENT_FAST.);
4511 }
4512 }
4513 break;
4514
4515 case PTB_SREPEATUcxx . . $ PTB_SREPEATU.:
4516 {
4517 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed. || mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 1)
4518 {
4519 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4520 sampleRepeatUpButtoncxx . . $ sampleRepeatUpButton(b45ddcbc8423892c).(INCREMENT_FASTcxx . . $ INCREMENT_FAST.);
4521 }
4522 }
4523 break;
4524
4525 case PTB_SREPEATDcxx . . $ PTB_SREPEATD.:
4526 {
4527 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed. || mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 1)
4528 {
4529 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4530 sampleRepeatDownButtoncxx . . $ sampleRepeatDownButton(b45ddcbc8423892c).(INCREMENT_FASTcxx . . $ INCREMENT_FAST.);
4531 }
4532 }
4533 break;
4534
4535 case PTB_SREPLENUcxx . . $ PTB_SREPLENU.:
4536 {
4537 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed. || mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 1)
4538 {
4539 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4540 sampleRepeatLengthUpButtoncxx . . $ sampleRepeatLengthUpButton(b45ddcbc8423892c).(INCREMENT_FASTcxx . . $ INCREMENT_FAST.);
4541 }
4542 }
4543 break;
4544
4545 case PTB_SREPLENDcxx . . $ PTB_SREPLEND.:
4546 {
4547 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed. || mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 1)
4548 {
4549 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4550 sampleRepeatLengthDownButtoncxx . . $ sampleRepeatLengthDownButton(b45ddcbc8423892c).(INCREMENT_FASTcxx . . $ INCREMENT_FAST.);
4551 }
4552 }
4553 break;
4554
4555 case PTB_TEMPOUcxx . . $ PTB_TEMPOU.:
4556 {
4557 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 3)
4558 {
4559 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4560 tempoUpButtoncxx . . $ tempoUpButton(49f6e7a06ebc5aa8).();
4561 }
4562 }
4563 break;
4564
4565 case PTB_TEMPODcxx . . $ PTB_TEMPOD.:
4566 {
4567 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 3)
4568 {
4569 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4570 tempoDownButtoncxx . . $ tempoDownButton(49f6e7a06ebc5aa8).();
4571 }
4572 }
4573 break;
4574
4575 case PTB_LENGTHUcxx . . $ PTB_LENGTHU.:
4576 {
4577 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 7)
4578 {
4579 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4580 songLengthUpButtoncxx . . $ songLengthUpButton(49f6e7a06ebc5aa8).();
4581 }
4582 }
4583 break;
4584
4585 case PTB_LENGTHDcxx . . $ PTB_LENGTHD.:
4586 {
4587 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 7)
4588 {
4589 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4590 songLengthDownButtoncxx . . $ songLengthDownButton(49f6e7a06ebc5aa8).();
4591 }
4592 }
4593 break;
4594
4595 case PTB_PATTERNUcxx . . $ PTB_PATTERNU.:
4596 {
4597 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 7)
4598 {
4599 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4600 patternUpButtoncxx . . $ patternUpButton(49f6e7a06ebc5aa8).();
4601 }
4602 }
4603 break;
4604
4605 case PTB_PATTERNDcxx . . $ PTB_PATTERND.:
4606 {
4607 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 7)
4608 {
4609 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4610 patternDownButtoncxx . . $ patternDownButton(49f6e7a06ebc5aa8).();
4611 }
4612 }
4613 break;
4614
4615 case PTB_POSUcxx . . $ PTB_POSU.:
4616 {
4617 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 7)
4618 {
4619 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4620 positionUpButtoncxx . . $ positionUpButton(49f6e7a06ebc5aa8).();
4621 }
4622 }
4623 break;
4624
4625 case PTB_POSDcxx . . $ PTB_POSD.:
4626 {
4627 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 7)
4628 {
4629 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4630 positionDownButtoncxx . . $ positionDownButton(49f6e7a06ebc5aa8).();
4631 }
4632 }
4633 break;
4634
4635 case PTB_PE_SCROLLUPcxx . . $ PTB_PE_SCROLLUP.:
4636 {
4637 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 2)
4638 {
4639 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4640 posEdScrollUpcxx . . $ posEdScrollUp(49f6e7a06ebc5aa8).();
4641 }
4642 }
4643 break;
4644
4645 case PTB_PE_SCROLLDOWNcxx . . $ PTB_PE_SCROLLDOWN.:
4646 {
4647 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 2)
4648 {
4649 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4650 posEdScrollDowncxx . . $ posEdScrollDown(49f6e7a06ebc5aa8).();
4651 }
4652 }
4653 break;
4654
4655 case PTB_DO_SCROLLUPcxx . . $ PTB_DO_SCROLLUP.:
4656 {
4657 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 1)
4658 {
4659 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4660
4661 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset.--;
4662 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
4663 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. -= 3;
4664
4665 if (diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. < 0)
4666 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = 0;
4667
4668 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4669 }
4670 }
4671 break;
4672
4673 case PTB_DO_SCROLLDOWNcxx . . $ PTB_DO_SCROLLDOWN.:
4674 {
4675 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 1)
4676 {
4677 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4678
4679 if (diskopcxx . . $ diskop..numEntriescxx . . $ diskop_t#numEntries. > DISKOP_LINEScxx . . $ `src/pt2_diskop.h:13:9`!)
4680 {
4681 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset.++;
4682 if (mousecxx . . $ mouse..rightButtonPressedcxx . . $ mouse_t#rightButtonPressed.)
4683 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. += 3;
4684
4685 if (diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. > diskopcxx . . $ diskop..numEntriescxx . . $ diskop_t#numEntries.-DISKOP_LINEScxx . . $ `src/pt2_diskop.h:13:9`!)
4686 diskopcxx . . $ diskop..scrollOffsetcxx . . $ diskop_t#scrollOffset. = diskopcxx . . $ diskop..numEntriescxx . . $ diskop_t#numEntries.-DISKOP_LINEScxx . . $ `src/pt2_diskop.h:13:9`!;
4687
4688 uicxx . . $ ui..updateDiskOpFileListcxx . . $ ui_t#updateDiskOpFileList. = truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!;
4689 }
4690 }
4691 }
4692 break;
4693
4694 case PTB_SA_ZOOMBARAREAcxx . . $ PTB_SA_ZOOMBARAREA.:
4695 {
4696 if (mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. >= 4)
4697 {
4698 mousecxx . . $ mouse..repeatCountercxx . . $ mouse_t#repeatCounter. = 0;
4699 if (!uicxx . . $ ui..forceSampleDragcxx . . $ ui_t#forceSampleDrag.)
4700 samplerBarPressedcxx . . $ samplerBarPressed(b45ddcbc8423892c).(MOUSE_BUTTON_NOT_HELDcxx . . $ MOUSE_BUTTON_NOT_HELD.);
4701 }
4702 }
4703 break;
4704
4705 default: break;
4706 }
4707 }