├── .gitignore ├── Brogue seed catalog.txt ├── Makefile ├── README.md ├── agpl.txt ├── bin ├── fonts │ ├── font-1.png │ ├── font-10.png │ ├── font-11.png │ ├── font-12.png │ ├── font-13.png │ ├── font-2.png │ ├── font-3.png │ ├── font-4.png │ ├── font-5.png │ ├── font-6.png │ ├── font-7.png │ ├── font-8.png │ └── font-9.png ├── index.html └── keymap ├── brogue ├── brogue.desktop ├── make-link-for-desktop.sh ├── readme └── src ├── brogue ├── Architect.c ├── Buttons.c ├── Combat.c ├── Dijkstra.c ├── Globals.c ├── Grid.c ├── IO.c ├── IncludeGlobals.h ├── Items.c ├── Light.c ├── MainMenu.c ├── Monsters.c ├── Movement.c ├── Random.c ├── Recordings.c ├── Rogue.h ├── RogueMain.c └── Time.c ├── get-libtcod.sh ├── libtcod-1.5.2 ├── LIBTCOD-CREDITS.txt ├── LIBTCOD-LICENSE.txt ├── Makefile ├── README-SDL.txt ├── REVISION.txt ├── data │ ├── cfg │ │ └── sample.cfg │ ├── fonts │ │ ├── README.txt │ │ ├── arial10x10.png │ │ ├── arial12x12.png │ │ ├── arial8x8.png │ │ ├── caeldera8x8_gs_tc.png │ │ ├── celtic_garamond_10x10_gs_tc.png │ │ ├── consolas10x10_gs_tc.png │ │ ├── consolas12x12_gs_tc.png │ │ ├── consolas8x8_gs_tc.png │ │ ├── consolas_unicode_10x10.png │ │ ├── consolas_unicode_12x12.png │ │ ├── consolas_unicode_16x16.png │ │ ├── consolas_unicode_8x8.png │ │ ├── courier10x10_aa_tc.png │ │ ├── courier12x12_aa_tc.png │ │ ├── courier8x8_aa_tc.png │ │ ├── dejavu10x10_gs_tc.png │ │ ├── dejavu12x12_gs_tc.png │ │ ├── dejavu16x16_gs_tc.png │ │ ├── dejavu8x8_gs_tc.png │ │ ├── dejavu_wide12x12_gs_tc.png │ │ ├── dejavu_wide16x16_gs_tc.png │ │ ├── dundalk12x12_gs_tc.png │ │ ├── lucida10x10_gs_tc.png │ │ ├── lucida12x12_gs_tc.png │ │ ├── lucida8x8_gs_tc.png │ │ ├── prestige10x10_gs_tc.png │ │ ├── prestige12x12_gs_tc.png │ │ ├── prestige8x8_gs_tc.png │ │ ├── terminal10x10_gs_tc.png │ │ ├── terminal10x16_gs_ro.png │ │ ├── terminal10x16_gs_tc.png │ │ ├── terminal10x18_gs_ro.png │ │ ├── terminal12x12_gs_ro.png │ │ ├── terminal16x16_gs_ro.png │ │ ├── terminal7x7_gs_tc.png │ │ ├── terminal8x12_gs_ro.png │ │ ├── terminal8x12_gs_tc.png │ │ ├── terminal8x14_gs_ro.png │ │ ├── terminal8x8_aa_as.png │ │ ├── terminal8x8_aa_ro.png │ │ ├── terminal8x8_aa_tc.png │ │ ├── terminal8x8_gs_as.png │ │ ├── terminal8x8_gs_ro.png │ │ └── terminal8x8_gs_tc.png │ ├── img │ │ ├── circle.png │ │ └── skull.png │ └── namegen │ │ ├── README.txt │ │ ├── jice_celtic.cfg │ │ ├── jice_fantasy.cfg │ │ ├── jice_mesopotamian.cfg │ │ ├── jice_norse.cfg │ │ ├── jice_region.cfg │ │ ├── jice_town.cfg │ │ ├── mingos_demon.cfg │ │ ├── mingos_dwarf.cfg │ │ ├── mingos_norse.cfg │ │ ├── mingos_standard.cfg │ │ └── mingos_town.cfg ├── doc │ ├── css │ │ ├── shCore.css │ │ ├── shThemeDefault.css │ │ └── style.css │ ├── font │ │ ├── DroidSans-Bold.eot │ │ ├── DroidSans-Bold.ttf │ │ ├── DroidSans.eot │ │ ├── DroidSans.ttf │ │ ├── VeraMono-Bold.eot │ │ ├── VeraMono-Bold.ttf │ │ ├── VeraMono.eot │ │ └── VeraMono.ttf │ ├── html │ │ └── compil │ │ │ ├── index.html │ │ │ ├── linux.html │ │ │ ├── macosx.html │ │ │ ├── msys_cb.html │ │ │ └── msys_mingw.html │ ├── html2 │ │ ├── bsp.html │ │ ├── bsp_init.html │ │ ├── bsp_inorder.png │ │ ├── bsp_invlevelorder.png │ │ ├── bsp_levelorder.png │ │ ├── bsp_postorder.png │ │ ├── bsp_preorder.png │ │ ├── bsp_read.html │ │ ├── bsp_resize.html │ │ ├── bsp_split.html │ │ ├── bsp_traverse.html │ │ ├── color.html │ │ ├── compile_libtcod.html │ │ ├── compile_libtcod_codelite.html │ │ ├── compile_libtcod_haiku.html │ │ ├── compile_libtcod_linux.html │ │ ├── compile_libtcod_mingw.html │ │ ├── console.html │ │ ├── console_advanced.html │ │ ├── console_ascii.html │ │ ├── console_bkgnd_flag_t.html │ │ ├── console_blocking_input.html │ │ ├── console_credits.html │ │ ├── console_draw.html │ │ ├── console_draw_basic.html │ │ ├── console_fading.html │ │ ├── console_flush.html │ │ ├── console_fullscreen.html │ │ ├── console_init.html │ │ ├── console_init_root.html │ │ ├── console_input.html │ │ ├── console_key_t.html │ │ ├── console_keyboard_repeat.html │ │ ├── console_keycode_t.html │ │ ├── console_map.html │ │ ├── console_mouse_t.html │ │ ├── console_non_blocking_input.html │ │ ├── console_offscreen.html │ │ ├── console_print.html │ │ ├── console_read.html │ │ ├── console_set_custom_font.html │ │ ├── console_window.html │ │ ├── fbm_perlin.png │ │ ├── fbm_simplex.png │ │ ├── fbm_wavelet.png │ │ ├── fov.html │ │ ├── fov_compute.html │ │ ├── fov_get.html │ │ ├── fov_init.html │ │ ├── heightmap.html │ │ ├── heightmap_base.html │ │ ├── heightmap_init.html │ │ ├── heightmap_modify.html │ │ ├── heightmap_read.html │ │ ├── image.html │ │ ├── image_blit.html │ │ ├── image_create.html │ │ ├── image_read.html │ │ ├── image_save.html │ │ ├── image_update.html │ │ ├── line.html │ │ ├── list.html │ │ ├── list_array.html │ │ ├── list_create.html │ │ ├── list_iterator.html │ │ ├── list_list.html │ │ ├── list_stack.html │ │ ├── midpoint.png │ │ ├── mingw1.png │ │ ├── mingw2.png │ │ ├── mingw3.png │ │ ├── mingw4.png │ │ ├── mouse.html │ │ ├── namegen.html │ │ ├── namegen_file.html │ │ ├── namegen_file_1.html │ │ ├── namegen_file_2.html │ │ ├── namegen_file_3.html │ │ ├── namegen_file_4.html │ │ ├── namegen_generate.html │ │ ├── namegen_init.html │ │ ├── noise.html │ │ ├── noise_get.html │ │ ├── noise_get_fbm.html │ │ ├── noise_get_turbulence.html │ │ ├── noise_init.html │ │ ├── noise_setType.html │ │ ├── parser.html │ │ ├── parser_format.html │ │ ├── parser_run.html │ │ ├── parser_str.html │ │ ├── parser_types.html │ │ ├── path.html │ │ ├── path_compute.html │ │ ├── path_init.html │ │ ├── path_read.html │ │ ├── perlin.png │ │ ├── random.html │ │ ├── random_distro.html │ │ ├── random_init.html │ │ ├── random_use.html │ │ ├── simplex.png │ │ ├── subcell.png │ │ ├── subcell_comp.png │ │ ├── subcell_pyro.png │ │ ├── system.html │ │ ├── system_clipboard.html │ │ ├── system_filesystem.html │ │ ├── system_misc.html │ │ ├── system_screenshots.html │ │ ├── system_sdlcbk.html │ │ ├── system_time.html │ │ ├── terminal.png │ │ ├── terminal8x8_aa_as.png │ │ ├── terminal8x8_gs_as.png │ │ ├── terminal8x8_gs_as2.png │ │ ├── terminal8x8_gs_ro.png │ │ ├── terminal8x8_gs_tc.png │ │ ├── turbulence_perlin.png │ │ ├── turbulence_simplex.png │ │ ├── turbulence_wavelet.png │ │ ├── wavelet.png │ │ ├── zip.html │ │ ├── zip_init.html │ │ ├── zip_load.html │ │ └── zip_put.html │ ├── img │ │ ├── breadcrumb.png │ │ ├── c.png │ │ ├── cpp.png │ │ ├── cs.png │ │ ├── gradient.png │ │ ├── haschildren.png │ │ ├── lua.png │ │ ├── next.png │ │ ├── prev.png │ │ ├── py.png │ │ ├── sidebar.png │ │ └── sidebar_arrow.png │ ├── index2.html │ └── js │ │ ├── doctcod.js │ │ ├── shBrushBash.js │ │ └── shCore.js ├── hmtool ├── hmtool_debug ├── include │ ├── bresenham.h │ ├── bresenham.hpp │ ├── bsp.h │ ├── bsp.hpp │ ├── color.h │ ├── color.hpp │ ├── console.h │ ├── console.hpp │ ├── console_types.h │ ├── fov.h │ ├── fov.hpp │ ├── fov_types.h │ ├── gui │ │ ├── button.hpp │ │ ├── container.hpp │ │ ├── flatlist.hpp │ │ ├── gui.hpp │ │ ├── hbox.hpp │ │ ├── image.hpp │ │ ├── label.hpp │ │ ├── radiobutton.hpp │ │ ├── slider.hpp │ │ ├── statusbar.hpp │ │ ├── textbox.hpp │ │ ├── togglebutton.hpp │ │ ├── toolbar.hpp │ │ ├── vbox.hpp │ │ └── widget.hpp │ ├── heightmap.h │ ├── heightmap.hpp │ ├── howto.hpp │ ├── image.h │ ├── image.hpp │ ├── lex.h │ ├── lex.hpp │ ├── libtcod.h │ ├── libtcod.hpp │ ├── libtcod_int.h │ ├── list.h │ ├── list.hpp │ ├── mersenne.h │ ├── mersenne.hpp │ ├── mersenne_types.h │ ├── mouse.h │ ├── mouse.hpp │ ├── mouse_types.h │ ├── namegen.h │ ├── namegen.hpp │ ├── noise.h │ ├── noise.hpp │ ├── noise_defaults.h │ ├── parser.h │ ├── parser.hpp │ ├── path.h │ ├── path.hpp │ ├── sys.h │ ├── sys.hpp │ ├── tree.h │ ├── tree.hpp │ ├── txtfield.h │ ├── txtfield.hpp │ ├── wrappers.h │ ├── zip.h │ └── zip.hpp ├── libtcod-CHANGELOG.txt ├── libtcod.cfg ├── python │ ├── cprotos.py │ ├── libtcodpy.py │ └── samples_py.py ├── samples │ ├── apfviewer.cpp │ ├── doctcod │ │ ├── doctcod.cpp │ │ └── page.tpl │ ├── frost │ │ └── frost.cpp │ ├── hmtool │ │ ├── README.txt │ │ ├── hmtool.cpp │ │ ├── operation.cpp │ │ └── operation.hpp │ ├── navier │ │ ├── main.cpp │ │ └── main.hpp │ ├── rad │ │ ├── README.txt │ │ ├── bsp_helper.cpp │ │ ├── bsp_helper.hpp │ │ ├── main.cpp │ │ ├── rad_shader.cpp │ │ ├── rad_shader.hpp │ │ ├── rad_shader_photon.cpp │ │ ├── rad_shader_standard.cpp │ │ └── terminal.png │ ├── ripples │ │ ├── main.cpp │ │ ├── main.hpp │ │ ├── util_ripples.cpp │ │ └── util_ripples.hpp │ ├── samples_c.c │ ├── samples_cpp.cpp │ ├── weather │ │ ├── main.cpp │ │ ├── main.hpp │ │ ├── util_weather.cpp │ │ └── util_weather.hpp │ └── worldgen │ │ ├── README.txt │ │ ├── main.cpp │ │ ├── main.hpp │ │ ├── terminal.png │ │ ├── util_worldgen.cpp │ │ └── util_worldgen.hpp ├── samples_c ├── samples_c_debug ├── samples_c_debug.exe ├── samples_cpp ├── samples_cpp_debug ├── samples_cpp_debug.exe ├── src │ ├── README.txt │ ├── bresenham.cpp │ ├── bresenham_c.c │ ├── bsp.cpp │ ├── bsp_c.c │ ├── color.cpp │ ├── color_c.c │ ├── console.cpp │ ├── console_c.c │ ├── fov.cpp │ ├── fov_c.c │ ├── fov_circular_raycasting.c │ ├── fov_diamond_raycasting.c │ ├── fov_permissive2.c │ ├── fov_recursive_shadowcasting.c │ ├── fov_restrictive.c │ ├── gui │ │ ├── README.txt │ │ ├── button.cpp │ │ ├── container.cpp │ │ ├── flatlist.cpp │ │ ├── hbox.cpp │ │ ├── image.cpp │ │ ├── label.cpp │ │ ├── radiobutton.cpp │ │ ├── slider.cpp │ │ ├── statusbar.cpp │ │ ├── textbox.cpp │ │ ├── togglebutton.cpp │ │ ├── toolbar.cpp │ │ ├── vbox.cpp │ │ └── widget.cpp │ ├── heightmap.cpp │ ├── heightmap_c.c │ ├── image.cpp │ ├── image_c.c │ ├── lex.cpp │ ├── lex_c.c │ ├── list_c.c │ ├── mersenne.cpp │ ├── mersenne_c.c │ ├── mouse.cpp │ ├── namegen.cpp │ ├── namegen_c.c │ ├── noise.cpp │ ├── noise_c.c │ ├── parser.cpp │ ├── parser_c.c │ ├── path.cpp │ ├── path_c.c │ ├── png │ │ ├── lodepng.c │ │ └── lodepng.h │ ├── sys.cpp │ ├── sys_c.c │ ├── sys_opengl_c.c │ ├── sys_sdl_c.c │ ├── sys_sdl_img_bmp.c │ ├── sys_sdl_img_png.c │ ├── tree_c.c │ ├── txtfield.cpp │ ├── txtfield_c.c │ ├── wrappers.c │ ├── zip.cpp │ ├── zip_c.c │ └── zlib │ │ ├── adler32.c │ │ ├── compress.c │ │ ├── crc32.c │ │ ├── crc32.h │ │ ├── deflate.c │ │ ├── deflate.h │ │ ├── gzclose.c │ │ ├── gzguts.h │ │ ├── gzlib.c │ │ ├── gzread.c │ │ ├── gzwrite.c │ │ ├── infback.c │ │ ├── inffast.c │ │ ├── inffast.h │ │ ├── inffixed.h │ │ ├── inflate.c │ │ ├── inflate.h │ │ ├── inftrees.c │ │ ├── inftrees.h │ │ ├── trees.c │ │ ├── trees.h │ │ ├── uncompr.c │ │ ├── zconf.h │ │ ├── zlib.h │ │ ├── zutil.c │ │ └── zutil.h └── terminal.png └── platform ├── PlatformDefines.h ├── curses-platform.c ├── javascript-platform.c ├── main.c ├── platform.h ├── platformdependent.c ├── tcod-platform.c ├── term.c └── term.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Object files 5 | *.o 6 | *.ko 7 | *.obj 8 | *.elf 9 | 10 | # Linker output 11 | *.ilk 12 | *.map 13 | *.exp 14 | 15 | # Precompiled Headers 16 | *.gch 17 | *.pch 18 | 19 | # Libraries 20 | *.lib 21 | *.a 22 | *.la 23 | *.lo 24 | 25 | # Shared objects (inc. Windows DLLs) 26 | *.dll 27 | *.so 28 | *.so.* 29 | *.dylib 30 | 31 | # Executables 32 | *.exe 33 | *.out 34 | *.app 35 | *.i*86 36 | *.x86_64 37 | *.hex 38 | 39 | # Debug files 40 | *.dSYM/ 41 | *.su 42 | *.idb 43 | *.pdb 44 | 45 | # Kernel Module Compile Results 46 | *.mod* 47 | *.cmd 48 | .tmp_versions/ 49 | modules.order 50 | Module.symvers 51 | Mkfile.old 52 | dkms.conf 53 | 54 | bin/brogue.html 55 | bin/brogue.html.mem 56 | bin/brogue.js 57 | bin/brogue 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Brogue is a Roguelike game for Mac OS X, Windows and Linux by Brian Walker 2 | The latest version can be downloaded at http://sites.google.com/site/broguegame/ 3 | 4 | This repository is a version of Brogue built for the browser using Emscripten and HTML canvas as a learning exercise. 5 | 6 | [Click here to play Brogue now!](https://freethenation.github.io/broguejs/) 7 | -------------------------------------------------------------------------------- /bin/fonts/font-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-1.png -------------------------------------------------------------------------------- /bin/fonts/font-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-10.png -------------------------------------------------------------------------------- /bin/fonts/font-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-11.png -------------------------------------------------------------------------------- /bin/fonts/font-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-12.png -------------------------------------------------------------------------------- /bin/fonts/font-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-13.png -------------------------------------------------------------------------------- /bin/fonts/font-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-2.png -------------------------------------------------------------------------------- /bin/fonts/font-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-3.png -------------------------------------------------------------------------------- /bin/fonts/font-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-4.png -------------------------------------------------------------------------------- /bin/fonts/font-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-5.png -------------------------------------------------------------------------------- /bin/fonts/font-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-6.png -------------------------------------------------------------------------------- /bin/fonts/font-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-7.png -------------------------------------------------------------------------------- /bin/fonts/font-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-8.png -------------------------------------------------------------------------------- /bin/fonts/font-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/bin/fonts/font-9.png -------------------------------------------------------------------------------- /bin/keymap: -------------------------------------------------------------------------------- 1 | # The following keys are valid, although modifier keys (like SHIFT) are 2 | # not supported. Keys that produce characters but are not listed below 3 | # are mapped by the character they produce. 4 | # 5 | # Key remapping is also supported in curses mode, although some key names 6 | # are different and others are the same. 7 | 8 | 9 | # libtcod-mode keys: 10 | # 11 | # NONE 12 | # ESCAPE BACKSPACE TAB ENTER 13 | # SHIFT CONTROL ALT CAPSLOCK LWIN RWIN APPS NUMLOCK SCROLLLOCK 14 | # PAGEUP PAGEDOWN END HOME 15 | # UP LEFT RIGHT DOWN 16 | # PRINTSCREEN PAUSE INSERT DELETE 17 | # 0 1 2 3 4 5 6 7 8 9 18 | # KP0 KP1 KP2 KP3 KP4 KP5 KP6 KP7 KP8 KP9 KPADD KPSUB KPDIV KPMUL KPDEC KPENTER 19 | # F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 20 | # SPACE 21 | 22 | # EXAMPLE: numberpad play 23 | # if you remove the # from each of the following lines, it will be 24 | # possible to perform many actions with only the numberpad (in tcod mode) 25 | #KPDIV a 26 | #KPMUL i 27 | #KPADD t 28 | #KPSUB d 29 | #KPDEC s 30 | #KP0 ESCAPE 31 | 32 | #F5 S 33 | #F7 O 34 | #F2 A 35 | #A NONE 36 | #O NONE 37 | #S NONE 38 | 39 | -------------------------------------------------------------------------------- /brogue: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cd `dirname $0`/bin 3 | 4 | ./brogue $* 5 | 6 | # if [ -t 0 ]; then 7 | # ./brogue -t $* 8 | #else 9 | # ./brogue $* 10 | #fi 11 | 12 | -------------------------------------------------------------------------------- /brogue.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Name=Brogue 1.7.2 5 | GenericName=Roguelike 6 | Comment=Brave the Dungeons of Doom! 7 | Exec=/home/o/brogue-linux-1.7.2/brogue-1.7.2/brogue 8 | Path=/home/o/brogue-linux-1.7.2/brogue-1.7.2 9 | Icon=/home/o/brogue-linux-1.7.2/brogue-1.7.2/bin/brogue-icon.png 10 | Terminal=false 11 | 12 | -------------------------------------------------------------------------------- /make-link-for-desktop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cd `dirname $0` 3 | sed s?PATH?`pwd`?g > brogue.desktop <<-end 4 | [Desktop Entry] 5 | Version=1.0 6 | Type=Application 7 | Name=Brogue 1.7.2 8 | GenericName=Roguelike 9 | Comment=Brave the Dungeons of Doom! 10 | Exec=PATH/brogue 11 | Path=PATH 12 | Icon=PATH/bin/brogue-icon.png 13 | Terminal=false 14 | 15 | end 16 | 17 | chmod +x brogue.desktop 18 | 19 | echo "Created brogue.desktop." 20 | echo "If your desktop is in the default location, type:" 21 | echo "mv brogue.desktop ~/Desktop" 22 | 23 | -------------------------------------------------------------------------------- /readme: -------------------------------------------------------------------------------- 1 | Be sure to read readme.rtf too. This readme only explains functionality that 2 | is specific to the Linux release of Brogue. 3 | 4 | --- 5 | 6 | Brogue now supports remapped keys. The remapping engine is quite limited 7 | and is described in bin/keymap. 8 | 9 | Press F12 or alt-enter to toggle fullscreen mode. 10 | 11 | Press -/+ or pgdn/pgup to adjust the font size 12 | 13 | -- 14 | 15 | ./brogue is a shell script that will invoke bin/brogue with the appropriate 16 | switches and in the correct working folder. It therefore serves as an 17 | acceptable target for a desktop shortcut (see make-link-for-desktop.sh for 18 | an easy way to make one.) It will pass command line arguments along 19 | to bin/brogue. The following switches are accepted: 20 | 21 | -h print a help message 22 | -V print the version 23 | --scores dump scores to output and exit immediately 24 | 25 | -n start a new game, skipping the menu 26 | -s seed start a new game with the specified numerical seed 27 | -o filename[.broguesave] open a recording (extension may be omitted) 28 | -v recording[.broguerec] view a recording (extension may be omitted) 29 | -M same as --no-menu 30 | 31 | --size N starts the game with font size N (1 to 13) 32 | --no-menu never display the menu (automatically pick new game) 33 | --noteye-hack ignore SDL-specific application state checks 34 | 35 | -- 36 | 37 | The following render switches are accepted: 38 | 39 | -t force ncurses-based terminal mode 40 | --SDL force libtcod mode with an SDL renderer (default) 41 | -gl force libtcod mode with an OpenGL renderer 42 | 43 | -- 44 | 45 | Terminal mode uses as many colors as it has available to it. If you are using 46 | gnome terminal, you already have 256 color support, but the terminal doesn't 47 | advertise that fact. Change the TERM environment variable to tell Brogue that 48 | you have more than 16 colors: 49 | 50 | export TERM=xterm-256color 51 | 52 | Converely, if you are using a terminal that has 256 colors but only want to 53 | use 16: 54 | 55 | export TERM=xterm 56 | 57 | 58 | If you are using xterm, read http://push.cx/2008/256-color-xterms-in-ubuntu 59 | 60 | -- 61 | 62 | The Makefile accepts these targets: 63 | make tcod 64 | make curses 65 | make both 66 | 67 | If you build for curses only, libtcod is not required and SDL will not be linked 68 | or initialized at runtime. If you build for tcod only, you do not need 69 | ncurses-dev. If you make either 'tcod' or 'both', the Makefile will 70 | automatically download the 32-bit version of libtcod for you and untar it in 71 | the right place (in src). 72 | 73 | To produce a distributable tar file, make tar. To clean (as you must after 74 | changing headers or before switching targets -- sorry about that), make clean. 75 | 76 | make both is the default. 77 | 78 | -------------------------------------------------------------------------------- /src/get-libtcod.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cd `dirname $0` 3 | wget -c http://doryen.eptalys.net/?file_id=48 -O libtcod-1.5.2-32.tar.gz 4 | tar -xf libtcod-1.5.2-32.tar.gz 5 | cp libtcod-1.5.2/libtcod.so ../bin 6 | 7 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/LIBTCOD-CREDITS.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/LIBTCOD-CREDITS.txt -------------------------------------------------------------------------------- /src/libtcod-1.5.2/LIBTCOD-LICENSE.txt: -------------------------------------------------------------------------------- 1 | * libtcod 1.5.2 2 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 3 | * All rights reserved. 4 | * 5 | * libtcod 'The Doryen library' is a cross-platform C/C++ library for roguelike 6 | * developers. 7 | * Its source code is available from : 8 | * http://doryen.eptalys.net/libtcod 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * * Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * * Redistributions in binary form must reproduce the above copyright 15 | * notice, this list of conditions and the following disclaimer in the 16 | * documentation and/or other materials provided with the distribution. 17 | * * The name of Jice or Mingos may not be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 21 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 27 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/README-SDL.txt: -------------------------------------------------------------------------------- 1 | 2 | Please distribute this file with the SDL runtime environment: 3 | 4 | The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library 5 | designed to make it easy to write multi-media software, such as games and 6 | emulators. 7 | 8 | The Simple DirectMedia Layer library source code is available from: 9 | http://www.libsdl.org/ 10 | 11 | This library is distributed under the terms of the GNU LGPL license: 12 | http://www.gnu.org/copyleft/lesser.html 13 | 14 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/REVISION.txt: -------------------------------------------------------------------------------- 1 | 73791d5e0422 (1.5.x) 2 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/cfg/sample.cfg: -------------------------------------------------------------------------------- 1 | myStruct "struct_name" { 2 | // 3 | bool_field=true 4 | char_field='Z' 5 | int_field=24 6 | float_field=3.14 7 | string_field="hello" 8 | color_field="255,128,128" 9 | dice_field="0.5x3d5+2" 10 | 11 | // dynamically declared fields 12 | bool bool_field2=false 13 | char char_field2='@' 14 | int int_field2=4 15 | float float_field2=4.3 16 | string string_field2="world" 17 | color color_field2=#FF22CC 18 | dice dice_field2="3d20" 19 | 20 | bool_list=[true, false, true] 21 | char_list=['a', 'b', 'z'] 22 | integer_list=[13,2,-3] 23 | float_list=[5.0,2.0,-3.5] 24 | string_list=["item one","time_two"] 25 | color_list=["42,42,142","128,64,128"] 26 | // dice_list=["3d4","2d4+2","0.75x4d6-1"] 27 | 28 | // dynamically declared list fields 29 | bool[] bool_list2=[true, false, true] 30 | char[] char_list2=['a', 'b', 'z'] 31 | int[] integer_list2=[13,2,-3] 32 | float[] float_list2=[5.0,2.0,-3.5] 33 | string[] string_list2=["item one","time_two"] 34 | color[] color_list2=["42,42,142","128,64,128"] 35 | 36 | } 37 | // a completely dynamic structure (not declared at compile time) 38 | struct dynStruct { 39 | int someVar=4 40 | struct subStruct { 41 | float anotherVar=4.3 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/README.txt: -------------------------------------------------------------------------------- 1 | This directory contains antialiased fonts for libtcod. 2 | These fonts are in public domain. 3 | 4 | The file names are composed with : 5 | __.png 6 | : aa 32 bits png with alpha channel 7 | gs 24 bits or greyscale PNG 8 | : as standard ASCII layout 9 | ro standard ASCII layout in row 10 | tc TCOD layout 11 | 12 | The terminal8x8 font is provided is every possible format as en example. 13 | You can try them with the provided samples : 14 | 15 | ./samples_c -font fonts/terminal8x8_aa_as.png -font-nb-char 16 16 16 | ./samples_c -font fonts/terminal8x8_aa_ro.png -font-nb-char 16 16 -font-in-row 17 | ./samples_c -font fonts/terminal8x8_aa_tc.png -font-nb-char 32 8 -font-tcod 18 | ./samples_c -font fonts/terminal8x8_gs_as.png -font-nb-char 16 16 -font-greyscale 19 | ./samples_c -font fonts/terminal8x8_gs_ro.png -font-nb-char 16 16 -font-greyscale -font-in-row 20 | ./samples_c -font fonts/terminal8x8_gs_tc.png -font-nb-char 32 8 -font-greyscale -font-tcod 21 | 22 | The libtcod 1.3.2 (non antialiased) terminal font is still there and still works : 23 | ./samples_c -font terminal.png -font-nb-char 16 16 24 | 25 | All other fonts are provided only in gs_tc format (greyscale, TCOD layout). 26 | To try them : 27 | 28 | Terminal fonts with different size (you can use them as template to create new fonts) : 29 | ./samples_c -font fonts/terminal7x7_gs_tc.png -font-nb-char 32 8 -font-greyscale -font-tcod 30 | ./samples_c -font fonts/terminal10x10_gs_tc.png -font-nb-char 32 8 -font-greyscale -font-tcod 31 | 32 | Custom fonts : 33 | ./samples_c -font fonts/caeldera8x8_gs_tc.png -font-nb-char 32 8 -font-greyscale -font-tcod 34 | ./samples_c -font fonts/lucida8x8_gs_tc.png -font-nb-char 32 8 -font-greyscale -font-tcod 35 | ./samples_c -font fonts/celtic_garamond_10x10_gs_tc.png -font-nb-char 32 8 -font-greyscale -font-tcod 36 | ./samples_c -font fonts/dundalk12x12_gs_tc.png -font-nb-char 32 8 -font-greyscale -font-tcod 37 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/arial10x10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/arial10x10.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/arial12x12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/arial12x12.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/arial8x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/arial8x8.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/caeldera8x8_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/caeldera8x8_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/celtic_garamond_10x10_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/celtic_garamond_10x10_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/consolas10x10_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/consolas10x10_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/consolas12x12_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/consolas12x12_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/consolas8x8_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/consolas8x8_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/consolas_unicode_10x10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/consolas_unicode_10x10.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/consolas_unicode_12x12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/consolas_unicode_12x12.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/consolas_unicode_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/consolas_unicode_16x16.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/consolas_unicode_8x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/consolas_unicode_8x8.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/courier10x10_aa_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/courier10x10_aa_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/courier12x12_aa_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/courier12x12_aa_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/courier8x8_aa_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/courier8x8_aa_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/dejavu10x10_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/dejavu10x10_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/dejavu12x12_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/dejavu12x12_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/dejavu16x16_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/dejavu16x16_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/dejavu8x8_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/dejavu8x8_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/dejavu_wide12x12_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/dejavu_wide12x12_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/dejavu_wide16x16_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/dejavu_wide16x16_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/dundalk12x12_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/dundalk12x12_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/lucida10x10_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/lucida10x10_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/lucida12x12_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/lucida12x12_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/lucida8x8_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/lucida8x8_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/prestige10x10_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/prestige10x10_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/prestige12x12_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/prestige12x12_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/prestige8x8_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/prestige8x8_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal10x10_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal10x10_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal10x16_gs_ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal10x16_gs_ro.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal10x16_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal10x16_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal10x18_gs_ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal10x18_gs_ro.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal12x12_gs_ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal12x12_gs_ro.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal16x16_gs_ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal16x16_gs_ro.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal7x7_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal7x7_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal8x12_gs_ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal8x12_gs_ro.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal8x12_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal8x12_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal8x14_gs_ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal8x14_gs_ro.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal8x8_aa_as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal8x8_aa_as.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal8x8_aa_ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal8x8_aa_ro.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal8x8_aa_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal8x8_aa_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal8x8_gs_as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal8x8_gs_as.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal8x8_gs_ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal8x8_gs_ro.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/fonts/terminal8x8_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/fonts/terminal8x8_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/img/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/img/circle.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/img/skull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/data/img/skull.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/namegen/jice_celtic.cfg: -------------------------------------------------------------------------------- 1 | //Celtic names from Jice's "The Cave" 2 | name "Celtic male" { 3 | syllablesStart = "Aen, Agno, All, Ba, Beo, Brig, Ci, Cre, Dan, Del, Ela, Eo, En, Er, Et, In, Io, Morr, Nem, Nu, Og, Or, Ta" 4 | syllablesMiddle = "a, ar, ba, bo, ch, d, ig" 5 | syllablesEnd = "aid, ain, an, and, th, ed, eth, gus, lam, lor, man, od, t, thach" 6 | rules = "$s$m$e, $s$e" 7 | } 8 | 9 | name "Celtic female" { 10 | syllablesStart = "Aen, Agno, All, Ba, Beo, Brig, Ci, Cre, Dan, Del, Ela, Eo, En, Er, Et, In, Io, Morr, Nem, Nu, Og, Or, Ta" 11 | syllablesMiddle = "a, ar, ba, bo, ch, d, ig" 12 | syllablesEnd = "ai, an, da, id, iu, ma, me, na, ne, tha" 13 | rules = "$s$m$e, $s$e" 14 | } 15 | 16 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/namegen/jice_fantasy.cfg: -------------------------------------------------------------------------------- 1 | //Fantasy names from Jice's "The Cave" 2 | name "Fantasy male" { 3 | syllablesStart = "Aer, An, Ar, Ban, Bar, Ber, Beth, Bett, Cut, Dan, Dar, Dell, Der, Edr, Er, Eth, Ett, Fin, Ian, Iarr, Ill, Jed, Kan, Kar, Ker, Kurr, Kyr, Man, Mar, Mer, Mir, Tsal, Tser, Tsir, Van, Var, Yur, Yyr" 4 | syllablesMiddle = "al, an, ar, el, en, ess, ian, onn, or" 5 | syllablesEnd = "ai, an, ar, ath, en, eo, ian, is, u, or" 6 | illegal = "orar, arrar" 7 | rules = "$s$m$e, $s$e" 8 | } 9 | 10 | name "Fantasy female" { 11 | syllablesStart = "Aer, An, Ar, Ban, Bar, Ber, Beth, Bett, Cut, Dan, Dar, Dell, Der, Edr, Er, Eth, Ett, Fin, Ian, Iarr, Ill, Jed, Kan, Kar, Ker, Kurr, Kyr, Man, Mar, Mer, Mir, Tsal, Tser, Tsir, Van, Var, Yur, Yyr" 12 | syllablesMiddle = "al, an, ar, el, en, ess, ian, onn, or" 13 | syllablesEnd = "a, ae, aelle, ai, ea, i, ia, u, wen, wyn" 14 | illegal = "arrar" 15 | rules = "$s$m$e, $s$e" 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/namegen/jice_mesopotamian.cfg: -------------------------------------------------------------------------------- 1 | //Mesopotamian names from Jice's "The Cave" 2 | name "Mesopotamian male" { 3 | syllablesStart = "A, Ann, Ash, E', En, Er, Gil, In, Ir, Ish, Mar, Ni, Nin, Re, Ti, Ur" 4 | syllablesMiddle = "am, an, du, esh, gam, gir, ka, ki, li, un, ur, ta" 5 | syllablesEnd = "aki, al, ar, at, du, eph, esh, il, im, ki, nu, uk, ur, uz" 6 | illegal = "aa, e'e" 7 | rules = "$s$m$e, $s$e" 8 | } 9 | 10 | name "Mesopotamian female" { 11 | syllablesStart = "A, Ann, Ash, E', En, Er, Gil, In, Ir, Ish, Mar, Ni, Nin, Re, Ti, Ur" 12 | syllablesMiddle = "am, an, du, esh, gam, gir, ka, ki, li, un, ur, ta" 13 | syllablesEnd = "ag, il, la, na, sag, su, ta" 14 | illegal = "aa, e'e" 15 | rules = "$s$m$e, $s$e" 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/namegen/jice_norse.cfg: -------------------------------------------------------------------------------- 1 | //Norse names from Jice's "The Cave" 2 | name "Norse male" { 3 | syllablesStart = "Al, Ae, As, Bi, Fen, Ha, Hag, Ho, Hu, Iv, Jot, Ma, Mio, Mu, Nid, Ors, Ra, Sta, Svar, Tys, Vae, Van, Vol, Y, Ygg" 4 | syllablesMiddle = "an, ar, ba, da, dra, gar, na, tal" 5 | syllablesEnd = "ad, ald, agr, ar, ard, eyr, far, frost, heim, hogg, in, mir, nar, nir, or, osk, rir, sil, sir, ttir, urd" 6 | illegal = "yor, yar, yad, yin" 7 | rules = "$s$m$e, $s$e" 8 | } 9 | 10 | name "Norse female" { 11 | syllablesStart = "Al, Ae, As, Bi, Fen, Ha, Hag, Ho, Hu, Iv, Jot, Ma, Mio, Mu, Nid, Ors, Ra, Sta, Svar, Tys, Vae, Van, Vol, Y, Ygg" 12 | syllablesMiddle = "an, ar, ba, da, dra, gar, na, tal" 13 | syllablesEnd = "a, la, li, va" 14 | illegal = "raa, ya, aea, aea" 15 | rules = "$s$m$e, $s$e" 16 | } 17 | 18 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/namegen/jice_region.cfg: -------------------------------------------------------------------------------- 1 | //Region names from Jice's "The Cave" 2 | name "region" { 3 | syllablesStart = "Act, Afr, Ag, Agr, Alb, Am, An, Angl, Ant, As, Asys, Asis, At, Atl, Brund, Cath, Cor, Dan, Eb, Eg, Er, Esc, Esp, Est, Eth, Eur, Flor, It, Lyr, Mal, Mir, Myr, Nor, Pel, Rom, Seg, Sib, Sylv, Terr, Tir, Tr, Tyr, Xan" 4 | syllablesMiddle = "ad, ag, al, an, and, ant, anth, ar, ard, as, at, atr, eg, en, ent, ern, et, ian, in, itr, on, op, ov, ur, ymn, yr" 5 | syllablesEnd = "a, aia, ana, as, ea, ene, eos, esia, ia, iad, ias, is, ium, ius, on, ona, or, ova, um, us, ya" 6 | rules = "$s$m$e, $s$e" 7 | } 8 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/namegen/jice_town.cfg: -------------------------------------------------------------------------------- 1 | //Town names from Jice's "The Cave" 2 | name "town" { 3 | syllablesStart = "Ael, Ash, Barrow, Bel, Black, Clear, Cold, Crystal, Deep, Edge, Falcon, Fair, Fall, Glass, Gold, Ice, Iron, Mill, Moon, Mor, Ray, Red, Rock, Rose, Shadow, Silver, Spell, Spring, Stone, Strong, Summer, Swyn, Wester, Winter" 4 | syllablesEnd = "ash, burn, barrow, bridge, castle, cliff, coast, crest, dale, dell, dor, fall, field, ford, fort, gate, haven, hill, hold, hollow, iron, lake, marsh, mill, mist, mount, moor, pond, shade, shore, summer, town, wick" 5 | rules = "$s$e" 6 | } 7 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/namegen/mingos_demon.cfg: -------------------------------------------------------------------------------- 1 | //Demon names 2 | name "demon male" { 3 | phonemesVocals = "a, e, i, o, u" 4 | syllablesStart = "Aam, Ab, Ad, Ahr, Alas, Al-A'w, All, Al-M, Ap, As, Ast, Az, Bal, Bal S, Bag, Balb, Ban, Bansh, Baph, Barb, Bath, Bazt, Be'L, Beel, Beelz, Bel, Belph, Ber, Bh, Bifr, Biul, Bush, Caac, Cagn, Caim, Chalk, Char, Chem, Coal, Dag, Dant, Decer, Demog, Dev, Dj, Dragh, Elig, Emp, Errt, Etr, Ett, Eur, Euryn, Gorg, Graph, Grig, Haag, Halph, Haur, Hoeth, Ifr, Inc, Ibl, Ith, Kabh, Kas, Kokb', Kray, Lab, Lam, Lech, Leg, Lil, Lioth, Lix, Luc, Mal, Malph, Mamm, March, Mast, Math, Meph, Merm, Mol, Murm, Naam, Naph, Nek, Neph, Neq, Nix, Noud, Onom, Onos, Orc, Orob, Oul, Paim, Phen, Pont, Proc, Rah, Rak, Raksh, Ram, Rang, Raum, Raz, Rimm, Rub, Rus, Sabn, Salps, Sam, Sat, Sc, Scarm, Seer, Sem, Set, Shait, Shax, Shed, Shez, Sidr, Sitr, Sth, Succ, Surg, Tann, Tart, Tch, Teer, Thamm, Thub, Tlal, Tsab, Val, Vap, Vass, Vep, Verr, Vin, Vol, Vual, Xaph, Xiph, Xitr, Zaeb, Zim, Ziz, Zaln" 5 | syllablesMiddle = "b'ae, ba, be, chi, dra, du, ga, ghi, go, lia, ma, mba, mu, n'e, na, nti, nzu, phe, pho, r'e, rba, rgo, ssa, thi, tryu, ttu, tzi, v-e, vna, xra, ya" 6 | syllablesEnd = "b'ael, bel, bub, bur, bus, ces, chus, dai, ddon, des, dhaka, el, fer, flas, gion, gon, gor, klet, kor, ksha, kuth, laas, lech, les, lion, lith, loch, lsu, mael, math, mejes, meus, mon, moth, mmut, mosh, nai, nar, neus, nex, nias, nnin, nomos, phas, r'el, raal, rept, res, rgon, riax, rith, rius, rous, rus, ruth, sias, stor, swath, tath, than, the, thra, tryus, tura, vart, ztuk" 7 | rules = "$s$v$35m$10m$e" 8 | } 9 | 10 | name "demon female" { 11 | phonemesVocals = "a, e, i, o, u" 12 | syllablesStart = "Aam, Ab, Ad, Ahr, Alas, Al-A'w, All, Al-M, Ap, As, Ast, Az, Bal, Bal S, Bag, Balb, Ban, Bansh, Baph, Barb, Bath, Bazt, Be'L, Beel, Beelz, Bel, Belph, Ber, Bh, Bifr, Biul, Bush, Caac, Cagn, Caim, Chalk, Char, Chem, Coal, Dag, Dant, Decer, Demog, Dev, Dj, Dragh, Elig, Emp, Errt, Etr, Ett, Eur, Euryn, Gorg, Graph, Grig, Haag, Halph, Haur, Hoeth, Ifr, Inc, Ibl, Ith, Kabh, Kas, Kokb', Kray, Lab, Lam, Lech, Leg, Lil, Lioth, Lix, Luc, Mal, Malph, Mamm, March, Mast, Math, Meph, Merm, Mol, Murm, Naam, Naph, Nek, Neph, Neq, Nix, Noud, Onom, Onos, Orc, Orob, Oul, Paim, Phen, Pont, Proc, Rah, Rak, Raksh, Ram, Rang, Raum, Raz, Rimm, Rub, Rus, Sabn, Salps, Sam, Sat, Sc, Scarm, Seer, Sem, Set, Shait, Shax, Shed, Shez, Sidr, Sitr, Sth, Succ, Surg, Tann, Tart, Tch, Teer, Thamm, Thub, Tlal, Tsab, Val, Vap, Vass, Vep, Verr, Vin, Vol, Vual, Xaph, Xiph, Xitr, Zaeb, Zim, Ziz, Zaln" 13 | syllablesMiddle = "b'ae, ba, be, chi, dra, du, ga, ghi, go, lia, ma, mba, mu, n'e, na, nti, nzu, phe, pho, r'e, rba, rgo, ssa, thi, tryu, ttu, tzi, v-e, vna, xra, ya" 14 | syllablesEnd = "b'a, bel, bua, bure, buth, cess, chia, dai, ddea, dea, dhaka, el, fea, fla, gia, goa, gora, klath, kore, ksha, kua, laal, lexa, less, lia, lith, loth, lsa, mara, math, maja, mea, moa, moth, mmuth, mosh, na, nai, neuth, nex, nia, nnine, nomoa, pha, r'el, raala, repte, reshe, rgona, riaxe, rith, rish, rothe, rushe, ruth, sia, stora, swath, tath, thann, the, thra, trya, tura, varte, ztura" 15 | rules = "$s$v$35m$10m$e" 16 | } 17 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/namegen/mingos_dwarf.cfg: -------------------------------------------------------------------------------- 1 | //dwarf names 2 | name "dwarf male" { 3 | syllablesStart = "A, An, Ba, Bi, Bo, Bom, Da, Dar, De, Do, Du, Due, Duer, Dwa, Fa, Fal, Fi, Fre, Fun, Ga, Gar, Gim, Glo, Go, Gom, Gro, Gwar, Ib, Jor, Ka, Ki, Kil, Lo, Mar, Na, Nal, O, Ras, Ren, Ro, Ta, Tar, Tel, Thi, Tho, Thon, Thra, Tor, Von, We, Wer, Yen, Yur" 4 | syllablesEnd = "bil, bin, bur, char, den, dir, dur, fri, fur, in, li, lin, mil, mur, ni, nur, ran, ri, ril, rimm, rin, thur, tri, ulf, un, ur, vi, vil, vim, vin, vri" 5 | rules = "$s$e" 6 | illegal = "rur, ueu" 7 | } 8 | 9 | name "dwarf female" { 10 | syllablesStart = "A, An, Ba, Bi, Bo, Bom, Da, Dar, De, Do, Du, Due, Duer, Dwa, Fa, Fal, Fi, Fre, Fun, Ga, Gar, Gim, Glo, Go, Gom, Gro, Gwar, Ib, Jor, Ka, Ki, Kil, Lo, Mar, Na, Nal, O, Ras, Ren, Ro, Ta, Tar, Tel, Thi, Tho, Thon, Thra, Tor, Von, We, Wer, Yen, Yur" 11 | syllablesEnd = "al, ali, ba, bida, bra, da, deth, di, fra, gret, hild, iess, kala, la, laani, li, lona, ma, mae, mala, na, nuda, ra, ta, tala, tu, tuna, vada, vara, ya" 12 | rules = "$s$e" 13 | illegal = "dueal, frefra, grogret" 14 | } 15 | 16 | //surnames have semantic information. Here, they're separated into three 17 | //somewhat coherent sets and either is chosen 18 | name "dwarf surname" { 19 | //1st set - smith & Mr.Muscle surnames 20 | syllablesPre = "Boulder, Bronze, Coal, Copper, Gem, Granite, Hammer, Iron, Marble, Metal, Rock, Steel, Stone, Thunder" 21 | syllablesPost = "bender, breaker, carver, club, crusher, cutter, digger, fist, foot, forger, heart, smasher, smith" 22 | //2nd set - warrior surnames 23 | syllablesStart = "Bear, Boar, Dragon, Giant, Goblin, Elf, Ettin, Foe, Kobold, Ogre, Orc,Spider, Troll, Wolf" 24 | syllablesEnd = "bane, basher, _Battler, _Beheader, boxer, _Butcher, choker, cleaver, crusher, cutter, doom, eater, _Executioner, _Fighter, _Garrotter, grapple, _Gutter, hammer, killer, mauler, masher, ripper, slasher, slayer, slicer, smasher, _Strangler, striker, _Wrestler" 25 | //3rd set - heroic and general 26 | phonemesVocals = "Black, Blood, Bronze, Fire, Firm, Grey, Hard, Ice, Iron, Moon, Oak, Onyx, Red, Steel, Stone, Strong, Thunder, White" 27 | phonemesConsonants = "axe, beard, blade, brand, cheek, fist, foot, hair, hammer, hand, head, heart, pick, shield, spear, spike, sword" 28 | rules = "$P$p, $s$e, $v$c" 29 | } -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/namegen/mingos_standard.cfg: -------------------------------------------------------------------------------- 1 | //Names based on syllables from J.R.R. Tolkien's and David Eddings' novels. 2 | name "male" { 3 | phonemesVocals = "a, e, i, o, u, y" 4 | phonemesConsonants = "b, c, ch, ck, cz, d, dh, f, g, gh, h, j, k, kh, l, m, n, p, ph, q, r, rh, s, sh, t, th, ts, tz, v, w, x, z, zh" 5 | syllablesStart = "Aer, Al, Am, An, Ar, Arm, Arth, B, Bal, Bar, Be, Bel, Ber, Bok, Bor, Bran, Breg, Bren, Brod, Cam, Chal, Cham, Ch, Cuth, Dag, Daim, Dair, Del, Dr, Dur, Duv, Ear, Elen, Er, Erel, Erem, Fal, Ful, Gal, G, Get, Gil, Gor, Grin, Gun, H, Hal, Han, Har, Hath, Hett, Hur, Iss, Khel, K, Kor, Lel, Lor, M, Mal, Man, Mard, N, Ol, Radh, Rag, Relg, Rh, Run, Sam, Tarr, T, Tor, Tul, Tur, Ul, Ulf, Unr, Ur, Urth, Yar, Z, Zan, Zer" 6 | syllablesMiddle = "de, do, dra, du, duna, ga, go, hara, kaltho, la, latha, le, ma, nari, ra, re, rego, ro, rodda, romi, rui, sa, to, ya, zila" 7 | syllablesEnd = "bar, bers, blek, chak, chik, dan, dar, das, dig, dil, din, dir, dor, dur, fang, fast, gar, gas, gen, gorn, grim, gund, had, hek, hell, hir, hor, kan, kath, khad, kor, lach, lar, ldil, ldir, leg, len, lin, mas, mnir, ndil, ndur, neg, nik, ntir, rab, rach, rain, rak, ran, rand, rath, rek, rig, rim, rin, rion, sin, sta, stir, sus, tar, thad, thel, tir, von, vor, yon, zor" 8 | rules = "$s$v$35m$10m$e" 9 | } 10 | 11 | name "female" { 12 | phonemesVocals = "a, e, i, o, u, y" 13 | syllablesStart = "Ad, Aer, Ar, Bel, Bet, Beth, Ce'N, Cyr, Eilin, El, Em, Emel, G, Gl, Glor, Is, Isl, Iv, Lay, Lis, May, Ner, Pol, Por, Sal, Sil, Vel, Vor, X, Xan, Xer, Yv, Zub" 14 | syllablesMiddle = "bre, da, dhe, ga, lda, le, lra, mi, ra, ri, ria, re, se, ya" 15 | syllablesEnd = "ba, beth, da, kira, laith, lle, ma, mina, mira, na, nn, nne, nor, ra, rin, ssra, ta, th, tha, thra, tira, tta, vea, vena, we, wen, wyn" 16 | rules = "$s$v$35m$10m$e" 17 | } 18 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/data/namegen/mingos_town.cfg: -------------------------------------------------------------------------------- 1 | //Town names. The town name construction is based on real British town names, 2 | //although many starting syllables are made up. 3 | name "Mingos town" { 4 | syllablesPre = "East, Fort, Great, High, Lower, Middle, Mount, New, North, Old, Royal, Saint, South, Upper, West" 5 | syllablesStart = "Ales, Apple, Ash, Bald, Bay, Bed, Bell, Birdling, Black, Blue, Bow, Bran, Brass, Bright, Brown, Bruns, Bulls, Camp, Cherry, Clark, Clarks, Clay, Clear, Copper, Corn, Cross, Crystal, Dark, Deep, Deer, Drac, Eagle, Earth, Elk, Elles, Elm, Ester, Ewes, Fair, Falcon, Ferry, Fire, Fleet, Fox, Gold, Grand, Green, Grey, Guild, Hammer, Hart, Hawks, Hay, Haze, Hazel, Hemlock, Ice, Iron, Kent, Kings, Knox, Layne, Lint, Lor, Mable, Maple, Marble, Mare, Marsh, Mist, Mor, Mud, Nor, Oak, Orms, Ox, Oxen, Pear, Pine, Pitts, Port, Purple, Red, Rich, Roch, Rock, Rose, Ross, Rye, Salis, Salt, Shadow, Silver, Skeg, Smith, Snow, Sows, Spring, Spruce, Staff, Star, Steel, Still, Stock, Stone, Strong, Summer, Swan, Swine, Sword, Yellow, Val, Wart, Water, Well, Wheat, White, Wild, Winter, Wolf, Wool, Wor" 6 | syllablesEnd = "bank, borne, borough, brook, burg, burgh, bury, castle, cester, cliff, crest, croft, dale, dam, dorf, edge, field, ford, gate, grad, hall, ham, hollow, holm, hurst, keep, kirk, land, ley, lyn, mere, mill, minster, mont, moor, mouth, ness, pool, river, shire, shore, side, stead, stoke, ston, thorpe, ton, town, vale, ville, way, wich, wick, wood, worth" 7 | syllablesPost = "Annex, Barrens, Barrow, Corner, Cove, Crossing, Dell, Dales, Estates, Forest, Furnace, Grove, Haven, Heath, Hill, Junction, Landing, Meadow, Park, Plain, Point, Reserve, Retreat, Ridge, Springs, View, Village, Wells, Woods" 8 | rules = "$15P_$s$e_$15p" 9 | } 10 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/font/DroidSans-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/font/DroidSans-Bold.eot -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/font/DroidSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/font/DroidSans-Bold.ttf -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/font/DroidSans.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/font/DroidSans.eot -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/font/DroidSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/font/DroidSans.ttf -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/font/VeraMono-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/font/VeraMono-Bold.eot -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/font/VeraMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/font/VeraMono-Bold.ttf -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/font/VeraMono.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/font/VeraMono.eot -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/font/VeraMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/font/VeraMono.ttf -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html/compil/index.html: -------------------------------------------------------------------------------- 1 |
2 | < index
3 |
4 |

