├── .gitattributes ├── .github └── workflows │ └── build.yaml ├── BUGS ├── COMPILE.windows ├── LICENSE ├── Makefile ├── Makefile.windows ├── README ├── bmp.c ├── bmp.h ├── bottom.c ├── bottom.h ├── cursors.h ├── draw.c ├── draw.h ├── examples ├── 3d.mega ├── astro.mega ├── bob.mega ├── cube.mega ├── f1.mega ├── f2.mega ├── f3.mega ├── f4.mega ├── floppy.mega ├── goodhello.mega ├── house.mega ├── inyear.mega ├── keen.mega ├── keenback.mega ├── keenlook.mega ├── keenwatch.mega ├── m4.mega ├── metal.mega ├── on_fire.mega ├── phone1.mega ├── ship.mega ├── ship2.mega ├── sigflup.mega ├── sonic.mega ├── sonic2.mega ├── tile.mega ├── vaxback.mega └── vr.mega ├── gui ├── BUGS ├── COPYING ├── Makefile ├── Makefile.windows ├── TODO ├── bknob.xpm ├── bknob_point.xpm ├── csig ├── draw.c ├── draw.h ├── drop.c ├── drop.h ├── font.c ├── font.h ├── gui.c ├── gui.h ├── gui_types.h ├── knob.xpm ├── knob_point.xpm ├── libgui.h ├── link.c ├── link.h ├── load_save.c ├── load_save.h ├── menu.c ├── menu.h ├── realpath.c ├── realpath.h ├── sign ├── std_dialog.c ├── std_dialog.h ├── timer.c └── timer.h ├── mega-happy-sprite.png ├── mega.c ├── mega.h ├── mega.ico ├── mega.rc ├── mega_file.h ├── mega_file.l ├── pic ├── a.xpm ├── b.xpm ├── back.xcf ├── back.xpm ├── clear.xpm ├── clear_to_color.xpm ├── clob.xpm ├── default_overlay.xpm ├── fill.xpm ├── flip.xpm ├── line.xpm ├── minus.xpm ├── new.xpm ├── pal_hi_low.xpm ├── pic.xpm ├── pic_pat.xpm ├── plus.xpm ├── put_pal.xpm ├── put_pat.xpm ├── restore.xpm ├── save.xpm ├── scroll_a.xpm ├── scroll_a_edit.xpm ├── scroll_a_high.xpm ├── scroll_b.xpm ├── scroll_b_edit.xpm ├── scroll_b_high.xpm ├── select.xpm ├── small_knob.xpm ├── sprite.xpm ├── sprite_edit.xpm ├── sprite_high.xpm ├── stop.xpm ├── undo.xpm ├── window.xpm ├── window_edit.xpm ├── zoom_in.xpm └── zoom_out.xpm ├── proc.c ├── proc.h ├── skull.h ├── uu.c ├── uu.h ├── vdp.c ├── vdp.h ├── windows ├── bin │ ├── LICENSE │ ├── README │ ├── SDL2.dll │ ├── SDL2_image.dll │ ├── libjpeg-9.dll │ ├── libpng16-16.dll │ └── zlib1.dll ├── include │ └── SDL2 │ │ ├── SDL.h │ │ ├── SDL_assert.h │ │ ├── SDL_atomic.h │ │ ├── SDL_audio.h │ │ ├── SDL_bits.h │ │ ├── SDL_blendmode.h │ │ ├── SDL_clipboard.h │ │ ├── SDL_config.h │ │ ├── SDL_copying.h │ │ ├── SDL_cpuinfo.h │ │ ├── SDL_egl.h │ │ ├── SDL_endian.h │ │ ├── SDL_error.h │ │ ├── SDL_events.h │ │ ├── SDL_filesystem.h │ │ ├── SDL_gamecontroller.h │ │ ├── SDL_gesture.h │ │ ├── SDL_guid.h │ │ ├── SDL_haptic.h │ │ ├── SDL_hidapi.h │ │ ├── SDL_hints.h │ │ ├── SDL_image.h │ │ ├── SDL_joystick.h │ │ ├── SDL_keyboard.h │ │ ├── SDL_keycode.h │ │ ├── SDL_loadso.h │ │ ├── SDL_locale.h │ │ ├── SDL_log.h │ │ ├── SDL_main.h │ │ ├── SDL_messagebox.h │ │ ├── SDL_metal.h │ │ ├── SDL_misc.h │ │ ├── SDL_mouse.h │ │ ├── SDL_mutex.h │ │ ├── SDL_name.h │ │ ├── SDL_opengl.h │ │ ├── SDL_opengl_glext.h │ │ ├── SDL_opengles.h │ │ ├── SDL_opengles2.h │ │ ├── SDL_opengles2_gl2.h │ │ ├── SDL_opengles2_gl2ext.h │ │ ├── SDL_opengles2_gl2platform.h │ │ ├── SDL_opengles2_khrplatform.h │ │ ├── SDL_pixels.h │ │ ├── SDL_platform.h │ │ ├── SDL_power.h │ │ ├── SDL_quit.h │ │ ├── SDL_rect.h │ │ ├── SDL_render.h │ │ ├── SDL_revision.h │ │ ├── SDL_rwops.h │ │ ├── SDL_scancode.h │ │ ├── SDL_sensor.h │ │ ├── SDL_shape.h │ │ ├── SDL_stdinc.h │ │ ├── SDL_surface.h │ │ ├── SDL_system.h │ │ ├── SDL_syswm.h │ │ ├── SDL_test.h │ │ ├── SDL_test_assert.h │ │ ├── SDL_test_common.h │ │ ├── SDL_test_compare.h │ │ ├── SDL_test_crc32.h │ │ ├── SDL_test_font.h │ │ ├── SDL_test_fuzzer.h │ │ ├── SDL_test_harness.h │ │ ├── SDL_test_images.h │ │ ├── SDL_test_log.h │ │ ├── SDL_test_md5.h │ │ ├── SDL_test_memory.h │ │ ├── SDL_test_random.h │ │ ├── SDL_thread.h │ │ ├── SDL_timer.h │ │ ├── SDL_touch.h │ │ ├── SDL_types.h │ │ ├── SDL_version.h │ │ ├── SDL_video.h │ │ ├── SDL_vulkan.h │ │ ├── begin_code.h │ │ └── close_code.h └── lib │ ├── libSDL2.a │ ├── libSDL2.dll.a │ ├── libSDL2_image.a │ ├── libSDL2_image.dll.a │ ├── libSDL2_test.a │ └── libSDL2main.a └── www ├── about.html ├── debian.png ├── download.html ├── freebsd.png ├── github.png ├── grid.png ├── index.html ├── loading.gif ├── manual.html ├── mega.png ├── raver.png ├── sack.js ├── sega.png ├── tarball.png ├── ubuntu.png └── windows.png /.gitattributes: -------------------------------------------------------------------------------- 1 | # disable end of line conversion on all files (act responsibly) 2 | * -text 3 | -------------------------------------------------------------------------------- /.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | 7 | jobs: 8 | build-windows: 9 | runs-on: windows-latest 10 | defaults: 11 | run: 12 | shell: msys2 {0} 13 | 14 | steps: 15 | - name: Set up MSYS2 16 | uses: msys2/setup-msys2@v2 17 | with: 18 | msystem: mingw32 19 | release: true 20 | update: true 21 | install: >- 22 | msys/vim 23 | msys/base-devel 24 | mingw32/mingw-w64-i686-toolchain 25 | mingw32/mingw-w64-i686-gcc 26 | mingw32/mingw-w64-i686-clang 27 | mingw32/mingw-w64-i686-SDL2 28 | mingw32/mingw-w64-i686-SDL2_image 29 | mingw32/mingw-w64-i686-libarchive 30 | 31 | - name: Checkout 32 | uses: actions/checkout@v3 33 | 34 | - name: Build 35 | run: | 36 | make -f Makefile.windows 37 | 38 | - name: Copy Dependant DLLs 39 | run: | 40 | cp /mingw32/bin/SDL2.dll ./windows/ 41 | cp /mingw32/bin/SDL2_image.dll ./windows/ 42 | cp /mingw32/bin/libjpeg-*.dll ./windows/ 43 | cp /mingw32/bin/libjxl.dll ./windows/ 44 | cp /mingw32/bin/libpng*.dll ./windows/ 45 | cp /mingw32/bin/libwebp-*.dll ./windows/ 46 | cp /mingw32/bin/libtiff-*.dll ./windows/ 47 | cp /mingw32/bin/libgcc_s_dw2-1.dll ./windows/ 48 | cp /mingw32/bin/libstdc++-*.dll ./windows/ 49 | cp /mingw32/bin/libjbig-*.dll ./windows/ 50 | cp /mingw32/bin/libbrotli*.dll ./windows/ 51 | cp /mingw32/bin/liblcms2-*.dll ./windows/ 52 | cp /mingw32/bin/libsharpyuv-*.dll ./windows/ 53 | cp /mingw32/bin/libwinpthread-*.dll ./windows/ 54 | cp /mingw32/bin/liblzma-*.dll ./windows/ 55 | cp /mingw32/bin/libLerc.dll ./windows/ 56 | cp /mingw32/bin/libhwy.dll ./windows/ 57 | cp /mingw32/bin/zlib1.dll ./windows/ 58 | cp /mingw32/bin/libzstd.dll ./windows/ 59 | cp /mingw32/bin/libdeflate.dll ./windows/ 60 | 61 | # NOTE: artifacts do not preserve file name case or permissions 62 | - name: Upload artifacts 63 | uses: actions/upload-artifact@v3 64 | with: 65 | retention-days: 90 66 | name: win32-i686 67 | path: ./windows/* 68 | -------------------------------------------------------------------------------- /BUGS: -------------------------------------------------------------------------------- 1 | 2 | On my Apple PPC I can't select vertical scrolls... not sure why 3 | 4 | help button crashes on windows builds 5 | 6 | 7 | -------------------------------------------------------------------------------- /COMPILE.windows: -------------------------------------------------------------------------------- 1 | 2 | To compile for windows run: 3 | 4 | make -f Makefile.windows 5 | 6 | this should produce mega.exe in the windows directory 7 | from there you can run it 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009,2024 Thea DeSilva 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | 3. Neither the name of the copyright holder nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ifeq ($(PREFIX),) 2 | PREFIX := /usr/bin 3 | endif 4 | 5 | CC = cc 6 | LEX = lex 7 | CFLAGS = -I./gui/ `sdl2-config --cflags` -O2 -Wall -ggdb -DDOXRANDR 8 | LIBS= `sdl2-config --libs` -O2 -ggdb -lSDL2_image ./gui/libgui.a -lm 9 | PROGNAME=mega 10 | 11 | UNAME_S := $(shell uname -s) 12 | ifeq ($(UNAME_S),Linux) 13 | LIBS += -lm 14 | endif 15 | 16 | OBJS = draw.o mega.o proc.o vdp.o bottom.o lex.yy.o uu.o bmp.o gui/libgui.a 17 | 18 | mega all: ${OBJS} 19 | ${CC} -o ${PROGNAME} ${OBJS} ${LIBS} 20 | 21 | lex.yy.o: lex.yy.c mega_file.h 22 | ${CC} -c ${CFLAGS} lex.yy.c 23 | 24 | lex.yy.c: mega_file.l mega_file.h 25 | ${LEX} mega_file.l 26 | 27 | uu.o: uu.c 28 | ${CC} -c ${CFLAGS} uu.c 29 | 30 | draw.o: draw.c mega.h vdp.h draw.h 31 | ${CC} -c ${CFLAGS} draw.c 32 | 33 | mega.o: mega.c mega.h vdp.h proc.h 34 | ${CC} -c ${CFLAGS} mega.c 35 | 36 | proc.o: proc.c mega.h vdp.h draw.h proc.h 37 | ${CC} -c ${CFLAGS} proc.c 38 | 39 | vdp.o: vdp.c mega.h vdp.h 40 | ${CC} -c ${CFLAGS} vdp.c 41 | 42 | bottom.o: bottom.c bottom.h 43 | ${CC} -c ${CFLAGS} bottom.c 44 | 45 | gui/libgui.a: 46 | cd gui && make 47 | 48 | 49 | install: mega 50 | install mega $(DESTDIR)$(PREFIX)/mega 51 | 52 | clean: 53 | cd gui && make clean 54 | rm -f mega mega.exe mega.core core mega.res lex.yy.c ${OBJS} 55 | -------------------------------------------------------------------------------- /Makefile.windows: -------------------------------------------------------------------------------- 1 | 2 | CC=x86_64-w64-mingw32-gcc 3 | LEX=lex 4 | CFLAGS=-Iwindows/include -I./gui/ -D_GNU_SOURCE=1 -O2 -Wall -DWINDOWS -DDOXRANDR 5 | LIBS= -Lwindows/lib -Dmain=SDL2_main -mwindows -lmingw32 -luser32 -lgdi32 -lwinmm -ldxguid -lSDL2main -lSDL2 -lSDL2_image -O2 ./gui/libgui.a 6 | PROGNAME=mega.exe 7 | WINDRES=x86_64-w64-mingw32-windres 8 | 9 | OBJS = draw.o mega.o proc.o vdp.o bottom.o lex.yy.o uu.o bmp.o gui/libgui.a mega.res 10 | 11 | mega all: ${OBJS} 12 | ${CC} -o ${PROGNAME} ${OBJS} ${LIBS} 13 | cp ${PROGNAME} windows/bin 14 | 15 | lex.yy.o: lex.yy.c mega_file.h 16 | ${CC} -c ${CFLAGS} lex.yy.c 17 | 18 | lex.yy.c: mega_file.l mega_file.h 19 | ${LEX} mega_file.l 20 | 21 | mega.res: mega.rc 22 | ${WINDRES} mega.rc -O coff -o mega.res 23 | 24 | uu.o: uu.c 25 | ${CC} -c ${CFLAGS} uu.c 26 | 27 | draw.o: draw.c mega.h vdp.h draw.h 28 | ${CC} -c ${CFLAGS} draw.c 29 | 30 | mega.o: mega.c mega.h vdp.h proc.h 31 | ${CC} -c ${CFLAGS} mega.c 32 | 33 | proc.o: proc.c mega.h vdp.h draw.h proc.h 34 | ${CC} -c ${CFLAGS} proc.c 35 | 36 | vdp.o: vdp.c mega.h vdp.h 37 | ${CC} -c ${CFLAGS} vdp.c 38 | 39 | bottom.o: bottom.c bottom.h 40 | ${CC} -c ${CFLAGS} bottom.c 41 | 42 | gui/libgui.a: 43 | cd gui && make -f Makefile.windows 44 | 45 | 46 | install: mega 47 | install mega /usr/bin/mega 48 | 49 | clean: 50 | cd gui && make -f Makefile.windows clean 51 | rm -f mega mega.exe windows/bin/mega.exe mega.core core lex.yy.c mega.res windows/bin/mega.exe ${OBJS} 52 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | *** !!!! Holy-Shit !!!! *** 2 | 3 | This is Mega-Happy-Sprite. To install, run 4 | 5 | make 6 | make install 7 | 8 | email pantsbutt@gmail.com with questions or comments 9 | -------------------------------------------------------------------------------- /bmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read LICENSE for more info 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include "mega.h" 13 | #include "vdp.h" 14 | #include "draw.h" 15 | #include "proc.h" 16 | #include "bottom.h" 17 | #include "uu.h" 18 | 19 | #include "bmp.h" 20 | 21 | 22 | int load_bmp(struct select_file_t *selector, char *filename) { 23 | SDL_Surface *bmp; 24 | int i,j,x,y; 25 | int r,g,b; 26 | unsigned char *pix; 27 | 28 | 29 | if((bmp = SDL_LoadBMP(filename))<=0) 30 | return NOPE_TRY_AGAIN; 31 | 32 | if(bmp->format->BytesPerPixel != 1) 33 | return NOPE_TRY_AGAIN; 34 | 35 | if(bmp->format->palette->ncolors > 15) 36 | return NOPE_TRY_AGAIN; 37 | 38 | if(bmp->w > 320) 39 | return NOPE_TRY_AGAIN; 40 | 41 | if(bmp->h > 224) 42 | return NOPE_TRY_AGAIN; 43 | 44 | 45 | for(i=0;i<15;i++) { 46 | r = bmp->format->palette->colors[i].r / (0xff/7); 47 | r*= (0xff/7); 48 | 49 | g = bmp->format->palette->colors[i].g / (0xff/7); 50 | g*= (0xff/7); 51 | 52 | b = bmp->format->palette->colors[i].b / (0xff/7); 53 | b*= (0xff/7); 54 | 55 | current_vdp->palette[current_palette][i].r = r; 56 | current_vdp->palette[current_palette][i].g = g; 57 | current_vdp->palette[current_palette][i].b = b; 58 | MAP_COLOR(current_vdp->palette[current_palette][i]); 59 | } 60 | 61 | 62 | pix = (unsigned char *)bmp->pixels; 63 | num_xor_pix = bmp->w * bmp->h; 64 | i =0; 65 | for(y=0;yh;y++) 66 | for(x=0;xw;x++) { 67 | xor_pixels[i].x = x; 68 | xor_pixels[i].y = y; 69 | xor_pixels[i].index = pix[x+(y*bmp->pitch)]; 70 | 71 | switch(currently_editing) { 72 | case EDIT_SCROLL_A: 73 | j = vdp_screen[x+(320*y)].A.pat_index; 74 | current_vdp->vram[current_vdp->scroll_a + (j<<1) ] &= (3<<5); 75 | current_vdp->vram[current_vdp->scroll_a + (j<<1) ] |= 76 | ((current_palette &3)<<5); 77 | break; 78 | case EDIT_SCROLL_B: 79 | j = vdp_screen[x+(320*y)].B.pat_index; 80 | current_vdp->vram[current_vdp->scroll_b + (j<<1) ] &= (3<<5); 81 | current_vdp->vram[current_vdp->scroll_b + (j<<1) ] |= 82 | ((current_palette &3)<<5); 83 | break; 84 | 85 | } 86 | i++; 87 | } 88 | 89 | collapse(); 90 | 91 | 92 | return LOAD_OK_QUIT; 93 | } 94 | -------------------------------------------------------------------------------- /bmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read LICENSE for more info 4 | */ 5 | 6 | int load_bmp(struct select_file_t *selector, char *filename); 7 | -------------------------------------------------------------------------------- /bottom.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read LICENSE for more info 4 | */ 5 | 6 | #define VIEW_SCROLL_A 0 7 | #define VIEW_SCROLL_B 1 8 | #define VIEW_WINDOW 2 9 | #define VIEW_SPRITE 4 10 | #define VIEW_SCROLL_B_HIGH 10 11 | #define VIEW_SCROLL_A_HIGH 11 12 | #define VIEW_SPRITE_HIGH 12 13 | 14 | #define EDIT_SCROLL_A 5 15 | #define EDIT_SCROLL_B 6 16 | #define EDIT_WINDOW 7 17 | #define EDIT_SPRITE 9 18 | 19 | #define KNOB 2 20 | #define SELECT_A 0 21 | #define SELECT_B 1 22 | 23 | #define NOT_SELECTED 0 24 | #define HIGH 1 25 | #define LOW 2 26 | #define PALETTE 3 27 | #define SELECTED 4 28 | #define COPY 5 29 | #define MOVE 6 30 | 31 | extern struct object_t *last_tool; 32 | extern int high_low; 33 | extern int hor_ver; 34 | extern int copy_move; 35 | 36 | extern struct select_file_t *load_sel, *save_sel; 37 | extern int currently_editing; 38 | 39 | extern int num_xor_pix; 40 | extern int knob_data_offset; 41 | extern int knob_or; 42 | extern int knob_ab; 43 | 44 | typedef struct { 45 | int x,y; 46 | int index; 47 | } xor_pix; 48 | 49 | extern xor_pix xor_pixels[320*240]; 50 | 51 | int go_bot(struct object_t *obj, int data); 52 | int new_bot(struct object_t *obj, int data); 53 | int stop_bot(struct object_t *obj, int data); 54 | void put_xor_pix(Uint8 *ram, int pat, int x, int y); 55 | void put_xor_hash_pix(Uint8 *ram, int pat, int x, int y); 56 | int high_low_menu_bot(struct object_t *obj, int data); 57 | int pal_hi_low_menu_bot(struct object_t *obj, int data); 58 | int hor_ver_menu_bot(struct object_t *obj, int data); 59 | int copy_move_menu_bot(struct object_t *obj, int data); 60 | int change_bg_color(struct object_t *obj, int data); 61 | int knob_tick(struct object_t *obj, int data); 62 | int knob_select(struct object_t *obj, int data); 63 | int edit_change(struct object_t *obj, int data); 64 | int tool_change(struct object_t *obj, int data); 65 | int change_background(struct object_t *obj, int data); 66 | int load_background_callback(struct select_file_t *selector, char *filename); 67 | int load_ovr_callback(struct select_file_t *selector, char *filename); 68 | int load_ovr_window(struct object_t *obj, int data); 69 | int undo_button(struct object_t *obj, int data); 70 | int about(struct object_t *obj, int data); 71 | int really_quit(struct object_t *obj, int data); 72 | int fw_bottom(struct object_t *obj, int data); 73 | int load_save_top(struct object_t *obj, int data); 74 | int load_save_middle(struct object_t *obj, int data); 75 | int load_save_bottom(struct select_file_t *selector, char *filename); 76 | int sprite_overlay(struct object_t *obj, int data); 77 | 78 | -------------------------------------------------------------------------------- /draw.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read LICENSE for more info 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include "./gui/libgui.h" 10 | #include "mega.h" 11 | #include "vdp.h" 12 | #include "draw.h" 13 | #include "bottom.h" 14 | 15 | Uint8 draw_buffer[320][240]; 16 | 17 | void put_pix_draw_buffer(Uint8 *ram, int pat, int x, int y){ 18 | draw_buffer[x][y] = 1; 19 | } 20 | 21 | int get_pix(Uint8 *ram, int pat, int x, int y) { 22 | int base = 0; 23 | Uint8 dat = 0; 24 | base = (pat * 0x20)+(((y*8)+x)>>1); 25 | dat = ram[base]; 26 | if( (x&1)==0) 27 | dat>>=4; 28 | return dat & 0xf; 29 | } 30 | 31 | int get_pix_preview_special(Uint8 *ram, int pat, int x, int y) { 32 | if(draw_buffer[x][y] == 1) 33 | return current_palette_index; 34 | 35 | switch(currently_editing) { 36 | case EDIT_SCROLL_A: 37 | return vdp_screen[x + (y*320)].A.index; 38 | case EDIT_SCROLL_B: 39 | return vdp_screen[x + (y*320)].B.index; 40 | case EDIT_SPRITE: 41 | return sprite_screen[x+(y*32)].index; 42 | } 43 | return 0; 44 | } 45 | 46 | int get_pix_special(Uint8 *ram, int pat, int x, int y) { 47 | printf("whaa\n"); 48 | if(draw_buffer[x][y] == 1) 49 | return current_palette_index; 50 | else 51 | return get_pix(ram, pat, x,y); 52 | } 53 | 54 | 55 | void put_pix(Uint8 *ram, int pat, int x, int y) { 56 | int base =0; 57 | Uint8 dat; 58 | base = (pat * 0x20) +(((y*8)+x)>>1); 59 | dat = ram[base]; 60 | if( (x&1)==0) { 61 | dat &=0x0f; 62 | dat += (current_palette_index<<4); 63 | } else { 64 | dat &=0xf0; 65 | dat+=current_palette_index; 66 | } 67 | ram[base] = dat; 68 | } 69 | 70 | #define PUSH(Y,XL,XR,DY) \ 71 | if(sp=wy1 && Y+(DY)<=wy2) \ 72 | {sp->y = Y; sp->xl = XL; sp->xr = XR; sp->dy=DY; sp++;} 73 | 74 | #define POP(Y,XL,XR,DY) \ 75 | {sp--; Y=sp->y+(DY = sp->dy); XL = sp->xl; XR = sp->xr; } 76 | 77 | void do_flood(Uint8 *ram, int pat, int x, int y, int wx1, int wy1, int wx2, int wy2, 78 | void (*put)(Uint8 *,int,int,int), int (*get)(Uint8 *,int,int,int)) { 79 | int l=0, x1=0, x2=0, dy=0; 80 | int ov=0; 81 | struct seg stack[MAX_FLOOD], *sp = stack; 82 | ov = get(ram,pat,x,y); 83 | if(ov==current_palette_index || xwx2 || ywy2) return; 84 | PUSH(y,x,x,1); 85 | PUSH(y+1,x,x,-1); 86 | while(sp>stack) { 87 | POP(y,x1,x2,dy); 88 | for(x=x1;x>=wx1 && get(ram,pat,x,y) == ov; x--) 89 | put(ram,pat,x,y); 90 | if(x>=x1) goto s; 91 | l = x+1; 92 | if(lx2+1) PUSH(y,x2+1,x-1,-dy); 99 | s: 100 | for(x++;x<=x2 && get(ram,pat,x,y)!=ov;x++); 101 | l = x; 102 | } while (x<=x2); 103 | } 104 | } 105 | 106 | void do_line(Uint8 *ram, int pat, int x1, int y1, int x2, int y2, void (*proc)(Uint8 *,int,int,int)) { 107 | int dx = x2-x1; 108 | int dy = y2-y1; 109 | int i1=0, i2=0; 110 | int x=0, y=0; 111 | int dd=0; 112 | 113 | #define DO_LINE(pri_sign, pri_c, pri_cond, sec_sign, sec_c, sec_cond) \ 114 | { \ 115 | if (d##pri_c == 0) { \ 116 | proc(ram,pat,x1, y1); \ 117 | return; \ 118 | } \ 119 | i1 = 2 * d##sec_c; \ 120 | dd = i1 - (sec_sign (pri_sign d##pri_c)); \ 121 | i2 = dd - (sec_sign (pri_sign d##pri_c)); \ 122 | x = x1; \ 123 | y = y1; \ 124 | while (pri_c pri_cond pri_c##2) { \ 125 | proc(ram,pat,x,y); \ 126 | if (dd sec_cond 0) { \ 127 | sec_c = sec_c sec_sign 1; \ 128 | dd += i2; \ 129 | } else \ 130 | dd += i1; \ 131 | pri_c = pri_c pri_sign 1; \ 132 | } \ 133 | } 134 | 135 | if (dx >= 0) { 136 | if (dy >= 0) { 137 | if (dx >= dy) { 138 | /* (x1 <= x2) && (y1 <= y2) && (dx >= dy) */ 139 | DO_LINE(+, x, <=, +, y, >=); 140 | } 141 | else { 142 | /* (x1 <= x2) && (y1 <= y2) && (dx < dy) */ 143 | DO_LINE(+, y, <=, +, x, >=); 144 | } 145 | } 146 | else { 147 | if (dx >= -dy) { 148 | /* (x1 <= x2) && (y1 > y2) && (dx >= dy) */ 149 | DO_LINE(+, x, <=, -, y, <=); 150 | } 151 | else { 152 | /* (x1 <= x2) && (y1 > y2) && (dx < dy) */ 153 | DO_LINE(-, y, >=, +, x, >=); 154 | } 155 | } 156 | } 157 | else { 158 | if (dy >= 0) { 159 | if (-dx >= dy) { 160 | /* (x1 > x2) && (y1 <= y2) && (dx >= dy) */ 161 | DO_LINE(-, x, >=, +, y, >=); 162 | } 163 | else { 164 | /* (x1 > x2) && (y1 <= y2) && (dx < dy) */ 165 | DO_LINE(+, y, <=, -, x, <=); 166 | } 167 | } 168 | else { 169 | if (-dx >= -dy) { 170 | /* (x1 > x2) && (y1 > y2) && (dx >= dy) */ 171 | DO_LINE(-, x, >=, -, y, <=); 172 | } 173 | else { 174 | /* (x1 > x2) && (y1 > y2) && (dx < dy) */ 175 | DO_LINE(-, y, >=, -, x, <=); 176 | } 177 | } 178 | } 179 | 180 | #undef DO_LINE 181 | 182 | } 183 | -------------------------------------------------------------------------------- /draw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read LICENSE for more info 4 | */ 5 | 6 | #define MAX_FLOOD 100000 7 | 8 | struct seg { 9 | short y,xl,xr,dy; 10 | }; 11 | 12 | extern Uint8 draw_buffer[320][240]; 13 | 14 | void put_pix_draw_buffer(Uint8 *ram, int pat, int x, int y); 15 | int get_pix(Uint8 *ram, int pat, int x, int y); 16 | int get_pix_special(Uint8 *ram, int pat, int x, int y); 17 | int get_pix_preview_special(Uint8 *ram, int pat, int x, int y); 18 | void put_pix(Uint8 *ram, int pat, int x, int y); 19 | void do_flood(Uint8 *ram, int pat, int x, int y, int wx1, int wy1, int wx2, int wy2, 20 | void (*put)(Uint8 *,int,int,int), int (*get)(Uint8 *,int,int,int)); 21 | void do_line(Uint8 *ram, int pat, int x1, int y1, int x2, int y2, void (*proc)(Uint8 *,int,int,int)); 22 | -------------------------------------------------------------------------------- /gui/BUGS: -------------------------------------------------------------------------------- 1 | 2 | avoiding left and bottom -edge-drawing in draw.c do to Uint32 access on 3 | last pixel causing a seg fault 4 | 5 | Put clipping back into draw_drop 6 | 7 | in draw_drop if drop is bigger then dst we seg-fault. Temp fix in proc_move_button 8 | 9 | -------------------------------------------------------------------------------- /gui/COPYING: -------------------------------------------------------------------------------- 1 | Please read ../LICENSE 2 | -------------------------------------------------------------------------------- /gui/Makefile: -------------------------------------------------------------------------------- 1 | 2 | CFLAGS= -I./ `sdl2-config --cflags` -Wall -ggdb 3 | CC = cc 4 | INSTALL= install 5 | AR = ar 6 | RANLIB = ranlib 7 | 8 | OBJS = draw.o font.o gui.o link.o std_dialog.o drop.o timer.o load_save.o menu.o 9 | 10 | libgui.a: ${OBJS} 11 | rm -rf libgui.a 12 | ${AR} -q -v libgui.a ${OBJS} 13 | ${RANLIB} libgui.a 14 | 15 | timer.o: timer.c gui_types.h link.h gui.h std_dialog.h draw.h 16 | ${CC} -c timer.c ${CFLAGS} 17 | 18 | draw.o: draw.c gui_types.h link.h gui.h draw.h 19 | ${CC} -c draw.c ${CFLAGS} 20 | 21 | font.o: font.c gui_types.h link.h gui.h draw.h std_dialog.h font.h 22 | ${CC} -c font.c ${CFLAGS} 23 | 24 | gui.o: gui.c gui_types.h link.h gui.h draw.h std_dialog.h 25 | ${CC} -c gui.c ${CFLAGS} 26 | 27 | link.o: link.c link.h 28 | ${CC} -c link.c ${CFLAGS} 29 | 30 | std_dialog.o: std_dialog.c gui_types.h link.h gui.h draw.h std_dialog.h font.h 31 | ${CC} -c std_dialog.c ${CFLAGS} 32 | 33 | drop.o: drop.c drop.h 34 | ${CC} -c drop.c ${CFLAGS} 35 | 36 | load_save.o: load_save.c load_save.h 37 | ${CC} -c load_save.c ${CFLAGS} 38 | 39 | menu.o: menu.c menu.h 40 | 41 | clean: 42 | rm -rf ${OBJS} realpath.o libgui.a example 43 | 44 | -------------------------------------------------------------------------------- /gui/Makefile.windows: -------------------------------------------------------------------------------- 1 | 2 | CFLAGS= -I../windows/include -I./ -D_GNU_SOURCE=1 -Wall -DWINDOWS 3 | CC = x86_64-w64-mingw32-gcc 4 | INSTALL= install 5 | AR = x86_64-w64-mingw32-ar 6 | RANLIB=x86_64-w64-mingw32-ranlib 7 | 8 | OBJS = realpath.o draw.o font.o gui.o link.o std_dialog.o drop.o timer.o load_save.o menu.o 9 | 10 | libgui.a: ${OBJS} 11 | rm -rf libgui.a 12 | ${AR} -q -v libgui.a ${OBJS} 13 | ${RANLIB} libgui.a 14 | 15 | timer.o: timer.c gui_types.h link.h gui.h std_dialog.h draw.h 16 | ${CC} -c timer.c ${CFLAGS} 17 | 18 | draw.o: draw.c gui_types.h link.h gui.h draw.h 19 | ${CC} -c draw.c ${CFLAGS} 20 | 21 | font.o: font.c gui_types.h link.h gui.h draw.h std_dialog.h font.h 22 | ${CC} -c font.c ${CFLAGS} 23 | 24 | gui.o: gui.c gui_types.h link.h gui.h draw.h std_dialog.h 25 | ${CC} -c gui.c ${CFLAGS} 26 | 27 | link.o: link.c link.h 28 | ${CC} -c link.c ${CFLAGS} 29 | 30 | std_dialog.o: std_dialog.c gui_types.h link.h gui.h draw.h std_dialog.h font.h 31 | ${CC} -c std_dialog.c ${CFLAGS} 32 | 33 | drop.o: drop.c drop.h 34 | ${CC} -c drop.c ${CFLAGS} 35 | 36 | load_save.o: load_save.c load_save.h 37 | ${CC} -c load_save.c ${CFLAGS} 38 | 39 | menu.o: menu.c menu.h 40 | 41 | clean: 42 | rm -rf ${OBJS} libgui.a example 43 | 44 | -------------------------------------------------------------------------------- /gui/TODO: -------------------------------------------------------------------------------- 1 | 2 | * load_save is really messy, re-write and make it portable 3 | -------------------------------------------------------------------------------- /gui/bknob.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * bknob_xpm[] = { 3 | "41 41 11 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #001F1F", 7 | "@ c #000404", 8 | "# c #000A0A", 9 | "$ c #001111", 10 | "% c #465AA1", 11 | "& c #536ABF", 12 | "* c #001515", 13 | "= c #183C2F", 14 | "- c #3A4A86", 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 | " .......$-%%%%%%%-$....... ", 52 | " ....................... ", 53 | " .................@. ", 54 | " ............... ", 55 | " ......... "}; 56 | -------------------------------------------------------------------------------- /gui/bknob_point.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * bknob_point_xpm[] = { 3 | "11 11 10 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #030302", 7 | "@ c #000101", 8 | "# c #040403", 9 | "$ c #465AA1", 10 | "% c #010101", 11 | "& c #080805", 12 | "* c #536ABF", 13 | "= c #090805", 14 | " ..... ", 15 | " ..++++@.. ", 16 | " .#$$$$$%. ", 17 | ".#$$$$$$$@.", 18 | ".&$$*****+.", 19 | ".=$$*****+.", 20 | ".=$$*****+.", 21 | ".&$$*****+.", 22 | " .=$****#. ", 23 | " ..&==&#.. ", 24 | " ..... "}; 25 | -------------------------------------------------------------------------------- /gui/csig: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if expr $# "<" "1" > /dev/null; then 4 | echo "Usage: csig " 5 | exit 6 | fi 7 | 8 | echo "********* " $1 "*********" 9 | 10 | if ! test -f $1; then 11 | echo $1 "no such file :(" 12 | exit 13 | fi 14 | 15 | if gpg --verify $1; then 16 | echo "*** already signed, and verifiable- doing nothing" 17 | exit 18 | fi 19 | 20 | rm -f /tmp/csig.sign 21 | grep HEADER: $0 | grep -v grep | sed -e s/HEADER://g > /tmp/csig.plain 22 | 23 | cat /tmp/csig.plain | wc -l > /tmp/header_size 24 | 25 | head -n `expr \`cat /tmp/header_size\` + 4` $1 | tail -n `cat /tmp/header_size` > /tmp/diff_one 26 | 27 | if `diff /tmp/csig.plain /tmp/diff_one > /dev/null`; then 28 | echo "*** ok, resigning" 29 | 30 | grep TAIL: $0 | grep -v grep | sed -e s/TAIL://g > /tmp/tail 31 | cat /tmp/tail | wc -l > /tmp/tail_size 32 | expr `cat /tmp/tail_size` + 8 > /tmp/tail_size 33 | 34 | 35 | tail +`expr \`cat /tmp/header_size\` + 5` $1 > /tmp/strip0 36 | 37 | 38 | cat /tmp/strip0 | wc -l > /tmp/strip_size 39 | head -n `expr \` cat /tmp/strip_size\` - \`cat /tmp/tail_size\`` /tmp/strip0 > /tmp/strip 40 | 41 | else 42 | echo "*** ok, signing new file" 43 | cp $1 /tmp/strip 44 | fi 45 | 46 | cat /tmp/strip >> /tmp/csig.plain 47 | grep TAIL: $0 | grep -v grep | sed -e s/TAIL://g >> /tmp/csig.plain 48 | if ! gpg --default-key 0xA6E706B3 --armor --output /tmp/csig.sign --clearsign /tmp/csig.plain; then 49 | echo "*** couldn't sign for some reason (probably doesn't have the private key), aborting" 50 | rm -rf /tmp/csig.plain \ 51 | /tmp/csig.sign \ 52 | /tmp/diff_one \ 53 | /tmp/header_size \ 54 | /tmp/tail_size \ 55 | /tmp/tail \ 56 | /tmp/strip_size \ 57 | /tmp/strip \ 58 | /tmp/strip0 59 | 60 | exit 61 | fi 62 | 63 | echo "/*" > /tmp/strip 64 | cat /tmp/csig.sign >> /tmp/strip 65 | echo "*/" >> /tmp/strip 66 | 67 | cp /tmp/strip $1 68 | rm -rf /tmp/csig.plain \ 69 | /tmp/csig.sign \ 70 | /tmp/diff_one \ 71 | /tmp/header_size \ 72 | /tmp/tail_size \ 73 | /tmp/tail \ 74 | /tmp/strip_size \ 75 | /tmp/strip \ 76 | /tmp/strip0 77 | 78 | exit 79 | 80 | HEADER: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xA6E70B3 81 | HEADER: m m mm mmm .----------. .---------------------. mmm mm m m 82 | HEADER: 8 8 88 888 | .--------` | .------------------` 888 88 8 8 83 | HEADER: 8 8 88 888 | ```````|`V```````| |``||``|`````| 888 88 8 8 84 | HEADER: 8 8 88 888 `------ | | [] | |``````|| | [] | 888 88 8 8 85 | HEADER: 8 8 88 888 |`````` | | | ````|```` | | 888 88 8 8 86 | HEADER: ` ` `` ``` ``````````````> |````````````| |`` ``` `` ` ` 87 | HEADER: ==============` `---` 88 | HEADER: L A B O R A T O R I E S 89 | HEADER: 90 | HEADER: Good hello, this is official SigFLUP-Labs sourcecode :-() 91 | HEADER: 92 | HEADER: This is GNU software, please read ../LICENSE for details 93 | HEADER:*/ 94 | 95 | TAIL:/* 96 | TAIL: Thank you for your attention 97 | -------------------------------------------------------------------------------- /gui/draw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | #define NO_HASH 1 7 | #define HASH 2 8 | /* ok so the above two are constants for non-text draw stuff */ 9 | #define XOR 3 10 | 11 | #define LOCK if(SDL_MUSTLOCK(gui_screen) != 0) SDL_LockSurface(gui_screen) 12 | #define UNLOCK if(SDL_MUSTLOCK(gui_screen) != 0) SDL_LockSurface(gui_screen) 13 | 14 | #define UPDATE_OBJECT(Q) clipped_update(current_grp->pos_x+Q->param.x, \ 15 | current_grp->pos_y + Q->param.y, \ 16 | current_grp->pos_x + Q->param.x + Q->param.w, \ 17 | current_grp->pos_y + Q->param.y + Q->param.h) 18 | 19 | extern SDL_Surface *gc; 20 | 21 | void clipped_update(int x, int y, int w, int h); 22 | int vline(int rx, int ry, int ry2, color_t *fg, color_t *bg, int type); 23 | int hline(int rx, int ry, int rx2, color_t *fg, color_t *bg, int type); 24 | int other_hline(int rx, int ry, int rx2, color_t *fg, color_t *bg, int type); 25 | int fill_box(int x, int y, int x2, int y2, color_t *fg, color_t *bg, int type); 26 | int box(int x, int y, int x2, int y2, color_t *fg, color_t *bg, int type); 27 | 28 | void clear_screen(void); 29 | -------------------------------------------------------------------------------- /gui/drop.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | 7 | #define MAX_DEPTH 80 8 | 9 | typedef struct { 10 | struct list_head node; 11 | int w,h; 12 | int depth; 13 | Uint8 *buffer; 14 | } drop_t; 15 | 16 | extern drop_t *drops; 17 | 18 | void build_coef(void); 19 | void draw_drop(SDL_Surface *dst, int x, int y, drop_t *drop, int w, int h, SDL_Rect *clip); 20 | drop_t *new_drop(int depth); 21 | void drop_init(void); 22 | -------------------------------------------------------------------------------- /gui/font.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | 7 | #define CENTER_OF_STRING(a) (((strlen(a)*8)/2)) 8 | 9 | #define CR_TERMINAL 8 10 | 11 | extern unsigned char font[]; 12 | 13 | void draw_char(int x, int y, char c, int fg_color, int bg_color, int flags); 14 | void draw_text(int x, int y, char *in, color_t *fg, color_t *bg, int hash, int max); 15 | -------------------------------------------------------------------------------- /gui/gui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | #define PARM(X,Y,W,H,FG,BG,FLAGS,PROC) tmp_parm.x = X;\ 7 | tmp_parm.y = Y; \ 8 | tmp_parm.w = W; \ 9 | tmp_parm.h = H; \ 10 | tmp_parm.fg = FG; \ 11 | tmp_parm.bg = BG; \ 12 | tmp_parm.flags = FLAGS; \ 13 | tmp_parm.proc = PROC; 14 | 15 | #define MAX_GAUSS_DEPTH 70 16 | 17 | #define MOUSE_MOVE 0 18 | #define MOUSE_UP 1 19 | #define MOUSE_DOWN 2 20 | #define KEY_DOWN 3 21 | #define KEY_UP 4 22 | 23 | #define MSG_DRAW 0 24 | #define MSG_START 1 25 | #define MSG_INFOCUS 2 26 | #define MSG_OUTFOCUS 3 27 | #define MSG_CLICK 4 // button down 28 | #define MSG_UNCLICK 5 // button up 29 | #define MSG_PRESS 6 // button actually pressed 30 | #define MSG_RADIO 7 31 | #define MSG_CLEAR_INTERNAL1 8 32 | #define MSG_RADIO2 9 33 | #define MSG_CLEAR_INTERNAL2 10 34 | #define MSG_KEYDOWN 11 35 | #define MSG_KEYUP 12 36 | #define MSG_RELOAD 13 37 | #define MSG_TICK 14 38 | #define MSG_DESTROY 15 39 | #define MSG_MOUSEMOVE 16 40 | 41 | #define FULLSCREEN 1 42 | 43 | #define RET_QUIT 0 44 | #define RET_OK 1 45 | 46 | #define MESSAGE_OBJECT(q,x) q->param.proc(x, q, 0) 47 | 48 | #define MAP_COLOR(W) \ 49 | W.map = SDL_MapRGB(gc->format,W.r, W.g, W.b); 50 | 51 | #define SET_COLOR(W,R,G,B)\ 52 | { \ 53 | W.r = R;\ 54 | W.g = G;\ 55 | W.b = B;\ 56 | MAP_COLOR(W); \ 57 | } 58 | 59 | #ifdef WINDOWS 60 | extern int gui_flags, gui_w, gui_h; 61 | #endif 62 | 63 | extern SDL_Window *win; 64 | extern SDL_Renderer *rend; 65 | 66 | extern int globl_flags; 67 | extern int lock_update; 68 | extern int globl_dirt, globl_quit_value; 69 | extern int globl_drop_depth; 70 | 71 | extern int floating_key; 72 | extern SDL_Surface *gui_screen; 73 | extern int gui_mouse_x, gui_mouse_y; 74 | extern void (*globl_tick)(void); 75 | extern void (*globl_wait_tick)(void); 76 | 77 | typedef struct { 78 | unsigned char r,g,b; 79 | Uint32 map; 80 | } color_t; 81 | 82 | extern color_t globl_fg, globl_bg; 83 | extern color_t globl_move_color; 84 | 85 | extern struct object_t declair; 86 | 87 | typedef struct { 88 | int (*proc)(int MSG, struct object_t *obj, int data); 89 | int x,y; 90 | int w,h; 91 | color_t *fg, *bg; 92 | int d1, d2, d3; 93 | int flags; 94 | void *dp1, *dp2, *dp3; 95 | int (*callback)(struct object_t *obj, int data); 96 | int quit_value; 97 | int pad2[128]; 98 | int user_flags; 99 | int pad[128]; 100 | } obj_param_t; 101 | 102 | struct object_t { 103 | struct list_head node; 104 | obj_param_t param; 105 | int in_focus, clicked, flags; 106 | }; 107 | 108 | extern struct object_t *focus_obj; 109 | 110 | typedef struct { 111 | int flags; 112 | int pos_x, pos_y; 113 | int w,h; 114 | int ready; 115 | struct object_t *objs; 116 | drop_t *drop_buffer; 117 | // Uint8 *drop_buffer; 118 | int drop_w, drop_h, drop_d; 119 | 120 | } group_t; 121 | 122 | extern group_t *current_grp; 123 | 124 | void default_tick(void); 125 | void null_tick(void); 126 | int wait_on_mouse(void); 127 | struct object_t *new_obj(group_t *grp, obj_param_t *param); 128 | group_t *new_group(int x,int y, int w, int h, int flags, int drop_d); 129 | int destroy_group(group_t *grp); 130 | int group_loop(group_t *grp); 131 | int broadcast_group(group_t *grp, int msg, int data); 132 | int init_gui(int x, int y, int flags); 133 | -------------------------------------------------------------------------------- /gui/gui_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | #ifndef TRUE 7 | #define TRUE (1) 8 | #endif 9 | 10 | #ifndef FALSE 11 | #define FALSE (0) 12 | #endif 13 | 14 | #define CHECK_FLAG(x,y) ( (x&y)==y ? (TRUE) : (FALSE) ) 15 | -------------------------------------------------------------------------------- /gui/knob.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * knob_xpm[] = { 3 | "41 41 18 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #001F1F", 7 | "@ c #000404", 8 | "# c #000A0A", 9 | "$ c #001111", 10 | "% c #818945", 11 | "& c #D2B13E", 12 | "* c #727F44", 13 | "= c #001515", 14 | "- c #667943", 15 | "; c #BBA249", 16 | "> c #183C2F", 17 | ", c #697B43", 18 | "' c #6F7F44", 19 | ") c #758245", 20 | "! c #788345", 21 | "~ c #728044", 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 | " ....>&&&&&&&&&&&&&&&&&&&&;;;;;;;>.... ", 52 | " ....&&&&&&&&&&&&&&&&&&&;;;;;;;;.... ", 53 | " .....&&&&&&&&&&&&&&&&;;;;;;;;;..... ", 54 | " .....&&&&&&&&&&&&&;;;;;;;;;;..... ", 55 | " .....&&&&&&&&&;;;;;;;;;;;;..... ", 56 | " .....>&&&;;;;;;;;;;;;;;>..... ", 57 | " .....@;;;;;;;;;;;;;;-@..... ", 58 | " .......$!;;;;;;;~$....... ", 59 | " ....................... ", 60 | " .................@. ", 61 | " ............... ", 62 | " ......... "}; 63 | -------------------------------------------------------------------------------- /gui/knob_point.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * knob_point_xpm[] = { 3 | "11 11 10 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #030302", 7 | "@ c #000101", 8 | "# c #040403", 9 | "$ c #BBA249", 10 | "% c #010101", 11 | "& c #080805", 12 | "* c #D2B13E", 13 | "= c #090805", 14 | " ..... ", 15 | " ..++++@.. ", 16 | " .#$$$$$%. ", 17 | ".#$$$$$$$@.", 18 | ".&$$*****+.", 19 | ".=$$*****+.", 20 | ".=$$*****+.", 21 | ".&$$*****+.", 22 | " .=$****#. ", 23 | " ..&==&#.. ", 24 | " ..... "}; 25 | -------------------------------------------------------------------------------- /gui/libgui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | 7 | #include "gui_types.h" 8 | #include "link.h" 9 | #include "drop.h" 10 | #include "gui.h" 11 | #include "draw.h" 12 | #include "std_dialog.h" 13 | #include "font.h" 14 | #include "timer.h" 15 | #include "load_save.h" 16 | #include "menu.h" 17 | 18 | -------------------------------------------------------------------------------- /gui/link.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | #include "link.h" 7 | 8 | void __list_add(struct list_head *new, 9 | struct list_head *prev, 10 | struct list_head *next) { 11 | next->prev = new; 12 | new->next = next; 13 | new->prev = prev; 14 | prev->next = new; 15 | } 16 | 17 | void list_add(struct list_head *new, struct list_head *head) { 18 | __list_add(new,head,head->next); 19 | } 20 | 21 | void __list_del(struct list_head *prev, struct list_head *next) { 22 | next->prev = prev; 23 | prev->next = next; 24 | } 25 | 26 | void list_del(struct list_head *entry) { 27 | __list_del(entry->prev, entry->next); 28 | } 29 | -------------------------------------------------------------------------------- /gui/link.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | struct list_head { 7 | struct list_head *next, *prev; 8 | }; 9 | 10 | #define INIT_LIST_HEAD(ptr) do { \ 11 | (ptr)->next = (ptr); (ptr)->prev = (ptr); \ 12 | } while (0) 13 | 14 | 15 | void list_add(struct list_head *new, struct list_head *head); 16 | void list_del(struct list_head *entry); 17 | -------------------------------------------------------------------------------- /gui/load_save.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | #define BIGBUF 2048 7 | #define MEDBUF 256 8 | #define SMALLBUF 64 9 | 10 | #define LOAD_OK_QUIT 1 11 | #define NOPE_TRY_AGAIN 2 12 | 13 | #define LOAD 1 14 | #define SAVE 2 15 | #define CLICKED 1 16 | #define NO_TEXT 2 17 | 18 | 19 | struct select_file_t { 20 | group_t *grp; 21 | int type; 22 | int usr_flags; 23 | char file_type_name[SMALLBUF]; 24 | gui_timer_t *blinky; 25 | int (*load_proc)(struct select_file_t *selector, char *filename); 26 | char path[BIGBUF]; 27 | char name[BIGBUF]; 28 | char return_buf[BIGBUF]; 29 | char text_lines[BIGBUF][MEDBUF]; 30 | struct object_t **lines; 31 | int offset; 32 | int selected_line, nlines; 33 | int end; 34 | struct object_t *scroll_bar; 35 | struct object_t *name_object; 36 | }; 37 | void read_dir(struct select_file_t *selector); 38 | int line_edit(int msg, struct object_t *obj, int data); 39 | void do_overlay_window(struct select_file_t *selector); 40 | struct select_file_t *setup_overlay_window(int w, int h, int type, char *file_type_name, 41 | int (*load_proc)(struct select_file_t *selector, char *filename)); 42 | -------------------------------------------------------------------------------- /gui/menu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | 7 | #include 8 | #include 9 | #include 10 | #include "gui_types.h" 11 | #include "link.h" 12 | #include "drop.h" 13 | #include "gui.h" 14 | #include "draw.h" 15 | #include "std_dialog.h" 16 | #include "font.h" 17 | #include "timer.h" 18 | #include "load_save.h" 19 | #include "menu.h" 20 | 21 | int menu_text(int msg, struct object_t *obj, int data) { 22 | switch(msg) { 23 | case MSG_DRAW: 24 | if(obj->in_focus == 1) { 25 | fill_box(obj->param.x, obj->param.y, 26 | obj->param.x+obj->param.w, obj->param.y + obj->param.h, 27 | obj->param.fg, obj->param.bg, NO_HASH); 28 | draw_text(obj->param.x, obj->param.y, obj->param.dp1, obj->param.bg, obj->param.bg, NO_HASH,0); 29 | } else { 30 | fill_box(obj->param.x, obj->param.y, 31 | obj->param.x+obj->param.w, obj->param.y + obj->param.h, 32 | obj->param.bg, obj->param.fg, NO_HASH); 33 | draw_text(obj->param.x, obj->param.y, obj->param.dp1, obj->param.fg, obj->param.bg, NO_HASH,0); 34 | } 35 | break; 36 | case MSG_INFOCUS: 37 | case MSG_OUTFOCUS: 38 | menu_text(MSG_DRAW, obj, data); 39 | break; 40 | case MSG_PRESS: 41 | if(CHECK_FLAG(obj->param.flags, CALL_BUTTON) == TRUE) 42 | return obj->param.callback(obj, 0); 43 | break; 44 | } 45 | return RET_OK; 46 | } 47 | 48 | int quit_proc(int msg, struct object_t *obj, int data) { 49 | if(msg == MSG_INFOCUS || msg==MSG_MOUSEMOVE) 50 | return RET_QUIT; 51 | else 52 | return RET_OK; 53 | } 54 | 55 | group_t *new_menu(int x, int y, struct menu_entry_t *root, color_t *fg, color_t *bg) { 56 | group_t *new; 57 | obj_param_t tmp_parm; 58 | int w, h; 59 | int i,j; 60 | w = 10; 61 | for(i=0;;i++) { 62 | if(root[i].name!=NULL) { 63 | j = strlen(root[i].name); 64 | if(((j * 8)+10)>w) 65 | w = (j*8)+10; 66 | } else { 67 | break; 68 | } 69 | } 70 | h = (i*8)+10; 71 | new = new_group(x, y, w+2, h+2, globl_flags, globl_drop_depth); 72 | PARM(0,0,w,h, fg, bg, 0, proc_shadow_box); 73 | new_obj(new, &tmp_parm); 74 | 75 | PARM(0-x,0-y, x, gui_screen->h, 0,0,0, quit_proc); 76 | new_obj(new, &tmp_parm); 77 | 78 | PARM(0, 0-y, w, y, 0,0,0, quit_proc); 79 | new_obj(new, &tmp_parm); 80 | 81 | PARM(0, h, w, gui_screen->h - h, 0,0,0, quit_proc); 82 | new_obj(new, &tmp_parm); 83 | 84 | PARM(w, 0-y, gui_screen->w - w, gui_screen->h, 0,0,0, quit_proc); 85 | new_obj(new, &tmp_parm); 86 | 87 | for(j=0;j 9 | * 10 | * This is free software. You may redistribute and/or modify it as you 11 | * see fit, without restriction of copyright. 12 | * 13 | * This software is provided "as is", in the hope that it may be useful, 14 | * but WITHOUT WARRANTY OF ANY KIND, not even any implied warranty of 15 | * MERCHANTABILITY, nor of FITNESS FOR ANY PARTICULAR PURPOSE. At no 16 | * time will the author accept any form of liability for any damages, 17 | * however caused, resulting from the use of this software. 18 | * 19 | */ 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | char __cdecl 26 | *realpath( const char *__restrict__ name, char *__restrict__ resolved ) 27 | { 28 | char *retname = NULL; /* we will return this, if we fail */ 29 | 30 | /* SUSv3 says we must set `errno = EINVAL', and return NULL, 31 | * if `name' is passed as a NULL pointer. 32 | */ 33 | 34 | if( name == NULL ) 35 | errno = EINVAL; 36 | 37 | /* Otherwise, `name' must refer to a readable filesystem object, 38 | * if we are going to resolve its absolute path name. 39 | */ 40 | 41 | else if( access( name, 4 ) == 0 ) 42 | { 43 | /* If `name' didn't point to an existing entity, 44 | * then we don't get to here; we simply fall past this block, 45 | * returning NULL, with `errno' appropriately set by `access'. 46 | * 47 | * When we _do_ get to here, then we can use `_fullpath' to 48 | * resolve the full path for `name' into `resolved', but first, 49 | * check that we have a suitable buffer, in which to return it. 50 | */ 51 | 52 | if( (retname = resolved) == NULL ) 53 | { 54 | /* Caller didn't give us a buffer, so we'll exercise the 55 | * option granted by SUSv3, and allocate one. 56 | * 57 | * `_fullpath' would do this for us, but it uses `malloc', and 58 | * Microsoft's implementation doesn't set `errno' on failure. 59 | * If we don't do this explicitly ourselves, then we will not 60 | * know if `_fullpath' fails on `malloc' failure, or for some 61 | * other reason, and we want to set `errno = ENOMEM' for the 62 | * `malloc' failure case. 63 | */ 64 | 65 | retname = malloc( _MAX_PATH ); 66 | } 67 | 68 | /* By now, we should have a valid buffer. 69 | * If we don't, then we know that `malloc' failed, 70 | * so we can set `errno = ENOMEM' appropriately. 71 | */ 72 | 73 | if( retname == NULL ) 74 | errno = ENOMEM; 75 | 76 | /* Otherwise, when we do have a valid buffer, 77 | * `_fullpath' should only fail if the path name is too long. 78 | */ 79 | 80 | else if( (retname = _fullpath( retname, name, _MAX_PATH )) == NULL ) 81 | errno = ENAMETOOLONG; 82 | } 83 | 84 | /* By the time we get to here, 85 | * `retname' either points to the required resolved path name, 86 | * or it is NULL, with `errno' set appropriately, either of which 87 | * is our required return condition. 88 | */ 89 | 90 | return retname; 91 | } 92 | 93 | /* $RCSfile$: end of file */ 94 | -------------------------------------------------------------------------------- /gui/realpath.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | char __cdecl 7 | *realpath( const char *__restrict__ name, char *__restrict__ resolved ); 8 | 9 | -------------------------------------------------------------------------------- /gui/sign: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if ! which csig; then 4 | echo "installing csig in current directory" 5 | grep SCRIPT: $0 | grep -v "grep SCRIPT:" | sed -e s/SCRIPT://g > csig 6 | PROG="./csig" 7 | chmod +x ./csig 8 | else 9 | PROG="csig" 10 | fi 11 | 12 | for ff in *.c *.h; do 13 | ${PROG} ${ff}; 14 | done 15 | 16 | exit 17 | 18 | SCRIPT:#!/bin/sh 19 | SCRIPT: 20 | SCRIPT:if expr $# "<" "1" > /dev/null; then 21 | SCRIPT: echo "Usage: csig " 22 | SCRIPT: exit 23 | SCRIPT:fi 24 | SCRIPT: 25 | SCRIPT:echo "********* " $1 "*********" 26 | SCRIPT: 27 | SCRIPT:if ! test -f $1; then 28 | SCRIPT: echo $1 "no such file :(" 29 | SCRIPT: exit 30 | SCRIPT:fi 31 | SCRIPT: 32 | SCRIPT:if gpg --verify $1; then 33 | SCRIPT: echo "*** already signed, and verifiable- doing nothing" 34 | SCRIPT: exit 35 | SCRIPT:fi 36 | SCRIPT: 37 | SCRIPT:rm -f /tmp/csig.sign 38 | SCRIPT:grep HEADER: $0 | grep -v grep | sed -e s/HEADER://g > /tmp/csig.plain 39 | SCRIPT: 40 | SCRIPT:cat /tmp/csig.plain | wc -l > /tmp/header_size 41 | SCRIPT: 42 | SCRIPT:head -n `expr \`cat /tmp/header_size\` + 4` $1 | tail -n `cat /tmp/header_size` > /tmp/diff_one 43 | SCRIPT: 44 | SCRIPT:if `diff /tmp/csig.plain /tmp/diff_one > /dev/null`; then 45 | SCRIPT: echo "*** ok, resigning" 46 | SCRIPT: 47 | SCRIPT: grep TAIL: $0 | grep -v grep | sed -e s/TAIL://g > /tmp/tail 48 | SCRIPT: cat /tmp/tail | wc -l > /tmp/tail_size 49 | SCRIPT: expr `cat /tmp/tail_size` + 8 > /tmp/tail_size 50 | SCRIPT: 51 | SCRIPT: 52 | SCRIPT: tail +`expr \`cat /tmp/header_size\` + 5` $1 > /tmp/strip0 53 | SCRIPT: 54 | SCRIPT: 55 | SCRIPT: cat /tmp/strip0 | wc -l > /tmp/strip_size 56 | SCRIPT: head -n `expr \` cat /tmp/strip_size\` - \`cat /tmp/tail_size\`` /tmp/strip0 > /tmp/strip 57 | SCRIPT: 58 | SCRIPT:else 59 | SCRIPT: echo "*** ok, signing new file" 60 | SCRIPT: cp $1 /tmp/strip 61 | SCRIPT:fi 62 | SCRIPT: 63 | SCRIPT:cat /tmp/strip >> /tmp/csig.plain 64 | SCRIPT:grep TAIL: $0 | grep -v grep | sed -e s/TAIL://g >> /tmp/csig.plain 65 | SCRIPT:if ! gpg --default-key 0xA6E706B3 --armor --output /tmp/csig.sign --clearsign /tmp/csig.plain; then 66 | SCRIPT: echo "*** couldn't sign for some reason (probably doesn't have the private key), aborting" 67 | SCRIPT: rm -rf /tmp/csig.plain \ 68 | SCRIPT: /tmp/csig.sign \ 69 | SCRIPT: /tmp/diff_one \ 70 | SCRIPT: /tmp/header_size \ 71 | SCRIPT: /tmp/tail_size \ 72 | SCRIPT: /tmp/tail \ 73 | SCRIPT: /tmp/strip_size \ 74 | SCRIPT: /tmp/strip \ 75 | SCRIPT: /tmp/strip0 76 | SCRIPT: 77 | SCRIPT: exit 78 | SCRIPT:fi 79 | SCRIPT: 80 | SCRIPT:echo "/*" > /tmp/strip 81 | SCRIPT:cat /tmp/csig.sign >> /tmp/strip 82 | SCRIPT:echo "*/" >> /tmp/strip 83 | SCRIPT: 84 | SCRIPT:cp /tmp/strip $1 85 | SCRIPT:rm -rf /tmp/csig.plain \ 86 | SCRIPT: /tmp/csig.sign \ 87 | SCRIPT: /tmp/diff_one \ 88 | SCRIPT: /tmp/header_size \ 89 | SCRIPT: /tmp/tail_size \ 90 | SCRIPT: /tmp/tail \ 91 | SCRIPT: /tmp/strip_size \ 92 | SCRIPT: /tmp/strip \ 93 | SCRIPT: /tmp/strip0 94 | SCRIPT: 95 | SCRIPT:exit 96 | SCRIPT: 97 | SCRIPT:HEADER: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xA6E70B3 98 | SCRIPT:HEADER: m m mm mmm .----------. .---------------------. mmm mm m m 99 | SCRIPT:HEADER: 8 8 88 888 | .--------` | .------------------` 888 88 8 8 100 | SCRIPT:HEADER: 8 8 88 888 | ```````|`V```````| |``||``|`````| 888 88 8 8 101 | SCRIPT:HEADER: 8 8 88 888 `------ | | [] | |``````|| | [] | 888 88 8 8 102 | SCRIPT:HEADER: 8 8 88 888 |`````` | | | ````|```` | | 888 88 8 8 103 | SCRIPT:HEADER: ` ` `` ``` ``````````````> |````````````| |`` ``` `` ` ` 104 | SCRIPT:HEADER: ==============` `---` 105 | SCRIPT:HEADER: L A B O R A T O R I E S 106 | SCRIPT:HEADER: 107 | SCRIPT:HEADER: Good hello, this is official SigFLUP-Labs sourcecode :-() 108 | SCRIPT:HEADER: 109 | SCRIPT:HEADER: This is GNU software, please read ../LICENSE for details 110 | SCRIPT:HEADER:*/ 111 | SCRIPT: 112 | SCRIPT:TAIL:/* 113 | SCRIPT:TAIL: Thank you for your attention 114 | -------------------------------------------------------------------------------- /gui/std_dialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | /* flags */ 7 | #define SHOW_FOCUS 1 8 | #define QUIT_BUTTON 2 9 | #define CALL_BUTTON 4 10 | #define INTERNAL1 8 11 | #define INVALID 16 12 | #define INTERNAL2 32 13 | #define TOGGLE 64 14 | #define DROP_SHADOW 128 15 | #define DROP_SHADOW_READY 256 16 | #define DROP_ACCUM 512 17 | #define CLICKED_DOWN 1024 18 | #define LOAD_XPM_FROM_ARRAY 2048 19 | #define MAX_CHARS 4096 20 | #define SINGLE_RADIO 8192 21 | #define INACTIVE 16384 22 | #define MODULAR 32768 23 | #define HEX 65536 24 | #define BLUE 131072 25 | 26 | #define MAX_PROMPT_LINES 30 27 | 28 | #define MOVE_GROUP 3 29 | 30 | 31 | void simple_window(group_t *grp, int w, int h); 32 | int prompt(int cent_x, int cent_y, char *message, char *yes_text, char *no_text); 33 | void alert(int cent_x, int cent_y, char *message, char *ok_text); 34 | void scroll_text_window(int cent_x, int cent_y, int w, int h, char *text, int len); 35 | int proc_bitmap(int msg, struct object_t *obj, int data); 36 | int proc_scroll_bar(int msg, struct object_t *obj, int data); 37 | int proc_icon_button(int msg, struct object_t *obj, int data); 38 | int proc_radio_button(int msg, struct object_t *obj, int data); 39 | int proc_move_button(int msg, struct object_t *obj, int data); 40 | int proc_text(int msg, struct object_t *obj, int data); 41 | int proc_ctext(int msg, struct object_t *obj, int data); 42 | int proc_box(int msg, struct object_t *obj, int data); 43 | int proc_shadow_box(int msg, struct object_t *obj, int data); 44 | int proc_button_box(int msg, struct object_t *obj, int data); 45 | int proc_hash_box(int msg, struct object_t *obj, int data); 46 | int proc_knob(int msg, struct object_t *obj, int data); 47 | int proc_edit_line(int msg, struct object_t *obj, int data); 48 | 49 | -------------------------------------------------------------------------------- /gui/timer.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include "gui_types.h" 12 | #include "link.h" 13 | #include "drop.h" 14 | #include "gui.h" 15 | #include "draw.h" 16 | #include "std_dialog.h" 17 | #include "timer.h" 18 | 19 | int timer_lock; 20 | 21 | gui_timer_t *globl_timer; 22 | 23 | Uint32 timer_callback(Uint32 interval, void *a) { 24 | gui_timer_t *walker; 25 | 26 | /* if(globl_dirt == 1 || lock_update == 0) { 27 | clipped_update(0,0,0,0); 28 | globl_dirt = 0; 29 | } */ 30 | 31 | if(globl_timer == (void *)-1) return interval; 32 | if(timer_lock == 1) return interval; 33 | walker = globl_timer; 34 | for(;;) { 35 | if( CHECK_FLAG(walker->flags, STOPPED) == FALSE) { 36 | walker->timer++; 37 | if(walker->timer == walker->reset) { 38 | walker->timer = 0; 39 | if(CHECK_FLAG(walker->flags, ACTIVE_ONLY_WITH_PARENT) == FALSE) 40 | walker->obj->param.proc(walker->msg, walker->obj, walker->data); 41 | else 42 | if(current_grp == walker->parent_grp) 43 | walker->obj->param.proc(walker->msg, walker->obj, walker->data); 44 | } 45 | } 46 | walker = (gui_timer_t *)walker->node.next; 47 | if(walker == globl_timer) break; 48 | } 49 | return interval; 50 | } 51 | 52 | void init_timers(void) { 53 | globl_timer = (void *)-1; 54 | timer_lock = 0; 55 | SDL_AddTimer( 20, timer_callback, (void *)0); 56 | } 57 | 58 | gui_timer_t *add_timer(struct object_t *obj, int reset, int msg, int data,group_t *parent,int flags) { 59 | gui_timer_t *new; 60 | timer_lock = 1; 61 | if(globl_timer == (void *)-1) { 62 | globl_timer = (gui_timer_t *)malloc(sizeof(gui_timer_t) ); 63 | INIT_LIST_HEAD(&globl_timer->node); 64 | new = globl_timer; 65 | } else { 66 | new = (gui_timer_t *)malloc(sizeof(gui_timer_t) ); 67 | list_add(&new->node, &globl_timer->node); 68 | } 69 | new->timer = 0; 70 | new->reset = reset; 71 | new->msg = msg; 72 | new->data = data; 73 | new->obj = obj; 74 | new->parent_grp = parent; 75 | new->flags = flags; 76 | timer_lock = 0; 77 | return new; 78 | } 79 | 80 | void del_timer(gui_timer_t *in) { 81 | timer_lock = 1; 82 | list_del(&in->node); 83 | if(in == globl_timer) { 84 | free(globl_timer); 85 | globl_timer = (void *)-1; 86 | } 87 | timer_lock = 0; 88 | } 89 | -------------------------------------------------------------------------------- /gui/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read ../LICENSE for more info 4 | */ 5 | 6 | #define ACTIVE_ONLY_WITH_PARENT 1 7 | #define STOPPED 2 8 | 9 | typedef struct { 10 | struct list_head node; 11 | int flags; 12 | struct object_t *obj; 13 | group_t *parent_grp; 14 | int timer; 15 | int reset; 16 | int msg, data; 17 | } gui_timer_t; 18 | 19 | extern gui_timer_t *globl_timer; 20 | extern Uint32 timer_callback(Uint32 interval, void *a); 21 | 22 | void init_timers(void); 23 | gui_timer_t *add_timer(struct object_t *obj, int reset, int msg, int data, group_t *parent,int flags); 24 | 25 | void del_timer(gui_timer_t *in); 26 | -------------------------------------------------------------------------------- /mega-happy-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/mega-happy-sprite.png -------------------------------------------------------------------------------- /mega.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read LICENSE for more info 4 | */ 5 | 6 | #define B0000 0x0 7 | #define B0001 0x1 8 | #define B0010 0x2 9 | #define B0011 0x3 10 | #define B0100 0x4 11 | #define B0101 0x5 12 | #define B0110 0x6 13 | #define B0111 0x7 14 | #define B1000 0x8 15 | #define B1001 0x9 16 | #define B1010 0xA 17 | #define B1011 0xB 18 | #define B1100 0xC 19 | #define B1101 0xD 20 | #define B1110 0xE 21 | #define B1111 0xF 22 | 23 | #define MAX_UNDO 0xf 24 | 25 | #define LINE 0 26 | #define FILL 1 27 | #define PIC 2 28 | #define CLRCOLOR 3 29 | #define PIC_PAT 4 30 | #define PUT_PAT 5 31 | #define FLIP 6 32 | #define HI_LOW 7 33 | #define PUT_PAL 8 34 | #define SELECT 9 35 | 36 | #define LOAD_CRAM 0 37 | #define LOAD_VRAM 1 38 | #define LOAD_HAPPY 4 39 | #define LOAD_VSRAM 5 40 | #define LOAD_BMP 10 41 | #define SAVE_CRAM 2 42 | #define SAVE_VRAM 3 43 | #define SAVE_HAPPY 6 44 | #define SAVE_VSRAM 7 45 | #define SAVE_CRAM_HEAD 8 46 | #define CHANGE_LOAD_MESSAGE 9 47 | 48 | 49 | #define CAPTION "::Mega-Happy-Sprite::" 50 | 51 | extern group_t *main_grp; 52 | extern group_t *load_grp, *save_grp; 53 | extern group_t *high_low_grp; 54 | extern group_t *pal_hi_low_grp; 55 | extern group_t *hor_ver_grp; 56 | extern group_t *copy_move_grp; 57 | extern group_t *pointers; 58 | extern group_t *select_grp; 59 | extern group_t *change_message_grp; 60 | 61 | extern SDL_Cursor *arrow, *cross, *vertical, *horizontal, *no; 62 | extern SDL_Cursor *working_cursor; 63 | extern SDL_Cursor *cross_scroll_a, *cross_scroll_b, *cross_sprite; 64 | extern SDL_Cursor *hor_a_flip, *ver_a_flip, *hor_b_flip, *ver_b_flip; 65 | 66 | extern struct select_file_t *overlay_sel; 67 | extern struct select_file_t *background_sel; 68 | 69 | extern int load_initial; 70 | extern char *load_initial_name; 71 | 72 | extern int current_tool; 73 | extern int undo_A, undo_B, undo_D; 74 | 75 | extern color_t sprite_color, hscroll_color, scroll_a_color, scroll_b_color, window_color; 76 | 77 | extern struct object_t *text_edit_object; 78 | extern struct object_t *rgb_box_object; 79 | extern struct object_t *bg_color_box; 80 | extern struct object_t *sprite_radio; 81 | extern struct object_t *hscroll_radio; 82 | extern struct object_t *scroll_a_radio; 83 | extern struct object_t *scroll_b_radio; 84 | extern struct object_t *window_radio; 85 | extern struct object_t *knob_text; 86 | extern struct object_t *select_special_object; 87 | extern struct object_t *horizontal_scroll_bar, *vertical_scroll_bar; 88 | extern struct object_t *info_object; 89 | 90 | extern struct object_t *stop_object; 91 | extern struct object_t *clob_object; 92 | 93 | void save_state(void); 94 | void undo(void); 95 | 96 | extern struct object_t *knob_message_box, *knob, *knob_icon, *knob_message; 97 | 98 | extern struct object_t *preview_box_object; 99 | extern struct object_t *preview_scroll_bar; 100 | extern struct object_t *preview_x_scroll, *preview_y_scroll; 101 | extern struct object_t *preview_ntsc, *preview_pal; 102 | extern struct object_t *preview_40c, *preview_32c; 103 | extern struct object_t *preview_zoom_in, *preview_zoom_out; 104 | extern struct object_t *preview_overlay; 105 | 106 | extern struct object_t *scroll_size1, *scroll_size2; 107 | extern struct object_t *sprite_size1, *sprite_size2; 108 | 109 | extern struct object_t *background_object; 110 | extern struct object_t *select_object, *put_object, *fill_object, *line_object, *pic_object; 111 | extern struct object_t *pic_pat_object, *put_pat_object, *flip_object; 112 | extern struct object_t *clear_to_color_object, *pal_hi_low_object, *select_object; 113 | 114 | extern struct object_t *plus_object, *minus_object, *a_object, *b_object; 115 | extern struct object_t *select_a_object, *select_b_object; 116 | 117 | extern int sprite_overlay_pic; 118 | extern int a_pattern, b_pattern; 119 | 120 | int load_ovr(char *filename); 121 | -------------------------------------------------------------------------------- /mega.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/mega.ico -------------------------------------------------------------------------------- /mega.rc: -------------------------------------------------------------------------------- 1 | id ICON "mega.ico" 2 | -------------------------------------------------------------------------------- /mega_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read LICENSE for more info 4 | */ 5 | 6 | 7 | extern char load_message[]; 8 | int load_save_mega(struct select_file_t *selector, char *filename); 9 | -------------------------------------------------------------------------------- /pic/a.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * a_xpm[] = { 3 | "20 20 6 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #43B1B8", 8 | "# c #3C9FA5", 9 | "$ c #FFFFFF", 10 | "....................", 11 | ".++++++++++++++++++.", 12 | ".++++++......++++++.", 13 | ".+++++.@@@@@@.+++++.", 14 | ".++++.@@@@@@@@.++++.", 15 | ".+++.@@@@@@@@@#.+++.", 16 | ".++.@@@$$$$$$###.++.", 17 | ".+.@@@$@@@@@#$###.+.", 18 | ".+.@@@$@@@@##$###.+.", 19 | ".+.@@@$@@@###$###.+.", 20 | ".+.@@@$$$$$$$$###.+.", 21 | ".+.@@@$@#####$###.+.", 22 | ".+.@@@$######$###.+.", 23 | ".++.@@$######$##.++.", 24 | ".+++.##########.+++.", 25 | ".++++.########.++++.", 26 | ".+++++.######.+++++.", 27 | ".++++++......++++++.", 28 | ".++++++++++++++++++.", 29 | "...................."}; 30 | -------------------------------------------------------------------------------- /pic/b.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * b_xpm[] = { 3 | "20 20 6 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #43B1B8", 8 | "# c #3C9FA5", 9 | "$ c #FFFFFF", 10 | "....................", 11 | ".++++++++++++++++++.", 12 | ".++++++......++++++.", 13 | ".+++++.@@@@@@.+++++.", 14 | ".++++.@@@@@@@@.++++.", 15 | ".+++.@@@@@@@@@#.+++.", 16 | ".++.@@$$$$$$$###.++.", 17 | ".+.@@@$@@@@@#$###.+.", 18 | ".+.@@@$@@@@##$###.+.", 19 | ".+.@@@$@@@###$###.+.", 20 | ".+.@@@$$$$$$$####.+.", 21 | ".+.@@@$@#####$###.+.", 22 | ".+.@@@$######$###.+.", 23 | ".++.@@$$$$$$$###.++.", 24 | ".+++.##########.+++.", 25 | ".++++.########.++++.", 26 | ".+++++.######.+++++.", 27 | ".++++++......++++++.", 28 | ".++++++++++++++++++.", 29 | "...................."}; 30 | -------------------------------------------------------------------------------- /pic/back.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/pic/back.xcf -------------------------------------------------------------------------------- /pic/clear.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * clear_xpm[] = { 3 | "20 20 6 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #43B1B8", 8 | "# c #3C9FA5", 9 | "$ c #FFFFFF", 10 | "....................", 11 | ".++++++++++++++++++.", 12 | ".++++++......++++++.", 13 | ".+++++.@@@@@@.+++++.", 14 | ".++++.@@@@@@@@.++++.", 15 | ".+++.@@@@@@@@@#.+++.", 16 | ".++.@@@@@@@@@###.++.", 17 | ".+.@@$$@$@@@#$$##.+.", 18 | ".+.@$@@@$@@##$#$#.+.", 19 | ".+.@$@@@$@###$$##.+.", 20 | ".+.@$@@@$####$#$#.+.", 21 | ".+.@@$$@$$$$#$#$#.+.", 22 | ".+.@@@@##########.+.", 23 | ".++.@@##########.++.", 24 | ".+++.##########.+++.", 25 | ".++++.########.++++.", 26 | ".+++++.######.+++++.", 27 | ".++++++......++++++.", 28 | ".++++++++++++++++++.", 29 | "...................."}; 30 | -------------------------------------------------------------------------------- /pic/clear_to_color.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * clear_to_color_xpm[] = { 3 | "34 30 165 2", 4 | " c #000000", 5 | ". c #DBCCE0", 6 | "+ c #A795AD", 7 | "@ c #29132E", 8 | "# c #32163A", 9 | "$ c #D3BAD7", 10 | "% c #B4A3BA", 11 | "& c #4C3655", 12 | "* c #A978B1", 13 | "= c #1C0D1C", 14 | "- c #040004", 15 | "; c #412A46", 16 | "> c #9A4299", 17 | ", c #813A83", 18 | "' c #762E6A", 19 | ") c #29122A", 20 | "! c #B163AE", 21 | "~ c #B0429C", 22 | "{ c #A93986", 23 | "] c #A23172", 24 | "^ c #8F3686", 25 | "/ c #CB58C9", 26 | "( c #954299", 27 | "_ c #914B98", 28 | ": c #9A214E", 29 | "< c #7B0E20", 30 | "[ c #70193A", 31 | "} c #B04BB1", 32 | "| c #ED7CF0", 33 | "1 c #D660D8", 34 | "2 c #944295", 35 | "3 c #884691", 36 | "4 c #82002D", 37 | "5 c #B6002C", 38 | "6 c #53001F", 39 | "7 c #52004B", 40 | "8 c #B345A1", 41 | "9 c #EB78ED", 42 | "0 c #E169E3", 43 | "a c #94429A", 44 | "b c #813B8A", 45 | "c c #5E79ED", 46 | "d c #5E78ED", 47 | "e c #5D78EB", 48 | "f c #5C77EA", 49 | "g c #5B75E8", 50 | "h c #5A74E6", 51 | "i c #5873E5", 52 | "j c #5771E2", 53 | "k c #AB0E4A", 54 | "l c #C40C3B", 55 | "m c #2F071B", 56 | "n c #37002A", 57 | "o c #4F0047", 58 | "p c #E876E7", 59 | "q c #D35DD5", 60 | "r c #B189B8", 61 | "s c #5D78EC", 62 | "t c #5B76E8", 63 | "u c #5A75E7", 64 | "v c #5973E5", 65 | "w c #5772E3", 66 | "x c #5670E1", 67 | "y c #A40A35", 68 | "z c #C40C3E", 69 | "A c #475DBC", 70 | "B c #050207", 71 | "C c #863A88", 72 | "D c #BC4EB9", 73 | "E c #442545", 74 | "F c #5E79EC", 75 | "G c #5C77EB", 76 | "H c #5A74E7", 77 | "I c #5872E3", 78 | "J c #5771E1", 79 | "K c #556FDF", 80 | "L c #B2125C", 81 | "M c #C50C41", 82 | "N c #526BDA", 83 | "O c #4E68D3", 84 | "P c #030003", 85 | "Q c #060206", 86 | "R c #5D79ED", 87 | "S c #5D77EA", 88 | "T c #5B76E9", 89 | "U c #5772E4", 90 | "V c #556FE0", 91 | "W c #546EDE", 92 | "X c #B3125C", 93 | "Y c #C10A34", 94 | "Z c #516AD8", 95 | "` c #4F69D7", 96 | " . c #5C76E9", 97 | ".. c #5873E3", 98 | "+. c #566FE0", 99 | "@. c #536DDD", 100 | "#. c #536CDB", 101 | "$. c #506AD8", 102 | "%. c #5069D7", 103 | "&. c #4F68D5", 104 | "*. c #5C78EB", 105 | "=. c #5A75E8", 106 | "-. c #5A73E5", 107 | ";. c #5873E4", 108 | ">. c #5670E0", 109 | ",. c #556EDF", 110 | "'. c #546DDD", 111 | "). c #526BDB", 112 | "!. c #516AD9", 113 | "~. c #506AD7", 114 | "{. c #4D66D3", 115 | "]. c #5B76EA", 116 | "^. c #5974E6", 117 | "/. c #5772E2", 118 | "(. c #5570E0", 119 | "_. c #526CDB", 120 | ":. c #516BD9", 121 | "<. c #4E69D6", 122 | "[. c #4D67D4", 123 | "}. c #4C65D2", 124 | "|. c #5871E3", 125 | "1. c #536DDC", 126 | "2. c #5169D8", 127 | "3. c #4E67D4", 128 | "4. c #4D66D2", 129 | "5. c #4B64D0", 130 | "6. c #5975E6", 131 | "7. c #5771E3", 132 | "8. c #546EDD", 133 | "9. c #4C64D1", 134 | "0. c #4A64CE", 135 | "a. c #5671E1", 136 | "b. c #536DDB", 137 | "c. c #4F69D6", 138 | "d. c #4E68D4", 139 | "e. c #4C65D1", 140 | "f. c #4A63CF", 141 | "g. c #4962CD", 142 | "h. c #5671E2", 143 | "i. c #516BD8", 144 | "j. c #5069D6", 145 | "k. c #4E67D3", 146 | "l. c #4B64CF", 147 | "m. c #4A62CD", 148 | "n. c #4862CB", 149 | "o. c #556FDE", 150 | "p. c #526CDA", 151 | "q. c #4F67D5", 152 | "r. c #4E66D3", 153 | "s. c #4C66D1", 154 | "t. c #4862CC", 155 | "u. c #4760CA", 156 | "v. c #546DDC", 157 | "w. c #4C66D2", 158 | "x. c #4C64CF", 159 | "y. c #4A62CE", 160 | "z. c #4962CC", 161 | "A. c #4861CA", 162 | "B. c #475FC9", 163 | "C. c #4E68D5", 164 | "D. c #4D66D1", 165 | "E. c #4A63CE", 166 | "F. c #4961CC", 167 | "G. c #4860CA", 168 | "H. c #465FC9", 169 | " ", 170 | " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", 171 | " . . . . . . . . . . . . . . . . . + @ # . . . . . . . . . . . . ", 172 | " . . . . . . . . . . . . . . . . . . $ % & . . . . . . . . . . . ", 173 | " . . . . . . . . . . . . . . . . . * = - ; . . . . . . . . . . . ", 174 | " . . . . . . . . . . . . . . . . . > , ' ) ! . . . . . . . . . . ", 175 | " . . . . . . . . . . . . . . . . ~ { ] ^ / ( _ . . . . . . . . . ", 176 | " . . . . . . . . . . . . . . . . : < [ } | 1 2 3 . . . . . . . . ", 177 | " . . . . . 4 5 6 7 8 9 0 a b . . . . . . . ", 178 | " . . . . . c d c d e f g h i j k l m n o 8 p q r . . . . . . . ", 179 | " . . . . . c c c s f t u v w x y z A B n C D E . . . . . . . . ", 180 | " . . . . . c c F G t H v I J K L M N O P Q Q . . . . . . . . . ", 181 | " . . . . . R c S T u v U j V W X Y Z ` . . . . . . . . . . . ", 182 | " . . . . . d G .u v ..j +.W @.#.$.%.&. . . . . . . . . . . . ", 183 | " . . . . . *. .=.-.;.j >.,.'.).!.~.&.{. . . . . . . . . . . . ", 184 | " . . . . . ].u ^.;./.(.K @._.:.~.<.[.}. . . . . . . . . . . . ", 185 | " . . . . . g ^.;.|.x K '.1.:.2.&.3.4.5. . . . . . . . . . . . ", 186 | " . . . . . 6.;.7.x K 8.1.N 2.&.3.4.9.0. . . . . . . . . . . . ", 187 | " . . . . . ;.I a.K 8.b.N $.c.d.4.e.f.g. . . . . . . . . . . . ", 188 | " . . . . . I h.(.8.1.N i.j.d.k.e.l.m.n. . . . . . . . . . . . ", 189 | " . . . . . h.K o.1.p.Z %.q.r.s.l.m.t.u. . . . . . . . . . . . ", 190 | " . . . . . +.W v.p.:.` &.k.w.x.y.z.A.B. . . . . . . . . . . . ", 191 | " . . . . . ,.v.p.:.~.C.k.D.5.E.F.G.B.H. . . . . . . . . . . . ", 192 | " . . . . . . . . . . . . . . . . ", 193 | " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", 194 | " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", 195 | " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", 196 | " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", 197 | " . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", 198 | " "}; 199 | -------------------------------------------------------------------------------- /pic/clob.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * clob_xpm[] = { 3 | "20 20 5 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #C047C2", 8 | "# c #A43CA5", 9 | "....................", 10 | ".++++++++++++++++++.", 11 | ".++++++......++++++.", 12 | ".+++++.@@@@@@.+++++.", 13 | ".++++.@@@@@@@@.++++.", 14 | ".+++.@@@@@@@@@#.+++.", 15 | ".++.@@@@@@@@@###.++.", 16 | ".+.@@..@.@@@#..##.+.", 17 | ".+.@.@@@.@@##.#.#.+.", 18 | ".+.@.@@@.@###..##.+.", 19 | ".+.@.@@@.####.#.#.+.", 20 | ".+.@@..@....#..##.+.", 21 | ".+.@@@@##########.+.", 22 | ".++.@@##########.++.", 23 | ".+++.##########.+++.", 24 | ".++++.########.++++.", 25 | ".+++++.######.+++++.", 26 | ".++++++......++++++.", 27 | ".++++++++++++++++++.", 28 | "...................."}; 29 | -------------------------------------------------------------------------------- /pic/fill.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * fill_xpm[] = { 3 | "34 30 27 1", 4 | " c #000000", 5 | ". c #DBCCE0", 6 | "+ c #181821", 7 | "@ c #101810", 8 | "# c #313931", 9 | "$ c #391810", 10 | "% c #5A5252", 11 | "& c #080008", 12 | "* c #42524A", 13 | "= c #424A4A", 14 | "- c #5A5A5A", 15 | "; c #422929", 16 | "> c #7C7B7D", 17 | ", c #524A4A", 18 | "' c #4A4242", 19 | ") c #6B5252", 20 | "! c #52424A", 21 | "~ c #732929", 22 | "{ c #848484", 23 | "] c #949494", 24 | "^ c #636363", 25 | "/ c #6B1010", 26 | "( c #A52939", 27 | "_ c #737373", 28 | ": c #9C1821", 29 | "< c #CE2131", 30 | "[ c #C61821", 31 | " ", 32 | " ................................ ", 33 | " ................................ ", 34 | " ................................ ", 35 | " ..........+@+#+................. ", 36 | " .........+.....$................ ", 37 | " ........+.......+............... ", 38 | " ........+...%&+++............... ", 39 | " ........+.*& & @............... ", 40 | " ........+**#@&& +=.............. ", 41 | " ........*-**#@; @%>............. ", 42 | " ........%,-,=''*&*)=............ ", 43 | " .......-%)%)%,!=&),%'........... ", 44 | " .......)))~)~)! {)-=-=.......... ", 45 | " .......;$~$~$;']]{^^,%=......... ", 46 | " .......~~///;'^^]]{^)*)=........ ", 47 | " .......(//(/~,%)_]]{^),=,....... ", 48 | " .......~:<~/;=%)^_]]{_-=-=...... ", 49 | " .......([[(/;#'%)^_]]]_^,=...... ", 50 | " .......:[[:$$$#',%)^{]{^^=...... ", 51 | " .......([[($&@';'!)))]]{^....... ", 52 | " .......:[[:. @$+=*%)__{=....... ", 53 | " .......:[[(.. @;#'=)^^ ........ ", 54 | " .......:[<~... @$+#=^ ......... ", 55 | " .......([[(.... @+#& .......... ", 56 | " .......([[:..... &............ ", 57 | " .......([[:..................... ", 58 | " ................................ ", 59 | " ................................ ", 60 | " "}; 61 | -------------------------------------------------------------------------------- /pic/flip.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * flip_xpm[] = { 3 | "34 30 5 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #2700CF", 8 | "# c #29196D", 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 | -------------------------------------------------------------------------------- /pic/line.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * line_xpm[] = { 3 | "34 30 7 1", 4 | " c #000000", 5 | ". c #DBCCE0", 6 | "+ c #08089C", 7 | "@ c #000008", 8 | "# c #000021", 9 | "$ c #101052", 10 | "% c #101852", 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 | -------------------------------------------------------------------------------- /pic/minus.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * minus_xpm[] = { 3 | "20 20 6 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #43B1B8", 8 | "# c #3C9FA5", 9 | "$ c #FFFFFF", 10 | "....................", 11 | ".++++++++++++++++++.", 12 | ".++++++......++++++.", 13 | ".+++++.@@@@@@.+++++.", 14 | ".++++.@@@@@@@@.++++.", 15 | ".+++.@@@@@@@@@#.+++.", 16 | ".++.@@@@@@@@@###.++.", 17 | ".+.@@@@@@@@@#####.+.", 18 | ".+.@@@@@@@@######.+.", 19 | ".+.@@$$$$$$$$$$##.+.", 20 | ".+.@@$$$$$$$$$$##.+.", 21 | ".+.@@@@@#########.+.", 22 | ".+.@@@@##########.+.", 23 | ".++.@@##########.++.", 24 | ".+++.##########.+++.", 25 | ".++++.########.++++.", 26 | ".+++++.######.+++++.", 27 | ".++++++......++++++.", 28 | ".++++++++++++++++++.", 29 | "...................."}; 30 | -------------------------------------------------------------------------------- /pic/new.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * new_xpm[] = { 3 | "20 20 5 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #FF2553", 8 | "# c #FFED25", 9 | "....................", 10 | ".++++++++++++++++++.", 11 | ".+.++++.++++.++++.+.", 12 | ".++.+++.++++.+++.++.", 13 | ".+++.+++.++.+++.+++.", 14 | ".++++.++.++.++.++++.", 15 | ".+++++@++++++@+++++.", 16 | ".+..+++@+@@+@+++..+.", 17 | ".+++..@+@##@+@..+++.", 18 | ".++++++@####@++++++.", 19 | ".++++++@####@++++++.", 20 | ".+++..@+@##@+@..+++.", 21 | ".+..+++@+@@+@+++..+.", 22 | ".+++++@++++++@+++++.", 23 | ".++++.++.++.++.++++.", 24 | ".+++.+++.++.+++.+++.", 25 | ".++.+++.++++.+++.++.", 26 | ".+.++++.++++.++++.+.", 27 | ".++++++++++++++++++.", 28 | "...................."}; 29 | -------------------------------------------------------------------------------- /pic/pal_hi_low.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * pal_hi_low_xpm[] = { 3 | "34 30 75 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #2A20EA", 8 | "# c #EA2020", 9 | "$ c #2AEA20", 10 | "% c #D9EA20", 11 | "& c #FFFFFF", 12 | "* c #BABABA", 13 | "= c #7C7C7C", 14 | "- c #DAC8DC", 15 | "; c #DAC9DB", 16 | "> c #D7C4D7", 17 | ", c #D8C3D6", 18 | "' c #D8C4D7", 19 | ") c #D6C0D1", 20 | "! c #D6BFD2", 21 | "~ c #D4BCCC", 22 | "{ c #D5BBCC", 23 | "] c #D4BCCD", 24 | "^ c #D3B8C7", 25 | "/ c #D3B7C7", 26 | "( c #D1B3C2", 27 | "_ c #D1B2C1", 28 | ": c #D1B3C3", 29 | "< c #CFAFBD", 30 | "[ c #CFAFBC", 31 | "} c #CEAAB8", 32 | "| c #CDABB8", 33 | "1 c #CCA6B2", 34 | "2 c #CBA6B3", 35 | "3 c #CAA2AE", 36 | "4 c #CAA2AD", 37 | "5 c #CAA3AE", 38 | "6 c #C99EA9", 39 | "7 c #C99EA8", 40 | "8 c #C79AA3", 41 | "9 c #C79AA4", 42 | "0 c #C5959E", 43 | "a c #C39199", 44 | "b c #C3929A", 45 | "c c #C18D94", 46 | "d c #C0888F", 47 | "e c #BF898F", 48 | "f c #BF8990", 49 | "g c #BE848A", 50 | "h c #BC8185", 51 | "i c #BC7F84", 52 | "j c #BB7C80", 53 | "k c #BB7B7F", 54 | "l c #B8787B", 55 | "m c #B9777A", 56 | "n c #B9787B", 57 | "o c #B87376", 58 | "p c #B77476", 59 | "q c #B56F70", 60 | "r c #B56E70", 61 | "s c #B66F70", 62 | "t c #B66F71", 63 | "u c #B56F6F", 64 | "v c #B56E6F", 65 | "w c #B56D6F", 66 | "x c #B46D6F", 67 | "y c #B46D6E", 68 | "z c #B56D6D", 69 | "A c #B46C6E", 70 | "B c #B46C6C", 71 | "C c #B46B6C", 72 | "D c #B46B6B", 73 | "E c #B36B6B", 74 | "F c #B46A6A", 75 | "G c #B3696A", 76 | "H c #B36969", 77 | "I c #B36A6A", 78 | "J c #B36A69", 79 | "..................................", 80 | ".++++++++++++++++++++++++++++++++.", 81 | ".++++++++++++++++++++++++++++++++.", 82 | ".++++++++++++++++++++++++++++++++.", 83 | ".++++++++++++++++++++++++++++++++.", 84 | ".++......+......++......+......++.", 85 | ".++.@@@@.+.####.++.$$$$.+.%%%%.++.", 86 | ".++.@@@@.+.####.++.$$$$.+.%%%%.++.", 87 | ".++.@@@@.+.####.++.$$$$.+.%%%%.++.", 88 | ".++.@@@@.+.####.++.$$$$.+.%%%%.++.", 89 | ".++.@@@@.+.####.++.$$$$.+.%%%%.++.", 90 | ".++.@@@@.+.####.++.$$$$.+.%%%%.++.", 91 | ".++.@@@@.+.####.++.$$$$.+.%%%%.++.", 92 | ".++.@@@@.+.####.++.$$$$.+.%%%%.++.", 93 | "..................................", 94 | ".++++++++++++++++++++++++++++++++.", 95 | ".+..............++.............++.", 96 | ".+.&&&&&******=.-;.&&&&******=.>,.", 97 | ".'.&.***.**.**=.)!.&.****....=.~{.", 98 | ".].&.***.**.**=.^/.&.****.**.=.(_.", 99 | ".:.&.***.**.**=.<[.&.****.**.=.}}.", 100 | ".|.*.***.**.**=.12.*.****.**.=.34.", 101 | ".5.*.....**.**=.67.*.****.**.=.88.", 102 | ".9.*.***.**.**=.00.*.****.**.=.aa.", 103 | ".b.*.***.**.**=.cc.*.****.**.=.de.", 104 | ".f.*.***.**.**=.gg.*....*....=.hi.", 105 | ".h.============.jk.===========.lm.", 106 | ".n..............op.............qr.", 107 | ".sqtquvwxyzAzBBBCCDEFGHHHHGIHGJHH.", 108 | ".................................."}; 109 | -------------------------------------------------------------------------------- /pic/pic.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * pic_xpm[] = { 3 | "34 30 39 1", 4 | " c #000000", 5 | ". c #DBCCE0", 6 | "+ c #8C4A31", 7 | "@ c #843921", 8 | "# c #843121", 9 | "$ c #8C524A", 10 | "% c #9C6B52", 11 | "& c #8C4229", 12 | "* c #8C5A52", 13 | "= c #94634A", 14 | "- c #8C634A", 15 | "; c #8C4A39", 16 | "> c #945A52", 17 | ", c #8C5A42", 18 | "' c #843929", 19 | ") c #945242", 20 | "! c #9C6B6B", 21 | "~ c #946B63", 22 | "{ c #8C4231", 23 | "] c #94635A", 24 | "^ c #9C7373", 25 | "/ c #9C9494", 26 | "( c #522921", 27 | "_ c #9C6352", 28 | ": c #9C635A", 29 | "< c #A57B73", 30 | "[ c #A57B7B", 31 | "} c #73737B", 32 | "| c #100808", 33 | "1 c #C68C8C", 34 | "2 c #A5736B", 35 | "3 c #8C8C9C", 36 | "4 c #525A52", 37 | "5 c #182921", 38 | "6 c #84AD94", 39 | "7 c #63736B", 40 | "8 c #BDC6BD", 41 | "9 c #216B39", 42 | "0 c #295A39", 43 | " ", 44 | " ................................ ", 45 | " ................................ ", 46 | " ....................+@#$........ ", 47 | " ...................%&@#$*....... ", 48 | " ..................=-+##;>....... ", 49 | " ..................=,'##)>!...... ", 50 | " ..................~;'{)]^....... ", 51 | " ................./(#)_:<[....... ", 52 | " ................}|(|12<......... ", 53 | " ...............}|||/............ ", 54 | " ..............333|/............. ", 55 | " .............3/34/.............. ", 56 | " ............}3}}|............... ", 57 | " ...........}}}}5................ ", 58 | " ..........}|444................. ", 59 | " .........}|||6.................. ", 60 | " ........5|||]................... ", 61 | " ......./5||7.................... ", 62 | " ......./4|]..................... ", 63 | " ....../86....................... ", 64 | " .......696...................... ", 65 | " ......6996...................... ", 66 | " ......60996..................... ", 67 | " ......69996..................... ", 68 | " .......666...................... ", 69 | " ................................ ", 70 | " ................................ ", 71 | " ................................ ", 72 | " "}; 73 | -------------------------------------------------------------------------------- /pic/pic_pat.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * pic_pat_xpm[] = { 3 | "34 30 63 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #D8C7D9", 8 | "# c #92523D", 9 | "$ c #843421", 10 | "% c #996663", 11 | "& c #936249", 12 | "* c #8B4C34", 13 | "= c #843121", 14 | "- c #8F5042", 15 | "; c #D6C4D6", 16 | "> c #936657", 17 | ", c #853C2C", 18 | "' c #8C4131", 19 | ") c #956159", 20 | "! c #C6ACBA", 21 | "~ c #B1A6B2", 22 | "{ c #542920", 23 | "] c #955447", 24 | "^ c #9D665B", 25 | "/ c #AD8888", 26 | "( c #B0A8B7", 27 | "_ c #221C1D", 28 | ": c #281816", 29 | "< c #C5ADB9", 30 | "[ c #CBB4C0", 31 | "} c #C9BDD1", 32 | "| c #8D8C9B", 33 | "1 c #65646B", 34 | "2 c #B0A6AD", 35 | "3 c #030303", 36 | "4 c #828290", 37 | "5 c #787880", 38 | "6 c #1C1816", 39 | "7 c #0B0B0C", 40 | "8 c #504D52", 41 | "9 c #676A6C", 42 | "0 c #353C3B", 43 | "a c #000090", 44 | "b c #6C90FC", 45 | "c c #514F5E", 46 | "d c #100808", 47 | "e c #6A8774", 48 | "f c #03038D", 49 | "g c #4A5A72", 50 | "h c #353736", 51 | "i c #100A89", 52 | "j c #B4D8FC", 53 | "k c #D8FCFC", 54 | "l c #757571", 55 | "m c #34211E", 56 | "n c #B3D7FB", 57 | "o c #ABC0D7", 58 | "p c #72A391", 59 | "q c #A1C7D3", 60 | "r c #98BFAC", 61 | "s c #216A39", 62 | "t c #92BCA8", 63 | "u c #226739", 64 | "v c #3C7D52", 65 | "w c #92BAA5", 66 | "x c #A5CCBD", 67 | "..................................", 68 | ".++++++++++++++++++++++++++++++++.", 69 | ".++++++++++++++++++++++@#$%++++++.", 70 | ".++++++++++++++++++++++&*=-;+++++.", 71 | ".++++++++++++++++++++++>,')!+++++.", 72 | ".+++++++++++++++++++++~{]^/++++++.", 73 | ".++++++++++++++++++++(_:<[+++++++.", 74 | ".+++++++++++++++++++}|12+++++++++.", 75 | ".+++...............3456.+++++++++.", 76 | ".+++..............7890..+++++++++.", 77 | ".+++..aaaabbbbbbbbcdef..+++++++++.", 78 | ".+++..aaaabbbbbbbgdhia..+++++++++.", 79 | ".+++..aabbjjkkkkjlmnbb..+++++++++.", 80 | ".+++..aabbjjkkkkopqjbb..+++++++++.", 81 | ".+++..bbjjkkkkkkrstkjj..+++++++++.", 82 | ".+++..bbjjkkkkkkruvkjj..+++++++++.", 83 | ".+++..bbkkkkkkkkkwxkkk..+++++++++.", 84 | ".+++..bbkkkkkkkkkkkkkk..+++++++++.", 85 | ".+++..jjkkkkkkkkjjkkjj..+++++++++.", 86 | ".+++..jjkkkkkkkkjjkkjj..+++++++++.", 87 | ".+++..jjkkkkkkkkkkjjkk..+++++++++.", 88 | ".+++..jjkkkkkkkkkkjjkk..+++++++++.", 89 | ".+++..jjjjkkkkjjjjkkjj..+++++++++.", 90 | ".+++..jjjjkkkkjjjjkkjj..+++++++++.", 91 | ".+++..bbjjjjjjjjkkjjkk..+++++++++.", 92 | ".+++..bbjjjjjjjjkkjjkk..+++++++++.", 93 | ".+++....................+++++++++.", 94 | ".+++....................+++++++++.", 95 | ".++++++++++++++++++++++++++++++++.", 96 | ".................................."}; 97 | -------------------------------------------------------------------------------- /pic/plus.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * plus_xpm[] = { 3 | "20 20 6 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #43B1B8", 8 | "# c #FFFFFF", 9 | "$ c #3C9FA5", 10 | "....................", 11 | ".++++++++++++++++++.", 12 | ".++++++......++++++.", 13 | ".+++++.@@@@@@.+++++.", 14 | ".++++.@@@@@@@@.++++.", 15 | ".+++.@@@@##@@@$.+++.", 16 | ".++.@@@@@##@@$$$.++.", 17 | ".+.@@@@@@##@$$$$$.+.", 18 | ".+.@@@@@@##$$$$$$.+.", 19 | ".+.@@##########$$.+.", 20 | ".+.@@##########$$.+.", 21 | ".+.@@@@@$##$$$$$$.+.", 22 | ".+.@@@@$$##$$$$$$.+.", 23 | ".++.@@$$$##$$$$$.++.", 24 | ".+++.$$$$##$$$$.+++.", 25 | ".++++.$$$$$$$$.++++.", 26 | ".+++++.$$$$$$.+++++.", 27 | ".++++++......++++++.", 28 | ".++++++++++++++++++.", 29 | "...................."}; 30 | -------------------------------------------------------------------------------- /pic/put_pal.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * put_pal_xpm[] = { 3 | "34 30 7 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #2A20EA", 8 | "# c #EA2020", 9 | "$ c #2AEA20", 10 | "% c #D9EA20", 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 | -------------------------------------------------------------------------------- /pic/put_pat.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * put_pat_xpm[] = { 3 | "34 30 13 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #030303", 8 | "# c #1C1816", 9 | "$ c #0B0B0C", 10 | "% c #000090", 11 | "& c #6C90FC", 12 | "* c #100A89", 13 | "= c #03038D", 14 | "- c #B4D8FC", 15 | "; c #D8FCFC", 16 | "> c #B3D7FB", 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 | -------------------------------------------------------------------------------- /pic/restore.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * restore_xpm[] = { 3 | "20 20 6 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #43B1B8", 8 | "# c #3C9FA5", 9 | "$ c #FFFFFF", 10 | "....................", 11 | ".++++++++++++++++++.", 12 | ".++++++......++++++.", 13 | ".+++++.@@@@@@.+++++.", 14 | ".++++.@@@@@@@@.++++.", 15 | ".+++.@@@@@@@@@#.+++.", 16 | ".++.@@@@@@@@@###.++.", 17 | ".+.@@@@@@@@@#####.+.", 18 | ".+.@@@@@@@@######.+.", 19 | ".+.@@@@@@$$######.+.", 20 | ".+.@@@@@@$$######.+.", 21 | ".+.@@@@@#########.+.", 22 | ".+.@@@@##########.+.", 23 | ".++.@@##########.++.", 24 | ".+++.##########.+++.", 25 | ".++++.########.++++.", 26 | ".+++++.######.+++++.", 27 | ".++++++......++++++.", 28 | ".++++++++++++++++++.", 29 | "...................."}; 30 | -------------------------------------------------------------------------------- /pic/save.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * save_xpm[] = { 3 | "20 20 6 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #43B1B8", 8 | "# c #3C9FA5", 9 | "$ c #FFFFFF", 10 | "....................", 11 | ".++++++++++++++++++.", 12 | ".++++++......++++++.", 13 | ".+++++.@@@@@@.+++++.", 14 | ".++++.@@@@@@@@.++++.", 15 | ".+++.@@@@@@@@@#.+++.", 16 | ".++.@@@@@@@@@###.++.", 17 | ".+.@@@@$$$$$$####.+.", 18 | ".+.@@@@$$$$$$####.+.", 19 | ".+.@@@@$$@#$$####.+.", 20 | ".+.@@@@$$##$$####.+.", 21 | ".+.@@@@$$$$$$####.+.", 22 | ".+.@@@@$$$$$$####.+.", 23 | ".++.@@##########.++.", 24 | ".+++.##########.+++.", 25 | ".++++.########.++++.", 26 | ".+++++.######.+++++.", 27 | ".++++++......++++++.", 28 | ".++++++++++++++++++.", 29 | "...................."}; 30 | -------------------------------------------------------------------------------- /pic/scroll_a.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * scroll_a_xpm[] = { 3 | "20 20 8 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #FFFFFF", 8 | "# c #BDBDBD", 9 | "$ c #FF0000", 10 | "% c #646464", 11 | "& c #C20000", 12 | "....................", 13 | ".++++++......++++++.", 14 | ".++++..@@@@@@..++++.", 15 | ".+++.##@....@@@.+++.", 16 | ".++.###.$$$$.@@@.++.", 17 | ".+.%##.&$.@@$.@@@.+.", 18 | ".+.%%#.&..@@$.@@@.+.", 19 | ".+.%%#.&....$.@@@.+.", 20 | ".+.%%#.&&..$$.@@@.+.", 21 | ".++.%%#.&&&&.@##.++.", 22 | ".+++.%%#....###.+++.", 23 | ".++++..%%%%%%..++++.", 24 | ".++++++......++++++.", 25 | ".++++++++++++++++++.", 26 | ".++++++++..++++++++.", 27 | ".+++++++.++.+++++++.", 28 | ".+++++++....+++++++.", 29 | ".+++++++.++.+++++++.", 30 | ".+++++++.++.+++++++.", 31 | "...................."}; 32 | -------------------------------------------------------------------------------- /pic/scroll_a_edit.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * scroll_a_edit_xpm[] = { 3 | "20 20 5 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #C80000", 8 | "# c #FF0000", 9 | "....................", 10 | ".++++++++++++++++++.", 11 | ".+++++..+++++++++++.", 12 | ".+++++.@.++++++++++.", 13 | ".+++++.@#.+++++++++.", 14 | ".+++++.@##.++++++++.", 15 | ".+++++.@@##.+++++++.", 16 | ".+++++.@@###.++++++.", 17 | ".+++++.@@@###.+++++.", 18 | ".+++++.@@@#..++++++.", 19 | ".+++++.@@..++++++++.", 20 | ".+++++...++++++++++.", 21 | ".++++++++++++++++++.", 22 | ".++++++++++++++++++.", 23 | ".++++++++..++++++++.", 24 | ".+++++++.++.+++++++.", 25 | ".+++++++....+++++++.", 26 | ".+++++++.++.+++++++.", 27 | ".+++++++.++.+++++++.", 28 | "...................."}; 29 | -------------------------------------------------------------------------------- /pic/scroll_a_high.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * scroll_a_high_xpm[] = { 3 | "20 20 14 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #FF9F9F", 8 | "# c #FF6767", 9 | "$ c #D20000", 10 | "% c #C67F7F", 11 | "& c #FFFFFF", 12 | "* c #BDBDBD", 13 | "= c #FF1B1B", 14 | "- c #FF0000", 15 | "; c #5E3A3A", 16 | "> c #C20000", 17 | ", c #646464", 18 | "....................", 19 | ".++++++......++++++.", 20 | ".++++..@#@#@@..++++.", 21 | ".+++.$%&....&#@.+++.", 22 | ".++.%*=.----.##@.++.", 23 | ".+.;%=.>-.&&-.&&@.+.", 24 | ".+.$$*.>..&&-.&#@.+.", 25 | ".+.;,*.>....-.&##.+.", 26 | ".+.;,=.>>..--.&&@.+.", 27 | ".++.$=*.>>>>.&*%.++.", 28 | ".+++.;;*....*$=.+++.", 29 | ".++++..;$,;;;..++++.", 30 | ".++++++......++++++.", 31 | ".++++++++++++++++++.", 32 | ".+++++..+++.++.++++.", 33 | ".++++.++.++.++.++++.", 34 | ".++++....++....++++.", 35 | ".++++.++.++.++.++++.", 36 | ".++++.++.++.++.++++.", 37 | "...................."}; 38 | -------------------------------------------------------------------------------- /pic/scroll_b.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * scroll_b_xpm[] = { 3 | "20 20 8 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #FFFFFF", 8 | "# c #BDBDBD", 9 | "$ c #FF00FF", 10 | "% c #646464", 11 | "& c #CB00CB", 12 | "....................", 13 | ".++++++......++++++.", 14 | ".++++..@@@@@@..++++.", 15 | ".+++.##@....@@@.+++.", 16 | ".++.###.$$$$.@@@.++.", 17 | ".+.%##.&$.@@$.@@@.+.", 18 | ".+.%%#.&..@@$.@@@.+.", 19 | ".+.%%#.&....$.@@@.+.", 20 | ".+.%%#.&&..$$.@@@.+.", 21 | ".++.%%#.&&&&.@##.++.", 22 | ".+++.%%#....###.+++.", 23 | ".++++..%%%%%%..++++.", 24 | ".++++++......++++++.", 25 | ".++++++++++++++++++.", 26 | ".+++++++...++++++++.", 27 | ".+++++++.++.+++++++.", 28 | ".+++++++.+.++++++++.", 29 | ".+++++++.++.+++++++.", 30 | ".+++++++...++++++++.", 31 | "...................."}; 32 | -------------------------------------------------------------------------------- /pic/scroll_b_edit.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * scroll_b_edit_xpm[] = { 3 | "20 20 5 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #D200D2", 8 | "# c #FF00FF", 9 | "....................", 10 | ".++++++++++++++++++.", 11 | ".+++++..+++++++++++.", 12 | ".+++++.@.++++++++++.", 13 | ".+++++.@#.+++++++++.", 14 | ".+++++.@##.++++++++.", 15 | ".+++++.@@##.+++++++.", 16 | ".+++++.@@###.++++++.", 17 | ".+++++.@@@###.+++++.", 18 | ".+++++.@@@#..++++++.", 19 | ".+++++.@@..++++++++.", 20 | ".+++++...++++++++++.", 21 | ".++++++++++++++++++.", 22 | ".++++++++++++++++++.", 23 | ".+++++++...++++++++.", 24 | ".+++++++.++.+++++++.", 25 | ".+++++++.+.++++++++.", 26 | ".+++++++.++.+++++++.", 27 | ".+++++++...++++++++.", 28 | "...................."}; 29 | -------------------------------------------------------------------------------- /pic/scroll_b_high.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * scroll_b_high_xpm[] = { 3 | "20 20 14 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #FF9F9F", 8 | "# c #FF6767", 9 | "$ c #D20000", 10 | "% c #C67F7F", 11 | "& c #FFFFFF", 12 | "* c #BDBDBD", 13 | "= c #FF1B1B", 14 | "- c #FF00FF", 15 | "; c #5E3A3A", 16 | "> c #CB00CB", 17 | ", c #646464", 18 | "....................", 19 | ".++++++......++++++.", 20 | ".++++..@#@#@@..++++.", 21 | ".+++.$%&....&#@.+++.", 22 | ".++.%*=.----.##@.++.", 23 | ".+.;%=.>-.&&-.&&@.+.", 24 | ".+.$$*.>..&&-.&#@.+.", 25 | ".+.;,*.>....-.&##.+.", 26 | ".+.;,=.>>..--.&&@.+.", 27 | ".++.$=*.>>>>.&*%.++.", 28 | ".+++.;;*....*$=.+++.", 29 | ".++++..;$,;;;..++++.", 30 | ".++++++......++++++.", 31 | ".++++++++++++++++++.", 32 | ".++++...+++.++.++++.", 33 | ".++++.++.++.++.++++.", 34 | ".++++.+.+++....++++.", 35 | ".++++.++.++.++.++++.", 36 | ".++++...+++.++.++++.", 37 | "...................."}; 38 | -------------------------------------------------------------------------------- /pic/select.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * select_xpm[] = { 3 | "34 30 169 2", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #FBFBFB", 8 | "# c #747474", 9 | "$ c #737373", 10 | "% c #717272", 11 | "& c #707070", 12 | "* c #6E6F6E", 13 | "= c #6D6D6D", 14 | "- c #6C6C6C", 15 | "; c #6B6A6A", 16 | "> c #696869", 17 | ", c #676868", 18 | "' c #666666", 19 | ") c #646565", 20 | "! c #636463", 21 | "~ c #626261", 22 | "{ c #616160", 23 | "] c #5F5F5F", 24 | "^ c #5D5D5D", 25 | "/ c #5C5B5C", 26 | "( c #5A5A5A", 27 | "_ c #585959", 28 | ": c #747374", 29 | "< c #727272", 30 | "[ c #717170", 31 | "} c #6F6F6F", 32 | "| c #6E6E6E", 33 | "1 c #6C6D6D", 34 | "2 c #6B6B6B", 35 | "3 c #69696A", 36 | "4 c #686868", 37 | "5 c #656566", 38 | "6 c #636363", 39 | "7 c #626262", 40 | "8 c #606160", 41 | "9 c #5F6060", 42 | "0 c #5E5D5E", 43 | "a c #5C5C5C", 44 | "b c #5A5B5B", 45 | "c c #595959", 46 | "d c #585858", 47 | "e c #737273", 48 | "f c #727171", 49 | "g c #706F70", 50 | "h c #6C6D6C", 51 | "i c #6C6B6B", 52 | "j c #6A6A6A", 53 | "k c #696968", 54 | "l c #676767", 55 | "m c #666565", 56 | "n c #646464", 57 | "o c #626362", 58 | "p c #616161", 59 | "q c #605F60", 60 | "r c #5E5E5F", 61 | "s c #5B5B5C", 62 | "t c #585859", 63 | "u c #575757", 64 | "v c #727172", 65 | "w c #717070", 66 | "x c #6D6E6D", 67 | "y c #696969", 68 | "z c #676768", 69 | "A c #656464", 70 | "B c #606060", 71 | "C c #5F5F5E", 72 | "D c #5D5E5D", 73 | "E c #575857", 74 | "F c #565656", 75 | "G c #737474", 76 | "H c #727373", 77 | "I c #707171", 78 | "J c #6F6F70", 79 | "K c #6D6D6E", 80 | "L c #6C6C6D", 81 | "M c #6A696A", 82 | "N c #676667", 83 | "O c #656565", 84 | "P c #646463", 85 | "Q c #626263", 86 | "R c #606161", 87 | "S c #5F5F60", 88 | "T c #5E5E5E", 89 | "U c #5C5D5C", 90 | "V c #5B5B5B", 91 | "W c #5A595A", 92 | "X c #565555", 93 | "Y c #737372", 94 | "Z c #717171", 95 | "` c #6D6C6D", 96 | " . c #6B6C6B", 97 | ".. c #605F5F", 98 | "+. c #5B5C5C", 99 | "@. c #585958", 100 | "#. c #545454", 101 | "$. c #6C6C6B", 102 | "%. c #676867", 103 | "&. c #646465", 104 | "*. c #5B5A5B", 105 | "=. c #535353", 106 | "-. c #737374", 107 | ";. c #6E6D6E", 108 | ">. c #6D6C6C", 109 | ",. c #6A6969", 110 | "'. c #676666", 111 | "). c #636464", 112 | "!. c #5D5D5C", 113 | "~. c #5A5959", 114 | "{. c #585857", 115 | "]. c #565756", 116 | "^. c #555555", 117 | "/. c #525252", 118 | "(. c #666665", 119 | "_. c #565655", 120 | ":. c #515151", 121 | "<. c #717071", 122 | "[. c #686869", 123 | "}. c #5E5F5F", 124 | "|. c #555554", 125 | "1. c #525151", 126 | "2. c #505050", 127 | "3. c #707170", 128 | "4. c #706F6F", 129 | "5. c #666767", 130 | "6. c #5D5C5C", 131 | "7. c #5B5B5A", 132 | "8. c #575756", 133 | "9. c #535354", 134 | "0. c #4F4F4F", 135 | "a. c #6E6F6F", 136 | "b. c #696868", 137 | "c. c #656665", 138 | "d. c #595A5A", 139 | "e. c #4E4F4E", 140 | "f. c #5F5E5F", 141 | "g. c #525152", 142 | "h. c #4D4E4D", 143 | "i. c #6B6A6B", 144 | "j. c #696A69", 145 | "k. c #666667", 146 | "l. c #616061", 147 | "m. c #515150", 148 | "n. c #4D4E4E", 149 | "o. c #4C4C4D", 150 | "p. c #666566", 151 | "q. c #60605F", 152 | "r. c #5B5C5B", 153 | "s. c #5A5A59", 154 | "t. c #525352", 155 | "u. c #4F4E4E", 156 | "v. c #4D4C4D", 157 | "w. c #4C4C4B", 158 | "x. c #656465", 159 | "y. c #616262", 160 | "z. c #616060", 161 | "A. c #5A5A5B", 162 | "B. c #545353", 163 | "C. c #4E4E4E", 164 | "D. c #4E4E4D", 165 | "E. c #4B4C4C", 166 | "F. c #4A4A4A", 167 | "G. c #646363", 168 | "H. c #5E5E5D", 169 | "I. c #565657", 170 | "J. c #505151", 171 | "K. c #4B4B4B", 172 | "L. c #4B4A4A", 173 | ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", 174 | ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ", 175 | ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ", 176 | ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ", 177 | ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ", 178 | ". + + + . @ . . @ . . @ . . @ . . @ . . @ . . @ . . @ . . @ + + + . ", 179 | ". + + + . # # # # # $ % & * = - ; > , ' ) ! ~ { ] ^ / ( _ . + + + . ", 180 | ". + + + @ # # # # : < [ } | 1 2 3 4 ' 5 6 7 8 9 0 a b c d . + + + . ", 181 | ". + + + . # # # # e f g | h i j k l m n o p q r ^ s ( t u @ + + + . ", 182 | ". + + + . # # # $ v w } x - ; y z ' A 6 ~ B C D a ( _ E F . + + + . ", 183 | ". + + + @ # # G H I J K L 2 M , N O P Q R S T U V W d u X . + + + . ", 184 | ". + + + . # # Y Z & * ` .j > l ' n 6 p ..T ^ +.( @.u F #.@ + + + . ", 185 | ". + + + . # $ < & } K $.j y %.' &.6 ~ B ] 0 a *.c E F #.=.. + + + . ", 186 | ". + + + @ -.< Z & ;.>.2 ,.4 '.5 ).7 p ] T !.V ~.{.].^.#./.. + + + . ", 187 | ". + + + . Y f & * = 2 j > l (.n 6 p q r !./ W d u _.#.=.:.@ + + + . ", 188 | ". + + + . < <.} ;.- j [.l ' O 6 ~ 8 }.^ a ( c d F |.=.1.2.. + + + . ", 189 | ". + + + @ 3.4.| - 2 M 4 5.O 6 7 p S T 6.7.~.d 8.^.9./.:.0.. + + + . ", 190 | ". + + + . & a.= i j b.l c.n 6 p B T ^ +.d.c u X #.=.:.2.e.@ + + + . ", 191 | ". + + + . } x - j k z ' ) 6 7 B f.^ a ( c u F |.=.g.2.e.h.. + + + . ", 192 | ". + + + @ | L i.j.4 k.O n 7 l.] T U *.W d F ^.#./.m.0.n.o.. + + + . ", 193 | ". + + + . = 2 j y l p.&.6 p q.r ^ r.s.d u _.#.t.:.2.u.v.w.@ + + + . ", 194 | ". + + + . - i.y %.' x.6 y.z.f.^ +.A.c {.F #.B.g.2.C.D.E.F.. + + + . ", 195 | ". + + + @ 2 j.4 k.m G.7 z.q.H.a V c d I.^.#./.J.0.D.o.K.L.. + + + . ", 196 | ". + + + . . @ . . @ . . @ . . @ . . @ . . @ . . @ . . @ . @ + + + . ", 197 | ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ", 198 | ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ", 199 | ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ", 200 | ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ", 201 | ". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . ", 202 | ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "}; 203 | -------------------------------------------------------------------------------- /pic/small_knob.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * small_knob_xpm[] = { 3 | "20 21 145 2", 4 | " c None", 5 | ". c #000001", 6 | "+ c #000000", 7 | "@ c #000105", 8 | "# c #000102", 9 | "$ c #0A0B06", 10 | "% c #4B441B", 11 | "& c #5D4F1C", 12 | "* c #292A14", 13 | "= c #080703", 14 | "- c #000203", 15 | "; c #0D0B04", 16 | "> c #665E26", 17 | ", c #C7AB3F", 18 | "' c #D2B13E", 19 | ") c #B79C3B", 20 | "! c #36341A", 21 | "~ c #000303", 22 | "{ c #7B7B70", 23 | "] c #C7C7B5", 24 | "^ c #52534C", 25 | "/ c #090803", 26 | "( c #A1872F", 27 | "_ c #C6A841", 28 | ": c #524720", 29 | "< c #7D7E73", 30 | "[ c #2E2E2B", 31 | "} c #8A8A7E", 32 | "| c #E0E0CC", 33 | "1 c #AEAF9F", 34 | "2 c #050606", 35 | "3 c #171407", 36 | "4 c #4E4217", 37 | "5 c #AC9133", 38 | "6 c #D0AF3F", 39 | "7 c #BDA348", 40 | "8 c #1C1E11", 41 | "9 c #292B27", 42 | "0 c #34342F", 43 | "a c #4A4A43", 44 | "b c #453C1B", 45 | "c c #B49B44", 46 | "d c #A48D3D", 47 | "e c #453B16", 48 | "f c #C0A546", 49 | "g c #807537", 50 | "h c #010101", 51 | "i c #9F9F91", 52 | "j c #D3D3C0", 53 | "k c #0F0F0E", 54 | "l c #685A29", 55 | "m c #CDAE41", 56 | "n c #322A0F", 57 | "o c #AB9746", 58 | "p c #121209", 59 | "q c #585850", 60 | "r c #CFCFBC", 61 | "s c #352E15", 62 | "t c #A18933", 63 | "u c #927B2C", 64 | "v c #4F4218", 65 | "w c #BBA249", 66 | "x c #1D190B", 67 | "y c #45453F", 68 | "z c #524518", 69 | "A c #5F501C", 70 | "B c #715F22", 71 | "C c #BFA138", 72 | "D c #C0A547", 73 | "E c #D4D4C1", 74 | "F c #131311", 75 | "G c #4D471E", 76 | "H c #CEAF40", 77 | "I c #A99645", 78 | "J c #111109", 79 | "K c #5D5D55", 80 | "L c #4E4F48", 81 | "M c #16160A", 82 | "N c #C3A83D", 83 | "O c #D1B03E", 84 | "P c #C2A746", 85 | "Q c #7C7035", 86 | "R c #020202", 87 | "S c #A3A394", 88 | "T c #B2B2A2", 89 | "U c #060605", 90 | "V c #6B6026", 91 | "W c #D1B13E", 92 | "X c #181B0F", 93 | "Y c #2E2E2A", 94 | "Z c #4F4F48", 95 | "` c #040401", 96 | " . c #98802D", 97 | ".. c #CFAF3F", 98 | "+. c #C9AB42", 99 | "@. c #BEA448", 100 | "#. c #B69E47", 101 | "$. c #483E1C", 102 | "%. c #090908", 103 | "&. c #9D9D8F", 104 | "*. c #D8D8C5", 105 | "=. c #0B0903", 106 | "-. c #5E5623", 107 | ";. c #C6A944", 108 | ">. c #BCA348", 109 | ",. c #988940", 110 | "'. c #2C2C17", 111 | "). c #98988B", 112 | "!. c #53534C", 113 | "~. c #080807", 114 | "{. c #000202", 115 | "]. c #39361A", 116 | "^. c #493F1C", 117 | "/. c #1C1F11", 118 | "(. c #1B1B18", 119 | "_. c #969689", 120 | ":. c #BABAA9", 121 | "<. c #64645B", 122 | "[. c #0C0C0B", 123 | "}. c #353530", 124 | "|. c #7E7F73", 125 | "1. c #D2D2BF", 126 | "2. c #D6D6C3", 127 | "3. c #5F5F56", 128 | "4. c #DBDBC8", 129 | "5. c #79796E", 130 | "6. c #B8B8A7", 131 | "7. c #DADAC7", 132 | "8. c #30302C", 133 | "9. c #DCDCC9", 134 | "0. c #828277", 135 | "a. c #55554E", 136 | "b. c #A5A596", 137 | "c. c #22221F", 138 | "d. c #ACAC9D", 139 | "e. c #A7A798", 140 | "f. c #959588", 141 | "g. c #67675E", 142 | "h. c #4B4B44", 143 | "i. c #D7D7C4", 144 | "j. c #D9D9C6", 145 | "k. c #DFDFCB", 146 | "l. c #1F1F25", 147 | "m. c #32322D", 148 | "n. c #0B0B0A", 149 | "| | | | | | | | . + + @ | | | | | | | | ", 150 | "| | | | | | # $ % & & * = - | | | | | | ", 151 | "| | | | | ; > , ' ' ' ' ) ! ~ | | | | | ", 152 | "{ ] ] ^ / ( ' ' ' ' ' ' ' _ : + < ] ] [ ", 153 | "} | 1 2 3 4 5 ' ' ' ' ' ' 6 7 8 9 | | 0 ", 154 | "} | a b c d e ' ' ' ' ' ' ' f g h i | 0 ", 155 | "} j k l m ' n ' ' ' ' ' ' ' f o p q | 0 ", 156 | "} r + s t u v ' ' ' ' ' ' ' f w x y | 0 ", 157 | "} r + z A B C ' ' ' ' ' ' ' D w x y | 0 ", 158 | "} E F G ' ' ' ' ' ' ' ' ' H w I J K | 0 ", 159 | "} | L M N ' ' ' ' ' ' ' O P w Q R S | 0 ", 160 | "} | T U V ' ' ' ' ' ' W P w w X Y | | 0 ", 161 | "} | | Z ` .' ' ' ..+.@.w #.$.%.&.| | 0 ", 162 | "} | | *.a =.-.;.D >.w w ,.'.+ ).| | | 0 ", 163 | "} | | | | !.~.{.].^.^./.+ (._.| | | | 0 ", 164 | "} | | | | | :.<.F [.[.}.|.r | | | | | 0 ", 165 | "} | | | | 1.<.| 2.3.| 4.5.6.| | | | | 0 ", 166 | "} | | | | 7.8.| 9.Y | 0.a.b.| | | | | 0 ", 167 | "} | | | | T c.d.6.c.e.f.g.h.| | | | | 0 ", 168 | "} | | | | *.E i.j.E 2.k.E 7.| | | | | 0 ", 169 | "l.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.m.n."}; 170 | -------------------------------------------------------------------------------- /pic/sprite.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * sprite_xpm[] = { 3 | "20 20 8 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #FFFFFF", 8 | "# c #BDBDBD", 9 | "$ c #FF8000", 10 | "% c #646464", 11 | "& c #D06800", 12 | "....................", 13 | ".++++++......++++++.", 14 | ".++++..@@@@@@..++++.", 15 | ".+++.##@....@@@.+++.", 16 | ".++.###.$$$$.@@@.++.", 17 | ".+.%##.&$.@@$.@@@.+.", 18 | ".+.%%#.&..@@$.@@@.+.", 19 | ".+.%%#.&....$.@@@.+.", 20 | ".+.%%#.&&..$$.@@@.+.", 21 | ".++.%%#.&&&&.@##.++.", 22 | ".+++.%%#....###.+++.", 23 | ".++++..%%%%%%..++++.", 24 | ".++++++......++++++.", 25 | ".++++++++++++++++++.", 26 | ".++++++++...+++++++.", 27 | ".+++++++.++++++++++.", 28 | ".++++++++..++++++++.", 29 | ".++++++++++.+++++++.", 30 | ".+++++++...++++++++.", 31 | "...................."}; 32 | -------------------------------------------------------------------------------- /pic/sprite_edit.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * sprite_edit_xpm[] = { 3 | "20 20 5 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #D26900", 8 | "# c #FF8000", 9 | "....................", 10 | ".++++++++++++++++++.", 11 | ".+++++..+++++++++++.", 12 | ".+++++.@.++++++++++.", 13 | ".+++++.@#.+++++++++.", 14 | ".+++++.@##.++++++++.", 15 | ".+++++.@@##.+++++++.", 16 | ".+++++.@@###.++++++.", 17 | ".+++++.@@@###.+++++.", 18 | ".+++++.@@@#..++++++.", 19 | ".+++++.@@..++++++++.", 20 | ".+++++...++++++++++.", 21 | ".++++++++++++++++++.", 22 | ".++++++++++++++++++.", 23 | ".++++++++...+++++++.", 24 | ".+++++++.++++++++++.", 25 | ".++++++++..++++++++.", 26 | ".++++++++++.+++++++.", 27 | ".+++++++...++++++++.", 28 | "...................."}; 29 | -------------------------------------------------------------------------------- /pic/sprite_high.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * sprite_high_xpm[] = { 3 | "20 20 14 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #FF9F9F", 8 | "# c #FF6767", 9 | "$ c #D20000", 10 | "% c #C67F7F", 11 | "& c #FFFFFF", 12 | "* c #BDBDBD", 13 | "= c #FF1B1B", 14 | "- c #FF8000", 15 | "; c #5E3A3A", 16 | "> c #D06800", 17 | ", c #646464", 18 | "....................", 19 | ".++++++......++++++.", 20 | ".++++..@#@#@@..++++.", 21 | ".+++.$%&....&#@.+++.", 22 | ".++.%*=.----.##@.++.", 23 | ".+.;%=.>-.&&-.&&@.+.", 24 | ".+.$$*.>..&&-.&#@.+.", 25 | ".+.;,*.>....-.&##.+.", 26 | ".+.;,=.>>..--.&&@.+.", 27 | ".++.$=*.>>>>.&*%.++.", 28 | ".+++.;;*....*$=.+++.", 29 | ".++++..;$,;;;..++++.", 30 | ".++++++......++++++.", 31 | ".++++++++++++++++++.", 32 | ".+++++...++.++.++++.", 33 | ".++++.+++++.++.++++.", 34 | ".+++++..+++....++++.", 35 | ".+++++++.++.++.++++.", 36 | ".++++...+++.++.++++.", 37 | "...................."}; 38 | -------------------------------------------------------------------------------- /pic/stop.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * stop_xpm[] = { 3 | "20 20 6 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #FF0000", 8 | "# c #E80000", 9 | "$ c #FFFFFF", 10 | "....................", 11 | ".++++++++++++++++++.", 12 | ".++++++......++++++.", 13 | ".+++++.@@@@@@.+++++.", 14 | ".++++.@@@@@@@@.++++.", 15 | ".+++.@@@@@@@@@#.+++.", 16 | ".++.@@@@@@@@@###.++.", 17 | ".+.@@$$$$$@$#$$##.+.", 18 | ".+.@$@@@$@$#$$#$#.+.", 19 | ".+.@@$@@$@$#$$#$#.+.", 20 | ".+.@@@$@$#$#$$$##.+.", 21 | ".+.@$$@@$##$#$###.+.", 22 | ".+.@@@@##########.+.", 23 | ".++.@@##########.++.", 24 | ".+++.##########.+++.", 25 | ".++++.########.++++.", 26 | ".+++++.######.+++++.", 27 | ".++++++......++++++.", 28 | ".++++++++++++++++++.", 29 | "...................."}; 30 | -------------------------------------------------------------------------------- /pic/undo.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * undo_xpm[] = { 3 | "34 30 41 1", 4 | " c #000000", 5 | ". c #DBCCE0", 6 | "+ c #0000FF", 7 | "@ c #0000B5", 8 | "# c #B4BB90", 9 | "$ c #E79439", 10 | "% c #8C5221", 11 | "& c #B5BE93", 12 | "* c #E79C2A", 13 | "= c #895826", 14 | "- c #48300D", 15 | "; c #ECB995", 16 | "> c #8F5520", 17 | ", c #3E2D16", 18 | "' c #302605", 19 | ") c #BD8C7A", 20 | "! c #E6B693", 21 | "~ c #D98F6B", 22 | "{ c #6A4116", 23 | "] c #2D2504", 24 | "^ c #271A05", 25 | "/ c #C4CBAC", 26 | "( c #EEBC9B", 27 | "_ c #D2A076", 28 | ": c #543D38", 29 | "< c #362807", 30 | "[ c #211D03", 31 | "} c #B98673", 32 | "| c #DD946B", 33 | "1 c #5A3D2F", 34 | "2 c #363517", 35 | "3 c #5B3C26", 36 | "4 c #B87668", 37 | "5 c #48300C", 38 | "6 c #4C3926", 39 | "7 c #B18C7A", 40 | "8 c #111111", 41 | "9 c #2B2507", 42 | "0 c #9D7F50", 43 | "a c #000077", 44 | "b c #647864", 45 | " ", 46 | " ................................ ", 47 | " ................................ ", 48 | " ........ ..................... ", 49 | " ....... ++ ..................... ", 50 | " ...... +@@ ..................... ", 51 | " ..... +@@@ ..................... ", 52 | " .... +@@@@ ..................... ", 53 | " ... ++@@@@ ..................... ", 54 | " ... +@@@@@@ .. .. ", 55 | " .. ++@@@@@@@+++ .. .......... .. ", 56 | " .. +@@@@@@@@@++ .. .....#$%%. .. ", 57 | " . +@@@@@@@@@@@+ .. ....&*%=-. .. ", 58 | " . +@@@@@@@@@@@+ .. ....;>%,'. .. ", 59 | " . +@@@@@@@@@@@+ .. ...)!~{]^. .. ", 60 | " . +@@@@@@@@@@@+ .. ../(_:<[.. .. ", 61 | " . +@@@@@@@@@@@+ .. ..}|123... .. ", 62 | " . +@@@@@@@@@@@+ .. ..4567.... .. ", 63 | " . @@@@@@@@@@@@@ .. .890...... .. ", 64 | " .. @@@@@@@@@@aa .. .b........ .. ", 65 | " .. a@@@@@@@@aaa .. .......... .. ", 66 | " ... a@@@@@a .. .. ", 67 | " ... aa@@@a ..................... ", 68 | " .... aaaaa ..................... ", 69 | " ..... aaaa ..................... ", 70 | " ...... aaa ..................... ", 71 | " ....... aa ..................... ", 72 | " ........ ..................... ", 73 | " ................................ ", 74 | " "}; 75 | -------------------------------------------------------------------------------- /pic/window.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * window_xpm[] = { 3 | "20 20 8 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #FFFFFF", 8 | "# c #BDBDBD", 9 | "$ c #0000FF", 10 | "% c #646464", 11 | "& c #0000C3", 12 | "....................", 13 | ".++++++......++++++.", 14 | ".++++..@@@@@@..++++.", 15 | ".+++.##@....@@@.+++.", 16 | ".++.###.$$$$.@@@.++.", 17 | ".+.%##.&$.@@$.@@@.+.", 18 | ".+.%%#.&..@@$.@@@.+.", 19 | ".+.%%#.&....$.@@@.+.", 20 | ".+.%%#.&&..$$.@@@.+.", 21 | ".++.%%#.&&&&.@##.++.", 22 | ".+++.%%#....###.+++.", 23 | ".++++..%%%%%%..++++.", 24 | ".++++++......++++++.", 25 | ".++++++++++++++++++.", 26 | ".++++++.++++.++++++.", 27 | ".++++++.++++.++++++.", 28 | ".++++++.++++.++++++.", 29 | ".++++++.+..+.++++++.", 30 | ".+++++++.++.+++++++.", 31 | "...................."}; 32 | -------------------------------------------------------------------------------- /pic/window_edit.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * window_edit_xpm[] = { 3 | "20 20 5 1", 4 | " c None", 5 | ". c #000000", 6 | "+ c #DBCCE0", 7 | "@ c #0000C3", 8 | "# c #0000FF", 9 | "....................", 10 | ".++++++++++++++++++.", 11 | ".+++++..+++++++++++.", 12 | ".+++++.@.++++++++++.", 13 | ".+++++.@#.+++++++++.", 14 | ".+++++.@##.++++++++.", 15 | ".+++++.@@##.+++++++.", 16 | ".+++++.@@###.++++++.", 17 | ".+++++.@@@###.+++++.", 18 | ".+++++.@@@#..++++++.", 19 | ".+++++.@@..++++++++.", 20 | ".+++++...++++++++++.", 21 | ".++++++++++++++++++.", 22 | ".++++++++++++++++++.", 23 | ".++++++.++++.++++++.", 24 | ".++++++.++++.++++++.", 25 | ".++++++.++++.++++++.", 26 | ".++++++.+..+.++++++.", 27 | ".+++++++.++.+++++++.", 28 | "...................."}; 29 | -------------------------------------------------------------------------------- /pic/zoom_in.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * zoom_in_xpm[] = { 3 | "34 30 10 1", 4 | " c #000000", 5 | ". c #DBCCE0", 6 | "+ c #003D41", 7 | "@ c #007077", 8 | "# c #0097A0", 9 | "$ c #00B8C3", 10 | "% c #00F0FF", 11 | "& c #858585", 12 | "* c #3D3D3D", 13 | "= c #555555", 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 | -------------------------------------------------------------------------------- /pic/zoom_out.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | const char * zoom_out_xpm[] = { 3 | "34 30 10 1", 4 | " c #000000", 5 | ". c #DBCCE0", 6 | "+ c #003D41", 7 | "@ c #007077", 8 | "# c #0097A0", 9 | "$ c #00B8C3", 10 | "% c #00F0FF", 11 | "& c #858585", 12 | "* c #3D3D3D", 13 | "= c #555555", 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 | -------------------------------------------------------------------------------- /proc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read LICENSE for more info 4 | */ 5 | 6 | #define HORIZONTAL 1 7 | #define VERTICAL 2 8 | 9 | 10 | #define HOR_LINES 0 11 | #define HOR_8LINES 1 12 | #define HOR_SCREEN 2 13 | 14 | #define VER_SCREEN 0 15 | #define VER_2CELLS 1 16 | 17 | #define BACKGROUND 0 18 | #define SCROLL_A 1 19 | #define SCROLL_B 2 20 | #define SPRITE 3 21 | 22 | #define NO_SELECTION -1 23 | #define SEL_W (selection_v2.x - selection_v1.x) 24 | #define SEL_H (selection_v2.y - selection_v1.y) 25 | 26 | 27 | #define DRAW_PREVIEW MESSAGE_OBJECT(preview_box_object,MSG_DRAW); \ 28 | MESSAGE_OBJECT(preview_ntsc, MSG_DRAW); \ 29 | MESSAGE_OBJECT(preview_pal, MSG_DRAW); \ 30 | MESSAGE_OBJECT(preview_40c, MSG_DRAW); \ 31 | MESSAGE_OBJECT(preview_32c, MSG_DRAW); \ 32 | MESSAGE_OBJECT(preview_scroll_bar, MSG_DRAW); \ 33 | MESSAGE_OBJECT(preview_x_scroll, MSG_DRAW); \ 34 | MESSAGE_OBJECT(preview_y_scroll, MSG_DRAW); \ 35 | MESSAGE_OBJECT(preview_zoom_in, MSG_DRAW); \ 36 | MESSAGE_OBJECT(preview_zoom_out,MSG_DRAW); \ 37 | MESSAGE_OBJECT(preview_overlay, MSG_DRAW); \ 38 | MESSAGE_OBJECT(bg_color_box, MSG_DRAW);\ 39 | MESSAGE_OBJECT(preview_object, MSG_DRAW) 40 | 41 | #define DRAW_RGB_CHOOSER current_color_object->param.proc(MSG_DRAW,current_color_object,0);\ 42 | current_color_text_object->param.proc(MSG_DRAW,\ 43 | current_color_text_object,0); \ 44 | current_color_text2_object->param.proc(MSG_DRAW, \ 45 | current_color_text2_object,0); \ 46 | rgb_red_object->param.proc(MSG_DRAW,rgb_red_object,0); \ 47 | rgb_green_object->param.proc(MSG_DRAW,rgb_green_object,0); \ 48 | rgb_blue_object->param.proc(MSG_DRAW,rgb_blue_object,0) 49 | 50 | typedef struct { 51 | int x, y; 52 | } coord_t; 53 | 54 | extern int vdp_w, vdp_h; 55 | 56 | extern Uint8 selection_buffer[ 320 * 240]; 57 | extern coord_t selection_v1, selection_v2; 58 | 59 | 60 | extern struct object_t *pattern_select_scroll_bar, 61 | *pattern_select_object; 62 | 63 | extern struct object_t *pattern_edit_object, 64 | *palette_change_object; 65 | 66 | extern struct object_t *preview_object; 67 | 68 | extern struct object_t *current_color_object; 69 | extern struct object_t *current_color_text_object, *current_color_text2_object; 70 | 71 | extern struct object_t *rgb_red_object, 72 | *rgb_green_object, 73 | *rgb_blue_object; 74 | 75 | extern color_t red,green,blue; 76 | extern color_t current_color_text_color; 77 | 78 | extern int sprite_zoom, scroll_plane_zoom; 79 | 80 | void update_color_text(void); 81 | void change_color(int palette, int index); 82 | 83 | int preview_scroll_change(struct object_t *obj, int data); 84 | int preview_zoom_change(struct object_t *obj, int data); 85 | 86 | int preview_size_change(struct object_t *obj, int data); 87 | 88 | int proc_info(int msg, struct object_t *obj, int data); 89 | int select_quit_on_click(int msg, struct object_t *obj, int data); 90 | int load_default_mega(int msg, struct object_t *obj, int data); 91 | int select_special(int msg, struct object_t *obj, int data); 92 | int proc_sprite_size(int msg, struct object_t *obj, int data); 93 | int proc_scroll_size(int msg, struct object_t *obj, int data); 94 | int proc_preview_object(int msg, struct object_t *obj, int data); 95 | int pattern_select_bot(struct object_t *obj, int data); 96 | int color_change_bot(struct object_t *obj, int data); 97 | int proc_palette_change_object(int msg, struct object_t *obj, int data); 98 | int proc_pattern_edit(int msg, struct object_t *obj, int data); 99 | int proc_pattern_select(int msg, struct object_t *obj, int data); 100 | int proc_scroll_bar_special(int msg, struct object_t *obj, int data); 101 | int line_edit_wonked(int msg, struct object_t *obj, int data); 102 | void update_zoom(int in); 103 | -------------------------------------------------------------------------------- /skull.h: -------------------------------------------------------------------------------- 1 | 2 | char *credits = { 3 | " ______ \n" 4 | " .-\" \"-. \n" 5 | " / \\ \n" 6 | "| |\n" 7 | "|, .-. .-. ,|\n" 8 | "| )(__/ \\__)( |\n" 9 | "|/ /\\ \\|\n" 10 | "(_ ^^ _)\n" 11 | " \\__|IIIIII|__/ \n" 12 | " | \\IIIIII/ | \n" 13 | " \\ / \n" 14 | " `--------`jgs\n" 15 | "sigflup\n" 16 | "\n" 17 | "bitRAKE\n" 18 | "ExtraordinaryBen\n" 19 | }; 20 | 21 | -------------------------------------------------------------------------------- /uu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read LICENSE for more info 4 | */ 5 | 6 | 7 | extern unsigned char buffer[0xffff]; 8 | 9 | int uudec(char *filename, char *name); 10 | int uuenc(FILE *fp, char *name, unsigned char *buf, int len); 11 | -------------------------------------------------------------------------------- /vdp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Mega Happy Sprite is released under the BSD 3-Clause license. 3 | * read LICENSE for more info 4 | */ 5 | 6 | #define NTSC 0 7 | #define PAL 1 8 | 9 | #define SPRITE_WIDTH 320 10 | #define SPRITE_HEIGHT 240 11 | 12 | #define FLIP_X(q) ((q&8)>>3) 13 | #define FLIP_Y(q) ((q&16)>>4) 14 | 15 | #define VIS_BACKGROUND 0 16 | #define VIS_SCROLL_B 1 17 | #define VIS_SCROLL_A 2 18 | #define VIS_SPRITE 4 19 | #define VIS_SCROLL_B_HIGH 8 20 | #define VIS_SCROLL_A_HIGH 16 21 | #define VIS_SPRITE_HIGH 32 22 | 23 | #define UPDATE_BG_COLOR\ 24 | bg_color_box->param.bg=¤t_vdp->palette[current_vdp->bg_pal][current_vdp->bg_index]; 25 | 26 | typedef struct { 27 | int bg_pal, bg_index; 28 | int tv_type; 29 | int cell_w; 30 | int scroll_a; 31 | int scroll_b; 32 | int window; 33 | int sprite_table; 34 | int hscroll; 35 | Uint8 *vram; 36 | Uint8 *vsram; 37 | color_t palette[4][16]; 38 | } vdp_t; 39 | 40 | typedef struct { 41 | int pat; 42 | int ix, iy; 43 | int sx, sy; 44 | int pal, index; 45 | int priority; 46 | int pat_index; 47 | } scroll_data_t; 48 | 49 | typedef struct { 50 | int num; 51 | int px[64], py[64]; 52 | } pixel_dump_t; 53 | 54 | extern pixel_dump_t pat_pix_a[4096]; 55 | extern pixel_dump_t pat_pix_b[4096]; 56 | 57 | typedef struct { 58 | int index; 59 | Uint8 pixels[64]; 60 | } pat_bin_t; 61 | 62 | extern pat_bin_t pat_bin[0x500]; 63 | extern int pat_bin_num; 64 | 65 | typedef struct { 66 | int palette, index; 67 | int pattern; 68 | color_t color; 69 | int pre_index, pre_palette; 70 | int pre_parent; 71 | color_t ovr_color; 72 | int top, pic_top; 73 | int pat_index; 74 | 75 | scroll_data_t A,B; 76 | 77 | } vdp_pixel; 78 | 79 | 80 | extern int sprite_width, sprite_height; 81 | extern int scroll_width, scroll_height; 82 | 83 | extern int pat_ref[0x400]; 84 | extern int pat_stop[0x400]; 85 | 86 | extern int visible; 87 | 88 | extern vdp_pixel vdp_screen[320*240]; 89 | extern vdp_pixel vdp_backbuf[320*240]; 90 | 91 | extern vdp_pixel sprite_screen[32*32]; 92 | extern vdp_pixel sprite_backbuf[32*32]; 93 | 94 | extern vdp_t *current_vdp; 95 | extern Uint8 *undo_vram[MAX_UNDO]; 96 | 97 | extern int current_palette; 98 | extern int current_palette_index; 99 | extern int current_pattern; 100 | 101 | extern int vdp_zoom, vdp_x, vdp_y; 102 | extern int ovr_zoom, ovr_x, ovr_y; 103 | 104 | int priority_pixels(int *flags, int a_pri,int a_data, 105 | int b_pri,int b_data, 106 | int g_data); 107 | 108 | void collapse(void); 109 | void render_sprite(void); 110 | void render_vdp(int start, int end); 111 | void copy_vdp(vdp_t *dst, vdp_t *src); 112 | void draw_pattern(Uint8 *ram, int num, int x, int y, int w, int h); 113 | void store_palette(vdp_t *vdp, Uint8 *ram); 114 | void load_palette(vdp_t *vdp, Uint8 *ram); 115 | int vdp_init(void); 116 | -------------------------------------------------------------------------------- /windows/bin/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009,2024 Thea DeSilva 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | 3. Neither the name of the copyright holder nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /windows/bin/README: -------------------------------------------------------------------------------- 1 | Mega Happy Sprite is released under the BSD 3-Clause license. 2 | Read LICENSE for more info 3 | 4 | Thank you for choosing Mega-Happy-Sprite. run mega.exe in this directory to 5 | use it. If you have questions or comments email pantsbutt@gmail.com. 6 | 7 | yours, 8 | sigflup 9 | -------------------------------------------------------------------------------- /windows/bin/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/bin/SDL2.dll -------------------------------------------------------------------------------- /windows/bin/SDL2_image.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/bin/SDL2_image.dll -------------------------------------------------------------------------------- /windows/bin/libjpeg-9.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/bin/libjpeg-9.dll -------------------------------------------------------------------------------- /windows/bin/libpng16-16.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/bin/libpng16-16.dll -------------------------------------------------------------------------------- /windows/bin/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/bin/zlib1.dll -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_bits.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_bits.h 24 | * 25 | * Functions for fiddling with bits and bitmasks. 26 | */ 27 | 28 | #ifndef SDL_bits_h_ 29 | #define SDL_bits_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \file SDL_bits.h 41 | */ 42 | 43 | /** 44 | * Get the index of the most significant bit. Result is undefined when called 45 | * with 0. This operation can also be stated as "count leading zeroes" and 46 | * "log base 2". 47 | * 48 | * \return the index of the most significant bit, or -1 if the value is 0. 49 | */ 50 | #if defined(__WATCOMC__) && defined(__386__) 51 | extern __inline int _SDL_bsr_watcom(Uint32); 52 | #pragma aux _SDL_bsr_watcom = \ 53 | "bsr eax, eax" \ 54 | parm [eax] nomemory \ 55 | value [eax] \ 56 | modify exact [eax] nomemory; 57 | #endif 58 | 59 | SDL_FORCE_INLINE int 60 | SDL_MostSignificantBitIndex32(Uint32 x) 61 | { 62 | #if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 63 | /* Count Leading Zeroes builtin in GCC. 64 | * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html 65 | */ 66 | if (x == 0) { 67 | return -1; 68 | } 69 | return 31 - __builtin_clz(x); 70 | #elif defined(__WATCOMC__) && defined(__386__) 71 | if (x == 0) { 72 | return -1; 73 | } 74 | return _SDL_bsr_watcom(x); 75 | #elif defined(_MSC_VER) 76 | unsigned long index; 77 | if (_BitScanReverse(&index, x)) { 78 | return index; 79 | } 80 | return -1; 81 | #else 82 | /* Based off of Bit Twiddling Hacks by Sean Eron Anderson 83 | * , released in the public domain. 84 | * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog 85 | */ 86 | const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000}; 87 | const int S[] = {1, 2, 4, 8, 16}; 88 | 89 | int msbIndex = 0; 90 | int i; 91 | 92 | if (x == 0) { 93 | return -1; 94 | } 95 | 96 | for (i = 4; i >= 0; i--) 97 | { 98 | if (x & b[i]) 99 | { 100 | x >>= S[i]; 101 | msbIndex |= S[i]; 102 | } 103 | } 104 | 105 | return msbIndex; 106 | #endif 107 | } 108 | 109 | SDL_FORCE_INLINE SDL_bool 110 | SDL_HasExactlyOneBitSet32(Uint32 x) 111 | { 112 | if (x && !(x & (x - 1))) { 113 | return SDL_TRUE; 114 | } 115 | return SDL_FALSE; 116 | } 117 | 118 | /* Ends C function definitions when using C++ */ 119 | #ifdef __cplusplus 120 | } 121 | #endif 122 | #include "close_code.h" 123 | 124 | #endif /* SDL_bits_h_ */ 125 | 126 | /* vi: set ts=4 sw=4 expandtab: */ 127 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_clipboard.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_clipboard.h 24 | * 25 | * Include file for SDL clipboard handling 26 | */ 27 | 28 | #ifndef SDL_clipboard_h_ 29 | #define SDL_clipboard_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | /** 42 | * Put UTF-8 text into the clipboard. 43 | * 44 | * \param text the text to store in the clipboard 45 | * \returns 0 on success or a negative error code on failure; call 46 | * SDL_GetError() for more information. 47 | * 48 | * \since This function is available since SDL 2.0.0. 49 | * 50 | * \sa SDL_GetClipboardText 51 | * \sa SDL_HasClipboardText 52 | */ 53 | extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); 54 | 55 | /** 56 | * Get UTF-8 text from the clipboard, which must be freed with SDL_free(). 57 | * 58 | * This functions returns empty string if there was not enough memory left for 59 | * a copy of the clipboard's content. 60 | * 61 | * \returns the clipboard text on success or an empty string on failure; call 62 | * SDL_GetError() for more information. Caller must call SDL_free() 63 | * on the returned pointer when done with it (even if there was an 64 | * error). 65 | * 66 | * \since This function is available since SDL 2.0.0. 67 | * 68 | * \sa SDL_HasClipboardText 69 | * \sa SDL_SetClipboardText 70 | */ 71 | extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void); 72 | 73 | /** 74 | * Query whether the clipboard exists and contains a non-empty text string. 75 | * 76 | * \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not. 77 | * 78 | * \since This function is available since SDL 2.0.0. 79 | * 80 | * \sa SDL_GetClipboardText 81 | * \sa SDL_SetClipboardText 82 | */ 83 | extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void); 84 | 85 | /** 86 | * Put UTF-8 text into the primary selection. 87 | * 88 | * \param text the text to store in the primary selection 89 | * \returns 0 on success or a negative error code on failure; call 90 | * SDL_GetError() for more information. 91 | * 92 | * \since This function is available since SDL 2.26.0. 93 | * 94 | * \sa SDL_GetPrimarySelectionText 95 | * \sa SDL_HasPrimarySelectionText 96 | */ 97 | extern DECLSPEC int SDLCALL SDL_SetPrimarySelectionText(const char *text); 98 | 99 | /** 100 | * Get UTF-8 text from the primary selection, which must be freed with 101 | * SDL_free(). 102 | * 103 | * This functions returns empty string if there was not enough memory left for 104 | * a copy of the primary selection's content. 105 | * 106 | * \returns the primary selection text on success or an empty string on 107 | * failure; call SDL_GetError() for more information. Caller must 108 | * call SDL_free() on the returned pointer when done with it (even if 109 | * there was an error). 110 | * 111 | * \since This function is available since SDL 2.26.0. 112 | * 113 | * \sa SDL_HasPrimarySelectionText 114 | * \sa SDL_SetPrimarySelectionText 115 | */ 116 | extern DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void); 117 | 118 | /** 119 | * Query whether the primary selection exists and contains a non-empty text 120 | * string. 121 | * 122 | * \returns SDL_TRUE if the primary selection has text, or SDL_FALSE if it 123 | * does not. 124 | * 125 | * \since This function is available since SDL 2.26.0. 126 | * 127 | * \sa SDL_GetPrimarySelectionText 128 | * \sa SDL_SetPrimarySelectionText 129 | */ 130 | extern DECLSPEC SDL_bool SDLCALL SDL_HasPrimarySelectionText(void); 131 | 132 | 133 | /* Ends C function definitions when using C++ */ 134 | #ifdef __cplusplus 135 | } 136 | #endif 137 | #include "close_code.h" 138 | 139 | #endif /* SDL_clipboard_h_ */ 140 | 141 | /* vi: set ts=4 sw=4 expandtab: */ 142 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_copying.h: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_gesture.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_gesture.h 24 | * 25 | * Include file for SDL gesture event handling. 26 | */ 27 | 28 | #ifndef SDL_gesture_h_ 29 | #define SDL_gesture_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "SDL_touch.h" 36 | 37 | 38 | #include "begin_code.h" 39 | /* Set up for C function definitions, even when using C++ */ 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef Sint64 SDL_GestureID; 45 | 46 | /* Function prototypes */ 47 | 48 | /** 49 | * Begin recording a gesture on a specified touch device or all touch devices. 50 | * 51 | * If the parameter `touchId` is -1 (i.e., all devices), this function will 52 | * always return 1, regardless of whether there actually are any devices. 53 | * 54 | * \param touchId the touch device id, or -1 for all touch devices 55 | * \returns 1 on success or 0 if the specified device could not be found. 56 | * 57 | * \since This function is available since SDL 2.0.0. 58 | * 59 | * \sa SDL_GetTouchDevice 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId); 62 | 63 | 64 | /** 65 | * Save all currently loaded Dollar Gesture templates. 66 | * 67 | * \param dst a SDL_RWops to save to 68 | * \returns the number of saved templates on success or 0 on failure; call 69 | * SDL_GetError() for more information. 70 | * 71 | * \since This function is available since SDL 2.0.0. 72 | * 73 | * \sa SDL_LoadDollarTemplates 74 | * \sa SDL_SaveDollarTemplate 75 | */ 76 | extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst); 77 | 78 | /** 79 | * Save a currently loaded Dollar Gesture template. 80 | * 81 | * \param gestureId a gesture id 82 | * \param dst a SDL_RWops to save to 83 | * \returns 1 on success or 0 on failure; call SDL_GetError() for more 84 | * information. 85 | * 86 | * \since This function is available since SDL 2.0.0. 87 | * 88 | * \sa SDL_LoadDollarTemplates 89 | * \sa SDL_SaveAllDollarTemplates 90 | */ 91 | extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst); 92 | 93 | 94 | /** 95 | * Load Dollar Gesture templates from a file. 96 | * 97 | * \param touchId a touch id 98 | * \param src a SDL_RWops to load from 99 | * \returns the number of loaded templates on success or a negative error code 100 | * (or 0) on failure; call SDL_GetError() for more information. 101 | * 102 | * \since This function is available since SDL 2.0.0. 103 | * 104 | * \sa SDL_SaveAllDollarTemplates 105 | * \sa SDL_SaveDollarTemplate 106 | */ 107 | extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src); 108 | 109 | /* Ends C function definitions when using C++ */ 110 | #ifdef __cplusplus 111 | } 112 | #endif 113 | #include "close_code.h" 114 | 115 | #endif /* SDL_gesture_h_ */ 116 | 117 | /* vi: set ts=4 sw=4 expandtab: */ 118 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_guid.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_guid.h 24 | * 25 | * Include file for handling ::SDL_GUID values. 26 | */ 27 | 28 | #ifndef SDL_guid_h_ 29 | #define SDL_guid_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | #include "begin_code.h" 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** 41 | * An SDL_GUID is a 128-bit identifier for an input device that 42 | * identifies that device across runs of SDL programs on the same 43 | * platform. If the device is detached and then re-attached to a 44 | * different port, or if the base system is rebooted, the device 45 | * should still report the same GUID. 46 | * 47 | * GUIDs are as precise as possible but are not guaranteed to 48 | * distinguish physically distinct but equivalent devices. For 49 | * example, two game controllers from the same vendor with the same 50 | * product ID and revision may have the same GUID. 51 | * 52 | * GUIDs may be platform-dependent (i.e., the same device may report 53 | * different GUIDs on different operating systems). 54 | */ 55 | typedef struct { 56 | Uint8 data[16]; 57 | } SDL_GUID; 58 | 59 | /* Function prototypes */ 60 | 61 | /** 62 | * Get an ASCII string representation for a given ::SDL_GUID. 63 | * 64 | * You should supply at least 33 bytes for pszGUID. 65 | * 66 | * \param guid the ::SDL_GUID you wish to convert to string 67 | * \param pszGUID buffer in which to write the ASCII string 68 | * \param cbGUID the size of pszGUID 69 | * 70 | * \since This function is available since SDL 2.24.0. 71 | * 72 | * \sa SDL_GUIDFromString 73 | */ 74 | extern DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID); 75 | 76 | /** 77 | * Convert a GUID string into a ::SDL_GUID structure. 78 | * 79 | * Performs no error checking. If this function is given a string containing 80 | * an invalid GUID, the function will silently succeed, but the GUID generated 81 | * will not be useful. 82 | * 83 | * \param pchGUID string containing an ASCII representation of a GUID 84 | * \returns a ::SDL_GUID structure. 85 | * 86 | * \since This function is available since SDL 2.24.0. 87 | * 88 | * \sa SDL_GUIDToString 89 | */ 90 | extern DECLSPEC SDL_GUID SDLCALL SDL_GUIDFromString(const char *pchGUID); 91 | 92 | /* Ends C function definitions when using C++ */ 93 | #ifdef __cplusplus 94 | } 95 | #endif 96 | #include "close_code.h" 97 | 98 | #endif /* SDL_guid_h_ */ 99 | 100 | /* vi: set ts=4 sw=4 expandtab: */ 101 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_loadso.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_loadso.h 24 | * 25 | * System dependent library loading routines 26 | * 27 | * Some things to keep in mind: 28 | * \li These functions only work on C function names. Other languages may 29 | * have name mangling and intrinsic language support that varies from 30 | * compiler to compiler. 31 | * \li Make sure you declare your function pointers with the same calling 32 | * convention as the actual library function. Your code will crash 33 | * mysteriously if you do not do this. 34 | * \li Avoid namespace collisions. If you load a symbol from the library, 35 | * it is not defined whether or not it goes into the global symbol 36 | * namespace for the application. If it does and it conflicts with 37 | * symbols in your code or other shared libraries, you will not get 38 | * the results you expect. :) 39 | */ 40 | 41 | #ifndef SDL_loadso_h_ 42 | #define SDL_loadso_h_ 43 | 44 | #include "SDL_stdinc.h" 45 | #include "SDL_error.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /** 54 | * Dynamically load a shared object. 55 | * 56 | * \param sofile a system-dependent name of the object file 57 | * \returns an opaque pointer to the object handle or NULL if there was an 58 | * error; call SDL_GetError() for more information. 59 | * 60 | * \since This function is available since SDL 2.0.0. 61 | * 62 | * \sa SDL_LoadFunction 63 | * \sa SDL_UnloadObject 64 | */ 65 | extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile); 66 | 67 | /** 68 | * Look up the address of the named function in a shared object. 69 | * 70 | * This function pointer is no longer valid after calling SDL_UnloadObject(). 71 | * 72 | * This function can only look up C function names. Other languages may have 73 | * name mangling and intrinsic language support that varies from compiler to 74 | * compiler. 75 | * 76 | * Make sure you declare your function pointers with the same calling 77 | * convention as the actual library function. Your code will crash 78 | * mysteriously if you do not do this. 79 | * 80 | * If the requested function doesn't exist, NULL is returned. 81 | * 82 | * \param handle a valid shared object handle returned by SDL_LoadObject() 83 | * \param name the name of the function to look up 84 | * \returns a pointer to the function or NULL if there was an error; call 85 | * SDL_GetError() for more information. 86 | * 87 | * \since This function is available since SDL 2.0.0. 88 | * 89 | * \sa SDL_LoadObject 90 | * \sa SDL_UnloadObject 91 | */ 92 | extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle, 93 | const char *name); 94 | 95 | /** 96 | * Unload a shared object from memory. 97 | * 98 | * \param handle a valid shared object handle returned by SDL_LoadObject() 99 | * 100 | * \since This function is available since SDL 2.0.0. 101 | * 102 | * \sa SDL_LoadFunction 103 | * \sa SDL_LoadObject 104 | */ 105 | extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 106 | 107 | /* Ends C function definitions when using C++ */ 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | #include "close_code.h" 112 | 113 | #endif /* SDL_loadso_h_ */ 114 | 115 | /* vi: set ts=4 sw=4 expandtab: */ 116 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_locale.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_locale.h 24 | * 25 | * Include file for SDL locale services 26 | */ 27 | 28 | #ifndef _SDL_locale_h 29 | #define _SDL_locale_h 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | #include "begin_code.h" 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | /* *INDENT-OFF* */ 38 | extern "C" { 39 | /* *INDENT-ON* */ 40 | #endif 41 | 42 | 43 | typedef struct SDL_Locale 44 | { 45 | const char *language; /**< A language name, like "en" for English. */ 46 | const char *country; /**< A country, like "US" for America. Can be NULL. */ 47 | } SDL_Locale; 48 | 49 | /** 50 | * Report the user's preferred locale. 51 | * 52 | * This returns an array of SDL_Locale structs, the final item zeroed out. 53 | * When the caller is done with this array, it should call SDL_free() on the 54 | * returned value; all the memory involved is allocated in a single block, so 55 | * a single SDL_free() will suffice. 56 | * 57 | * Returned language strings are in the format xx, where 'xx' is an ISO-639 58 | * language specifier (such as "en" for English, "de" for German, etc). 59 | * Country strings are in the format YY, where "YY" is an ISO-3166 country 60 | * code (such as "US" for the United States, "CA" for Canada, etc). Country 61 | * might be NULL if there's no specific guidance on them (so you might get { 62 | * "en", "US" } for American English, but { "en", NULL } means "English 63 | * language, generically"). Language strings are never NULL, except to 64 | * terminate the array. 65 | * 66 | * Please note that not all of these strings are 2 characters; some are three 67 | * or more. 68 | * 69 | * The returned list of locales are in the order of the user's preference. For 70 | * example, a German citizen that is fluent in US English and knows enough 71 | * Japanese to navigate around Tokyo might have a list like: { "de", "en_US", 72 | * "jp", NULL }. Someone from England might prefer British English (where 73 | * "color" is spelled "colour", etc), but will settle for anything like it: { 74 | * "en_GB", "en", NULL }. 75 | * 76 | * This function returns NULL on error, including when the platform does not 77 | * supply this information at all. 78 | * 79 | * This might be a "slow" call that has to query the operating system. It's 80 | * best to ask for this once and save the results. However, this list can 81 | * change, usually because the user has changed a system preference outside of 82 | * your program; SDL will send an SDL_LOCALECHANGED event in this case, if 83 | * possible, and you can call this function again to get an updated copy of 84 | * preferred locales. 85 | * 86 | * \return array of locales, terminated with a locale with a NULL language 87 | * field. Will return NULL on error. 88 | * 89 | * \since This function is available since SDL 2.0.14. 90 | */ 91 | extern DECLSPEC SDL_Locale * SDLCALL SDL_GetPreferredLocales(void); 92 | 93 | /* Ends C function definitions when using C++ */ 94 | #ifdef __cplusplus 95 | /* *INDENT-OFF* */ 96 | } 97 | /* *INDENT-ON* */ 98 | #endif 99 | #include "close_code.h" 100 | 101 | #endif /* _SDL_locale_h */ 102 | 103 | /* vi: set ts=4 sw=4 expandtab: */ 104 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_metal.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_metal.h 24 | * 25 | * Header file for functions to creating Metal layers and views on SDL windows. 26 | */ 27 | 28 | #ifndef SDL_metal_h_ 29 | #define SDL_metal_h_ 30 | 31 | #include "SDL_video.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS). 41 | * 42 | * \note This can be cast directly to an NSView or UIView. 43 | */ 44 | typedef void *SDL_MetalView; 45 | 46 | /** 47 | * \name Metal support functions 48 | */ 49 | /* @{ */ 50 | 51 | /** 52 | * Create a CAMetalLayer-backed NSView/UIView and attach it to the specified 53 | * window. 54 | * 55 | * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on 56 | * its own. It is up to user code to do that. 57 | * 58 | * The returned handle can be casted directly to a NSView or UIView. To access 59 | * the backing CAMetalLayer, call SDL_Metal_GetLayer(). 60 | * 61 | * \since This function is available since SDL 2.0.12. 62 | * 63 | * \sa SDL_Metal_DestroyView 64 | * \sa SDL_Metal_GetLayer 65 | */ 66 | extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window); 67 | 68 | /** 69 | * Destroy an existing SDL_MetalView object. 70 | * 71 | * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was 72 | * called after SDL_CreateWindow. 73 | * 74 | * \since This function is available since SDL 2.0.12. 75 | * 76 | * \sa SDL_Metal_CreateView 77 | */ 78 | extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view); 79 | 80 | /** 81 | * Get a pointer to the backing CAMetalLayer for the given view. 82 | * 83 | * \since This function is available since SDL 2.0.14. 84 | * 85 | * \sa SDL_Metal_CreateView 86 | */ 87 | extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view); 88 | 89 | /** 90 | * Get the size of a window's underlying drawable in pixels (for use with 91 | * setting viewport, scissor & etc). 92 | * 93 | * \param window SDL_Window from which the drawable size should be queried 94 | * \param w Pointer to variable for storing the width in pixels, may be NULL 95 | * \param h Pointer to variable for storing the height in pixels, may be NULL 96 | * 97 | * \since This function is available since SDL 2.0.14. 98 | * 99 | * \sa SDL_GetWindowSize 100 | * \sa SDL_CreateWindow 101 | */ 102 | extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w, 103 | int *h); 104 | 105 | /* @} *//* Metal support functions */ 106 | 107 | /* Ends C function definitions when using C++ */ 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | #include "close_code.h" 112 | 113 | #endif /* SDL_metal_h_ */ 114 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_misc.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_misc.h 24 | * 25 | * \brief Include file for SDL API functions that don't fit elsewhere. 26 | */ 27 | 28 | #ifndef SDL_misc_h_ 29 | #define SDL_misc_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | 35 | /* Set up for C function definitions, even when using C++ */ 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | /** 41 | * Open a URL/URI in the browser or other appropriate external application. 42 | * 43 | * Open a URL in a separate, system-provided application. How this works will 44 | * vary wildly depending on the platform. This will likely launch what makes 45 | * sense to handle a specific URL's protocol (a web browser for `http://`, 46 | * etc), but it might also be able to launch file managers for directories and 47 | * other things. 48 | * 49 | * What happens when you open a URL varies wildly as well: your game window 50 | * may lose focus (and may or may not lose focus if your game was fullscreen 51 | * or grabbing input at the time). On mobile devices, your app will likely 52 | * move to the background or your process might be paused. Any given platform 53 | * may or may not handle a given URL. 54 | * 55 | * If this is unimplemented (or simply unavailable) for a platform, this will 56 | * fail with an error. A successful result does not mean the URL loaded, just 57 | * that we launched _something_ to handle it (or at least believe we did). 58 | * 59 | * All this to say: this function can be useful, but you should definitely 60 | * test it on every platform you target. 61 | * 62 | * \param url A valid URL/URI to open. Use `file:///full/path/to/file` for 63 | * local files, if supported. 64 | * \returns 0 on success, or -1 on error; call SDL_GetError() for more 65 | * information. 66 | * 67 | * \since This function is available since SDL 2.0.14. 68 | */ 69 | extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url); 70 | 71 | /* Ends C function definitions when using C++ */ 72 | #ifdef __cplusplus 73 | } 74 | #endif 75 | #include "close_code.h" 76 | 77 | #endif /* SDL_misc_h_ */ 78 | 79 | /* vi: set ts=4 sw=4 expandtab: */ 80 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_name.h: -------------------------------------------------------------------------------- 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 | 22 | #ifndef SDLname_h_ 23 | #define SDLname_h_ 24 | 25 | #if defined(__STDC__) || defined(__cplusplus) 26 | #define NeedFunctionPrototypes 1 27 | #endif 28 | 29 | #define SDL_NAME(X) SDL_##X 30 | 31 | #endif /* SDLname_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_opengles.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_opengles.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #ifdef __IPHONEOS__ 30 | #include 31 | #include 32 | #else 33 | #include 34 | #include 35 | #endif 36 | 37 | #ifndef APIENTRY 38 | #define APIENTRY 39 | #endif 40 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_opengles2.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_opengles2.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #if !defined(_MSC_VER) && !defined(SDL_USE_BUILTIN_OPENGL_DEFINITIONS) 30 | 31 | #ifdef __IPHONEOS__ 32 | #include 33 | #include 34 | #else 35 | #include 36 | #include 37 | #include 38 | #endif 39 | 40 | #else /* _MSC_VER */ 41 | 42 | /* OpenGL ES2 headers for Visual Studio */ 43 | #include "SDL_opengles2_khrplatform.h" 44 | #include "SDL_opengles2_gl2platform.h" 45 | #include "SDL_opengles2_gl2.h" 46 | #include "SDL_opengles2_gl2ext.h" 47 | 48 | #endif /* _MSC_VER */ 49 | 50 | #ifndef APIENTRY 51 | #define APIENTRY GL_APIENTRY 52 | #endif 53 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright 2017-2020 The Khronos Group Inc. 6 | ** SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 10 | * 11 | * Adopters may modify khrplatform.h and this file to suit their platform. 12 | * Please contribute modifications back to Khronos as pull requests on the 13 | * public github repository: 14 | * https://github.com/KhronosGroup/OpenGL-Registry 15 | */ 16 | 17 | /*#include */ 18 | 19 | #ifndef GL_APICALL 20 | #define GL_APICALL KHRONOS_APICALL 21 | #endif 22 | 23 | #ifndef GL_APIENTRY 24 | #define GL_APIENTRY KHRONOS_APIENTRY 25 | #endif 26 | 27 | #endif /* __gl2platform_h_ */ 28 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_power.h: -------------------------------------------------------------------------------- 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 | 22 | #ifndef SDL_power_h_ 23 | #define SDL_power_h_ 24 | 25 | /** 26 | * \file SDL_power.h 27 | * 28 | * Header for the SDL power management routines. 29 | */ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * The basic state for the system's power supply. 41 | */ 42 | typedef enum 43 | { 44 | SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */ 45 | SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ 46 | SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ 47 | SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */ 48 | SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ 49 | } SDL_PowerState; 50 | 51 | /** 52 | * Get the current power supply details. 53 | * 54 | * You should never take a battery status as absolute truth. Batteries 55 | * (especially failing batteries) are delicate hardware, and the values 56 | * reported here are best estimates based on what that hardware reports. It's 57 | * not uncommon for older batteries to lose stored power much faster than it 58 | * reports, or completely drain when reporting it has 20 percent left, etc. 59 | * 60 | * Battery status can change at any time; if you are concerned with power 61 | * state, you should call this function frequently, and perhaps ignore changes 62 | * until they seem to be stable for a few seconds. 63 | * 64 | * It's possible a platform can only report battery percentage or time left 65 | * but not both. 66 | * 67 | * \param seconds seconds of battery life left, you can pass a NULL here if 68 | * you don't care, will return -1 if we can't determine a 69 | * value, or we're not running on a battery 70 | * \param percent percentage of battery life left, between 0 and 100, you can 71 | * pass a NULL here if you don't care, will return -1 if we 72 | * can't determine a value, or we're not running on a battery 73 | * \returns an SDL_PowerState enum representing the current battery state. 74 | * 75 | * \since This function is available since SDL 2.0.0. 76 | */ 77 | extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent); 78 | 79 | /* Ends C function definitions when using C++ */ 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #include "close_code.h" 84 | 85 | #endif /* SDL_power_h_ */ 86 | 87 | /* vi: set ts=4 sw=4 expandtab: */ 88 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_quit.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_quit.h 24 | * 25 | * Include file for SDL quit event handling. 26 | */ 27 | 28 | #ifndef SDL_quit_h_ 29 | #define SDL_quit_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | /** 35 | * \file SDL_quit.h 36 | * 37 | * An ::SDL_QUIT event is generated when the user tries to close the application 38 | * window. If it is ignored or filtered out, the window will remain open. 39 | * If it is not ignored or filtered, it is queued normally and the window 40 | * is allowed to close. When the window is closed, screen updates will 41 | * complete, but have no effect. 42 | * 43 | * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) 44 | * and SIGTERM (system termination request), if handlers do not already 45 | * exist, that generate ::SDL_QUIT events as well. There is no way 46 | * to determine the cause of an ::SDL_QUIT event, but setting a signal 47 | * handler in your application will override the default generation of 48 | * quit events for that signal. 49 | * 50 | * \sa SDL_Quit() 51 | */ 52 | 53 | /* There are no functions directly affecting the quit event */ 54 | 55 | #define SDL_QuitRequested() \ 56 | (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) 57 | 58 | #endif /* SDL_quit_h_ */ 59 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_revision.h: -------------------------------------------------------------------------------- 1 | /* #undef SDL_VENDOR_INFO */ 2 | #define SDL_REVISION_NUMBER 0 3 | 4 | #ifdef SDL_VENDOR_INFO 5 | #define SDL_REVISION "SDL-2.30.9 (" SDL_VENDOR_INFO ")" 6 | #else 7 | #define SDL_REVISION "SDL-2.30.9" 8 | #endif 9 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_test.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_test.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_h_ 31 | #define SDL_test_h_ 32 | 33 | #include "SDL.h" 34 | #include "SDL_test_assert.h" 35 | #include "SDL_test_common.h" 36 | #include "SDL_test_compare.h" 37 | #include "SDL_test_crc32.h" 38 | #include "SDL_test_font.h" 39 | #include "SDL_test_fuzzer.h" 40 | #include "SDL_test_harness.h" 41 | #include "SDL_test_images.h" 42 | #include "SDL_test_log.h" 43 | #include "SDL_test_md5.h" 44 | #include "SDL_test_memory.h" 45 | #include "SDL_test_random.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /* Global definitions */ 54 | 55 | /* 56 | * Note: Maximum size of SDLTest log message is less than SDL's limit 57 | * to ensure we can fit additional information such as the timestamp. 58 | */ 59 | #define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* SDL_test_h_ */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_test_assert.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_test_assert.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Assert API for test code and test cases 33 | * 34 | */ 35 | 36 | #ifndef SDL_test_assert_h_ 37 | #define SDL_test_assert_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Fails the assert. 47 | */ 48 | #define ASSERT_FAIL 0 49 | 50 | /** 51 | * \brief Passes the assert. 52 | */ 53 | #define ASSERT_PASS 1 54 | 55 | /** 56 | * \brief Assert that logs and break execution flow on failures. 57 | * 58 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 59 | * \param assertDescription Message to log with the assert describing it. 60 | */ 61 | void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2); 62 | 63 | /** 64 | * \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters. 65 | * 66 | * \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0). 67 | * \param assertDescription Message to log with the assert describing it. 68 | * 69 | * \returns the assertCondition so it can be used to externally to break execution flow if desired. 70 | */ 71 | int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2); 72 | 73 | /** 74 | * \brief Explicitly pass without checking an assertion condition. Updates assertion counter. 75 | * 76 | * \param assertDescription Message to log with the assert describing it. 77 | */ 78 | void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1); 79 | 80 | /** 81 | * \brief Resets the assert summary counters to zero. 82 | */ 83 | void SDLTest_ResetAssertSummary(void); 84 | 85 | /** 86 | * \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR. 87 | */ 88 | void SDLTest_LogAssertSummary(void); 89 | 90 | 91 | /** 92 | * \brief Converts the current assert summary state to a test result. 93 | * 94 | * \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT 95 | */ 96 | int SDLTest_AssertSummaryToTestResult(void); 97 | 98 | #ifdef __cplusplus 99 | } 100 | #endif 101 | #include "close_code.h" 102 | 103 | #endif /* SDL_test_assert_h_ */ 104 | 105 | /* vi: set ts=4 sw=4 expandtab: */ 106 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_test_compare.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_test_compare.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines comparison functions (i.e. for surfaces). 33 | 34 | */ 35 | 36 | #ifndef SDL_test_compare_h_ 37 | #define SDL_test_compare_h_ 38 | 39 | #include "SDL.h" 40 | 41 | #include "SDL_test_images.h" 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /** 50 | * \brief Compares a surface and with reference image data for equality 51 | * 52 | * \param surface Surface used in comparison 53 | * \param referenceSurface Test Surface used in comparison 54 | * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy. 55 | * 56 | * \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. 57 | */ 58 | int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); 59 | 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* SDL_test_compare_h_ */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_test_crc32.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_test_crc32.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Implements CRC32 calculations (default output is Perl String::CRC32 compatible). 33 | 34 | */ 35 | 36 | #ifndef SDL_test_crc32_h_ 37 | #define SDL_test_crc32_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | 46 | /* ------------ Definitions --------- */ 47 | 48 | /* Definition shared by all CRC routines */ 49 | 50 | #ifndef CrcUint32 51 | #define CrcUint32 unsigned int 52 | #endif 53 | #ifndef CrcUint8 54 | #define CrcUint8 unsigned char 55 | #endif 56 | 57 | #ifdef ORIGINAL_METHOD 58 | #define CRC32_POLY 0x04c11db7 /* AUTODIN II, Ethernet, & FDDI */ 59 | #else 60 | #define CRC32_POLY 0xEDB88320 /* Perl String::CRC32 compatible */ 61 | #endif 62 | 63 | /** 64 | * Data structure for CRC32 (checksum) computation 65 | */ 66 | typedef struct { 67 | CrcUint32 crc32_table[256]; /* CRC table */ 68 | } SDLTest_Crc32Context; 69 | 70 | /* ---------- Function Prototypes ------------- */ 71 | 72 | /** 73 | * \brief Initialize the CRC context 74 | * 75 | * Note: The function initializes the crc table required for all crc calculations. 76 | * 77 | * \param crcContext pointer to context variable 78 | * 79 | * \returns 0 for OK, -1 on error 80 | * 81 | */ 82 | int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext); 83 | 84 | 85 | /** 86 | * \brief calculate a crc32 from a data block 87 | * 88 | * \param crcContext pointer to context variable 89 | * \param inBuf input buffer to checksum 90 | * \param inLen length of input buffer 91 | * \param crc32 pointer to Uint32 to store the final CRC into 92 | * 93 | * \returns 0 for OK, -1 on error 94 | * 95 | */ 96 | int SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); 97 | 98 | /* Same routine broken down into three steps */ 99 | int SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32); 100 | int SDLTest_Crc32CalcEnd(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32); 101 | int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32); 102 | 103 | 104 | /** 105 | * \brief clean up CRC context 106 | * 107 | * \param crcContext pointer to context variable 108 | * 109 | * \returns 0 for OK, -1 on error 110 | * 111 | */ 112 | 113 | int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext); 114 | 115 | 116 | /* Ends C function definitions when using C++ */ 117 | #ifdef __cplusplus 118 | } 119 | #endif 120 | #include "close_code.h" 121 | 122 | #endif /* SDL_test_crc32_h_ */ 123 | 124 | /* vi: set ts=4 sw=4 expandtab: */ 125 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_test_harness.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_test_harness.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | Defines types for test case definitions and the test execution harness API. 32 | 33 | Based on original GSOC code by Markus Kauppila 34 | */ 35 | 36 | #ifndef SDL_test_h_arness_h 37 | #define SDL_test_h_arness_h 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | 46 | /* ! Definitions for test case structures */ 47 | #define TEST_ENABLED 1 48 | #define TEST_DISABLED 0 49 | 50 | /* ! Definition of all the possible test return values of the test case method */ 51 | #define TEST_ABORTED -1 52 | #define TEST_STARTED 0 53 | #define TEST_COMPLETED 1 54 | #define TEST_SKIPPED 2 55 | 56 | /* ! Definition of all the possible test results for the harness */ 57 | #define TEST_RESULT_PASSED 0 58 | #define TEST_RESULT_FAILED 1 59 | #define TEST_RESULT_NO_ASSERT 2 60 | #define TEST_RESULT_SKIPPED 3 61 | #define TEST_RESULT_SETUP_FAILURE 4 62 | 63 | /* !< Function pointer to a test case setup function (run before every test) */ 64 | typedef void (*SDLTest_TestCaseSetUpFp)(void *arg); 65 | 66 | /* !< Function pointer to a test case function */ 67 | typedef int (*SDLTest_TestCaseFp)(void *arg); 68 | 69 | /* !< Function pointer to a test case teardown function (run after every test) */ 70 | typedef void (*SDLTest_TestCaseTearDownFp)(void *arg); 71 | 72 | /** 73 | * Holds information about a single test case. 74 | */ 75 | typedef struct SDLTest_TestCaseReference { 76 | /* !< Func2Stress */ 77 | SDLTest_TestCaseFp testCase; 78 | /* !< Short name (or function name) "Func2Stress" */ 79 | const char *name; 80 | /* !< Long name or full description "This test pushes func2() to the limit." */ 81 | const char *description; 82 | /* !< Set to TEST_ENABLED or TEST_DISABLED (test won't be run) */ 83 | int enabled; 84 | } SDLTest_TestCaseReference; 85 | 86 | /** 87 | * Holds information about a test suite (multiple test cases). 88 | */ 89 | typedef struct SDLTest_TestSuiteReference { 90 | /* !< "PlatformSuite" */ 91 | const char *name; 92 | /* !< The function that is run before each test. NULL skips. */ 93 | SDLTest_TestCaseSetUpFp testSetUp; 94 | /* !< The test cases that are run as part of the suite. Last item should be NULL. */ 95 | const SDLTest_TestCaseReference **testCases; 96 | /* !< The function that is run after each test. NULL skips. */ 97 | SDLTest_TestCaseTearDownFp testTearDown; 98 | } SDLTest_TestSuiteReference; 99 | 100 | 101 | /** 102 | * \brief Generates a random run seed string for the harness. The generated seed will contain alphanumeric characters (0-9A-Z). 103 | * 104 | * Note: The returned string needs to be deallocated by the caller. 105 | * 106 | * \param length The length of the seed string to generate 107 | * 108 | * \returns the generated seed string 109 | */ 110 | char *SDLTest_GenerateRunSeed(const int length); 111 | 112 | /** 113 | * \brief Execute a test suite using the given run seed and execution key. 114 | * 115 | * \param testSuites Suites containing the test case. 116 | * \param userRunSeed Custom run seed provided by user, or NULL to autogenerate one. 117 | * \param userExecKey Custom execution key provided by user, or 0 to autogenerate one. 118 | * \param filter Filter specification. NULL disables. Case sensitive. 119 | * \param testIterations Number of iterations to run each test case. 120 | * 121 | * \returns the test run result: 0 when all tests passed, 1 if any tests failed. 122 | */ 123 | int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *userRunSeed, Uint64 userExecKey, const char *filter, int testIterations); 124 | 125 | 126 | /* Ends C function definitions when using C++ */ 127 | #ifdef __cplusplus 128 | } 129 | #endif 130 | #include "close_code.h" 131 | 132 | #endif /* SDL_test_h_arness_h */ 133 | 134 | /* vi: set ts=4 sw=4 expandtab: */ 135 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_test_images.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_test_images.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines some images for tests. 33 | 34 | */ 35 | 36 | #ifndef SDL_test_images_h_ 37 | #define SDL_test_images_h_ 38 | 39 | #include "SDL.h" 40 | 41 | #include "begin_code.h" 42 | /* Set up for C function definitions, even when using C++ */ 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /** 48 | *Type for test images. 49 | */ 50 | typedef struct SDLTest_SurfaceImage_s { 51 | int width; 52 | int height; 53 | unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ 54 | const char *pixel_data; 55 | } SDLTest_SurfaceImage_t; 56 | 57 | /* Test images */ 58 | SDL_Surface *SDLTest_ImageBlit(void); 59 | SDL_Surface *SDLTest_ImageBlitColor(void); 60 | SDL_Surface *SDLTest_ImageBlitAlpha(void); 61 | SDL_Surface *SDLTest_ImageBlitBlendAdd(void); 62 | SDL_Surface *SDLTest_ImageBlitBlend(void); 63 | SDL_Surface *SDLTest_ImageBlitBlendMod(void); 64 | SDL_Surface *SDLTest_ImageBlitBlendNone(void); 65 | SDL_Surface *SDLTest_ImageBlitBlendAll(void); 66 | SDL_Surface *SDLTest_ImageFace(void); 67 | SDL_Surface *SDLTest_ImagePrimitives(void); 68 | SDL_Surface *SDLTest_ImagePrimitivesBlend(void); 69 | 70 | /* Ends C function definitions when using C++ */ 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | #include "close_code.h" 75 | 76 | #endif /* SDL_test_images_h_ */ 77 | 78 | /* vi: set ts=4 sw=4 expandtab: */ 79 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_test_log.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_test_log.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Wrapper to log in the TEST category 33 | * 34 | */ 35 | 36 | #ifndef SDL_test_log_h_ 37 | #define SDL_test_log_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Prints given message with a timestamp in the TEST category and INFO priority. 47 | * 48 | * \param fmt Message to be logged 49 | */ 50 | void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 51 | 52 | /** 53 | * \brief Prints given message with a timestamp in the TEST category and the ERROR priority. 54 | * 55 | * \param fmt Message to be logged 56 | */ 57 | void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 58 | 59 | /* Ends C function definitions when using C++ */ 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | #include "close_code.h" 64 | 65 | #endif /* SDL_test_log_h_ */ 66 | 67 | /* vi: set ts=4 sw=4 expandtab: */ 68 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_test_md5.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_test_md5.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | *********************************************************************** 32 | ** Header file for implementation of MD5 ** 33 | ** RSA Data Security, Inc. MD5 Message-Digest Algorithm ** 34 | ** Created: 2/17/90 RLR ** 35 | ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version ** 36 | ** Revised (for MD5): RLR 4/27/91 ** 37 | ** -- G modified to have y&~z instead of y&z ** 38 | ** -- FF, GG, HH modified to add in last register done ** 39 | ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 ** 40 | ** -- distinct additive constant for each step ** 41 | ** -- round 4 added, working mod 7 ** 42 | *********************************************************************** 43 | */ 44 | 45 | /* 46 | *********************************************************************** 47 | ** Message-digest routines: ** 48 | ** To form the message digest for a message M ** 49 | ** (1) Initialize a context buffer mdContext using MD5Init ** 50 | ** (2) Call MD5Update on mdContext and M ** 51 | ** (3) Call MD5Final on mdContext ** 52 | ** The message digest is now in mdContext->digest[0...15] ** 53 | *********************************************************************** 54 | */ 55 | 56 | #ifndef SDL_test_md5_h_ 57 | #define SDL_test_md5_h_ 58 | 59 | #include "begin_code.h" 60 | /* Set up for C function definitions, even when using C++ */ 61 | #ifdef __cplusplus 62 | extern "C" { 63 | #endif 64 | 65 | /* ------------ Definitions --------- */ 66 | 67 | /* typedef a 32-bit type */ 68 | typedef unsigned long int MD5UINT4; 69 | 70 | /* Data structure for MD5 (Message-Digest) computation */ 71 | typedef struct { 72 | MD5UINT4 i[2]; /* number of _bits_ handled mod 2^64 */ 73 | MD5UINT4 buf[4]; /* scratch buffer */ 74 | unsigned char in[64]; /* input buffer */ 75 | unsigned char digest[16]; /* actual digest after Md5Final call */ 76 | } SDLTest_Md5Context; 77 | 78 | /* ---------- Function Prototypes ------------- */ 79 | 80 | /** 81 | * \brief initialize the context 82 | * 83 | * \param mdContext pointer to context variable 84 | * 85 | * Note: The function initializes the message-digest context 86 | * mdContext. Call before each new use of the context - 87 | * all fields are set to zero. 88 | */ 89 | void SDLTest_Md5Init(SDLTest_Md5Context * mdContext); 90 | 91 | 92 | /** 93 | * \brief update digest from variable length data 94 | * 95 | * \param mdContext pointer to context variable 96 | * \param inBuf pointer to data array/string 97 | * \param inLen length of data array/string 98 | * 99 | * Note: The function updates the message-digest context to account 100 | * for the presence of each of the characters inBuf[0..inLen-1] 101 | * in the message whose digest is being computed. 102 | */ 103 | 104 | void SDLTest_Md5Update(SDLTest_Md5Context * mdContext, unsigned char *inBuf, 105 | unsigned int inLen); 106 | 107 | 108 | /** 109 | * \brief complete digest computation 110 | * 111 | * \param mdContext pointer to context variable 112 | * 113 | * Note: The function terminates the message-digest computation and 114 | * ends with the desired message digest in mdContext.digest[0..15]. 115 | * Always call before using the digest[] variable. 116 | */ 117 | 118 | void SDLTest_Md5Final(SDLTest_Md5Context * mdContext); 119 | 120 | 121 | /* Ends C function definitions when using C++ */ 122 | #ifdef __cplusplus 123 | } 124 | #endif 125 | #include "close_code.h" 126 | 127 | #endif /* SDL_test_md5_h_ */ 128 | 129 | /* vi: set ts=4 sw=4 expandtab: */ 130 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_test_memory.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_test_memory.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_memory_h_ 31 | #define SDL_test_memory_h_ 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | 40 | /** 41 | * \brief Start tracking SDL memory allocations 42 | * 43 | * \note This should be called before any other SDL functions for complete tracking coverage 44 | */ 45 | int SDLTest_TrackAllocations(void); 46 | 47 | /** 48 | * \brief Print a log of any outstanding allocations 49 | * 50 | * \note This can be called after SDL_Quit() 51 | */ 52 | void SDLTest_LogAllocations(void); 53 | 54 | 55 | /* Ends C function definitions when using C++ */ 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #include "close_code.h" 60 | 61 | #endif /* SDL_test_memory_h_ */ 62 | 63 | /* vi: set ts=4 sw=4 expandtab: */ 64 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_test_random.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_test_random.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | A "32-bit Multiply with carry random number generator. Very fast. 33 | Includes a list of recommended multipliers. 34 | 35 | multiply-with-carry generator: x(n) = a*x(n-1) + carry mod 2^32. 36 | period: (a*2^31)-1 37 | 38 | */ 39 | 40 | #ifndef SDL_test_random_h_ 41 | #define SDL_test_random_h_ 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /* --- Definitions */ 50 | 51 | /* 52 | * Macros that return a random number in a specific format. 53 | */ 54 | #define SDLTest_RandomInt(c) ((int)SDLTest_Random(c)) 55 | 56 | /* 57 | * Context structure for the random number generator state. 58 | */ 59 | typedef struct { 60 | unsigned int a; 61 | unsigned int x; 62 | unsigned int c; 63 | unsigned int ah; 64 | unsigned int al; 65 | } SDLTest_RandomContext; 66 | 67 | 68 | /* --- Function prototypes */ 69 | 70 | /** 71 | * \brief Initialize random number generator with two integers. 72 | * 73 | * Note: The random sequence of numbers returned by ...Random() is the 74 | * same for the same two integers and has a period of 2^31. 75 | * 76 | * \param rndContext pointer to context structure 77 | * \param xi integer that defines the random sequence 78 | * \param ci integer that defines the random sequence 79 | * 80 | */ 81 | void SDLTest_RandomInit(SDLTest_RandomContext * rndContext, unsigned int xi, 82 | unsigned int ci); 83 | 84 | /** 85 | * \brief Initialize random number generator based on current system time. 86 | * 87 | * \param rndContext pointer to context structure 88 | * 89 | */ 90 | void SDLTest_RandomInitTime(SDLTest_RandomContext *rndContext); 91 | 92 | 93 | /** 94 | * \brief Initialize random number generator based on current system time. 95 | * 96 | * Note: ...RandomInit() or ...RandomInitTime() must have been called 97 | * before using this function. 98 | * 99 | * \param rndContext pointer to context structure 100 | * 101 | * \returns a random number (32bit unsigned integer) 102 | * 103 | */ 104 | unsigned int SDLTest_Random(SDLTest_RandomContext *rndContext); 105 | 106 | 107 | /* Ends C function definitions when using C++ */ 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | #include "close_code.h" 112 | 113 | #endif /* SDL_test_random_h_ */ 114 | 115 | /* vi: set ts=4 sw=4 expandtab: */ 116 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_touch.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_touch.h 24 | * 25 | * Include file for SDL touch event handling. 26 | */ 27 | 28 | #ifndef SDL_touch_h_ 29 | #define SDL_touch_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "begin_code.h" 36 | /* Set up for C function definitions, even when using C++ */ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | typedef Sint64 SDL_TouchID; 42 | typedef Sint64 SDL_FingerID; 43 | 44 | typedef enum 45 | { 46 | SDL_TOUCH_DEVICE_INVALID = -1, 47 | SDL_TOUCH_DEVICE_DIRECT, /* touch screen with window-relative coordinates */ 48 | SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */ 49 | SDL_TOUCH_DEVICE_INDIRECT_RELATIVE /* trackpad with screen cursor-relative coordinates */ 50 | } SDL_TouchDeviceType; 51 | 52 | typedef struct SDL_Finger 53 | { 54 | SDL_FingerID id; 55 | float x; 56 | float y; 57 | float pressure; 58 | } SDL_Finger; 59 | 60 | /* Used as the device ID for mouse events simulated with touch input */ 61 | #define SDL_TOUCH_MOUSEID ((Uint32)-1) 62 | 63 | /* Used as the SDL_TouchID for touch events simulated with mouse input */ 64 | #define SDL_MOUSE_TOUCHID ((Sint64)-1) 65 | 66 | 67 | /** 68 | * Get the number of registered touch devices. 69 | * 70 | * On some platforms SDL first sees the touch device if it was actually used. 71 | * Therefore SDL_GetNumTouchDevices() may return 0 although devices are 72 | * available. After using all devices at least once the number will be 73 | * correct. 74 | * 75 | * This was fixed for Android in SDL 2.0.1. 76 | * 77 | * \returns the number of registered touch devices. 78 | * 79 | * \since This function is available since SDL 2.0.0. 80 | * 81 | * \sa SDL_GetTouchDevice 82 | */ 83 | extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); 84 | 85 | /** 86 | * Get the touch ID with the given index. 87 | * 88 | * \param index the touch device index 89 | * \returns the touch ID with the given index on success or 0 if the index is 90 | * invalid; call SDL_GetError() for more information. 91 | * 92 | * \since This function is available since SDL 2.0.0. 93 | * 94 | * \sa SDL_GetNumTouchDevices 95 | */ 96 | extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); 97 | 98 | /** 99 | * Get the touch device name as reported from the driver or NULL if the index 100 | * is invalid. 101 | * 102 | * \since This function is available since SDL 2.0.22. 103 | */ 104 | extern DECLSPEC const char* SDLCALL SDL_GetTouchName(int index); 105 | 106 | /** 107 | * Get the type of the given touch device. 108 | * 109 | * \since This function is available since SDL 2.0.10. 110 | */ 111 | extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID); 112 | 113 | /** 114 | * Get the number of active fingers for a given touch device. 115 | * 116 | * \param touchID the ID of a touch device 117 | * \returns the number of active fingers for a given touch device on success 118 | * or 0 on failure; call SDL_GetError() for more information. 119 | * 120 | * \since This function is available since SDL 2.0.0. 121 | * 122 | * \sa SDL_GetTouchFinger 123 | */ 124 | extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID); 125 | 126 | /** 127 | * Get the finger object for specified touch device ID and finger index. 128 | * 129 | * The returned resource is owned by SDL and should not be deallocated. 130 | * 131 | * \param touchID the ID of the requested touch device 132 | * \param index the index of the requested finger 133 | * \returns a pointer to the SDL_Finger object or NULL if no object at the 134 | * given ID and index could be found. 135 | * 136 | * \since This function is available since SDL 2.0.0. 137 | * 138 | * \sa SDL_RecordGesture 139 | */ 140 | extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index); 141 | 142 | /* Ends C function definitions when using C++ */ 143 | #ifdef __cplusplus 144 | } 145 | #endif 146 | #include "close_code.h" 147 | 148 | #endif /* SDL_touch_h_ */ 149 | 150 | /* vi: set ts=4 sw=4 expandtab: */ 151 | -------------------------------------------------------------------------------- /windows/include/SDL2/SDL_types.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file SDL_types.h 24 | * 25 | * \deprecated 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_stdinc.h" 30 | -------------------------------------------------------------------------------- /windows/include/SDL2/close_code.h: -------------------------------------------------------------------------------- 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 | 22 | /** 23 | * \file close_code.h 24 | * 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #ifndef SDL_begin_code_h 30 | #error close_code.h included without matching begin_code.h 31 | #endif 32 | #undef SDL_begin_code_h 33 | 34 | /* Reset structure packing at previous byte alignment */ 35 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) 36 | #ifdef __BORLANDC__ 37 | #pragma nopackwarning 38 | #endif 39 | #pragma pack(pop) 40 | #endif /* Compiler needs structure packing set */ 41 | -------------------------------------------------------------------------------- /windows/lib/libSDL2.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/lib/libSDL2.a -------------------------------------------------------------------------------- /windows/lib/libSDL2.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/lib/libSDL2.dll.a -------------------------------------------------------------------------------- /windows/lib/libSDL2_image.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/lib/libSDL2_image.a -------------------------------------------------------------------------------- /windows/lib/libSDL2_image.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/lib/libSDL2_image.dll.a -------------------------------------------------------------------------------- /windows/lib/libSDL2_test.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/lib/libSDL2_test.a -------------------------------------------------------------------------------- /windows/lib/libSDL2main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/windows/lib/libSDL2main.a -------------------------------------------------------------------------------- /www/about.html: -------------------------------------------------------------------------------- 1 | 4 | 6 |
2 | Mega-Happy-Sprite is a sprite and scroll-plane editor for the Sega-Genesis or Sega-MegaDrive and reads and writes directly to VRAM/VSRAM/CRAM images 3 | 5 |
7 | -------------------------------------------------------------------------------- /www/debian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/debian.png -------------------------------------------------------------------------------- /www/download.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

