├── .gitignore
├── FAKE_mixer.c
├── Makefile
├── README.md
├── SDL_mixer.h
├── celeste.cpp
├── celeste.h
├── data
├── ccleste-input-cfg.txt
├── font.bmp
├── frame_xbox.bmp
├── gamecontrollerdb.txt
├── gfx.bmp
├── mus0.adx
├── mus10.adx
├── mus20.adx
├── mus30.adx
├── mus40.adx
├── snd0.wav
├── snd1.wav
├── snd13.wav
├── snd14.wav
├── snd15.wav
├── snd16.wav
├── snd2.wav
├── snd23.wav
├── snd3.wav
├── snd35.wav
├── snd37.wav
├── snd38.wav
├── snd4.wav
├── snd40.wav
├── snd5.wav
├── snd50.wav
├── snd51.wav
├── snd54.wav
├── snd55.wav
├── snd6.wav
├── snd7.wav
├── snd8.wav
├── snd9.wav
└── test-tas.txt
├── data_src
├── adx
│ ├── mus0.adx
│ ├── mus0_old.adx
│ ├── mus10.adx
│ ├── mus20.adx
│ ├── mus30.adx
│ ├── mus40.adx
│ ├── snd0.adx
│ ├── snd1.adx
│ ├── snd13.adx
│ ├── snd14.adx
│ ├── snd15.adx
│ ├── snd16.adx
│ ├── snd2.adx
│ ├── snd23.adx
│ ├── snd3.adx
│ ├── snd35.adx
│ ├── snd37.adx
│ ├── snd38.adx
│ ├── snd4.adx
│ ├── snd40.adx
│ ├── snd5.adx
│ ├── snd50.adx
│ ├── snd51.adx
│ ├── snd54.adx
│ ├── snd55.adx
│ ├── snd6.adx
│ ├── snd7.adx
│ ├── snd8.adx
│ └── snd9.adx
├── mp3
│ ├── mus0.mp3
│ ├── mus0_old.mp3
│ ├── mus10.mp3
│ ├── mus20.mp3
│ ├── mus30.mp3
│ └── mus40.mp3
├── ogg
│ ├── mus0.ogg
│ ├── mus0_old.ogg
│ ├── mus10.ogg
│ ├── mus20.ogg
│ ├── mus30.ogg
│ ├── mus40.ogg
│ ├── snd0.ogg
│ ├── snd1.ogg
│ ├── snd13.ogg
│ ├── snd14.ogg
│ ├── snd15.ogg
│ ├── snd16.ogg
│ ├── snd2.ogg
│ ├── snd23.ogg
│ ├── snd3.ogg
│ ├── snd35.ogg
│ ├── snd37.ogg
│ ├── snd38.ogg
│ ├── snd4.ogg
│ ├── snd40.ogg
│ ├── snd5.ogg
│ ├── snd50.ogg
│ ├── snd51.ogg
│ ├── snd54.ogg
│ ├── snd55.ogg
│ ├── snd6.ogg
│ ├── snd7.ogg
│ ├── snd8.ogg
│ └── snd9.ogg
├── res
│ ├── font.bmp
│ ├── font.jpg
│ ├── gfx.bmp
│ └── gfx.jpg
├── vmu
│ ├── icon44x44_mask.bmp
│ ├── mask0.png
│ ├── mask1.png
│ └── mask1l.png
├── wav
│ ├── mus0.wav
│ ├── mus0_old.wav
│ ├── mus10.wav
│ ├── mus20.wav
│ ├── mus30.wav
│ ├── mus40.wav
│ ├── optimize_wav.sh
│ ├── optimized
│ │ ├── mus0.wav
│ │ ├── mus0_old.wav
│ │ ├── mus10.wav
│ │ ├── mus20.wav
│ │ ├── mus30.wav
│ │ ├── mus40.wav
│ │ ├── snd0.wav
│ │ ├── snd1.wav
│ │ ├── snd13.wav
│ │ ├── snd14.wav
│ │ ├── snd15.wav
│ │ ├── snd16.wav
│ │ ├── snd2.wav
│ │ ├── snd23.wav
│ │ ├── snd3.wav
│ │ ├── snd35.wav
│ │ ├── snd37.wav
│ │ ├── snd38.wav
│ │ ├── snd4.wav
│ │ ├── snd40.wav
│ │ ├── snd5.wav
│ │ ├── snd50.wav
│ │ ├── snd51.wav
│ │ ├── snd54.wav
│ │ ├── snd55.wav
│ │ ├── snd6.wav
│ │ ├── snd7.wav
│ │ ├── snd8.wav
│ │ └── snd9.wav
│ ├── snd0.wav
│ ├── snd1.wav
│ ├── snd13.wav
│ ├── snd14.wav
│ ├── snd15.wav
│ ├── snd16.wav
│ ├── snd2.wav
│ ├── snd23.wav
│ ├── snd3.wav
│ ├── snd35.wav
│ ├── snd37.wav
│ ├── snd38.wav
│ ├── snd4.wav
│ ├── snd40.wav
│ ├── snd5.wav
│ ├── snd50.wav
│ ├── snd51.wav
│ ├── snd54.wav
│ ├── snd55.wav
│ ├── snd6.wav
│ ├── snd7.wav
│ ├── snd8.wav
│ └── snd9.wav
└── wav_low
│ ├── mus0.wav
│ ├── mus0_old.wav
│ ├── mus10.wav
│ ├── mus20.wav
│ ├── mus30.wav
│ ├── mus40.wav
│ ├── snd0.wav
│ ├── snd1.wav
│ ├── snd13.wav
│ ├── snd14.wav
│ ├── snd15.wav
│ ├── snd16.wav
│ ├── snd2.wav
│ ├── snd23.wav
│ ├── snd3.wav
│ ├── snd35.wav
│ ├── snd37.wav
│ ├── snd38.wav
│ ├── snd4.wav
│ ├── snd40.wav
│ ├── snd5.wav
│ ├── snd50.wav
│ ├── snd51.wav
│ ├── snd54.wav
│ ├── snd55.wav
│ ├── snd6.wav
│ ├── snd7.wav
│ ├── snd8.wav
│ └── snd9.wav
├── make_cdi.sh
├── mixer_ogg.cpp
├── mixer_ogg.h
├── mm.c
├── mm.h
├── romdisk
└── .keepme
├── sdl12main.c
├── sdl20compat.inc.c
├── tilemap.h
├── tools
├── SDL_dreamcastvideo.c
├── blade0942.zip
├── dc_sdl12main.c
├── libdiscimage.a
└── mkdcdisc
└── vmu0.xpm
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | /.vscode
3 | celeste-dc.cdi
4 | *.elf
5 | *.o
6 | *.img
7 | *.log
8 | *.Identifier
9 |
--------------------------------------------------------------------------------
/FAKE_mixer.c:
--------------------------------------------------------------------------------
1 | #include "SDL_mixer.h"
2 | #include "mm.h"
3 |
4 | //SDL_Mixer
5 | static void (*music_finished_hook)(void) = NULL;
6 | static void (*channel_finished_hook)(int channel) = NULL;
7 | static void (*mix_music)(void *udata) = NULL;
8 | static void *music_data = NULL;
9 |
10 | int loaded=0;
11 | int gfrequency=0;
12 | int gchannels=0;
13 | UBYTE voicevolume=255;
14 | int musicvolume=128;
15 | int v1;
16 |
17 | static void *snd_thread(void *data)
18 | {
19 |
20 | for(;;)
21 | {
22 | MikMod_Update();
23 | thd_sleep(1);
24 | }
25 |
26 | return NULL;
27 | }
28 |
29 |
30 | int Mix_OpenAudio(int frequency, uint16 format, int channels, int chunksize)
31 | {
32 | /* register all the drivers */
33 | MikMod_RegisterAllDrivers();
34 |
35 | /* register all the module loaders */
36 | MikMod_RegisterAllLoaders();
37 |
38 | /* initialize the library */
39 | md_mode |= DMODE_SOFT_MUSIC | DMODE_SOFT_SNDFX;
40 |
41 | snd_stream_init();
42 | //sndoggvorbis_init();
43 | //printf("sndoggvorbis_init(); called...\n");
44 | //mp3_init();
45 | //printf("mp3_init(); called...\n");
46 |
47 | if (MikMod_Init("")) {
48 | printf("Could not initialize sound, reason: %s\n", MikMod_strerror(MikMod_errno));
49 | return 1;
50 | }
51 |
52 | /* One for music and one for sfx */
53 | MikMod_SetNumVoices(-1,8);
54 | MikMod_EnableOutput();
55 |
56 | loaded = 1;
57 | gfrequency = frequency;
58 | gchannels = channels;
59 |
60 | thd_create(0, snd_thread, NULL);
61 | return 0;
62 | }
63 |
64 |
65 | void Mix_CloseAudio(void)
66 | {
67 | if (loaded == 1){
68 | MikMod_DisableOutput();
69 | MikMod_Exit();
70 | loaded = 0;
71 | }
72 | }
73 |
74 | void Mix_FreeChunk(Mix_Chunk *chunk)
75 | {
76 | free(chunk);
77 |
78 | //Sample_Free((SAMPLE *)chunk);
79 | }
80 |
81 | int Mix_PlayChannel(int channel, Mix_Chunk *chunk, int loops)
82 | {
83 | printf("Mix_PlayChannel\n");
84 | return Mix_PlayChannelTimed(channel, chunk, loops, -1);
85 | }
86 |
87 | int Mix_PlayChannelTimed(int channel, Mix_Chunk *chunk, int loops, int ticks)
88 | {
89 | printf("Mix_PlayChannelTimed\n");
90 | return snd_sfx_play(chunk->handle, chunk->volume, 128);
91 |
92 | /*
93 | SAMPLE *sample;
94 | sample=(SAMPLE *)chunk;
95 |
96 | //OK, Mikmod will play any loaded wav at max sound at fisrt!
97 | //SO, must change internal sample volume before playing... dirty!
98 | sample->volume = voicevolume;
99 | sample->panning = PAN_CENTER;
100 | v1 = Sample_Play(sample, 0, 0);
101 | return 0;
102 | */
103 | }
104 |
105 | int Mix_HaltChannel(int channel)
106 | {
107 | printf("Mix_HaltChannel\n");;
108 | Player_Stop();
109 |
110 | if (channel_finished_hook){
111 | channel_finished_hook(channel);
112 | }
113 |
114 | return 0;
115 | }
116 |
117 | //0-255
118 | int Mix_Volume(int channel, int v)
119 | {
120 | printf("Mix_Volume\n");
121 | voicevolume = v;
122 | if (Voice_Stopped(v1) == 0) Voice_SetVolume(v1, v);
123 | return v;
124 | }
125 |
126 | void Mix_Resume(int channel)
127 | {
128 | printf("Mix_Resume\n");
129 | return;
130 | }
131 |
132 | void Mix_Pause(int channel)
133 | {
134 | printf("Mix_Pause\n");
135 | return;
136 | }
137 |
138 | Mix_Chunk *Mix_LoadWAV(const char *file)
139 | {
140 | printf("Mix_LoadWAV\n");
141 | sfxhnd_t snd = snd_sfx_load(file);
142 | if (!snd)
143 | {
144 | printf("Failed to load sample.\n");
145 | return NULL;
146 | }
147 |
148 | Mix_Chunk* chunk = (Mix_Chunk*)malloc(sizeof(Mix_Chunk));
149 | chunk->handle = snd;
150 | chunk->volume = 255;
151 | return chunk;
152 |
153 | /*
154 | SAMPLE *sample;
155 | // load module
156 | sample = Sample_Load(file);
157 | if (sample) {
158 | return (Mix_Chunk *) sample;
159 | }else
160 | {
161 | printf("Could not load sample, reason: %s\n", MikMod_strerror(MikMod_errno));
162 | }
163 | return NULL;
164 | */
165 | }
166 |
167 | //0-255
168 | int Mix_VolumeChunk(Mix_Chunk *chunk, int volume)
169 | {
170 | /*
171 | voicevolume = volume;
172 | if (Voice_Stopped(v1) == 0) Voice_SetVolume(v1, volume);
173 | return volume;
174 | */
175 |
176 | printf("Mix_VolumeChunk\n");
177 | chunk->volume = 255;
178 | return volume;
179 | }
180 |
181 | Mix_Chunk *Mix_LoadWAV_RW(SDL_RWops *src, int freesrc)
182 | {
183 |
184 | /*
185 | SAMPLE *sample;
186 | struct MREADER* reader = _mm_new_rwops_reader (src);
187 | if (reader) {
188 | sample = Sample_LoadGeneric(reader);
189 | if(reader) free(reader);
190 | return (Mix_Music *) sample;
191 | }
192 | else
193 | {
194 | printf("Could not load sample, reason: %s\n", MikMod_strerror(MikMod_errno));
195 | }
196 | */
197 | printf("Mix_LoadWAV_RW\n");;
198 | return NULL;
199 | }
200 |
201 | //This one is for wavs!
202 | int Mix_Playing(int channel)
203 | {
204 | printf("Mix_Playing\n");
205 | if (Voice_Stopped(v1) == 0) return 1;
206 | else return 0;
207 | }
208 |
209 | //Music part!
210 | int Mix_PlayingMusic(void)
211 | {
212 | printf("Mix_PlayingMusic\n");
213 | return Player_Active();
214 | }
215 |
216 | /*Mix_Music *Mix_LoadMUS(const char *file)
217 | {
218 | MODULE *module;
219 | // load module
220 | module = Player_Load((char *)(file), 64, 0);
221 | if (module) {
222 | return (Mix_Music *) module;
223 | }else
224 | {
225 | printf("Could not load module, reason: %s\n", MikMod_strerror(MikMod_errno));
226 | }
227 | return NULL;
228 |
229 | }*/
230 |
231 | /*Mix_Music *Mix_LoadMUS(const char *file)
232 | {
233 | // Start playback of the Ogg Vorbis file
234 | if (sndoggvorbis_start(file, 0) == 0) { // '1' indicates looping
235 | printf("Successfully started playing Ogg Vorbis file: %s\n", file);
236 | return (Mix_Music *)file; // Cast the file pointer for compatibility
237 | } else {
238 | printf("Could not start playback of Ogg Vorbis file: %s\n", file);
239 | }
240 |
241 | return NULL; // Return NULL if the file could not be played
242 | }*/
243 |
244 | int Mix_PlayMusic(Mix_Music *music, int loops) {
245 | printf("Mix_PlayMusic\n");
246 |
247 | if (!music) {
248 | printf("Mix_PlayMusic: No music provided.\n");
249 | return -1;
250 | }
251 |
252 | int loop_flag = (loops == -1) ? 1 : 0; // Loop if loops == -1
253 | printf("Looping: %d\n", loop_flag);
254 |
255 | if (adx_dec((char *)music, loop_flag) < 0) {
256 | printf("Mix_PlayMusic: Failed to play music.\n");
257 | return -1;
258 | }
259 |
260 | printf("Mix_PlayMusic: Now playing music\n");
261 | return 0;
262 | }
263 |
264 | Mix_Music *Mix_LoadMUS(const char *file) {
265 | printf("Mix_LoadMUS %s\n", file);
266 |
267 | if (!file || strlen(file) >= 256) {
268 | printf("Mix_LoadMUS: Invalid file or file path too long.\n");
269 | return NULL;
270 | }
271 |
272 | Mix_Music *music = (Mix_Music *)malloc(sizeof(Mix_Music));
273 | if (!music) {
274 | printf("Mix_LoadMUS: Memory allocation failed.\n");
275 | return NULL;
276 | }
277 |
278 | strncpy(((char *)music), file, 255);
279 | ((char *)music)[255] = '\0';
280 |
281 | printf("Mix_LoadMUS: Successfully loaded %s.\n", file);
282 | return music;
283 | }
284 |
285 | int Mix_HaltMusic(void) {
286 | adx_stop();
287 | printf("Mix_HaltMusic: Music stopped.\n");
288 | return 0;
289 | }
290 |
291 | void Mix_FreeMusic(Mix_Music *music) {
292 | printf("Mix_FreeMusic\n");
293 |
294 | if (music) {
295 | free(music);
296 | printf("Mix_FreeMusic: Memory freed.\n");
297 | }
298 | }
299 |
300 | int Mix_FadeOutMusic(int ms) {
301 | printf("Mix_FadeOutMusic: Fading out music over %d ms.\n", ms);
302 | return Mix_HaltMusic();
303 | }
304 |
305 |
306 |
307 | /* SDL_RWops compatibility */
308 | Mix_Music *Mix_LoadMUS_RW(SDL_RWops *rw) {
309 | printf("Mix_LoadMUS_RW\n");
310 |
311 | //Sanity check: only MOD!
312 | if (detect_music_type(rw) != MUS_MOD){
313 | printf("Error: format not supported.\n");
314 | return NULL;
315 | }
316 |
317 | MODULE *module;
318 | struct MREADER* reader = _mm_new_rwops_reader (rw);
319 | if (reader) {
320 | module = Player_LoadGeneric(reader,64,0);
321 | if(reader) free(reader);
322 | return (Mix_Music *) module;
323 | }
324 | else
325 | {
326 | printf("Could not load module, reason: %s\n", MikMod_strerror(MikMod_errno));
327 | }
328 | return NULL;
329 | }
330 |
331 | //-1 plays music forever.
332 | //0 should play 0 times, but when using hooks, there are no args, so it sends 0!
333 | //TODO: Positive will play only one.
334 | /*int Mix_PlayMusic(Mix_Music *music, int loops)
335 | {
336 | if (music == NULL){
337 | //Error, no music!
338 | return -1;
339 | }
340 |
341 | MODULE *module;
342 | module=(MODULE *)music;
343 | if(loops == -1){
344 | module->wrap=1;
345 | module->loop=1;
346 | }
347 |
348 | //Set music volume before playing
349 | module->volume = musicvolume;
350 | Player_Start(module);
351 |
352 | if (mix_music){
353 | mix_music(music_data);
354 | }
355 |
356 | return 0;
357 | }*/
358 |
359 | /*int Mix_HaltMusic(void)
360 | {
361 | Player_SetPosition(0);
362 | Player_Stop();
363 |
364 | if (music_finished_hook){
365 | music_finished_hook();
366 | }
367 |
368 | return 0;
369 | }*/
370 |
371 | /*void Mix_FreeMusic(Mix_Music *music)
372 | {
373 | Player_Stop(); //Just in case!
374 | MODULE *module; //Casting needed
375 | module = (MODULE *)music;
376 |
377 | Player_Free(module);
378 | }*/
379 |
380 | int Mix_SetMusicPosition(double position)
381 | {
382 | printf("Mix_SetMusicPosition\n");
383 | Player_SetPosition(position);
384 | return 0;
385 | }
386 |
387 | int Mix_AllocateChannels(int numchans)
388 | {
389 | printf("Mix_AllocateChannels\n");
390 | return numchans; //LOL!
391 | }
392 |
393 | int Mix_ReserveChannels(int num)
394 | {
395 | printf("Mix_ReserveChannels\n");
396 | return num;
397 | }
398 |
399 | int Mix_QuerySpec(int *frequency, Uint16 *format, int *channels)
400 | {
401 | printf("Mix_QuerySpec\n");
402 | *frequency = gfrequency;
403 | *channels = gchannels;
404 | *format = 0x8010; /** Signed 16-bit samples */
405 | return loaded;
406 | }
407 |
408 | int Mix_SetReverseStereo(int channel, int flip)
409 | {
410 | printf("Mix_SetReverseStereo\n");
411 | return 1;
412 | }
413 |
414 | int Mix_SetDistance(int channel, Uint8 distance)
415 | {
416 | printf("Mix_SetDistance\n");
417 | return 1;
418 | }
419 |
420 | int Mix_SetPosition(int channel, Sint16 angle, Uint8 distance)
421 | {
422 | printf("Mix_SetPosition\n");
423 | return 1;
424 | }
425 |
426 | int Mix_SetPanning(int channel, Uint8 left, Uint8 right)
427 | {
428 | printf("Mix_SetPanning\n\n");
429 | return 1;
430 | }
431 |
432 | //Do a normal stop
433 | /*int Mix_FadeOutMusic(int ms)
434 | {
435 | return Mix_HaltMusic();
436 | }*/
437 |
438 | //Do a normal play
439 | int Mix_FadeInMusic(Mix_Music *music, int loops, int ms)
440 | {
441 | printf("Mix_FadeInMusic\n");
442 | return Mix_PlayMusic(music, loops);
443 | }
444 |
445 | void Mix_ResumeMusic(void)
446 | {
447 | printf("Mix_ResumeMusic\n");
448 | if (Player_Paused()){
449 | Player_TogglePause();
450 | }
451 | }
452 |
453 | void Mix_PauseMusic(void)
454 | {
455 | printf("Mix_PauseMusic\n");
456 | if (!Player_Paused()){
457 | Player_TogglePause();
458 | }
459 | }
460 |
461 | //0-128
462 | int Mix_VolumeMusic(int volume)
463 | {
464 | musicvolume = volume;
465 | if (Player_Active()) Player_SetVolume(musicvolume);
466 | return volume;
467 | }
468 |
469 | //This sets up a function to be called when music playback is halted.
470 | void Mix_HookMusicFinished(void (*music_finished)())
471 | {
472 | SDL_LockAudio();
473 | music_finished_hook = music_finished;
474 | SDL_UnlockAudio();
475 | }
476 |
477 | void Mix_ChannelFinished(void (*channel_finished)(int channel))
478 | {
479 | SDL_LockAudio();
480 | channel_finished_hook = channel_finished;
481 | SDL_UnlockAudio();
482 | }
483 |
484 | void Mix_HookMusic(void (*mix_func)(void *udata), void *arg)
485 | {
486 | SDL_LockAudio();
487 | if ( mix_func != NULL ) {
488 | music_data = arg;
489 | mix_music = mix_func;
490 | } else {
491 | music_data = NULL;
492 | mix_music = NULL;
493 | }
494 | SDL_UnlockAudio();
495 | }
496 |
497 | //Range 32-255
498 | int Mix_GetTempo(Mix_Music *music)
499 | {
500 | MODULE *module;
501 | module=(MODULE *)music;
502 | if (module != NULL){
503 | return module->bpm;
504 | }
505 | return -1;
506 | }
507 |
508 | void Mix_SetTempo(Mix_Music *music, int tempo)
509 | {
510 | Player_SetTempo(tempo);
511 | }
512 |
513 | int Mix_SetMusicCMD(const char *command)
514 | {
515 | return 0;
516 | }
517 |
518 | /* MUS_MOD can't be auto-detected. If no other format was detected, MOD is
519 | * assumed and MUS_MOD will be returned, meaning that the format might not
520 | * actually be MOD-based.
521 | *
522 | * Returns MUS_NONE in case of errors. */
523 | Mix_MusicType detect_music_type(SDL_RWops *rw)
524 | {
525 | Uint8 magic[5];
526 | Uint8 moremagic[9];
527 |
528 | int start = SDL_RWtell(rw);
529 | if (SDL_RWread(rw, magic, 1, 4) != 4 || SDL_RWread(rw, moremagic, 1, 8) != 8 ) {
530 | printf("Couldn't read from RWops\n");
531 | return MUS_NONE;
532 | }
533 | SDL_RWseek(rw, start, RW_SEEK_SET);
534 | magic[4]='\0';
535 | moremagic[8] = '\0';
536 |
537 | /* WAVE files have the magic four bytes "RIFF"
538 | AIFF files have the magic 12 bytes "FORM" XXXX "AIFF" */
539 | if (((strcmp((char *)magic, "RIFF") == 0) && (strcmp((char *)(moremagic+4), "WAVE") == 0)) ||
540 | (strcmp((char *)magic, "FORM") == 0)) {
541 | printf("Detected WAV from RW\n");
542 | return MUS_WAV;
543 | }
544 |
545 | /* Ogg Vorbis files have the magic four bytes "OggS" */
546 | if (strcmp((char *)magic, "OggS") == 0) {
547 | printf("Detected OGG from RW\n");
548 | return MUS_OGG;
549 | }
550 |
551 | /* FLAC files have the magic four bytes "fLaC" */
552 | if (strcmp((char *)magic, "fLaC") == 0) {
553 | printf("Detected FLAC from RW\n");
554 | return MUS_FLAC;
555 | }
556 |
557 | /* MIDI files have the magic four bytes "MThd" */
558 | if (strcmp((char *)magic, "MThd") == 0) {
559 | printf("Detected MIDI from RW\n");
560 | return MUS_MID;
561 | }
562 |
563 | if (detect_mp3(magic)) {
564 | printf("Detected MP3 from RW\n");
565 | return MUS_MP3;
566 | }
567 |
568 | /* Assume MOD format.
569 | *
570 | * Apparently there is no way to check if the file is really a MOD,
571 | * or there are too many formats supported by MikMod/ModPlug, or
572 | * MikMod/ModPlug does this check by itself. */
573 | return MUS_MOD;
574 | }
575 |
576 | int detect_mp3(Uint8 *magic)
577 | {
578 | if ( strncmp((char *)magic, "ID3", 3) == 0 ) {
579 | return 1;
580 | }
581 |
582 | /* Detection code lifted from SMPEG */
583 | if(((magic[0] & 0xff) != 0xff) || // No sync bits
584 | ((magic[1] & 0xf0) != 0xf0) || //
585 | ((magic[2] & 0xf0) == 0x00) || // Bitrate is 0
586 | ((magic[2] & 0xf0) == 0xf0) || // Bitrate is 15
587 | ((magic[2] & 0x0c) == 0x0c) || // Frequency is 3
588 | ((magic[1] & 0x06) == 0x00)) { // Layer is 4
589 | return(0);
590 | }
591 | return 1;
592 | }
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # Memorix101
3 | # Copyright (C) 2024
4 | #
5 |
6 | TARGET = celeste.elf
7 | OBJS = FAKE_mixer.o mm.o celeste.o sdl20compat.inc.o sdl12main.o romdisk.o
8 | #OBJS = mixer_ogg.o celeste.o sdl20compat.inc.o sdl12main.o romdisk.o
9 | KOS_ROMDISK_DIR = romdisk
10 |
11 | KOS_CFLAGS += -I../lmikmod/include -I/opt/toolchains/dc/kos/addons/include -I../supertux-dc-SDL_dreamhal-Fakemixer/ports/mikmod/lmikmod/include -I$(KOS_BASE)/kernel/arch/dreamcast/include/dc -DDREAMCAST -DCELESTE_P8_FIXEDP -DCELESTE_P8_ENABLE_AUDIO=1
12 |
13 | KOS_CPPFLAGS += -fexceptions -std=c++11 -fpermissive
14 |
15 | # Update library paths and libraries for SDL2
16 | KOS_LIBS+= -L./tools -L/opt/toolchains/dc/kos/addons/lib/dreamcast
17 |
18 | all: rm-elf $(TARGET)
19 |
20 | include $(KOS_BASE)/Makefile.rules
21 |
22 | clean: rm-elf
23 | -rm -f $(OBJS)
24 |
25 | rm-elf:
26 | -rm -f $(TARGET) celeste-dc.cdi romdisk.*
27 |
28 | $(TARGET): $(OBJS)
29 | kos-c++ -o $(TARGET) $(OBJS) $(OBJEXTRA) -lADX -lm -lmikmod -lSDL2 -lSDL2main -lGL -lkosutils $(KOS_LIBS) -fno-exceptions -fno-rtti
30 | ./make_cdi.sh
31 |
32 | run: $(TARGET)
33 | $(KOS_LOADER) $(TARGET)
34 |
35 | dist: $(TARGET)
36 | -rm -f $(OBJS) romdisk.img
37 | $(KOS_STRIP) $(TARGET)
38 |
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ccleste-dreamcast
2 |
3 |
4 |
7 |
8 |
9 | # About the project
10 |
11 | A portable Celeste Classic C source port for Sega Dreamcast
12 |
13 | https://github.com/user-attachments/assets/352f8d25-406d-4d86-8056-36c393177ab3
14 |
15 | ## Controls
16 |
17 | - D-pad - Movement
18 | - A Button - Jump
19 | - B Button / X Button - Dash
20 | - Start Button - Pause
21 |
22 | ## Recurring problems
23 |
24 | - The sound sometimes crackles
25 | - ~~Music does not loop and crash (possible kos or dev environment bug)~~
26 | - ~~Music does not loop exactly~~
27 |
28 | ## Building
29 |
30 | First, you need to setup and configure KallistiOS according to your operating system, you can see that [here](https://dreamcast.wiki/Getting_Started_with_Dreamcast_development)
31 |
32 | After that, compile using these commands in the terminal
33 |
34 | ```bash
35 | source /opt/toolchains/dc/kos/environ.sh
36 |
37 | git clone --recursive https://github.com/GPF/SDL2
38 | ```
39 | Now take the `SDL_dreamcastvideo.c` from the tools folder and overwrite it in `SDL2/src/videos/dreamcast/`
40 | ```bash
41 | cd ~/SDL2/build-scripts
42 |
43 | ./dreamcast.sh
44 |
45 | git clone --recursive https://github.com/carstene1ns/libmikmod/tree/master
46 |
47 | cd ~/lmikmod/dc
48 |
49 | make
50 |
51 | git clone --recursive https://github.com/Memorix101/ccleste-dreamcast
52 |
53 | cd ~/ccelste-dc
54 |
55 | chmod 755 ./make_cdi.sh
56 |
57 | chmod 755 ./tools/mkdcdisc
58 |
59 | make
60 |
61 | ```
62 |
63 | # Original description
64 |
65 | This C source port of the [original Celeste](https://www.lexaloffle.com/bbs/?tid=2145) for the PICO-8 was originally developed by
66 | [lemon32767](https://github.com/lemon32767/ccleste).
67 |
68 | ## Credits
69 |
70 | Sound wave files are taken from the
71 | [Celeste-Classic-GBA](https://github.com/JeffRuLz/Celeste-Classic-GBA/tree/master/maxmod_data)
72 | project, music _.ogg files were obtained by converting the _.wav dumps
73 | from PICO-8, which I did using audacity & ffmpeg.
74 |
75 | The frame for the N-Gage version is based on [Mountain at Dusk
76 | Background](https://opengameart.org/content/mountain-at-dusk-background)
77 | by ansimuz.
78 |
79 | All credit for the original game goes to the original developers (Maddy
80 | Thorson & Noel Berry).
81 |
--------------------------------------------------------------------------------
/SDL_mixer.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _FAKE_MIXER_H
3 | #define _FAKE_MIXER_H
4 |
5 | #include
6 | //#include
7 | //#include
8 | #include // ADX Decoder Library
9 | #include // Direct Access to Sound Driver
10 | #include
11 | #include "mikmod.h"
12 |
13 | #define MIX_DEFAULT_FORMAT 0
14 | #define MIX_MAX_VOLUME 255
15 | #define MIX_DEFAULT_CHANNELS 2
16 |
17 | #define Mix_GetError SDL_GetError
18 | //#define Mix_Music void
19 | //#define Mix_Chunk void
20 |
21 | // Definition für Mix_Music
22 | typedef struct {
23 | char file_path[256];
24 | } Mix_Music;
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | struct _Mix_Chunk
31 | {
32 | sfxhnd_t handle;
33 | int volume;
34 | };
35 | typedef struct _Mix_Chunk Mix_Chunk;
36 |
37 | int Mix_OpenAudio(int frequency, uint16 format, int channels, int chunksize);
38 | void Mix_CloseAudio(void);
39 |
40 | void Mix_FreeChunk(Mix_Chunk *chunk);
41 | int Mix_PlayingMusic(void);
42 | int Mix_Playing(int channel);
43 |
44 | int Mix_PlayChannel(int channel, Mix_Chunk *chunk, int loops);
45 | int Mix_PlayChannelTimed(int channel, Mix_Chunk *chunk, int loops, int ticks);
46 | int Mix_HaltChannel(int channel);
47 | int Mix_Volume(int channel, int volume);
48 |
49 | //Mix_Chunk *Mix_LoadWAV(const char *file);
50 | Mix_Music *Mix_LoadMUS(const char *file);
51 | Mix_Chunk *Mix_LoadWAV_RW(SDL_RWops *src, int freesrc);
52 |
53 | int Mix_VolumeChunk(Mix_Chunk *chunk, int volume);
54 |
55 | Mix_Music *Mix_LoadMUS(const char *file);
56 | Mix_Music *Mix_LoadMUS_RW(SDL_RWops *rw);
57 |
58 | int Mix_PlayMusic(Mix_Music *music, int loops);
59 | int Mix_HaltMusic(void);
60 | void Mix_FreeMusic(Mix_Music *music);
61 | int Mix_SetMusicPosition(double position);
62 | int Mix_AllocateChannels(int numchans);
63 | int Mix_ReserveChannels(int num);
64 | int Mix_QuerySpec(int *frequency, Uint16 *format, int *channels);
65 | int Mix_SetReverseStereo(int channel, int flip);
66 | int Mix_SetDistance(int channel, Uint8 distance);
67 | int Mix_SetPosition(int channel, Sint16 angle, Uint8 distance);
68 | int Mix_SetPanning(int channel, Uint8 left, Uint8 right);
69 | int Mix_FadeOutMusic(int ms);
70 | int Mix_FadeInMusic(Mix_Music *music, int loops, int ms);
71 | void Mix_Resume(int channel);
72 | void Mix_Pause(int channel);
73 | void Mix_ResumeMusic(void);
74 | void Mix_PauseMusic(void);
75 | int Mix_VolumeMusic(int volume);
76 | void Mix_HookMusicFinished(void (*music_finished)());
77 | void Mix_HookMusic(void (*mix_func)(void *udata), void *arg);
78 | int Mix_GetTempo(Mix_Music *music);
79 | void Mix_SetTempo(Mix_Music *music, int tempo);
80 | void Mix_ChannelFinished(void (*channel_finished)(int channel));
81 | int Mix_SetMusicCMD(const char *command);
82 |
83 | //This function is from SDL_mixer, to detect music formats from RW
84 | typedef enum {
85 | MUS_NONE,
86 | MUS_CMD,
87 | MUS_WAV,
88 | MUS_MOD,
89 | MUS_MID,
90 | MUS_OGG,
91 | MUS_MP3,
92 | MUS_MP3_MAD,
93 | MUS_FLAC,
94 | MUS_MODPLUG
95 | } Mix_MusicType;
96 |
97 | Mix_MusicType detect_music_type(SDL_RWops *rw);
98 | int detect_mp3(Uint8 *magic);
99 |
100 | #ifdef __cplusplus
101 | }
102 | #endif
103 |
104 | #endif
105 |
--------------------------------------------------------------------------------
/celeste.h:
--------------------------------------------------------------------------------
1 | #ifndef CELESTE_H_
2 | #define CELESTE_H_
3 |
4 | #ifdef __cplusplus
5 | #define _Bool bool
6 | extern "C" {
7 | #else
8 | #define _Bool int
9 | #endif
10 |
11 | typedef enum
12 | {
13 | CELESTE_P8_MUSIC, CELESTE_P8_SPR, CELESTE_P8_BTN, CELESTE_P8_SFX,
14 | CELESTE_P8_PAL, CELESTE_P8_PAL_RESET, CELESTE_P8_CIRCFILL, CELESTE_P8_PRINT,
15 | CELESTE_P8_RECTFILL, CELESTE_P8_LINE, CELESTE_P8_MGET, CELESTE_P8_CAMERA,
16 | CELESTE_P8_FGET, CELESTE_P8_MAP
17 |
18 | } CELESTE_P8_CALLBACK_TYPE;
19 |
20 | typedef _Bool Celeste_P8_bool_t;
21 | typedef int (*Celeste_P8_cb_func_t) (CELESTE_P8_CALLBACK_TYPE calltype, ...);
22 |
23 | extern void Celeste_P8_set_call_func(Celeste_P8_cb_func_t func);
24 | extern void Celeste_P8_set_rndseed(unsigned seed);
25 | extern void Celeste_P8_init(void);
26 | extern void Celeste_P8_update(void);
27 | extern void Celeste_P8_draw(void);
28 |
29 | extern void Celeste_P8__DEBUG(void); //debug functionality
30 |
31 | //state functionality
32 | size_t Celeste_P8_get_state_size(void);
33 | void Celeste_P8_save_state(void* st);
34 | void Celeste_P8_load_state(const void* st);
35 |
36 | #ifdef __cplusplus
37 | } //extern "C"
38 | #endif
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/data/ccleste-input-cfg.txt:
--------------------------------------------------------------------------------
1 | # in-game controller
2 | left dpleft
3 | right dpright
4 | up dpup
5 | down dpdown
6 | jump a
7 | dash b
8 | save leftshoulder
9 | load rightshoulder
10 | exit guide
11 | pause start
12 |
--------------------------------------------------------------------------------
/data/font.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/font.bmp
--------------------------------------------------------------------------------
/data/frame_xbox.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/frame_xbox.bmp
--------------------------------------------------------------------------------
/data/gfx.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/gfx.bmp
--------------------------------------------------------------------------------
/data/mus0.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/mus0.adx
--------------------------------------------------------------------------------
/data/mus10.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/mus10.adx
--------------------------------------------------------------------------------
/data/mus20.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/mus20.adx
--------------------------------------------------------------------------------
/data/mus30.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/mus30.adx
--------------------------------------------------------------------------------
/data/mus40.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/mus40.adx
--------------------------------------------------------------------------------
/data/snd0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd0.wav
--------------------------------------------------------------------------------
/data/snd1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd1.wav
--------------------------------------------------------------------------------
/data/snd13.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd13.wav
--------------------------------------------------------------------------------
/data/snd14.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd14.wav
--------------------------------------------------------------------------------
/data/snd15.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd15.wav
--------------------------------------------------------------------------------
/data/snd16.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd16.wav
--------------------------------------------------------------------------------
/data/snd2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd2.wav
--------------------------------------------------------------------------------
/data/snd23.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd23.wav
--------------------------------------------------------------------------------
/data/snd3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd3.wav
--------------------------------------------------------------------------------
/data/snd35.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd35.wav
--------------------------------------------------------------------------------
/data/snd37.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd37.wav
--------------------------------------------------------------------------------
/data/snd38.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd38.wav
--------------------------------------------------------------------------------
/data/snd4.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd4.wav
--------------------------------------------------------------------------------
/data/snd40.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd40.wav
--------------------------------------------------------------------------------
/data/snd5.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd5.wav
--------------------------------------------------------------------------------
/data/snd50.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd50.wav
--------------------------------------------------------------------------------
/data/snd51.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd51.wav
--------------------------------------------------------------------------------
/data/snd54.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd54.wav
--------------------------------------------------------------------------------
/data/snd55.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd55.wav
--------------------------------------------------------------------------------
/data/snd6.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd6.wav
--------------------------------------------------------------------------------
/data/snd7.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd7.wav
--------------------------------------------------------------------------------
/data/snd8.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd8.wav
--------------------------------------------------------------------------------
/data/snd9.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data/snd9.wav
--------------------------------------------------------------------------------
/data/test-tas.txt:
--------------------------------------------------------------------------------
1 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,2,2,2,2,2,2,2,2,2,34,2,0,0,0,0,0,0,2,2,2,2,34,34,2,2,2,2,2,2,18,18,2,2,2,2,18,18,0,0,0,0,36,0,0,0,0,0,2,2,2,2,2,2,18,2,2,2,2,2,2,36,36,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,2,2,2,2,2,2,18,2,18,2,2,2,2,18,1,1,1,1,17,2,2,2,2,18,1,1,1,1,17,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,38,2,2,2,2,2,2,2,2,2,2,2,2,18,1,1,1,1,17,2,2,2,2,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,38,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,17,1,1,1,1,1,1,36,1,1,1,0,0,0,0,0,0,0,0,16,0,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,2,2,2,2,2,2,2,2,2,2,2,2,2,2,38,2,6,6,6,6,6,22,6,6,6,6,6,6,22,6,6,6,6,22,6,6,6,6,6,6,6,6,22,6,0,0,0,0,0,5,5,5,21,5,5,5,5,0,36,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,2,2,2,38,0,0,0,0,0,0,0,2,2,2,2,1,1,16,36,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,16,1,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,2,2,2,2,2,2,18,18,2,2,0,0,2,2,0,0,38,0,0,2,2,2,2,2,2,2,2,38,38,0,0,0,1,1,17,17,2,18,16,0,16,0,0,16,0,16,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,2,2,2,2,2,2,2,18,2,0,36,0,0,0,16,0,0,0,0,2,36,36,0,0,0,0,0,2,2,2,2,16,1,1,1,36,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,1,17,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,18,2,2,2,2,2,2,2,2,1,1,37,1,1,1,1,1,1,1,1,1,1,1,1,18,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,2,2,2,2,2,2,18,2,2,2,34,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,0,0,36,1,1,1,1,1,1,1,1,1,1,1,37,1,1,0,0,0,0,0,16,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,18,2,40,0,0,0,0,0,0,0,18,2,2,2,2,2,2,2,2,2,18,2,2,2,2,2,0,0,0,36,36,36,0,1,1,1,1,1,0,1,1,17,1,16,5,1,1,17,17,1,1,1,17,17,1,0,1,36,0,0,0,36,16,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,18,2,2,2,2,2,2,2,2,2,2,38,2,2,2,2,18,18,2,2,22,22,2,2,2,18,2,2,2,2,18,2,2,2,2,38,2,2,2,2,2,2,2,2,18,1,1,1,1,1,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,2,2,2,18,2,38,2,2,2,2,2,2,2,2,2,2,2,2,16,0,0,0,1,17,1,1,1,1,1,36,0,0,0,0,0,1,1,1,16,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,6,6,6,6,6,6,36,0,0,0,0,0,0,0,0,0,2,2,36,2,0,0,0,0,0,0,0,0,0,0,2,18,2,2,2,2,2,2,2,2,2,34,0,2,2,2,2,2,2,2,2,2,2,2,2,2,38,0,0,0,0,2,2,2,2,2,18,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,2,2,2,2,2,2,2,18,2,34,2,2,2,2,2,2,18,2,2,2,2,2,2,2,2,2,2,2,2,2,2,38,2,2,2,2,2,2,2,2,2,2,2,2,18,2,1,1,1,0,36,0,0,0,0,0,0,0,0,1,1,17,1,1,0,0,16,37,0,1,1,0,0,16,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,2,2,2,18,2,2,38,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,1,1,1,1,1,1,33,33,0,0,0,0,0,0,1,1,17,0,0,36,0,0,0,0,0,0,0,0,16,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,10,10,42,2,2,2,2,18,0,2,2,2,2,2,2,2,2,2,0,17,1,1,1,1,0,0,16,0,0,0,0,36,0,0,0,2,2,2,2,2,2,2,2,2,18,2,2,2,2,2,2,36,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,40,0,0,0,0,0,0,16,0,0,0,0,0,1,1,38,0,0,0,0,0,0,2,2,2,2,2,2,18,2,2,2,2,2,2,2,38,0,0,0,0,0,0,2,2,2,2,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,0,0,0,0,0,18,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,38,2,2,0,0,0,0,0,0,0,0,37,0,0,0,0,0,0,17,1,1,1,1,1,1,1,37,0,0,0,0,0,0,1,1,1,1,1,1,1,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,2,2,2,2,2,2,18,2,2,2,1,17,1,1,1,1,1,1,1,18,2,2,2,2,2,17,17,0,0,0,0,1,1,1,16,1,0,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,42,10,42,10,10,10,10,2,2,38,6,6,6,6,6,6,6,6,38,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,38,38,6,6,6,6,16,5,5,5,5,5,5,37,0,0,0,0,0,1,1,1,1,33,1,1,1,1,1,1,1,1,1,33,1,33,1,1,1,1,1,17,1,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,2,2,0,0,1,18,0,36,0,0,0,0,0,0,0,0,0,2,2,36,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,2,2,2,2,2,2,2,2,2,2,2,2,34,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,2,2,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,0,0,0,0,0,0,38,0,0,0,0,0,0,16,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,1,1,1,1,1,1,17,17,1,1,1,1,37,1,1,1,1,1,1,17,2,2,2,2,2,2,2,38,2,2,2,2,2,2,2,2,2,2,2,2,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,18,2,2,2,2,2,2,2,0,36,0,0,0,0,0,0,0,18,2,2,2,2,38,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,1,1,33,0,0,0,0,0,0,1,1,37,0,0,0,0,0,0,16,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,34,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,37,0,0,0,0,0,0,37,1,37,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,36,0,0,0,0,0,0,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,0,0,0,0,0,0,16,16,2,34,0,0,0,0,0,0,0,0,0,0,2,36,2,2,2,2,2,0,1,1,1,1,33,1,1,1,1,1,1,17,1,1,1,1,1,1,36,0,0,1,1,1,1,1,1,1,1,1,38,2,2,2,2,2,2,2,2,2,18,18,42,42,42,2,2,0,2,0,38,0,38,38,18,2,18,2,2,2,2,2,2,2,2,2,2,18,18,2,18,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,0,0,0,0,0,2,18,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,38,0,0,0,0,0,0,18,2,2,2,2,2,2,2,2,36,0,0,0,0,0,0,0,0,0,1,17,0,36,0,0,0,0,0,0,0,1,36,0,0,0,0,0,0,1,1,17,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,10,10,42,10,10,10,10,10,10,10,0,0,0,1,17,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,34,0,2,2,2,2,2,42,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,34,2,2,2,2,18,2,2,2,2,2,2,2,2,2,38,6,0,0,0,0,2,2,16,0,0,36,0,1,1,1,1,1,1,1,1,1,1,1,17,1,17,1,1,1,1,1,36,1,36,0,0,0,0,16,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,2,2,2,2,2,2,2,2,2,38,2,2,2,2,2,2,2,38,2,2,2,2,2,2,2,2,2,2,2,2,18,2,2,38,2,2,2,2,2,2,2,2,36,0,0,0,0,0,0,18,2,2,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,2,2,2,2,2,2,18,2,2,2,2,2,38,0,0,0,0,0,0,0,0,0,37,0,0,0,0,0,0,36,0,0,0,0,0,0,36,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,2,18,18,2,2,2,2,38,2,2,2,2,2,2,2,2,2,38,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,
--------------------------------------------------------------------------------
/data_src/adx/mus0.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/mus0.adx
--------------------------------------------------------------------------------
/data_src/adx/mus0_old.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/mus0_old.adx
--------------------------------------------------------------------------------
/data_src/adx/mus10.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/mus10.adx
--------------------------------------------------------------------------------
/data_src/adx/mus20.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/mus20.adx
--------------------------------------------------------------------------------
/data_src/adx/mus30.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/mus30.adx
--------------------------------------------------------------------------------
/data_src/adx/mus40.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/mus40.adx
--------------------------------------------------------------------------------
/data_src/adx/snd0.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd0.adx
--------------------------------------------------------------------------------
/data_src/adx/snd1.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd1.adx
--------------------------------------------------------------------------------
/data_src/adx/snd13.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd13.adx
--------------------------------------------------------------------------------
/data_src/adx/snd14.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd14.adx
--------------------------------------------------------------------------------
/data_src/adx/snd15.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd15.adx
--------------------------------------------------------------------------------
/data_src/adx/snd16.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd16.adx
--------------------------------------------------------------------------------
/data_src/adx/snd2.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd2.adx
--------------------------------------------------------------------------------
/data_src/adx/snd23.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd23.adx
--------------------------------------------------------------------------------
/data_src/adx/snd3.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd3.adx
--------------------------------------------------------------------------------
/data_src/adx/snd35.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd35.adx
--------------------------------------------------------------------------------
/data_src/adx/snd37.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd37.adx
--------------------------------------------------------------------------------
/data_src/adx/snd38.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd38.adx
--------------------------------------------------------------------------------
/data_src/adx/snd4.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd4.adx
--------------------------------------------------------------------------------
/data_src/adx/snd40.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd40.adx
--------------------------------------------------------------------------------
/data_src/adx/snd5.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd5.adx
--------------------------------------------------------------------------------
/data_src/adx/snd50.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd50.adx
--------------------------------------------------------------------------------
/data_src/adx/snd51.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd51.adx
--------------------------------------------------------------------------------
/data_src/adx/snd54.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd54.adx
--------------------------------------------------------------------------------
/data_src/adx/snd55.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd55.adx
--------------------------------------------------------------------------------
/data_src/adx/snd6.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd6.adx
--------------------------------------------------------------------------------
/data_src/adx/snd7.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd7.adx
--------------------------------------------------------------------------------
/data_src/adx/snd8.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd8.adx
--------------------------------------------------------------------------------
/data_src/adx/snd9.adx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/adx/snd9.adx
--------------------------------------------------------------------------------
/data_src/mp3/mus0.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/mp3/mus0.mp3
--------------------------------------------------------------------------------
/data_src/mp3/mus0_old.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/mp3/mus0_old.mp3
--------------------------------------------------------------------------------
/data_src/mp3/mus10.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/mp3/mus10.mp3
--------------------------------------------------------------------------------
/data_src/mp3/mus20.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/mp3/mus20.mp3
--------------------------------------------------------------------------------
/data_src/mp3/mus30.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/mp3/mus30.mp3
--------------------------------------------------------------------------------
/data_src/mp3/mus40.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/mp3/mus40.mp3
--------------------------------------------------------------------------------
/data_src/ogg/mus0.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/mus0.ogg
--------------------------------------------------------------------------------
/data_src/ogg/mus0_old.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/mus0_old.ogg
--------------------------------------------------------------------------------
/data_src/ogg/mus10.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/mus10.ogg
--------------------------------------------------------------------------------
/data_src/ogg/mus20.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/mus20.ogg
--------------------------------------------------------------------------------
/data_src/ogg/mus30.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/mus30.ogg
--------------------------------------------------------------------------------
/data_src/ogg/mus40.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/mus40.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd0.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd0.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd1.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd1.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd13.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd13.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd14.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd14.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd15.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd15.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd16.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd16.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd2.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd2.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd23.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd23.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd3.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd3.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd35.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd35.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd37.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd37.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd38.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd38.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd4.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd4.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd40.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd40.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd5.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd5.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd50.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd50.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd51.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd51.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd54.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd54.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd55.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd55.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd6.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd6.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd7.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd7.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd8.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd8.ogg
--------------------------------------------------------------------------------
/data_src/ogg/snd9.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/ogg/snd9.ogg
--------------------------------------------------------------------------------
/data_src/res/font.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/res/font.bmp
--------------------------------------------------------------------------------
/data_src/res/font.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/res/font.jpg
--------------------------------------------------------------------------------
/data_src/res/gfx.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/res/gfx.bmp
--------------------------------------------------------------------------------
/data_src/res/gfx.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/res/gfx.jpg
--------------------------------------------------------------------------------
/data_src/vmu/icon44x44_mask.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/vmu/icon44x44_mask.bmp
--------------------------------------------------------------------------------
/data_src/vmu/mask0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/vmu/mask0.png
--------------------------------------------------------------------------------
/data_src/vmu/mask1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/vmu/mask1.png
--------------------------------------------------------------------------------
/data_src/vmu/mask1l.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/vmu/mask1l.png
--------------------------------------------------------------------------------
/data_src/wav/mus0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/mus0.wav
--------------------------------------------------------------------------------
/data_src/wav/mus0_old.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/mus0_old.wav
--------------------------------------------------------------------------------
/data_src/wav/mus10.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/mus10.wav
--------------------------------------------------------------------------------
/data_src/wav/mus20.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/mus20.wav
--------------------------------------------------------------------------------
/data_src/wav/mus30.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/mus30.wav
--------------------------------------------------------------------------------
/data_src/wav/mus40.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/mus40.wav
--------------------------------------------------------------------------------
/data_src/wav/optimize_wav.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Check if ffmpeg is installed
4 | if ! command -v ffmpeg &> /dev/null; then
5 | echo "ffmpeg could not be found. Please install ffmpeg first."
6 | exit 1
7 | fi
8 |
9 | # Directory containing WAV files
10 | INPUT_DIR="./"
11 | OUTPUT_DIR="./optimized"
12 |
13 | # Create output directory if it doesn't exist
14 | mkdir -p "$OUTPUT_DIR"
15 |
16 | # Optimization parameters
17 | SAMPLE_RATE=8000 # Standard rate for compatibility
18 | BIT_DEPTH="s16le" # Signed 16-bit PCM (widely supported)
19 | CHANNELS=1 # Convert to mono
20 |
21 | # Process each WAV file
22 | for file in "$INPUT_DIR"/*.wav; do
23 | if [[ -f "$file" ]]; then
24 | BASENAME=$(basename "$file")
25 | OUTPUT_FILE="$OUTPUT_DIR/$BASENAME"
26 |
27 | echo "Optimizing $file -> $OUTPUT_FILE"
28 |
29 | ffmpeg -i "$file" -ar $SAMPLE_RATE -acodec pcm_$BIT_DEPTH -ac $CHANNELS "$OUTPUT_FILE"
30 | fi
31 | done
32 |
33 | echo "Optimization completed. Files saved in $OUTPUT_DIR"
--------------------------------------------------------------------------------
/data_src/wav/optimized/mus0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/mus0.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/mus0_old.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/mus0_old.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/mus10.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/mus10.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/mus20.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/mus20.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/mus30.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/mus30.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/mus40.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/mus40.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd0.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd1.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd13.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd13.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd14.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd14.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd15.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd15.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd16.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd16.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd2.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd23.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd23.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd3.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd35.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd35.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd37.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd37.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd38.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd38.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd4.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd4.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd40.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd40.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd5.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd5.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd50.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd50.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd51.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd51.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd54.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd54.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd55.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd55.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd6.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd6.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd7.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd7.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd8.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd8.wav
--------------------------------------------------------------------------------
/data_src/wav/optimized/snd9.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/optimized/snd9.wav
--------------------------------------------------------------------------------
/data_src/wav/snd0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd0.wav
--------------------------------------------------------------------------------
/data_src/wav/snd1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd1.wav
--------------------------------------------------------------------------------
/data_src/wav/snd13.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd13.wav
--------------------------------------------------------------------------------
/data_src/wav/snd14.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd14.wav
--------------------------------------------------------------------------------
/data_src/wav/snd15.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd15.wav
--------------------------------------------------------------------------------
/data_src/wav/snd16.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd16.wav
--------------------------------------------------------------------------------
/data_src/wav/snd2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd2.wav
--------------------------------------------------------------------------------
/data_src/wav/snd23.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd23.wav
--------------------------------------------------------------------------------
/data_src/wav/snd3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd3.wav
--------------------------------------------------------------------------------
/data_src/wav/snd35.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd35.wav
--------------------------------------------------------------------------------
/data_src/wav/snd37.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd37.wav
--------------------------------------------------------------------------------
/data_src/wav/snd38.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd38.wav
--------------------------------------------------------------------------------
/data_src/wav/snd4.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd4.wav
--------------------------------------------------------------------------------
/data_src/wav/snd40.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd40.wav
--------------------------------------------------------------------------------
/data_src/wav/snd5.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd5.wav
--------------------------------------------------------------------------------
/data_src/wav/snd50.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd50.wav
--------------------------------------------------------------------------------
/data_src/wav/snd51.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd51.wav
--------------------------------------------------------------------------------
/data_src/wav/snd54.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd54.wav
--------------------------------------------------------------------------------
/data_src/wav/snd55.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd55.wav
--------------------------------------------------------------------------------
/data_src/wav/snd6.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd6.wav
--------------------------------------------------------------------------------
/data_src/wav/snd7.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd7.wav
--------------------------------------------------------------------------------
/data_src/wav/snd8.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd8.wav
--------------------------------------------------------------------------------
/data_src/wav/snd9.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav/snd9.wav
--------------------------------------------------------------------------------
/data_src/wav_low/mus0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/mus0.wav
--------------------------------------------------------------------------------
/data_src/wav_low/mus0_old.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/mus0_old.wav
--------------------------------------------------------------------------------
/data_src/wav_low/mus10.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/mus10.wav
--------------------------------------------------------------------------------
/data_src/wav_low/mus20.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/mus20.wav
--------------------------------------------------------------------------------
/data_src/wav_low/mus30.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/mus30.wav
--------------------------------------------------------------------------------
/data_src/wav_low/mus40.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/mus40.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd0.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd0.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd1.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd13.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd13.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd14.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd14.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd15.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd15.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd16.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd16.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd2.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd23.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd23.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd3.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd3.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd35.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd35.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd37.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd37.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd38.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd38.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd4.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd4.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd40.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd40.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd5.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd5.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd50.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd50.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd51.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd51.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd54.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd54.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd55.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd55.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd6.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd6.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd7.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd7.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd8.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd8.wav
--------------------------------------------------------------------------------
/data_src/wav_low/snd9.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/data_src/wav_low/snd9.wav
--------------------------------------------------------------------------------
/make_cdi.sh:
--------------------------------------------------------------------------------
1 | ./tools/mkdcdisc -e celeste.elf -d data -o celeste-dc.cdi -N
2 | #./tools/mkdcdisc -e celeste.elf -d data -o celeste-dc_maxpadding.cdi.cdi -N
3 | ~/flycast-x86_64.AppImage celeste-dc.cdi
--------------------------------------------------------------------------------
/mixer_ogg.cpp:
--------------------------------------------------------------------------------
1 | #include "mixer_ogg.h"
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | char *strdup(const char *src) {
10 | char *dst = (char *)malloc(strlen(src) + 1);
11 | if (dst) {
12 | strcpy(dst, src);
13 | }
14 | return dst;
15 | }
16 |
17 | static char mix_error[256] = "";
18 |
19 | static int playing = 0;
20 | static int looping = 0;
21 | static Mix_Music *current_music = NULL;
22 |
23 | static void Mix_SetError(const char *fmt, ...) {
24 | va_list args;
25 | va_start(args, fmt);
26 | vsnprintf(mix_error, sizeof(mix_error), fmt, args);
27 | va_end(args);
28 | }
29 |
30 | int Mix_OpenAudio(int frequency, uint16_t format, int channels, int chunksize) {
31 | printf("SDL_Mixer mixer_ogg\n");
32 | if (snd_stream_init() < 0) {
33 | Mix_SetError("Mix_OpenAudio: Failed to initialize sound system.");
34 | return -1;
35 | }
36 |
37 | if (sndoggvorbis_init() < 0) {
38 | Mix_SetError("Mix_OpenAudio: Failed to initialize sndoggvorbis.");
39 | return -1;
40 | }
41 |
42 | return 0;
43 | }
44 |
45 | Mix_Music *Mix_LoadMUS(const char *file) {
46 | Mix_Music *music = (Mix_Music *)malloc(sizeof(Mix_Music));
47 | if (!music) {
48 | Mix_SetError("Mix_LoadMUS: Memory allocation failed.");
49 | return NULL;
50 | }
51 |
52 | music->file_path = strdup(file);
53 | if (!music->file_path) {
54 | Mix_SetError("Mix_LoadMUS: Failed to allocate memory for file path.");
55 | free(music);
56 | return NULL;
57 | }
58 |
59 | return music;
60 | }
61 |
62 | Mix_Chunk *Mix_LoadWAV(const char *file) {
63 | int sound_id = snd_sfx_load(file);
64 | if (sound_id < 0) {
65 | Mix_SetError("Mix_LoadWAV: Failed to load WAV file %s.", file);
66 | return NULL;
67 | }
68 |
69 | Mix_Chunk *chunk = (Mix_Chunk *)malloc(sizeof(Mix_Chunk));
70 | if (!chunk) {
71 | Mix_SetError("Mix_LoadWAV: Memory allocation failed for Mix_Chunk.");
72 | return NULL;
73 | }
74 |
75 | chunk->sound_id = sound_id;
76 | return chunk;
77 | }
78 |
79 | int Mix_PlayMusic(Mix_Music *music, int loops) {
80 | if (!music) {
81 | Mix_SetError("Mix_PlayMusic: No music to play.");
82 | return -1;
83 | }
84 |
85 | int loop_flag = 0;
86 | if (loops == -1) {
87 | loop_flag = 1;
88 | printf("Looping: %s\n", (char *)music);
89 | } else {
90 | printf("Playing once: %s\n", (char *)music);
91 | }
92 |
93 | if (sndoggvorbis_start(music->file_path, loop_flag) < 0) {
94 | Mix_SetError("Mix_PlayMusic: Failed to start playback for file %s.", music->file_path);
95 | return -1;
96 | }
97 |
98 | current_music = music;
99 | playing = 1;
100 | looping = loops;
101 | return 0;
102 | }
103 |
104 | int Mix_PlayChannel(int channel, Mix_Chunk *chunk, int loops) {
105 | if (!chunk) {
106 | Mix_SetError("Mix_PlayChannel: Invalid Mix_Chunk.");
107 | return -1;
108 | }
109 |
110 | int result = snd_sfx_play(chunk->sound_id, loops, channel);
111 | if (result < 0) {
112 | Mix_SetError("Mix_PlayChannel: Failed to play sound ID %d.", chunk->sound_id);
113 | return -1;
114 | }
115 |
116 | return 0;
117 | }
118 |
119 | void Mix_HaltMusic() {
120 | if (playing) {
121 | sndoggvorbis_stop();
122 | playing = 0;
123 | }
124 | }
125 |
126 | static int music_paused = 0; // 0 = playback , 1 = paused
127 |
128 | void Mix_Pause(int channel) {
129 | if (music_paused) {
130 | Mix_SetError("Mix_Pause: Music is already paused.");
131 | return;
132 | }
133 |
134 | sndoggvorbis_stop();
135 |
136 | music_paused = 1;
137 | printf("Music paused.\n");
138 | }
139 |
140 | int Mix_HaltChannel(int channel) {
141 | if (channel < 0) {
142 | Mix_SetError("Mix_HaltChannel: Invalid channel %d.", channel);
143 | return -1;
144 | }
145 |
146 | snd_sfx_stop(channel);
147 |
148 | printf("Channel %d halted.", channel);
149 | return 0;
150 | }
151 |
152 |
153 | int Mix_FadeInMusic(Mix_Music *music, int loops, int ms) {
154 | if (!music) {
155 | Mix_SetError("Mix_FadeInMusic: No music provided.");
156 | return -1;
157 | }
158 |
159 | sndoggvorbis_start(music->file_path, loops);
160 | return 0;
161 | }
162 |
163 |
164 | int Mix_FadeOutMusic(int ms) {
165 | if (!playing) {
166 | Mix_SetError("Mix_FadeOutMusic: No music is playing.");
167 | return -1;
168 | }
169 |
170 | sndoggvorbis_stop();
171 | playing = 0;
172 | return 0;
173 | }
174 |
175 | void Mix_PauseMusic(void) {
176 | Mix_SetError("Mix_PauseMusic: Not implemented.");
177 | }
178 |
179 | void Mix_Resume(int channel) {
180 | Mix_SetError("Mix_Resume: Not implemented for channel %d.", channel);
181 | }
182 |
183 | void Mix_ResumeMusic(void) {
184 | Mix_SetError("Mix_ResumeMusic: Not implemented.");
185 | }
186 |
187 | void Mix_FreeMusic(Mix_Music *music) {
188 | if (music) {
189 | if (music->file_path) {
190 | free(music->file_path);
191 | }
192 | free(music);
193 | }
194 | }
195 |
196 | void Mix_FreeChunk(Mix_Chunk *chunk) {
197 | if (chunk) {
198 | snd_sfx_unload(chunk->sound_id);
199 | free(chunk);
200 | }
201 | }
202 |
203 | void Mix_CloseAudio() {
204 | Mix_HaltMusic();
205 | snd_sfx_unload_all();
206 | sndoggvorbis_stop();
207 | sndoggvorbis_shutdown();
208 | snd_stream_shutdown();
209 | }
--------------------------------------------------------------------------------
/mixer_ogg.h:
--------------------------------------------------------------------------------
1 | #ifndef MIXER_OGG_H
2 | #define MIXER_OGG_H
3 |
4 | #include
5 | #include
6 |
7 | #ifdef __cplusplus
8 | extern "C" {
9 | #endif
10 |
11 | typedef struct {
12 | char *file_path;
13 | } Mix_Music;
14 |
15 | typedef struct {
16 | int sound_id;
17 | int volume;
18 | } Mix_Chunk;
19 |
20 | #define MIX_DEFAULT_FORMAT 0
21 | #define MIX_MAX_VOLUME 255
22 |
23 | int Mix_OpenAudio(int frequency, uint16_t format, int channels, int chunksize);
24 | void Mix_CloseAudio(void);
25 |
26 | Mix_Music *Mix_LoadMUS(const char *file);
27 | Mix_Chunk *Mix_LoadWAV(const char *file);
28 |
29 | int Mix_PlayMusic(Mix_Music *music, int loops);
30 | int Mix_PlayChannel(int channel, Mix_Chunk *chunk, int loops);
31 |
32 | void Mix_HaltMusic(void);
33 | void Mix_FreeMusic(Mix_Music *music);
34 | void Mix_FreeChunk(Mix_Chunk *chunk);
35 | int Mix_FadeInMusic(Mix_Music *music, int loops, int ms);
36 | int Mix_FadeOutMusic(int ms);
37 | void Mix_PauseMusic(void);
38 | void Mix_Resume(int channel);
39 | void Mix_ResumeMusic(void);
40 | void Mix_Pause(int channel);
41 | int Mix_HaltChannel(int channel);
42 |
43 | #define Mix_GetError SDL_GetError
44 |
45 | int Mix_SetMusicPosition(double position);
46 | int Mix_VolumeChunk(Mix_Chunk *chunk, int volume);
47 | int Mix_VolumeMusic(int volume);
48 |
49 | #ifdef __cplusplus
50 | }
51 | #endif
52 |
53 | #endif // MIXER_OGG_H
54 |
--------------------------------------------------------------------------------
/mm.c:
--------------------------------------------------------------------------------
1 | /* MikMod sound library
2 | (c) 1998, 1999 Miodrag Vallat and others - see file AUTHORS for
3 | complete list.
4 |
5 | This library is free software; you can redistribute it and/or modify
6 | it under the terms of the GNU Library General Public License as
7 | published by the Free Software Foundation; either version 2 of
8 | the License, or (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU Library General Public License for more details.
14 |
15 | You should have received a copy of the GNU Library General Public
16 | License along with this library; if not, write to the Free Software
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 | 02111-1307, USA.
19 | */
20 |
21 | /*==============================================================================
22 |
23 | $Id: mmio.c 1819 2006-01-29 06:52:40Z slouken $
24 |
25 | Portable file I/O routines
26 |
27 | ==============================================================================*/
28 |
29 | /*
30 |
31 | The way this module works:
32 |
33 | - _mm_fopen will call the errorhandler [see mmerror.c] in addition to
34 | setting _mm_errno on exit.
35 | - _mm_iobase is for internal use. It is used by Player_LoadFP to
36 | ensure that it works properly with wad files.
37 | - _mm_read_I_* and _mm_read_M_* differ : the first is for reading data
38 | written by a little endian (intel) machine, and the second is for reading
39 | big endian (Mac, RISC, Alpha) machine data.
40 | - _mm_write functions work the same as the _mm_read functions.
41 | - _mm_read_string is for reading binary strings. It is basically the same
42 | as an fread of bytes.
43 |
44 | */
45 |
46 | /* FIXME
47 | the _mm_iobase variable ought to be MREADER-specific. It will eventually
48 | become a private field of the MREADER structure, but this will require a
49 | soname version bump.
50 |
51 | In the meantime, the drawback is that if you use the xxx_LoadFP functions,
52 | you can't have several MREADER objects with different iobase values.
53 | */
54 |
55 | #include
56 |
57 | #include
58 | #include
59 |
60 | #include "mikmod_internals.h"
61 |
62 | #define COPY_BUFSIZE 512
63 |
64 | static long _mm_iobase=0;
65 |
66 | /* Same as malloc, but sets error variable _mm_error when fails */
67 | void* _mm_malloc(size_t size)
68 | {
69 | void *d;
70 |
71 | if(!(d=calloc(1,size))) {
72 | _mm_errno = MMERR_OUT_OF_MEMORY;
73 | if(_mm_errorhandler) _mm_errorhandler();
74 | }
75 | return d;
76 | }
77 |
78 | /* Same as calloc, but sets error variable _mm_error when fails */
79 | void* _mm_calloc(size_t nitems,size_t size)
80 | {
81 | void *d;
82 |
83 | if(!(d=calloc(nitems,size))) {
84 | _mm_errno = MMERR_OUT_OF_MEMORY;
85 | if(_mm_errorhandler) _mm_errorhandler();
86 | }
87 | return d;
88 | }
89 |
90 | /*
91 |
92 | This section is added to use SDL_rwops for IO
93 |
94 | -Matt Campbell (matt@campbellhome.dhs.org) April 2000
95 |
96 | */
97 |
98 | typedef struct MRWOPSREADER {
99 | MREADER core;
100 | SDL_RWops* rw;
101 | int end;
102 | } MRWOPSREADER;
103 |
104 | static BOOL _mm_RWopsReader_Eof(MREADER* reader)
105 | {
106 | if ( ((MRWOPSREADER*)reader)->end <
107 | SDL_RWtell(((MRWOPSREADER*)reader)->rw) ) return 1;
108 | else return 0;
109 | }
110 |
111 | static BOOL _mm_RWopsReader_Read(MREADER* reader,void* ptr,size_t size)
112 | {
113 | return SDL_RWread(((MRWOPSREADER*)reader)->rw, ptr, size, 1);
114 | }
115 |
116 | static int _mm_RWopsReader_Get(MREADER* reader)
117 | {
118 | char buf;
119 | if ( SDL_RWread(((MRWOPSREADER*)reader)->rw, &buf, 1, 1) != 1 ) return EOF;
120 | else return (int)buf;
121 | }
122 |
123 | static BOOL _mm_RWopsReader_Seek(MREADER* reader,long offset,int whence)
124 | {
125 | return SDL_RWseek(((MRWOPSREADER*)reader)->rw,
126 | (whence==SEEK_SET)?offset+_mm_iobase:offset,whence);
127 | }
128 |
129 | static long _mm_RWopsReader_Tell(MREADER* reader)
130 | {
131 | return SDL_RWtell(((MRWOPSREADER*)reader)->rw) - _mm_iobase;
132 | }
133 |
134 | MREADER *_mm_new_rwops_reader(SDL_RWops * rw)
135 | {
136 | int here;
137 | MRWOPSREADER* reader=(MRWOPSREADER*)_mm_malloc(sizeof(MRWOPSREADER));
138 | if (reader) {
139 | reader->core.Eof =&_mm_RWopsReader_Eof;
140 | reader->core.Read=&_mm_RWopsReader_Read;
141 | reader->core.Get =&_mm_RWopsReader_Get;
142 | reader->core.Seek=&_mm_RWopsReader_Seek;
143 | reader->core.Tell=&_mm_RWopsReader_Tell;
144 | reader->rw=rw;
145 |
146 | /* RWops does not explicitly support an eof check, so we shall find
147 | the end manually - this requires seek support for the RWop */
148 | here = SDL_RWtell(rw);
149 | reader->end = SDL_RWseek(rw, 0, SEEK_END);
150 | SDL_RWseek(rw, here, SEEK_SET); /* Move back */
151 | }
152 | return (MREADER*)reader;
153 | }
154 |
155 | void _mm_delete_rwops_reader (MREADER* reader)
156 | {
157 | if(reader) free(reader);
158 | }
159 |
160 | /*
161 |
162 | End SDL_rwops section
163 |
164 | */
165 |
166 |
167 | /* ex:set ts=4: */
168 |
--------------------------------------------------------------------------------
/mm.h:
--------------------------------------------------------------------------------
1 | #ifndef _EXTRA_H
2 | #define _EXTRA_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | void* _mm_malloc(size_t size);
9 | void* _mm_calloc(size_t nitems,size_t size);
10 | BOOL _mm_RWopsReader_Eof(MREADER* reader);
11 | BOOL _mm_RWopsReader_Read(MREADER* reader,void* ptr,size_t size);
12 | int _mm_RWopsReader_Get(MREADER* reader);
13 | BOOL _mm_RWopsReader_Seek(MREADER* reader,long offset,int whence);
14 | long _mm_RWopsReader_Tell(MREADER* reader);
15 | MREADER *_mm_new_rwops_reader(SDL_RWops * rw);
16 | void _mm_delete_rwops_reader (MREADER* reader);
17 |
18 | #ifdef __cplusplus
19 | }
20 | #endif
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/romdisk/.keepme:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/romdisk/.keepme
--------------------------------------------------------------------------------
/sdl20compat.inc.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | //dummy values
5 | enum
6 | {
7 | SDL_PHYSPAL = 1,
8 | SDL_LOGPAL = 2,
9 | SDL_SRCCOLORKEY = 4,
10 | SDL_HWPALETTE = 8,
11 | SDL_ANYFORMAT = 16,
12 | };
13 |
14 | static SDL_Surface* sdl2_screen = NULL;
15 | static SDL_Texture* sdl2_screen_tex = NULL;
16 | static SDL_Window* sdl2_window = NULL;
17 | static SDL_Renderer* sdl2_rendr = NULL;
18 |
19 | #if defined (__NGAGE__) || defined (NGAGE_DEBUG) || defined(__3DS__) || defined(__PSP__) || defined(__XBOX__) || defined (DREAMCAST)
20 | static SDL_Texture* frame = NULL;
21 | #endif
22 |
23 | static SDL_Surface *SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags)
24 | {
25 | Uint32 format = SDL_PIXELFORMAT_UNKNOWN;
26 | SDL_RendererInfo info = { 0 };
27 | unsigned int i;
28 |
29 | if (!sdl2_window)
30 | {
31 | #if defined (__NGAGE__) || defined (NGAGE_DEBUG)
32 | sdl2_window = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, 0);
33 | #elif defined (__XBOX__)
34 | sdl2_window = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_SHOWN);
35 | #elif defined (DREAMCAST)
36 | sdl2_window = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, SDL_WINDOW_SHOWN);
37 | #else
38 | sdl2_window = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, SDL_WINDOW_RESIZABLE);
39 | #endif
40 | if (!sdl2_window)
41 | {
42 | goto die;
43 | }
44 | #if defined (__NGAGE__) || defined (NGAGE_DEBUG) //|| defined (DREAMCAST)
45 | printf(">> SDL_RENDERER_SOFTWARE\n");
46 | //SDL_SetHint(SDL_HINT_VIDEO_DOUBLE_BUFFER, "1");
47 | //SDL_SetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION, "software");
48 | SDL_SetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION, "software");
49 | SDL_SetHint(SDL_HINT_DC_VIDEO_MODE, "SDL_DC_TEXTURED_VIDEO");
50 | sdl2_rendr = SDL_CreateRenderer(sdl2_window, -1, SDL_RENDERER_SOFTWARE| SDL_RENDERER_PRESENTVSYNC);
51 | #else
52 | printf(">> SDL_RENDERER_OPENGL\n");
53 | SDL_SetHint(SDL_HINT_VIDEO_DOUBLE_BUFFER, "0");
54 | //SDL_SetHint(SDL_HINT_DC_VIDEO_MODE, "SDL_DC_DIRECT_VIDEO");
55 | SDL_SetHint(SDL_HINT_DC_VIDEO_MODE, "SDL_DC_TEXTURED_VIDEO");
56 | sdl2_rendr = SDL_CreateRenderer(sdl2_window, -1, 0);
57 | SDL_RenderSetLogicalSize(sdl2_rendr, width, height);
58 | #endif
59 | if (!sdl2_rendr)
60 | {
61 | goto die;
62 | }
63 |
64 | for (i = 0; i < info.num_texture_formats; i++) {
65 | int found_bpp = SDL_BYTESPERPIXEL(info.texture_formats[i]);
66 | if (found_bpp * 8 == bpp) {
67 | format = info.texture_formats[i];
68 | break;
69 | } else if ((flags & SDL_ANYFORMAT) && format == SDL_PIXELFORMAT_UNKNOWN) {
70 | if (found_bpp == 2 || found_bpp == 4) {
71 | format = info.texture_formats[i];
72 | }
73 | }
74 | }
75 | if (format == SDL_PIXELFORMAT_UNKNOWN)
76 | format = SDL_PIXELFORMAT_RGBA8888; // SDL_PIXELFORMAT_RGBA8888 -> SDL_PIXELFORMAT_RGBA32;
77 |
78 | //SDL_Log(">> sdl2_screen_tex");
79 | sdl2_screen_tex = SDL_CreateTexture(sdl2_rendr, format, SDL_TEXTUREACCESS_STREAMING, width, height); // PICO-8 screen
80 |
81 | if (0)
82 | {
83 | die:
84 | #if defined (__NGAGE__) || defined (NGAGE_DEBUG) || defined(__3DS__) || defined(__PSP__) || defined(__XBOX__) //|| defined (DREAMCAST)
85 | if (frame)
86 | {
87 | SDL_DestroyTexture(frame);
88 | }
89 | #endif
90 | if (sdl2_window)
91 | {
92 | SDL_DestroyWindow(sdl2_window);
93 | }
94 | if (sdl2_screen_tex)
95 | {
96 | SDL_DestroyTexture(sdl2_screen_tex);
97 | }
98 | if (sdl2_rendr)
99 | {
100 | SDL_DestroyRenderer(sdl2_rendr);
101 | }
102 | return NULL;
103 | }
104 | }
105 | #if defined(__3DS__)
106 | sdl2_screen = SDL_CreateRGBSurfaceWithFormat(0, 128, 128, SDL_BITSPERPIXEL(format), format);
107 | #elif defined(__PSP__)
108 | sdl2_screen = SDL_CreateRGBSurfaceWithFormat(0, 256, 256, SDL_BITSPERPIXEL(format), format);
109 | #else
110 | printf(">> SDL_CreateRGBSurfaceWithFormat: %dx%d", width, height);
111 | sdl2_screen = SDL_CreateRGBSurfaceWithFormat(0, width, height, SDL_BITSPERPIXEL(format), format);
112 | #endif
113 | assert(sdl2_screen && sdl2_screen->format->BitsPerPixel == bpp);
114 |
115 | #if defined (__NGAGE__) || defined (NGAGE_DEBUG) || defined (__PSP__) || defined (__3DS__) || defined (__XBOX__) //|| defined (DREAMCAST)
116 | {
117 | #if defined (__NGAGE__)
118 | SDL_Surface* frame_sf = SDL_LoadBMP("E:\\System\\Apps\\Celeste\\data\\frame_ngage.bmp");
119 | #elif defined (NGAGE_DEBUG)
120 | SDL_Surface* frame_sf = SDL_LoadBMP("data\\frame_ngage.bmp");
121 | #elif defined (__3DS__)
122 | SDL_Surface* frame_sf = SDL_LoadBMP("romfs:/data/frame_3ds.bmp");
123 | #elif defined (__PSP__)
124 | SDL_Surface* frame_sf = SDL_LoadBMP("data/frame_psp.bmp");
125 | #elif defined (__XBOX__)
126 | SDL_Surface* frame_sf = SDL_LoadBMP("D:\\data\\frame_xbox.bmp");
127 | //#elif defined (DREAMCAST)
128 | // SDL_Surface* frame_sf = SDL_LoadBMP("/cd/data/frame_xbox.bmp");
129 | #else
130 | SDL_Surface* frame_sf = SDL_LoadBMP("data/frame_ngage.bmp");
131 | #endif
132 |
133 | if (! frame_sf)
134 | {
135 | SDL_Log("Failed to load image: %s", SDL_GetError());
136 | }
137 | else
138 | {
139 | if (0 != SDL_SetColorKey(frame_sf, SDL_TRUE, SDL_MapRGB(frame_sf->format, 0xff, 0x00, 0xff)))
140 | {
141 | SDL_Log("Failed to set color key for frame.bmp: %s", SDL_GetError());
142 | }
143 | if (0 != SDL_SetSurfaceRLE(frame_sf, 1))
144 | {
145 | SDL_Log("Could not enable RLE for surface frame.bmp: %s", SDL_GetError());
146 | }
147 |
148 | frame = SDL_CreateTextureFromSurface(sdl2_rendr, frame_sf);
149 | if (! frame)
150 | {
151 | SDL_Log("Could not create texture from surface: %s", SDL_GetError());
152 | }
153 | }
154 | SDL_FreeSurface(frame_sf);
155 | SDL_RenderCopy(sdl2_rendr, frame, NULL, NULL);
156 | SDL_RenderPresent(sdl2_rendr);
157 |
158 | #if defined (__PSP__) || defined (__XBOX__) //|| defined (DREAMCAST) /* very hacky, draw the frame in both framebuffers */
159 | SDL_RenderClear(sdl2_rendr);
160 | SDL_RenderCopy(sdl2_rendr, frame, NULL, NULL);
161 | SDL_RenderPresent(sdl2_rendr);
162 | #endif
163 | }
164 | #endif
165 |
166 | return sdl2_screen;
167 | }
168 |
169 | static void SDL_SetPalette(SDL_Surface* surf, int flag, SDL_Color* pal, int begin, int count)
170 | {
171 | (void)surf;
172 | (void)flag;
173 | (void)pal;
174 | (void)begin;
175 | (void)count;
176 | }
177 | static void SDL_WM_SetCaption(const char* title, const char* icon)
178 | {
179 | assert(sdl2_window != NULL);
180 | SDL_SetWindowTitle(sdl2_window, title);
181 | (void)icon;
182 | }
183 |
184 | static int SDL_WM_ToggleFullScreen(SDL_Surface* screen)
185 | {
186 | static int fullscreen = 0;
187 | assert(screen == sdl2_screen);
188 | assert(sdl2_window != NULL);
189 | fullscreen = !fullscreen;
190 | return SDL_SetWindowFullscreen(sdl2_window, fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0) == 0;
191 | }
192 |
193 | static SDL_Surface* SDL_GetVideoSurface(void)
194 | {
195 | return sdl2_screen;
196 | }
197 |
198 | static void SDL_Flip(SDL_Surface* screen)
199 | {
200 | #if defined(__NGAGE__)
201 | SDL_Rect source = { 0, 0, 128, 128 };
202 | SDL_Rect dest = { 24, 40, 128, 128 };
203 | #elif defined (NGAGE_DEBUG)
204 | SDL_Rect source = { 0, 0, 384, 384 };
205 | SDL_Rect dest = { 72, 120, 384, 384 };
206 | #elif defined (__3DS__)
207 | SDL_Rect source = { 0, 0, 128, 128 };
208 | SDL_Rect dest = { 80, 0, 240, 240 };
209 | #elif defined (__PSP__)
210 | SDL_Rect source = { 0, 0, 256, 256 };
211 | SDL_Rect dest = { 112, 8, 256, 256 };
212 | #elif defined (__XBOX__)
213 | SDL_Rect source = { 0, 0, 128, 128 };
214 | SDL_Rect dest = { (SCREEN_WIDTH - SCREEN_HEIGHT) / 2, 0, SCREEN_HEIGHT, SCREEN_HEIGHT };
215 | #elif defined (DREAMCAST)
216 | //SDL_Log(">> SDL_Flip"); // SDL2 Custom patch values. needs to be fixed
217 | SDL_Rect source = { 0, 0, 128, 128 };
218 | SDL_Rect dest = { (320 - 260) / 2, -125, 240, 250 };
219 | #endif
220 |
221 | /*if (sdl2_screen_tex != NULL) {
222 | Uint32 format;
223 | int access, width, height;
224 |
225 | if (SDL_QueryTexture(sdl2_screen_tex, &format, &access, &width, &height) == 0) {
226 | printf("Texture Info:\n");
227 | printf(" Format: 0x%x\n", format);
228 | printf(" Access: %d\n", access);
229 | printf(" Width: %d\n", width);
230 | printf(" Height: %d\n", height);
231 | } else {
232 | printf("Failed to query texture: %s\n", SDL_GetError());
233 | }
234 | } else {
235 | printf("SDL_Texture sdl2_screen_tex is NULL. Cannot query info.\n");
236 | }*/
237 |
238 |
239 | //SDL_Log("assert");
240 | assert(screen == sdl2_screen);
241 | assert(sdl2_window != NULL);
242 | //SDL_Log("SDL_UpdateTexture");
243 | SDL_UpdateTexture(sdl2_screen_tex, NULL, screen->pixels, screen->pitch);
244 | //SDL_Log("SDL_SetRenderDrawColor");
245 | SDL_SetRenderDrawColor(sdl2_rendr, 255, 0, 0, 255);
246 | #if defined (__NGAGE__) || defined (NGAGE_DEBUG) || defined (__3DS__) || defined (__PSP__) || defined(__XBOX__) || defined(DREAMCAST)
247 | //SDL_Log("SDL_RenderCopy - source/dest");
248 | SDL_RenderCopy(sdl2_rendr, sdl2_screen_tex, &source, &dest);
249 | #else
250 | //SDL_Log("SDL_RenderCopy");
251 | SDL_Rect* srcRect = { 0, 0, 128, 128};
252 | SDL_Rect* dstRect = { 0, 0, 512, 512 };
253 | SDL_Point size;
254 | SDL_QueryTexture(sdl2_screen_tex, NULL, NULL, &size.x, &size.y);
255 | printf("tex-w %d tex-h %d\n", size.x, size.y);
256 | SDL_RenderCopy(sdl2_rendr, sdl2_screen_tex, NULL, NULL); // PICO-8 screen
257 | #endif
258 | //SDL_Log("SDL_RenderPresent");
259 | SDL_RenderPresent(sdl2_rendr);
260 |
261 | }
262 |
263 | #define SDL_GetKeyState SDL_GetKeyboardState
264 | //the above function now returns array indexed by scancodes, so we need to use those constants
265 | #if defined (__NGAGE__)
266 | // Reset
267 | #define SDLK_F9 SDL_SCANCODE_BACKSPACE
268 | // Pause
269 | #define SDLK_ESCAPE SDL_SCANCODE_SOFTRIGHT
270 | // Quit
271 | #define SDLK_DELETE SDL_SCANCODE_SOFTLEFT
272 | // Save state
273 | #define SDLK_s SDL_SCANCODE_1
274 | // Load state
275 | #define SDLK_d SDL_SCANCODE_2
276 | // Toggle screenshake
277 | #define SDLK_e SDL_SCANCODE_3
278 | // Jump
279 | #define SDLK_z SDL_SCANCODE_7
280 | // Dash
281 | #define SDLK_x SDL_SCANCODE_5
282 | // Directional controls
283 | #define SDLK_LEFT SDL_SCANCODE_LEFT
284 | #define SDLK_RIGHT SDL_SCANCODE_RIGHT
285 | #define SDLK_UP SDL_SCANCODE_UP
286 | #define SDLK_DOWN SDL_SCANCODE_DOWN
287 | #else
288 | #define SDLK_F9 SDL_SCANCODE_F9
289 | #define SDLK_ESCAPE SDL_SCANCODE_ESCAPE
290 | #define SDLK_DELETE SDL_SCANCODE_DELETE
291 | #define SDLK_F11 SDL_SCANCODE_F11
292 | #define SDLK_LSHIFT SDL_SCANCODE_LSHIFT
293 | #define SDLK_LEFT SDL_SCANCODE_LEFT
294 | #define SDLK_RIGHT SDL_SCANCODE_RIGHT
295 | #define SDLK_UP SDL_SCANCODE_UP
296 | #define SDLK_DOWN SDL_SCANCODE_DOWN
297 | #define SDLK_5 SDL_SCANCODE_5
298 | #define SDLK_s SDL_SCANCODE_S
299 | #define SDLK_d SDL_SCANCODE_D
300 | #define SDLK_c SDL_SCANCODE_C
301 | #define SDLK_x SDL_SCANCODE_X
302 | #define SDLK_n SDL_SCANCODE_N
303 | #define SDLK_a SDL_SCANCODE_A
304 | #define SDLK_b SDL_SCANCODE_B
305 | #define SDLK_z SDL_SCANCODE_Z
306 | #define SDLK_e SDL_SCANCODE_E
307 | #define SDLK_v SDL_SCANCODE_V
308 | #endif
309 |
310 | #define sym scancode // SDL_Keysym.sym -> SDL_Keysym.scancode
311 |
--------------------------------------------------------------------------------
/tilemap.h:
--------------------------------------------------------------------------------
1 | //obtained using https://github.com/dansanderson/picotool
2 | #define tilemap_length 8192
3 | static unsigned char tilemap_data[tilemap_length] = {0x23,0x31,0x25,0x25,0x48,0x25,0x25,0x32,0x32,0x32,0x32,0x32,0x33,0x00,0x00,0x24,0x25,0x26,0x24,0x25,0x25,0x26,0x31,0x32,0x32,0x32,0x25,0x26,0x28,0x28,0x28,0x24,0x25,0x25,0x25,0x25,0x25,0x25,0x32,0x33,0x28,0x38,0x28,0x28,0x31,0x25,0x25,0x25,0x32,0x32,0x32,0x32,0x33,0x00,0x00,0x00,0x31,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x33,0x00,0x00,0x00,0x24,0x32,0x32,0x32,0x33,0x31,0x32,0x32,0x32,0x25,0x25,0x25,0x25,0x25,0x48,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x26,0x28,0x28,0x24,0x25,0x25,0x48,0x25,0x25,0x25,0x26,0x28,0x28,0x28,0x28,0x24,0x25,0x48,0x25,0x25,0x25,0x26,0x28,0x28,0x28,0x28,0x31,0x32,0x32,0x32,0x25,0x48,0x25,0x25,0x25,0x25,0x25,0x25,0x23,0x31,0x32,0x32,0x32,0x33,0x29,0x00,0x00,0x28,0x29,0x00,0x00,0x00,0x24,0x25,0x26,0x31,0x32,0x32,0x33,0x28,0x28,0x00,0x28,0x24,0x26,0x2a,0x10,0x28,0x24,0x25,0x48,0x25,0x25,0x25,0x26,0x00,0x2a,0x28,0x28,0x29,0x28,0x10,0x24,0x48,0x25,0x28,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x28,0x10,0x00,0x00,0x00,0x37,0x28,0x29,0x00,0x00,0x00,0x00,0x2a,0x28,0x31,0x48,0x25,0x25,0x25,0x25,0x25,0x48,0x25,0x25,0x32,0x32,0x32,0x33,0x28,0x28,0x24,0x25,0x25,0x25,0x48,0x25,0x32,0x33,0x38,0x28,0x2a,0x28,0x31,0x32,0x25,0x25,0x48,0x25,0x26,0x28,0x38,0x28,0x28,0x28,0x2a,0x2a,0x28,0x31,0x32,0x32,0x32,0x32,0x25,0x25,0x25,0x25,0x23,0x20,0x10,0x28,0x38,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x3d,0x24,0x25,0x25,0x23,0x20,0x10,0x28,0x29,0x29,0x00,0x28,0x24,0x26,0x00,0x3a,0x38,0x24,0x25,0x25,0x25,0x48,0x25,0x33,0x00,0x00,0x29,0x00,0x00,0x2a,0x00,0x31,0x25,0x25,0x28,0x38,0x29,0x00,0x00,0x3a,0x67,0x68,0x38,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x28,0x39,0x3e,0x00,0x3a,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0x24,0x25,0x25,0x32,0x32,0x32,0x32,0x32,0x33,0x21,0x22,0x22,0x23,0x28,0x28,0x24,0x25,0x25,0x25,0x32,0x33,0x28,0x28,0x28,0x29,0x00,0x00,0x2a,0x28,0x31,0x32,0x25,0x25,0x26,0x28,0x28,0x28,0x28,0x29,0x00,0x00,0x2a,0x28,0x28,0x28,0x38,0x28,0x24,0x48,0x32,0x32,0x33,0x28,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x3f,0x20,0x20,0x24,0x48,0x25,0x26,0x28,0x28,0x29,0x00,0x00,0x00,0x2a,0x24,0x33,0x00,0x00,0x2a,0x24,0x25,0x32,0x25,0x25,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x25,0x29,0x00,0x00,0x00,0x00,0x21,0x22,0x23,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x34,0x35,0x36,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x39,0x24,0x25,0x26,0x21,0x22,0x23,0x20,0x21,0x23,0x31,0x32,0x32,0x33,0x28,0x28,0x24,0x25,0x48,0x26,0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1c,0x00,0x00,0x3b,0x24,0x25,0x26,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x28,0x28,0x24,0x25,0x23,0x40,0x28,0x38,0x28,0x29,0x3a,0x28,0x39,0x00,0x00,0x00,0x34,0x35,0x22,0x25,0x25,0x48,0x26,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x24,0x33,0x00,0x31,0x25,0x33,0x3d,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x00,0x00,0x1c,0x3a,0x3a,0x31,0x25,0x26,0x20,0x28,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x28,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x11,0x11,0x3a,0x28,0x28,0x31,0x32,0x33,0x24,0x25,0x26,0x10,0x31,0x33,0x20,0x28,0x28,0x28,0x28,0x38,0x24,0x25,0x25,0x26,0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x24,0x25,0x26,0x2a,0x28,0x28,0x67,0x00,0x16,0x00,0x2a,0x28,0x28,0x38,0x28,0x28,0x24,0x25,0x26,0x3a,0x28,0x28,0x28,0x10,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x25,0x25,0x32,0x33,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x37,0x00,0x00,0x00,0x3e,0x24,0x00,0x00,0x00,0x37,0x21,0x22,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x58,0x68,0x28,0x28,0x28,0x24,0x26,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x23,0x28,0x38,0x28,0x29,0x28,0x28,0x31,0x32,0x33,0x28,0x28,0x29,0x00,0x2a,0x00,0x2a,0x28,0x28,0x24,0x25,0x25,0x33,0x2b,0x0c,0x00,0x00,0x00,0x11,0x11,0x00,0x00,0x00,0x0c,0x3b,0x31,0x48,0x26,0x11,0x28,0x10,0x00,0x00,0x00,0x00,0x68,0x28,0x28,0x28,0x28,0x28,0x24,0x25,0x25,0x22,0x35,0x35,0x36,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x28,0x24,0x26,0x00,0x3d,0x00,0x3a,0x39,0x00,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x25,0x00,0x1a,0x00,0x00,0x24,0x25,0x26,0x11,0x11,0x11,0x11,0x00,0x00,0x00,0x00,0x2c,0x28,0x38,0x28,0x28,0x28,0x38,0x31,0x33,0x28,0x00,0x00,0x00,0x17,0x17,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x00,0x11,0x11,0x00,0x00,0x24,0x26,0x10,0x28,0x29,0x00,0x28,0x28,0x1b,0x1b,0x1b,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x2a,0x21,0x25,0x48,0x26,0x28,0x39,0x00,0x00,0x00,0x3b,0x34,0x36,0x2b,0x00,0x00,0x00,0x00,0x28,0x24,0x25,0x23,0x28,0x28,0x3a,0x67,0x00,0x3a,0x28,0x28,0x28,0x29,0x00,0x2a,0x31,0x32,0x25,0x33,0x38,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x38,0x24,0x25,0x23,0x20,0x20,0x10,0x29,0x00,0x30,0x39,0x00,0x00,0x00,0x00,0x58,0x24,0x48,0x00,0x00,0x00,0x3a,0x31,0x32,0x32,0x35,0x35,0x35,0x36,0x67,0x58,0x00,0x00,0x3c,0x28,0x28,0x28,0x28,0x10,0x28,0x21,0x23,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x34,0x36,0x00,0x3a,0x24,0x26,0x28,0x28,0x00,0x00,0x38,0x28,0x39,0x00,0x00,0x00,0x2a,0x29,0x00,0x00,0x00,0x00,0x00,0x31,0x32,0x32,0x26,0x10,0x10,0x00,0x00,0x00,0x00,0x28,0x28,0x39,0x00,0x00,0x00,0x00,0x2a,0x24,0x25,0x33,0x28,0x28,0x28,0x38,0x00,0x28,0x28,0x28,0x39,0x00,0x00,0x00,0x17,0x00,0x26,0x00,0x00,0x2a,0x28,0x00,0x00,0x00,0x00,0x3a,0x28,0x3a,0x28,0x28,0x28,0x24,0x25,0x25,0x22,0x23,0x28,0x39,0x00,0x37,0x28,0x58,0x39,0x00,0x68,0x28,0x31,0x32,0x00,0x00,0x00,0x28,0x28,0x28,0x28,0x28,0x20,0x20,0x28,0x28,0x28,0x39,0x21,0x22,0x28,0x29,0x00,0x2a,0x28,0x28,0x24,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x38,0x28,0x28,0x31,0x25,0x23,0x00,0x00,0x00,0x28,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x16,0x3a,0x67,0x68,0x28,0x28,0x00,0x33,0x38,0x28,0x0b,0x00,0x00,0x00,0x10,0x38,0x28,0x00,0x00,0x0b,0x00,0x00,0x31,0x33,0x28,0x28,0x28,0x28,0x28,0x68,0x28,0x28,0x28,0x28,0x00,0x00,0x00,0x17,0x00,0x33,0x00,0x00,0x00,0x28,0x67,0x58,0x00,0x00,0x28,0x10,0x28,0x28,0x34,0x22,0x25,0x25,0x25,0x48,0x26,0x28,0x28,0x67,0x20,0x28,0x28,0x28,0x38,0x28,0x28,0x21,0x22,0x00,0x00,0x3a,0x28,0x38,0x28,0x10,0x29,0x00,0x00,0x2a,0x28,0x38,0x28,0x24,0x25,0x2a,0x00,0x00,0x00,0x28,0x38,0x24,0x26,0x00,0x00,0x00,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x28,0x28,0x2a,0x28,0x31,0x33,0x39,0x00,0x00,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x28,0x29,0x00,0x2a,0x28,0x39,0x00,0x00,0x00,0x00,0x2a,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x38,0x28,0x28,0x28,0x28,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x28,0x28,0x38,0x3e,0x3a,0x28,0x28,0x28,0x38,0x28,0x24,0x25,0x48,0x25,0x25,0x26,0x00,0x2a,0x28,0x27,0x29,0x00,0x2a,0x28,0x28,0x34,0x32,0x25,0x00,0x00,0x00,0x2a,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x28,0x10,0x28,0x24,0x25,0x00,0x00,0x00,0x00,0x2a,0x28,0x24,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x28,0x00,0x00,0x00,0x2a,0x28,0x28,0x39,0x00,0x28,0x00,0x00,0x00,0x39,0x28,0x39,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x00,0x00,0x00,0x28,0x29,0x00,0x00,0x00,0x2a,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x28,0x28,0x10,0x28,0x28,0x28,0x28,0x67,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x38,0x28,0x28,0x21,0x23,0x28,0x00,0x00,0x2a,0x28,0x24,0x25,0x32,0x32,0x25,0x26,0x00,0x3a,0x28,0x30,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x24,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x11,0x11,0x11,0x11,0x28,0x28,0x28,0x24,0x48,0x00,0x00,0x00,0x3a,0x28,0x28,0x31,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0x17,0x00,0x01,0x3f,0x00,0x00,0x00,0x20,0x29,0x00,0x00,0x00,0x00,0x38,0x28,0x00,0x00,0x28,0x01,0x3a,0x28,0x28,0x10,0x28,0x58,0x00,0x00,0x00,0x3a,0x28,0x29,0x00,0x00,0x00,0x2a,0x28,0x0c,0x00,0x00,0x00,0x3a,0x38,0x0c,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0x00,0x2a,0x28,0x28,0x28,0x28,0x28,0x29,0x28,0x28,0x29,0x00,0x00,0x00,0x3a,0x00,0x01,0x3a,0x21,0x23,0x28,0x2a,0x31,0x33,0x29,0x00,0x11,0x11,0x11,0x24,0x25,0x00,0x28,0x31,0x26,0x3a,0x38,0x29,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x34,0x22,0x22,0x36,0x29,0x2a,0x00,0x24,0x25,0x3e,0x01,0x3a,0x38,0x28,0x29,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0x35,0x35,0x36,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x3d,0x2a,0x28,0x67,0x14,0x22,0x22,0x23,0x28,0x28,0x28,0x28,0x28,0x39,0x00,0x58,0x28,0x38,0x28,0x3d,0x00,0x00,0x3a,0x29,0x00,0x00,0x00,0x00,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x2a,0x29,0x00,0x00,0x58,0x10,0x00,0x12,0x00,0x2a,0x28,0x22,0x22,0x22,0x25,0x26,0x29,0x00,0x21,0x23,0x11,0x11,0x21,0x22,0x22,0x25,0x25,0x00,0x2a,0x38,0x37,0x28,0x29,0x00,0x30,0x11,0x11,0x11,0x00,0x00,0x00,0x3a,0x28,0x00,0x01,0x3f,0x00,0x00,0x00,0x2a,0x28,0x24,0x26,0x29,0x00,0x00,0x00,0x24,0x25,0x22,0x22,0x22,0x23,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0x17,0x00,0x00,0x2a,0x28,0x20,0x39,0x00,0x3a,0x20,0x00,0x00,0x3a,0x00,0x34,0x35,0x35,0x35,0x35,0x25,0x25,0x25,0x22,0x22,0x22,0x23,0x28,0x28,0x28,0x28,0x10,0x28,0x28,0x21,0x22,0x0b,0x10,0x00,0x00,0x00,0x00,0x0b,0x28,0x10,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x2c,0x00,0x00,0x28,0x38,0x00,0x00,0x00,0x00,0x2a,0x28,0x39,0x17,0x00,0x00,0x28,0x25,0x48,0x25,0x25,0x26,0x11,0x11,0x24,0x25,0x22,0x22,0x25,0x25,0x25,0x48,0x25,0x00,0x01,0x2a,0x28,0x28,0x67,0x3f,0x24,0x22,0x22,0x23,0x00,0x00,0x00,0x38,0x28,0x22,0x22,0x23,0x00,0x00,0x12,0x00,0x2a,0x24,0x26,0x00,0x00,0x00,0x12,0x24,0x25,0x25,0x25,0x25,0x26,0x00,0x00,0x00,0x00,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x20,0x28,0x39,0x28,0x27,0x08,0x00,0x28,0x67,0x68,0x20,0x28,0x28,0x28,0x25,0x48,0x25,0x25,0x25,0x25,0x26,0x2a,0x28,0x28,0x21,0x22,0x22,0x22,0x25,0x25,0x3a,0x28,0x01,0x3d,0x00,0x00,0x00,0x68,0x28,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x01,0x68,0x28,0x28,0x00,0x17,0x17,0x17,0x00,0x3a,0x28,0x00,0x00,0x3a,0x28,0x25,0x25,0x25,0x25,0x25,0x22,0x22,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x25,0x25,0x48,0x26,0x67,0x58,0x68,0x28,0x28,0x25,0x48,0x26,0x00,0x00,0x27,0x00,0x00,0x24,0x26,0x00,0x00,0x00,0x21,0x25,0x25,0x25,0x25,0x48,0x26,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x20,0x28,0x10,0x28,0x30,0x00,0x3a,0x28,0x28,0x28,0x20,0x28,0x28,0x28,0x25,0x25,0x25,0x25,0x48,0x25,0x26,0x00,0x00,0x2a,0x24,0x25,0x25,0x25,0x48,0x25,0x28,0x21,0x22,0x23,0x00,0x00,0x00,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x22,0x22,0x23,0x28,0x67,0x00,0x00,0x00,0x00,0x28,0x28,0x39,0x00,0x28,0x38,0x25,0x32,0x33,0x00,0x00,0x00,0x24,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x25,0x25,0x25,0x25,0x26,0x28,0x28,0x28,0x28,0x24,0x25,0x32,0x32,0x32,0x32,0x25,0x48,0x25,0x25,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x25,0x26,0x28,0x28,0x28,0x24,0x48,0x25,0x25,0x25,0x25,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x25,0x25,0x32,0x32,0x32,0x32,0x33,0x31,0x32,0x32,0x32,0x32,0x33,0x28,0x29,0x00,0x26,0x28,0x29,0x28,0x67,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x31,0x32,0x32,0x32,0x25,0x25,0x25,0x32,0x33,0x28,0x28,0x00,0x31,0x25,0x25,0x48,0x25,0x25,0x25,0x48,0x25,0x25,0x48,0x26,0x28,0x38,0x28,0x31,0x32,0x32,0x32,0x32,0x32,0x32,0x25,0x48,0x26,0x28,0x28,0x00,0x00,0x00,0x30,0x40,0x2a,0x28,0x28,0x28,0x28,0x28,0x24,0x25,0x25,0x48,0x26,0x28,0x38,0x28,0x28,0x31,0x33,0x38,0x28,0x29,0x00,0x31,0x32,0x25,0x26,0x28,0x00,0x00,0x16,0x3a,0x28,0x28,0x31,0x33,0x28,0x28,0x38,0x24,0x25,0x25,0x48,0x25,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x25,0x26,0x00,0x00,0x16,0x00,0x00,0x00,0x00,0x2a,0x10,0x28,0x28,0x38,0x39,0x00,0x26,0x28,0x1a,0x38,0x20,0x39,0x3d,0x00,0x00,0x00,0x00,0x2a,0x38,0x28,0x28,0x28,0x25,0x25,0x26,0x28,0x28,0x28,0x29,0x00,0x3b,0x24,0x25,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x33,0x28,0x28,0x28,0x28,0x28,0x28,0x10,0x28,0x28,0x20,0x31,0x25,0x33,0x28,0x39,0x00,0x00,0x00,0x37,0x00,0x00,0x2a,0x38,0x28,0x00,0x2a,0x24,0x25,0x25,0x25,0x26,0x28,0x28,0x28,0x28,0x20,0x28,0x29,0x2a,0x00,0x00,0x00,0x2a,0x31,0x33,0x28,0x11,0x11,0x11,0x28,0x28,0x28,0x00,0x00,0x28,0x00,0x2a,0x31,0x25,0x25,0x25,0x25,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x25,0x26,0x00,0x00,0x00,0x00,0x11,0x11,0x00,0x00,0x00,0x29,0x2a,0x28,0x29,0x00,0x26,0x28,0x3a,0x28,0x20,0x10,0x20,0x11,0x11,0x11,0x21,0x22,0x23,0x28,0x28,0x10,0x25,0x25,0x26,0x28,0x38,0x28,0x00,0x00,0x3b,0x24,0x26,0x2b,0x00,0x2a,0x2a,0x38,0x28,0x28,0x28,0x28,0x28,0x29,0x00,0x2a,0x28,0x00,0x28,0x28,0x38,0x28,0x28,0x31,0x28,0x28,0x10,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x39,0x00,0x24,0x48,0x25,0x25,0x26,0x28,0x29,0x00,0x28,0x20,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0x21,0x22,0x23,0x28,0x38,0x29,0x00,0x3a,0x10,0x29,0x00,0x2a,0x24,0x25,0x32,0x32,0x33,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x42,0x00,0x25,0x26,0x39,0x00,0x00,0x00,0x21,0x23,0x00,0x00,0x00,0x00,0x00,0x21,0x22,0x22,0x25,0x22,0x22,0x23,0x21,0x22,0x23,0x21,0x22,0x23,0x24,0x48,0x26,0x28,0x28,0x28,0x32,0x32,0x33,0x28,0x28,0x28,0x00,0x00,0x3b,0x31,0x33,0x2b,0x00,0x00,0x00,0x28,0x10,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x29,0x00,0x2a,0x28,0x28,0x28,0x29,0x00,0x28,0x28,0x28,0x00,0x16,0x00,0x00,0x00,0x16,0x2a,0x28,0x28,0x28,0x00,0x24,0x25,0x25,0x25,0x26,0x27,0x00,0x00,0x2a,0x20,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x34,0x25,0x25,0x33,0x29,0x2a,0x00,0x00,0x00,0x2a,0x00,0x11,0x11,0x24,0x25,0x22,0x23,0x28,0x28,0x00,0x00,0x2c,0x46,0x47,0x2c,0x00,0x00,0x00,0x42,0x53,0x53,0x25,0x26,0x28,0x00,0x00,0x3a,0x24,0x26,0x00,0x00,0x16,0x00,0x00,0x24,0x25,0x25,0x25,0x25,0x48,0x26,0x31,0x32,0x33,0x31,0x32,0x33,0x24,0x25,0x26,0x20,0x28,0x38,0x22,0x22,0x23,0x28,0x29,0x28,0x67,0x00,0x00,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x28,0x38,0x00,0x11,0x11,0x00,0x00,0x12,0x00,0x00,0x00,0x28,0x29,0x2a,0x16,0x00,0x28,0x38,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x28,0x29,0x00,0x24,0x25,0x48,0x25,0x26,0x37,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x29,0x3b,0x24,0x26,0x28,0x39,0x00,0x00,0x00,0x00,0x00,0x3b,0x21,0x22,0x25,0x25,0x25,0x26,0x38,0x28,0x67,0x00,0x3c,0x56,0x57,0x3c,0x42,0x43,0x43,0x53,0x63,0x63,0x32,0x33,0x28,0x39,0x00,0x28,0x24,0x26,0x11,0x11,0x11,0x11,0x11,0x24,0x25,0x25,0x25,0x48,0x25,0x26,0x20,0x1b,0x1b,0x1b,0x1b,0x1b,0x24,0x25,0x26,0x28,0x28,0x28,0x25,0x25,0x26,0x00,0x00,0x2a,0x28,0x14,0x3a,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x29,0x3b,0x21,0x23,0x00,0x00,0x17,0x00,0x00,0x11,0x28,0x67,0x00,0x00,0x00,0x28,0x28,0x28,0x67,0x58,0x00,0x00,0x00,0x58,0x68,0x28,0x38,0x00,0x00,0x31,0x32,0x32,0x32,0x33,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x28,0x28,0x00,0x3b,0x24,0x26,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x31,0x25,0x48,0x25,0x25,0x33,0x28,0x28,0x28,0x39,0x21,0x22,0x22,0x23,0x52,0x53,0x53,0x64,0x00,0x00,0x29,0x00,0x2a,0x28,0x38,0x28,0x31,0x32,0x35,0x35,0x35,0x35,0x22,0x25,0x48,0x25,0x25,0x25,0x25,0x25,0x23,0x00,0x00,0x00,0x00,0x00,0x31,0x32,0x33,0x28,0x10,0x28,0x48,0x25,0x26,0x11,0x11,0x11,0x34,0x35,0x36,0x11,0x11,0x11,0x11,0x00,0x00,0x00,0x00,0x00,0x3b,0x31,0x33,0x11,0x11,0x11,0x11,0x11,0x27,0x28,0x29,0x00,0x00,0x3b,0x28,0x28,0x28,0x28,0x10,0x29,0x00,0x00,0x00,0x2a,0x28,0x28,0x67,0x00,0x00,0x28,0x35,0x35,0x35,0x36,0x11,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x30,0x28,0x38,0x00,0x3b,0x31,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x31,0x32,0x25,0x26,0x2a,0x28,0x28,0x10,0x28,0x24,0x25,0x25,0x26,0x62,0x63,0x64,0x00,0x00,0x00,0x00,0x16,0x00,0x28,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x31,0x32,0x25,0x25,0x25,0x25,0x25,0x25,0x26,0x67,0x58,0x00,0x00,0x00,0x20,0x00,0x00,0x2a,0x28,0x28,0x25,0x25,0x32,0x35,0x35,0x35,0x22,0x22,0x22,0x22,0x22,0x35,0x36,0x39,0x00,0x00,0x00,0x00,0x3b,0x34,0x35,0x35,0x35,0x35,0x35,0x36,0x30,0x38,0x00,0x00,0x00,0x17,0x28,0x29,0x00,0x00,0x2a,0x00,0x00,0x00,0x00,0x00,0x38,0x2a,0x29,0x00,0x3a,0x28,0x28,0x28,0x28,0x34,0x36,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x30,0x28,0x28,0x00,0x00,0x2a,0x29,0x00,0x00,0x11,0x11,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x31,0x26,0x00,0x29,0x00,0x2a,0x28,0x24,0x48,0x25,0x25,0x23,0x00,0x00,0x00,0x00,0x00,0x39,0x00,0x3a,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x31,0x32,0x25,0x25,0x48,0x25,0x26,0x38,0x29,0x00,0x00,0x00,0x17,0x00,0x00,0x58,0x68,0x28,0x32,0x33,0x10,0x28,0x29,0x3b,0x24,0x48,0x25,0x25,0x26,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x3b,0x20,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x30,0x28,0x00,0x00,0x00,0x17,0x28,0x3a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x28,0x28,0x28,0x38,0x10,0x29,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x37,0x10,0x28,0x11,0x11,0x11,0x11,0x11,0x11,0x21,0x36,0x00,0x00,0x00,0x00,0x2a,0x28,0x38,0x0b,0x26,0x00,0x00,0x00,0x00,0x21,0x25,0x25,0x25,0x25,0x26,0x00,0x1c,0x00,0x00,0x00,0x28,0x28,0x28,0x10,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x2a,0x38,0x28,0x29,0x25,0x25,0x25,0x25,0x26,0x28,0x00,0x00,0x00,0x00,0x17,0x00,0x00,0x2a,0x21,0x22,0x28,0x28,0x29,0x08,0x00,0x3b,0x24,0x25,0x25,0x48,0x26,0x28,0x28,0x29,0x12,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x29,0x00,0x00,0x00,0x3b,0x38,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x10,0x29,0x00,0x00,0x28,0x38,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x22,0x35,0x35,0x35,0x35,0x35,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x39,0x33,0x00,0x00,0x00,0x00,0x31,0x32,0x25,0x25,0x25,0x33,0x00,0x00,0x00,0x00,0x00,0x28,0x38,0x28,0x29,0x00,0x00,0x00,0x00,0x3b,0x20,0x2b,0x00,0x68,0x28,0x28,0x00,0x32,0x32,0x32,0x32,0x33,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x25,0x28,0x28,0x00,0x00,0x00,0x3b,0x31,0x32,0x32,0x25,0x26,0x38,0x28,0x00,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x37,0x00,0x00,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x28,0x29,0x28,0x29,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x2a,0x33,0x28,0x38,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x28,0x28,0x00,0x00,0x00,0x00,0x42,0x43,0x44,0x24,0x25,0x26,0x28,0x39,0x00,0x00,0x00,0x00,0x28,0x00,0x2a,0x00,0x00,0x11,0x00,0x00,0x00,0x1b,0x00,0x2a,0x20,0x10,0x29,0x2c,0x1b,0x1b,0x1b,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x31,0x28,0x29,0x16,0x00,0x00,0x00,0x1b,0x1b,0x1b,0x31,0x33,0x28,0x10,0x67,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x3a,0x27,0x00,0x00,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x11,0x11,0x11,0x00,0x00,0x00,0x00,0x00,0x2a,0x3a,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x00,0x28,0x28,0x29,0x00,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x52,0x53,0x54,0x24,0x48,0x26,0x28,0x28,0x00,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x3b,0x20,0x2b,0x39,0x00,0x00,0x00,0x00,0x29,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x1b,0x2a,0x28,0x29,0x00,0x00,0x01,0x00,0x00,0x27,0x39,0x00,0x38,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x11,0x20,0x11,0x11,0x11,0x21,0x22,0x23,0x00,0x00,0x00,0x12,0x12,0x00,0x2a,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x00,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x67,0x68,0x28,0x29,0x00,0x00,0x3f,0x01,0x00,0x52,0x53,0x54,0x24,0x25,0x26,0x28,0x10,0x67,0x3a,0x39,0x00,0x01,0x3f,0x00,0x00,0x00,0x2a,0x38,0x29,0x00,0x11,0x00,0x00,0x00,0x00,0x00,0x21,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x67,0x00,0x00,0x00,0x00,0x2a,0x38,0x28,0x67,0x58,0x68,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x68,0x28,0x00,0x00,0x00,0x21,0x23,0x00,0x37,0x28,0x29,0x28,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x22,0x22,0x22,0x22,0x23,0x24,0x48,0x26,0x11,0x11,0x11,0x20,0x20,0x11,0x11,0x00,0x27,0x39,0x00,0x00,0x17,0x17,0x00,0x00,0x00,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x17,0x17,0x00,0x00,0x00,0x28,0x28,0x38,0x39,0x3a,0x00,0x21,0x22,0x23,0x52,0x53,0x54,0x24,0x25,0x33,0x28,0x28,0x28,0x38,0x29,0x00,0x22,0x23,0x2b,0x00,0x00,0x08,0x28,0x39,0x3b,0x27,0x00,0x00,0x00,0x00,0x14,0x24,0x23,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x10,0x28,0x67,0x00,0x17,0x17,0x17,0x17,0x17,0x28,0x28,0x39,0x00,0x00,0x31,0x33,0x39,0x27,0x10,0x12,0x28,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x48,0x25,0x25,0x25,0x26,0x24,0x25,0x26,0x21,0x22,0x22,0x22,0x22,0x22,0x22,0x3a,0x30,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x17,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x28,0x28,0x28,0x28,0x28,0x00,0x24,0x25,0x26,0x52,0x53,0x54,0x24,0x26,0x28,0x28,0x28,0x28,0x28,0x28,0x39,0x25,0x26,0x2b,0x00,0x00,0x3a,0x28,0x10,0x3b,0x30,0x00,0x00,0x00,0x21,0x22,0x25,0x26,0x00,0x00,0x00,0x27,0x00,0x00,0x3a,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x38,0x28,0x28,0x28,0x39,0x00,0x00,0x00,0x58,0x68,0x28,0x38,0x28,0x00,0x00,0x22,0x23,0x38,0x30,0x28,0x17,0x28,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x24,0x25,0x25,0x25,0x25,0x48,0x25,0x33,0x29,0x00,0x00,0x31,0x32,0x32,0x32,0x25,0x32,0x32,0x32,0x32,0x32,0x25,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x20,0x00,0x00,0x31,0x32,0x32,0x25,0x25,0x26,0x00,0x2a,0x28,0x38,0x24,0x25,0x25,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x10,0x28,0x29,0x00,0x31,0x32,0x32,0x25,0x63,0x63,0x63,0x64,0x52,0x53,0x53,0x53,0x54,0x55,0x00,0x00,0x00,0x55,0x52,0x53,0x25,0x48,0x25,0x25,0x26,0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x25,0x25,0x25,0x26,0x28,0x28,0x28,0x24,0x25,0x48,0x25,0x25,0x25,0x48,0x25,0x25,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x58,0x68,0x28,0x24,0x48,0x25,0x25,0x25,0x25,0x25,0x1b,0x00,0x16,0x00,0x1b,0x1b,0x1b,0x1b,0x30,0x1b,0x1b,0x1b,0x1b,0x1b,0x30,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x11,0x20,0x00,0x00,0x00,0x2a,0x28,0x24,0x25,0x33,0x00,0x00,0x00,0x2a,0x31,0x32,0x33,0x00,0x00,0x29,0x00,0x00,0x38,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x2a,0x00,0x00,0x00,0x2a,0x28,0x31,0x00,0x00,0x00,0x00,0x62,0x63,0x63,0x63,0x64,0x55,0x00,0x00,0x00,0x55,0x52,0x53,0x25,0x25,0x25,0x48,0x26,0x2b,0x3a,0x00,0x00,0x00,0x00,0x00,0x24,0x25,0x48,0x25,0x26,0x28,0x38,0x28,0x31,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x25,0x25,0x48,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x10,0x28,0x31,0x32,0x25,0x25,0x48,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x34,0x35,0x36,0x00,0x14,0x00,0x00,0x10,0x31,0x26,0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x20,0x2b,0x00,0x12,0x00,0x00,0x00,0x00,0x2a,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x55,0x62,0x63,0x25,0x25,0x25,0x32,0x33,0x2b,0x28,0x29,0x00,0x11,0x11,0x20,0x24,0x25,0x25,0x25,0x26,0x10,0x29,0x00,0x28,0x29,0x00,0x00,0x00,0x00,0x2a,0x28,0x31,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x24,0x25,0x25,0x25,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x34,0x35,0x36,0x39,0x00,0x00,0x1b,0x26,0x72,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x73,0x74,0x11,0x00,0x00,0x16,0x00,0x00,0x00,0x11,0x00,0x00,0x1b,0x00,0x3b,0x20,0x2b,0x00,0x00,0x00,0x16,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x00,0x00,0x25,0x25,0x33,0x28,0x28,0x28,0x28,0x10,0x3a,0x21,0x22,0x22,0x25,0x25,0x25,0x25,0x26,0x28,0x00,0x00,0x2a,0x00,0x11,0x11,0x11,0x00,0x00,0x28,0x38,0x24,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x3a,0x28,0x28,0x24,0x25,0x25,0x25,0x25,0x00,0x00,0x16,0x00,0x00,0x11,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x10,0x28,0x00,0x11,0x25,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x23,0x2b,0x00,0x00,0x00,0x00,0x3b,0x20,0x2b,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x26,0x28,0x28,0x28,0x38,0x28,0x28,0x28,0x31,0x32,0x32,0x25,0x48,0x25,0x25,0x26,0x29,0x00,0x00,0x00,0x11,0x42,0x43,0x44,0x00,0x00,0x2a,0x28,0x24,0x25,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x38,0x28,0x24,0x48,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x3b,0x20,0x2b,0x39,0x16,0x00,0x3b,0x20,0x2b,0x00,0x16,0x00,0x27,0x39,0x3a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x2a,0x28,0x39,0x21,0x25,0x48,0x25,0x25,0x25,0x25,0x25,0x32,0x32,0x32,0x32,0x32,0x26,0x2b,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x00,0x00,0x68,0x28,0x00,0x00,0x3a,0x00,0x00,0x00,0x00,0x25,0x26,0x28,0x28,0x10,0x2a,0x00,0x2a,0x28,0x28,0x29,0x00,0x31,0x32,0x32,0x32,0x26,0x11,0x11,0x11,0x11,0x42,0x53,0x53,0x54,0x00,0x00,0x3b,0x21,0x25,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x31,0x32,0x32,0x32,0x32,0x28,0x00,0x00,0x3a,0x00,0x1b,0x3a,0x28,0x39,0x00,0x00,0x1b,0x00,0x00,0x00,0x00,0x37,0x28,0x38,0x39,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x3a,0x28,0x28,0x31,0x32,0x32,0x32,0x32,0x25,0x48,0x26,0x28,0x29,0x00,0x2a,0x10,0x37,0x2b,0x00,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x20,0x2b,0x00,0x00,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x58,0x28,0x28,0x68,0x28,0x28,0x28,0x28,0x28,0x39,0x00,0x00,0x00,0x25,0x26,0x38,0x28,0x29,0x00,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x22,0x22,0x22,0x23,0x62,0x63,0x63,0x64,0x00,0x00,0x3b,0x24,0x25,0x25,0x25,0x00,0x00,0x00,0x11,0x11,0x11,0x11,0x3a,0x28,0x28,0x10,0x1b,0x1b,0x1b,0x1b,0x1b,0x28,0x39,0x28,0x28,0x39,0x00,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x2a,0x28,0x27,0x11,0x00,0x00,0x00,0x00,0x3b,0x27,0x28,0x28,0x38,0x1b,0x22,0x22,0x22,0x23,0x31,0x32,0x33,0x16,0x00,0x00,0x68,0x29,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x68,0x39,0x28,0x28,0x28,0x28,0x10,0x29,0x00,0x00,0x2a,0x10,0x28,0x3a,0x67,0x68,0x25,0x26,0x28,0x28,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x48,0x25,0x25,0x23,0x28,0x38,0x29,0x00,0x00,0x3b,0x24,0x48,0x25,0x25,0x00,0x00,0x68,0x21,0x22,0x22,0x23,0x28,0x38,0x28,0x28,0x39,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x28,0x28,0x38,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x16,0x00,0x11,0x00,0x3a,0x28,0x37,0x27,0x00,0x00,0x00,0x00,0x3b,0x37,0x2a,0x28,0x29,0x11,0x25,0x25,0x48,0x26,0x38,0x28,0x2a,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x00,0x16,0x28,0x28,0x28,0x2a,0x38,0x28,0x28,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x28,0x25,0x26,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x26,0x10,0x2a,0x00,0x00,0x00,0x3b,0x24,0x25,0x25,0x25,0x00,0x00,0x10,0x31,0x32,0x25,0x25,0x22,0x35,0x35,0x35,0x36,0x00,0x00,0x00,0x00,0x28,0x38,0x00,0x2a,0x28,0x28,0x28,0x10,0x39,0x39,0x00,0x00,0x11,0x00,0x00,0x00,0x27,0x28,0x28,0x29,0x1b,0x30,0x39,0x00,0x00,0x00,0x00,0x1b,0x00,0x2a,0x28,0x21,0x25,0x32,0x25,0x26,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x00,0x00,0x00,0x00,0x00,0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x36,0x2b,0x00,0x28,0x28,0x29,0x00,0x28,0x28,0x29,0x00,0x60,0x61,0x00,0x3a,0x28,0x38,0x28,0x2a,0x48,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x48,0x25,0x25,0x25,0x26,0x29,0x00,0x00,0x11,0x11,0x11,0x24,0x25,0x25,0x25,0x00,0x00,0x2a,0x28,0x28,0x31,0x32,0x26,0x1b,0x1b,0x1b,0x1b,0x00,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x28,0x28,0x39,0x3b,0x27,0x2b,0x00,0x00,0x37,0x28,0x10,0x00,0x11,0x30,0x28,0x3a,0x00,0x00,0x00,0x11,0x00,0x28,0x28,0x31,0x26,0x01,0x31,0x33,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x39,0x00,0x00,0x00,0x00,0x20,0x28,0x38,0x28,0x28,0x28,0x20,0x28,0x28,0x28,0x28,0x28,0x27,0x2b,0x00,0x38,0x28,0x00,0x00,0x2a,0x28,0x3d,0x00,0x70,0x71,0x3f,0x28,0x28,0x29,0x00,0x00,0x25,0x26,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x48,0x26,0x00,0x00,0x3b,0x21,0x22,0x23,0x31,0x25,0x48,0x25,0x00,0x00,0x00,0x28,0x38,0x29,0x3b,0x30,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x28,0x3b,0x30,0x2b,0x00,0x00,0x1b,0x2a,0x28,0x38,0x27,0x30,0x28,0x10,0x39,0x00,0x00,0x27,0x3a,0x28,0x29,0x1b,0x26,0x17,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x00,0x00,0x38,0x28,0x00,0x00,0x00,0x00,0x1b,0x2a,0x28,0x28,0x10,0x28,0x1b,0x2a,0x28,0x38,0x2a,0x28,0x37,0x2b,0x00,0x28,0x28,0x39,0x00,0x00,0x28,0x21,0x22,0x23,0x21,0x22,0x23,0x28,0x00,0x00,0x3a,0x32,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x32,0x32,0x32,0x32,0x33,0x00,0x00,0x3b,0x24,0x25,0x25,0x23,0x31,0x25,0x25,0x00,0x00,0x00,0x2a,0x28,0x00,0x3b,0x37,0x00,0x00,0x00,0x00,0x3a,0x27,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x11,0x11,0x11,0x11,0x28,0x38,0x3b,0x37,0x2b,0x00,0x3a,0x00,0x00,0x28,0x28,0x37,0x30,0x29,0x00,0x28,0x38,0x00,0x37,0x28,0x38,0x00,0x11,0x26,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x00,0x29,0x16,0x2a,0x28,0x00,0x00,0x28,0x16,0x00,0x28,0x28,0x00,0x00,0x10,0x29,0x00,0x00,0x00,0x20,0x31,0x32,0x33,0x24,0x48,0x26,0x28,0x42,0x43,0x43,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x58,0x68,0x00,0x00,0x00,0x38,0x28,0x28,0x29,0x00,0x00,0x00,0x00,0x3b,0x24,0x25,0x48,0x25,0x23,0x31,0x32,0x00,0x00,0x01,0x00,0x28,0x00,0x00,0x28,0x00,0x00,0x00,0x2a,0x28,0x30,0x00,0x00,0x22,0x22,0x23,0x11,0x11,0x21,0x35,0x35,0x36,0x10,0x28,0x28,0x29,0x00,0x00,0x38,0x00,0x00,0x29,0x00,0x1b,0x30,0x00,0x00,0x2a,0x28,0x00,0x00,0x28,0x28,0x00,0x21,0x26,0x28,0x29,0x00,0x00,0x00,0x00,0x3a,0x28,0x29,0x00,0x28,0x28,0x00,0x00,0x00,0x00,0x58,0x68,0x00,0x00,0x28,0x28,0x3a,0x28,0x28,0x39,0x00,0x28,0x29,0x16,0x00,0x28,0x00,0x01,0x00,0x00,0x21,0x22,0x22,0x22,0x25,0x25,0x25,0x23,0x52,0x53,0x53,0x00,0x00,0x00,0x3f,0x01,0x00,0x00,0x3a,0x28,0x00,0x00,0x2a,0x10,0x00,0x00,0x00,0x28,0x29,0x00,0x00,0x00,0x00,0x39,0x00,0x3b,0x24,0x25,0x25,0x25,0x25,0x22,0x22,0x40,0x00,0x21,0x22,0x23,0x2b,0x00,0x38,0x39,0x12,0x00,0x68,0x38,0x30,0x39,0x00,0x25,0x48,0x25,0x22,0x22,0x26,0x0c,0x00,0x2a,0x28,0x28,0x28,0x00,0x00,0x3a,0x28,0x01,0x00,0x00,0x00,0x3a,0x37,0x08,0x00,0x00,0x28,0x39,0x00,0x28,0x29,0x00,0x31,0x26,0x28,0x00,0x00,0x00,0x00,0x00,0x28,0x38,0x00,0x3a,0x28,0x10,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x28,0x29,0x2a,0x28,0x28,0x38,0x28,0x28,0x28,0x00,0x00,0x00,0x43,0x43,0x43,0x43,0x44,0x24,0x25,0x48,0x25,0x25,0x25,0x25,0x26,0x52,0x53,0x53,0x00,0x00,0x00,0x21,0x36,0x00,0x00,0x38,0x28,0x39,0x00,0x00,0x28,0x00,0x1c,0x00,0x28,0x01,0x3d,0x3e,0x00,0x3a,0x28,0x00,0x3b,0x24,0x25,0x25,0x25,0x48,0x25,0x25,0x21,0x23,0x24,0x25,0x26,0x2b,0x68,0x28,0x28,0x27,0x28,0x28,0x10,0x30,0x28,0x00,0x25,0x25,0x25,0x25,0x48,0x26,0x00,0x00,0x00,0x28,0x28,0x29,0x00,0x00,0x28,0x28,0x23,0x00,0x00,0x00,0x38,0x28,0x39,0x00,0x00,0x2a,0x28,0x10,0x28,0x00,0x00,0x1b,0x26,0x38,0x39,0x00,0x00,0x00,0x00,0x28,0x28,0x00,0x28,0x28,0x28,0x39,0x00,0x00,0x00,0x00,0x00,0x38,0x28,0x00,0x00,0x00,0x2a,0x28,0x10,0x28,0x00,0x00,0x00,0x00,0x53,0x53,0x53,0x53,0x54,0x24,0x25,0x25,0x25,0x25,0x25,0x48,0x26,0x52,0x53,0x53,0x00,0x00,0x00,0x30,0x42,0x44,0x00,0x28,0x28,0x28,0x00,0x00,0x28,0x39,0x00,0x00,0x22,0x22,0x22,0x23,0x10,0x28,0x38,0x39,0x3b,0x24,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x26,0x2b,0x1b,0x1b,0x1b,0x31,0x32,0x32,0x25,0x26,0x00,0x48,0x25,0x32,0x32,0x32,0x32,0x32,0x32,0x25,0x25,0x32,0x32,0x32,0x33,0x28,0x28,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x48,0x25,0x32,0x33,0x2b,0x28,0x32,0x32,0x32,0x32,0x32,0x25,0x26,0x28,0x28,0x00,0x00,0x3b,0x24,0x25,0x25,0x25,0x25,0x48,0x25,0x25,0x25,0x25,0x25,0x48,0x48,0x25,0x25,0x25,0x26,0x38,0x28,0x24,0x25,0x48,0x25,0x25,0x32,0x33,0x28,0x28,0x29,0x24,0x25,0x32,0x32,0x32,0x25,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x48,0x25,0x26,0x2b,0x00,0x00,0x00,0x1b,0x1b,0x1b,0x24,0x26,0x00,0x32,0x33,0x28,0x67,0x00,0x00,0x00,0x28,0x24,0x33,0x2b,0x2a,0x28,0x10,0x28,0x38,0x25,0x25,0x25,0x48,0x25,0x25,0x32,0x32,0x32,0x32,0x25,0x26,0x1b,0x1b,0x00,0x38,0x29,0x01,0x00,0x3a,0x28,0x24,0x26,0x38,0x29,0x00,0x00,0x3b,0x24,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x25,0x26,0x10,0x28,0x31,0x25,0x25,0x32,0x33,0x1b,0x1b,0x10,0x28,0x14,0x31,0x33,0x38,0x28,0x28,0x24,0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x25,0x25,0x25,0x26,0x2b,0x00,0x00,0x00,0x00,0x00,0x2a,0x24,0x26,0x67,0x28,0x28,0x38,0x29,0x00,0x00,0x11,0x2a,0x37,0x2b,0x00,0x3a,0x28,0x27,0x29,0x00,0x25,0x25,0x25,0x25,0x25,0x33,0x1b,0x1b,0x1b,0x1b,0x31,0x33,0x00,0x00,0x00,0x28,0x35,0x35,0x35,0x36,0x28,0x24,0x26,0x28,0x14,0x00,0x00,0x3b,0x30,0x28,0x2a,0x2a,0x1a,0x28,0x29,0x00,0x2a,0x28,0x38,0x28,0x28,0x10,0x28,0x24,0x26,0x00,0x2a,0x38,0x25,0x26,0x1b,0x1b,0x00,0x00,0x38,0x21,0x23,0x2b,0x00,0x00,0x08,0x10,0x24,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x48,0x25,0x32,0x32,0x33,0x2b,0x00,0x00,0x00,0x11,0x00,0x28,0x24,0x26,0x29,0x28,0x10,0x2a,0x00,0x00,0x3b,0x27,0x00,0x29,0x00,0x00,0x00,0x38,0x30,0x00,0x00,0x32,0x32,0x25,0x25,0x26,0x2b,0x00,0x00,0x00,0x00,0x3b,0x27,0x00,0x00,0x3a,0x28,0x28,0x28,0x38,0x28,0x28,0x24,0x25,0x22,0x23,0x2b,0x00,0x3b,0x37,0x29,0x08,0x00,0x00,0x10,0x00,0x11,0x00,0x29,0x2a,0x28,0x29,0x11,0x2a,0x31,0x33,0x00,0x3a,0x28,0x25,0x26,0x2b,0x00,0x00,0x00,0x2a,0x31,0x33,0x2b,0x00,0x00,0x68,0x28,0x24,0x25,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x25,0x26,0x21,0x22,0x23,0x2b,0x00,0x3a,0x67,0x27,0x2b,0x2a,0x24,0x26,0x38,0x28,0x29,0x00,0x00,0x00,0x3b,0x30,0x00,0x00,0x00,0x00,0x3a,0x28,0x30,0x00,0x00,0x22,0x23,0x31,0x32,0x33,0x2b,0x00,0x00,0x00,0x00,0x3b,0x30,0x28,0x39,0x00,0x2a,0x38,0x28,0x29,0x10,0x29,0x24,0x48,0x25,0x26,0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x3b,0x20,0x2b,0x3a,0x16,0x28,0x3b,0x20,0x2b,0x00,0x11,0x00,0x00,0x28,0x25,0x26,0x2b,0x00,0x00,0x00,0x00,0x1b,0x1b,0x00,0x00,0x2a,0x38,0x2a,0x24,0x25,0x00,0x00,0x00,0x00,0x3a,0x00,0x28,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x00,0x00,0x00,0x00,0x25,0x25,0x26,0x24,0x48,0x26,0x2b,0x00,0x2a,0x38,0x30,0x2b,0x12,0x24,0x26,0x29,0x38,0x00,0x00,0x00,0x00,0x3b,0x30,0x00,0x00,0x00,0x00,0x00,0x2a,0x30,0x3e,0x14,0x25,0x25,0x22,0x22,0x23,0x2b,0x00,0x00,0x00,0x00,0x3b,0x30,0x29,0x00,0x00,0x00,0x28,0x29,0x00,0x00,0x00,0x24,0x25,0x25,0x26,0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x2a,0x28,0x28,0x00,0x1b,0x00,0x3b,0x20,0x2b,0x11,0x2a,0x25,0x26,0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x29,0x3b,0x24,0x48,0x00,0x00,0x00,0x00,0x28,0x67,0x28,0x00,0x00,0x10,0x00,0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,0x00,0x00,0x00,0x00,0x32,0x32,0x33,0x31,0x32,0x26,0x2b,0x12,0x00,0x28,0x30,0x2b,0x17,0x31,0x33,0x00,0x28,0x39,0x58,0x68,0x39,0x3b,0x30,0x11,0x11,0x11,0x11,0x11,0x11,0x24,0x22,0x22,0x25,0x25,0x48,0x25,0x26,0x2b,0x00,0x00,0x11,0x00,0x3b,0x30,0x2b,0x00,0x00,0x00,0x28,0x11,0x11,0x11,0x11,0x24,0x25,0x48,0x26,0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x10,0x67,0x58,0x11,0x00,0x1b,0x3b,0x20,0x16,0x48,0x26,0x11,0x11,0x11,0x11,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x3b,0x31,0x25,0x00,0x00,0x00,0x00,0x28,0x38,0x28,0x76,0x00,0x28,0x67,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x2a,0x30,0x11,0x27,0x00,0x2a,0x30,0x2b,0x00,0x10,0x10,0x39,0x28,0x28,0x38,0x28,0x34,0x35,0x32,0x35,0x35,0x35,0x35,0x35,0x35,0x25,0x25,0x48,0x25,0x25,0x25,0x25,0x26,0x2b,0x00,0x3b,0x27,0x00,0x3b,0x30,0x2b,0x00,0x00,0x00,0x28,0x34,0x35,0x35,0x35,0x32,0x32,0x25,0x26,0x2b,0x00,0x00,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x20,0x28,0x28,0x38,0x27,0x2b,0x16,0x00,0x1b,0x00,0x25,0x25,0x23,0x21,0x22,0x23,0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,0x24,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x21,0x23,0x28,0x38,0x29,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,0x00,0x00,0x00,0x00,0x29,0x00,0x11,0x00,0x00,0x31,0x35,0x26,0x2b,0x00,0x31,0x35,0x35,0x35,0x35,0x35,0x29,0x00,0x2a,0x00,0x00,0x10,0x28,0x28,0x28,0x28,0x29,0x00,0x3b,0x24,0x25,0x25,0x32,0x32,0x32,0x32,0x26,0x2b,0x16,0x3b,0x30,0x00,0x3b,0x30,0x00,0x00,0x00,0x00,0x29,0x1b,0x1b,0x1b,0x1b,0x1b,0x3b,0x24,0x26,0x2b,0x00,0x3b,0x27,0x2b,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x00,0x1b,0x2a,0x28,0x28,0x37,0x2b,0x00,0x00,0x00,0x00,0x32,0x32,0x33,0x31,0x32,0x33,0x2b,0x00,0x00,0x11,0x11,0x00,0x00,0x00,0x3b,0x24,0x00,0x00,0x00,0x68,0x38,0x28,0x21,0x25,0x25,0x23,0x28,0x39,0x3a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x27,0x2b,0x00,0x2a,0x38,0x30,0x2b,0x00,0x00,0x00,0x2a,0x28,0x39,0x3b,0x00,0x00,0x00,0x00,0x00,0x00,0x2a,0x28,0x38,0x28,0x28,0x67,0x21,0x25,0x25,0x25,0x1b,0x1b,0x1b,0x1b,0x37,0x2b,0x00,0x3b,0x30,0x39,0x3b,0x30,0x16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x24,0x26,0x2b,0x17,0x3b,0x30,0x2b,0x00,0x00,0x3b,0x20,0x2b,0x11,0x00,0x00,0x00,0x11,0x00,0x29,0x1b,0x00,0x00,0x00,0x00,0x3a,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x00,0x11,0x11,0x21,0x23,0x11,0x00,0x00,0x3b,0x24,0x00,0x00,0x00,0x2a,0x28,0x21,0x25,0x48,0x25,0x25,0x23,0x28,0x38,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x3b,0x30,0x2b,0x00,0x00,0x28,0x30,0x11,0x11,0x11,0x11,0x00,0x28,0x38,0x3b,0x11,0x11,0x11,0x11,0x11,0x00,0x00,0x28,0x29,0x00,0x29,0x28,0x24,0x25,0x48,0x25,0x00,0x00,0x00,0x3a,0x28,0x00,0x00,0x3b,0x30,0x28,0x3b,0x37,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x24,0x26,0x11,0x11,0x11,0x30,0x2b,0x00,0x00,0x00,0x1b,0x3b,0x20,0x2b,0x00,0x3b,0x27,0x2b,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x2b,0x01,0x00,0x00,0x00,0x00,0x3b,0x21,0x22,0x25,0x32,0x36,0x2b,0x00,0x3b,0x31,0x58,0x58,0x68,0x28,0x29,0x24,0x25,0x25,0x25,0x25,0x26,0x10,0x28,0x28,0x68,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x37,0x2b,0x00,0x00,0x2a,0x31,0x35,0x35,0x35,0x36,0x00,0x28,0x29,0x3b,0x22,0x22,0x22,0x22,0x23,0x11,0x11,0x20,0x2b,0x00,0x00,0x2a,0x31,0x32,0x25,0x25,0x00,0x00,0x00,0x10,0x38,0x29,0x00,0x3b,0x30,0x28,0x28,0x28,0x00,0x00,0x00,0x00,0x11,0x11,0x11,0x11,0x39,0x00,0x11,0x24,0x25,0x22,0x22,0x22,0x33,0x2b,0x00,0x00,0x01,0x00,0x00,0x1b,0x00,0x00,0x3b,0x30,0x2b,0x00,0x00,0x00,0x00,0x58,0x68,0x28,0x2b,0x17,0x00,0x00,0x00,0x00,0x3b,0x24,0x25,0x33,0x1b,0x1b,0x00,0x00,0x00,0x1b,0x28,0x10,0x28,0x38,0x00,0x31,0x32,0x25,0x25,0x48,0x26,0x29,0x00,0x2a,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x00,0x1b,0x00,0x00,0x00,0x00,0x1b,0x1b,0x1b,0x1b,0x1b,0x00,0x2a,0x00,0x3b,0x32,0x32,0x32,0x32,0x32,0x35,0x36,0x1b,0x00,0x00,0x00,0x00,0x1b,0x1b,0x31,0x25,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x3b,0x30,0x28,0x38,0x29,0x00,0x00,0x00,0x00,0x22,0x22,0x22,0x23,0x28,0x38,0x34,0x32,0x32,0x32,0x32,0x33,0x2b,0x00,0x00,0x00,0x23,0x39,0x00,0x00,0x00,0x00,0x3b,0x37,0x2b,0x00,0x00,0x00,0x00,0x2a,0x10,0x28,0x11,0x11,0x11,0x11,0x00,0x00,0x3b,0x31,0x33,0x1b,0x00,0x3a,0x00,0x16,0x00,0x00,0x00,0x2a,0x28,0x39,0x3f,0x21,0x23,0x24,0x25,0x32,0x33,0x20,0x00,0x00,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x29,0x00,0x00,0x01,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3b,0x39,0x01,0x3d,0x00,0x00,0x2a,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x24,0x00,0x00,0x00,0x68,0x28,0x67,0x00,0x3b,0x30,0x00,0x2a,0x28,0x67,0x00,0x00,0x00,0x25,0x25,0x25,0x26,0x00,0x28,0x28,0x00,0x3a,0x10,0x28,0x2a,0x00,0x16,0x00,0x3a,0x26,0x28,0x00,0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x39,0x3a,0x28,0x38,0x28,0x22,0x22,0x22,0x23,0x2b,0x00,0x00,0x1b,0x1b,0x00,0x00,0x38,0x00,0x00,0x00,0x68,0x00,0x00,0x21,0x22,0x22,0x25,0x26,0x31,0x33,0x21,0x22,0x23,0x28,0x39,0x28,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x67,0x58,0x3a,0x21,0x22,0x23,0x11,0x11,0x11,0x11,0x11,0x00,0x12,0x00,0x3b,0x22,0x22,0x23,0x39,0x00,0x10,0x28,0x39,0x00,0x00,0x00,0x00,0x08,0x3a,0x10,0x31,0x01,0x00,0x3a,0x38,0x28,0x29,0x00,0x3b,0x37,0x00,0x00,0x38,0x29,0x00,0x00,0x00,0x25,0x48,0x25,0x26,0x00,0x2a,0x28,0x28,0x28,0x38,0x29,0x00,0x00,0x00,0x00,0x28,0x26,0x38,0x39,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x3a,0x28,0x28,0x28,0x28,0x10,0x25,0x48,0x25,0x26,0x2b,0x16,0x00,0x00,0x39,0x00,0x00,0x28,0x3a,0x00,0x3a,0x28,0x01,0x00,0x31,0x25,0x25,0x48,0x25,0x22,0x22,0x25,0x25,0x25,0x23,0x10,0x38,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x38,0x28,0x28,0x24,0x25,0x25,0x22,0x22,0x22,0x22,0x23,0x00,0x17,0x00,0x3b,0x25,0x25,0x26,0x28,0x3a,0x28,0x38,0x28,0x00,0x00,0x00,0x00,0x00,0x38,0x28,0x28,0x23,0x00,0x10,0x28,0x28,0x00,0x00,0x00,0x38,0x00,0x00,0x28,0x10,0x00,0x00,0x00,0x25,0x25,0x25,0x26,0x17,0x17,0x28,0x38,0x28,0x00,0x00,0x00,0x00,0x00,0x3a,0x28,0x26,0x28,0x10,0x27,0x39,0x00,0x00,0x00,0x00,0x2a,0x28,0x28,0x38,0x28,0x28,0x28,0x25,0x25,0x48,0x26,0x2b,0x00,0x00,0x3a,0x38,0x00,0x3a,0x28,0x10,0x28,0x38,0x28,0x21,0x22,0x23,0x24,0x25,0x25,0x25,0x25,0x25,0x25,0x48,0x25,0x25,0x22,0x22,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
4 | static unsigned char tile_flags[] = {
5 | 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,
6 | 04,02,00,00,00,00,00,00,00,00,00,02,00,00,00,00,
7 | 03,03,03,03,03,03,03,03,04,04,04,02,02,00,00,00,
8 | 03,03,03,03,03,03,03,03,04,04,04,02,02,02,02,02,
9 | 00,00,19,19,19,19,02,02,03,02,02,02,02,02,00,02,
10 | 00,00,19,19,19,19,02,02,04,02,02,02,02,02,02,02,
11 | 00,00,19,19,19,19,00,04,04,02,02,02,02,02,02,02,
12 | 00,00,19,19,19,19,00,00,00,02,02,02,02,02,02,02
13 | };
14 |
--------------------------------------------------------------------------------
/tools/SDL_dreamcastvideo.c:
--------------------------------------------------------------------------------
1 | /*
2 | Simple DirectMedia Layer
3 | Copyright (C) 1997-2024 Sam Lantinga
4 |
5 | This software is provided 'as-is', without any express or implied
6 | warranty. In no event will the authors be held liable for any damages
7 | arising from the use of this software.
8 |
9 | Permission is granted to anyone to use this software for any purpose,
10 | including commercial applications, and to alter it and redistribute it
11 | freely, subject to the following restrictions:
12 |
13 | 1. The origin of this software must not be misrepresented; you must not
14 | claim that you wrote the original software. If you use this software
15 | in a product, an acknowledgment in the product documentation would be
16 | appreciated but is not required.
17 | 2. Altered source versions must be plainly marked as such, and must not be
18 | misrepresented as being the original software.
19 | 3. This notice may not be removed or altered from any source distribution.
20 | */
21 | #include "../../SDL_internal.h"
22 |
23 | #ifdef SDL_VIDEO_DRIVER_DREAMCAST
24 |
25 | /* Dummy SDL video driver implementation; this is just enough to make an
26 | * SDL-based application THINK it's got a working video driver, for
27 | * applications that call SDL_Init(SDL_INIT_VIDEO) when they don't need it,
28 | * and also for use as a collection of stubs when porting SDL to a new
29 | * platform for which you haven't yet written a valid video driver.
30 | *
31 | * This is also a great way to determine bottlenecks: if you think that SDL
32 | * is a performance problem for a given platform, enable this driver, and
33 | * then see if your application runs faster without video overhead.
34 | *
35 | * Initial work by Ryan C. Gordon (icculus@icculus.org). A good portion
36 | * of this was cut-and-pasted from Stephane Peter's work in the AAlib
37 | * SDL video driver. Renamed to "DUMMY" by Sam Lantinga.
38 | */
39 |
40 | #include "SDL_video.h"
41 | #include "SDL_mouse.h"
42 | #include "../SDL_sysvideo.h"
43 | #include "../SDL_pixels_c.h"
44 | #include "SDL_hints.h"
45 | #include "../../events/SDL_events_c.h"
46 |
47 | #include "SDL_dreamcastvideo.h"
48 | #include "SDL_dreamcastevents_c.h"
49 | #include "SDL_dreamcastframebuffer_c.h"
50 | #include "SDL_hints.h"
51 | #include
52 | #include
53 | #define DREAMCASTVID_DRIVER_NAME "dcvideo"
54 | #define DREAMCASTVID_DRIVER_EVDEV_NAME "dcevdev"
55 |
56 | #include "SDL_dreamcastopengl.h"
57 | //Custom code for 60Hz
58 | static int sdl_dc_no_ask_60hz=0;
59 | static int sdl_dc_default_60hz=0;
60 | #include "60hz.h"
61 |
62 | void SDL_DC_ShowAskHz(SDL_bool value)
63 | {
64 | sdl_dc_no_ask_60hz=!value;
65 | }
66 |
67 | void SDL_DC_Default60Hz(SDL_bool value)
68 | {
69 | sdl_dc_default_60hz=value;
70 | }
71 |
72 | /* Initialization/Query functions */
73 | static int DREAMCAST_VideoInit(_THIS);
74 | static void DREAMCAST_VideoQuit(_THIS);
75 | void DREAMCAST_GetDisplayModes(_THIS, SDL_VideoDisplay *display);
76 | int DREAMCAST_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode);
77 | #ifdef SDL_INPUT_LINUXEV
78 | static int evdev = 0;
79 | static void DREAMCAST_EVDEV_Poll(_THIS);
80 | #endif
81 |
82 |
83 | /* DREAMCAST driver bootstrap functions */
84 | static int DREAMCAST_Available(void)
85 | {
86 | // const char *envr = SDL_GetHint(SDL_HINT_VIDEODRIVER);
87 | // if (envr) {
88 | // if (SDL_strcmp(envr, DREAMCASTVID_DRIVER_NAME) == 0) {
89 | // return 1;
90 | // }
91 | // #ifdef SDL_INPUT_LINUXEV
92 | // if (SDL_strcmp(envr, DREAMCASTVID_DRIVER_EVDEV_NAME) == 0) {
93 | // evdev = 1;
94 | // return 1;
95 | // }
96 | // #endif
97 | // }
98 | return 1;
99 |
100 | }
101 | int dreamcast_text_input_enabled=SDL_FALSE;
102 | void DREAMCAST_StartTextInput(SDL_VideoDevice *device)
103 | {
104 | if (!dreamcast_text_input_enabled)
105 | {
106 | dreamcast_text_input_enabled = SDL_TRUE;
107 | // printf("DREAMCAST_StartTextInput: Text input mode enabled.\n");
108 | }
109 | }
110 |
111 | void DREAMCAST_StopTextInput(SDL_VideoDevice *device)
112 | {
113 | if (dreamcast_text_input_enabled)
114 | {
115 | dreamcast_text_input_enabled = SDL_FALSE;
116 | // printf("DREAMCAST_StopTextInput: Text input mode disabled.\n");
117 | }
118 | }
119 |
120 | static void DREAMCAST_DeleteDevice(SDL_VideoDevice *device)
121 | {
122 | SDL_free(device);
123 | }
124 |
125 | static SDL_VideoDevice *DREAMCAST_CreateDevice(void)
126 | {
127 | SDL_VideoDevice *device;
128 | if (!DREAMCAST_Available()) {
129 | SDL_SetError("Dreamcast video driver is not available.");
130 | return 0;
131 | }
132 |
133 | /* Initialize all variables that we clean on shutdown */
134 | device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice));
135 | if (!device) {
136 | SDL_OutOfMemory();
137 | return 0;
138 | }
139 |
140 |
141 | /* Set the function pointers */
142 | device->VideoInit = DREAMCAST_VideoInit;
143 | device->VideoQuit = DREAMCAST_VideoQuit;
144 | device->PumpEvents = DREAMCAST_PumpEvents;
145 | device->GetDisplayModes = DREAMCAST_GetDisplayModes;
146 | device->SetDisplayMode = DREAMCAST_SetDisplayMode;
147 | // device->HasScreenKeyboardSupport = DREAMCAST_HasScreenKeyboardSupport;
148 | device->StartTextInput = DREAMCAST_StartTextInput;
149 | device->StopTextInput = DREAMCAST_StopTextInput;
150 | #ifdef SDL_INPUT_LINUXEV
151 | if (evdev) {
152 | device->PumpEvents = DREAMCAST_EVDEV_Poll;
153 | }
154 | #endif
155 | device->CreateWindowFramebuffer = SDL_DREAMCAST_CreateWindowFramebuffer;
156 | device->UpdateWindowFramebuffer = SDL_DREAMCAST_UpdateWindowFramebuffer;
157 | device->DestroyWindowFramebuffer = SDL_DREAMCAST_DestroyWindowFramebuffer;
158 |
159 | #ifdef SDL_VIDEO_OPENGL
160 | device->GL_LoadLibrary = DREAMCAST_GL_LoadLibrary;
161 | device->GL_GetProcAddress = DREAMCAST_GL_GetProcAddress;
162 | device->GL_MakeCurrent = DREAMCAST_GL_MakeCurrent;
163 | device->GL_SwapWindow = DREAMCAST_GL_SwapBuffers;
164 | device->GL_CreateContext = DREAMCAST_GL_CreateContext;
165 | device->GL_DeleteContext = DREAMCAST_GL_DeleteContext;
166 | #endif
167 |
168 | device->free = DREAMCAST_DeleteDevice;
169 | device->quirk_flags = VIDEO_DEVICE_QUIRK_FULLSCREEN_ONLY;
170 | return device;
171 | }
172 |
173 | VideoBootStrap DREAMCAST_bootstrap = {
174 | "DREAMCASTVID_DRIVER_NAME", "SDL dreamcast video driver",
175 | DREAMCAST_CreateDevice,
176 | NULL /* no ShowMessageBox implementation */
177 | };
178 |
179 | #ifdef SDL_INPUT_LINUXEV
180 | VideoBootStrap DREAMCAST_evdev_bootstrap = {
181 | DREAMCASTVID_DRIVER_EVDEV_NAME, "SDL dreamcast video driver with evdev",
182 | DREAMCAST_CreateDevice,
183 | NULL /* no ShowMessageBox implementation */
184 | };
185 | void SDL_EVDEV_Init(void);
186 | void SDL_EVDEV_Poll();
187 | void SDL_EVDEV_Quit(void);
188 | static void DREAMCAST_EVDEV_Poll(_THIS)
189 | {
190 | (void)_this;
191 | SDL_EVDEV_Poll();
192 | }
193 | #endif
194 |
195 | int __sdl_dc_is_60hz = 0;
196 |
197 | int DREAMCAST_VideoInit(_THIS) {
198 | SDL_DisplayMode current_mode;
199 | SDL_VideoDisplay display;
200 |
201 | // Set default pixel format to 16-bit RGB565
202 | Uint32 Rmask = 0x0000f800;
203 | Uint32 Gmask = 0x000007e0;
204 | Uint32 Bmask = 0x0000001f;
205 | Uint32 Amask = 0; // No alpha channel
206 | int width = 640;
207 | int height = 480;
208 | const char *video_mode_hint = SDL_GetHint(SDL_HINT_DC_VIDEO_MODE);
209 | if (video_mode_hint != NULL && strcmp(video_mode_hint, "SDL_DC_TEXTURED_VIDEO") == 0) {
210 | width = 640;
211 | height = 480;
212 | }
213 | SDL_zero(current_mode);
214 |
215 | // Initialize the default display mode
216 | current_mode.format = SDL_PIXELFORMAT_RGB565;
217 | current_mode.w = width;
218 | current_mode.h = height;
219 | current_mode.refresh_rate = 60; // Assume 60Hz for simplicity
220 | current_mode.driverdata = NULL;
221 |
222 | // Set up the display
223 | SDL_zero(display);
224 | display.desktop_mode = current_mode;
225 | display.current_mode = current_mode;
226 | display.driverdata = NULL;
227 |
228 | // Add the display to SDL's list of displays
229 | if (SDL_AddVideoDisplay(&display, SDL_FALSE) < 0) {
230 | SDL_SetError("Failed to add video display");
231 | return -1;
232 | }
233 |
234 | SDL_Log("SDL2 Dreamcast video initialized: %dx%d, RGB565", width, height);
235 | return 0;
236 | }
237 |
238 |
239 | void DREAMCAST_GetDisplayModes(_THIS, SDL_VideoDisplay *display) {
240 | SDL_DisplayMode mode;
241 | int refresh_rate = __sdl_dc_is_60hz ? 60 : 50;
242 |
243 | // Adding supported modes
244 | const int supported_modes[][2] = {
245 | {320, 240},
246 | {640, 480},
247 | {768, 480}
248 | };
249 |
250 | for (int i = 0; i < sizeof(supported_modes) / sizeof(supported_modes[0]); i++) {
251 | SDL_zero(mode);
252 | mode.w = supported_modes[i][0];
253 | mode.h = supported_modes[i][1];
254 | mode.format = SDL_PIXELFORMAT_RGB565; // Change as necessary
255 | mode.refresh_rate = refresh_rate;
256 | SDL_AddDisplayMode(display, &mode);
257 | }
258 |
259 | SDL_Log("Display modes for Dreamcast retrieved successfully.");
260 | }
261 |
262 | int DREAMCAST_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode) {
263 | int pixel_mode;
264 | int disp_mode = -1;
265 |
266 | // Determine the appropriate display mode
267 | if (__sdl_dc_is_60hz) {
268 | /* if (mode->w == 320 && mode->h == 240) {
269 | disp_mode = DM_320x240;
270 | } else if (mode->w == 640 && mode->h == 480) {*/
271 | disp_mode = DM_640x480;
272 | /*} else if (mode->w == 768 && mode->h == 480) {
273 | disp_mode = DM_768x480;
274 | }**/
275 | } else {
276 | /* if (mode->w == 320 && mode->h == 240) {
277 | disp_mode = DM_320x240_PAL;
278 | } else if (mode->w == 640 && mode->h == 480) {*/
279 | disp_mode = DM_640x480_PAL_IL;
280 | // }
281 | }
282 |
283 | if (disp_mode < 0) {
284 | SDL_SetError("Unsupported display mode");
285 | return -1;
286 | }
287 |
288 | // Determine pixel mode
289 | switch (mode->format) {
290 | case SDL_PIXELFORMAT_ARGB1555:
291 | pixel_mode = PM_RGB555;
292 | break;
293 | case SDL_PIXELFORMAT_RGB565:
294 | pixel_mode = PM_RGB565;
295 | break;
296 | case SDL_PIXELFORMAT_RGB888:
297 | pixel_mode = PM_RGB888;
298 | break;
299 | default:
300 | SDL_SetError("Unsupported pixel format");
301 | return -1;
302 | }
303 |
304 | // Set the video mode
305 | vid_set_mode(disp_mode, pixel_mode);
306 | SDL_Log("Display mode set to %dx%d @ %dHz", mode->w, mode->h, mode->refresh_rate);
307 | return 0;
308 | }
309 |
310 | void DREAMCAST_VideoQuit(_THIS)
311 | {
312 | #ifdef SDL_INPUT_LINUXEV
313 | SDL_EVDEV_Quit();
314 | #endif
315 | }
316 |
317 | #endif /* SDL_VIDEO_DRIVER_DREAMCAST */
318 |
319 | /* vi: set ts=4 sw=4 expandtab: */
320 |
--------------------------------------------------------------------------------
/tools/blade0942.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/tools/blade0942.zip
--------------------------------------------------------------------------------
/tools/dc_sdl12main.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #ifdef __XBOX__
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | static int SCREEN_WIDTH;
11 | static int SCREEN_HEIGHT;
12 | #endif
13 |
14 | #if CELESTE_P8_ENABLE_AUDIO
15 | #include "SDL_mixer.h"
16 | #endif
17 | #if SDL_MAJOR_VERSION >= 2
18 | #include "sdl20compat.inc.c"
19 | #else
20 | #define SDL_Log printf
21 | #endif
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include "celeste.h"
31 |
32 | #ifdef N3DS_DEBUG
33 | #include <3ds.h>
34 | #endif
35 |
36 | static void ErrLog(char* fmt, ...)
37 | {
38 | FILE* f = stderr;
39 | va_list ap;
40 |
41 | va_start(ap, fmt);
42 | vfprintf(f, fmt, ap);
43 | va_end(ap);
44 |
45 | if (f != stderr && f != stdout)
46 | {
47 | fclose(f);
48 | }
49 | }
50 |
51 | SDL_Surface* screen = NULL;
52 | SDL_Surface* gfx = NULL;
53 | SDL_Surface* font = NULL;
54 | #if CELESTE_P8_ENABLE_AUDIO
55 | Mix_Chunk* snd[64] = {NULL};
56 | Mix_Music* mus[6] = {NULL};
57 | #endif
58 |
59 | #define PICO8_W 128
60 | #define PICO8_H 128
61 |
62 | #if defined (__NGAGE__) || defined (__3DS__)
63 | static int scale = 1;
64 | #elif defined (__PSP__)
65 | static int scale = 2;
66 | #elif defined (NGAGE_DEBUG)
67 | static int scale = 3;
68 | #elif defined (__PSP__)
69 | static int scale = 2;
70 | #elif defined (__XBOX__)
71 | static int scale = 1;
72 | #elif defined (DREAMCAST)
73 | static int scale = 4;
74 | #else
75 | static int scale = 4;
76 | #endif
77 |
78 | #if defined (__PSP__)
79 | #define AUDIO_FREQ 44100
80 | #else
81 | #define AUDIO_FREQ 22050
82 | #endif
83 |
84 | static const SDL_Color base_palette[16] =
85 | {
86 | { 0x00, 0x00, 0x00 },
87 | { 0x1d, 0x2b, 0x53 },
88 | { 0x7e, 0x25, 0x53 },
89 | { 0x00, 0x87, 0x51 },
90 | { 0xab, 0x52, 0x36 },
91 | { 0x5f, 0x57, 0x4f },
92 | { 0xc2, 0xc3, 0xc7 },
93 | { 0xff, 0xf1, 0xe8 },
94 | { 0xff, 0x00, 0x4d },
95 | { 0xff, 0xa3, 0x00 },
96 | { 0xff, 0xec, 0x27 },
97 | { 0x00, 0xe4, 0x36 },
98 | { 0x29, 0xad, 0xff },
99 | { 0x83, 0x76, 0x9c },
100 | { 0xff, 0x77, 0xa8 },
101 | { 0xff, 0xcc, 0xaa }
102 | };
103 |
104 | static SDL_Color palette[16];
105 | static Uint32 map[16];
106 |
107 | #define getcolor(col) map[col % 16]
108 |
109 | static void SetPaletteEntry(char idx, char base_idx)
110 | {
111 | palette[idx] = base_palette[base_idx];
112 | map[idx] = SDL_MapRGB(screen->format, palette[idx].r, palette[idx].g, palette[idx].b);
113 | }
114 |
115 | static void RefreshPalette(void)
116 | {
117 | int i;
118 |
119 | for (i = 0; i < SDL_arraysize(map); i++)
120 | {
121 | map[i] = SDL_MapRGB(screen->format, palette[i].r, palette[i].g, palette[i].b);
122 | }
123 | }
124 |
125 | static void ResetPalette(void)
126 | {
127 | SDL_memcpy(palette, base_palette, sizeof palette);
128 | RefreshPalette();
129 | }
130 |
131 | static char* GetDataPath(char* path, int n, const char* fname)
132 | {
133 | #ifdef _WIN32
134 | char pathsep = '\\';
135 | #else
136 | char pathsep = '/';
137 | #endif //_WIN32
138 |
139 | #if defined (__NGAGE__)
140 | SDL_snprintf(path, n, "E:\\System\\Apps\\Celeste\\data\\%s", fname);
141 | #elif defined(__XBOX__)
142 | SDL_snprintf(path, n, "D:\\data\\%s", fname);
143 | #elif defined(DREAMCAST)
144 | SDL_snprintf(path, n, "/cd/data/%s", fname);
145 | #else
146 | SDL_snprintf(path, n, "data%c%s", pathsep, fname);
147 | #endif
148 |
149 | return path;
150 | }
151 |
152 | static Uint32 getpixel(SDL_Surface *surface, int x, int y)
153 | {
154 | int bpp = surface->format->BytesPerPixel;
155 | /* Here p is the address to the pixel we want to retrieve */
156 | Uint8 *p = (Uint8 *)surface->pixels + y * surface->pitch + x * bpp;
157 |
158 | switch(bpp)
159 | {
160 | case 1:
161 | return *p;
162 | case 2:
163 | return *(Uint16 *)p;
164 | case 3:
165 | if(SDL_BYTEORDER == SDL_BIG_ENDIAN)
166 | {
167 | return p[0] << 16 | p[1] << 8 | p[2];
168 | }
169 | else
170 | {
171 | return p[0] | p[1] << 8 | p[2] << 16;
172 | }
173 | case 4:
174 | return *(Uint32 *)p;
175 | default:
176 | return 0;
177 | }
178 | }
179 |
180 | static void loadbmpscale(char* filename, SDL_Surface** s)
181 | {
182 | SDL_Surface *surf = *s;
183 | char tmpath[4096];
184 | SDL_Surface* bmp;
185 | int w, h;
186 | unsigned char* data;
187 | int y;
188 |
189 | if (surf)
190 | {
191 | SDL_FreeSurface(surf), surf = *s = NULL;
192 | }
193 |
194 | bmp = SDL_LoadBMP(GetDataPath(tmpath, sizeof tmpath, filename));
195 | if (! bmp)
196 | {
197 | ErrLog("error loading bmp '%s': %s\n", filename, SDL_GetError());
198 | return;
199 | }
200 |
201 | w = bmp->w;
202 | h = bmp->h;
203 |
204 | surf = SDL_CreateRGBSurface(SDL_SWSURFACE, w*scale, h*scale, 8, 0,0,0,0);
205 | assert(surf != NULL);
206 | data = surf->pixels;
207 | /*memcpy((_S)->format->palette->colors, base_palette, 16*sizeof(SDL_Color));*/
208 | for (y = 0; y < h; y++)
209 | {
210 | int x;
211 | for (x = 0; x < w; x++)
212 | {
213 | unsigned char pix = getpixel(bmp, x, y);
214 | int i;
215 | for (i = 0; i < scale; i++)
216 | {
217 | int j;
218 | for (j = 0; j < scale; j++)
219 | {
220 | data[x*scale+i + (y*scale+j)*w*scale] = pix;
221 | }
222 | }
223 | }
224 | }
225 | SDL_FreeSurface(bmp);
226 | SDL_SetPalette(surf, SDL_PHYSPAL | SDL_LOGPAL, (SDL_Color*)base_palette, 0, 16);
227 | SDL_SetColorKey(surf, SDL_SRCCOLORKEY, 0);
228 |
229 | *s = surf;
230 | }
231 |
232 | #define LOGLOAD(w) SDL_Log("loading %s...", w)
233 | #define LOGDONE() SDL_Log("done")
234 |
235 | static void LoadData(void)
236 | {
237 | #if CELESTE_P8_ENABLE_AUDIO
238 | static const char sndids[] = {0,1,2,3,4,5,6,7,8,9,13,14,15,16,23,35,37,38,40,50,51,54,55};
239 | static const char musids[] = {0,10,20,30,40};
240 | int iid;
241 | #endif
242 | LOGLOAD("gfx.bmp");
243 | loadbmpscale("gfx.bmp", &gfx);
244 | LOGDONE();
245 |
246 | LOGLOAD("font.bmp");
247 | loadbmpscale("font.bmp", &font);
248 | LOGDONE();
249 |
250 | #if CELESTE_P8_ENABLE_AUDIO
251 | for (iid = 0; iid < sizeof sndids; iid++)
252 | {
253 | int id = sndids[iid];
254 | char fname[20];
255 | char path[4096];
256 |
257 | SDL_snprintf(fname, 20, "snd%i.wav", id);
258 | LOGLOAD(fname);
259 | GetDataPath(path, sizeof path, fname);
260 | snd[id] = Mix_LoadWAV(path);
261 | if (! snd[id])
262 | {
263 | ErrLog("snd%i: Mix_LoadMUS: %s\n", id, Mix_GetError());
264 | }
265 | LOGDONE();
266 | }
267 |
268 | for (iid = 0; iid < sizeof musids; iid++)
269 | {
270 | int id = musids[iid];
271 | char fname[20];
272 | char path[4096];
273 |
274 | SDL_snprintf(fname, 20, "mus%i.ogg", id);
275 | LOGLOAD(fname);
276 | GetDataPath(path, sizeof path, fname);
277 | mus[id/10] = Mix_LoadMUS(path);
278 | if (!mus[id/10])
279 | {
280 | ErrLog("mus%i: Mix_LoadMUS: %s\n", id, Mix_GetError());
281 | }
282 | LOGDONE();
283 | }
284 | #endif
285 | }
286 |
287 | #include "tilemap.h"
288 |
289 | static Uint16 buttons_state = 0;
290 |
291 | #define SDL_CHECK(r) do { \
292 | if (!(r)) { \
293 | ErrLog("%s:%i, fatal error: `%s` -> %s\n", \
294 | __FILE__, __LINE__, #r, SDL_GetError()); \
295 | exit(2); \
296 | } \
297 | } while(0)
298 |
299 | static void p8_rectfill(int x0, int y0, int x1, int y1, int col);
300 | static void p8_print(const char* str, int x, int y, int col);
301 |
302 | //on-screen display (for info, such as loading a state, toggling screenshake, toggling fullscreen, etc)
303 | static char osd_text[200] = "";
304 | static int osd_timer = 0;
305 |
306 | static void OSDset(const char* fmt, ...)
307 | {
308 | SDL_Log(">> OSDset\n");
309 | va_list ap;
310 | va_start(ap, fmt);
311 | SDL_vsnprintf(osd_text, sizeof osd_text, fmt, ap);
312 | osd_text[sizeof osd_text - 1] = '\0'; //make sure to add NUL terminator in case of truncation
313 | SDL_Log("%s", osd_text);
314 | osd_timer = 30;
315 | va_end(ap);
316 | }
317 |
318 | static void OSDdraw(void)
319 | {
320 | if (osd_timer > 0)
321 | {
322 | --osd_timer;
323 | }
324 |
325 | if (osd_timer > 0)
326 | {
327 | const int x = 4;
328 | const int y = 120 + (osd_timer < 10 ? 10-osd_timer : 0); //disappear by going below the screen
329 | p8_rectfill(x-2, y-2, x+4*(int)SDL_strlen(osd_text), y+6, 6); //outline
330 | p8_rectfill(x-1, y-1, x+4*(int)SDL_strlen(osd_text)-1, y+5, 0);
331 | p8_print(osd_text, x, y, 7);
332 | }
333 | }
334 |
335 | #if CELESTE_P8_ENABLE_AUDIO
336 | static Mix_Music* current_music = NULL;
337 | #endif
338 | static _Bool enable_screenshake = 1;
339 | static _Bool paused = 0;
340 | static _Bool running = 1;
341 | static void* initial_game_state = NULL;
342 | static void* game_state = NULL;
343 | #if CELESTE_P8_ENABLE_AUDIO
344 | static Mix_Music* game_state_music = NULL;
345 | #endif
346 | static void mainLoop(void);
347 | static FILE* TAS = NULL;
348 |
349 | int main(int argc, char** argv)
350 | {
351 | int pico8emu(CELESTE_P8_CALLBACK_TYPE call, ...);
352 | int videoflag = SDL_SWSURFACE | SDL_ANYFORMAT;
353 | int initflag = SDL_INIT_VIDEO;
354 | SDL_Log(">> Setup pico8emu\n");
355 | #if CELESTE_P8_ENABLE_AUDIO
356 | // int mixflag = MIX_INIT_OGG;
357 | int i;
358 | initflag |= SDL_INIT_AUDIO;
359 | #endif
360 | SDL_Log(">> Setup Audio\n");
361 | SDL_CHECK(SDL_Init(SDL_INIT_AUDIO) == 0); // DC
362 | #if SDL_MAJOR_VERSION >= 2 && ! defined (__NGAGE__) && ! defined (NGAGE_DEBUG)
363 | SDL_Log(">> Setup SDL_INIT_GAMECONTROLLER\n");
364 | SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER);
365 | SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile("gamecontrollerdb.txt", "rb"), 1);
366 | #endif
367 | #ifdef N3DS_DEBUG
368 | consoleInit(GFX_BOTTOM, NULL);
369 | #endif
370 | #if defined (__NGAGE__) || defined (NGAGE_DEBUG)
371 | SDL_Log("__NGAGE__\n");
372 | SDL_CHECK(screen = SDL_SetVideoMode(176 * scale, 208 * scale, 32, videoflag));
373 | #elif defined (__3DS__)
374 | SDL_Log("__3DS__\n");
375 | SDL_CHECK(screen = SDL_SetVideoMode(400, 240, 32, videoflag));
376 | #elif defined (__PSP__)
377 | SDL_Log("__PSP__\n");
378 | SDL_CHECK(screen = SDL_SetVideoMode(480, 272, 32, videoflag));
379 | #elif defined (__XBOX__)
380 | SDL_Log("__XBOX__\n");
381 | SDL_CHECK(screen = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, 32, videoflag));
382 | #elif defined (DREAMCAST)
383 | SDL_Log(">> Video DREAMCAST\n");
384 | SDL_CHECK(screen = SDL_SetVideoMode(PICO8_W*scale, PICO8_H*scale, 32, videoflag));
385 | #else
386 | SDL_Log(">> Video ANY\n");
387 | SDL_CHECK(screen = SDL_SetVideoMode(PICO8_W*scale, PICO8_H*scale, 32, videoflag));
388 | #endif
389 | SDL_WM_SetCaption("Celeste", NULL);
390 | #if CELESTE_P8_ENABLE_AUDIO
391 | SDL_Log(">> Setup Mix_OpenAudio\n");
392 | /*if (Mix_Init(mixflag) != mixflag) // DC
393 | {
394 | ErrLog("Mix_Init: %s\n", Mix_GetError());
395 | }*/
396 | if (Mix_OpenAudio(AUDIO_FREQ, AUDIO_S16SYS, 1, 1024) < 0)
397 | {
398 | ErrLog("Mix_Init: %s\n", Mix_GetError());
399 | }
400 | #endif
401 | ResetPalette();
402 | SDL_ShowCursor(0);
403 |
404 | if (argc > 1)
405 | {
406 | TAS = fopen(argv[1], "r");
407 | if (!TAS)
408 | {
409 | SDL_Log("couldn't open TAS file '%s': %s", argv[1], strerror(errno));
410 | }
411 | }
412 |
413 | SDL_Log("game state size %gkb", Celeste_P8_get_state_size()/1024.);
414 |
415 | SDL_Log("now loading...");
416 | goto skip_load;
417 |
418 | {
419 | const unsigned char loading_bmp[] = {
420 | 0x42, 0x4d, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00,
421 | 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x09, 0x00,
422 | 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00,
423 | 0x00, 0x00, 0x23, 0x2e, 0x00, 0x00, 0x23, 0x2e, 0x00, 0x00, 0x02, 0x00,
424 | 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x42, 0x47, 0x52, 0x73, 0x00, 0x00,
425 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
426 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
427 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
428 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
429 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
430 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00,
431 | 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
432 | 0x00, 0x00, 0x66, 0x3e, 0xf1, 0x24, 0xf0, 0x00, 0x00, 0x00, 0x49, 0x44,
433 | 0x92, 0x24, 0x90, 0x00, 0x00, 0x00, 0x49, 0x3c, 0x92, 0x24, 0x90, 0x00,
434 | 0x00, 0x00, 0x49, 0x04, 0x92, 0x24, 0x90, 0x00, 0x00, 0x00, 0x46, 0x38,
435 | 0xf0, 0x3c, 0xf0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x12, 0x00, 0x00, 0x00,
436 | 0x00, 0x00, 0xc0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00
437 | };
438 |
439 | SDL_RWops* rw = SDL_RWFromConstMem(loading_bmp, sizeof loading_bmp);
440 | SDL_Surface* loading = SDL_LoadBMP_RW(rw, 1);
441 | #if defined (__XBOX__)
442 | SDL_Rect rc = {45, 60};
443 | #elif defined (DREAMCAST)
444 | SDL_Rect rc = {60, 60};
445 | #else
446 | SDL_Rect rc = {60, 60};
447 | #endif
448 |
449 | if (!loading)
450 | {
451 | #if defined (__XBOX__)
452 | Sleep(1000);
453 | #elif defined (DREAMCAST)
454 | //goto skip_load;
455 | #endif
456 | goto skip_load;
457 | }
458 | SDL_Log("prepare laoding_bmp...");
459 | SDL_BlitSurface(loading, NULL, screen, &rc);
460 | SDL_Flip(screen);
461 | SDL_FreeSurface(loading);
462 | }
463 | skip_load:
464 |
465 | SDL_Log("skip_load...");
466 | LoadData();
467 |
468 | Celeste_P8_set_call_func(pico8emu);
469 |
470 | //for reset
471 | initial_game_state = SDL_malloc(Celeste_P8_get_state_size());
472 | if (initial_game_state)
473 | {
474 | Celeste_P8_save_state(initial_game_state);
475 | }
476 |
477 | if (TAS)
478 | {
479 | // a consistent seed for tas playback
480 | Celeste_P8_set_rndseed(8);
481 | }
482 | else
483 | {
484 | Celeste_P8_set_rndseed((unsigned)(time(NULL) + SDL_GetTicks()));
485 | }
486 |
487 | SDL_Log("Celeste_P8_init...");
488 | Celeste_P8_init();
489 |
490 | /*SDL_Log("ready");
491 | {
492 | SDL_Log("CCLESTE_START_FULLSCREEN...");
493 | FILE* start_fullscreen_f = fopen("ccleste-start-fullscreen.txt", "r");
494 | const char* start_fullscreen_v = SDL_getenv("CCLESTE_START_FULLSCREEN");
495 | if (start_fullscreen_f || (start_fullscreen_v && *start_fullscreen_v))
496 | {
497 | SDL_WM_ToggleFullScreen(screen);
498 | }
499 | if (start_fullscreen_f)
500 | {
501 | fclose(start_fullscreen_f);
502 | }
503 | }*/
504 |
505 | #if !defined(EMSCRIPTEN)
506 | while (running) {
507 | mainLoop();
508 | }
509 | #else
510 | #include
511 | //FIXME: this assumes that the display refreshes at 60Hz
512 | emscripten_set_main_loop(mainLoop, 0, 0);
513 | emscripten_set_main_loop_timing(EM_TIMING_RAF, 2);
514 | return 0;
515 | #endif
516 | SDL_Log("game_state...");
517 | if (game_state)
518 | {
519 | SDL_free(game_state);
520 | }
521 | if (initial_game_state)
522 | {
523 | SDL_free(initial_game_state);
524 | }
525 |
526 | SDL_FreeSurface(gfx);
527 | SDL_FreeSurface(font);
528 | #if CELESTE_P8_ENABLE_AUDIO
529 | for (i = 0; i < (sizeof snd)/(sizeof *snd); i++)
530 | {
531 | if (snd[i])
532 | {
533 | Mix_FreeChunk(snd[i]);
534 | }
535 | }
536 | for (i = 0; i < (sizeof mus)/(sizeof *mus); i++)
537 | {
538 | if (mus[i])
539 | {
540 | Mix_FreeMusic(mus[i]);
541 | }
542 | }
543 |
544 | Mix_CloseAudio();
545 | //Mix_Quit(); //DC
546 | #endif
547 | SDL_Quit();
548 | return 0;
549 | }
550 |
551 | #if SDL_MAJOR_VERSION >= 2
552 | /* These inputs aren't sent to the game. */
553 | enum {
554 | PSEUDO_BTN_SAVE_STATE = 6,
555 | PSEUDO_BTN_LOAD_STATE = 7,
556 | PSEUDO_BTN_EXIT = 8,
557 | PSEUDO_BTN_PAUSE = 9,
558 | };
559 | static void ReadGamepadInput(Uint16* out_buttons);
560 | #endif
561 |
562 | static void mainLoop(void)
563 | {
564 | const Uint8* kbstate = SDL_GetKeyState(NULL);
565 | static int reset_input_timer = 0;
566 | Uint16 prev_buttons_state = buttons_state;
567 | SDL_Event ev;
568 |
569 | //hold F9 (select+start+y) to reset
570 | if (initial_game_state != NULL && kbstate[SDLK_F9])
571 | {
572 | reset_input_timer++;
573 | if (reset_input_timer >= 30)
574 | {
575 | reset_input_timer=0;
576 | //reset
577 | OSDset("reset");
578 | paused = 0;
579 | Celeste_P8_load_state(initial_game_state);
580 | Celeste_P8_set_rndseed((unsigned)(time(NULL) + SDL_GetTicks()));
581 | #if CELESTE_P8_ENABLE_AUDIO
582 | Mix_HaltChannel(-1);
583 | Mix_HaltMusic();
584 | #endif
585 | Celeste_P8_init();
586 | }
587 | }
588 | else
589 | {
590 | reset_input_timer = 0;
591 | }
592 |
593 | prev_buttons_state = buttons_state;
594 | buttons_state = 0;
595 |
596 | #if SDL_MAJOR_VERSION >= 2 && ! defined (__NGAGE__) && ! defined (NGAGE_DEBUG)
597 | SDL_GameControllerUpdate();
598 | ReadGamepadInput(&buttons_state);
599 |
600 | if (!((prev_buttons_state >> PSEUDO_BTN_PAUSE) & 1) && (buttons_state >> PSEUDO_BTN_PAUSE) & 1)
601 | {
602 | goto toggle_pause;
603 | }
604 |
605 | if (!((prev_buttons_state >> PSEUDO_BTN_EXIT) & 1) && (buttons_state >> PSEUDO_BTN_EXIT) & 1)
606 | {
607 | goto press_exit;
608 | }
609 |
610 | if (!((prev_buttons_state >> PSEUDO_BTN_SAVE_STATE) & 1) && (buttons_state >> PSEUDO_BTN_SAVE_STATE) & 1)
611 | {
612 | goto save_state;
613 | }
614 |
615 | if (!((prev_buttons_state >> PSEUDO_BTN_LOAD_STATE) & 1) && (buttons_state >> PSEUDO_BTN_LOAD_STATE) & 1)
616 | {
617 | goto load_state;
618 | }
619 | #endif
620 |
621 | while (SDL_PollEvent(&ev))
622 | {
623 | switch (ev.type)
624 | {
625 | case SDL_QUIT:
626 | running = 0;
627 | break;
628 | case SDL_KEYDOWN:
629 | {
630 | #if SDL_MAJOR_VERSION >= 2
631 | if (ev.key.repeat) //no key repeat
632 | {
633 | break;
634 | }
635 | #endif
636 | if (ev.key.keysym.sym == SDLK_ESCAPE) //do pause
637 | {
638 | toggle_pause:
639 | #if CELESTE_P8_ENABLE_AUDIO
640 | if (paused)
641 | {
642 | Mix_Resume(-1);
643 | Mix_ResumeMusic();
644 | }
645 | else
646 | {
647 | Mix_Pause(-1);
648 | Mix_PauseMusic();
649 | }
650 | #endif
651 | paused = !paused;
652 | break;
653 | }
654 | else if (ev.key.keysym.sym == SDLK_DELETE) //exit
655 | {
656 | press_exit:
657 | running = 0;
658 |
659 | #if defined (__XBOX__)
660 | XReboot();
661 | #endif
662 |
663 | break;
664 | }
665 | else if (ev.key.keysym.sym == SDLK_F11 && !(kbstate[SDLK_LSHIFT] || kbstate[SDLK_ESCAPE]))
666 | {
667 | if (SDL_WM_ToggleFullScreen(screen)) //this doesn't work on windows..
668 | {
669 | OSDset("toggle fullscreen");
670 | }
671 | screen = SDL_GetVideoSurface();
672 | RefreshPalette();
673 | break;
674 | }
675 | else if (0 && ev.key.keysym.sym == SDLK_5)
676 | {
677 | Celeste_P8__DEBUG();
678 | break;
679 | }
680 | #if defined (__NGAGE__)
681 | else if (ev.key.keysym.sym == SDLK_s) //save state
682 | #else
683 | else if (ev.key.keysym.sym == SDLK_s && kbstate[SDLK_LSHIFT]) //save state
684 | #endif
685 | {
686 | save_state:
687 | game_state = game_state ? game_state : SDL_malloc(Celeste_P8_get_state_size());
688 | if (game_state)
689 | {
690 | OSDset("save state");
691 | Celeste_P8_save_state(game_state);
692 | #if CELESTE_P8_ENABLE_AUDIO
693 | game_state_music = current_music;
694 | #endif
695 | }
696 | break;
697 | }
698 | #if defined (__NGAGE__)
699 | else if (ev.key.keysym.sym == SDLK_d) //load state
700 | #else
701 | else if (ev.key.keysym.sym == SDLK_d && kbstate[SDLK_LSHIFT]) //load state
702 | #endif
703 | {
704 | load_state:
705 | if (game_state)
706 | {
707 | OSDset("load state");
708 | #if CELESTE_P8_ENABLE_AUDIO
709 | if (paused)
710 | {
711 | paused = 0;
712 | Mix_Resume(-1);
713 | Mix_ResumeMusic();
714 | }
715 | #endif
716 | Celeste_P8_load_state(game_state);
717 | #if CELESTE_P8_ENABLE_AUDIO
718 | if (current_music != game_state_music)
719 | {
720 | Mix_HaltMusic();
721 | current_music = game_state_music;
722 | if (game_state_music)
723 | {
724 | Mix_PlayMusic(game_state_music, -1);
725 | }
726 | }
727 | #endif
728 | }
729 | break;
730 | }
731 | else if (ev.key.keysym.sym == SDLK_e) //toggle screenshake (e / L+R)
732 | {
733 | enable_screenshake = !enable_screenshake;
734 | OSDset("screenshake: %s", enable_screenshake ? "on" : "off");
735 | }
736 | }
737 | break;
738 | }
739 | }
740 |
741 | if (! TAS)
742 | {
743 | if (kbstate[SDLK_LEFT]) buttons_state |= (1<<0);
744 | if (kbstate[SDLK_RIGHT]) buttons_state |= (1<<1);
745 | if (kbstate[SDLK_UP]) buttons_state |= (1<<2);
746 | if (kbstate[SDLK_DOWN]) buttons_state |= (1<<3);
747 | if (kbstate[SDLK_z] || kbstate[SDLK_c] || kbstate[SDLK_n]) buttons_state |= (1<<4);
748 | if (kbstate[SDLK_x] || kbstate[SDLK_v] || kbstate[SDLK_m]) buttons_state |= (1<<5);
749 | }
750 | else if (TAS && !paused)
751 | {
752 | static int t = 0;
753 | t++;
754 | if (t==1)
755 | {
756 | buttons_state = 1 << 4;
757 | }
758 | else if (t > 80)
759 | {
760 | int btn;
761 | fscanf(TAS, "%d,", &btn);
762 | buttons_state = btn;
763 | }
764 | else
765 | {
766 | buttons_state = 0;
767 | }
768 | }
769 |
770 | if (paused)
771 | {
772 | const int x0 = PICO8_W/2-3*4, y0 = 8;
773 |
774 | p8_rectfill(x0-1,y0-1, 6*4+x0+1,6+y0+1, 6);
775 | p8_rectfill(x0,y0, 6*4+x0,6+y0, 0);
776 | p8_print("paused", x0+1, y0+1, 7);
777 | }
778 | else
779 | {
780 | Celeste_P8_update();
781 | Celeste_P8_draw();
782 | }
783 | OSDdraw();
784 |
785 | SDL_Flip(screen);
786 |
787 | #ifdef EMSCRIPTEN //emscripten_set_main_loop already sets the fps
788 | SDL_Delay(1);
789 | #else
790 | {
791 | #if ! defined (__NGAGE__)
792 | static int t = 0;
793 | static unsigned frame_start = 0;
794 | unsigned frame_end = SDL_GetTicks();
795 | unsigned frame_time = frame_end-frame_start;
796 | unsigned target_millis;
797 | // frame timing for 30fps is 33.333... ms, but we only have integer granularity
798 | // so alternate between 33 and 34 ms, like [33,33,34,33,33,34,...] which averages out to 33.333...
799 | if (t < 2)
800 | {
801 | target_millis = 33;
802 | }
803 | else
804 | {
805 | target_millis = 34;
806 | }
807 |
808 | if (++t == 3)
809 | {
810 | t = 0;
811 | }
812 |
813 | if (frame_time < target_millis)
814 | {
815 | SDL_Delay(target_millis - frame_time);
816 | }
817 | frame_start = SDL_GetTicks();
818 | #endif
819 | }
820 | #endif
821 | }
822 |
823 | static int gettileflag(int, int);
824 | static void p8_line(int,int,int,int,unsigned char);
825 |
826 | //lots of code from https://github.com/SDL-mirror/SDL/blob/bc59d0d4a2c814900a506d097a381077b9310509/src/video/SDL_surface.c#L625
827 | //coordinates should be scaled already
828 | static inline void Xblit(SDL_Surface* src, SDL_Rect* srcrect, SDL_Surface* dst, SDL_Rect* dstrect, int color, int flipx, int flipy)
829 | {
830 | SDL_Rect fulldst;
831 | int srcx, srcy, w, h;
832 |
833 | assert(src && dst && !src->locked && !dst->locked);
834 | assert(src->format->BitsPerPixel == 8);
835 | assert(dst->format->BytesPerPixel == 2 || dst->format->BytesPerPixel == 4);
836 | /* If the destination rectangle is NULL, use the entire dest surface */
837 | if (!dstrect)
838 | {
839 | dstrect = (fulldst = (SDL_Rect){0,0,dst->w,dst->h}, &fulldst);
840 | }
841 |
842 | /* clip the source rectangle to the source surface */
843 | if (srcrect)
844 | {
845 | int maxw, maxh;
846 |
847 | srcx = srcrect->x;
848 | w = srcrect->w;
849 | if (srcx < 0)
850 | {
851 | w += srcx;
852 | dstrect->x -= srcx;
853 | srcx = 0;
854 | }
855 | maxw = src->w - srcx;
856 | if (maxw < w)
857 | {
858 | w = maxw;
859 | }
860 |
861 | srcy = srcrect->y;
862 | h = srcrect->h;
863 | if (srcy < 0)
864 | {
865 | h += srcy;
866 | dstrect->y -= srcy;
867 | srcy = 0;
868 | }
869 | maxh = src->h - srcy;
870 | if (maxh < h)
871 | {
872 | h = maxh;
873 | }
874 |
875 | }
876 | else
877 | {
878 | srcx = srcy = 0;
879 | w = src->w;
880 | h = src->h;
881 | }
882 |
883 | /* clip the destination rectangle against the clip rectangle */
884 | {
885 | SDL_Rect *clip = &dst->clip_rect;
886 | int dx, dy;
887 |
888 | dx = clip->x - dstrect->x;
889 | if (dx > 0)
890 | {
891 | w -= dx;
892 | dstrect->x += dx;
893 | srcx += dx;
894 | }
895 | dx = dstrect->x + w - clip->x - clip->w;
896 | if (dx > 0)
897 | {
898 | w -= dx;
899 | }
900 |
901 | dy = clip->y - dstrect->y;
902 | if (dy > 0)
903 | {
904 | h -= dy;
905 | dstrect->y += dy;
906 | srcy += dy;
907 | }
908 | dy = dstrect->y + h - clip->y - clip->h;
909 | if (dy > 0)
910 | {
911 | h -= dy;
912 | }
913 | }
914 |
915 | if (w && h)
916 | {
917 | unsigned char* srcpix = src->pixels;
918 | int srcpitch = src->pitch;
919 | int x, y;
920 | #define _blitter(dsttype, dp, xflip) do { \
921 | dsttype* dstpix = dst->pixels; \
922 | for (y = 0; y < h; y++) \
923 | { \
924 | for (x = 0; x < w; x++) \
925 | { \
926 | unsigned char p = srcpix[!xflip ? srcx+x+(srcy+y)*srcpitch : srcx+(w-x-1)+(srcy+y)*srcpitch]; \
927 | if (p) dstpix[dstrect->x+x + (dstrect->y+y)*dst->w] = getcolor(dp); \
928 | } \
929 | } \
930 | } while(0)
931 | if (screen->format->BytesPerPixel == 2 && color && flipx)
932 | {
933 | _blitter(Uint16, color, 1);
934 | }
935 | else if (screen->format->BytesPerPixel == 2 && !color && flipx)
936 | {
937 | _blitter(Uint16, p, 1);
938 | }
939 | else if (screen->format->BytesPerPixel == 2 && color && !flipx)
940 | {
941 | _blitter(Uint16, color, 0);
942 | }
943 | else if (screen->format->BytesPerPixel == 2 && !color && !flipx)
944 | {
945 | _blitter(Uint16, p, 0);
946 | }
947 | else if (screen->format->BytesPerPixel == 4 && color && flipx)
948 | {
949 | _blitter(Uint32, color, 1);
950 | }
951 | else if (screen->format->BytesPerPixel == 4 && !color && flipx)
952 | {
953 | _blitter(Uint32, p, 1);
954 | }
955 | else if (screen->format->BytesPerPixel == 4 && color && !flipx)
956 | {
957 | _blitter(Uint32, color, 0);
958 | }
959 | else if (screen->format->BytesPerPixel == 4 && !color && !flipx)
960 | {
961 | _blitter(Uint32, p, 0);
962 | }
963 | #undef _blitter
964 | }
965 | }
966 |
967 | static void p8_rectfill(int x0, int y0, int x1, int y1, int col)
968 | {
969 | int w = (x1 - x0 + 1)*scale;
970 | int h = (y1 - y0 + 1)*scale;
971 | if (w > 0 && h > 0)
972 | {
973 | SDL_Rect rc = {x0*scale,y0*scale, w,h};
974 | SDL_FillRect(screen, &rc, getcolor(col));
975 | }
976 | }
977 |
978 | static void p8_print(const char* str, int x, int y, int col)
979 | {
980 | char c;
981 | for (c = *str; c; c = *(++str))
982 | {
983 | SDL_Rect srcrc;
984 | SDL_Rect dstrc;
985 | c &= 0x7F;
986 | srcrc.x = 8*(c%16);
987 | srcrc.y = 8*(c/16);
988 | srcrc.x *= scale;
989 | srcrc.y *= scale;
990 | srcrc.w = srcrc.h = 8*scale;
991 |
992 | dstrc.x = x*scale;
993 | dstrc.y = y*scale;
994 | dstrc.w = scale;
995 | dstrc.h = scale;
996 |
997 | Xblit(font, &srcrc, screen, &dstrc, col, 0,0);
998 | x += 4;
999 | }
1000 | }
1001 |
1002 | int pico8emu(CELESTE_P8_CALLBACK_TYPE call, ...) {
1003 | static int camera_x = 0, camera_y = 0;
1004 | va_list args;
1005 | int ret = 0;
1006 |
1007 | if (!enable_screenshake)
1008 | {
1009 | camera_x = camera_y = 0;
1010 | }
1011 |
1012 | va_start(args, call);
1013 |
1014 | #define INT_ARG() va_arg(args, int)
1015 | #define BOOL_ARG() (Celeste_P8_bool_t)va_arg(args, int)
1016 | #define RET_INT(_i) do {ret = (_i); goto end;} while (0)
1017 | #define RET_BOOL(_b) RET_INT(!!(_b))
1018 |
1019 | switch (call)
1020 | {
1021 | case CELESTE_P8_MUSIC: //music(idx,fade,mask)
1022 | {
1023 | #if CELESTE_P8_ENABLE_AUDIO
1024 | int index = INT_ARG();
1025 | int fade = INT_ARG();
1026 | int mask = INT_ARG();
1027 |
1028 | (void)mask; //we do not care about this since sdl mixer keeps sounds and music separate
1029 |
1030 | if (index == -1) { //stop playing
1031 | Mix_FadeOutMusic(fade);
1032 | current_music = NULL;
1033 | }
1034 | else if (mus[index/10])
1035 | {
1036 | Mix_Music* musi = mus[index/10];
1037 | current_music = musi;
1038 | Mix_FadeInMusic(musi, -1, fade);
1039 | //Mix_LoadMUS(musi)
1040 | }
1041 | #endif
1042 | break;
1043 | }
1044 | case CELESTE_P8_SPR: //spr(sprite,x,y,cols,rows,flipx,flipy)
1045 | {
1046 | int sprite = INT_ARG();
1047 | int x = INT_ARG();
1048 | int y = INT_ARG();
1049 | int cols = INT_ARG();
1050 | int rows = INT_ARG();
1051 | int flipx = BOOL_ARG();
1052 | int flipy = BOOL_ARG();
1053 |
1054 | (void)cols;
1055 | (void)rows;
1056 |
1057 | assert(rows == 1 && cols == 1);
1058 |
1059 | if (sprite >= 0)
1060 | {
1061 | SDL_Rect srcrc = {
1062 | 8*(sprite % 16),
1063 | 8*(sprite / 16)
1064 | };
1065 | SDL_Rect dstrc =
1066 | {
1067 | (x - camera_x)*scale, (y - camera_y)*scale,
1068 | scale, scale
1069 | };
1070 | srcrc.x *= scale;
1071 | srcrc.y *= scale;
1072 | srcrc.w = srcrc.h = scale*8;
1073 | Xblit(gfx, &srcrc, screen, &dstrc, 0,flipx,flipy);
1074 | }
1075 | break;
1076 | }
1077 | case CELESTE_P8_BTN: //btn(b)
1078 | {
1079 | int b = INT_ARG();
1080 | assert(b >= 0 && b <= 5);
1081 | RET_BOOL(buttons_state & (1 << b));
1082 | break;
1083 | }
1084 | case CELESTE_P8_SFX: //sfx(id)
1085 | {
1086 | #if CELESTE_P8_ENABLE_AUDIO
1087 | int id = INT_ARG();
1088 |
1089 | if (id < (sizeof snd) / (sizeof*snd) && snd[id])
1090 | {
1091 | Mix_PlayChannel(-1, snd[id], 0);
1092 | }
1093 | #endif
1094 | break;
1095 | }
1096 | case CELESTE_P8_PAL: //pal(a,b)
1097 | {
1098 | int a = INT_ARG();
1099 | int b = INT_ARG();
1100 | if (a >= 0 && a < 16 && b >= 0 && b < 16)
1101 | {
1102 | //swap palette colors
1103 | SetPaletteEntry(a, b);
1104 | }
1105 | break;
1106 | }
1107 | case CELESTE_P8_PAL_RESET: //pal()
1108 | {
1109 | ResetPalette();
1110 | break;
1111 | }
1112 | case CELESTE_P8_CIRCFILL: //circfill(x,y,r,col)
1113 | {
1114 | int cx = INT_ARG() - camera_x;
1115 | int cy = INT_ARG() - camera_y;
1116 | int r = INT_ARG();
1117 | int col = INT_ARG();
1118 | int realcolor = getcolor(col);
1119 |
1120 | if (r <= 1)
1121 | {
1122 | SDL_Rect rect_a = {scale*(cx-1), scale*cy, scale*3, scale};
1123 | SDL_Rect rect_b = {scale*cx, scale*(cy-1), scale, scale*3};
1124 |
1125 | SDL_FillRect(screen, &rect_a, realcolor);
1126 | SDL_FillRect(screen, &rect_b, realcolor);
1127 | }
1128 | else if (r <= 2)
1129 | {
1130 | SDL_Rect rect_a = {scale*(cx-2), scale*(cy-1), scale*5, scale*3};
1131 | SDL_Rect rect_b = {scale*(cx-1), scale*(cy-2), scale*3, scale*5};
1132 |
1133 | SDL_FillRect(screen, &rect_a, realcolor);
1134 | SDL_FillRect(screen, &rect_b, realcolor);
1135 | }
1136 | else if (r <= 3)
1137 | {
1138 | SDL_Rect rect_a = {scale*(cx-3), scale*(cy-1), scale*7, scale*3};
1139 | SDL_Rect rect_b = {scale*(cx-1), scale*(cy-3), scale*3, scale*7};
1140 | SDL_Rect rect_c = {scale*(cx-2), scale*(cy-2), scale*5, scale*5};
1141 |
1142 | SDL_FillRect(screen, &rect_a, realcolor);
1143 | SDL_FillRect(screen, &rect_b, realcolor);
1144 | SDL_FillRect(screen, &rect_c, realcolor);
1145 | }
1146 | else //i dont think the game uses this
1147 | {
1148 | int f = 1 - r; //used to track the progress of the drawn circle (since its semi-recursive)
1149 | int ddFx = 1; //step x
1150 | int ddFy = -2 * r; //step y
1151 | int x = 0;
1152 | int y = r;
1153 |
1154 | //this algorithm doesn't account for the diameters
1155 | //so we have to set them manually
1156 | p8_line(cx,cy-y, cx,cy+r, col);
1157 | p8_line(cx+r,cy, cx-r,cy, col);
1158 |
1159 | while (x < y)
1160 | {
1161 | if (f >= 0)
1162 | {
1163 | y--;
1164 | ddFy += 2;
1165 | f += ddFy;
1166 | }
1167 | x++;
1168 | ddFx += 2;
1169 | f += ddFx;
1170 |
1171 | //build our current arc
1172 | p8_line(cx+x,cy+y, cx-x,cy+y, col);
1173 | p8_line(cx+x,cy-y, cx-x,cy-y, col);
1174 | p8_line(cx+y,cy+x, cx-y,cy+x, col);
1175 | p8_line(cx+y,cy-x, cx-y,cy-x, col);
1176 | }
1177 | }
1178 | break;
1179 | }
1180 | case CELESTE_P8_PRINT: //print(str,x,y,col)
1181 | {
1182 | const char* str = va_arg(args, const char*);
1183 | int x = INT_ARG() - camera_x;
1184 | int y = INT_ARG() - camera_y;
1185 | int col = INT_ARG() % 16;
1186 |
1187 | p8_print(str,x,y,col);
1188 | break;
1189 | }
1190 | case CELESTE_P8_RECTFILL: //rectfill(x0,y0,x1,y1,col)
1191 | {
1192 | int x0 = INT_ARG() - camera_x;
1193 | int y0 = INT_ARG() - camera_y;
1194 | int x1 = INT_ARG() - camera_x;
1195 | int y1 = INT_ARG() - camera_y;
1196 | int col = INT_ARG();
1197 |
1198 | p8_rectfill(x0,y0,x1,y1,col);
1199 | break;
1200 | }
1201 | case CELESTE_P8_LINE: //line(x0,y0,x1,y1,col)
1202 | {
1203 | int x0 = INT_ARG() - camera_x;
1204 | int y0 = INT_ARG() - camera_y;
1205 | int x1 = INT_ARG() - camera_x;
1206 | int y1 = INT_ARG() - camera_y;
1207 | int col = INT_ARG();
1208 |
1209 | p8_line(x0,y0,x1,y1,col);
1210 | break;
1211 | }
1212 | case CELESTE_P8_MGET: //mget(tx,ty)
1213 | {
1214 | int tx = INT_ARG();
1215 | int ty = INT_ARG();
1216 |
1217 | RET_INT(tilemap_data[tx+ty*128]);
1218 | break;
1219 | }
1220 | case CELESTE_P8_CAMERA: //camera(x,y)
1221 | {
1222 | if (enable_screenshake)
1223 | {
1224 | camera_x = INT_ARG();
1225 | camera_y = INT_ARG();
1226 | }
1227 | break;
1228 | }
1229 | case CELESTE_P8_FGET: //fget(tile,flag)
1230 | {
1231 | int tile = INT_ARG();
1232 | int flag = INT_ARG();
1233 |
1234 | RET_INT(gettileflag(tile, flag));
1235 | break;
1236 | }
1237 | case CELESTE_P8_MAP: //map(mx,my,tx,ty,mw,mh,mask)
1238 | {
1239 | int mx = INT_ARG(), my = INT_ARG();
1240 | int tx = INT_ARG(), ty = INT_ARG();
1241 | int mw = INT_ARG(), mh = INT_ARG();
1242 | int mask = INT_ARG();
1243 | int x, y;
1244 |
1245 | for (x = 0; x < mw; x++)
1246 | {
1247 | for (y = 0; y < mh; y++)
1248 | {
1249 | int tile = tilemap_data[x + mx + (y + my)*128];
1250 | //hack
1251 | if (mask == 0 || (mask == 4 && tile_flags[tile] == 4) || gettileflag(tile, mask != 4 ? mask-1 : mask))
1252 | {
1253 | SDL_Rect srcrc =
1254 | {
1255 | 8*(tile % 16),
1256 | 8*(tile / 16)
1257 | };
1258 | SDL_Rect dstrc =
1259 | {
1260 | (tx+x*8 - camera_x)*scale, (ty+y*8 - camera_y)*scale,
1261 | scale*8, scale*8
1262 | };
1263 | srcrc.x *= scale;
1264 | srcrc.y *= scale;
1265 | srcrc.w = srcrc.h = scale*8;
1266 |
1267 | /*
1268 | if (0)
1269 | {
1270 | srcrc.x = srcrc.y = 0;
1271 | srcrc.w = srcrc.h = 8;
1272 | dstrc.x = x*8, dstrc.y = y*8;
1273 | dstrc.w = dstrc.h = 8;
1274 | }
1275 | */
1276 |
1277 | Xblit(gfx, &srcrc, screen, &dstrc, 0, 0, 0);
1278 | }
1279 | }
1280 | }
1281 | break;
1282 | }
1283 | }
1284 |
1285 | end:
1286 | va_end(args);
1287 | return ret;
1288 | }
1289 |
1290 | static int gettileflag(int tile, int flag)
1291 | {
1292 | return tile < sizeof(tile_flags)/sizeof(*tile_flags) && (tile_flags[tile] & (1 << flag)) != 0;
1293 | }
1294 |
1295 | //coordinates should NOT be scaled before calling this
1296 | static void p8_line(int x0, int y0, int x1, int y1, unsigned char color)
1297 | {
1298 | Uint32 realcolor = getcolor(color);
1299 | int sx, sy, dx, dy, err;
1300 | SDL_Rect rect;
1301 |
1302 | #define CLAMP(v,min,max) v = v < min ? min : v >= max ? max-1 : v;
1303 | CLAMP(x0,0,screen->w);
1304 | CLAMP(y0,0,screen->h);
1305 | CLAMP(x1,0,screen->w);
1306 | CLAMP(y1,0,screen->h);
1307 |
1308 | #undef CLAMP
1309 | #define PLOT(xa, ya) \
1310 | rect.x = xa * scale; \
1311 | rect.y = ya * scale; \
1312 | rect.w = scale; \
1313 | rect.h = scale; \
1314 | do { \
1315 | SDL_FillRect(screen, &rect, realcolor); \
1316 | } \
1317 | while (0)
1318 | dx = abs(x1 - x0);
1319 | dy = abs(y1 - y0);
1320 | if (!dx && !dy)
1321 | {
1322 | return;
1323 | }
1324 |
1325 | if (x0 < x1)
1326 | {
1327 | sx = 1;
1328 | }
1329 | else
1330 | {
1331 | sx = -1;
1332 | }
1333 | if (y0 < y1)
1334 | {
1335 | sy = 1;
1336 | }
1337 | else
1338 | {
1339 | sy = -1;
1340 | }
1341 | err = dx - dy;
1342 | if (!dy && !dx)
1343 | {
1344 | return;
1345 | }
1346 | else if (!dx) //vertical line
1347 | {
1348 | int y;
1349 | for (y = y0; y != y1; y += sy)
1350 | {
1351 | PLOT(x0,y);
1352 | }
1353 | }
1354 | else if (!dy) //horizontal line
1355 | {
1356 | int x;
1357 | for (x = x0; x != x1; x += sx)
1358 | {
1359 | PLOT(x,y0);
1360 | }
1361 | }
1362 |
1363 | while (x0 != x1 || y0 != y1)
1364 | {
1365 | int e2;
1366 | PLOT(x0, y0);
1367 | e2 = 2 * err;
1368 | if (e2 > -dy)
1369 | {
1370 | err -= dy;
1371 | x0 += sx;
1372 | }
1373 | if (e2 < dx)
1374 | {
1375 | err += dx;
1376 | y0 += sy;
1377 | }
1378 | }
1379 | #undef PLOT
1380 | }
1381 |
1382 | #if SDL_MAJOR_VERSION >= 2 && ! defined (__NGAGE__)
1383 | //SDL2: read input from connected gamepad
1384 |
1385 | struct mapping
1386 | {
1387 | SDL_GameControllerButton sdl_btn;
1388 | Uint16 pico8_btn;
1389 | };
1390 |
1391 | static const char* pico8_btn_names[] =
1392 | {
1393 | "left", "right", "up", "down", "jump", "dash", "save", "load", "exit", "pause"
1394 | };
1395 |
1396 | // initialized with default mapping
1397 | static struct mapping controller_mappings[30] =
1398 | {
1399 | { SDL_CONTROLLER_BUTTON_DPAD_LEFT, 0 }, //left
1400 | { SDL_CONTROLLER_BUTTON_DPAD_RIGHT, 1 }, //right
1401 | { SDL_CONTROLLER_BUTTON_DPAD_UP, 2 }, //up
1402 | { SDL_CONTROLLER_BUTTON_DPAD_DOWN, 3 }, //down
1403 | { SDL_CONTROLLER_BUTTON_A, 4 }, //jump
1404 | { SDL_CONTROLLER_BUTTON_B, 5 }, //dash
1405 |
1406 | { SDL_CONTROLLER_BUTTON_LEFTSHOULDER, PSEUDO_BTN_SAVE_STATE }, //save
1407 | { SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, PSEUDO_BTN_LOAD_STATE }, //load
1408 | { SDL_CONTROLLER_BUTTON_GUIDE, PSEUDO_BTN_EXIT }, //exit
1409 | { SDL_CONTROLLER_BUTTON_BACK, PSEUDO_BTN_EXIT }, //exit
1410 | { SDL_CONTROLLER_BUTTON_START, PSEUDO_BTN_PAUSE }, //pause
1411 | { 0xff, 0xff }
1412 | };
1413 |
1414 | static const Uint16 stick_deadzone = 32767 / 2; //about half
1415 |
1416 | static void ReadGamepadInput(Uint16* out_buttons)
1417 | {
1418 | static _Bool read_config = 0;
1419 | //static SDL_GameController* controller = NULL;
1420 | static SDL_GameController* controller = NULL;
1421 | Sint16 x_axis;
1422 | Sint16 y_axis;
1423 | int i;
1424 |
1425 | if (!read_config)
1426 | {
1427 | FILE* cfg;
1428 | const char* cfg_file_path = SDL_getenv("CCLESTE_INPUT_CFG_PATH");
1429 |
1430 | read_config = 1;
1431 |
1432 | if (!cfg_file_path)
1433 | {
1434 | cfg_file_path = "/cd/data/ccleste-input-cfg.txt";
1435 | SDL_Log("input cfg: %s", cfg_file_path);
1436 | }
1437 | cfg = fopen(cfg_file_path, "r");
1438 | if (cfg)
1439 | {
1440 | SDL_Log(">> opening input cfg");
1441 | for (i = 0; i < sizeof controller_mappings / sizeof *controller_mappings - 1;)
1442 | {
1443 | char line[150], p8btn[31], sdlbtn[31];
1444 | fgets(line, sizeof line - 1, cfg);
1445 | if (feof(cfg) || ferror(cfg))
1446 | {
1447 | break;
1448 | }
1449 | line[sizeof line - 1] = 0;
1450 | if (*line == '#')
1451 | {
1452 | //comment
1453 | }
1454 | else if (sscanf(line, "%30s %30s", p8btn, sdlbtn) == 2)
1455 | {
1456 | int btn;
1457 | p8btn[sizeof p8btn - 1] = sdlbtn[sizeof sdlbtn - 1] = 0;
1458 | for (btn = 0; btn < sizeof pico8_btn_names / sizeof *pico8_btn_names; btn++)
1459 | {
1460 | if (!SDL_strcasecmp(pico8_btn_names[btn], p8btn))
1461 | {
1462 | SDL_Log("input cfg: %s -> %s", p8btn, sdlbtn);
1463 | controller_mappings[i].sdl_btn = SDL_GameControllerGetButtonFromString(sdlbtn);
1464 | controller_mappings[i].pico8_btn = btn;
1465 | i++;
1466 | }
1467 | }
1468 | }
1469 | }
1470 | controller_mappings[i].pico8_btn = 0xFF;
1471 | fclose(cfg);
1472 | }
1473 | else
1474 | {
1475 | cfg = fopen(cfg_file_path, "w");
1476 | if (cfg)
1477 | {
1478 | struct mapping* mapping;
1479 | SDL_Log("creating ccleste-input-cfg.txt with default button mappings");
1480 | fprintf(cfg, "# in-game \tcontroller\n");
1481 | for (mapping = controller_mappings; mapping->pico8_btn != 0xFF; mapping++)
1482 | {
1483 | fprintf(cfg, "%s \t%s\n", pico8_btn_names[mapping->pico8_btn], SDL_GameControllerGetStringForButton(mapping->sdl_btn));
1484 | }
1485 | fclose(cfg);
1486 | }
1487 | }
1488 | }
1489 |
1490 | if (!controller)
1491 | {
1492 | static int tries_left = 30;
1493 | //use first available controller
1494 | int count = SDL_NumJoysticks();
1495 |
1496 | if (! tries_left)
1497 | {
1498 | return;
1499 | }
1500 | tries_left--;
1501 |
1502 | //SDL_Log("sdl reports %i controllers", count);
1503 | //SDL_Log(">> Detecting connected controllers ... ");
1504 | for (i = 0; i < count; i++)
1505 | {
1506 |
1507 | //SDL_Log(">> controller found!");
1508 | controller = SDL_JoystickOpen(0);
1509 | if (!controller) {
1510 | SDL_Log("Unable to open joystick: %s", SDL_GetError());
1511 | return;
1512 | }
1513 |
1514 | /*if (SDL_IsGameController(i))
1515 | {
1516 | SDL_Log(">> controller found!");
1517 | controller = SDL_GameControllerOpen(i);
1518 | if (!controller)
1519 | {
1520 | fprintf(stderr, "error opening controller: %s\n", SDL_GetError());
1521 | return;
1522 | }
1523 | SDL_Log("picked controller: '%s'", SDL_GameControllerName(controller));
1524 | break;
1525 | }*/
1526 | }
1527 | }
1528 |
1529 | //pico 8 buttons and pseudo buttons
1530 | for (i = 0; i < sizeof(controller_mappings) / sizeof(*controller_mappings); i++)
1531 | {
1532 | //SDL_Log(">> controller_mappings");
1533 | struct mapping mapping = controller_mappings[i];
1534 | _Bool pressed;
1535 | Uint16 mask;
1536 |
1537 | if (mapping.pico8_btn == 0xFF) {
1538 | break;
1539 | }
1540 |
1541 | // Check if the button is pressed
1542 | pressed = SDL_JoystickGetButton(controller, mapping.sdl_btn);
1543 |
1544 | // Log the button state
1545 | /*SDL_Log("Button mapped to pico8_btn %d (SDL button %d): %s",
1546 | mapping.pico8_btn,
1547 | mapping.sdl_btn,
1548 | pressed ? "PRESSED" : "RELEASED");*/
1549 |
1550 | // Update the out_buttons bitmask
1551 | mask = ~(1 << mapping.pico8_btn);
1552 | *out_buttons = (*out_buttons & mask) | (pressed << mapping.pico8_btn);
1553 | }
1554 |
1555 | // Joystick -> D-Pad
1556 | x_axis = SDL_JoystickGetAxis(controller, 0);
1557 | y_axis = SDL_JoystickGetAxis(controller, 1);
1558 |
1559 | if (x_axis < -stick_deadzone) { // left
1560 | SDL_Log(">> joystick left!");
1561 | *out_buttons |= (1 << 0);
1562 | }
1563 | if (x_axis > stick_deadzone) { // right
1564 | SDL_Log(">> joystick right!");
1565 | *out_buttons |= (1 << 1);
1566 | }
1567 | if (y_axis < -stick_deadzone) { // up
1568 | SDL_Log(">> joystick up!");
1569 | *out_buttons |= (1 << 2);
1570 | }
1571 | if (y_axis > stick_deadzone) { // down
1572 | SDL_Log(">> joystick down!");
1573 | *out_buttons |= (1 << 3);
1574 | }
1575 | /*for (i = 0; i < sizeof controller_mappings / sizeof *controller_mappings; i++)
1576 | {
1577 | //SDL_Log(">> controller_mappings");
1578 | struct mapping mapping = controller_mappings[i];
1579 | _Bool pressed;
1580 | Uint16 mask;
1581 | if (mapping.pico8_btn == 0xFF)
1582 | {
1583 | break;
1584 | }
1585 | pressed = SDL_GameControllerGetButton(controller, mapping.sdl_btn);
1586 | mask = ~(1 << mapping.pico8_btn);
1587 | *out_buttons = (*out_buttons & mask) | (pressed << mapping.pico8_btn);
1588 | }
1589 |
1590 | //joystick -> dpad input
1591 | x_axis = SDL_GameControllerGetAxis(controller, SDL_CONTROLLER_AXIS_LEFTX);
1592 | y_axis = SDL_GameControllerGetAxis(controller, SDL_CONTROLLER_AXIS_LEFTY);
1593 | if (x_axis < -stick_deadzone) //left
1594 | {
1595 | SDL_Log(">> controller left!");
1596 | *out_buttons |= (1 << 0);
1597 | }
1598 | if (x_axis > stick_deadzone) //right
1599 | {
1600 | SDL_Log(">> controller right!");
1601 | *out_buttons |= (1 << 1);
1602 | }
1603 | if (y_axis < -stick_deadzone) //up
1604 | {
1605 | SDL_Log(">> controller up!");
1606 | *out_buttons |= (1 << 2);
1607 | }
1608 | if (y_axis > stick_deadzone) //down
1609 | {
1610 | SDL_Log(">> controller down!");
1611 | *out_buttons |= (1 << 3);
1612 | }*/
1613 | }
1614 | #endif
1615 |
--------------------------------------------------------------------------------
/tools/libdiscimage.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/tools/libdiscimage.a
--------------------------------------------------------------------------------
/tools/mkdcdisc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Memorix101/ccleste-dreamcast/0ccd68c0feb548e50053a6026b06aaff52263575/tools/mkdcdisc
--------------------------------------------------------------------------------
/vmu0.xpm:
--------------------------------------------------------------------------------
1 | /* XPM */
2 | static char * graphic_xpm[] = {
3 | /* columns rows colors chars-per-pixel */
4 | "44 44 2 1 ",
5 | " c black",
6 | ". c white",
7 | /* pixels */
8 | "................................................",
9 | "................................................",
10 | "................................................",
11 | "................................................",
12 | "................................................",
13 | "................................................",
14 | "................................................",
15 | "................................................",
16 | "................................................",
17 | "................................................",
18 | "................................................",
19 | "................................................",
20 | "................................................",
21 | "................................................",
22 | "................................................",
23 | "............ .. .. ...... . ........",
24 | "........... . . ...... ........",
25 | "........... ... . ...... ....... .........",
26 | "........... ...... .... ...... ........",
27 | "........... ... . ...... .... . ........",
28 | "........... . .. ... ..........",
29 | "............ .. . ... ..........",
30 | "................................................",
31 | "......... ... .. .. .........",
32 | "......... . . . ........",
33 | "......... ...... ........ .... .............",
34 | "......... .... ... .... ...........",
35 | "......... ............ ... .... .............",
36 | "......... .. ... .... .........",
37 | "......... .. .... .... ........",
38 | "................................................",
39 | "................................................",
40 | "................................................",
41 | "................................................",
42 | "................................................",
43 | "................................................",
44 | "................................................",
45 | "................................................",
46 | "................................................",
47 | "................................................",
48 | "................................................",
49 | "................................................",
50 | "................................................",
51 | "................................................"};
--------------------------------------------------------------------------------