5 | =====================================
6 | 0. Compiling with libtcod
7 | =====================================
8 |

9 | > 1. Colors 10 |
11 | 18 |

Compiling your game using libtcod

19 | Click on the link corresponding to your platform.
20 | 0.1 MINGW32 without IDE
21 | 0.2 MINGW32 with Code::Blocks
22 | 0.3 Visual Studio 2005 (TODO)
23 | 0.4 Visual Studio 2008 (TODO)
24 | 0.5 GCC on Linux
25 | 0.6 GCC on MacOSX
26 |

Compiling libtcod itself

27 | You can only do that if you get libtcod through svn. To do this, make sure you have svn installed (or any graphical client like tortoiseSvn on Windows) and type the following command : 28 |

svn co http://doryen.eptalys.net/svn-libtcod/trunk libtcod-1.5.0

29 | Now you have the developer version of libtcod in the libtcod-1.5.0 directory. 30 | You can use some predefined makefiles located in the makefiles directory. Check the README.txt in this directory to know which makefile you have to use. 31 | You can also use the autotools system if your OS support it. On linux, make sure the autoconf and libtool packages are installed. Go in the autotools directory and type : 32 |

autoreconf
33 | ./configure
34 | make

35 | This should produce the samples exe in autotools directory. Note that you have to run the samples from the main libtcod directory for them to be able to access the png they need : 36 |