13 | current version is 1.3
14 | download other versions 15 | 16 | -------------------------------------------------------------------------------- /www/freebsd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/freebsd.png -------------------------------------------------------------------------------- /www/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/github.png -------------------------------------------------------------------------------- /www/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/grid.png -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | Mega Happy Sprite 2 | 3 | 4 | 5 | 28 | 29 | 45 | 46 | 47 | 48 | 49 |
50 | 51 | 52 | 53 |
54 | 55 | 56 | 57 | 60 | 63 | 66 | 67 |
58 | ABOUT 59 | 61 | DOWNLOAD 62 | 64 | MANUAL 65 |
68 | 69 |
70 |


71 |
72 |
73 |
74 |
75 | 76 |
77 | 78 | -------------------------------------------------------------------------------- /www/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/loading.gif -------------------------------------------------------------------------------- /www/manual.html: -------------------------------------------------------------------------------- 1 | download video

2 | 5 | -------------------------------------------------------------------------------- /www/mega.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/mega.png -------------------------------------------------------------------------------- /www/raver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/raver.png -------------------------------------------------------------------------------- /www/sack.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/sack.js -------------------------------------------------------------------------------- /www/sega.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/sega.png -------------------------------------------------------------------------------- /www/tarball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/tarball.png -------------------------------------------------------------------------------- /www/ubuntu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/ubuntu.png -------------------------------------------------------------------------------- /www/windows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sigflup/Mega-Happy-Sprite/32d36ab5080c287a062cf8c8251907811a0d3708/www/windows.png --------------------------------------------------------------------------------