37 | cd .. 
38 | ./autotools/samples_cpp
39 | 

40 |
41 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html/compil/macosx.html: -------------------------------------------------------------------------------- 1 |
2 | < index
3 | < 0. Compiling with libtcod
4 |
5 |

6 | =====================================
7 | 0.6 GCC on MacOSX
8 | =====================================
9 |

10 |
11 | 18 | To compile the samples under OSX, use 'make -f makefile-samples-osx all'. For your own application, modify the makefile to include your c/cpp source files, and create a new executable target. For example, if your application is called 'MyRoguelike', and uses source files src1.c, src2.c and src3.c, you would add the following lines to the end of makefile-samples-osx. 19 | 20 |

21 | MY_OBJS=$(TEMP)/src1.o $(TEMP)/src2.o $(TEMP)/src3.o
22 | myroguelike : $(MY_OBJS) libtcod.a
23 | 	$(CC) $(MY_OBJS) $(CFLAGS) -o $@ -L. -ltcod $(ZLIB_LIBS) $(PNG_LIBS) $(SDL_LIBS)
24 | 

25 | 26 | Build using 'make -f makefile-samples-osx myroguelike' to get a command-line build of your application. To create a double-clickable application, create a new Info.plist file for your binary (see the osx directory for examples), and add the following to the makefile: 27 | 28 |

29 | myroguelike.app : myroguelike
30 | 	mkdir -p myroguelike.app/Contents/MacOS
31 | 	cp osx/myroguelike_Info.plist myroguelike.app/Contents/Info.plist
32 | 	cp myroguelike myroguelike.app/Contents/MacOS/
33 | 

34 | 35 | Build using 'make -f makefile-samples-osx myroguelike.app', and you should have a self-contained application bundle that will work on any OSX system. 36 |
37 |
38 | Important Note: If you need to access system information (resolution etc) via SDL before you call TCOD_sys_init(), you must explicitly call TCOD_sys_startup(), using code similar to the following: 39 | 40 |

41 | #ifdef __APPLE__
42 | TCOD_sys_startup();
43 | #endif
44 | //access system info....
45 | bool success = TCOD_sys_init(....
46 | 

47 | 48 |
49 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/bsp_inorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/bsp_inorder.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/bsp_invlevelorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/bsp_invlevelorder.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/bsp_levelorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/bsp_levelorder.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/bsp_postorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/bsp_postorder.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/bsp_preorder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/bsp_preorder.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/compile_libtcod_codelite.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | libtcod documentation | Using CodeLite 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |

libtcoddocumentation

12 |
13 | 17 |
18 |
19 |

17.3. Using CodeLite

20 |

TODO

21 | 22 |
23 | 31 | 32 | 36 | 37 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/compile_libtcod_haiku.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | libtcod documentation | On Haiku 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |

libtcoddocumentation

12 |
13 | 17 |
18 |
19 |

17.4. On Haiku

20 |

TODO

21 | 22 |
23 | 31 | 32 | 36 | 37 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/fbm_perlin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/fbm_perlin.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/fbm_simplex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/fbm_simplex.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/fbm_wavelet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/fbm_wavelet.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/fov.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | libtcod documentation | Field of view 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |

libtcoddocumentation

12 |
13 | 17 |
18 |
19 |

13. Field of view

20 | 24 |

This toolkit allows to easily calculate the potential visible set of map cells from the player position.
A cell is potentially visible if the line of sight from the player to the cell in unobstructed.

25 | 26 |
27 | 35 | 36 | 40 | 41 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/midpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/midpoint.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/mingw1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/mingw1.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/mingw2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/mingw2.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/mingw3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/mingw3.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/mingw4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/mingw4.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/perlin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/perlin.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/simplex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/simplex.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/subcell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/subcell.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/subcell_comp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/subcell_comp.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/subcell_pyro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/subcell_pyro.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/terminal.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/terminal8x8_aa_as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/terminal8x8_aa_as.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/terminal8x8_gs_as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/terminal8x8_gs_as.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/terminal8x8_gs_as2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/terminal8x8_gs_as2.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/terminal8x8_gs_ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/terminal8x8_gs_ro.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/terminal8x8_gs_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/terminal8x8_gs_tc.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/turbulence_perlin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/turbulence_perlin.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/turbulence_simplex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/turbulence_simplex.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/turbulence_wavelet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/turbulence_wavelet.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/html2/wavelet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/html2/wavelet.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/breadcrumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/breadcrumb.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/c.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/cpp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/cpp.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/cs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/cs.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/gradient.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/haschildren.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/haschildren.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/lua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/lua.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/next.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/prev.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/py.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/sidebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/sidebar.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/img/sidebar_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/doc/img/sidebar_arrow.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/js/doctcod.js: -------------------------------------------------------------------------------- 1 | function enable(lang,onoff) { 2 | var plist=document.getElementsByTagName("P"); 3 | for (var i=0; i < plist.length; i++) { 4 | var p = plist[i]; 5 | if ( p.className == lang ) { 6 | p.style.display = (onoff ? "" : "none"); 7 | } 8 | } 9 | } 10 | 11 | function link(page) { 12 | var chk_c=document.getElementById("chk_c"); 13 | var chk_cpp=document.getElementById("chk_cpp"); 14 | var chk_cs=document.getElementById("chk_cs"); 15 | var chk_py=document.getElementById("chk_py"); 16 | var chk_lua=document.getElementById("chk_lua"); 17 | var url=page+'?c='+chk_c.checked+'&cpp='+chk_cpp.checked+'&cs='+chk_cs.checked+'&py='+chk_py.checked+'&lua='+chk_lua.checked; 18 | document.location=url; 19 | } 20 | 21 | function getParam(name) { 22 | // var regexS = "[\\?&]"+name+"=([^&#]*)"; 23 | // var regex = new new RegExp( regexS ); 24 | var v = window.location.href.split(/[?&]/); 25 | for (var i=0; i < v.length; i++ ) { 26 | var n = v[i].split(/[=#]/); 27 | if ( n.length >= 1 && n[0] == name ) return decodeURI(n[1]); 28 | } 29 | return ""; 30 | } 31 | 32 | function initFilter() { 33 | var chk_c=document.getElementById("chk_c"); 34 | var chk_cpp=document.getElementById("chk_cpp"); 35 | var chk_cs=document.getElementById("chk_cs"); 36 | var chk_py=document.getElementById("chk_py"); 37 | var chk_lua=document.getElementById("chk_lua"); 38 | chk_c.checked = (getParam("c") == "true"); 39 | chk_cpp.checked = (getParam("cpp") == "true"); 40 | chk_cs.checked = (getParam("cs") == "true"); 41 | chk_py.checked = (getParam("py") == "true"); 42 | chk_lua.checked = (getParam("lua") == "true"); 43 | if (!chk_c.checked) enable("c",false); 44 | if (!chk_cpp.checked) enable("cpp",false); 45 | if (!chk_cs.checked) enable("cs",false); 46 | if (!chk_py.checked) enable("py",false); 47 | if (!chk_lua.checked) enable("lua",false); 48 | } 49 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/doc/js/shBrushBash.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/ 4 | * 5 | * @version 6 | * 2.0.278 (February 03 2009) 7 | * 8 | * @author 9 | * Alex Gorbatchev 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2009 Alex Gorbatchev. 13 | * 14 | * Licensed under a GNU Lesser General Public License. 15 | * http://creativecommons.org/licenses/LGPL/2.1/ 16 | * 17 | * SyntaxHighlighter is donationware. You are allowed to download, modify and distribute 18 | * the source code in accordance with LGPL 2.1 license, however if you want to use 19 | * SyntaxHighlighter on your site or include it in your product, you must donate. 20 | * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate 21 | */ 22 | SyntaxHighlighter.brushes.Bash = function() 23 | { 24 | var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne gt lt ge le'; 25 | var commands = 'alias apropos awk bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' + 26 | 'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' + 27 | 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' + 28 | 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' + 29 | 'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' + 30 | 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' + 31 | 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' + 32 | 'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' + 33 | 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' + 34 | 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' + 35 | 'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' + 36 | 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' + 37 | 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' + 38 | 'vi watch wc whereis which who whoami Wget xargs yes' 39 | ; 40 | 41 | this.regexList = [ 42 | { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments 43 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings 44 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords 45 | { regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands 46 | ]; 47 | } 48 | 49 | SyntaxHighlighter.brushes.Bash.prototype = new SyntaxHighlighter.Highlighter(); 50 | SyntaxHighlighter.brushes.Bash.aliases = ['bash', 'shell']; 51 | 52 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/hmtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/hmtool -------------------------------------------------------------------------------- /src/libtcod-1.5.2/hmtool_debug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/hmtool_debug -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/bresenham.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_BRESENHAM_H 29 | #define _TCOD_BRESENHAM_H 30 | 31 | typedef bool (*TCOD_line_listener_t) (int x, int y); 32 | 33 | TCODLIB_API void TCOD_line_init(int xFrom, int yFrom, int xTo, int yTo); 34 | TCODLIB_API bool TCOD_line_step(int *xCur, int *yCur); /* advance one step. returns true if we reach destination */ 35 | /* atomic callback function. Stops when the callback returns false */ 36 | TCODLIB_API bool TCOD_line(int xFrom, int yFrom, int xTo, int yTo, TCOD_line_listener_t listener); 37 | 38 | /* thread-safe versions */ 39 | typedef struct { 40 | int stepx; 41 | int stepy; 42 | int e; 43 | int deltax; 44 | int deltay; 45 | int origx; 46 | int origy; 47 | int destx; 48 | int desty; 49 | } TCOD_bresenham_data_t; 50 | 51 | TCODLIB_API void TCOD_line_init_mt(int xFrom, int yFrom, int xTo, int yTo, TCOD_bresenham_data_t *data); 52 | TCODLIB_API bool TCOD_line_step_mt(int *xCur, int *yCur, TCOD_bresenham_data_t *data); 53 | TCODLIB_API bool TCOD_line_mt(int xFrom, int yFrom, int xTo, int yTo, TCOD_line_listener_t listener, TCOD_bresenham_data_t *data); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/fov.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_FOV_H 29 | #define _TCOD_FOV_H 30 | 31 | typedef void *TCOD_map_t; 32 | 33 | #include "fov_types.h" 34 | 35 | /* allocate a new map */ 36 | TCODLIB_API TCOD_map_t TCOD_map_new(int width, int height); 37 | /* set all cells as solid rock (cannot see through nor walk) */ 38 | TCODLIB_API void TCOD_map_clear(TCOD_map_t map, bool transparent, bool walkable); 39 | /* copy a map to another, reallocating it when needed */ 40 | TCODLIB_API void TCOD_map_copy(TCOD_map_t source, TCOD_map_t dest); 41 | /* change a cell properties */ 42 | TCODLIB_API void TCOD_map_set_properties(TCOD_map_t map, int x, int y, bool is_transparent, bool is_walkable); 43 | /* destroy a map */ 44 | TCODLIB_API void TCOD_map_delete(TCOD_map_t map); 45 | 46 | /* calculate the field of view (potentially visible cells from player_x,player_y) */ 47 | TCODLIB_API void TCOD_map_compute_fov(TCOD_map_t map, int player_x, int player_y, int max_radius, bool light_walls, TCOD_fov_algorithm_t algo); 48 | /* check if a cell is in the last computed field of view */ 49 | TCODLIB_API bool TCOD_map_is_in_fov(TCOD_map_t map, int x, int y); 50 | TCODLIB_API void TCOD_map_set_in_fov(TCOD_map_t map, int x, int y, bool fov); 51 | 52 | /* retrieve properties from the map */ 53 | TCODLIB_API bool TCOD_map_is_transparent(TCOD_map_t map, int x, int y); 54 | TCODLIB_API bool TCOD_map_is_walkable(TCOD_map_t map, int x, int y); 55 | TCODLIB_API int TCOD_map_get_width(TCOD_map_t map); 56 | TCODLIB_API int TCOD_map_get_height(TCOD_map_t map); 57 | TCODLIB_API int TCOD_map_get_nb_cells(TCOD_map_t map); 58 | #endif 59 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/fov_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_FOV_TYPES_H 29 | #define _TCOD_FOV_TYPES_H 30 | 31 | /* FOV_BASIC : http://roguebasin.roguelikedevelopment.org/index.php?title=Ray_casting 32 | FOV_DIAMOND : http://www.geocities.com/temerra/los_rays.html 33 | FOV_SHADOW : http://roguebasin.roguelikedevelopment.org/index.php?title=FOV_using_recursive_shadowcasting 34 | FOV_PERMISSIVE : http://roguebasin.roguelikedevelopment.org/index.php?title=Precise_Permissive_Field_of_View 35 | FOV_RESTRICTIVE : Mingos' Restrictive Precise Angle Shadowcasting (contribution by Mingos) */ 36 | 37 | typedef enum { 38 | FOV_BASIC, 39 | FOV_DIAMOND, 40 | FOV_SHADOW, 41 | FOV_PERMISSIVE_0, 42 | FOV_PERMISSIVE_1, 43 | FOV_PERMISSIVE_2, 44 | FOV_PERMISSIVE_3, 45 | FOV_PERMISSIVE_4, 46 | FOV_PERMISSIVE_5, 47 | FOV_PERMISSIVE_6, 48 | FOV_PERMISSIVE_7, 49 | FOV_PERMISSIVE_8, 50 | FOV_RESTRICTIVE, 51 | NB_FOV_ALGORITHMS } TCOD_fov_algorithm_t; 52 | #define FOV_PERMISSIVE(x) ((TCOD_fov_algorithm_t)(FOV_PERMISSIVE_0 + (x))) 53 | 54 | #endif /* _TCOD_FOV_TYPES_H */ 55 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/button.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API Button : public Widget { 28 | public : 29 | Button(const char *label, const char *tip, widget_callback_t cbk, void *userData=NULL); 30 | Button(int x, int y, int width, int height, const char *label, const char *tip, widget_callback_t cbk, void *userData=NULL); 31 | virtual ~Button(); 32 | void render(); 33 | void setLabel(const char *newLabel); 34 | void computeSize(); 35 | inline bool isPressed() { return pressed; } 36 | protected : 37 | bool pressed; 38 | char *label; 39 | widget_callback_t cbk; 40 | 41 | void onButtonPress(); 42 | void onButtonRelease(); 43 | void onButtonClick(); 44 | void expand(int width, int height); 45 | }; 46 | 47 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/container.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API Container : public Widget { 28 | public : 29 | Container(int x, int y, int w, int h) : Widget(x,y,w,h) {} 30 | virtual ~Container(); 31 | void addWidget(Widget *wid); 32 | void removeWidget(Widget *wid); 33 | void setVisible(bool val); 34 | void render(); 35 | void clear(); 36 | void update(const TCOD_key_t k); 37 | protected : 38 | TCODList content; 39 | }; 40 | 41 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/flatlist.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API FlatList : public TextBox { 28 | public : 29 | FlatList(int x,int y,int w, const char **list, const char *label, const char *tip=NULL); 30 | virtual ~FlatList(); 31 | void render(); 32 | void update(const TCOD_key_t k); 33 | void setCallback(void (*cbk)(Widget *wid, const char * val, void *data), void *data) { this->cbk=cbk; this->data=data;} 34 | void setValue(const char * value); 35 | void setList(const char **list); 36 | protected : 37 | const char **value; 38 | const char **list; 39 | bool onLeftArrow; 40 | bool onRightArrow; 41 | void (*cbk)(Widget *wid, const char *val, void *data); 42 | void *data; 43 | 44 | void valueToText(); 45 | void textToValue(); 46 | void onButtonClick(); 47 | }; 48 | 49 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/gui.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #ifndef _GUI_HPP 28 | #define _GUI_HPP 29 | 30 | #include "libtcod.hpp" 31 | 32 | #ifdef TCOD_VISUAL_STUDIO 33 | #pragma warning(disable:4996) 34 | #pragma warning(disable:4251) 35 | #endif 36 | 37 | // DLL export 38 | #ifdef TCOD_WINDOWS 39 | #ifdef LIBTCOD_GUI_EXPORTS 40 | #define TCODLIB_GUI_API __declspec(dllexport) 41 | #else 42 | #define TCODLIB_GUI_API __declspec(dllimport) 43 | #endif 44 | #else 45 | #define TCODLIB_GUI_API 46 | #endif 47 | 48 | #include "widget.hpp" 49 | #include "button.hpp" 50 | #include "radiobutton.hpp" 51 | #include "container.hpp" 52 | #include "label.hpp" 53 | #include "statusbar.hpp" 54 | #include "textbox.hpp" 55 | #include "flatlist.hpp" 56 | #include "slider.hpp" 57 | #include "togglebutton.hpp" 58 | #include "toolbar.hpp" 59 | #include "vbox.hpp" 60 | #include "hbox.hpp" 61 | #include "image.hpp" 62 | 63 | #endif 64 | 65 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/hbox.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API HBox : public VBox { 28 | public : 29 | HBox(int x, int y, int padding); 30 | void computeSize(); 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/image.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API Image : public Widget { 28 | public : 29 | Image(int x,int y,int w, int h, const char *tip=NULL); 30 | virtual ~Image(); 31 | void setBackgroundColor(const TCODColor col); 32 | void render(); 33 | protected : 34 | void expand(int width, int height); 35 | 36 | TCODColor back; 37 | }; 38 | 39 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/label.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API Label : public Widget { 28 | public : 29 | Label(int x, int y, const char *label, const char *tip=NULL ); 30 | void render(); 31 | void computeSize(); 32 | void setValue(const char *label) { this->label=label; } 33 | protected : 34 | const char *label; 35 | 36 | void expand(int width, int height); 37 | }; 38 | 39 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/radiobutton.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API RadioButton : public Button { 28 | public : 29 | RadioButton(const char *label, const char *tip, widget_callback_t cbk, void *userData=NULL) 30 | : Button(label,tip,cbk,userData),group(defaultGroup) {} 31 | RadioButton(int x, int y, int width, int height, const char *label, const char *tip, widget_callback_t cbk, void *userData=NULL) 32 | : Button(x,y,width,height,label,tip,cbk,userData),group(defaultGroup) {} 33 | 34 | void setGroup(int group) { this->group=group; } 35 | void render(); 36 | void select(); 37 | void unSelect(); 38 | static void unSelectGroup(int group); 39 | static void setDefaultGroup(int group) { defaultGroup=group; } 40 | protected : 41 | static int defaultGroup; 42 | int group; 43 | static RadioButton *groupSelect[512]; 44 | 45 | void onButtonClick(); 46 | }; 47 | 48 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/slider.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API Slider : public TextBox { 28 | public : 29 | Slider(int x,int y,int w, float min, float max, const char *label, const char *tip=NULL); 30 | virtual ~Slider(); 31 | void render(); 32 | void update(const TCOD_key_t k); 33 | void setMinMax(float min, float max) { this->min=min;this->max=max; } 34 | void setCallback(void (*cbk)(Widget *wid, float val, void *data), void *data) { this->cbk=cbk; this->data=data;} 35 | void setFormat(const char *fmt); 36 | void setValue(float value); 37 | void setSensitivity(float sensitivity) { this->sensitivity=sensitivity;} 38 | protected : 39 | float min,max,value,sensitivity; 40 | bool onArrows; 41 | bool drag; 42 | int dragx; 43 | int dragy; 44 | float dragValue; 45 | char *fmt; 46 | void (*cbk)(Widget *wid, float val, void *data); 47 | void *data; 48 | 49 | void valueToText(); 50 | void textToValue(); 51 | void onButtonPress(); 52 | void onButtonRelease(); 53 | }; 54 | 55 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/statusbar.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API StatusBar : public Widget { 28 | public : 29 | StatusBar(int x,int y,int w, int h):Widget(x,y,w,h) {} 30 | void render(); 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/textbox.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API TextBox : public Widget { 28 | public : 29 | TextBox(int x,int y,int w, int maxw, const char *label, const char *value, const char *tip=NULL); 30 | virtual ~TextBox(); 31 | void render(); 32 | void update(const TCOD_key_t k); 33 | void setText(const char *txt); 34 | const char *getValue() { return txt; } 35 | void setCallback(void (*cbk)(Widget *wid, char * val, void * data), void *data) { txtcbk=cbk; this->data=data; } 36 | static void setBlinkingDelay(float delay) { blinkingDelay=delay; } 37 | protected : 38 | static float blinkingDelay; 39 | char *label; 40 | char *txt; 41 | float blink; 42 | int pos, offset; 43 | int boxx,boxw,maxw; 44 | bool insert; 45 | void (*txtcbk)(Widget *wid, char * val, void *data); 46 | void *data; 47 | 48 | void onButtonClick(); 49 | }; 50 | 51 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/togglebutton.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API ToggleButton : public Button { 28 | public : 29 | ToggleButton(const char *label, const char *tip, widget_callback_t cbk, void *userData=NULL) 30 | :Button(label, tip, cbk, userData) {} 31 | ToggleButton(int x, int y, int width, int height, const char *label, const char *tip, widget_callback_t cbk, void *userData=NULL) 32 | :Button(x, y, width, height, label, tip, cbk, userData) {} 33 | void render(); 34 | bool isPressed() { return pressed; } 35 | void setPressed(bool val) { pressed=val; } 36 | protected : 37 | void onButtonPress(); 38 | void onButtonRelease(); 39 | void onButtonClick(); 40 | }; 41 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/toolbar.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API ToolBar : public Container { 28 | public : 29 | ToolBar(int x, int y, const char *name, const char *tip=NULL); 30 | ToolBar(int x, int y, int w, const char *name, const char *tip=NULL); 31 | ~ToolBar(); 32 | void render(); 33 | void setName(const char *name); 34 | void addSeparator(const char *txt, const char *tip=NULL); 35 | void computeSize(); 36 | protected : 37 | char *name; 38 | int fixedWidth; 39 | }; 40 | 41 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/gui/vbox.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | class TCODLIB_GUI_API VBox : public Container { 28 | public : 29 | VBox(int x, int y, int padding) : Container(x,y,0,0),padding(padding) {} 30 | void computeSize(); 31 | protected : 32 | int padding; 33 | }; 34 | 35 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/libtcod.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _LIBTCOD_HPP 29 | #define _LIBTCOD_HPP 30 | 31 | #include "libtcod.h" 32 | #include "list.hpp" 33 | #include "color.hpp" 34 | #include "console.hpp" 35 | #include "image.hpp" 36 | #include "sys.hpp" 37 | #include "mersenne.hpp" 38 | #include "mouse.hpp" 39 | #include "bresenham.hpp" 40 | #include "noise.hpp" 41 | #include "fov.hpp" 42 | #include "path.hpp" 43 | #include "lex.hpp" 44 | #include "parser.hpp" 45 | #include "tree.hpp" 46 | #include "bsp.hpp" 47 | #include "heightmap.hpp" 48 | #include "zip.hpp" 49 | #include "namegen.hpp" 50 | #include "txtfield.hpp" 51 | #endif 52 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/mersenne.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_RANDOM_H 29 | #define _TCOD_RANDOM_H 30 | 31 | #include "mersenne_types.h" 32 | 33 | typedef void *TCOD_random_t; 34 | 35 | TCODLIB_API TCOD_random_t TCOD_random_get_instance(void); 36 | TCODLIB_API TCOD_random_t TCOD_random_new(TCOD_random_algo_t algo); 37 | TCODLIB_API TCOD_random_t TCOD_random_save(TCOD_random_t mersenne); 38 | TCODLIB_API void TCOD_random_restore(TCOD_random_t mersenne, TCOD_random_t backup); 39 | TCODLIB_API TCOD_random_t TCOD_random_new_from_seed(TCOD_random_algo_t algo, uint32 seed); 40 | TCODLIB_API void TCOD_random_delete(TCOD_random_t mersenne); 41 | 42 | TCODLIB_API void TCOD_random_set_distribution (TCOD_random_t mersenne, TCOD_distribution_t distribution); 43 | 44 | TCODLIB_API int TCOD_random_get_int (TCOD_random_t mersenne, int min, int max); 45 | TCODLIB_API float TCOD_random_get_float (TCOD_random_t mersenne, float min, float max); 46 | TCODLIB_API double TCOD_random_get_double (TCOD_random_t mersenne, double min, double max); 47 | 48 | TCODLIB_API int TCOD_random_get_int_mean (TCOD_random_t mersenne, int min, int max, int mean); 49 | TCODLIB_API float TCOD_random_get_float_mean (TCOD_random_t mersenne, float min, float max, float mean); 50 | TCODLIB_API double TCOD_random_get_double_mean (TCOD_random_t mersenne, double min, double max, double mean); 51 | 52 | TCODLIB_API TCOD_dice_t TCOD_random_dice_new (const char * s); 53 | TCODLIB_API int TCOD_random_dice_roll (TCOD_random_t mersenne, TCOD_dice_t dice); 54 | TCODLIB_API int TCOD_random_dice_roll_s (TCOD_random_t mersenne, const char * s); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/mersenne_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_RANDOM_TYPES_H 29 | #define _TCOD_RANDOM_TYPES_H 30 | 31 | /* dice roll */ 32 | typedef struct { 33 | int nb_rolls; 34 | int nb_faces; 35 | float multiplier; 36 | float addsub; 37 | } TCOD_dice_t; 38 | 39 | /* PRNG algorithms */ 40 | typedef enum { 41 | TCOD_RNG_MT, 42 | TCOD_RNG_CMWC 43 | } TCOD_random_algo_t; 44 | 45 | typedef enum { 46 | TCOD_DISTRIBUTION_LINEAR, 47 | TCOD_DISTRIBUTION_GAUSSIAN, 48 | TCOD_DISTRIBUTION_GAUSSIAN_RANGE, 49 | TCOD_DISTRIBUTION_GAUSSIAN_INVERSE, 50 | TCOD_DISTRIBUTION_GAUSSIAN_RANGE_INVERSE 51 | } TCOD_distribution_t; 52 | 53 | #endif /* _TCOD_RANDOM_TYPES_H */ 54 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/mouse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_MOUSE_H 29 | #define _TCOD_MOUSE_H 30 | 31 | #include "mouse_types.h" 32 | 33 | TCODLIB_API void TCOD_mouse_show_cursor(bool visible); 34 | TCODLIB_API TCOD_mouse_t TCOD_mouse_get_status(); 35 | TCODLIB_API bool TCOD_mouse_is_cursor_visible(); 36 | TCODLIB_API void TCOD_mouse_move(int x, int y); 37 | TCODLIB_API void TCOD_mouse_includes_touch(bool enable); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/mouse_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_MOUSE_TYPES_H 29 | #define _TCOD_MOUSE_TYPES_H 30 | 31 | /* mouse data */ 32 | typedef struct { 33 | int x,y; /* absolute position */ 34 | int dx,dy; /* movement since last update in pixels */ 35 | int cx,cy; /* cell coordinates in the root console */ 36 | int dcx,dcy; /* movement since last update in console cells */ 37 | bool lbutton ; /* left button status */ 38 | bool rbutton ; /* right button status */ 39 | bool mbutton ; /* middle button status */ 40 | bool lbutton_pressed ; /* left button pressed event */ 41 | bool rbutton_pressed ; /* right button pressed event */ 42 | bool mbutton_pressed ; /* middle button pressed event */ 43 | bool wheel_up ; /* wheel up event */ 44 | bool wheel_down ; /* wheel down event */ 45 | } TCOD_mouse_t; 46 | 47 | #endif /* _TCOD_MOUSE_TYPES_H */ 48 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/namegen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | /* 28 | * Mingos' NameGen 29 | * This file was written by Dominik "Mingos" Marczuk. 30 | */ 31 | 32 | #ifndef _TCOD_NAMEGEN_H 33 | #define _TCOD_NAMEGEN_H 34 | 35 | /* the generator typedef */ 36 | typedef void * TCOD_namegen_t; 37 | 38 | /* parse a file with syllable sets */ 39 | TCODLIB_API void TCOD_namegen_parse (const char * filename, TCOD_random_t random); 40 | /* generate a name */ 41 | TCODLIB_API char * TCOD_namegen_generate (char * name, bool allocate); 42 | /* generate a name using a custom generation rule */ 43 | TCODLIB_API char * TCOD_namegen_generate_custom (char * name, char * rule, bool allocate); 44 | /* retrieve the list of all available syllable set names */ 45 | TCODLIB_API TCOD_list_t TCOD_namegen_get_sets (void); 46 | /* delete a generator */ 47 | TCODLIB_API void TCOD_namegen_destroy (void); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/noise.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_PERLIN_H 29 | #define _TCOD_PERLIN_H 30 | 31 | typedef void *TCOD_noise_t; 32 | 33 | typedef enum { 34 | TCOD_NOISE_PERLIN = 1, 35 | TCOD_NOISE_SIMPLEX = 2, 36 | TCOD_NOISE_WAVELET = 4, 37 | TCOD_NOISE_DEFAULT = 0 38 | } TCOD_noise_type_t; 39 | 40 | #include "noise_defaults.h" 41 | 42 | /* create a new noise object */ 43 | TCODLIB_API TCOD_noise_t TCOD_noise_new(int dimensions, float hurst, float lacunarity, TCOD_random_t random); 44 | 45 | /* simplified API */ 46 | TCODLIB_API void TCOD_noise_set_type (TCOD_noise_t noise, TCOD_noise_type_t type); 47 | TCODLIB_API float TCOD_noise_get_ex (TCOD_noise_t noise, float *f, TCOD_noise_type_t type); 48 | TCODLIB_API float TCOD_noise_get_fbm_ex (TCOD_noise_t noise, float *f, float octaves, TCOD_noise_type_t type); 49 | TCODLIB_API float TCOD_noise_get_turbulence_ex (TCOD_noise_t noise, float *f, float octaves, TCOD_noise_type_t type); 50 | TCODLIB_API float TCOD_noise_get (TCOD_noise_t noise, float *f); 51 | TCODLIB_API float TCOD_noise_get_fbm (TCOD_noise_t noise, float *f, float octaves); 52 | TCODLIB_API float TCOD_noise_get_turbulence (TCOD_noise_t noise, float *f, float octaves); 53 | /* delete the noise object */ 54 | TCODLIB_API void TCOD_noise_delete(TCOD_noise_t noise); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/noise_defaults.h: -------------------------------------------------------------------------------- 1 | #ifndef _TCOD_NOISE_DEFAULTS 2 | #define _TCOD_NOISE_DEFAULTS 3 | 4 | #define TCOD_NOISE_MAX_OCTAVES 128 5 | #define TCOD_NOISE_MAX_DIMENSIONS 4 6 | #define TCOD_NOISE_DEFAULT_HURST 0.5f 7 | #define TCOD_NOISE_DEFAULT_LACUNARITY 2.0f 8 | 9 | #endif /* _TCOD_NOISE_DEFAULTS */ 10 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/tree.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_TREE_H 29 | #define _TCOD_TREE_H 30 | 31 | typedef struct _TCOD_tree_t { 32 | struct _TCOD_tree_t *next; 33 | struct _TCOD_tree_t *father; 34 | struct _TCOD_tree_t *sons; 35 | } TCOD_tree_t; 36 | 37 | TCODLIB_API TCOD_tree_t *TCOD_tree_new(); 38 | TCODLIB_API void TCOD_tree_add_son(TCOD_tree_t *node, TCOD_tree_t *son); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/tree.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_TREE_HPP 29 | #define _TCOD_TREE_HPP 30 | 31 | class TCODLIB_API TCODTree { 32 | public : 33 | TCODTree *next; 34 | TCODTree *father; 35 | TCODTree *sons; 36 | 37 | TCODTree() : next(NULL),father(NULL),sons(NULL){} 38 | void addSon(TCODTree *data) { 39 | data->father=this; 40 | TCODTree *lastson = sons; 41 | while ( lastson && lastson->next ) lastson=lastson->next; 42 | if ( lastson ) { 43 | lastson->next=data; 44 | } else { 45 | sons=data; 46 | } 47 | } 48 | 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/txtfield.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | 29 | #ifndef _TCOD_TEXT_H_ 30 | #define _TCOD_TEXT_H_ 31 | 32 | typedef void * TCOD_text_t; 33 | 34 | TCODLIB_API TCOD_text_t TCOD_text_init(int x, int y, int w, int h, int max_chars); 35 | TCODLIB_API TCOD_text_t TCOD_text_init2(int w, int h, int max_chars); 36 | TCODLIB_API void TCOD_text_set_pos(TCOD_text_t txt, int x, int y); 37 | TCODLIB_API void TCOD_text_set_properties(TCOD_text_t txt, int cursor_char, int blink_interval, const char * prompt, int tab_size); 38 | TCODLIB_API void TCOD_text_set_colors(TCOD_text_t txt, TCOD_color_t fore, TCOD_color_t back, float back_transparency); 39 | TCODLIB_API bool TCOD_text_update(TCOD_text_t txt, TCOD_key_t key); 40 | TCODLIB_API void TCOD_text_render(TCOD_text_t txt, TCOD_console_t con); 41 | TCODLIB_API const char * TCOD_text_get(TCOD_text_t txt); 42 | TCODLIB_API void TCOD_text_reset(TCOD_text_t txt); 43 | TCODLIB_API void TCOD_text_delete(TCOD_text_t txt); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/include/txtfield.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef _TCOD_TEXT_HPP_ 29 | #define _TCOD_TEXT_HPP_ 30 | 31 | #include "color.hpp" 32 | 33 | class TCODLIB_API TCODText { 34 | public : 35 | TCODText(int x, int y, int w, int h, int max_chars); 36 | TCODText(int w, int h, int max_chars); 37 | ~TCODText(); 38 | void setProperties(int cursor_char, int blink_interval, const char * prompt, int tab_size); 39 | void setColors(TCODColor fore, TCODColor back, float back_transparency); 40 | void setPos(int x, int y); 41 | bool update(TCOD_key_t key); 42 | void render(TCODConsole * con); 43 | const char *getText(); 44 | void reset(); 45 | protected : 46 | TCOD_text_t data; 47 | }; 48 | 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/libtcod.cfg: -------------------------------------------------------------------------------- 1 | /* 2 | Use this file to customize the behaviour of libtcod, 3 | overriding what's defined in the sample/game code. 4 | The main goal of this file is to allow the player 5 | to tweak the game in case it doesn't work properly 6 | on his system and there are no options screen/config 7 | files available in the game. 8 | */ 9 | libtcod { 10 | // uncomment to force the use of a specific renderer 11 | // renderer = "GLSL" 12 | // renderer = "OPENGL" 13 | //renderer = "SDL" 14 | 15 | // uncomment to force a specific fullscreen resolution 16 | /* 17 | fullscreen=true 18 | fullscreenWidth=1280 19 | fullscreenHeight=1024 20 | */ 21 | 22 | // uncomment to use a custom font. 23 | /* 24 | font="data/fonts/terminal8x8_gs_as.png" 25 | fontInRow=false 26 | fontGreyscale=true 27 | fontTcodLayout=false 28 | fontNbCharHoriz=16 29 | fontNbCharVertic=16 30 | */ 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/apfviewer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "libtcod.hpp" 3 | 4 | static float version=1.0f; 5 | 6 | int main(int argc, char *argv[]) { 7 | TCODConsole * rootcon = NULL; 8 | TCOD_key_t keyPress; 9 | TCOD_renderer_t renderer = TCOD_RENDERER_SDL; 10 | 11 | int row=50; 12 | int col=80; 13 | if ( argc < 2) { 14 | printf ("apfviewer ...\nversion %g\n",version); 15 | return 1; 16 | } 17 | TCODConsole::initRoot(col,row,"apfviewer",false,renderer ); 18 | TCODConsole con(1,1); 19 | for (int i=1; i < argc; i++) { 20 | if (strstr(argv[i],".asc")) con.loadAsc(argv[1]); 21 | else con.loadApf(argv[i]); 22 | delete TCODConsole::root; 23 | TCODConsole::root=NULL; 24 | TCODConsole::initRoot(con.getWidth(),con.getHeight(),argv[i],false,renderer ); 25 | TCODConsole::blit(&con,0,0,0,0,TCODConsole::root,0,0); 26 | TCODConsole::root->flush(); 27 | TCODSystem::waitForEvent(TCOD_EVENT_KEY_RELEASE|TCOD_EVENT_MOUSE_PRESS,NULL,NULL,true); 28 | } 29 | 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/doctcod/page.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | libtcod documentation | ${TITLE} 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |

libtcoddocumentation

12 |
13 | 17 |
${FILTER_FORM}
18 |
19 |

${PAGE_TITLE}

20 | ${PAGE_CONTENT} 21 |
22 | 30 | 31 | 35 | 36 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/hmtool/README.txt: -------------------------------------------------------------------------------- 1 | libtcod height map tool 2 | 3 | Actually this is currently more a curiosity than a real useful tool. 4 | It allows you to tweak a heightmap by hand and generate the corresponding C,C++ or python code. 5 | 6 | The heightmap tool source code is public domain. Do whatever you want with it. 7 | 8 | NB : this tool has not been upgraded to the latest libtcod API so the generated code won't compile. -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/navier/main.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 Jice 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * The name of Jice may not be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY JICE ``AS IS'' AND ANY 16 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL JICE BE LIABLE FOR ANY 19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | #include "libtcod.hpp" 27 | 28 | 29 | #define VERSION "0.1.1" 30 | 31 | // console size 32 | #define CON_W 80 33 | #define CON_H 50 34 | 35 | #define IN_RECTANGLE(x,y,w,h) ((unsigned)(x) < (unsigned)(w) && (unsigned)(y) < (unsigned)(h)) 36 | #define SQRDIST(x1,y1,x2,y2) (((x1)-(x2))*((x1)-(x2))+((y1)-(y2))*((y1)-(y2))) 37 | 38 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/rad/README.txt: -------------------------------------------------------------------------------- 1 | 2 | Radiosity 0.1.0 3 | 4 | “Radiosity” engine 5 | 6 | Simple light diffusion using some sort of radiosity algorithm 7 | Not fast, not clean code… To be improved 8 | 9 | http://doryen.eptalys.net/demos/ 10 | 11 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/rad/bsp_helper.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Umbra 3 | * Copyright (c) 2009, 2010 Mingos, Jice 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The names of Mingos or Jice may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY MINGOS & JICE ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL MINGOS OR JICE BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | class BspHelper : public ITCODBspCallback { 29 | public : 30 | BspHelper(); 31 | int bspDepth; 32 | int minRoomSize; 33 | bool randomRoom; 34 | bool roomWalls; 35 | void createBspDungeon(TCODMap *map, TCODRandom *rng); 36 | // libtcod bsp callback stuff 37 | bool visitNode(TCODBsp *node, void *userData); 38 | private : 39 | void vline(TCODMap *map,int x, int y1, int y2); 40 | void vline_up(TCODMap *map,int x, int y); 41 | void vline_down(TCODMap *map,int x, int y); 42 | void hline(TCODMap *map,int x1, int y, int x2); 43 | void hline_left(TCODMap *map,int x, int y); 44 | void hline_right(TCODMap *map,int x, int y); 45 | }; 46 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/rad/rad_shader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Photon reactor 3 | * Copyright (c) 2011 Jice 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The names of Jice may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include "libtcod.hpp" 29 | #include "rad_shader.hpp" 30 | 31 | void Shader::init(TCODMap *map) { 32 | this->map=map; 33 | int size=map->getWidth()*map->getHeight(); 34 | lightmap=new TCODColor[size]; 35 | } 36 | 37 | int Shader::addLight(int x, int y, int radius, const TCODColor &col) { 38 | int id=lights.size(); 39 | Light l; 40 | l.x=x; 41 | l.y=y; 42 | l.radius=radius; 43 | l.col=col; 44 | lights.push(l); 45 | return id; 46 | } 47 | 48 | void Shader::updateLight(int id, int x, int y, int radius, const TCODColor &col) { 49 | Light *l=lights.begin()+id; 50 | l->x=x; 51 | l->y=y; 52 | l->radius=radius; 53 | l->col=col; 54 | } 55 | 56 | 57 | const TCODColor &Shader::getLightColor(int x, int y) { 58 | return lightmap[ x + y * map->getWidth()]; 59 | } 60 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/rad/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/samples/rad/terminal.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/ripples/main.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 Jice 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * The name of Jice may not be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY JICE ``AS IS'' AND ANY 16 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL JICE BE LIABLE FOR ANY 19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | #include "libtcod.hpp" 27 | #include "util_ripples.hpp" 28 | 29 | #define VERSION "0.1.0" 30 | 31 | // console size 32 | #define CON_W 80 33 | #define CON_H 50 34 | 35 | #define IN_RECTANGLE(x,y,w,h) ((unsigned)(x) < (unsigned)(w) && (unsigned)(y) < (unsigned)(h)) 36 | #define SQRDIST(x1,y1,x2,y2) (((x1)-(x2))*((x1)-(x2))+((y1)-(y2))*((y1)-(y2))) 37 | 38 | #ifndef NDEBUG 39 | #define DBG(x) printf x 40 | #else 41 | #define DBG(x) 42 | #endif 43 | 44 | extern TCODNoise noise3d; 45 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/ripples/util_ripples.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 Jice 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * The name of Jice may not be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY Jice ``AS IS'' AND ANY 16 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL Jice BE LIABLE FOR ANY 19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | struct WaterZone { 28 | float cumulatedElapsed; // to control the ripples framerate 29 | float *data; // water height data after update 30 | float *oldData; // water height data before update 31 | bool isActive; // not to use CPU is there are no ripples 32 | }; 33 | 34 | class RippleManager { 35 | public : 36 | RippleManager(TCODMap *waterMap); 37 | void startRipple(int dungeonx, int dungeony); 38 | bool updateRipples(float elapsed); 39 | void renderRipples(const TCODImage *ground, TCODImage *groundWithRipples); 40 | protected : 41 | int width,height; 42 | WaterZone zone; 43 | void init(TCODMap *waterMap); 44 | float getData(int x, int y) const { return zone.data[x+y*width]; } 45 | }; 46 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/weather/main.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 Jice 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * The name of Jice may not be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY JICE ``AS IS'' AND ANY 16 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL JICE BE LIABLE FOR ANY 19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | #include "libtcod.hpp" 27 | #include "util_weather.hpp" 28 | 29 | #define VERSION "0.1.0" 30 | 31 | // console size 32 | #define CON_W 80 33 | #define CON_H 50 34 | 35 | #define IN_RECTANGLE(x,y,w,h) ((unsigned)(x) < (unsigned)(w) && (unsigned)(y) < (unsigned)(h)) 36 | #define SQRDIST(x1,y1,x2,y2) (((x1)-(x2))*((x1)-(x2))+((y1)-(y2))*((y1)-(y2))) 37 | 38 | #ifndef NDEBUG 39 | #define DBG(x) printf x 40 | #else 41 | #define DBG(x) 42 | #endif 43 | 44 | extern TCODNoise noise1d; 45 | extern TCODNoise noise2d; 46 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/weather/util_weather.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 Jice 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * The name of Jice may not be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY JICE ``AS IS'' AND ANY 16 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL JICE BE LIABLE FOR ANY 19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | class Weather { 28 | public : 29 | void init(int width, int height); 30 | void update(float elapsed); 31 | float getCloud(int x, int y); // 0.0 : dark cloud, 1.0 : no cloud 32 | float getLightning(int x, int y); // 0.0 : no lightning. 1.0 : full lightning light 33 | bool hasRainDrop(); // call for each cell on the map 34 | // when scrolling the map on the game side 35 | void move(int dx, int dy); 36 | // description of current weather 37 | const char *getWeather(); 38 | const TCODColor &getAmbientLightColor() { return ambientColor; } 39 | // timeInSecond : between 0 and 3600*24 40 | void calculateAmbient(float timeInSeconds); 41 | // how fast the weather is changing. 0 : never changes, 1 : default > 1 : faster... 42 | void setChangeFactor(float f) { changeFactor = f; } 43 | // 0 : bad weather. 1 : good weather 44 | float getIndicator() { return indicator; } 45 | // to alter the weather 46 | float getIndicatorDelta() { return indicatorDelta; } 47 | void setIndicatorDelta(float v) { indicatorDelta=CLAMP(-1.0f,1.0f,v); } 48 | protected : 49 | typedef struct { 50 | int posx,posy; 51 | float intensity; // 0-1 52 | float life; // in seconds 53 | int radius; // squared 54 | float noisex; 55 | } lightning_t; 56 | 57 | float indicator; // 0 : bad, 1 : good 58 | float indicatorDelta; 59 | float noisex,noisey; // position in the noise space 60 | float dx,dy; // sub cell cloud map position 61 | float changeFactor; 62 | TCODHeightMap *map; 63 | TCODList lightnings; 64 | TCODColor ambientColor; 65 | }; 66 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/worldgen/README.txt: -------------------------------------------------------------------------------- 1 | 2 | World generator 0.1.0 3 | 4 | Fast (< 1 sec for a 400×400 map) 5 | Heightmap, precipitation map, latitude-dependant temperature map, biome map 6 | Rain erosion 7 | Rapidely Exploring Random Tree rivers 8 | 9 | http://doryen.eptalys.net/demos/ 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/worldgen/main.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 Jice 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * The name of Jice may not be used to endorse or promote products 13 | * derived from this software without specific prior written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY JICE ``AS IS'' AND ANY 16 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | * DISCLAIMED. IN NO EVENT SHALL JICE BE LIABLE FOR ANY 19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | #include "libtcod.hpp" 27 | #include "util_worldgen.hpp" 28 | 29 | #define VERSION "0.1.0" 30 | 31 | // console size 32 | #define CON_W 80 33 | #define CON_H 50 34 | 35 | #define IN_RECTANGLE(x,y,w,h) ((unsigned)(x) < (unsigned)(w) && (unsigned)(y) < (unsigned)(h)) 36 | #define SQRDIST(x1,y1,x2,y2) (((x1)-(x2))*((x1)-(x2))+((y1)-(y2))*((y1)-(y2))) 37 | 38 | #ifndef NDEBUG 39 | #define DBG(x) printf x 40 | #else 41 | #define DBG(x) 42 | #endif 43 | 44 | extern TCODNoise noise1d; 45 | extern TCODNoise noise2d; 46 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/worldgen/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/samples/worldgen/terminal.png -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/worldgen/util_worldgen.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/samples/worldgen/util_worldgen.cpp -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples/worldgen/util_worldgen.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/samples/worldgen/util_worldgen.hpp -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples_c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/samples_c -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples_c_debug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/samples_c_debug -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples_c_debug.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/samples_c_debug.exe -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples_cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/samples_cpp -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples_cpp_debug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/samples_cpp_debug -------------------------------------------------------------------------------- /src/libtcod-1.5.2/samples_cpp_debug.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/samples_cpp_debug.exe -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/README.txt: -------------------------------------------------------------------------------- 1 | This is the Doryen library source code. 2 | 3 | libtcod.h and libtcod.hpp are the main headers, included respectively by 4 | the C and C++ programs that use libtcod. 5 | 6 | Each "toolkit" is in a separate file set. For each toolkit, you may have : 7 | * include/.h : the C header 8 | * include/.hpp : the C++ header 9 | * src/_c.c : the C source code that contains the actual implementation 10 | * src/.cpp : the C++ wrapper 11 | 12 | Current toolkits : 13 | bresenham : line drawing using the Bresenham algorithm. 14 | bsp : binary space partition tree module 15 | color : 24 bits colors operations. 16 | console : true color console emulator. It relies on some private functions of the sys toolkit. 17 | fov : field of view calculator. 18 | heightmap : heightmap toolkit. 19 | image : image manipulation. It relies on some private functions of the sys toolkit. 20 | list : a fast and lightweight generic container (faster than STL). 21 | mersenne : pseudorandom number generator using the Mersenne twister algorithm. 22 | mouse : mouse support. 23 | namegen : name generator 24 | noise : various noise generators. 25 | parser : config file parser. 26 | path : path finding module. 27 | sys : system specific functions. 28 | txtfield : work-in-progress text input utility 29 | zip : compression module 30 | 31 | Note that some of the sys toolkits rely on system dependant functions. 32 | They have currently a single working implementation relying on SDL : sys_sdl_c.c 33 | As it is heavily system dependant, the mouse C implementation is in sys_sdl_c.c. 34 | As of 1.4, the image load/save functions are isolated in sys_sdl_XXX.c, 35 | XXX being the image type (currently bmp and png). 36 | As of 1.5.1, sys_opengl_c.c contains OpenGL and GLSL renderers. Those two 37 | renderers are still dependant on SDL. 38 | 39 | libtcod_int.h contains everything that is exported by the toolkits 40 | (implemented in a toolkit and used in another one) but should not be seen 41 | by the user of the library. 42 | 43 | These are the private (or undocumented) modules : 44 | lex : a generic lexical parser. 45 | tree : a minimalist tree toolkit. 46 | sys : sys also contains an undocumented threading toolkit. 47 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/bresenham.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include "libtcod.hpp" 29 | 30 | // ********** bresenham line drawing ********** 31 | void TCODLine::init(int xFrom, int yFrom, int xTo, int yTo) { 32 | TCOD_line_init(xFrom,yFrom,xTo,yTo); 33 | } 34 | 35 | bool TCODLine::step(int *xCur, int *yCur) { 36 | return TCOD_line_step(xCur,yCur) != 0; 37 | } 38 | 39 | static TCODLineListener *listener=NULL; 40 | 41 | // C to C++ bridge 42 | extern "C" uint8 internalListener(int x,int y) { 43 | return listener->putPoint(x,y) ? 1 : 0; 44 | } 45 | 46 | bool TCODLine::line(int xFrom, int yFrom, int xTo, int yTo, TCODLineListener *plistener) { 47 | listener=plistener; 48 | return TCOD_line(xFrom,yFrom,xTo,yTo,internalListener) != 0; 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/fov.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "libtcod.hpp" 28 | TCODMap::TCODMap(int width,int height) { 29 | data = TCOD_map_new(width,height); 30 | } 31 | 32 | void TCODMap::clear(bool transparent, bool walkable) { 33 | TCOD_map_clear(data,transparent,walkable); 34 | } 35 | 36 | void TCODMap::setProperties(int x, int y, bool isTransparent, bool isWalkable) { 37 | TCOD_map_set_properties(data,x,y,isTransparent,isWalkable); 38 | } 39 | 40 | void TCODMap::copy(const TCODMap *source) { 41 | TCOD_map_copy(source->data,data); 42 | } 43 | 44 | void TCODMap::computeFov(int x, int y, int maxRadius, bool light_walls, TCOD_fov_algorithm_t algo) { 45 | TCOD_map_compute_fov(data,x,y,maxRadius,light_walls, algo); 46 | } 47 | 48 | bool TCODMap::isInFov(int x, int y) const { 49 | return TCOD_map_is_in_fov(data,x,y) != 0; 50 | } 51 | 52 | void TCODMap::setInFov(int x,int y, bool fov) { 53 | TCOD_map_set_in_fov(data, x, y, fov); 54 | } 55 | 56 | bool TCODMap::isTransparent(int x, int y) const { 57 | return TCOD_map_is_transparent(data,x,y) != 0; 58 | } 59 | 60 | bool TCODMap::isWalkable(int x, int y) const { 61 | return TCOD_map_is_walkable(data,x,y) != 0; 62 | } 63 | 64 | int TCODMap::getWidth() const { 65 | return TCOD_map_get_width(data); 66 | } 67 | 68 | int TCODMap::getHeight() const { 69 | return TCOD_map_get_height(data); 70 | } 71 | 72 | int TCODMap::getNbCells() const { 73 | return TCOD_map_get_nb_cells(data); 74 | } 75 | 76 | TCODMap::~TCODMap() { 77 | TCOD_map_delete(data); 78 | } 79 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/gui/README.txt: -------------------------------------------------------------------------------- 1 | Those classes are a C++ widget toolkit built on top of libtcod. 2 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/gui/container.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "libtcod.hpp" 28 | #include "gui.hpp" 29 | 30 | Container::~Container() { 31 | content.clearAndDelete(); 32 | } 33 | 34 | void Container::addWidget(Widget *wid) { 35 | content.push(wid); 36 | widgets.remove(wid); 37 | } 38 | 39 | void Container::removeWidget(Widget *wid) { 40 | content.remove(wid); 41 | } 42 | 43 | void Container::setVisible(bool val) { 44 | Widget::setVisible(val); 45 | } 46 | 47 | void Container::clear() { 48 | content.clearAndDelete(); 49 | } 50 | 51 | void Container::render() { 52 | for ( Widget **wid=content.begin(); wid != content.end(); wid ++ ) { 53 | if ( (*wid)->isVisible() ) (*wid)->render(); 54 | } 55 | } 56 | 57 | void Container::update(const TCOD_key_t k) { 58 | Widget::update(k); 59 | for ( Widget **wid=content.begin(); wid != content.end(); wid ++ ) { 60 | if ( (*wid)->isVisible() ) (*wid)->update(k); 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/gui/hbox.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "libtcod.hpp" 28 | #include "gui.hpp" 29 | 30 | HBox::HBox(int x, int y, int padding) : VBox(x,y,padding) { 31 | } 32 | 33 | void HBox::computeSize() { 34 | int curx=x; 35 | h=0; 36 | for (Widget **wid=content.begin(); wid != content.end(); wid ++ ) { 37 | if ( (*wid)->isVisible() ) { 38 | (*wid)->y=y; 39 | (*wid)->x=curx; 40 | (*wid)->computeSize(); 41 | if ((*wid)->h > h) h=(*wid)->h; 42 | curx+=(*wid)->w+padding; 43 | } 44 | } 45 | w=curx-x; 46 | for (Widget **wid=content.begin(); wid != content.end(); wid ++ ) { 47 | if ( (*wid)->isVisible() ) { 48 | (*wid)->expand((*wid)->w,h); 49 | } 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/gui/image.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "libtcod.hpp" 28 | #include "gui.hpp" 29 | 30 | Image::Image(int x,int y,int w, int h, const char *tip) : Widget(x,y,w,h), back(TCODColor::black) { 31 | if ( tip ) setTip(tip); 32 | } 33 | 34 | Image::~Image() { 35 | } 36 | 37 | void Image::render() { 38 | con->setDefaultBackground(back); 39 | con->rect(x,y,w,h,TCOD_BKGND_SET); 40 | } 41 | 42 | void Image::setBackgroundColor(const TCODColor col) { 43 | back=col; 44 | } 45 | 46 | void Image::expand(int width, int height) { 47 | if ( width > w ) w=width; 48 | if ( height > h ) h=height; 49 | } 50 | 51 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/gui/label.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "libtcod.hpp" 28 | #include "gui.hpp" 29 | 30 | Label::Label(int x, int y, const char *label, const char *tip) : Widget(x,y,0,1) { 31 | this->label=label; 32 | if ( tip ) setTip(tip); 33 | } 34 | 35 | void Label::render() { 36 | con->setDefaultBackground(back); 37 | con->setDefaultForeground(fore); 38 | con->printEx(x,y,TCOD_BKGND_NONE,TCOD_LEFT,label); 39 | } 40 | 41 | void Label::computeSize() { 42 | if ( label ) w=strlen(label); 43 | else w=0; 44 | } 45 | 46 | void Label::expand(int width, int height) { 47 | if ( w < width ) w=width; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/gui/radiobutton.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "libtcod.hpp" 28 | #include "gui.hpp" 29 | 30 | RadioButton *RadioButton::groupSelect[512]; 31 | int RadioButton::defaultGroup=0; 32 | static bool init=false; 33 | 34 | void RadioButton::select() { 35 | if (!init) { 36 | memset(groupSelect,0,sizeof(RadioButton *)*512); 37 | init=true; 38 | } 39 | groupSelect[group]=this; 40 | } 41 | 42 | void RadioButton::unSelect() { 43 | if (!init) { 44 | memset(groupSelect,0,sizeof(RadioButton *)*512); 45 | init=true; 46 | } 47 | groupSelect[group]=NULL; 48 | } 49 | 50 | void RadioButton::unSelectGroup(int group) { 51 | groupSelect[group]=NULL; 52 | } 53 | 54 | void RadioButton::render() { 55 | Button::render(); 56 | if ( groupSelect[group] == this ) { 57 | con->setChar(x,y,'>'); 58 | } 59 | } 60 | 61 | void RadioButton::onButtonClick() { 62 | select(); 63 | Button::onButtonClick(); 64 | } 65 | 66 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/gui/statusbar.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "libtcod.hpp" 28 | #include "gui.hpp" 29 | 30 | void StatusBar::render() { 31 | con->setDefaultBackground(back); 32 | con->rect(x,y,w,h,true,TCOD_BKGND_SET); 33 | if ( focus && focus->tip ) { 34 | con->setDefaultForeground(fore); 35 | con->printRectEx(x+1,y,w,h,TCOD_BKGND_NONE,TCOD_LEFT,focus->tip); 36 | } 37 | } 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/gui/togglebutton.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include 28 | #include "libtcod.hpp" 29 | #include "gui.hpp" 30 | 31 | void ToggleButton::render() { 32 | con->setDefaultBackground(mouseIn ? backFocus : back); 33 | con->setDefaultForeground(mouseIn ? foreFocus : fore); 34 | con->rect(x,y,w,h,true,TCOD_BKGND_SET); 35 | if ( label ) { 36 | con->printEx(x,y,TCOD_BKGND_NONE,TCOD_LEFT,"%c %s",pressed ? TCOD_CHAR_CHECKBOX_SET : TCOD_CHAR_CHECKBOX_UNSET, label); 37 | } else { 38 | con->printEx(x,y,TCOD_BKGND_NONE,TCOD_LEFT,"%c",pressed ? TCOD_CHAR_CHECKBOX_SET : TCOD_CHAR_CHECKBOX_UNSET); 39 | } 40 | } 41 | 42 | void ToggleButton::onButtonPress() { 43 | } 44 | 45 | void ToggleButton::onButtonRelease() { 46 | } 47 | 48 | void ToggleButton::onButtonClick() { 49 | pressed=!pressed; 50 | if ( cbk ) cbk(this,userData); 51 | } 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/gui/vbox.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "libtcod.hpp" 28 | #include "gui.hpp" 29 | 30 | void VBox::computeSize() { 31 | int cury=y; 32 | w=0; 33 | for (Widget **wid=content.begin(); wid != content.end(); wid ++ ) { 34 | if ( (*wid)->isVisible() ) { 35 | (*wid)->x=x; 36 | (*wid)->y=cury; 37 | (*wid)->computeSize(); 38 | if ((*wid)->w > w) w=(*wid)->w; 39 | cury+=(*wid)->h+padding; 40 | } 41 | } 42 | h=cury-y; 43 | for (Widget **wid=content.begin(); wid != content.end(); wid ++ ) { 44 | if ( (*wid)->isVisible() ) { 45 | (*wid)->expand(w,(*wid)->h); 46 | } 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/mersenne.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include 28 | #include "libtcod.hpp" 29 | #include "libtcod_int.h" 30 | 31 | static TCODRandom *instance=(TCODRandom *)NULL; 32 | 33 | TCODRandom *TCODRandom::getInstance(void) { 34 | if (! instance ) { 35 | instance=new TCODRandom(TCOD_RNG_CMWC,true); 36 | } 37 | return instance; 38 | } 39 | 40 | TCODRandom::TCODRandom(TCOD_random_algo_t algo, bool allocate) { 41 | if ( allocate ) data = TCOD_random_new(algo); 42 | } 43 | 44 | TCODRandom::TCODRandom(uint32 seed, TCOD_random_algo_t algo) { 45 | data=TCOD_random_new_from_seed(algo, seed); 46 | } 47 | 48 | TCODRandom::~TCODRandom() { 49 | TCOD_random_delete(data); 50 | } 51 | 52 | TCODRandom *TCODRandom::save() const { 53 | TCODRandom *ret=new TCODRandom(((mersenne_data_t *)data)->algo,false); 54 | ret->data=TCOD_random_save(data); 55 | return ret; 56 | } 57 | 58 | void TCODRandom::restore(const TCODRandom *backup) { 59 | TCOD_random_restore(data,backup->data); 60 | } 61 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/mouse.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include "libtcod.hpp" 28 | 29 | void TCODMouse::showCursor(bool visible) { 30 | TCOD_mouse_show_cursor(visible); 31 | } 32 | 33 | bool TCODMouse::isCursorVisible() { 34 | return TCOD_mouse_is_cursor_visible() != 0; 35 | } 36 | 37 | void TCODMouse::move(int x, int y) { 38 | TCOD_mouse_move(x,y); 39 | } 40 | 41 | TCOD_mouse_t TCODMouse::getStatus() { 42 | return TCOD_mouse_get_status(); 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/namegen.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | /* 28 | * Mingos' NameGen 29 | * This file was written by Dominik "Mingos" Marczuk. 30 | */ 31 | 32 | #include "libtcod.hpp" 33 | 34 | void TCODNamegen::parse (const char * filename, TCODRandom * random) { 35 | TCOD_namegen_parse (filename, random ? random->data : NULL); 36 | } 37 | 38 | char * TCODNamegen::generate (char * name, bool allocate) { 39 | return TCOD_namegen_generate (name, allocate); 40 | } 41 | 42 | char * TCODNamegen::generateCustom (char * name, char * rule, bool allocate) { 43 | return TCOD_namegen_generate_custom (name, rule, allocate); 44 | } 45 | 46 | TCOD_list_t TCODNamegen::getSets (void) { 47 | return TCOD_namegen_get_sets (); 48 | } 49 | 50 | void TCODNamegen::destroy (void) { 51 | TCOD_namegen_destroy (); 52 | } 53 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/sys_sdl_img_bmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #if defined (__HAIKU__) || defined (__ANDROID__) 29 | #include 30 | #elif defined(TCOD_SDL2) 31 | #include 32 | #else 33 | #include 34 | #endif 35 | #include "libtcod.h" 36 | #include "libtcod_int.h" 37 | 38 | bool TCOD_sys_check_bmp(const char *filename) { 39 | static uint8 magic_number[]={0x42, 0x4d}; 40 | return TCOD_sys_check_magic_number(filename,sizeof(magic_number),magic_number); 41 | } 42 | 43 | SDL_Surface *TCOD_sys_read_bmp(const char *filename) { 44 | SDL_Surface *ret=SDL_LoadBMP(filename); 45 | if( !ret ) TCOD_fatal("SDL : %s",SDL_GetError()); 46 | /* convert low color images to 24 bits */ 47 | if ( ret->format->BytesPerPixel != 3 ) { 48 | Uint32 rmask,gmask,bmask; 49 | SDL_Surface * tmp; 50 | if ( SDL_BYTEORDER == SDL_LIL_ENDIAN ) { 51 | rmask=0xFF0000; 52 | gmask=0x00FF00; 53 | bmask=0x0000FF; 54 | } else { 55 | rmask=0x0000FF; 56 | gmask=0x00FF00; 57 | bmask=0xFF0000; 58 | } 59 | tmp=SDL_CreateRGBSurface(SDL_SWSURFACE,ret->w,ret->h,24, rmask, gmask, bmask, 0); 60 | SDL_BlitSurface(ret,NULL,tmp,NULL); 61 | SDL_FreeSurface(ret); 62 | ret=tmp; 63 | } 64 | 65 | return ret; 66 | } 67 | 68 | void TCOD_sys_write_bmp(const SDL_Surface *surf, const char *filename) { 69 | SDL_SaveBMP((SDL_Surface *)surf,filename); 70 | } 71 | 72 | 73 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/tree_c.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | #include 28 | #include "libtcod.h" 29 | 30 | TCOD_tree_t *TCOD_tree_new() { 31 | return (TCOD_tree_t *)calloc(1,sizeof(TCOD_tree_t)); 32 | } 33 | 34 | void TCOD_tree_add_son(TCOD_tree_t *node, TCOD_tree_t *son) { 35 | TCOD_tree_t *lastson = node->sons; 36 | son->father=node; 37 | while ( lastson && lastson->next ) lastson=lastson->next; 38 | if ( lastson ) { 39 | lastson->next=son; 40 | } else { 41 | node->sons=son; 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/txtfield.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libtcod 1.5.2 3 | * Copyright (c) 2008,2009,2010,2012 Jice & Mingos 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions are met: 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * The name of Jice or Mingos may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY JICE AND MINGOS ``AS IS'' AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL JICE OR MINGOS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #include "libtcod.hpp" 29 | 30 | TCODText::TCODText(int x, int y, int w, int h, int max_chars){ 31 | data=TCOD_text_init(x,y,w,h,max_chars); 32 | } 33 | 34 | TCODText::TCODText(int w, int h, int max_chars){ 35 | data=TCOD_text_init2(w,h,max_chars); 36 | } 37 | 38 | TCODText::~TCODText(){ 39 | TCOD_text_delete(data); 40 | } 41 | 42 | void TCODText::setPos(int x, int y) { 43 | TCOD_text_set_pos(data,x,y); 44 | } 45 | 46 | void TCODText::setProperties(int cursor_char, int blink_interval, const char * prompt, int tab_size){ 47 | TCOD_text_set_properties(data,cursor_char,blink_interval,prompt,tab_size); 48 | } 49 | 50 | void TCODText::setColors(TCODColor fore, TCODColor back, float back_transparency){ 51 | TCOD_color_t foreground = {fore.r,fore.g,fore.b}; 52 | TCOD_color_t background = {back.r,back.g,back.b}; 53 | TCOD_text_set_colors(data,foreground,background,back_transparency); 54 | } 55 | 56 | bool TCODText::update(TCOD_key_t key){ 57 | return TCOD_text_update(data,key) != 0; 58 | } 59 | 60 | void TCODText::render(TCODConsole * con){ 61 | TCOD_text_render(data,con->data); 62 | } 63 | 64 | const char *TCODText::getText(){ 65 | return TCOD_text_get(data); 66 | } 67 | 68 | void TCODText::reset(){ 69 | TCOD_text_reset(data); 70 | } 71 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/zlib/compress.c: -------------------------------------------------------------------------------- 1 | /* compress.c -- compress a memory buffer 2 | * Copyright (C) 1995-2005 Jean-loup Gailly. 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* @(#) $Id$ */ 7 | 8 | #define ZLIB_INTERNAL 9 | #include "zlib.h" 10 | 11 | /* =========================================================================== 12 | Compresses the source buffer into the destination buffer. The level 13 | parameter has the same meaning as in deflateInit. sourceLen is the byte 14 | length of the source buffer. Upon entry, destLen is the total size of the 15 | destination buffer, which must be at least 0.1% larger than sourceLen plus 16 | 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. 17 | 18 | compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough 19 | memory, Z_BUF_ERROR if there was not enough room in the output buffer, 20 | Z_STREAM_ERROR if the level parameter is invalid. 21 | */ 22 | int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) 23 | Bytef *dest; 24 | uLongf *destLen; 25 | const Bytef *source; 26 | uLong sourceLen; 27 | int level; 28 | { 29 | z_stream stream; 30 | int err; 31 | 32 | stream.next_in = (Bytef*)source; 33 | stream.avail_in = (uInt)sourceLen; 34 | #ifdef MAXSEG_64K 35 | /* Check for source > 64K on 16-bit machine: */ 36 | if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; 37 | #endif 38 | stream.next_out = dest; 39 | stream.avail_out = (uInt)*destLen; 40 | if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; 41 | 42 | stream.zalloc = (alloc_func)0; 43 | stream.zfree = (free_func)0; 44 | stream.opaque = (voidpf)0; 45 | 46 | err = deflateInit(&stream, level); 47 | if (err != Z_OK) return err; 48 | 49 | err = deflate(&stream, Z_FINISH); 50 | if (err != Z_STREAM_END) { 51 | deflateEnd(&stream); 52 | return err == Z_OK ? Z_BUF_ERROR : err; 53 | } 54 | *destLen = stream.total_out; 55 | 56 | err = deflateEnd(&stream); 57 | return err; 58 | } 59 | 60 | /* =========================================================================== 61 | */ 62 | int ZEXPORT compress (dest, destLen, source, sourceLen) 63 | Bytef *dest; 64 | uLongf *destLen; 65 | const Bytef *source; 66 | uLong sourceLen; 67 | { 68 | return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); 69 | } 70 | 71 | /* =========================================================================== 72 | If the default memLevel or windowBits for deflateInit() is changed, then 73 | this function needs to be updated. 74 | */ 75 | uLong ZEXPORT compressBound (sourceLen) 76 | uLong sourceLen; 77 | { 78 | return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 79 | (sourceLen >> 25) + 13; 80 | } 81 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/zlib/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/src/zlib/uncompr.c: -------------------------------------------------------------------------------- 1 | /* uncompr.c -- decompress a memory buffer 2 | * Copyright (C) 1995-2003, 2010 Jean-loup Gailly. 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* @(#) $Id$ */ 7 | 8 | #define ZLIB_INTERNAL 9 | #include "zlib.h" 10 | 11 | /* =========================================================================== 12 | Decompresses the source buffer into the destination buffer. sourceLen is 13 | the byte length of the source buffer. Upon entry, destLen is the total 14 | size of the destination buffer, which must be large enough to hold the 15 | entire uncompressed data. (The size of the uncompressed data must have 16 | been saved previously by the compressor and transmitted to the decompressor 17 | by some mechanism outside the scope of this compression library.) 18 | Upon exit, destLen is the actual size of the compressed buffer. 19 | 20 | uncompress returns Z_OK if success, Z_MEM_ERROR if there was not 21 | enough memory, Z_BUF_ERROR if there was not enough room in the output 22 | buffer, or Z_DATA_ERROR if the input data was corrupted. 23 | */ 24 | int ZEXPORT uncompress (dest, destLen, source, sourceLen) 25 | Bytef *dest; 26 | uLongf *destLen; 27 | const Bytef *source; 28 | uLong sourceLen; 29 | { 30 | z_stream stream; 31 | int err; 32 | 33 | stream.next_in = (Bytef*)source; 34 | stream.avail_in = (uInt)sourceLen; 35 | /* Check for source > 64K on 16-bit machine: */ 36 | if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; 37 | 38 | stream.next_out = dest; 39 | stream.avail_out = (uInt)*destLen; 40 | if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; 41 | 42 | stream.zalloc = (alloc_func)0; 43 | stream.zfree = (free_func)0; 44 | 45 | err = inflateInit(&stream); 46 | if (err != Z_OK) return err; 47 | 48 | err = inflate(&stream, Z_FINISH); 49 | if (err != Z_STREAM_END) { 50 | inflateEnd(&stream); 51 | if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) 52 | return Z_DATA_ERROR; 53 | return err; 54 | } 55 | *destLen = stream.total_out; 56 | 57 | err = inflateEnd(&stream); 58 | return err; 59 | } 60 | -------------------------------------------------------------------------------- /src/libtcod-1.5.2/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/freethenation/broguejs/c67d7001faa0c7aa597a4e982de28fa6b7043b7e/src/libtcod-1.5.2/terminal.png -------------------------------------------------------------------------------- /src/platform/PlatformDefines.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PlatformDefines.h 3 | * Brogue 4 | * 5 | * Created by Brian Walker on 5/22/10. 6 | * Copyright 2010. All rights reserved. 7 | * 8 | * This file is part of Brogue. 9 | * 10 | * Brogue is free software: you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation, either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * Brogue is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with Brogue. If not, see . 22 | */ 23 | 24 | // Any platform-dependent defines that must be accessible in the game code 25 | // should go in here. 26 | 27 | #define BROGUE_LIBTCOD 28 | #define PLAY_AGAIN_STRING "Press space to play again." 29 | 30 | -------------------------------------------------------------------------------- /src/platform/platform.h: -------------------------------------------------------------------------------- 1 | #include "Rogue.h" 2 | 3 | struct brogueConsole { 4 | void (*gameLoop)(); 5 | boolean (*pauseForMilliseconds)(short milliseconds); 6 | void (*nextKeyOrMouseEvent)(rogueEvent *returnEvent, boolean textInput, boolean colorsDance); 7 | void (*plotChar)(uchar, short, short, short, short, short, short, short, short); 8 | void (*remap)(const char *, const char *); 9 | boolean (*modifierHeld)(int modifier); 10 | }; 11 | 12 | void loadKeymap(); 13 | 14 | #ifdef BROGUE_TCOD 15 | extern struct brogueConsole tcodConsole; 16 | #endif 17 | 18 | #ifdef BROGUE_CURSES 19 | extern struct brogueConsole cursesConsole; 20 | #endif 21 | 22 | #ifdef __EMSCRIPTEN__ 23 | extern struct brogueConsole javascriptConsole; 24 | #endif 25 | 26 | extern struct brogueConsole currentConsole; 27 | extern boolean serverMode; 28 | extern boolean noMenu; 29 | 30 | -------------------------------------------------------------------------------- /src/platform/term.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _term_h_ 3 | #define _term_h_ 4 | 5 | #define TERM_NONE 0 6 | #define TERM_MOUSE 1 7 | 8 | typedef struct {float r, g, b;} fcolor; 9 | struct term_t { 10 | int (*start)(); 11 | void (*end)(); 12 | void (*put)(int x, int y, int ch, fcolor *fg, fcolor *bg); 13 | void (*refresh)(); 14 | int (*getkey)(); 15 | void (*wait)(); 16 | int (*hasKey)(); 17 | void (*title)(const char *); 18 | void (*resize)(int w, int h); 19 | int (*keycodeByName)(const char *); 20 | 21 | struct { 22 | int up, down, left, right, backspace, del, quit; 23 | } keys; 24 | 25 | int width, height; 26 | struct { 27 | int x, y; 28 | int isPressed, justPressed, justReleased, justMoved; 29 | int shift, control; 30 | } mouse; 31 | }; 32 | 33 | extern struct term_t Term; 34 | 35 | #endif 36 | 37 | --------------------------------------------------------------------------------