From f7d23f00ac8376346efa58d8a71d693f96daa1ae Mon Sep 17 00:00:00 2001 From: xolatile Date: Fri, 13 Jun 2025 18:09:50 +0200 Subject: [PATCH] Dumped everything including unfinished stuff... --- anon.ebuild | 42 + build.sh | 19 + install.sh | 1 + test.c | 46 +- xachine.h | 186 ++--- xanguage.h | 136 ++-- xanguage/ada.h | 8 +- xanguage/bash.h | 8 +- xanguage/c++.h | 18 +- xanguage/c.h | 22 +- xanguage/common.h | 4 +- xanguage/d.h | 16 +- xanguage/eaxhla.h | 26 +- xanguage/flat.h | 18 +- xanguage/fortran.h | 18 +- xanguage/go.h | 18 +- xanguage/haskell.h | 12 +- xanguage/holy_c.h | 18 +- xanguage/lua.h | 18 +- xanguage/pascal.h | 8 +- xanguage/python.h | 14 +- xanguage/valgrind.h | 8 +- xaptor | Bin 81672 -> 112448 bytes xaptor.c | 58 +- xaptor.h | 378 +++++---- xarbon.c | 92 +-- xarticle.h | 86 +- xatrix.h | 335 ++++---- xcript.h | 199 +++-- xctree.h | 8 +- xector.h | 148 ++-- xenu.h | 249 ++++++ xerminal.h | 212 ++--- xhallenge.c | 190 ++--- xhape.h | 54 +- xiasma.h | 200 ++--- xighlight.c | 26 +- xision.h | 394 ++++----- xogueout.c | 6 +- xommon.h | 298 +++---- xop.c | 12 +- xormat.h | 97 ++- xormat/jxl.h | 10 +- xormat/png.h | 13 +- xource.c | 21 + xpengl.h | 1255 +++++++++++++++-------------- xphere.h | 50 +- xprite.h | 40 +- xrena.h | 141 +++- xrocessor.h | 104 ++- xross.h | 173 ++-- xscii.c | 52 +- xtandard.h | 750 ++++++++++------- xui.h | 502 +++++++----- xui/button_left.png | Bin 0 -> 115 bytes xui/button_lower.png | Bin 0 -> 116 bytes xui/button_lower_left.png | Bin 0 -> 137 bytes xui/button_lower_right.png | Bin 0 -> 136 bytes xui/button_middle.png | Bin 0 -> 100 bytes xui/button_right.png | Bin 0 -> 112 bytes xui/button_upper.png | Bin 0 -> 117 bytes xui/button_upper_left.png | Bin 0 -> 133 bytes xui/button_upper_right.png | Bin 0 -> 140 bytes xui/check_box_off.png | Bin 0 -> 359 bytes xui/check_box_on.png | Bin 0 -> 375 bytes xui/cursor.png | Bin 0 -> 396 bytes xui/dwarf/fill_bar_base.png | Bin 131 -> 235 bytes xui/dwarf/fill_bar_left.png | Bin 825 -> 917 bytes xui/dwarf/fill_bar_middle.png | Bin 156 -> 258 bytes xui/dwarf/fill_bar_right.png | Bin 328 -> 431 bytes xui/dwarf/monospace.png | Bin 0 -> 6376 bytes xui/dwarf/regular.png | Bin 0 -> 9327 bytes xui/dwarf/scroll_bar_slider.png | Bin 273 -> 329 bytes xui/dwarf/separator_center.png | Bin 273 -> 413 bytes xui/dwarf/status_left.png | Bin 126 -> 241 bytes xui/dwarf/status_lower.png | Bin 127 -> 240 bytes xui/dwarf/status_lower_left.png | Bin 372 -> 452 bytes xui/dwarf/status_lower_right.png | Bin 375 -> 466 bytes xui/dwarf/status_middle.png | Bin 124 -> 775 bytes xui/dwarf/status_right.png | Bin 126 -> 243 bytes xui/dwarf/status_upper.png | Bin 127 -> 239 bytes xui/dwarf/status_upper_left.png | Bin 349 -> 439 bytes xui/dwarf/status_upper_right.png | Bin 389 -> 481 bytes xui/end_turn_button.png | Bin 0 -> 1098 bytes xui/fairy/fill_bar_base.png | Bin 155 -> 249 bytes xui/fairy/fill_bar_left.png | Bin 381 -> 458 bytes xui/fairy/fill_bar_middle.png | Bin 179 -> 274 bytes xui/fairy/fill_bar_right.png | Bin 213 -> 309 bytes xui/fairy/monospace.png | Bin 0 -> 6376 bytes xui/fairy/regular.png | Bin 0 -> 9327 bytes xui/fairy/scroll_bar_lower.png | Bin 316 -> 431 bytes xui/fairy/scroll_bar_middle.png | Bin 137 -> 238 bytes xui/fairy/scroll_bar_upper.png | Bin 313 -> 413 bytes xui/fairy/separator_center.png | Bin 338 -> 323 bytes xui/fairy/status_left.png | Bin 150 -> 254 bytes xui/fairy/status_lower.png | Bin 153 -> 262 bytes xui/fairy/status_lower_left.png | Bin 409 -> 500 bytes xui/fairy/status_lower_right.png | Bin 405 -> 502 bytes xui/fairy/status_middle.png | Bin 159 -> 1063 bytes xui/fairy/status_right.png | Bin 150 -> 254 bytes xui/fairy/status_upper.png | Bin 153 -> 260 bytes xui/fairy/status_upper_left.png | Bin 382 -> 476 bytes xui/fairy/status_upper_right.png | Bin 475 -> 568 bytes xui/fairy/title_bar_middle.png | Bin 206 -> 301 bytes xui/fairy/title_bar_right.png | Bin 288 -> 382 bytes xui/fill_bar_base.png | Bin 0 -> 232 bytes xui/fill_bar_left.png | Bin 0 -> 681 bytes xui/fill_bar_middle.png | Bin 0 -> 251 bytes xui/fill_bar_right.png | Bin 0 -> 330 bytes xui/frame_left.png | Bin 0 -> 117 bytes xui/frame_lower.png | Bin 0 -> 110 bytes xui/frame_lower_left.png | Bin 0 -> 139 bytes xui/frame_lower_right.png | Bin 0 -> 138 bytes xui/frame_right.png | Bin 0 -> 112 bytes xui/frame_upper.png | Bin 0 -> 109 bytes xui/frame_upper_left.png | Bin 0 -> 134 bytes xui/frame_upper_right.png | Bin 0 -> 133 bytes xui/fullscreen_off.png | Bin 217 -> 0 bytes xui/fullscreen_on.png | Bin 219 -> 0 bytes xui/gnoll/fill_bar_base.png | Bin 133 -> 232 bytes xui/gnoll/fill_bar_middle.png | Bin 147 -> 251 bytes xui/gnoll/fill_bar_right.png | Bin 229 -> 330 bytes xui/gnoll/monospace.png | Bin 0 -> 6376 bytes xui/gnoll/regular.png | Bin 0 -> 9327 bytes xui/gnoll/scroll_bar_slider.png | Bin 375 -> 322 bytes xui/gnoll/separator_center.png | Bin 375 -> 322 bytes xui/gnoll/status_left.png | Bin 262 -> 382 bytes xui/gnoll/status_lower.png | Bin 298 -> 426 bytes xui/gnoll/status_middle.png | Bin 162 -> 1160 bytes xui/gnoll/status_right.png | Bin 254 -> 392 bytes xui/gnoll/status_upper.png | Bin 289 -> 427 bytes xui/goblin/fill_bar_base.png | Bin 153 -> 250 bytes xui/goblin/fill_bar_middle.png | Bin 215 -> 313 bytes xui/goblin/fill_bar_right.png | Bin 334 -> 442 bytes xui/goblin/monospace.png | Bin 0 -> 6376 bytes xui/goblin/regular.png | Bin 0 -> 9327 bytes xui/goblin/scroll_bar_slider.png | Bin 415 -> 361 bytes xui/goblin/separator_center.png | Bin 415 -> 329 bytes xui/goblin/status_middle.png | Bin 125 -> 777 bytes xui/goblin/title_bar_middle.png | Bin 213 -> 308 bytes xui/goblin/title_bar_right.png | Bin 476 -> 574 bytes xui/icon_frame.png | Bin 0 -> 312 bytes xui/imp/fill_bar_base.png | Bin 133 -> 238 bytes xui/imp/fill_bar_middle.png | Bin 137 -> 251 bytes xui/imp/fill_bar_right.png | Bin 239 -> 342 bytes xui/imp/monospace.png | Bin 0 -> 6376 bytes xui/imp/regular.png | Bin 0 -> 9327 bytes xui/imp/scroll_bar_slider.png | Bin 465 -> 332 bytes xui/imp/separator_center.png | Bin 465 -> 332 bytes xui/imp/status_left.png | Bin 170 -> 301 bytes xui/imp/status_lower.png | Bin 197 -> 326 bytes xui/imp/status_lower_left.png | Bin 597 -> 681 bytes xui/imp/status_lower_right.png | Bin 552 -> 656 bytes xui/imp/status_middle.png | Bin 119 -> 678 bytes xui/imp/status_right.png | Bin 170 -> 301 bytes xui/imp/status_upper.png | Bin 197 -> 327 bytes xui/imp/status_upper_left.png | Bin 546 -> 665 bytes xui/imp/status_upper_right.png | Bin 599 -> 699 bytes xui/imp/title_bar_middle.png | Bin 151 -> 246 bytes xui/kobold/fill_bar_base.png | Bin 167 -> 276 bytes xui/kobold/fill_bar_middle.png | Bin 171 -> 277 bytes xui/kobold/fill_bar_right.png | Bin 590 -> 700 bytes xui/kobold/monospace.png | Bin 0 -> 6376 bytes xui/kobold/regular.png | Bin 0 -> 9327 bytes xui/kobold/scroll_bar_slider.png | Bin 329 -> 385 bytes xui/kobold/separator_center.png | Bin 329 -> 351 bytes xui/kobold/status_left.png | Bin 186 -> 361 bytes xui/kobold/status_lower.png | Bin 185 -> 341 bytes xui/kobold/status_lower_left.png | Bin 596 -> 694 bytes xui/kobold/status_lower_right.png | Bin 602 -> 706 bytes xui/kobold/status_middle.png | Bin 182 -> 1482 bytes xui/kobold/status_right.png | Bin 177 -> 354 bytes xui/kobold/status_upper.png | Bin 192 -> 355 bytes xui/kobold/status_upper_left.png | Bin 602 -> 701 bytes xui/kobold/status_upper_right.png | Bin 743 -> 840 bytes xui/main/fill_bar_base.png | Bin 126 -> 221 bytes xui/main/fill_bar_left.png | Bin 413 -> 496 bytes xui/main/fill_bar_middle.png | Bin 136 -> 231 bytes xui/main/fill_bar_right.png | Bin 179 -> 275 bytes xui/main/monospace.png | Bin 0 -> 6376 bytes xui/main/regular.png | Bin 0 -> 9327 bytes xui/main/scroll_bar_slider.png | Bin 353 -> 325 bytes xui/main/separator_center.png | Bin 353 -> 325 bytes xui/main/status_left.png | Bin 132 -> 238 bytes xui/main/status_lower.png | Bin 126 -> 234 bytes xui/main/status_lower_left.png | Bin 401 -> 513 bytes xui/main/status_lower_right.png | Bin 412 -> 514 bytes xui/main/status_middle.png | Bin 122 -> 773 bytes xui/main/status_right.png | Bin 132 -> 237 bytes xui/main/status_upper.png | Bin 126 -> 238 bytes xui/main/status_upper_left.png | Bin 392 -> 492 bytes xui/main/status_upper_right.png | Bin 428 -> 527 bytes xui/map_preview_panel_off.png | Bin 200 -> 0 bytes xui/map_preview_panel_on.png | Bin 202 -> 0 bytes xui/menu_left.png | Bin 0 -> 120 bytes xui/menu_lower.png | Bin 0 -> 133 bytes xui/menu_lower_left.png | Bin 0 -> 176 bytes xui/menu_lower_right.png | Bin 0 -> 171 bytes xui/menu_middle.png | Bin 0 -> 107 bytes xui/menu_right.png | Bin 0 -> 119 bytes xui/menu_upper.png | Bin 0 -> 127 bytes xui/menu_upper_left.png | Bin 0 -> 168 bytes xui/menu_upper_right.png | Bin 0 -> 178 bytes xui/overicon_frame.png | Bin 0 -> 311 bytes xui/palette.png | Bin 210 -> 0 bytes xui/scroll_bar_lower.png | Bin 0 -> 274 bytes xui/scroll_bar_middle.png | Bin 0 -> 160 bytes xui/scroll_bar_slider.png | Bin 0 -> 322 bytes xui/scroll_bar_upper.png | Bin 0 -> 271 bytes xui/separator_center.png | Bin 0 -> 322 bytes xui/separator_left.png | Bin 0 -> 164 bytes xui/separator_middle.png | Bin 0 -> 184 bytes xui/separator_right.png | Bin 0 -> 244 bytes xui/status_left.png | Bin 0 -> 382 bytes xui/status_lower.png | Bin 0 -> 426 bytes xui/status_lower_left.png | Bin 0 -> 546 bytes xui/status_lower_right.png | Bin 0 -> 555 bytes xui/status_middle.png | Bin 0 -> 1160 bytes xui/status_preview_panel_off.png | Bin 209 -> 0 bytes xui/status_preview_panel_on.png | Bin 211 -> 0 bytes xui/status_right.png | Bin 0 -> 392 bytes xui/status_upper.png | Bin 0 -> 427 bytes xui/status_upper_left.png | Bin 0 -> 539 bytes xui/status_upper_right.png | Bin 0 -> 583 bytes xui/text_box_panel_off.png | Bin 178 -> 0 bytes xui/text_box_panel_on.png | Bin 180 -> 0 bytes xui/tiny_fill_bar_base.png | Bin 0 -> 140 bytes xui/tiny_fill_bar_left.png | Bin 0 -> 400 bytes xui/tiny_fill_bar_middle.png | Bin 0 -> 157 bytes xui/tiny_fill_bar_right.png | Bin 0 -> 400 bytes xui/title_bar_left.png | Bin 0 -> 691 bytes xui/title_bar_middle.png | Bin 0 -> 269 bytes xui/title_bar_right.png | Bin 0 -> 482 bytes xui/ubericon_frame.png | Bin 0 -> 221 bytes xui/window_left.png | Bin 0 -> 405 bytes xui/window_lower.png | Bin 0 -> 306 bytes xui/window_lower_left.png | Bin 0 -> 1099 bytes xui/window_lower_right.png | Bin 0 -> 1145 bytes xui/window_right.png | Bin 0 -> 289 bytes xui/window_upper.png | Bin 0 -> 306 bytes xui/window_upper_left.png | Bin 0 -> 1144 bytes xui/window_upper_right.png | Bin 0 -> 1101 bytes xulkan.h | 670 +++++++-------- xungeon.h | 126 +-- xuxuxu.c | 46 +- xyntax.h | 45 +- 246 files changed, 4305 insertions(+), 3399 deletions(-) create mode 100644 anon.ebuild create mode 100644 build.sh mode change 100755 => 100644 xanguage.h create mode 100644 xenu.h create mode 100644 xource.c create mode 100755 xui/button_left.png create mode 100755 xui/button_lower.png create mode 100755 xui/button_lower_left.png create mode 100755 xui/button_lower_right.png create mode 100755 xui/button_middle.png create mode 100755 xui/button_right.png create mode 100755 xui/button_upper.png create mode 100755 xui/button_upper_left.png create mode 100755 xui/button_upper_right.png create mode 100755 xui/check_box_off.png create mode 100755 xui/check_box_on.png create mode 100755 xui/cursor.png create mode 100755 xui/dwarf/monospace.png create mode 100755 xui/dwarf/regular.png create mode 100755 xui/end_turn_button.png create mode 100755 xui/fairy/monospace.png create mode 100755 xui/fairy/regular.png create mode 100755 xui/fill_bar_base.png create mode 100755 xui/fill_bar_left.png create mode 100755 xui/fill_bar_middle.png create mode 100755 xui/fill_bar_right.png create mode 100755 xui/frame_left.png create mode 100755 xui/frame_lower.png create mode 100755 xui/frame_lower_left.png create mode 100755 xui/frame_lower_right.png create mode 100755 xui/frame_right.png create mode 100755 xui/frame_upper.png create mode 100755 xui/frame_upper_left.png create mode 100755 xui/frame_upper_right.png delete mode 100755 xui/fullscreen_off.png delete mode 100755 xui/fullscreen_on.png create mode 100755 xui/gnoll/monospace.png create mode 100755 xui/gnoll/regular.png create mode 100755 xui/goblin/monospace.png create mode 100755 xui/goblin/regular.png create mode 100755 xui/icon_frame.png create mode 100755 xui/imp/monospace.png create mode 100755 xui/imp/regular.png create mode 100755 xui/kobold/monospace.png create mode 100755 xui/kobold/regular.png create mode 100755 xui/main/monospace.png create mode 100755 xui/main/regular.png delete mode 100755 xui/map_preview_panel_off.png delete mode 100755 xui/map_preview_panel_on.png create mode 100755 xui/menu_left.png create mode 100755 xui/menu_lower.png create mode 100755 xui/menu_lower_left.png create mode 100755 xui/menu_lower_right.png create mode 100755 xui/menu_middle.png create mode 100755 xui/menu_right.png create mode 100755 xui/menu_upper.png create mode 100755 xui/menu_upper_left.png create mode 100755 xui/menu_upper_right.png create mode 100755 xui/overicon_frame.png delete mode 100755 xui/palette.png create mode 100755 xui/scroll_bar_lower.png create mode 100755 xui/scroll_bar_middle.png create mode 100755 xui/scroll_bar_slider.png create mode 100755 xui/scroll_bar_upper.png create mode 100755 xui/separator_center.png create mode 100755 xui/separator_left.png create mode 100755 xui/separator_middle.png create mode 100755 xui/separator_right.png create mode 100755 xui/status_left.png create mode 100755 xui/status_lower.png create mode 100755 xui/status_lower_left.png create mode 100755 xui/status_lower_right.png create mode 100755 xui/status_middle.png delete mode 100755 xui/status_preview_panel_off.png delete mode 100755 xui/status_preview_panel_on.png create mode 100755 xui/status_right.png create mode 100755 xui/status_upper.png create mode 100755 xui/status_upper_left.png create mode 100755 xui/status_upper_right.png delete mode 100755 xui/text_box_panel_off.png delete mode 100755 xui/text_box_panel_on.png create mode 100755 xui/tiny_fill_bar_base.png create mode 100755 xui/tiny_fill_bar_left.png create mode 100755 xui/tiny_fill_bar_middle.png create mode 100755 xui/tiny_fill_bar_right.png create mode 100755 xui/title_bar_left.png create mode 100755 xui/title_bar_middle.png create mode 100755 xui/title_bar_right.png create mode 100755 xui/ubericon_frame.png create mode 100755 xui/window_left.png create mode 100755 xui/window_lower.png create mode 100755 xui/window_lower_left.png create mode 100755 xui/window_lower_right.png create mode 100755 xui/window_right.png create mode 100755 xui/window_upper.png create mode 100755 xui/window_upper_left.png create mode 100755 xui/window_upper_right.png diff --git a/anon.ebuild b/anon.ebuild new file mode 100644 index 0000000..6c9a97d --- /dev/null +++ b/anon.ebuild @@ -0,0 +1,42 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +EGIT_REPO_URI="https://bis64wqhh3louusbd45iyj76kmn4rzw5ysawyan5bkxwyzihj67c5lid.onion/xolatile/xolatilization" +inherit git-r3-tor + +DESCRIPTION="The most hateful set of programs and libraries ever written..." + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" + +DEPEND="" + +TARGET_LIST=( + xop + xscii + xighlight + xhallenge + xuxuxu + xarbon +) + +src_compile() { + CFLAGS="-I. -std=gnu99 -Ofast" + CFLAGS="${CFLAGS} -Wno-unused-result -Wno-discarded-qualifiers" + CLIBS="-lpng" + + ln -s $(realpath .) xolatile + + for i in ${TARGET_LIST[@]}; do + gcc ${CFLAGS} -o $i $i.c ${CLIBS} + done +} + +src_install() { + for i in ${TARGET_LIST[@]}; do + dobin $i + done +} diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..1ef9add --- /dev/null +++ b/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + + +FILES=( + xop.c + xscii.c + xighlight.c + xhallenge.c + xuxuxu.c + xarbon.c +) + +CFLAGS="-I. -std=gnu99 -Ofast" +CFLAGS="${CFLAGS} -Wno-unused-result -Wno-discarded-qualifiers" +CLIBS="-lpng" + +for i in ${FILES[@]}; do + gcc ${CFLAGS} -o $(basename -s .c $i) $i ${CLIBS} +done \ No newline at end of file diff --git a/install.sh b/install.sh index 5ec3b17..a893d94 100755 --- a/install.sh +++ b/install.sh @@ -21,6 +21,7 @@ cp -f xommon.h /usr/local/include/xolatile/xommon.h cp -f xpengl.h /usr/local/include/xolatile/xpengl.h cp -f xross.h /usr/local/include/xolatile/xross.h cp -f xui.h /usr/local/include/xolatile/xui.h +cp -f xenu.h /usr/local/include/xolatile/xenu.h cp -f xungeon.h /usr/local/include/xolatile/xungeon.h cp -rf xanguage /usr/local/include/xolatile/ diff --git a/test.c b/test.c index 8f5a100..8dee96b 100644 --- a/test.c +++ b/test.c @@ -9,20 +9,20 @@ #include "xhape.h" #include "xision.h" -static v0 print_shape (shape_node * sh) { +static procedure print_shape (shape_node * sh) { print ("shape data:\n"); print ("v = %i // %i\n", sh->vertex_count, sh->vertex_limit); print ("i = %i // %i\n", sh->index_count, sh->index_limit); } -static v0 render_shape (vision_structure * vision, shape_node * sh) { - //~u4 vc = sh->vertex_count; - //~u4 ic = sh->index_count; +static procedure render_shape (vision_structure * vision, shape_node * sh) { + //~natural vc = sh->vertex_count; + //~natural ic = sh->index_count; - //~f4 va [100] = { 0 }; - //~u4 ia [100] = { 0 }; + //~real va [100] = { 0 }; + //~natural ia [100] = { 0 }; - //~for (u4 i = 0; i < vc; i += 5) { + //~for (natural i = 0; i < vc; i += 5) { //~va [i+0] = sh->vertex_array [i/5]->x; //~va [i+1] = sh->vertex_array [i/5]->y; //~va [i+2] = sh->vertex_array [i/5]->z; @@ -30,14 +30,14 @@ static v0 render_shape (vision_structure * vision, shape_node * sh) { //~va [i+4] = sh->unwrap_array [i/5]->y; //~} - //~for (u4 i = 0; i < ic; i += 5) { + //~for (natural i = 0; i < ic; i += 5) { //~ia [i] = sh->index_array [i]; //~} vision_render_base (vision, sh->vertex_count, sh->vertex_array, sh->index_count, sh->index_array, 0, 0xff7733ff); } -s4 main (v0) { +integer main (none) { //~vector_3 as = { +2,0,0 }; //~vector_3 bs = { -2,0,0 }; //~vector_3 cs = { 0,+2,0 }; @@ -59,11 +59,11 @@ s4 main (v0) { vision_structure * vision = vision_initialize (60, 60, false, 6000, 3000, 256); particle_structure * particle = particle_initialize (1024); - u4 i0 = vision_sprite_import (vision, "xui/goblin/end_turn_button.png"); - u4 i1 = vision_sprite_import (vision, "xui/goblin/separator_center.png"); - u4 i2 = vision_sprite_import (vision, "xui/goblin/separator_left.png"); - u4 i3 = vision_sprite_import (vision, "xui/goblin/separator_middle.png"); - u4 i4 = vision_sprite_import (vision, "xui/goblin/separator_right.png"); + natural i0 = vision_sprite_import (vision, "xui/goblin/end_turn_button.png"); + natural i1 = vision_sprite_import (vision, "xui/goblin/separator_center.png"); + natural i2 = vision_sprite_import (vision, "xui/goblin/separator_left.png"); + natural i3 = vision_sprite_import (vision, "xui/goblin/separator_middle.png"); + natural i4 = vision_sprite_import (vision, "xui/goblin/separator_right.png"); vision_configure (vision, 800, 600, "Xube"); @@ -107,12 +107,12 @@ s4 main (v0) { render_shape (vision, e); render_shape (vision, f); - //~f4 t0 [] = {1,0,0,0,0,1,0,1,0}; - //~f4 t1 [] = {1,0,0,0,0,1,0,1,0}; - //~f4 t2 [] = {1,0,0,0,0,1,0,1,0}; - //~f4 t3 [] = {1,0,0,0,0,1,0,1,0}; - //~f4 t4 [] = {1,0,0,0,0,1,0,1,0}; - //~f4 t5 [] = {1,0,0,0,0,1,0,1,0}; + //~real t0 [] = {1,0,0,0,0,1,0,1,0}; + //~real t1 [] = {1,0,0,0,0,1,0,1,0}; + //~real t2 [] = {1,0,0,0,0,1,0,1,0}; + //~real t3 [] = {1,0,0,0,0,1,0,1,0}; + //~real t4 [] = {1,0,0,0,0,1,0,1,0}; + //~real t5 [] = {1,0,0,0,0,1,0,1,0}; //~vision_render_triangle (vision, t0, 0xff7733ff); //~vision_render_triangle (vision, t1, 0xff7733ff); @@ -121,7 +121,7 @@ s4 main (v0) { //~vision_render_triangle (vision, t4, 0xff7733ff); //~vision_render_triangle (vision, t5, 0xff7733ff); - //~for (u4 i = 0; i < particle->count; ++i) { + //~for (natural i = 0; i < particle->count; ++i) { //~Vector3 vector = {particle->position [i]->x, particle->position [i]->y, particle->position [i]->z}; //~DrawBillboard (camera, texture, vector, 1, RED); //~} @@ -131,14 +131,14 @@ s4 main (v0) { - //~f4 va [] = { + //~real va [] = { //~-1, -1, 0, 0, 1, 1, 1, 1, 1, //~-1, +1, 0, 0, 0, 1, 1, 1, 1, //~+1, +1, 0, 1, 0, 1, 1, 1, 1, //~+1, -1, 0, 1, 1, 1, 1, 1, 1 //~}; - //~u4 ia [] = { 2, 1, 0, 3, 2, 1 }; + //~natural ia [] = { 2, 1, 0, 3, 2, 1 }; //~vision_render_base (vision, sizeof(va)/4, va, sizeof(ia)/4, ia, 1, 0xff7733ff); diff --git a/xachine.h b/xachine.h index fcfa5f5..b1a0dab 100755 --- a/xachine.h +++ b/xachine.h @@ -45,11 +45,11 @@ typedef enum { #ifdef use_debug_printing -static c1 * operand_name [operand_count] = { +static character * operand_name [operand_count] = { "rel", "reg", "mem", "imm" }; -static c1 * operation_name [operation_count] = { +static character * operation_name [operation_count] = { "asmmem", "asmrel", "asmnum", "asmstr", "add", "or", "adc", "sbb", "and", "sub", "xor", "cmp", "inc", "dec", "not", "neg", "mul", "imul", "div", "idiv", @@ -61,19 +61,19 @@ static c1 * operation_name [operation_count] = { #endif -static u4 main_entry_pos4 = 0; -static u4 text_sector_size = 0; -static u1 * text_sector_byte = null; -static u4 data_sector_size = 0; // This is unused, and it should be used... -static u1 * data_sector_byte = null; // This is unused, and it should be used... +static natural main_entry_pointeger = 0; +static natural text_sector_size = 0; +static natural_8 * text_sector_byte = null; +static natural data_sector_size = 0; // This is unused, and it should be used... +static natural_8 * data_sector_byte = null; // This is unused, and it should be used... -static u4 empty_count = 1; -static u4 empty_holes = 1; -static u4 * empty_array = null; -static u4 * empty_imbue = null; -static u4 * empty_store = null; +static natural empty_count = 1; +static natural empty_holes = 1; +static natural * empty_array = null; +static natural * empty_imbue = null; +static natural * empty_store = null; -static u1 elf_main_header_byte [elf_main_header_size] = { // These should be done properly... +static natural_8 elf_main_header_byte [elf_main_header_size] = { // These should be done properly... 0x7f, 0x45, 0x4c, 0x46, 0x02, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x3e, 0x00, 0x01, 0x00, 0x00, 0x00, @@ -84,7 +84,7 @@ static u1 elf_main_header_byte [elf_main_header_size] = { // These should be don 0x02, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static u1 elf_text_sector_byte [elf_text_sector_size] = { +static natural_8 elf_text_sector_byte [elf_text_sector_size] = { 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -94,7 +94,7 @@ static u1 elf_text_sector_byte [elf_text_sector_size] = { 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static u1 elf_data_sector_byte [elf_data_sector_size] = { +static natural_8 elf_data_sector_byte [elf_data_sector_size] = { 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -104,36 +104,36 @@ static u1 elf_data_sector_byte [elf_data_sector_size] = { 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static b4 register_register (u4 to, u4 from) { return ((to == operand_register) && (from == operand_register)); } -static b4 register_memory (u4 to, u4 from) { return ((to == operand_register) && (from == operand_memory)); } -static b4 register_immediate (u4 to, u4 from) { return ((to == operand_register) && (from == operand_immediate)); } -static b4 memory_register (u4 to, u4 from) { return ((to == operand_memory) && (from == operand_register)); } -static b4 memory_immediate (u4 to, u4 from) { return ((to == operand_memory) && (from == operand_immediate)); } -static b4 register_relative (u4 to, u4 from) { return ((to == operand_register) && (from == operand_relative)); } +static boolean register_register (natural to, natural from) { return ((to == operand_register) && (from == operand_register)); } +static boolean register_memory (natural to, natural from) { return ((to == operand_register) && (from == operand_memory)); } +static boolean register_immediate (natural to, natural from) { return ((to == operand_register) && (from == operand_immediate)); } +static boolean memory_register (natural to, natural from) { return ((to == operand_memory) && (from == operand_register)); } +static boolean memory_immediate (natural to, natural from) { return ((to == operand_memory) && (from == operand_immediate)); } +static boolean register_relative (natural to, natural from) { return ((to == operand_register) && (from == operand_relative)); } -static u4 absolute (v0) { return (0x4010b0 - text_sector_size - 4); } -static u4 relative (v0) { return (0x1000 - text_sector_size - 4); } +static natural absolute (none) { return (0x4010b0 - text_sector_size - 4); } +static natural relative (none) { return (0x1000 - text_sector_size - 4); } -static v0 replace (u1 * destination, u1 * source, u8 size) { +static procedure replace (natural_8 * destination, natural_8 * source, caliber size) { for (--size; size >= 0; --size) { destination [size] = source [size]; } } -static v0 inset (b4 when, u1 data) { +static procedure inset (boolean when, natural_8 data) { text_sector_byte [text_sector_size] = data; - text_sector_size += (u4) when; + text_sector_size += (natural) when; } -static v0 inset_immediate (b4 when, u4 data) { +static procedure inset_immediate (boolean when, natural data) { inset (when, (data >> 0) & 0xff); inset (when, (data >> 8) & 0xff); inset (when, (data >> 16) & 0xff); inset (when, (data >> 24) & 0xff); } -static v0 inset_memory (b4 when, u4 data, u4 base) { +static procedure inset_memory (boolean when, natural data, natural base) { empty_array [empty_holes] = text_sector_size; empty_imbue [empty_holes] = data; @@ -142,7 +142,7 @@ static v0 inset_memory (b4 when, u4 data, u4 base) { inset_immediate (when, base); } -static v0 inset_relative (b4 when, u4 data, u4 base) { +static procedure inset_relative (boolean when, natural data, natural base) { empty_array [empty_holes] = 0; empty_imbue [empty_holes] = data; @@ -151,16 +151,16 @@ static v0 inset_relative (b4 when, u4 data, u4 base) { inset_immediate (when, base); } -static u4 mc0 (u4 code, u4 base) { +static natural mc0 (natural code, natural base) { return (0xc0 + 0x01 * (code % 8) + 0x08 * (base % 8)); } -static u4 m05 (u4 code) { +static natural m05 (natural code) { return (0x05 + 0x08 * code); } -static u4 store_relative (u4 * array) { - u4 relative = array [1]; +static natural store_relative (natural * array) { + natural relative = array [1]; #ifdef use_debug_printing print ("/3asmrel/- %i", relative); #endif @@ -172,8 +172,8 @@ static u4 store_relative (u4 * array) { return 1; } -static u4 store_memory (u4 * array) { - u4 memory = array [1]; +static natural store_memory (natural * array) { + natural memory = array [1]; #ifdef use_debug_printing print ("/3asmmem/- %i", memory); #endif @@ -184,38 +184,38 @@ static u4 store_memory (u4 * array) { return 1; } -static u4 store_number (u4 * array) { - u4 amount = array [1]; +static natural store_number (natural * array) { + natural amount = array [1]; #ifdef use_debug_printing print ("/3asmnum/- %i", amount); #endif - for (u4 index = 0; index < amount; ++index) { + for (natural index = 0; index < amount; ++index) { inset_immediate (true, array [2 + index]); } return amount + 1; } -static u4 store_string (u4 * array) { - u4 amount = array [1]; +static natural store_string (natural * array) { + natural amount = array [1]; #ifdef use_debug_printing print ("/3asmstr/- %i", amount); #endif - for (u4 index = 0; index < amount; ++index) { + for (natural index = 0; index < amount; ++index) { inset (true, array [2 + index]); } return amount + 1; } -static u4 build_f8 (u4 * array) { - u4 operation = array [0]; - u4 to = array [1]; - u4 destination = array [2]; - u4 from = array [3]; - u4 source = array [4]; +static natural build_real_64 (natural * array) { + natural operation = array [0]; + natural to = array [1]; + natural destination = array [2]; + natural from = array [3]; + natural source = array [4]; #ifdef use_debug_printing print ("/3%s/- /6%s/- %i /6%s/- %i", operation_name [operation], operand_name [to], destination, operand_name [from], source); #endif @@ -248,10 +248,10 @@ static u4 build_f8 (u4 * array) { return 4; } -static u4 build_single (u4 * array) { - u4 operation = array [0]; - u4 to = array [1]; - u4 destination = array [2]; +static natural build_single (natural * array) { + natural operation = array [0]; + natural to = array [1]; + natural destination = array [2]; #ifdef use_debug_printing print ("/3%s/- /6%s/- %i", operation_name [operation], operand_name [to], destination); #endif @@ -264,15 +264,15 @@ static u4 build_single (u4 * array) { return 2; } -static u4 build_shift (u4 * array) { - u4 operation = array [0]; - u4 to = array [1]; - u4 destination = array [2]; - u4 offset = array [3]; +static natural build_shift (natural * array) { + natural operation = array [0]; + natural to = array [1]; + natural destination = array [2]; + natural offset = array [3]; #ifdef use_debug_printing print ("/3%s/- /6%s/- %i /cimm/- %i", operation_name [operation], operand_name [to], destination, offset); #endif - inset (true, 0xc1); + inset (true, 0xcharacter); inset (to == operand_register, 0x05 + 0x08 * (operation - operation_rotate_left)); inset (to == operand_memory, 0xc0 + 0x08 * (operation - operation_rotate_left)); @@ -284,8 +284,8 @@ static u4 build_shift (u4 * array) { return 3; } -static u4 build_static_1 (u4 * array) { - u4 operation = array [0]; +static natural build_static_1 (natural * array) { + natural operation = array [0]; #ifdef use_debug_printing print ("/3%s/-", operation_name [operation]); #endif @@ -299,9 +299,9 @@ static u4 build_static_1 (u4 * array) { return 0; } -static u4 build_jump_if (u4 * array) { - u4 operation = array [0]; - u4 location = array [1]; +static natural build_jump_if (natural * array) { + natural operation = array [0]; + natural location = array [1]; #ifdef use_debug_printing print ("/3%s/- %i", operation_name [operation], location); #endif @@ -313,9 +313,9 @@ static u4 build_jump_if (u4 * array) { return 2; } -static u4 build_jump (u4 * array) { - u4 to = array [1]; - u4 destination = array [2]; +static natural build_jump (natural * array) { + natural to = array [1]; + natural destination = array [2]; #ifdef use_debug_printing print ("/3jmp/- /6%s/- %i", operand_name [to], destination); #endif @@ -328,11 +328,11 @@ static u4 build_jump (u4 * array) { return 2; } -static u4 build_move (u4 * array) { - u4 to = array [1]; - u4 destination = array [2]; - u4 from = array [3]; - u4 source = array [4]; +static natural build_move (natural * array) { + natural to = array [1]; + natural destination = array [2]; + natural from = array [3]; + natural source = array [4]; #ifdef use_debug_printing print ("/3mov/- /6%s/- %i /6%s/- %i", operand_name [to], destination, operand_name [from], source); #endif @@ -359,9 +359,9 @@ static u4 build_move (u4 * array) { return 4; } -static u4 build_call (u4 * array) { - u4 from = array [1]; - u4 source = array [2]; +static natural build_call (natural * array) { + natural from = array [1]; + natural source = array [2]; #ifdef use_debug_printing print ("/3call/- /6%s/- %i", operand_name [from], source); #endif @@ -374,7 +374,7 @@ static u4 build_call (u4 * array) { return 2; } -static u4 (* build_instruction [operation_count]) (u4 * array) = { +static natural (* build_instruction [operation_count]) (natural * array) = { store_memory, // operation_memory : LABEL store_relative, // operation_relative : "IMPLEMENTED" store_number, @@ -387,7 +387,7 @@ static u4 (* build_instruction [operation_count]) (u4 * array) = { build_static_1, build_static_1, build_static_1, build_call, build_jump, build_move }; -static v0 assemble (u4 count, u4 * array, u4 external_memory, u4 internal_memory) { +static procedure assemble (natural count, natural * array, natural external_memory, natural internal_memory) { text_sector_byte = arena_add (external_memory * sizeof (* text_sector_byte)); data_sector_byte = arena_add (external_memory * sizeof (* text_sector_byte)); @@ -395,10 +395,10 @@ static v0 assemble (u4 count, u4 * array, u4 external_memory, u4 internal_memory empty_imbue = arena_add (internal_memory * sizeof (* empty_imbue)); empty_store = arena_add (internal_memory * sizeof (* empty_store)); - for (u4 index = 0; index < count; ++index) { - u4 size = text_sector_size; + for (natural index = 0; index < count; ++index) { + natural size = text_sector_size; - u1 byte = 0; + natural_8 byte = 0; #ifdef use_debug_nopping inset (array [index] > operation_string, 0x90); #endif @@ -406,28 +406,28 @@ static v0 assemble (u4 count, u4 * array, u4 external_memory, u4 internal_memory #ifdef use_debug_printing print (" /0--/- "); for (byte = size; byte < text_sector_size; ++byte) { - print ("/5%s/- ", format_to_string ((u1) text_sector_byte [byte], false, 16, 2, '0')); + print ("/5%s/- ", format_to_string ((natural_8) text_sector_byte [byte], false, 16, 2, '0')); } print ("\n"); #endif } - main_entry_pos4 = empty_store [0]; + main_entry_pointeger = empty_store [0]; - for (u4 index = 1; index < empty_holes; ++index) { - u4 set = 0; - u4 get = empty_array [index]; + for (natural index = 1; index < empty_holes; ++index) { + natural set = 0; + natural get = empty_array [index]; - replace ((u1 *) & set, & text_sector_byte [get], sizeof (set)); + replace ((natural_8 *) & set, & text_sector_byte [get], sizeof (set)); set += empty_store [empty_imbue [index]]; - replace (& text_sector_byte [get], (u1 *) & set, sizeof (get)); + replace (& text_sector_byte [get], (natural_8 *) & set, sizeof (get)); } } -static v0 elf_main_header (u4 entry_point, b4 has_program, b4 for_linux, b4 for_x86_64) { - u4 enter = entry_pos4 + 0x4000b0; +static procedure elf_main_header (natural entry_point, boolean has_program, boolean for_linux, boolean for_x86_64) { + natural enter = entry_pointeger + 0x4000b0; elf_main_header_byte [16] = (has_program) ? 0x02 : 0x03; elf_main_header_byte [ 7] = (for_linux) ? 0x03 : 0x00; @@ -436,17 +436,17 @@ static v0 elf_main_header (u4 entry_point, b4 has_program, b4 for_linux, b4 for_ memory_copy (& elf_main_header_byte [24], & enter, sizeof (enter)); } -static v0 elf_text_sector (u4 text_size, u4 data_size) { - u4 text = elf_header_size + text_size - data_size; +static procedure elf_text_sector (natural text_size, natural data_size) { + natural text = elf_header_size + text_size - data_size; memory_copy (& elf_text_sector_byte [32], & text, sizeof (text)); memory_copy (& elf_text_sector_byte [40], & text, sizeof (text)); } -static v0 elf_data_sector (u4 text_size, u4 data_size) { - u4 data = data_size; - u4 core = elf_header_size + text_size - data_size; - u4 move = 0x401000 + core; +static procedure elf_data_sector (natural text_size, natural data_size) { + natural data = data_size; + natural core = elf_header_size + text_size - data_size; + natural move = 0x401000 + core; memory_copy (& elf_data_sector_byte [ 8], & core, sizeof (core)); memory_copy (& elf_data_sector_byte [16], & move, sizeof (move)); diff --git a/xanguage.h b/xanguage.h old mode 100755 new mode 100644 index bf29cfe..723e6c1 --- a/xanguage.h +++ b/xanguage.h @@ -15,47 +15,66 @@ /// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License /// for more details, if you dare, it is a lot of text that nobody wants to read... +/// Description +/// +/// Xanguage, core programming and scripting language definitions created using Xyntax, with few more output definitions that I care about, for +/// example Valgrind. There's not much to document about this library, it's used in my projects Xarbon and Xighlight. You can add support for +/// your language of choice by adding one enumeration value, creating header file similar to existing ones, including it here and editing +/// functions below to match 'language_count'. If you don't like how I highlight one or more of these languages, feel free to add more fields in +/// 'language_structure' or edit existing ones inside 'xanguage' folder. This header file may look unfamiliar, especially to my other projects, +/// but that's the cost of highlighting multiple languages in very low amount of code. + +/// Enumeration of supported languages, in no particular order. + typedef enum { language_common, language_ada, language_c, language_cpp, language_d, language_eaxhla, language_flat, language_fortran, language_pascal, language_python, language_go, language_lua, - language_bash, language_haskell, language_valgrind, + language_bash, language_haskell, language_valgrind, language_holy_c, language_count } language_enumeration; +/// Structure of single language definition, highlighting-wise, this will be initialized below, check out how it is used. +/// +/// language_structure * language = null; + typedef struct { - u4 comment_colour; - u4 processor_colour; - u4 character_colour; - u4 string_colour; - u4 keyword_colour; - u4 type_colour; - u4 bracket_colour; - u4 operator_colour; - u4 number_colour; - u4 lowercase_colour; - u4 uppercase_colour; - u4 underscore_colour; - u4 register_colour; - u4 extension_colour; - u4 fatal_colour; - u4 comment_effect; - u4 processor_effect; - u4 character_effect; - u4 string_effect; - u4 keyword_effect; - u4 type_effect; - u4 bracket_effect; - u4 operator_effect; - u4 number_effect; - u4 lowercase_effect; - u4 uppercase_effect; - u4 underscore_effect; - u4 register_effect; - u4 extension_effect; - u4 fatal_effect; + natural comment_colour; /// Colours for basic language syntax information. + natural processor_colour; + natural character_colour; + natural string_colour; + natural keyword_colour; + natural type_colour; + natural bracket_colour; + natural operator_colour; + natural number_colour; + natural lowercase_colour; + natural uppercase_colour; + natural underscore_colour; + natural register_colour; + natural extension_colour; + natural fatal_colour; + natural comment_effect; /// Effects for basic language syntax information. + natural processor_effect; + natural character_effect; + natural string_effect; + natural keyword_effect; + natural type_effect; + natural bracket_effect; + natural operator_effect; + natural number_effect; + natural lowercase_effect; + natural uppercase_effect; + natural underscore_effect; + natural register_effect; + natural extension_effect; + natural fatal_effect; } language_structure; +/// Warning: Local macros! You don't need to use this at all, it's covered by other functions, don't worry about it. +/// +/// You shouldn't care about these local macros, they made few lines of code shorter, we're including files in this order, in this place. + #define language_lowercase "abcdefghijklmnopqrstuvwxyz" #define language_uppercase "ABCDEFGHIJKLMNOPQRSTUVWXYZ" #define language_letters "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" @@ -72,33 +91,52 @@ typedef struct { #include #include #include +#include #include #include #include #include -static v0 (* language_highlighter [language_count]) (language_structure * language, syntax_structure * syntax) = { +#undef language_lowercase +#undef language_uppercase +#undef language_letters +#undef language_digits + +/// Array of function pointers enumerated above, these functions are defined in separate header files in 'xanguage' folder. + +static procedure (* language_highlighter [language_count]) (language_structure * language, syntax_structure * syntax) = { language_highlight_common, language_highlight_ada, language_highlight_c, language_highlight_cpp, language_highlight_d, language_highlight_eaxhla, language_highlight_flat, language_highlight_fortran, language_highlight_pascal, language_highlight_python, language_highlight_go, language_highlight_lua, - language_highlight_bash, language_highlight_haskell, language_highlight_valgrind + language_highlight_bash, language_highlight_haskell, language_highlight_valgrind, language_highlight_holy_c }; -static c1 * language_short_option [language_count] = { - "-X", "-A", "-C", "-S", "-D", "-E", "-T", "-F", "-P", "-Y", "-G", "-L", "-B", "-H", "-V" +/// Array of short command line argument enumerated above, makes main function less bloated. + +static character * language_short_option [language_count] = { + "-X", "-A", "-C", "-S", "-D", "-E", "-T", "-F", "-P", "-Y", "-G", "-L", "-B", "-H", "-V", "-O" }; -static c1 * language_long_option [language_count] = { +/// Array of long command line argument enumerated above, makes main function less bloated. + +static character * language_long_option [language_count] = { "--common", "--ada", "--c", "--cpp", "--d", "--eaxhla", "--flat", "--fortran", - "--pascal", "--python", "--go", "--lua", "--bash", "--haskell", "--valgrind" + "--pascal", "--python", "--go", "--lua", "--bash", "--haskell", "--valgrind", "--holyc" }; -static c1 * language_identifier [language_count] = { +/// Array of pretty language name enumerated above, makes things pretty. + +static character * language_identifier [language_count] = { "Common", "Ada", "C", "C++", "D", "EAXHLA", "Flat", "Fortran", - "Pascal", "Python", "Go", "Lua", "Bash", "Haskell", "Valgrind" + "Pascal", "Python", "Go", "Lua", "Bash", "Haskell", "Valgrind", "Holy C" }; -static language_structure * language_initialize (b4 true_colour) { +/// After you've defined global or local language variable, you want to initialize it, edit this function if you dislike my themes. +/// +/// language = language_initialize (false); /// You're probably using this library to render an image. +/// language = language_initialize (true); /// You're probably using this library to print to terminal. + +static language_structure * language_initialize (boolean true_colour) { language_structure * language = allocate (sizeof (* language)); if (true_colour == true) { @@ -153,11 +191,22 @@ static language_structure * language_initialize (b4 true_colour) { return (language); } +/// When you're done doing your thing, just call this function nicely to avoid leaking memory. +/// +/// language = language_deinitialize (language); + static language_structure * language_deinitialize (language_structure * language) { return (deallocate (language)); } -static v0 language_conditionally_select (language_structure * language, syntax_structure * syntax, language_enumeration select) { +/// This is just a helper function that I used a lot, it made sense to define it in this file, so here it is... This function will call specific +/// function from 'xanguage' folder, based on what file type you pass to it, enumerated in Xtandard. It takes natural number as selection value +/// due to avoiding type-related errors that dumb compilers might warn about, because some C compilers treat enumeration values as signed, while +/// others treat them as unsigned, unless you manually define some value there negative, which is braindead. +/// +/// language_conditionally_select (language, syntax, selection_index); + +static procedure language_conditionally_select (language_structure * language, syntax_structure * syntax, natural select) { if (syntax->count == 0) { if ((select == file_type_c_source) || (select == file_type_c_header)) { language_highlight_c (language, syntax); @@ -180,8 +229,3 @@ static v0 language_conditionally_select (language_structure * language, syntax_s } } } - -#undef language_lowercase -#undef language_uppercase -#undef language_letters -#undef language_digits diff --git a/xanguage/ada.h b/xanguage/ada.h index 98cab07..05392cb 100755 --- a/xanguage/ada.h +++ b/xanguage/ada.h @@ -1,7 +1,7 @@ -static v0 language_highlight_ada (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/&|()\" \t\r\n"; +static procedure language_highlight_ada (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/&|()\" \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "abort", "else", "new", "return", "abs", "elsif", "not", "reverse", "abstract", "end", "null", "accept", "entry", "select", "access", "of", "separate", "aliased", "exit", "or", "some", "all", "others", "subtype", @@ -18,7 +18,7 @@ static v0 language_highlight_ada (language_structure * language, syntax_structur syntax_define (syntax, false, false, "'", "'", '\\', language->character_colour, language->character_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } diff --git a/xanguage/bash.h b/xanguage/bash.h index 706b49f..eca4c43 100755 --- a/xanguage/bash.h +++ b/xanguage/bash.h @@ -1,7 +1,7 @@ -static v0 language_highlight_bash (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/%!&~^?|@#$()[]{}'\" \t\r\n"; +static procedure language_highlight_bash (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/%!&~^?|@#$()[]{}'\" \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "exit", "set", "elif", "done", "in", "then", "function", "fi", "if", "else", "do", "while", "for" }; @@ -10,7 +10,7 @@ static v0 language_highlight_bash (language_structure * language, syntax_structu syntax_define (syntax, false, false, "'", "'", '\0', language->string_colour, language->string_effect); syntax_define (syntax, false, false, "\"", "\"", '\0', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } diff --git a/xanguage/c++.h b/xanguage/c++.h index a805c3c..7552a71 100755 --- a/xanguage/c++.h +++ b/xanguage/c++.h @@ -1,7 +1,7 @@ -static v0 language_highlight_cpp (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/%!&~^?|()[]{}'\" \t\r\n"; +static procedure language_highlight_cpp (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/%!&~^?|()[]{}'\" \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "alignas", "alignof", "and", "asm", "auto", "break", "case", "catch", "class", "compl", "concept", "const", "consteval", "constexpr", "constinit", "continue", "decltype", "default", "delete", "do", "else", @@ -14,14 +14,14 @@ static v0 language_highlight_cpp (language_structure * language, syntax_structur "volatile", "while", "xor", "final", "override", "import", "module" }; - c1 * types [] = { - "v0", "b4", "off_t", "va_list", "float", "double", "float_t", "double_t", + character * types [] = { + "v0", "boolean", "off_t", "va_list", "float", "double", "float_t", "double_t", "char", "short", "int", "long", "uchar", "ushort", "uint", "ulong", "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t", "uint64_t", "signed", "unsigned", "size_t", "ssize_t" }; - c1 * commons [] = { + character * commons [] = { "std", "FILE", "DIR", "EOF", "va_arg", "va_start", "va_end", "va_copy" }; @@ -31,15 +31,15 @@ static v0 language_highlight_cpp (language_structure * language, syntax_structur syntax_define (syntax, false, false, "'", "'", '\\', language->character_colour, language->character_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (types); ++word) { + for (natural_64 word = 0; word < array_length (types); ++word) { syntax_define (syntax, false, true, types [word], separators, '\0', language->type_colour, language->type_effect); } - for (u8 word = 0; word < array_length (commons); ++word) { + for (natural_64 word = 0; word < array_length (commons); ++word) { syntax_define (syntax, false, true, commons [word], separators, '\0', language->extension_colour, language->extension_effect); } diff --git a/xanguage/c.h b/xanguage/c.h index c805818..95d1719 100755 --- a/xanguage/c.h +++ b/xanguage/c.h @@ -1,21 +1,23 @@ -static v0 language_highlight_c (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/%!&~^?|()[]{}'\" \t\r\n"; +static procedure language_highlight_c (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/%!&~^?|()[]{}'\" \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "register", "volatile", "auto", "const", "static", "extern", "if", "else", "do", "while", "for", "continue", "switch", "case", "default", "break", "enum", "union", "struct", "typedef", "goto", "return", "sizeof", "inline", "restrict", "true", "false" }; - c1 * types [] = { - "v0", "b4", "off_t", "va_list", "float", "double", "float_t", "double_t", + character * types [] = { + "void", "bool", "off_t", "va_list", "float", "double", "float_t", "double_t", "char", "short", "int", "long", "uchar", "ushort", "uint", "ulong", "int8_t", "int16_t", "int32_t", "int64_t", "uint8_t", "uint16_t", "uint32_t", "uint64_t", - "signed", "unsigned", "size_t", "ssize_t" + "integer_8", "integer_16", "integer", "integer_64", "natural_8", "natural_16", "natural", "natural_64", + "real", "real_64", "v0", "character", "boolean", "pstring", "signed", "unsigned", + "size_t", "ssize_t" }; - c1 * commons [] = { + character * commons [] = { "null", "NULL", "FILE", "DIR", "va_arg", "va_start", "va_end", "va_copy", "alignas", "alignof", "offsetof", "typeof", "EOF", "ABS", "MIN", "MAX", "ARRAYSIZE", "SWAP", "UNUSED", "UNREACHABLE", "STRINGIFY", "CONCAT", "assert", "nullptr", @@ -28,15 +30,15 @@ static v0 language_highlight_c (language_structure * language, syntax_structure syntax_define (syntax, false, false, "'", "'", '\\', language->character_colour, language->character_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (types); ++word) { + for (natural_64 word = 0; word < array_length (types); ++word) { syntax_define (syntax, false, true, types [word], separators, '\0', language->type_colour, language->type_effect); } - for (u8 word = 0; word < array_length (commons); ++word) { + for (natural_64 word = 0; word < array_length (commons); ++word) { syntax_define (syntax, false, true, commons [word], separators, '\0', language->extension_colour, language->extension_effect); } diff --git a/xanguage/common.h b/xanguage/common.h index 146fe5b..ffa6e2f 100755 --- a/xanguage/common.h +++ b/xanguage/common.h @@ -1,5 +1,5 @@ -static v0 language_highlight_common (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+*-/%!&~^?|()[]{}'\"@#$` \t\r\n"; +static procedure language_highlight_common (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+*-/%!&~^?|()[]{}'\"@#$` \t\r\n"; syntax_define (syntax, false, false, "'", "'", '\\', language->character_colour, language->character_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); diff --git a/xanguage/d.h b/xanguage/d.h index 030e2d8..f59bc4b 100755 --- a/xanguage/d.h +++ b/xanguage/d.h @@ -1,8 +1,8 @@ -static v0 language_highlight_d (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/%!&~^?|@()[]{}'\"` \t\r\n"; +static procedure language_highlight_d (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/%!&~^?|@()[]{}'\"` \t\r\n"; - c1 * keywords [] = { - "abstract", "alias", "align", "asm", "assert", "auto", "body", "b4", + character * keywords [] = { + "abstract", "alias", "align", "asm", "assert", "auto", "body", "boolean", "break", "byte", "case", "cast", "catch", "cdouble", "cent", "cfloat", "char", "class", "const", "continue", "creal", "dchar", "debug", "default", "delegate", "delete", "deprecated", "do", "double", "else", "enum", "export", @@ -17,10 +17,10 @@ static v0 language_highlight_d (language_structure * language, syntax_structure "v0", "wchar", "while", "foreach_reverse" }; - c1 * types [] = { + character * types [] = { "byte", "ubyte", "short", "ushort", "int", "uint", "long", "ulong", "cent", "ucent", "char", "wchar", "dchar", "float", "double", "real", - "ifloat", "idouble", "ireal", "cfloat", "cdouble", "creal", "v0", "b4", + "ifloat", "idouble", "ireal", "cfloat", "cdouble", "creal", "v0", "boolean", "string" }; @@ -31,11 +31,11 @@ static v0 language_highlight_d (language_structure * language, syntax_structure syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); syntax_define (syntax, false, false, "`", "`", '\0', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (types); ++word) { + for (natural_64 word = 0; word < array_length (types); ++word) { syntax_define (syntax, false, true, types [word], separators, '\0', language->type_colour, language->type_effect); } diff --git a/xanguage/eaxhla.h b/xanguage/eaxhla.h index 2a1e713..cca50c9 100755 --- a/xanguage/eaxhla.h +++ b/xanguage/eaxhla.h @@ -1,19 +1,19 @@ -static v0 language_highlight_eaxhla (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,+-*/[]<>=; \t\r\n"; +static procedure language_highlight_eaxhla (language_structure * language, syntax_structure * syntax) { + character * separators = ".,+-*/[]<>=; \t\r\n"; - c1 * declarations [] = { + character * declarations [] = { "program", "procedure", "machine", "library", "fast", "unix", "begin", "end", "if", "then", "else", "repeat", "break", "continue", "until", "exit", "fastcall", "shell", "alias", "macro", "scope", "unscope", "use", "include" }; - c1 * types [] = { - "s8", "c16", "s32", "s64", "u8", "u16", "u32", "u64", - "f32", "f64", "f80", "v0", "c128", "u128", "s256", "u256", + character * types [] = { + "integer_64", "character6", "s32", "s64", "natural_64", "natural_86", "u32", "u64", + "f32", "f64", "real_640", "v0", "character28", "natural_828", "integer_1656", "natural_1656", "s512", "u512" }; - c1 * instructions [] = { + character * instructions [] = { "jnpe", "jpo", "jnpo", "jpe", "jnb", "jae", "jnbe", "ja", "jna", "jbe", "jnae", "jb", "jnl", "jge", "jnle", "jg", "jng", "jle", "jnge", "jl", "cmovng", "cmovle", "cmovnge", "cmovl", @@ -34,7 +34,7 @@ static v0 language_highlight_eaxhla (language_structure * language, syntax_struc "bswap", "bsf", "bsr", "loop", "loope", "loopne" }; - c1 * registers [] = { + character * registers [] = { "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", @@ -45,7 +45,7 @@ static v0 language_highlight_eaxhla (language_structure * language, syntax_struc "r8b", "r9b", "r10b", "r11b", "r12b", "r13b", "r14b", "r15b" }; - s4 word; + integer word; syntax_define (syntax, false, false, "#", "\n", '\0', language->comment_colour, language->comment_effect); syntax_define (syntax, false, false, "---", "\n", '\0', language->comment_colour, language->comment_effect); @@ -53,19 +53,19 @@ static v0 language_highlight_eaxhla (language_structure * language, syntax_struc syntax_define (syntax, false, false, "'", "'", '\\', language->character_colour, language->character_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (declarations); ++word) { + for (natural_64 word = 0; word < array_length (declarations); ++word) { syntax_define (syntax, false, true, declarations [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (types); ++word) { + for (natural_64 word = 0; word < array_length (types); ++word) { syntax_define (syntax, false, true, types [word], separators, '\0', language->type_colour, language->type_effect); } - for (u8 word = 0; word < array_length (instructions); ++word) { + for (natural_64 word = 0; word < array_length (instructions); ++word) { syntax_define (syntax, false, true, instructions [word], " \t\n", '\0', language->extension_colour, language->extension_effect); } - for (u8 word = 0; word < array_length (registers); ++word) { + for (natural_64 word = 0; word < array_length (registers); ++word) { syntax_define (syntax, false, true, registers [word], separators, '\0', language->register_colour, language->register_effect); } diff --git a/xanguage/flat.h b/xanguage/flat.h index ce1d588..044d6b6 100755 --- a/xanguage/flat.h +++ b/xanguage/flat.h @@ -1,12 +1,12 @@ -static v0 language_highlight_flat (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,+-=:;(){}[]%$<> \t\r\n"; +static procedure language_highlight_flat (language_structure * language, syntax_structure * syntax) { + character * separators = ".,+-=:;(){}[]%$<> \t\r\n"; - c1 * declarations [] = { + character * declarations [] = { "format", "executable", "readable", "writable", "segment", "sector", "entry", "macro", "db", "dw", "dd", "dq", "rb", "rw", "rd", "rq" }; - c1 * instructions [] = { + character * instructions [] = { "mov", "movabs", "movapd", "movaps", "movebe", "movsd", "movsx", "movzx", "movsxd", "movd", "movq", "movs", "movsb", "movsw", "movsd", "movsq", "cmovmp", "cmovrcxz", "cmovc", "cmovnc", "cmove", "cmovne", "cmovz", "cmovnz", @@ -26,7 +26,7 @@ static v0 language_highlight_flat (language_structure * language, syntax_structu "rep", "repe", "repz", "repne", "repnz", "loop", "loope", "loopne" }; - c1 * registers [] = { + character * registers [] = { "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi", @@ -38,21 +38,21 @@ static v0 language_highlight_flat (language_structure * language, syntax_structu "ah", "ch", "dh", "bh" }; - s4 word; + integer word; syntax_define (syntax, false, false, ";", "\n", '\0', language->comment_colour, language->comment_effect); syntax_define (syntax, false, false, "'", "'", '\\', language->string_colour, language->string_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (declarations); ++word) { + for (natural_64 word = 0; word < array_length (declarations); ++word) { syntax_define (syntax, false, true, declarations [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (instructions); ++word) { + for (natural_64 word = 0; word < array_length (instructions); ++word) { syntax_define (syntax, false, true, instructions [word], " \t", '\0', language->extension_colour, language->extension_effect); } - for (u8 word = 0; word < array_length (registers); ++word) { + for (natural_64 word = 0; word < array_length (registers); ++word) { syntax_define (syntax, false, true, registers [word], separators, '\0', language->register_colour, language->register_effect); } diff --git a/xanguage/fortran.h b/xanguage/fortran.h index b598a9f..2de4e68 100755 --- a/xanguage/fortran.h +++ b/xanguage/fortran.h @@ -1,7 +1,7 @@ -static v0 language_highlight_fortran (language_structure * language, syntax_structure * syntax) { - c1 * separators = ",:<=>+-*/&()[]\"\' \t\r\n"; +static procedure language_highlight_fortran (language_structure * language, syntax_structure * syntax) { + character * separators = ",:<=>+-*/&()[]\"\' \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "allocatable", "allocate", "associate", "backspace", "block", "call", "case", "common", "contains", "cycle", "data", "deallocate", "d0", "do", "else", "elseif", "end", "enddo", "endfile", "endif", "entry", "equivalence", "exit", "external", @@ -12,11 +12,11 @@ static v0 language_highlight_fortran (language_structure * language, syntax_stru "then", "to", "type", "use", "where", "write" }; - c1 * types [] = { - "character", "integer", "logical", "real", "complex" + character * types [] = { + "character", "integer", "boolean", "real", "complex" }; - c1 * commons [] = { + character * commons [] = { ".and.", ".or.", ".not.", ".true.", ".false.", "in", "out", "len", "dimension", "modulo", "advance" }; @@ -25,15 +25,15 @@ static v0 language_highlight_fortran (language_structure * language, syntax_stru syntax_define (syntax, false, false, "'", "'", '\\', language->character_colour, language->character_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (commons); ++word) { + for (natural_64 word = 0; word < array_length (commons); ++word) { syntax_define (syntax, false, true, commons [word], separators, '\0', language->processor_colour, language->processor_effect); } - for (u8 word = 0; word < array_length (types); ++word) { + for (natural_64 word = 0; word < array_length (types); ++word) { syntax_define (syntax, false, true, types [word], separators, '\0', language->type_colour, language->type_effect); } diff --git a/xanguage/go.h b/xanguage/go.h index 0c6d50e..967b960 100755 --- a/xanguage/go.h +++ b/xanguage/go.h @@ -1,20 +1,20 @@ -static v0 language_highlight_go (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/%!&~^?|()[]{}'\"` \t\r\n"; +static procedure language_highlight_go (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/%!&~^?|()[]{}'\"` \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "break", "default", "func", "interface", "select", "case", "defer", "go", "struct", "else", "goto", "package", "switch", "const", "var", "for", "fallthrough", "if", "range", "type", "continue", "import", "return" }; - c1 * types [] = { + character * types [] = { "map", "uint", "int", "uintptr", "uint8", "uint16", "uint32", "uint64", "int8", "int16", "int32", "int64", "float32", "float64", "complex64", "complex128", - "byte", "rune", "string", "chan", "b4" + "byte", "rune", "string", "chan", "boolean" }; - c1 * commons [] = { + character * commons [] = { "true", "false", "nil", "err" }; @@ -24,15 +24,15 @@ static v0 language_highlight_go (language_structure * language, syntax_structure syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); syntax_define (syntax, false, false, "`", "`", '\0', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (types); ++word) { + for (natural_64 word = 0; word < array_length (types); ++word) { syntax_define (syntax, false, true, types [word], separators, '\0', language->type_colour, language->type_effect); } - for (u8 word = 0; word < array_length (commons); ++word) { + for (natural_64 word = 0; word < array_length (commons); ++word) { syntax_define (syntax, false, true, commons [word], separators, '\0', language->extension_colour, language->extension_effect); } diff --git a/xanguage/haskell.h b/xanguage/haskell.h index f2d45c5..537ce49 100755 --- a/xanguage/haskell.h +++ b/xanguage/haskell.h @@ -1,13 +1,13 @@ -static v0 language_highlight_haskell (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/%!@#$&~^?|()[]{}'\" \t\r\n"; +static procedure language_highlight_haskell (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/%!@#$&~^?|()[]{}'\" \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "case", "class", "data", "deriving", "do", "else", "if", "import", "in", "infix", "infixl", "infixr", "instance", "let", "of", "module", "newtype", "then", "type", "where" }; - c1 * types [] = { + character * types [] = { "Int", "Integer", "String", "Char", "Float", "Boolean" }; @@ -16,11 +16,11 @@ static v0 language_highlight_haskell (language_structure * language, syntax_stru syntax_define (syntax, false, false, "'", "'", '\\', language->character_colour, language->character_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (types); ++word) { + for (natural_64 word = 0; word < array_length (types); ++word) { syntax_define (syntax, false, true, types [word], separators, '\0', language->type_colour, language->type_effect); } diff --git a/xanguage/holy_c.h b/xanguage/holy_c.h index 6062d56..b9cdb1d 100755 --- a/xanguage/holy_c.h +++ b/xanguage/holy_c.h @@ -1,21 +1,21 @@ -static v0 language_highlight_holy_c (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/%!&~^|()[]{}'\" \t\r\n"; +static procedure language_highlight_holy_c (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/%!&~^|()[]{}'\" \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "static", "extern", "import", "auto", "public", "sizeof", "asm", "no_warn", "do", "while", "for", "switch", "case", "default", "start", "end", "if", "else", "goto", "return", "break", "try", "catch", "throw", "enum", "union", "class" }; - c1 * types [] = { + character * types [] = { "U8", "U16", "U32", "U64", "I8", "I16", "I32", "I64", "U0", "I0", "F64", "Bool" }; - c1 * commons [] = { + character * commons [] = { "_extern", "_intern", "_import", "lastclass", "offset", "defined", "lock", "interrupt", - "reg", "noreg", "argpop", "noargpop", "haserrcode", "NULL" + "reg", "noreg", "argpop", "noargpop", "haserrcode", "NULL", "TRUE", "FALSE" }; syntax_define (syntax, false, false, "/*", "*/", '\0', language->comment_colour, language->comment_effect); @@ -24,15 +24,15 @@ static v0 language_highlight_holy_c (language_structure * language, syntax_struc syntax_define (syntax, false, false, "'", "'", '\\', language->character_colour, language->character_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (types); ++word) { + for (natural_64 word = 0; word < array_length (types); ++word) { syntax_define (syntax, false, true, types [word], separators, '\0', language->type_colour, language->type_effect); } - for (u8 word = 0; word < array_length (commons); ++word) { + for (natural_64 word = 0; word < array_length (commons); ++word) { syntax_define (syntax, false, true, commons [word], separators, '\0', language->extension_colour, language->extension_effect); } diff --git a/xanguage/lua.h b/xanguage/lua.h index 0a960ef..ca22057 100755 --- a/xanguage/lua.h +++ b/xanguage/lua.h @@ -1,17 +1,17 @@ -static v0 language_highlight_lua (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/%~^#|()[]{}'\" \t\r\n"; +static procedure language_highlight_lua (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/%~^#|()[]{}'\" \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "and", "break", "do", "else", "elseif", "end", "false", "for", "function", "if", "in", "local", "nil", "not", "or", "until", "repeat", "return", "then", "true", "while" }; - c1 * types [] = { - "b4ean", "number", "string", "userdata", "function", "thread", "table" + character * types [] = { + "booleanean", "number", "string", "userdata", "function", "thread", "table" }; - c1 * commons [] = { + character * commons [] = { "require", "print", "seek", "dofile", "loadfile", "assert", "rawset", "rawget", "setfenv", "pairs", "ipairs", "tonumber", "tostring", "foreach", "setn", "getn", "insert", "concat", "sort", "remove", "abs", "ceil", "floor", "log10", @@ -28,15 +28,15 @@ static v0 language_highlight_lua (language_structure * language, syntax_structur syntax_define (syntax, false, false, "'", "'", '\\', language->character_colour, language->character_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (types); ++word) { + for (natural_64 word = 0; word < array_length (types); ++word) { syntax_define (syntax, false, true, types [word], separators, '\0', language->type_colour, language->type_effect); } - for (u8 word = 0; word < array_length (commons); ++word) { + for (natural_64 word = 0; word < array_length (commons); ++word) { syntax_define (syntax, false, true, commons [word], separators, '\0', language->extension_colour, language->extension_effect); } diff --git a/xanguage/pascal.h b/xanguage/pascal.h index 1b3902a..16cec4b 100755 --- a/xanguage/pascal.h +++ b/xanguage/pascal.h @@ -1,7 +1,7 @@ -static v0 language_highlight_pascal (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/&@#$%^()[] \t\r\n"; +static procedure language_highlight_pascal (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/&@#$%^()[] \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "absolute", "and", "array", "asm", "begin", "case", "const", "constructor", "destructor", "div", "do", "downto", "else", "end", "file", "for", "function", "goto", "if", "in", "inherited", "inline", "interface", "xor", @@ -16,7 +16,7 @@ static v0 language_highlight_pascal (language_structure * language, syntax_struc syntax_define (syntax, false, false, "{", "}", '\0', language->comment_colour, language->comment_effect); syntax_define (syntax, false, false, "'", "'", '#', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } diff --git a/xanguage/python.h b/xanguage/python.h index 3c06a80..188ffd3 100755 --- a/xanguage/python.h +++ b/xanguage/python.h @@ -1,7 +1,7 @@ -static v0 language_highlight_python (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/%!&~^?|()[]{}'\" \t\r\n"; +static procedure language_highlight_python (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/%!&~^?|()[]{}'\" \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "and", "as", "assert", "break", "class", "continue", "def", "del", "elif", "else", "except", "False", "finally", "for", "from", "global", "if", "import", "in", "is", "labmda", "None", "nonlocal", "not", @@ -9,8 +9,8 @@ static v0 language_highlight_python (language_structure * language, syntax_struc "yield", "async", "await" }; - c1 * commons [] = { - "abs", "all", "any", "apply", "ascii", "basestring", "bin", "b4", + character * commons [] = { + "abs", "all", "any", "apply", "ascii", "basestring", "bin", "boolean", "breakpoint", "buffer", "bytearray", "bytes", "callable", "chr", "classmethod", "cmp", "coerce", "compile", "complex", "copyright", "credits", "delattr", "dict", "dir", "divmod", "enumerate", "eval", "execfile", "exit", "file", "filter", "float", @@ -29,11 +29,11 @@ static v0 language_highlight_python (language_structure * language, syntax_struc syntax_define (syntax, false, false, "'", "'", '\\', language->character_colour, language->character_effect); syntax_define (syntax, false, false, "\"", "\"", '\\', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separators, '\0', language->keyword_colour, language->keyword_effect); } - for (u8 word = 0; word < array_length (commons); ++word) { + for (natural_64 word = 0; word < array_length (commons); ++word) { syntax_define (syntax, false, true, commons [word], separators, '\0', language->extension_colour, language->extension_effect); } diff --git a/xanguage/valgrind.h b/xanguage/valgrind.h index 16f0507..f187721 100755 --- a/xanguage/valgrind.h +++ b/xanguage/valgrind.h @@ -1,7 +1,7 @@ -static v0 language_highlight_valgrind (language_structure * language, syntax_structure * syntax) { - c1 * separators = ".,:;<=>+-*/%!&~^?|@#$()[]{}'\" \t\r\n"; +static procedure language_highlight_valgrind (language_structure * language, syntax_structure * syntax) { + character * separators = ".,:;<=>+-*/%!&~^?|@#$()[]{}'\" \t\r\n"; - c1 * titles [] = { + character * titles [] = { "HEAP", "LEAK", "ERROR", "SUMMARY" }; @@ -10,7 +10,7 @@ static v0 language_highlight_valgrind (language_structure * language, syntax_str syntax_define (syntax, false, false, "(", ")", '\0', language->lowercase_colour, language->lowercase_effect); syntax_define (syntax, false, false, "0x", ":", '\0', language->string_colour, language->string_effect); - for (u8 word = 0; word < array_length (titles); ++word) { + for (natural_64 word = 0; word < array_length (titles); ++word) { syntax_define (syntax, false, true, titles [word], separators, '\0', language->fatal_colour, language->fatal_effect); } diff --git a/xaptor b/xaptor index 68c322ecc7e50f603d77ca1f7d17bc13baf43320..b07129ecd22cb8e85b456f364c0b046e9a6ef448 100755 GIT binary patch literal 112448 zcmeFa3w&HvwLgB+HV|s-1OyEaWrT7`p^x-IZ7GkmbYOr6LorfBY|~`g1kxlo$+RgF z2o2F3he$-~E%=~5u2w+lRlv5EHZ8RYh?oLG#9ke>US~+vAXTEbm;S!rwf8w^pOZ|I zf_m@&^SAwE=IrlUd+oK?Ui-cGnL8qjFCUYYWjX)GT9;T1+ew|@jF;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pwHoUH9{L8E}iYpXaIEHzL{BM3&fcv(fKG*q=G1~49iLTW20 zuTs>G5>%^TY1!(|W2}r9VY=`}-=qCMO<6xBZ&u?BKdZ`G)YSDB^ft0;7jprAHTY@x zPKH-=1^oO6mInlm4!Hc`#~EJDg#l@q`wSkvq42uCTg|4R_yOTJ!~egq*N*02_a9PI z)5kIwbAwZUSHib?&_!ivi?vuTQ zG`#K~q$ZaEc>5=*oSL$XMfN6A_dd)Q$f4#%##O#Xntx*Fa#$pb8h!=dQ_G>I?vE5M zKRth0z98YdBoGeWZ%IwvpGm??7)@Wp-wGyWqVaq0m-(J~Cj9(Is5qS);pq?G#BgdF z9WK5IczSr}ZjZY{;jdh5xtf|^ihKE2zBd$J=fBmwaEFGprlza(p-_08XI8UL1!;!Q zU)K4^`Rn!5c~vzplLZI9qseC%>kshrhu8H4YKm?${}E3A#ZdSc1mIBf*h8&b|FzuI z{U$7!N;GXqn0^Pb_dmo{t}oVAc56JpfQM9hc01m87vK9ohW{90rS55XT?es`;k97d z4S3gIucJ(pNcnl;xgc)een1?bw}$tx`BwAy@bQP&{mp*C@F#m0)<&V>)RfOX{NZ)I z#)^-u{IF)6IcTD(hAfwqxV-#xe)jI)SczM_hH2eR*6{wPGyP*dVl5gzJm)2Ol|#+L z7~azI|30SwVHp{lmb>DkBf{_ft(7=8RDU&H4R5}(R)^1=#~jLc7ycvUbXG;A|A6^8 z7kgcY0)(87tp5}iF24(_tmIz3FwBI8SMy9*#2yacA|HO^2u-(p<*wn)N8&~@__w6i zN@%~Xz8cQ&4pmX(brHiqJ=;nygdu&E)?4lWrGE>Zq6u*Fe4Ek}n0NFa;q=A3QusP9 NkdyCh{71;?{4Zddg?<14 diff --git a/xaptor.c b/xaptor.c index 680c710..a3be5d2 100644 --- a/xaptor.c +++ b/xaptor.c @@ -1,42 +1,62 @@ -#define use_fatal_failure +//~#define use_fatal_failure #define use_png_library -#define use_raptor_renderer +//~#define use_raptor_renderer +#define use_opengl_renderer //~#define use_common_renderer -//~#define use_opengl_renderer //~#define use_vulkan_renderer #include #include #include #include +#include -s4 main (v0) { - cross_structure * cross = cross_initialize (30, 3); - ui_structure * ui = ui_initialize (cross); +integer main (none) { + //~cross_structure * cross = cross_initialize (30, 3); + cross_structure * cross = cross_initialize (30, 3, false, 1024 * 512, 512); + ui_structure * ui = ui_initialize (cross, 1); - cross_configure (cross, 640, 480, "Xaptor - File Manager"); + menu_structure * main_menu = menu_create_root (menu_layout_vertical, menu_type_window, 48); - while (cross->active == true) { - u4 offset = 48; + menu_append (main_menu, menu_create_button (menu_layout_horizontal, menu_create_string ("New Game", 0, 1.0f, 0xff7777ff), menu_create_sprite (345, 1.0f, 0xff0000ff), 12)); + menu_append (main_menu, menu_create_button (menu_layout_horizontal, menu_create_string ("Load Game Please", 1, 1.5f, 0x77ff77ff), null, 12)); + menu_append (main_menu, menu_create_root (menu_layout_horizontal, menu_type_frame, 12)); + menu_append (main_menu, menu_create_button (menu_layout_horizontal, menu_create_string ("Some more stuff", 1, 2.0f, 0xffffffff), null, 12)); - cross_synchronize (cross, 0x00000000); + menu_append (main_menu->array [2], menu_create_button (0, menu_create_string ("A", 1, 1.0f, ~ 0u), null, 12)); + menu_append (main_menu->array [2], menu_create_button (0, menu_create_string ("B", 1, 1.0f, ~ 0u), null, 12)); + menu_append (main_menu->array [2], menu_create_root (menu_layout_vertical, menu_type_frame, 12)); + + menu_structure * c = main_menu->array [2]; - ui_render_window (cross, ui, 0, 0, cross->window_width, cross->window_height); + menu_append (c->array [2], menu_create_button (0, menu_create_string ("Dd", 1, 1.0f, ~ 0u), null, 10)); + menu_append (c->array [2], menu_create_root (menu_layout_vertical, menu_type_status, 24)); + menu_append (c->array [2], menu_create_button (0, menu_create_string ("EEEeee", 1, 1.0f, ~ 0u), null, 10)); + menu_append (c->array [2], menu_create_button (0, menu_create_string ("FFff", 1, 1.0f, ~ 0u), null, 10)); - ui_render_status (cross, ui, offset, offset, cross->window_width - 2 * offset, cross->window_height - 2 * offset); + menu_structure * d = c->array [2]; - cross_render_string (cross, "Xaptors are coming!", 0, 2 * offset, 2 * offset, 1.5f, 0x4488ccff); + menu_append (d->array [1], menu_create_button (0, menu_create_string ("1", 1, 1.0f, ~ 0u), null, 12)); + menu_append (d->array [1], menu_create_button (0, menu_create_string ("23", 1, 1.0f, ~ 0u), null, 12)); - cross_render_string (cross, format ("%i", cross->framerate), 0, 2 * offset, 3 * offset, 1.0f, 0x4488ccff); - cross_render_string (cross, format ("%i", cross->global_tick), 0, 2 * offset, 4 * offset, 1.0f, 0x4488ccff); - cross_render_string (cross, format ("%i", cross->gameplay_tick), 0, 2 * offset, 5 * offset, 1.0f, 0x4488ccff); - cross_render_string (cross, format ("%i", cross->animation_tick), 0, 2 * offset, 6 * offset, 1.0f, 0x4488ccff); - cross_render_string (cross, format ("%i", cross->cursor_x), 0, 2 * offset, 7 * offset, 1.0f, 0x4488ccff); - cross_render_string (cross, format ("%i", cross->cursor_y), 0, 2 * offset, 8 * offset, 1.0f, 0x4488ccff); + ui_configure (cross, ui, null); + + cross_configure (cross, 800, 600, "Xaptor - File Manager"); + + menu_configure (cross, main_menu); + + while (cross->active == true) { + menu_center (cross, main_menu); + + menu_render (cross, ui, main_menu); if (cross->signal [signal_q] == true) break; + + cross_synchronize (cross, 0x00000000); } + menu_remove (main_menu); + cross = cross_deinitialize (cross); ui = ui_deinitialize (ui); diff --git a/xaptor.h b/xaptor.h index bf97594..a449598 100644 --- a/xaptor.h +++ b/xaptor.h @@ -29,38 +29,38 @@ typedef struct { Atom atom_close_button; Atom atom_transparency; - b4 signal [signal_count]; - b4 cursor [cursor_count]; - s4 cursor_x; - s4 cursor_y; - - u4 gameplay_framerate; - u4 animation_framerate; - u4 window_width; - u4 window_height; - b4 active; - u4 framerate; - u8 frame_time; - u8 frame_begin; - u8 frame_end; - u4 * framebuffer; - u4 global_tick; - u4 gameplay_tick; - u4 animation_tick; - u4 tab_width; - u4 sprite_count; - u4 font_count; - u4 * * sprite_data; - u4 * sprite_width; - u4 * sprite_height; - u4 * * font_index; - u4 * * font_width; - u4 * * font_height; - c1 * font_begin; - c1 * font_end; + boolean signal [signal_count]; + boolean cursor [cursor_count]; + integer cursor_x; + integer cursor_y; + + natural gameplay_framerate; + natural animation_framerate; + natural window_width; + natural window_height; + boolean active; + natural framerate; + natural_64 frame_time; + natural_64 frame_begin; + natural_64 frame_end; + natural * framebuffer; + natural global_tick; + natural gameplay_tick; + natural animation_tick; + natural tab_width; + natural sprite_count; + natural font_count; + natural * * sprite_data; + natural * sprite_width; + natural * sprite_height; + natural * * font_index; + natural * * font_width; + natural * * font_height; + character * font_begin; + character * font_end; } raptor_structure; -static raptor_structure * raptor_initialize (u4 gameplay_framerate, u4 animation_framerate) { +static raptor_structure * raptor_initialize (natural gameplay_framerate, natural animation_framerate) { raptor_structure * raptor = allocate (sizeof (* raptor)); raptor->gameplay_framerate = gameplay_framerate; @@ -71,11 +71,11 @@ static raptor_structure * raptor_initialize (u4 gameplay_framerate, u4 animation } static raptor_structure * raptor_deinitialize (raptor_structure * raptor) { - for (u4 index = 0; index < raptor->sprite_count; ++index) { + for (natural index = 0; index < raptor->sprite_count; ++index) { raptor->sprite_data [index] = deallocate (raptor->sprite_data [index]); } - for (u4 index = 0; index < raptor->font_count; ++index) { + for (natural index = 0; index < raptor->font_count; ++index) { raptor->font_index [index] = deallocate (raptor->font_index [index]); raptor->font_width [index] = deallocate (raptor->font_width [index]); raptor->font_height [index] = deallocate (raptor->font_height [index]); @@ -105,7 +105,7 @@ static raptor_structure * raptor_deinitialize (raptor_structure * raptor) { return (deallocate (raptor)); } -static u4 raptor_sprite_raw_import (raptor_structure * raptor, u4 * data, u4 width, u4 height) { +static natural raptor_sprite_raw_import (raptor_structure * raptor, natural * data, natural width, natural height) { ++raptor->sprite_count; raptor->sprite_data = reallocate (raptor->sprite_data, raptor->sprite_count * sizeof (* raptor->sprite_data)); @@ -119,15 +119,21 @@ static u4 raptor_sprite_raw_import (raptor_structure * raptor, u4 * data, u4 wid return (raptor->sprite_count - 1); } -static u4 raptor_font_raw_import (raptor_structure * raptor, u4 * data, u4 image_width, c1 begin, c1 end, u4 separator_colour) { - u4 pointer = 0; - u4 width = 0; - u4 height = 0; - u4 * buffer = null; +static natural raptor_font_raw_import (raptor_structure * raptor, natural * data, natural image_width, natural image_height, character begin, + character end, natural empty) { + natural current = ++raptor->font_count - 1; - u4 current = raptor->font_count; + natural pointer = 0; + natural width = 0; + natural height = 0; + natural point_count = 0; + natural * point_array = null; - ++raptor->font_count; + fatal_failure (raptor->active == true, "raptor_font_raw_import: Raptor renderer is already initialized."); + fatal_failure (data == null, "raptor_font_raw_import: Data is null pointer."); + fatal_failure (image_width == 0, "raptor_font_raw_import: Font image width is zero."); + fatal_failure (image_height == 0, "raptor_font_raw_import: Font image height is zero."); + fatal_failure (begin >= end, "raptor_font_raw_import: Font character range is inverted."); raptor->font_index = reallocate (raptor->font_index, raptor->font_count * sizeof (* raptor->font_index)); raptor->font_width = reallocate (raptor->font_width, raptor->font_count * sizeof (* raptor->font_width)); @@ -138,101 +144,121 @@ static u4 raptor_font_raw_import (raptor_structure * raptor, u4 * data, u4 image raptor->font_begin [current] = begin; raptor->font_end [current] = end; - raptor->font_index [current] = allocate ((u8) (end - begin + 1) * sizeof (* * raptor->font_index)); - raptor->font_width [current] = allocate ((u8) (end - begin + 1) * sizeof (* * raptor->font_width)); - raptor->font_height [current] = allocate ((u8) (end - begin + 1) * sizeof (* * raptor->font_height)); + raptor->font_index [current] = allocate ((caliber) (end - begin + 1) * sizeof (* * raptor->font_index)); + raptor->font_width [current] = allocate ((caliber) (end - begin + 1) * sizeof (* * raptor->font_width)); + raptor->font_height [current] = allocate ((caliber) (end - begin + 1) * sizeof (* * raptor->font_height)); - for (c1 index = begin; index <= end; ++index) { - for ( ; data [pointer] == separator_colour; ++pointer); - for (width = 0; data [pointer + width] != separator_colour; ++width); - for (height = 0; data [pointer + height * image_width] != separator_colour; ++height); + point_array = allocate ((caliber) (end - begin + 1) * sizeof (* point_array)); - buffer = allocate (width * height * sizeof (* buffer)); + if (empty == 0x00000000u) { + empty = data [0]; + } - for (u4 y = 0; y < height; ++y) { - for (u4 x = 0; x < width; ++x) { - buffer [y * width + x] = data [pointer + (y * image_width) + x]; + for (natural y = 0; y < image_height - 1; ++y) { + for (natural x = 0; x < image_width - 1; ++x) { + if ((data [(y + 0) * image_width + (x + 0)] == empty) + && (data [(y + 1) * image_width + (x + 0)] == empty) + && (data [(y + 0) * image_width + (x + 1)] == empty) + && (data [(y + 1) * image_width + (x + 1)] == 0x00000000u)) { + ++point_count; + point_array [point_count - 1] = (y + 1) * image_width + (x + 1); } } + } - raptor->font_index [current] [index - begin] = raptor_sprite_raw_import (raptor, buffer, width, height); - raptor->font_width [current] [index - begin] = width; - raptor->font_height [current] [index - begin] = height; + if (point_count != end - begin + 1) { + print ("/w Mismatch between font character points:\n"); + print ("/c --- Hardcoded expected number of character points: %i\n", end - begin + 1); + print ("/c --- Algorithm found number of character points: %i\n", point_count); + } - pointer += width; + for (natural index = 0; index < end - begin + 1; ++index) { + for (width = 0; data [point_array [index] + width] != empty; ++width); + for (height = 0; data [point_array [index] + height * image_width] != empty; ++height); - for (; data [pointer] == separator_colour; ++pointer); + fatal_failure (width == 0, "raptor_font_raw_import: Font width is zero."); + fatal_failure (height == 0, "raptor_font_raw_import: Font height is zero."); - if (pointer % image_width == 2) { - pointer += height * image_width; + natural * buffer = allocate (width * height * sizeof (* buffer)); + + for (natural y = 0; y < height; ++y) { + for (natural x = 0; x < width; ++x) { + buffer [y * width + x] = data [point_array [index] + y * image_width + x]; + } } + + raptor->font_index [current] [index] = raptor_sprite_raw_import (raptor, buffer, width, height); + raptor->font_width [current] [index] = width; + raptor->font_height [current] [index] = height; } + point_array = deallocate (point_array); + return (current); } -static u4 raptor_sprite_import (raptor_structure * raptor, c1 * path) { - u4 width = 0; - u4 height = 0; - u4 * data = null; +static natural raptor_sprite_import (raptor_structure * raptor, character * path) { + natural width = 0; + natural height = 0; + natural * data = null; data = format_image_import (path, & width, & height); return (raptor_sprite_raw_import (raptor, data, width, height)); } -static u4 raptor_font_import (raptor_structure * raptor, c1 * path, c1 begin, c1 end, u4 colour) { - u4 width = 0; - u4 height = 0; - u4 result = 0; - u4 * data = null; +static natural raptor_font_import (raptor_structure * raptor, character * path, character begin, character end, natural colour) { + natural width = 0; + natural height = 0; + natural result = 0; + natural * data = null; data = format_image_import (path, & width, & height); - result = raptor_font_raw_import (raptor, data, width, begin, end, colour); + result = raptor_font_raw_import (raptor, data, width, height, begin, end, colour); data = deallocate (data); return (result); } -static u4 raptor_sprite_width (raptor_structure * raptor, u4 sprite) { +static natural raptor_sprite_width (raptor_structure * raptor, natural sprite) { return (raptor->sprite_width [sprite]); } -static u4 raptor_sprite_height (raptor_structure * raptor, u4 sprite) { +static natural raptor_sprite_height (raptor_structure * raptor, natural sprite) { return (raptor->sprite_height [sprite]); } -static u4 raptor_character_width (raptor_structure * raptor, c1 character, u4 font, f4 scale) { - if ((character < raptor->font_begin [font]) || (character > raptor->font_end [font])) { +static natural raptor_character_width (raptor_structure * raptor, character data, natural font, real scale) { + if ((data < raptor->font_begin [font]) || (data > raptor->font_end [font])) { return (0); } else { - u4 index = raptor->font_index [font] [character - raptor->font_begin [font]]; + natural index = raptor->font_index [font] [data - raptor->font_begin [font]]; - return ((u4) (scale * (float) raptor->sprite_width [index])); + return ((natural) (scale * (real) raptor->sprite_width [index])); } } -static u4 raptor_character_height (raptor_structure * raptor, c1 character, u4 font, f4 scale) { - if ((character < raptor->font_begin [font]) || (character > raptor->font_end [font])) { +static natural raptor_character_height (raptor_structure * raptor, character data, natural font, real scale) { + if ((data < raptor->font_begin [font]) || (data > raptor->font_end [font])) { return (0); } else { - u4 index = raptor->font_index [font] [character - raptor->font_begin [font]]; + natural index = raptor->font_index [font] [data - raptor->font_begin [font]]; - return ((u4) (scale * (float) raptor->sprite_height [index])); + return ((natural) (scale * (real) raptor->sprite_height [index])); } } -static u4 raptor_string_width (raptor_structure * raptor, c1 * string, u4 font, f4 scale) { - u4 width = 0; - u4 match = 0; +static natural raptor_string_width (raptor_structure * raptor, character * string, natural font, real scale) { + natural width = 0; + natural match = 0; if (string == null) { return (0); } - for (u4 index = 0; string [index] != '\0'; ++index) { + for (natural index = 0; string [index] != '\0'; ++index) { if (string [index] == '\t') { width += raptor->tab_width * raptor_character_width (raptor, ' ', font, scale); } else if (string [index] == '\n') { @@ -246,14 +272,14 @@ static u4 raptor_string_width (raptor_structure * raptor, c1 * string, u4 font, return (maximum (width, match)); } -static u4 raptor_string_height (raptor_structure * raptor, c1 * string, u4 font, f4 scale) { - u4 height = raptor_character_height (raptor, ' ', font, scale); +static natural raptor_string_height (raptor_structure * raptor, character * string, natural font, real scale) { + natural height = raptor_character_height (raptor, ' ', font, scale); if ((string == null) || (string [0] == '\0')) { return (0); } - for (u4 index = 0; string [index] != '\0'; ++index) { + for (natural index = 0; string [index] != '\0'; ++index) { if (string [index] == '\n') { height += raptor_character_height (raptor, ' ', font, scale); } @@ -262,22 +288,22 @@ static u4 raptor_string_height (raptor_structure * raptor, c1 * string, u4 font, return (height); } -static u4 raptor_center_x (raptor_structure * raptor, u4 size) { +static natural raptor_center_x (raptor_structure * raptor, natural size) { return ((raptor->window_width - size) / 2); } -static u4 raptor_center_y (raptor_structure * raptor, u4 size) { +static natural raptor_center_y (raptor_structure * raptor, natural size) { return ((raptor->window_height - size) / 2); } -static b4 raptor_cursor_inside (raptor_structure * raptor, s4 x, s4 y, u4 width, u4 height) { +static boolean raptor_cursor_inside (raptor_structure * raptor, integer x, integer y, natural width, natural height) { return ((raptor->cursor_x > x) && (raptor->cursor_y > y) - && (raptor->cursor_x < x + (int) width) - && (raptor->cursor_y < y + (int) height)); + && (raptor->cursor_x < x + (integer) width) + && (raptor->cursor_y < y + (integer) height)); } -static b4 raptor_cursor_left_click (raptor_structure * raptor, s4 x, s4 y, u4 width, u4 height) { +static boolean raptor_cursor_left_click (raptor_structure * raptor, integer x, integer y, natural width, natural height) { if (raptor->cursor [cursor_left] == true) { return (raptor_cursor_inside (raptor, x, y, width, height) == true); } @@ -285,7 +311,7 @@ static b4 raptor_cursor_left_click (raptor_structure * raptor, s4 x, s4 y, u4 wi return (false); } -static b4 raptor_cursor_right_click (raptor_structure * raptor, s4 x, s4 y, u4 width, u4 height) { +static boolean raptor_cursor_right_click (raptor_structure * raptor, integer x, integer y, natural width, natural height) { if (raptor->cursor [cursor_right] == true) { return (raptor_cursor_inside (raptor, x, y, width, height)); } @@ -293,8 +319,8 @@ static b4 raptor_cursor_right_click (raptor_structure * raptor, s4 x, s4 y, u4 w return (false); } -static v0 raptor_configure (raptor_structure * raptor, u4 window_width, u4 window_height, c1 * window_title) { - u8 font_bitmap [2 * 95] = { +static procedure raptor_configure (raptor_structure * raptor, natural window_width, natural window_height, character * window_title) { + natural_64 font_bitmap [2 * 95] = { 0x0000000000000000, 0x0000000000000000, 0x0000101010101010, 0x1000101000000000, 0x0024242400000000, 0x0000000000000000, 0x00002424247e2424, 0x7e24242400000000, 0x0010107c9290907c, 0x1212927c10100000, 0x0000649468081010, 0x202c524c00000000, 0x000018242418304a, 0x4444443a00000000, 0x0010101000000000, 0x0000000000000000, 0x0000081020202020, 0x2020100800000000, @@ -331,9 +357,9 @@ static v0 raptor_configure (raptor_structure * raptor, u4 window_width, u4 windo XSetWindowAttributes window_attributes; - u4 * dumb_buffer = allocate (256 * sizeof (* dumb_buffer)); + natural * dumb_buffer = allocate (256 * sizeof (* dumb_buffer)); - for (u4 index = 0; index < 256; ++index) { + for (natural index = 0; index < 256; ++index) { dumb_buffer [index] = 0xffffffff; } @@ -352,13 +378,13 @@ static v0 raptor_configure (raptor_structure * raptor, u4 window_width, u4 windo raptor->font_width [raptor->font_count - 1] = allocate (95 * sizeof (* * raptor->font_width)); raptor->font_height [raptor->font_count - 1] = allocate (95 * sizeof (* * raptor->font_height)); - for (u4 index = 0; index < 95; ++index) { - u4 * buffer = allocate (8 * 16 * sizeof (* buffer)); + for (natural index = 0; index < 95; ++index) { + natural * buffer = allocate (8 * 16 * sizeof (* buffer)); - for (u4 value = 0; value < 2; ++value) { - for (u4 bit = 64; bit > 0; --bit) { - u4 destination = ((value << 3) - ((bit - 1) >> 3) + 7) * 8 - ((bit - 1) & 7) + 7; - u4 source = (font_bitmap [2 * index + value] >> (bit - 1)) & 1; + for (natural value = 0; value < 2; ++value) { + for (natural bit = 64; bit > 0; --bit) { + natural destination = ((value << 3) - ((bit - 1) >> 3) + 7) * 8 - ((bit - 1) & 7) + 7; + natural source = (font_bitmap [2 * index + value] >> (bit - 1)) & 1; buffer [destination] = (source) ? 0xffffffff : 0x00000000; } @@ -376,7 +402,7 @@ static v0 raptor_configure (raptor_structure * raptor, u4 window_width, u4 windo raptor->display = XOpenDisplay (null); - s4 screen = DefaultScreen (raptor->display); + integer screen = DefaultScreen (raptor->display); XMatchVisualInfo (raptor->display, screen, 32, TrueColor, & raptor->visual); @@ -417,39 +443,40 @@ static v0 raptor_configure (raptor_structure * raptor, u4 window_width, u4 windo raptor->frame_begin = nano_time (); } -static v0 raptor_render_base (raptor_structure * raptor, u4 sprite, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height, f4 scale_x, - f4 scale_y, s4 flip_x, s4 flip_y, u4 upper_left, u4 upper_right, u4 lower_left, u4 lower_right) { - (v0) scale_x; - (v0) scale_y; - (v0) flip_x; - (v0) flip_y; +static procedure raptor_render_base (raptor_structure * raptor, natural sprite, integer x, integer y, natural u, natural v, natural width, + natural height, real scale_x, real scale_y, integer flip_x, integer flip_y, natural upper_left, + natural upper_right, natural lower_left, natural lower_right) { + (none) scale_x; + (none) scale_y; + (none) flip_x; + (none) flip_y; /// FIX TO INTERPOLATE ALL 4 COLOURS - //~(v0) upper_left; - (v0) upper_right; - (v0) lower_left; - (v0) lower_right; + //~(none) upper_left; + (none) upper_right; + (none) lower_left; + (none) lower_right; - u4 interpolate_pixels (u4 pixel, u4 modifier) { - u4 r = (((pixel & 0xff000000) >> 24) * ((modifier & 0x000000ff) >> 0)) / 0xff; - u4 g = (((pixel & 0x00ff0000) >> 16) * ((modifier & 0x0000ff00) >> 8)) / 0xff; - u4 b = (((pixel & 0x0000ff00) >> 8) * ((modifier & 0x00ff0000) >> 16)) / 0xff; - u4 a = (((pixel & 0x000000ff) >> 0) * ((modifier & 0xff000000) >> 24)) / 0xff; + natural interpolate_pixels (natural pixel, natural modifier) { + natural r = (((pixel & 0xff000000) >> 24) * ((modifier & 0x000000ff) >> 0)) / 0xff; + natural g = (((pixel & 0x00ff0000) >> 16) * ((modifier & 0x0000ff00) >> 8)) / 0xff; + natural b = (((pixel & 0x0000ff00) >> 8) * ((modifier & 0x00ff0000) >> 16)) / 0xff; + natural a = (((pixel & 0x000000ff) >> 0) * ((modifier & 0xff000000) >> 24)) / 0xff; return ((r << 24) | (g << 16) | (b << 8) | a); } - if ((x + (int) width < 0) || (y + (int) height < 0) || (x > (int) raptor->window_width) || (y > (int) raptor->window_height)) return; + if ((x + (integer) width < 0) || (y + (integer) height < 0) || (x > (integer) raptor->window_width) || (y > (integer) raptor->window_height)) return; - for (u4 vertical = 0; vertical < height; ++vertical) { + for (natural vertical = 0; vertical < height; ++vertical) { if (vertical + y >= raptor->window_height) break; if (vertical + v >= raptor->sprite_height [sprite]) break; - for (u4 horizontal = 0; horizontal < width; ++horizontal) { + for (natural horizontal = 0; horizontal < width; ++horizontal) { if (horizontal + x >= raptor->window_width) break; if (horizontal + u >= raptor->sprite_width [sprite]) break; - u4 pixel = raptor->sprite_data [sprite] [(vertical + v) * raptor->sprite_width [sprite] + horizontal + u]; - u4 at = (y + vertical) * raptor->window_width + (x + horizontal); + natural pixel = raptor->sprite_data [sprite] [(vertical + v) * raptor->sprite_width [sprite] + horizontal + u]; + natural at = (y + vertical) * raptor->window_width + (x + horizontal); raptor->framebuffer [at] = (((pixel & 0xff000000) >> 24) > 0x77) ? interpolate_pixels (pixel, upper_left) @@ -458,76 +485,77 @@ static v0 raptor_render_base (raptor_structure * raptor, u4 sprite, s4 x, s4 y, } } -static v0 raptor_render_rectangle (raptor_structure * raptor, s4 x, s4 y, u4 width, u4 height, u4 colour) { - raptor_render_base (raptor, raptor->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16, (float) height / 16, 0, 0, colour, colour, +static procedure raptor_render_rectangle (raptor_structure * raptor, integer x, integer y, natural width, natural height, natural colour) { + raptor_render_base (raptor, raptor->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16, (real) height / 16, 0, 0, colour, colour, colour, colour); } -static v0 raptor_render_sprite (raptor_structure * raptor, u4 sprite, s4 x, s4 y) { - u4 width = raptor->sprite_width [sprite]; - u4 height = raptor->sprite_height [sprite]; +static procedure raptor_render_sprite (raptor_structure * raptor, natural sprite, integer x, integer y) { + natural width = raptor->sprite_width [sprite]; + natural height = raptor->sprite_height [sprite]; raptor_render_base (raptor, sprite, x, y, 0, 0, width, height, 1.0f, 1.0f, 0, 0, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 raptor_render_sprite_scale (raptor_structure * raptor, u4 sprite, s4 x, s4 y, f4 scale_x, f4 scale_y) { - u4 width = raptor->sprite_width [sprite]; - u4 height = raptor->sprite_height [sprite]; +static procedure raptor_render_sprite_scale (raptor_structure * raptor, natural sprite, integer x, integer y, real scale_x, real scale_y) { + natural width = raptor->sprite_width [sprite]; + natural height = raptor->sprite_height [sprite]; raptor_render_base (raptor, sprite, x, y, 0, 0, width, height, scale_x, scale_y, 0, 0, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 raptor_render_sprite_crop (raptor_structure * raptor, u4 sprite, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height) { +static procedure raptor_render_sprite_crop (raptor_structure * raptor, natural sprite, integer x, integer y, natural u, natural v, natural width, natural height) { raptor_render_base (raptor, sprite, x, y, u, v, width, height, 1.0f, 1.0f, 0, 0, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 raptor_render_sprite_colour (raptor_structure * raptor, u4 sprite, u4 colour, s4 x, s4 y) { - u4 width = raptor->sprite_width [sprite]; - u4 height = raptor->sprite_height [sprite]; +static procedure raptor_render_sprite_colour (raptor_structure * raptor, natural sprite, natural colour, integer x, integer y) { + natural width = raptor->sprite_width [sprite]; + natural height = raptor->sprite_height [sprite]; raptor_render_base (raptor, sprite, x, y, 0, 0, width, height, 1.0f, 1.0f, 0, 0, colour, colour, colour, colour); } -static v0 raptor_render_sprite_crop_colour (raptor_structure * raptor, u4 sprite, u4 colour, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height) { - raptor_render_base (raptor, sprite, x, y, u, v, width, height, 1.0f, 1.0f, 0, 0, colour, colour, colour, colour); -} - -static v0 raptor_render_sprite_flip (raptor_structure * raptor, u4 sprite, s4 x, s4 y, s4 flip_x, s4 flip_y) { - u4 width = raptor->sprite_width [sprite]; - u4 height = raptor->sprite_height [sprite]; +static procedure raptor_render_sprite_flip (raptor_structure * raptor, natural sprite, integer x, integer y, integer flip_x, integer flip_y) { + natural width = raptor->sprite_width [sprite]; + natural height = raptor->sprite_height [sprite]; raptor_render_base (raptor, sprite, x, y, 0, 0, width, height, 1.0f, 1.0f, flip_x, flip_y, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 raptor_render_sprite_animate (raptor_structure * raptor, u4 sprite, s4 x, s4 y, u4 frames, u4 state, u4 states) { - u4 width = raptor->sprite_width [sprite] / states; - u4 height = raptor->sprite_height [sprite] / frames; +static procedure raptor_render_sprite_animation (raptor_structure * raptor, natural sprite, integer x, integer y, natural frames, natural state, natural states) { + natural width = raptor->sprite_width [sprite] / states; + natural height = raptor->sprite_height [sprite] / frames; - u4 u = width * (state % states); - u4 v = height * (raptor->animation_tick % frames); + natural u = width * (state % states); + natural v = height * (raptor->animation_tick % frames); raptor_render_sprite_crop (raptor, sprite, x, y, u, v, width, height); } -static v0 raptor_render_character (raptor_structure * raptor, c1 character, u4 font, s4 x, s4 y, f4 scale, u4 colour) { - if ((character < raptor->font_begin [font]) || (character > raptor->font_end [font])) return; +static procedure raptor_render_sprite_crop_colour (raptor_structure * raptor, natural sprite, natural colour, integer x, integer y, natural u, + natural v, natural width, natural height) { + raptor_render_base (raptor, sprite, x, y, u, v, width, height, 1.0f, 1.0f, 0, 0, colour, colour, colour, colour); +} + +static procedure raptor_render_character (raptor_structure * raptor, character data, natural font, integer x, integer y, real scale, natural colour) { + if ((data < raptor->font_begin [font]) || (data > raptor->font_end [font])) return; - u4 index = raptor->font_index [font] [character - raptor->font_begin [font]]; + natural index = raptor->font_index [font] [data - raptor->font_begin [font]]; - u4 width = raptor->sprite_width [index]; - u4 height = raptor->sprite_height [index]; + natural width = raptor->sprite_width [index]; + natural height = raptor->sprite_height [index]; raptor_render_base (raptor, index, x, y, 0, 0, width, height, scale, scale, 0, 0, colour, colour, colour, colour); } -static v0 raptor_render_string (raptor_structure * raptor, c1 * string, u4 font, s4 x, s4 y, f4 scale, u4 colour) { - s4 offset = x; +static procedure raptor_render_string (raptor_structure * raptor, character * string, natural font, integer x, integer y, real scale, natural colour) { + integer offset = x; if (string == null) return; - for (u4 index = 0; string [index] != '\0'; ++index) { + for (natural index = 0; string [index] != '\0'; ++index) { if (string [index] == '\t') { x += raptor->tab_width * raptor_character_width (raptor, ' ', font, scale); continue; @@ -543,12 +571,12 @@ static v0 raptor_render_string (raptor_structure * raptor, c1 * string, u4 font, } } -static v0 raptor_render_framerate (raptor_structure * raptor, u4 font, s4 x, s4 y, f4 scale, u4 colour) { +static procedure raptor_render_framerate (raptor_structure * raptor, natural font, integer x, integer y, real scale, natural colour) { raptor_render_string (raptor, number_to_string (raptor->framerate), font, x, y, scale, colour); } -static v0 raptor_synchronize (raptor_structure * raptor, u4 clear_colour) { - u4 signal_code [signal_count] = { +static procedure raptor_synchronize (raptor_structure * raptor, natural clear_colour) { + natural signal_code [signal_count] = { 0, 38, 56, 54, 40, 26, 41, 42, 43, 31, 44, 45, 46, 58, 57, 32, 33, 24, 27, 39, 28, 30, 55, 25, 53, 29, 52, 19, 10, 11, 12, 13, 14, @@ -559,21 +587,21 @@ static v0 raptor_synchronize (raptor_structure * raptor, u4 clear_colour) { 85, 79, 80, 81 }; - u4 new_window_width = raptor->window_width; - u4 new_window_height = raptor->window_height; + natural new_window_width = raptor->window_width; + natural new_window_height = raptor->window_height; XEvent event = { 0 }; //~Window root_window = { 0 }; - //~s4 root_x = 0; - //~s4 root_y = 0; - //~u4 mask = 0; + //~integer root_x = 0; + //~integer root_y = 0; + //~natural mask = 0; - for (u4 index = 0; index < cursor_count; ++index) { + for (natural index = 0; index < cursor_count; ++index) { raptor->cursor [index] = false; } - for (u4 index = 0; index < signal_count; ++index) { + for (natural index = 0; index < signal_count; ++index) { raptor->signal [index] = false; } @@ -603,7 +631,7 @@ static v0 raptor_synchronize (raptor_structure * raptor, u4 clear_colour) { raptor->cursor_y = event.xbutton.y; } break; case (KeyPress): { - for (u4 index = 0; index < signal_count; ++index) { + for (natural index = 0; index < signal_count; ++index) { if (event.xkey.keycode == signal_code [index]) { raptor->signal [index] = true; } @@ -615,14 +643,14 @@ static v0 raptor_synchronize (raptor_structure * raptor, u4 clear_colour) { } break; } - for (u4 pixel = 0; pixel < raptor->window_width * raptor->window_height; ++pixel) { - u4 r = (raptor->framebuffer [pixel] & 0x00ff0000) >> 16; - u4 b = (raptor->framebuffer [pixel] & 0x000000ff) << 16; + for (natural pixel = 0; pixel < raptor->window_width * raptor->window_height; ++pixel) { + natural r = (raptor->framebuffer [pixel] & 0x00ff0000) >> 16; + natural b = (raptor->framebuffer [pixel] & 0x000000ff) << 16; raptor->framebuffer [pixel] = (raptor->framebuffer [pixel] & 0xff00ff00) | b | r; } - raptor->image = XCreateImage (raptor->display, raptor->visual.visual, raptor->visual.depth, ZPixmap, 0, (c1 *) raptor->framebuffer, + raptor->image = XCreateImage (raptor->display, raptor->visual.visual, raptor->visual.depth, ZPixmap, 0, (character *) raptor->framebuffer, raptor->window_width, raptor->window_height, 32, 0); XPutImage (raptor->display, raptor->pixmap, raptor->context, raptor->image, 0, 0, 0, 0, raptor->window_width, raptor->window_height); @@ -644,7 +672,7 @@ static v0 raptor_synchronize (raptor_structure * raptor, u4 clear_colour) { clear_colour = colour_channel_reverse (clear_colour); - for (u4 pixel = 0; pixel < raptor->window_width * raptor->window_height; ++pixel) { + for (natural pixel = 0; pixel < raptor->window_width * raptor->window_height; ++pixel) { raptor->framebuffer [pixel] = clear_colour; } @@ -657,7 +685,7 @@ static v0 raptor_synchronize (raptor_structure * raptor, u4 clear_colour) { } if (raptor->global_tick % raptor->gameplay_framerate == 0) { - raptor->framerate = (u4) (1000000000ul / raptor->frame_time); + raptor->framerate = (natural) (1000000000ul / raptor->frame_time); } ++raptor->global_tick; @@ -672,8 +700,8 @@ static v0 raptor_synchronize (raptor_structure * raptor, u4 clear_colour) { ////////////// MOVE ME PLEASE -static v0 raptor_render_rectangle_vertical_gradient (raptor_structure * raptor, s4 x, s4 y, u4 width, u4 height, u4 colour_up, - u4 colour_down) { - raptor_render_base (raptor, raptor->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16.0f, (float) height / 16.0f, 0, 0, +static procedure raptor_render_rectangle_vertical_gradient (raptor_structure * raptor, integer x, integer y, natural width, natural height, natural colour_up, + natural colour_down) { + raptor_render_base (raptor, raptor->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16.0f, (real) height / 16.0f, 0, 0, colour_up, colour_up, colour_down, colour_down); } diff --git a/xarbon.c b/xarbon.c index 5948e5f..e12f99a 100755 --- a/xarbon.c +++ b/xarbon.c @@ -20,20 +20,20 @@ #include #include -static u4 background = 0xff181818; -static u4 foreground = 0xffcccccc; -static u4 font_width = 8; -static u4 font_height = 16; -static u4 tab_width = 8; -static u4 render_border = 10; - -static u4 * render_image = null; -static u4 render_width = 0; -static u4 render_height = 0; -static u4 line_number = 0; -static u4 line_digits = 0; - -static v0 conditionally_exit (language_structure * language, syntax_structure * syntax, b4 terminate) { +static natural background = 0xff181818; +static natural foreground = 0xffcccccc; +static natural font_width = 8; +static natural font_height = 16; +static natural tab_width = 8; +static natural render_border = 10; + +static natural * render_image = null; +static natural render_width = 0; +static natural render_height = 0; +static natural line_number = 0; +static natural line_digits = 0; + +static procedure conditionally_exit (language_structure * language, syntax_structure * syntax, boolean terminate) { syntax = syntax_deinitialize (syntax); language = language_deinitialize (language); @@ -42,13 +42,13 @@ static v0 conditionally_exit (language_structure * language, syntax_structure * } } -static v0 print_common (v0) { +static procedure print_common (none) { print ("/B/4xarbon/-: /4Source code PNG renderer/-\n\n"); print ("\tAuthor: /4Ognjen 'xolatile' Milan Robovic/-\n"); print ("\tLicense: /4GNU//GPLv3/-\n\n"); } -static v0 print_help (v0) { +static procedure print_help (none) { print_common (); print ("Example usage:\n\n"); @@ -58,7 +58,7 @@ static v0 print_help (v0) { print ("Supported languages:\n\n"); for (language_enumeration index = 0; index < language_count; ++index) { - c1 align [32] = ""; + character align [32] = ""; print ("\t/B/4%s/- /4%s/- /0---/- %s syntax highlighting\n", language_short_option [index], @@ -67,15 +67,15 @@ static v0 print_help (v0) { } } -static v0 print_version (v0) { +static procedure print_version (none) { print_common (); print ("\tVersion: /40 (Zero)/-\n"); } -static u4 fetch_width (c1 * data) { - u4 image_width = 0; - u4 count = 0; +static natural fetch_width (character * data) { + natural image_width = 0; + natural count = 0; do { if (* data == '\t') { @@ -91,9 +91,9 @@ static u4 fetch_width (c1 * data) { return (image_width - 1); } -static u4 fetch_height (c1 * data) { - u4 image_height = 0; - u4 count = 0; +static natural fetch_height (character * data) { + natural image_height = 0; + natural count = 0; do { if (* data == '\n') { @@ -112,8 +112,8 @@ static u4 fetch_height (c1 * data) { return (image_height + 1); } -static v0 render_character (c1 character, u4 * x, u4 * y, u4 colour) { - u8 glyphmap [192] = { +static procedure render_character (character data, natural * x, natural * y, natural colour) { + natural_64 glyphmap [192] = { 0x0000000000000000, 0x0000000000000000, 0x0000101010101010, 0x1000101000000000, 0x0024242400000000, 0x0000000000000000, 0x00002424247e2424, 0x7e24242400000000, 0x0010107c9290907c, 0x1212927c10100000, 0x0000649468081010, 0x202c524c00000000, 0x000018242418304a, 0x4444443a00000000, 0x0010101000000000, 0x0000000000000000, 0x0000081020202020, 0x2020100800000000, @@ -148,10 +148,10 @@ static v0 render_character (c1 character, u4 * x, u4 * y, u4 colour) { 0x0000300808080408, 0x0808083000000000, 0x000000000062928c, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000 }; - for (u8 index = 0; index < 2; ++index) { - for (u8 bit = 64; bit > 0; --bit) { - u8 destination = (* y + (index << 3) - ((bit - 1) >> 3) + 7) * render_width + (* x - ((bit - 1) & 7) + 7); - u8 source = (glyphmap [2 * (u8) (character - ' ') + index] >> (bit - 1)) & 1; + for (natural_64 index = 0; index < 2; ++index) { + for (natural_64 bit = 64; bit > 0; --bit) { + natural_64 destination = (* y + (index << 3) - ((bit - 1) >> 3) + 7) * render_width + (* x - ((bit - 1) & 7) + 7); + natural_64 source = (glyphmap [2 * (natural_64) (data - ' ') + index] >> (bit - 1)) & 1; render_image [destination] = (source) ? colour : background; } @@ -160,15 +160,15 @@ static v0 render_character (c1 character, u4 * x, u4 * y, u4 colour) { * x += font_width; } -static v0 render_string (c1 * string, u4 length, u4 * x, u4 * y, u4 colour) { - for (u4 offset = 0; offset < length; ++offset) { +static procedure render_string (character * string, natural length, natural * x, natural * y, natural colour) { + for (natural offset = 0; offset < length; ++offset) { if (string [offset] == '\t') { * x += font_width * tab_width; } else if (string [offset] == '\n') { * y += font_height; * x = render_border; - render_string (format_to_string ((int) ++line_number, false, 10, (int) line_digits, ' '), + render_string (format_to_string ((integer) ++line_number, false, 10, (integer) line_digits, ' '), line_digits, x, y, foreground); * x += font_width; @@ -178,19 +178,19 @@ static v0 render_string (c1 * string, u4 length, u4 * x, u4 * y, u4 colour) { } } -s4 main (s4 argc, c1 * * argv) { - u4 select = language_count; - u4 offset = 0; - u4 length = 0; - u4 x = render_border; - u4 y = render_border; - c1 * buffer = null; - c1 * dump = null; +integer main (integer argc, character * * argv) { + natural select = language_count; + natural offset = 0; + natural length = 0; + natural x = render_border; + natural y = render_border; + character * buffer = null; + character * dump = null; syntax_structure * syntax = syntax_initialize (666); language_structure * language = language_initialize (true); - for (s4 argument = 1; argument < argc; ++argument) { + for (integer argument = 1; argument < argc; ++argument) { if (argument_compare (argv [argument], "-h", "--help") == true) { print_help (); conditionally_exit (language, syntax, true); @@ -207,7 +207,7 @@ s4 main (s4 argc, c1 * * argv) { continue; } - for (u4 index = 0; index < language_count; ++index) { + for (natural index = 0; index < language_count; ++index) { if (argument_compare (argv [argument], language_short_option [index], language_long_option [index]) == true) { (* (language_highlighter [index])) (language, syntax); select = index; @@ -217,7 +217,7 @@ s4 main (s4 argc, c1 * * argv) { if (file_exists (argv [argument]) == true) { if (select == language_count) { - select = (u4) file_type (argv [argument]); + select = (natural) file_type (argv [argument]); } if (buffer == null) { buffer = file_import (argv [argument]); @@ -253,14 +253,14 @@ s4 main (s4 argc, c1 * * argv) { render_image [offset] = background; } - render_string (format_to_string ((int) ++line_number, false, 10, (int) line_digits, ' '), line_digits, & x, & y, foreground); + render_string (format_to_string ((integer) ++line_number, false, 10, (integer) line_digits, ' '), line_digits, & x, & y, foreground); x += font_width; for (offset = 0; buffer [offset] != '\0'; offset += length) { select = syntax_select (syntax, & buffer [offset], & length); - render_string (& buffer [offset], length, & x, & y, (select >= syntax->count) ? background : (u4) syntax->colour [select]); + render_string (& buffer [offset], length, & x, & y, (select >= syntax->count) ? background : (natural) syntax->colour [select]); } png_image_export (dump, render_image, render_width, render_height); diff --git a/xarticle.h b/xarticle.h index 9f63a0b..7e0a8e5 100644 --- a/xarticle.h +++ b/xarticle.h @@ -16,18 +16,18 @@ /// for more details, if you dare, it is a lot of text that nobody wants to read... typedef struct { - u4 count; - u4 limit; - u4 * sprite; - f4 * life; - u4 * colour_in; - u4 * colour_out; + natural count; + natural limit; + natural * sprite; + real * life; + natural * colour_in; + natural * colour_out; vector_3 * * position; vector_3 * * target; vector_3 * * speed; } particle_structure; -static particle_structure * particle_initialize (u4 limit) { +static particle_structure * particle_initialize (natural limit) { particle_structure * particle = allocate (sizeof (* particle)); particle->limit = limit; @@ -40,7 +40,7 @@ static particle_structure * particle_initialize (u4 limit) { particle->target = allocate (limit * sizeof (* particle->target)); particle->speed = allocate (limit * sizeof (* particle->speed)); - for (u4 index = 0; index < limit; ++index) { + for (natural index = 0; index < limit; ++index) { particle->life [index] = 0.0f; particle->position [index] = allocate (sizeof (* * particle->position)); @@ -56,7 +56,7 @@ static particle_structure * particle_initialize (u4 limit) { } static particle_structure * particle_deinitialize (particle_structure * particle) { - for (u4 index = 0; index < particle->count; ++index) { + for (natural index = 0; index < particle->count; ++index) { particle->position [index] = deallocate (particle->position [index]); particle->target [index] = deallocate (particle->target [index]); particle->speed [index] = deallocate (particle->speed [index]); @@ -73,13 +73,13 @@ static particle_structure * particle_deinitialize (particle_structure * particle return (deallocate (particle)); } -static v0 particle_append (particle_structure * particle, u4 sprite, f4 life, u4 colour_in, u4 colour_out, vector_3 * position, +static procedure particle_append (particle_structure * particle, natural sprite, real life, natural colour_in, natural colour_out, vector_3 * position, vector_3 * target, vector_3 * speed) { if (particle->count + 1 >= particle->limit) return; ++particle->count; - u4 current = particle->count - 1; + natural current = particle->count - 1; particle->sprite [current] = sprite; particle->life [current] = life; @@ -91,17 +91,17 @@ static v0 particle_append (particle_structure * particle, u4 sprite, f4 life, u4 vector_3_copy (particle->speed [current], speed); } -static v0 particle_switch (particle_structure * particle, u4 this, u4 with) { - uint_exchange (& particle->sprite [this], & particle->sprite [with]); - float_exchange (& particle->life [this], & particle->life [with]); - uint_exchange (& particle->colour_in [this], & particle->colour_in [with]); - uint_exchange (& particle->colour_out [this], & particle->colour_out [with]); +static procedure particle_switch (particle_structure * particle, natural this, natural with) { + exchange_natural (& particle->sprite [this], & particle->sprite [with]); + exchange_real (& particle->life [this], & particle->life [with]); + exchange_natural (& particle->colour_in [this], & particle->colour_in [with]); + exchange_natural (& particle->colour_out [this], & particle->colour_out [with]); vector_3_exchange ( particle->position [this], particle->position [with]); vector_3_exchange ( particle->target [this], particle->target [with]); vector_3_exchange ( particle->speed [this], particle->speed [with]); } -static v0 particle_remove (particle_structure * particle, u4 index) { +static procedure particle_remove (particle_structure * particle, natural index) { if (index >= particle->count) return; particle_switch (particle, index, particle->count - 1); @@ -109,55 +109,55 @@ static v0 particle_remove (particle_structure * particle, u4 index) { --particle->count; } -static v0 particle_effect_splash (particle_structure * particle, u4 sprite, f4 life, u4 colour_in, u4 colour_out, - vector_3 * position, u4 ray_count, f4 ray_force, f4 ray_error) { - for (u4 ray = 0; ray < ray_count; ++ray) { +static procedure particle_effect_splash (particle_structure * particle, natural sprite, real life, natural colour_in, natural colour_out, + vector_3 * position, natural ray_count, real ray_force, real ray_error) { + for (natural ray = 0; ray < ray_count; ++ray) { vector_3 target = { - //~position->x + frandomize (- ray_force, + ray_force), - //~position->y + frandomize (- ray_force, + ray_force), - //~position->z + frandomize (- ray_force, + ray_force) + frandomize (- ray_error, + ray_error) - //~frandomize (- ray_force, + ray_force), - //~frandomize (- ray_force, + ray_force), - //~frandomize (- ray_force, + ray_force) + //~position->x + random_real (- ray_force, + ray_force), + //~position->y + random_real (- ray_force, + ray_force), + //~position->z + random_real (- ray_force, + ray_force) + random_real (- ray_error, + ray_error) + //~random_real (- ray_force, + ray_force), + //~random_real (- ray_force, + ray_force), + //~random_real (- ray_force, + ray_force) 0.0f, 0.0f, 0.0f }; vector_3 speed = { - frandomize (- ray_force, + ray_force), - frandomize (- ray_force, + ray_force), - frandomize (- ray_force, + ray_force) + random_real (- ray_force, + ray_force), + random_real (- ray_force, + ray_force), + random_real (- ray_force, + ray_force) }; - life += frandomize (- 1.0f, + 1.0f); + life += random_real (- 1.0f, + 1.0f); particle_append (particle, sprite, life, colour_in, colour_out, position, & target, & speed); } } -static v0 particle_effect_evaporate (particle_structure * particle, u4 sprite, f4 life, u4 colour_in, u4 colour_out, - vector_3 * position, u4 ray_count, f4 ray_force, f4 ray_error) { - for (u4 ray = 0; ray < ray_count; ++ray) { +static procedure particle_effect_evaporate (particle_structure * particle, natural sprite, real life, natural colour_in, natural colour_out, + vector_3 * position, natural ray_count, real ray_force, real ray_error) { + for (natural ray = 0; ray < ray_count; ++ray) { vector_3 target = { - frandomize (0.0f, + ray_force / 6.0f), - frandomize (0.0f, + ray_force / 1.0f), - frandomize (0.0f, + ray_force / 6.0f), + random_real (0.0f, + ray_force / 6.0f), + random_real (0.0f, + ray_force / 1.0f), + random_real (0.0f, + ray_force / 6.0f), }; vector_3 speed = { - frandomize (- ray_force, + ray_force), - frandomize (- ray_force, + ray_force), - frandomize (- ray_force, + ray_force) + random_real (- ray_force, + ray_force), + random_real (- ray_force, + ray_force), + random_real (- ray_force, + ray_force) }; - life += frandomize (- 1.0f, + 1.0f); + life += random_real (- 1.0f, + 1.0f); particle_append (particle, sprite, life, colour_in, colour_out, position, & target, & speed); } } -static v0 particle_synchronize (particle_structure * particle, u4 framerate) { - for (u4 index = 0; index < particle->count; ++index) { - particle->life [index] -= 1.0f / (float) framerate; +static procedure particle_synchronize (particle_structure * particle, natural framerate) { + for (natural index = 0; index < particle->count; ++index) { + particle->life [index] -= 1.0f / (real) framerate; if (particle->life [index] < 0.0f) { particle_remove (particle, index); diff --git a/xatrix.h b/xatrix.h index 22f7eb6..7d497af 100644 --- a/xatrix.h +++ b/xatrix.h @@ -15,66 +15,60 @@ /// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License /// for more details, if you dare, it is a lot of text that nobody wants to read... -typedef f4 matrix_2 [2] [2]; -typedef f4 matrix_3 [3] [3]; -typedef f4 matrix_4 [4] [4]; +/// Description +/// +/// Xatrix, my tiny braindead unoptimized matrix library. Unlike vectors that use x, y, z and w structure fields, matrices are double array of +/// 32-bit floating point numbers, and they're accessed with integers, which should've been the same case with vectors, but mathematicians are +/// dumb sometimes (blame it on the one being older than the other one?). Again, nothing much to talk about here, learn linear algebra, include +/// this header file in your project, use it however you want, compilers might optimize this better than my vector library. This library isn't +/// intended for neural networks, as it's not generic, it can be used in simple CPU-based ray tracers and physics simulations. + +/// Nice 2D, 3D and 4D matrix structures. + +typedef real matrix_2 [2] [2]; /// Tiny 2x2 matrix. +typedef real matrix_3 [3] [3]; /// Tiny 3x3 matrix. +typedef real matrix_4 [4] [4]; /// Tiny 4x4 matrix. + +/// Assign values to 2D, 3D or 4D matrix and return address of that matrix. static matrix_2 * matrix_2_assign (matrix_2 * destination, - f4 m00, f4 m01, - f4 m10, f4 m11) { - destination [0] [0] = m00; - destination [0] [1] = m01; - destination [1] [0] = m10; - destination [1] [1] = m11; + real m00, real m01, + real m10, real m11) { + destination [0] [0] = m00; destination [0] [1] = m01; + destination [1] [0] = m10; destination [1] [1] = m11; return (destination); } static matrix_3 * matrix_3_assign (matrix_3 * destination, - f4 m00, f4 m01, f4 m02, - f4 m10, f4 m11, f4 m12, - f4 m20, f4 m21, f4 m22) { - destination [0] [0] = m00; - destination [0] [1] = m01; - destination [0] [2] = m02; - destination [1] [0] = m10; - destination [1] [1] = m11; - destination [1] [2] = m12; - destination [2] [0] = m20; - destination [2] [1] = m21; - destination [2] [2] = m22; + real m00, real m01, real m02, + real m10, real m11, real m12, + real m20, real m21, real m22) { + destination [0] [0] = m00; destination [0] [1] = m01; destination [0] [2] = m02; + destination [1] [0] = m10; destination [1] [1] = m11; destination [1] [2] = m12; + destination [2] [0] = m20; destination [2] [1] = m21; destination [2] [2] = m22; return (destination); } static matrix_4 * matrix_4_assign (matrix_4 * destination, - f4 m00, f4 m01, f4 m02, f4 m03, - f4 m10, f4 m11, f4 m12, f4 m13, - f4 m20, f4 m21, f4 m22, f4 m23, - f4 m30, f4 m31, f4 m32, f4 m33) { - destination [0] [0] = m00; - destination [0] [1] = m01; - destination [0] [2] = m02; - destination [0] [3] = m03; - destination [1] [0] = m10; - destination [1] [1] = m11; - destination [1] [2] = m12; - destination [1] [3] = m13; - destination [2] [0] = m20; - destination [2] [1] = m21; - destination [2] [2] = m22; - destination [2] [3] = m23; - destination [3] [0] = m30; - destination [3] [1] = m31; - destination [3] [2] = m32; - destination [3] [3] = m33; + real m00, real m01, real m02, real m03, + real m10, real m11, real m12, real m13, + real m20, real m21, real m22, real m23, + real m30, real m31, real m32, real m33) { + destination [0] [0] = m00; destination [0] [1] = m01; destination [0] [2] = m02; destination [0] [3] = m03; + destination [1] [0] = m10; destination [1] [1] = m11; destination [1] [2] = m12; destination [1] [3] = m13; + destination [2] [0] = m20; destination [2] [1] = m21; destination [2] [2] = m22; destination [2] [3] = m23; + destination [3] [0] = m30; destination [3] [1] = m31; destination [3] [2] = m32; destination [3] [3] = m33; return (destination); } +/// Nullify values of 2D, 3D or 4D matrix and return address of that matrix. + static matrix_2 * matrix_2_nullify (matrix_2 * destination) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = 0; column < 2; ++column) { + for (natural row = 0; row < 2; ++row) { + for (natural column = 0; column < 2; ++column) { destination [row] [column] = 0.0f; } } @@ -83,8 +77,8 @@ static matrix_2 * matrix_2_nullify (matrix_2 * destination) { } static matrix_3 * matrix_3_nullify (matrix_3 * destination) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { + for (natural row = 0; row < 3; ++row) { + for (natural column = 0; column < 3; ++column) { destination [row] [column] = 0.0f; } } @@ -93,8 +87,8 @@ static matrix_3 * matrix_3_nullify (matrix_3 * destination) { } static matrix_4 * matrix_4_nullify (matrix_4 * destination) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { + for (natural row = 0; row < 4; ++row) { + for (natural column = 0; column < 4; ++column) { destination [row] [column] = 0.0f; } } @@ -102,10 +96,12 @@ static matrix_4 * matrix_4_nullify (matrix_4 * destination) { return (destination); } +/// Identify values of 2D, 3D or 4D matrix and return address of that matrix. + static matrix_2 * matrix_2_identity (matrix_2 * destination) { destination = matrix_2_nullify (destination); - for (u4 index = 0; index < 2; ++index) { + for (natural index = 0; index < 2; ++index) { destination [index] [index] = 1.0f; } @@ -115,7 +111,7 @@ static matrix_2 * matrix_2_identity (matrix_2 * destination) { static matrix_3 * matrix_3_identity (matrix_3 * destination) { destination = matrix_3_nullify (destination); - for (u4 index = 0; index < 3; ++index) { + for (natural index = 0; index < 3; ++index) { destination [index] [index] = 1.0f; } @@ -125,60 +121,64 @@ static matrix_3 * matrix_3_identity (matrix_3 * destination) { static matrix_4 * matrix_4_identity (matrix_4 * destination) { destination = matrix_4_nullify (destination); - for (u4 index = 0; index < 4; ++index) { + for (natural index = 0; index < 4; ++index) { destination [index] [index] = 1.0f; } return (destination); } -static f4 matrix_2_determinant (matrix_2 * matrix) { - f4 a = matrix [0] [0] * matrix [1] [1]; - f4 b = matrix [0] [1] * matrix [1] [0]; +/// Return determinant of 2D, 3D or 4D matrix. + +static real matrix_2_determinant (matrix_2 * matrix) { + real a = matrix [0] [0] * matrix [1] [1]; + real b = matrix [0] [1] * matrix [1] [0]; return (a - b); } -static f4 matrix_3_determinant (matrix_3 * matrix) { +static real matrix_3_determinant (matrix_3 * matrix) { matrix_2 matrix_a = { { matrix [1] [1], matrix [1] [2] }, - { matrix [2] [1], matrix [2] [2] } }; + { matrix [2] [1], matrix [2] [2] } }; matrix_2 matrix_b = { { matrix [1] [0], matrix [1] [2] }, - { matrix [2] [0], matrix [2] [2] } }; + { matrix [2] [0], matrix [2] [2] } }; matrix_2 matrix_c = { { matrix [1] [0], matrix [1] [1] }, - { matrix [2] [0], matrix [2] [1] } }; + { matrix [2] [0], matrix [2] [1] } }; - f4 a = matrix [0] [0] * matrix_2_determinant (& matrix_a); - f4 b = matrix [0] [1] * matrix_2_determinant (& matrix_b); - f4 c = matrix [0] [2] * matrix_2_determinant (& matrix_c); + real a = matrix [0] [0] * matrix_2_determinant (& matrix_a); + real b = matrix [0] [1] * matrix_2_determinant (& matrix_b); + real c = matrix [0] [2] * matrix_2_determinant (& matrix_c); return (a - b + c); } -static f4 matrix_4_determinant (matrix_4 * matrix) { +static real matrix_4_determinant (matrix_4 * matrix) { matrix_3 matrix_a = { { matrix [1] [1], matrix [1] [2], matrix [1] [3] }, - { matrix [2] [1], matrix [2] [2], matrix [2] [3] }, - { matrix [3] [1], matrix [3] [2], matrix [3] [3] } }; + { matrix [2] [1], matrix [2] [2], matrix [2] [3] }, + { matrix [3] [1], matrix [3] [2], matrix [3] [3] } }; matrix_3 matrix_b = { { matrix [1] [0], matrix [1] [2], matrix [1] [3] }, - { matrix [2] [0], matrix [2] [2], matrix [2] [3] }, - { matrix [3] [0], matrix [3] [2], matrix [3] [3] } }; + { matrix [2] [0], matrix [2] [2], matrix [2] [3] }, + { matrix [3] [0], matrix [3] [2], matrix [3] [3] } }; matrix_3 matrix_c = { { matrix [1] [0], matrix [1] [1], matrix [1] [3] }, - { matrix [2] [0], matrix [2] [1], matrix [2] [3] }, - { matrix [3] [0], matrix [3] [1], matrix [3] [3] } }; + { matrix [2] [0], matrix [2] [1], matrix [2] [3] }, + { matrix [3] [0], matrix [3] [1], matrix [3] [3] } }; matrix_3 matrix_d = { { matrix [1] [0], matrix [1] [1], matrix [1] [2] }, - { matrix [2] [0], matrix [2] [1], matrix [2] [2] }, - { matrix [3] [0], matrix [3] [1], matrix [3] [2] } }; + { matrix [2] [0], matrix [2] [1], matrix [2] [2] }, + { matrix [3] [0], matrix [3] [1], matrix [3] [2] } }; - f4 a = matrix [0] [0] * matrix_3_determinant (& matrix_a); - f4 b = matrix [0] [1] * matrix_3_determinant (& matrix_b); - f4 c = matrix [0] [2] * matrix_3_determinant (& matrix_c); - f4 d = matrix [0] [3] * matrix_3_determinant (& matrix_d); + real a = matrix [0] [0] * matrix_3_determinant (& matrix_a); + real b = matrix [0] [1] * matrix_3_determinant (& matrix_b); + real c = matrix [0] [2] * matrix_3_determinant (& matrix_c); + real d = matrix [0] [3] * matrix_3_determinant (& matrix_d); return (a - b + c - d); } +/// Copy 2D, 3D or 4D source matrix into destination matrix. + static matrix_2 * matrix_2_copy (matrix_2 * destination, matrix_2 * source) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = 0; column < 2; ++column) { + for (natural row = 0; row < 2; ++row) { + for (natural column = 0; column < 2; ++column) { destination [row] [column] = source [row] [column]; } } @@ -187,8 +187,8 @@ static matrix_2 * matrix_2_copy (matrix_2 * destination, matrix_2 * source) { } static matrix_3 * matrix_3_copy (matrix_3 * destination, matrix_3 * source) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { + for (natural row = 0; row < 3; ++row) { + for (natural column = 0; column < 3; ++column) { destination [row] [column] = source [row] [column]; } } @@ -197,8 +197,8 @@ static matrix_3 * matrix_3_copy (matrix_3 * destination, matrix_3 * source) { } static matrix_4 * matrix_4_copy (matrix_4 * destination, matrix_4 * source) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { + for (natural row = 0; row < 4; ++row) { + for (natural column = 0; column < 4; ++column) { destination [row] [column] = source [row] [column]; } } @@ -206,9 +206,11 @@ static matrix_4 * matrix_4_copy (matrix_4 * destination, matrix_4 * source) { return (destination); } -static matrix_2 * matrix_2_scale (matrix_2 * destination, f4 scale) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = 0; column < 2; ++column) { +/// Scale 2D, 3D or 4D matrix by scalar value and return address of that matrix. + +static matrix_2 * matrix_2_scale (matrix_2 * destination, real scale) { + for (natural row = 0; row < 2; ++row) { + for (natural column = 0; column < 2; ++column) { destination [row] [column] *= scale; } } @@ -216,9 +218,9 @@ static matrix_2 * matrix_2_scale (matrix_2 * destination, f4 scale) { return (destination); } -static matrix_3 * matrix_3_scale (matrix_3 * destination, f4 scale) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { +static matrix_3 * matrix_3_scale (matrix_3 * destination, real scale) { + for (natural row = 0; row < 3; ++row) { + for (natural column = 0; column < 3; ++column) { destination [row] [column] *= scale; } } @@ -226,9 +228,9 @@ static matrix_3 * matrix_3_scale (matrix_3 * destination, f4 scale) { return (destination); } -static matrix_4 * matrix_4_scale (matrix_4 * destination, f4 scale) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { +static matrix_4 * matrix_4_scale (matrix_4 * destination, real scale) { + for (natural row = 0; row < 4; ++row) { + for (natural column = 0; column < 4; ++column) { destination [row] [column] *= scale; } } @@ -236,9 +238,11 @@ static matrix_4 * matrix_4_scale (matrix_4 * destination, f4 scale) { return (destination); } -static matrix_2 * matrix_2_scale_to (matrix_2 * destination, matrix_2 * source, f4 scale) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = 0; column < 2; ++column) { +/// Scale 2D, 3D or 4D source matrix by scalar value into destination matrix and return its address. + +static matrix_2 * matrix_2_scale_to (matrix_2 * destination, matrix_2 * source, real scale) { + for (natural row = 0; row < 2; ++row) { + for (natural column = 0; column < 2; ++column) { destination [row] [column] = source [row] [column] * scale; } } @@ -246,9 +250,9 @@ static matrix_2 * matrix_2_scale_to (matrix_2 * destination, matrix_2 * source, return (destination); } -static matrix_3 * matrix_3_scale_to (matrix_3 * destination, matrix_3 * source, f4 scale) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { +static matrix_3 * matrix_3_scale_to (matrix_3 * destination, matrix_3 * source, real scale) { + for (natural row = 0; row < 3; ++row) { + for (natural column = 0; column < 3; ++column) { destination [row] [column] = source [row] [column] * scale; } } @@ -256,9 +260,9 @@ static matrix_3 * matrix_3_scale_to (matrix_3 * destination, matrix_3 * source, return (destination); } -static matrix_4 * matrix_4_scale_to (matrix_4 * destination, matrix_4 * source, f4 scale) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { +static matrix_4 * matrix_4_scale_to (matrix_4 * destination, matrix_4 * source, real scale) { + for (natural row = 0; row < 4; ++row) { + for (natural column = 0; column < 4; ++column) { destination [row] [column] = source [row] [column] * scale; } } @@ -266,9 +270,11 @@ static matrix_4 * matrix_4_scale_to (matrix_4 * destination, matrix_4 * source, return (destination); } +/// Add 2D, 3D or 4D source matrix onto destination matrix and return address of destination matrix. + static matrix_2 * matrix_2_add (matrix_2 * destination, matrix_2 * source) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = 0; column < 2; ++column) { + for (natural row = 0; row < 2; ++row) { + for (natural column = 0; column < 2; ++column) { destination [row] [column] += source [row] [column]; } } @@ -277,8 +283,8 @@ static matrix_2 * matrix_2_add (matrix_2 * destination, matrix_2 * source) { } static matrix_3 * matrix_3_add (matrix_3 * destination, matrix_3 * source) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { + for (natural row = 0; row < 3; ++row) { + for (natural column = 0; column < 3; ++column) { destination [row] [column] += source [row] [column]; } } @@ -287,8 +293,8 @@ static matrix_3 * matrix_3_add (matrix_3 * destination, matrix_3 * source) { } static matrix_4 * matrix_4_add (matrix_4 * destination, matrix_4 * source) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { + for (natural row = 0; row < 4; ++row) { + for (natural column = 0; column < 4; ++column) { destination [row] [column] += source [row] [column]; } } @@ -296,9 +302,11 @@ static matrix_4 * matrix_4_add (matrix_4 * destination, matrix_4 * source) { return (destination); } +/// Add two 2D, 3D or 4D matrices into destination matrix and return address of destination matrix. + static matrix_2 * matrix_2_add_to (matrix_2 * destination, matrix_2 * matrix_a, matrix_2 * matrix_b) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = 0; column < 2; ++column) { + for (natural row = 0; row < 2; ++row) { + for (natural column = 0; column < 2; ++column) { destination [row] [column] = matrix_a [row] [column] + matrix_b [row] [column]; } } @@ -307,8 +315,8 @@ static matrix_2 * matrix_2_add_to (matrix_2 * destination, matrix_2 * matrix_a, } static matrix_3 * matrix_3_add_to (matrix_3 * destination, matrix_3 * matrix_a, matrix_3 * matrix_b) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { + for (natural row = 0; row < 3; ++row) { + for (natural column = 0; column < 3; ++column) { destination [row] [column] = matrix_a [row] [column] + matrix_b [row] [column]; } } @@ -317,8 +325,8 @@ static matrix_3 * matrix_3_add_to (matrix_3 * destination, matrix_3 * matrix_a, } static matrix_4 * matrix_4_add_to (matrix_4 * destination, matrix_4 * matrix_a, matrix_4 * matrix_b) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { + for (natural row = 0; row < 4; ++row) { + for (natural column = 0; column < 4; ++column) { destination [row] [column] = matrix_a [row] [column] + matrix_b [row] [column]; } } @@ -326,9 +334,11 @@ static matrix_4 * matrix_4_add_to (matrix_4 * destination, matrix_4 * matrix_a, return (destination); } +/// Subtract 2D, 3D or 4D source matrix from destination matrix and return address of destination matrix. + static matrix_2 * matrix_2_subtract (matrix_2 * destination, matrix_2 * source) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = 0; column < 2; ++column) { + for (natural row = 0; row < 2; ++row) { + for (natural column = 0; column < 2; ++column) { destination [row] [column] -= source [row] [column]; } } @@ -337,8 +347,8 @@ static matrix_2 * matrix_2_subtract (matrix_2 * destination, matrix_2 * source) } static matrix_3 * matrix_3_subtract (matrix_3 * destination, matrix_3 * source) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { + for (natural row = 0; row < 3; ++row) { + for (natural column = 0; column < 3; ++column) { destination [row] [column] -= source [row] [column]; } } @@ -347,8 +357,8 @@ static matrix_3 * matrix_3_subtract (matrix_3 * destination, matrix_3 * source) } static matrix_4 * matrix_4_subtract (matrix_4 * destination, matrix_4 * source) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { + for (natural row = 0; row < 4; ++row) { + for (natural column = 0; column < 4; ++column) { destination [row] [column] -= source [row] [column]; } } @@ -356,9 +366,11 @@ static matrix_4 * matrix_4_subtract (matrix_4 * destination, matrix_4 * source) return (destination); } +/// Subtract two 2D, 3D or 4D matrices, save values into destination matrix and return address of destination matrix. + static matrix_2 * matrix_2_subtract_to (matrix_2 * destination, matrix_2 * matrix_a, matrix_2 * matrix_b) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = 0; column < 2; ++column) { + for (natural row = 0; row < 2; ++row) { + for (natural column = 0; column < 2; ++column) { destination [row] [column] = matrix_a [row] [column] - matrix_b [row] [column]; } } @@ -367,8 +379,8 @@ static matrix_2 * matrix_2_subtract_to (matrix_2 * destination, matrix_2 * matri } static matrix_3 * matrix_3_subtract_to (matrix_3 * destination, matrix_3 * matrix_a, matrix_3 * matrix_b) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { + for (natural row = 0; row < 3; ++row) { + for (natural column = 0; column < 3; ++column) { destination [row] [column] = matrix_a [row] [column] - matrix_b [row] [column]; } } @@ -377,8 +389,8 @@ static matrix_3 * matrix_3_subtract_to (matrix_3 * destination, matrix_3 * matri } static matrix_4 * matrix_4_subtract_to (matrix_4 * destination, matrix_4 * matrix_a, matrix_4 * matrix_b) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { + for (natural row = 0; row < 4; ++row) { + for (natural column = 0; column < 4; ++column) { destination [row] [column] = matrix_a [row] [column] - matrix_b [row] [column]; } } @@ -386,12 +398,14 @@ static matrix_4 * matrix_4_subtract_to (matrix_4 * destination, matrix_4 * matri return (destination); } +/// Multiply two 2D, 3D or 4D matrices, save values into destination matrix and return address of destination matrix. + static matrix_2 * matrix_2_multiply (matrix_2 * result, matrix_2 * matrix_a, matrix_2 * matrix_b) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = 0; column < 2; ++column) { + for (natural row = 0; row < 2; ++row) { + for (natural column = 0; column < 2; ++column) { result [row] [column] = 0.0f; - for (u4 index = 0; index < 2; ++index) { + for (natural index = 0; index < 2; ++index) { result [row] [column] += matrix_a [row] [index] * matrix_b [index] [column]; } } @@ -401,11 +415,11 @@ static matrix_2 * matrix_2_multiply (matrix_2 * result, matrix_2 * matrix_a, mat } static matrix_3 * matrix_3_multiply (matrix_3 * result, matrix_3 * matrix_a, matrix_3 * matrix_b) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { + for (natural row = 0; row < 3; ++row) { + for (natural column = 0; column < 3; ++column) { result [row] [column] = 0.0f; - for (u4 index = 0; index < 3; ++index) { + for (natural index = 0; index < 3; ++index) { result [row] [column] += matrix_a [row] [index] * matrix_b [index] [column]; } } @@ -415,11 +429,11 @@ static matrix_3 * matrix_3_multiply (matrix_3 * result, matrix_3 * matrix_a, mat } static matrix_4 * matrix_4_multiply (matrix_4 * result, matrix_4 * matrix_a, matrix_4 * matrix_b) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { + for (natural row = 0; row < 4; ++row) { + for (natural column = 0; column < 4; ++column) { result [row] [column] = 0.0f; - for (u4 index = 0; index < 4; ++index) { + for (natural index = 0; index < 4; ++index) { result [row] [column] += matrix_a [row] [index] * matrix_b [index] [column]; } } @@ -428,21 +442,25 @@ static matrix_4 * matrix_4_multiply (matrix_4 * result, matrix_4 * matrix_a, mat return (result); } -static f4 matrix_2_trace (matrix_2 * matrix) { +/// Return trace of 2D, 3D or 4D matrix. + +static real matrix_2_trace (matrix_2 * matrix) { return (matrix [0] [0] + matrix [1] [1]); } -static f4 matrix_3_trace (matrix_3 * matrix) { +static real matrix_3_trace (matrix_3 * matrix) { return (matrix [0] [0] + matrix [1] [1] + matrix [2] [2]); } -static f4 matrix_4_trace (matrix_4 * matrix) { +static real matrix_4_trace (matrix_4 * matrix) { return (matrix [0] [0] + matrix [1] [1] + matrix [2] [2] + matrix [3] [3]); } -static b4 matrix_2_compare (matrix_2 * matrix_a, matrix_2 * matrix_b) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = 0; column < 2; ++column) { +/// Compare if two 2D, 3D or 4D matrices are identical and return boolean value of it. + +static boolean matrix_2_compare (matrix_2 * matrix_a, matrix_2 * matrix_b) { + for (natural row = 0; row < 2; ++row) { + for (natural column = 0; column < 2; ++column) { if (matrix_a [row] [column] != matrix_b [row] [column]) { return (false); } @@ -452,9 +470,9 @@ static b4 matrix_2_compare (matrix_2 * matrix_a, matrix_2 * matrix_b) { return (true); } -static b4 matrix_3_compare (matrix_3 * matrix_a, matrix_3 * matrix_b) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { +static boolean matrix_3_compare (matrix_3 * matrix_a, matrix_3 * matrix_b) { + for (natural row = 0; row < 3; ++row) { + for (natural column = 0; column < 3; ++column) { if (matrix_a [row] [column] != matrix_b [row] [column]) { return (false); } @@ -464,9 +482,9 @@ static b4 matrix_3_compare (matrix_3 * matrix_a, matrix_3 * matrix_b) { return (true); } -static b4 matrix_4_compare (matrix_4 * matrix_a, matrix_4 * matrix_b) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { +static boolean matrix_4_compare (matrix_4 * matrix_a, matrix_4 * matrix_b) { + for (natural row = 0; row < 4; ++row) { + for (natural column = 0; column < 4; ++column) { if (matrix_a [row] [column] != matrix_b [row] [column]) { return (false); } @@ -475,36 +493,3 @@ static b4 matrix_4_compare (matrix_4 * matrix_a, matrix_4 * matrix_b) { return (true); } - -static v0 matrix_2_transpose (matrix_2 * matrix_a, matrix_2 * matrix_b) { - for (u4 row = 0; row < 2; ++row) { - for (u4 column = row + 1; column < 2; ++column) { - f4 temporary = matrix_a [row] [column]; - - matrix_a [row] [column] = matrix_b [column] [row]; - matrix_b [column] [row] = temporary; - } - } -} - -static v0 matrix_3_transpose (matrix_3 * matrix_a, matrix_3 * matrix_b) { - for (u4 row = 0; row < 3; ++row) { - for (u4 column = 0; column < 3; ++column) { - f4 temporary = matrix_a [row] [column]; - - matrix_a [row] [column] = matrix_b [column] [row]; - matrix_b [column] [row] = temporary; - } - } -} - -static v0 matrix_4_transpose (matrix_4 * matrix_a, matrix_4 * matrix_b) { - for (u4 row = 0; row < 4; ++row) { - for (u4 column = 0; column < 4; ++column) { - f4 temporary = matrix_a [row] [column]; - - matrix_a [row] [column] = matrix_b [column] [row]; - matrix_b [column] [row] = temporary; - } - } -} diff --git a/xcript.h b/xcript.h index 9c0bd4f..9651135 100755 --- a/xcript.h +++ b/xcript.h @@ -16,89 +16,130 @@ /// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License /// for more details, if you dare, it is a lot of text that nobody wants to read... +/// Description +/// +/// Xcript, autistic whitespace insignificant INI/CFG-like script parser. What else to say? Usage is more complex, this library is good for +/// defining data in configuration files that corresponds with hardcoded variables or structure fields. More elaborate examples are in my other +/// programs such as Xhads and Xhallenge for now, this will be used in few more projects that I planned. +/// +/// Since this is single header library, just include it in your C source file, no need to use any stb-like macros for it as it was intended to +/// be used in projects with only one source file. After that, you want to initialize some structures and open some files, it'll be more clear as +/// you continue reading "documentation" below. I still think it's better to check out two projects mentioned above tho. + +/// Enumeration of scripts syntax elements. + typedef enum { script_unknown, script_comment, script_string, script_number, script_marker, script_header, script_assign, script_end, script_from, script_to, script_next -} script_word_type; +} script_word_enumeration; + +/// Script data structure, you want to define one per file you open, usage will be explained belo, they work one string per time. +/// +/// script_data_structure * script = null; typedef struct { - c1 * path; - c1 * source; - u4 prefix; - u4 length; - u4 suffix; - u4 offset; - u4 line; - u4 last_length; - c1 * last_string; - b4 force; - b4 range; -} script_structure; + character * path; /// File path for the script used in warnings and failures. + character * source; /// Raw character data imported from that file. + natural prefix; /// Amount of ignored characters before last string. + natural length; /// Amount of detected characters in last string. + natural suffix; /// Amount of ignored characters after last string. + natural offset; /// Offset inside script file data. + natural line; /// Currently active line in script file. + natural last_length; /// Length of last selected string. + character * last_string; /// Address of first character of last selected string. + boolean force; /// Reserved for future use... + boolean range; /// Boolean value for ranged expressions. +} script_data_structure; + +/// Script structure containing global data, you want to have one per parsing unit, often one per entire project. +/// +/// script_structure * information = null; typedef struct { - u4 counter; - c1 * * identifier; - u4 * index; -} script_information; + natural counter; /// Identifier count. + character * * identifier; /// Array of identifier strings. + natural * index; /// Array of identifier indices. +} script_structure; -static v0 script_warning (script_structure * script, b4 condition, c1 * message) { +/// Print a warning message if condition was true, otherwise continue parsing the script, minor errors should be warnings. +/// +/// script_warning (script, name_defined == true, "Marker 'name' already defined."); + +static procedure script_warning (script_data_structure * script, boolean condition, character * message) { if (condition == true) { - print ("[/3Warning/-] %s: %i: %s\n", script->path, script->line, message); + print ("/w %s: %i: %s\n", script->path, script->line, message); } } -static v0 script_failure (script_structure * script, b4 condition, c1 * message) { - if (condition == true) { - print ("[/1Failure/-] %s: %i: %s\n", script->path, script->line, message); +/// Print a failure message and exit program if condition was true, otherwise continue parsing the script, major errors should be failures. +/// +/// script_failure (script, name_defined == true, "Marker 'name' already defined."); - print ("/1%s/-", & script->source [script->offset]); +static procedure script_failure (script_data_structure * script, boolean condition, character * message) { + if (condition == true) { + print ("/f %s: %i: %s\n", script->path, script->line, message); exit (log_failure); } } -static script_structure * script_open (c1 * path) { - script_structure * script = allocate (sizeof (* script)); +/// Initialize script data structure, by allocating memory for it, importing raw data from file path, and set other important fields. +/// +/// script = script_open ("script.cfg"); + +static script_data_structure * script_open (character * path) { + script_data_structure * script = allocate (sizeof (* script)); script->path = string_duplicate (path); script->source = file_import (path); - script->prefix = 0; - script->length = 0; - script->suffix = 0; - script->offset = 0; script->line = 1; - script->last_length = 0; script->last_string = & script->source [0]; return (script); } -static script_structure * script_close (script_structure * script) { +/// Deinitialize script data structure, by deallocating memory used in it. +/// +/// script = script_close (script); + +static script_data_structure * script_close (script_data_structure * script) { script->path = deallocate (script->path); script->source = deallocate (script->source); return (deallocate (script)); } -static b4 script_compare (script_structure * script, c1 * string) { +/// Compare certain null terminated string with last selected string from script. + +static boolean script_compare (script_data_structure * script, character * string) { return (string_compare_limit (string, script->last_string, script->last_length)); } -static b4 script_check (script_information * information, u4 index, c1 * identifier) { +/// Compare certain null terminated string with identifier from script structure selected by index. + +static boolean script_check (script_structure * information, natural index, character * identifier) { return (string_compare (identifier, information->identifier [index])); } -static c1 * script_export_string (script_structure * script) { +/// Return duplicate of last selected string from script. This will allocate memory that you have to free later. + +static character * script_export_string (script_data_structure * script) { return (string_duplicate_limit (script->last_string, script->last_length)); } -static u4 script_export_number (script_structure * script) { +/// Return duplicate of last selected number from script. + +static natural script_export_number (script_data_structure * script) { return (string_limit_to_number (script->last_string, script->last_length)); } -static u4 script_export_marker (script_information * information, script_structure * script) { - for (u4 counter = 0; counter < information->counter; ++counter) { +/// Return identifier index of last selected string from script, if it's not identified, this function will exit program (fatal failure). I want +/// strict error checking in my programs, only in parts where I encountered tiny mistakes that were more difficult to debug (took more than 30 +/// seconds). This code is under GNU/GPLv3 license, you can modify it as long as you're in the frame of the license. + +static natural script_export_marker (script_structure * information, script_data_structure * script) { + for (natural counter = 0; counter < information->counter; ++counter) { if (script_compare (script, information->identifier [counter]) == true) { return (information->index [counter]); } @@ -109,8 +150,10 @@ static u4 script_export_marker (script_information * information, script_structu return (~ 0u); } -static script_word_type script_parser (script_structure * script) { - script_word_type word = script_unknown; +/// Big big badass bug, function that does all the parsing, I don't even want to explain how it works, it's obvious from reading. Good luck. + +static script_word_enumeration script_parser (script_data_structure * script) { + script_word_enumeration word = script_unknown; script->prefix = 0; script->length = 0; @@ -207,7 +250,11 @@ static script_word_type script_parser (script_structure * script) { return (word); } -static c1 * script_expect_header (script_information * information, script_structure * script, u4 index, b4 accept) { +/// Okay, if you're not scared by the abomination written above, lets continue. This function checks for header in script file. That's the small +/// part of file containing "[foo_bar]" text. If variable 'accept' is true, it'll add that identifier into script structure, otherwise it'll just +/// return that string, which can be ignored or processed further. + +static character * script_expect_header (script_structure * information, script_data_structure * script, natural index, boolean accept) { if (accept == true) { ++information->counter; @@ -221,8 +268,10 @@ static c1 * script_expect_header (script_information * information, script_struc return (script_export_string (script)); } -static c1 * script_expect_string (script_structure * script) { - script_word_type word = script_unknown; +/// This function checks for string, if you want your configuration data to be string, this will check for it. + +static character * script_expect_string (script_data_structure * script) { + script_word_enumeration word = script_unknown; script_failure (script, (word = script_parser (script)) != script_assign, "Expected '=', assignment operator."); script_failure (script, (word = script_parser (script)) != script_string, "Expected string literal."); @@ -230,8 +279,10 @@ static c1 * script_expect_string (script_structure * script) { return (script_export_string (script)); } -static u4 script_expect_number (script_structure * script) { - script_word_type word = script_unknown; +/// This function checks for number, if you want your configuration data to be number, this will check for it again. No floating point numbers! + +static natural script_expect_number (script_data_structure * script) { + script_word_enumeration word = script_unknown; script_failure (script, (word = script_parser (script)) != script_assign, "Expected '=', assignment operator."); script_failure (script, (word = script_parser (script)) != script_number, "Expected number literal."); @@ -239,8 +290,10 @@ static u4 script_expect_number (script_structure * script) { return (script_export_number (script)); } -static u4 script_expect_marker (script_information * information, script_structure * script) { - script_word_type word = script_unknown; +/// This function checks for marker, this should be previously defined identifier, also known as header string. + +static natural script_expect_marker (script_structure * information, script_data_structure * script) { + script_word_enumeration word = script_unknown; script_failure (script, (word = script_parser (script)) != script_assign, "Expected '=', assignment operator."); script_failure (script, (word = script_parser (script)) != script_marker, "Expected marker literal."); @@ -248,8 +301,10 @@ static u4 script_expect_marker (script_information * information, script_structu return (script_export_marker (information, script)); } -static u4 script_expect_number_or_marker (script_information * information, script_structure * script) { - script_word_type word = script_unknown; +/// This function checks for number or marker, but not string, sometimes you want to use hardcoded enumerations in configuration files. + +static natural script_expect_number_or_marker (script_structure * information, script_data_structure * script) { + script_word_enumeration word = script_unknown; script_failure (script, (word = script_parser (script)) != script_assign, "Expected '=', assignment operator."); @@ -266,11 +321,13 @@ static u4 script_expect_number_or_marker (script_information * information, scri return (~ 0u); } -static u4 * script_expect_ordered_array (script_information * information, script_structure * script, u4 * count) { - script_word_type word = script_unknown; +/// Warning: I don't know how to really explain this... + +static natural * script_expect_ordered_array (script_structure * information, script_data_structure * script, natural * count) { + script_word_enumeration word = script_unknown; - u4 found = 0; - u4 * array = null; + natural found = 0; + natural * array = null; script_failure (script, (word = script_parser (script)) != script_assign, "Expected '=', assignment operator."); script_failure (script, (word = script_parser (script)) != script_from, "Expected '(', begin range operator."); @@ -299,16 +356,18 @@ static u4 * script_expect_ordered_array (script_information * information, scrip return (array); } -static u4 * script_expect_unordered_array (script_information * information, script_structure * script, u4 count) { - script_word_type word = script_unknown; +/// Warning: I don't know how to really explain this... + +static natural * script_expect_unordered_array (script_structure * information, script_data_structure * script, natural count) { + script_word_enumeration word = script_unknown; - u4 * array = allocate (count * sizeof (* array)); + natural * array = allocate (count * sizeof (* array)); script_failure (script, (word = script_parser (script)) != script_assign, "Expected '=', assignment operator."); script_failure (script, (word = script_parser (script)) != script_from, "Expected '(', begin range operator."); for (word = script_parser (script); word != script_to; word = script_parser (script)) { - u4 index = script_export_marker (information, script); + natural index = script_export_marker (information, script); script_failure (script, word != script_marker, "Expected ranged marker."); @@ -333,12 +392,18 @@ static u4 * script_expect_unordered_array (script_information * information, scr return (array); } -static script_information * script_initialize (c1 * general_script_file_path) { - script_information * script = allocate (sizeof (* script)); +/// Initialize script structure by importing basic headers from general script file. This is where things get complex. Everyscript parser needs +/// to have main, general script, that's not an empty file! Consider this an entry point of all scripts, since this script parser assumes +/// there'll be thousands of tiny configuration files (scripts!), but you can also use only one script if you wanted. +/// +/// script = script_initialize ("general.cfg"); - script_word_type word = script_unknown; +static script_structure * script_initialize (character * general_script_file_path) { + script_structure * script = allocate (sizeof (* script)); - script_structure * general = script_open (general_script_file_path); + script_word_enumeration word = script_unknown; + + script_data_structure * general = script_open (general_script_file_path); for (word = script_parser (general); word != script_end; word = script_parser (general)) { if (word == script_header) { @@ -359,8 +424,12 @@ static script_information * script_initialize (c1 * general_script_file_path) { return (script); } -static script_information * script_deinitialize (script_information * script) { - for (u4 index = 0; index < script->counter; ++index) { +/// Deinitialize script structure by deallocating all identifier data. You can clean up stuff at program exit point, or after reading the script. +/// +/// script = script_deinitialize (script); + +static script_structure * script_deinitialize (script_structure * script) { + for (natural index = 0; index < script->counter; ++index) { script->identifier [index] = deallocate (script->identifier [index]); } @@ -370,8 +439,10 @@ static script_information * script_deinitialize (script_information * script) { return (deallocate (script)); } -static u4 script_indexer (script_information * information, c1 * identifier) { - for (u4 counter = 0; counter < information->counter; ++counter) { +/// This function is similar to 'script_export_marker', but it compares identifier string, then returns index if it was found. + +static natural script_indexer (script_structure * information, character * identifier) { + for (natural counter = 0; counter < information->counter; ++counter) { if (string_compare (identifier, information->identifier [counter]) == true) { return (information->index [counter]); } diff --git a/xctree.h b/xctree.h index bce08e9..5a2211c 100644 --- a/xctree.h +++ b/xctree.h @@ -16,8 +16,8 @@ /// for more details, if you dare, it is a lot of text that nobody wants to read... typedef struct { - b4 division; - f4 scale; + boolean division; + real scale; vector_3 * * vertex; vector_3 * origin; vector_3 * offset; @@ -26,7 +26,7 @@ typedef struct { } octree_node; typedef struct { - u4 count; - u4 limit; + natural count; + natural limit; octree_node * * array; } octree_structure; diff --git a/xector.h b/xector.h index 43d680b..343a29d 100755 --- a/xector.h +++ b/xector.h @@ -15,26 +15,44 @@ /// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License /// for more details, if you dare, it is a lot of text that nobody wants to read... +/// Description +/// +/// Xector (Vector), my small vector library, not to be confused with my older project Xector (Sector) which was for procedurally generating 3D +/// models (based on boolean operations on 3D sectors). This library isn't optimized for performance or memory usage, instead it's for my own +/// preferred programming style. It's hard to explain linear algebra to people who don't already know it (for me at least), so I won't do that, +/// function names should provide you enough information. There'll be simple comments for the sake of consistency with my other libraries. +/// +/// If you want to use "good" linear algebra library, prefer CGLM over this, and GLM if you're into C++ rather than objectively better language +/// called C. Again, reading comments in this file is useless. Include it, set the vectors, do the work. + +/// 2D vector structure. + typedef struct { - f4 x, y; + real x, y; /// Two 32-bit floating point numbers. } vector_2; +/// 3D vector structure. + typedef struct { - f4 x, y, z; + real x, y, z; /// Three 32-bit floating point numbers. } vector_3; +/// 4D vector structure. + typedef struct { - f4 x, y, z, w; + real x, y, z, w; /// Why the hell did they choose to start from 'x', and end with 'z', it's so retarded. } vector_4; -static vector_2 * vector_2_assign (vector_2 * destination, f4 x, f4 y) { +/// Assign values to 2D, 3D or 4D vector and return address of that vector. + +static vector_2 * vector_2_assign (vector_2 * destination, real x, real y) { destination->x = x; destination->y = y; return (destination); } -static vector_3 * vector_3_assign (vector_3 * destination, f4 x, f4 y, f4 z) { +static vector_3 * vector_3_assign (vector_3 * destination, real x, real y, real z) { destination->x = x; destination->y = y; destination->z = z; @@ -42,7 +60,7 @@ static vector_3 * vector_3_assign (vector_3 * destination, f4 x, f4 y, f4 z) { return (destination); } -static vector_4 * vector_4_assign (vector_4 * destination, f4 x, f4 y, f4 z, f4 w) { +static vector_4 * vector_4_assign (vector_4 * destination, real x, real y, real z, real w) { destination->x = x; destination->y = y; destination->z = z; @@ -51,6 +69,8 @@ static vector_4 * vector_4_assign (vector_4 * destination, f4 x, f4 y, f4 z, f4 return (destination); } +/// Nullify values of 2D, 3D or 4D vector and return address of that vector. + static vector_2 * vector_2_nullify (vector_2 * destination) { destination->x = destination->y = 0.0f; @@ -69,32 +89,36 @@ static vector_4 * vector_4_nullify (vector_4 * destination) { return (destination); } -static f4 vector_2_length (vector_2 * vector) { - f4 x = vector->x; - f4 y = vector->y; +/// Return length of 2D, 3D or 4D vector. + +static real vector_2_length (vector_2 * vector) { + real x = vector->x; + real y = vector->y; return (square_root (x * x + y * y)); } -static f4 vector_3_length (vector_3 * vector) { - f4 x = vector->x; - f4 y = vector->y; - f4 z = vector->z; +static real vector_3_length (vector_3 * vector) { + real x = vector->x; + real y = vector->y; + real z = vector->z; return (square_root (x * x + y * y + z * z)); } -static f4 vector_4_length (vector_4 * vector) { - f4 x = vector->x; - f4 y = vector->y; - f4 z = vector->z; - f4 w = vector->w; +static real vector_4_length (vector_4 * vector) { + real x = vector->x; + real y = vector->y; + real z = vector->z; + real w = vector->w; return (square_root (x * x + y * y + z * z + w * w)); } +/// Normalize 2D, 3D or 4D vector and return address of that vector. + static vector_2 * vector_2_normalize (vector_2 * destination) { - f4 length = vector_2_length (destination); + real length = vector_2_length (destination); destination->x /= length; destination->y /= length; @@ -103,7 +127,7 @@ static vector_2 * vector_2_normalize (vector_2 * destination) { } static vector_3 * vector_3_normalize (vector_3 * destination) { - f4 length = vector_3_length (destination); + real length = vector_3_length (destination); destination->x /= length; destination->y /= length; @@ -113,7 +137,7 @@ static vector_3 * vector_3_normalize (vector_3 * destination) { } static vector_4 * vector_4_normalize (vector_4 * destination) { - f4 length = vector_4_length (destination); + real length = vector_4_length (destination); destination->x /= length; destination->y /= length; @@ -123,8 +147,10 @@ static vector_4 * vector_4_normalize (vector_4 * destination) { return (destination); } +/// Normalize 2D, 3D or 4D source vector into destination vector and return its address. + static vector_2 * vector_2_normalize_to (vector_2 * destination, vector_2 * source) { - f4 length = vector_2_length (source); + real length = vector_2_length (source); destination->x = source->x / length; destination->y = source->y / length; @@ -133,7 +159,7 @@ static vector_2 * vector_2_normalize_to (vector_2 * destination, vector_2 * sour } static vector_3 * vector_3_normalize_to (vector_3 * destination, vector_3 * source) { - f4 length = vector_3_length (source); + real length = vector_3_length (source); destination->x = source->x / length; destination->y = source->y / length; @@ -143,7 +169,7 @@ static vector_3 * vector_3_normalize_to (vector_3 * destination, vector_3 * sour } static vector_4 * vector_4_normalize_to (vector_4 * destination, vector_4 * source) { - f4 length = vector_4_length (source); + real length = vector_4_length (source); destination->x = source->x / length; destination->y = source->y / length; @@ -153,6 +179,8 @@ static vector_4 * vector_4_normalize_to (vector_4 * destination, vector_4 * sour return (destination); } +/// Copy 2D, 3D or 4D source vector into destination vector. + static vector_2 * vector_2_copy (vector_2 * destination, vector_2 * source) { destination->x = source->x; destination->y = source->y; @@ -177,32 +205,36 @@ static vector_4 * vector_4_copy (vector_4 * destination, vector_4 * source) { return (destination); } -static v0 vector_2_exchange (vector_2 * vector_a, vector_2 * vector_b) { - float_exchange (& vector_a->x, & vector_b->x); - float_exchange (& vector_a->y, & vector_b->y); +/// Exchange values of two 2D, 3D or 4D vectors. + +static procedure vector_2_exchange (vector_2 * vector_a, vector_2 * vector_b) { + exchange_real (& vector_a->x, & vector_b->x); + exchange_real (& vector_a->y, & vector_b->y); } -static v0 vector_3_exchange (vector_3 * vector_a, vector_3 * vector_b) { - float_exchange (& vector_a->x, & vector_b->x); - float_exchange (& vector_a->y, & vector_b->y); - float_exchange (& vector_a->z, & vector_b->z); +static procedure vector_3_exchange (vector_3 * vector_a, vector_3 * vector_b) { + exchange_real (& vector_a->x, & vector_b->x); + exchange_real (& vector_a->y, & vector_b->y); + exchange_real (& vector_a->z, & vector_b->z); } -static v0 vector_4_exchange (vector_4 * vector_a, vector_4 * vector_b) { - float_exchange (& vector_a->x, & vector_b->x); - float_exchange (& vector_a->y, & vector_b->y); - float_exchange (& vector_a->z, & vector_b->z); - float_exchange (& vector_a->w, & vector_b->w); +static procedure vector_4_exchange (vector_4 * vector_a, vector_4 * vector_b) { + exchange_real (& vector_a->x, & vector_b->x); + exchange_real (& vector_a->y, & vector_b->y); + exchange_real (& vector_a->z, & vector_b->z); + exchange_real (& vector_a->w, & vector_b->w); } -static vector_2 * vector_2_scale (vector_2 * destination, f4 scale) { +/// Scale 2D, 3D or 4D vector by scalar value and return address of that vector. + +static vector_2 * vector_2_scale (vector_2 * destination, real scale) { destination->x *= scale; destination->y *= scale; return (destination); } -static vector_3 * vector_3_scale (vector_3 * destination, f4 scale) { +static vector_3 * vector_3_scale (vector_3 * destination, real scale) { destination->x *= scale; destination->y *= scale; destination->z *= scale; @@ -210,7 +242,7 @@ static vector_3 * vector_3_scale (vector_3 * destination, f4 scale) { return (destination); } -static vector_4 * vector_4_scale (vector_4 * destination, f4 scale) { +static vector_4 * vector_4_scale (vector_4 * destination, real scale) { destination->x *= scale; destination->y *= scale; destination->z *= scale; @@ -219,14 +251,16 @@ static vector_4 * vector_4_scale (vector_4 * destination, f4 scale) { return (destination); } -static vector_2 * vector_2_scale_to (vector_2 * destination, vector_2 * source, f4 scale) { +/// Scale 2D, 3D or 4D source vector by scalar value into destination vector and return its address. + +static vector_2 * vector_2_scale_to (vector_2 * destination, vector_2 * source, real scale) { destination->x = source->x * scale; destination->y = source->y * scale; return (destination); } -static vector_3 * vector_3_scale_to (vector_3 * destination, vector_3 * source, f4 scale) { +static vector_3 * vector_3_scale_to (vector_3 * destination, vector_3 * source, real scale) { destination->x = source->x * scale; destination->y = source->y * scale; destination->z = source->z * scale; @@ -234,7 +268,7 @@ static vector_3 * vector_3_scale_to (vector_3 * destination, vector_3 * source, return (destination); } -static vector_4 * vector_4_scale_to (vector_4 * destination, vector_4 * source, f4 scale) { +static vector_4 * vector_4_scale_to (vector_4 * destination, vector_4 * source, real scale) { destination->x = source->x * scale; destination->y = source->y * scale; destination->z = source->z * scale; @@ -243,6 +277,8 @@ static vector_4 * vector_4_scale_to (vector_4 * destination, vector_4 * source, return (destination); } +/// Add 2D, 3D or 4D source vector onto destination vector and return address of destination vector. + static vector_2 * vector_2_add (vector_2 * destination, vector_2 * source) { destination->x += source->x; destination->y += source->y; @@ -267,6 +303,8 @@ static vector_4 * vector_4_add (vector_4 * destination, vector_4 * source) { return (destination); } +/// Add two 2D, 3D or 4D vectors into destination vector and return address of destination vector. + static vector_2 * vector_2_add_to (vector_2 * destination, vector_2 * vector_a, vector_2 * vector_b) { destination->x = vector_a->x + vector_b->x; destination->y = vector_a->y + vector_b->y; @@ -291,6 +329,8 @@ static vector_4 * vector_4_add_to (vector_4 * destination, vector_4 * vector_a, return (destination); } +/// Subtract 2D, 3D or 4D source vector from destination vector and return address of destination vector. + static vector_2 * vector_2_subtract (vector_2 * destination, vector_2 * source) { destination->x -= source->x; destination->y -= source->y; @@ -315,6 +355,8 @@ static vector_4 * vector_4_subtract (vector_4 * destination, vector_4 * source) return (destination); } +/// Subtract two 2D, 3D or 4D vectors, save values into destination vector and return address of destination vector. + static vector_2 * vector_2_subtract_to (vector_2 * destination, vector_2 * vector_a, vector_2 * vector_b) { destination->x = vector_a->x - vector_b->x; destination->y = vector_a->y - vector_b->y; @@ -339,7 +381,9 @@ static vector_4 * vector_4_subtract_to (vector_4 * destination, vector_4 * vecto return (destination); } -static b4 vector_2_compare (vector_2 * vector_a, vector_2 * vector_b) { +/// Compare if two 2D, 3D or 4D vectors are identical and return boolean value of it. + +static boolean vector_2_compare (vector_2 * vector_a, vector_2 * vector_b) { if ((vector_a->x == vector_b->x) && (vector_a->y == vector_b->y)) { return (true); } else { @@ -347,7 +391,7 @@ static b4 vector_2_compare (vector_2 * vector_a, vector_2 * vector_b) { } } -static b4 vector_3_compare (vector_3 * vector_a, vector_3 * vector_b) { +static boolean vector_3_compare (vector_3 * vector_a, vector_3 * vector_b) { if ((vector_a->x == vector_b->x) && (vector_a->y == vector_b->y) && (vector_a->z == vector_b->z)) { return (true); } else { @@ -355,7 +399,7 @@ static b4 vector_3_compare (vector_3 * vector_a, vector_3 * vector_b) { } } -static b4 vector_4_compare (vector_4 * vector_a, vector_4 * vector_b) { +static boolean vector_4_compare (vector_4 * vector_a, vector_4 * vector_b) { if ((vector_a->x == vector_b->x) && (vector_a->y == vector_b->y) && (vector_a->z == vector_b->z) && (vector_a->w == vector_b->w)) { return (true); } else { @@ -363,22 +407,28 @@ static b4 vector_4_compare (vector_4 * vector_a, vector_4 * vector_b) { } } -static f4 vector_2_dot_product (vector_2 * vector_a, vector_2 * vector_b) { +/// Return dot product of two 2D, 3D or 4D vectors. + +static real vector_2_dot_product (vector_2 * vector_a, vector_2 * vector_b) { return (vector_a->x * vector_b->x + vector_a->y * vector_b->y); } -static f4 vector_3_dot_product (vector_3 * vector_a, vector_3 * vector_b) { +static real vector_3_dot_product (vector_3 * vector_a, vector_3 * vector_b) { return (vector_a->x * vector_b->x + vector_a->y * vector_b->y + vector_a->z * vector_b->z); } -static f4 vector_4_dot_product (vector_4 * vector_a, vector_4 * vector_b) { +static real vector_4_dot_product (vector_4 * vector_a, vector_4 * vector_b) { return (vector_a->x * vector_b->x + vector_a->y * vector_b->y + vector_a->z * vector_b->z + vector_a->w * vector_b->w); } -static f4 vector_2_cross_product (vector_2 * vector_a, vector_2 * vector_b) { +/// Return cross product of two 2D vectors. + +static real vector_2_cross_product (vector_2 * vector_a, vector_2 * vector_b) { return (vector_a->x * vector_b->y - vector_a->y * vector_b->x); } +/// Return cross product of two 3D vectors. + static vector_3 * vector_3_cross_product (vector_3 * destination, vector_3 * source) { destination->x = destination->y * source->z - destination->z * source->y; destination->y = destination->z * source->x - destination->x * source->z; diff --git a/xenu.h b/xenu.h new file mode 100644 index 0000000..cf3ee28 --- /dev/null +++ b/xenu.h @@ -0,0 +1,249 @@ +/// __ _____ _ __ _ _ +/// \ \/ / _ \ '_ \| | | | +/// > < __/ | | | |_| | +/// /_/\_\___|_| |_|\__,_| +/// +/// Copyright (c) 1997 - Ognjen 'xolatile' Milan Robovic +/// +/// xolatile@chud.cyou - xenu - Tiny menu unity header, depending on Xross and XUI headers, hard to use but efficient. +/// +/// This program is free software, free as in freedom and as in free beer, you can redistribute it and/or modify it under the terms of the GNU +/// General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version if you wish... +/// +/// This program is distributed in the hope that it will be useful, but it is probably not, and without any warranty, without even the implied +/// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License +/// for more details, if you dare, it is a lot of text that nobody wants to read... + +typedef enum { + menu_layout_vertical, menu_layout_horizontal, + menu_layout_count +} menu_layout_enumeration; + +typedef enum { + menu_type_empty, + menu_type_window, menu_type_menu, menu_type_status, menu_type_frame, + menu_type_button, menu_type_separator, menu_type_string, menu_type_sprite, + menu_type_check_box, menu_type_icon, menu_type_overicon, menu_type_ubericon, + menu_type_text_field, menu_type_signal_field, menu_type_cursor_field, menu_type_slider_field, + menu_type_text_box, menu_type_code_box, menu_type_help_box, menu_type_data_box, + menu_type_count +} menu_type_enumeration; + +typedef struct { + character * data; + natural font; + real scale; + natural colour; +} menu_string; + +typedef struct { + natural data; + real scale; + natural colour; +} menu_sprite; + +typedef struct { + menu_layout_enumeration layout; + menu_type_enumeration type; + menu_string * string; + menu_string * number; + menu_sprite * sprite; + integer x; + integer y; + natural width; + natural height; + natural offset; + natural count; + generic * * array; + generic * root; +} menu_structure; + +static procedure menu_append (menu_structure * root, menu_structure * menu) { + ++root->count; + + root->array = reallocate (root->array, root->count * sizeof (* root->array)); + + menu->root = root; + + root->array [root->count - 1] = menu; +} + +static procedure menu_remove (menu_structure * menu) { + if (menu->string != null) { menu->string = deallocate (menu->string); } + if (menu->number != null) { menu->number = deallocate (menu->number); } + if (menu->sprite != null) { menu->sprite = deallocate (menu->sprite); } + + for (natural index = 0; index < menu->count; ++index) { + menu_remove (menu->array [index]); + } + + if (menu->array != null) { + menu->array = deallocate (menu->array); + } + + menu = deallocate (menu); +} + +static menu_string * menu_create_string (character * data, natural font, real scale, natural colour) { + menu_string * string = allocate (sizeof (* string)); + + string->data = data; + string->font = font; + string->scale = scale; + string->colour = colour; + + return (string); +} + +static menu_sprite * menu_create_sprite (natural data, real scale, natural colour) { + menu_sprite * sprite = allocate (sizeof (* sprite)); + + sprite->data = data; + sprite->scale = scale; + sprite->colour = colour; + + return (sprite); +} + +static menu_structure * menu_create_base (menu_layout_enumeration layout, menu_type_enumeration type, menu_string * string, + menu_string * number, menu_sprite * sprite, integer x, integer y, natural offset) { + menu_structure * menu = allocate (sizeof (* menu)); + + menu->layout = layout; + menu->type = type; + menu->string = string; + menu->number = number; + menu->sprite = sprite; + menu->x = x; + menu->y = y; + menu->offset = offset; + + return (menu); +} + +static menu_structure * menu_create_root (menu_layout_enumeration layout, menu_type_enumeration type, natural offset) { + return (menu_create_base (layout, type, null, null, null, 0, 0, offset)); +} + +static menu_structure * menu_create_button (menu_layout_enumeration layout, menu_string * text, menu_sprite * icon, natural offset) { + return (menu_create_base (layout, menu_type_button, text, null, icon, 0, 0, offset)); +} + +static natural menu_string_width (cross_structure * cross, menu_string * string) { + return ((string == null) ? 0 : cross_string_width (cross, string->data, string->font, string->scale)); +} + +static natural menu_string_height (cross_structure * cross, menu_string * string) { + return ((string == null) ? 0 : cross_string_height (cross, string->data, string->font, string->scale)); +} + +static natural menu_sprite_width (cross_structure * cross, menu_sprite * sprite) { + return ((sprite == null) ? 0 : cross_sprite_width (cross, sprite->data)); +} + +static natural menu_sprite_height (cross_structure * cross, menu_sprite * sprite) { + return ((sprite == null) ? 0 : cross_sprite_height (cross, sprite->data)); +} + +static procedure menu_configure (cross_structure * cross, menu_structure * menu) { + for (natural index = 0; index < menu->count; ++index) { + menu_structure * submenu = menu->array [index]; + + menu_configure (cross, submenu); + } + + for (natural index = 0; index < menu->count; ++index) { + menu_structure * submenu = menu->array [index]; + + if (menu->layout == menu_layout_vertical) { + menu->width = maximum_macro (menu->width, submenu->width + 2 * menu->offset); + menu->height += submenu->height; + } + + if (menu->layout == menu_layout_horizontal) { + menu->width += submenu->width; + menu->height = maximum_macro (menu->height, submenu->height + 2 * menu->offset); + } + } + + if (menu->layout == menu_layout_vertical) { + menu->width += maximum_natural (3, menu_sprite_width (cross, menu->sprite), + menu_string_width (cross, menu->string), + menu_string_width (cross, menu->number)); + + menu->height += menu_sprite_height (cross, menu->sprite) + + menu_string_height (cross, menu->string) + + menu_string_height (cross, menu->number); + } + + if (menu->layout == menu_layout_horizontal) { + menu->width += menu_sprite_width (cross, menu->sprite) + + menu_string_width (cross, menu->string) + + menu_string_width (cross, menu->number); + + menu->height += maximum_natural (3, menu_sprite_height (cross, menu->sprite), + menu_string_height (cross, menu->string), + menu_string_height (cross, menu->number)); + } + + menu->width += 2 * menu->offset; + menu->height += 2 * menu->offset; + + if ((menu->count != 0) && (menu->root != null)) { + menu->width -= 2 * menu->offset * (menu->layout == menu_layout_vertical); + menu->height -= 2 * menu->offset * (menu->layout == menu_layout_horizontal); + } +} + +static procedure menu_center (cross_structure * cross, menu_structure * menu) { + menu->x = cross_center_x (cross, menu->width); + menu->y = cross_center_y (cross, menu->height); +} + +static procedure menu_subrender (cross_structure * cross, ui_structure * ui, menu_structure * menu) { + switch (menu->type) { + case (menu_type_empty): break; + + case (menu_type_window): ui_render_window (cross, ui, menu->x, menu->y, menu->width, menu->height); break; + case (menu_type_menu): ui_render_menu (cross, ui, menu->x, menu->y, menu->width, menu->height); break; + case (menu_type_status): ui_render_status (cross, ui, menu->x, menu->y, menu->width, menu->height); break; + case (menu_type_frame): ui_render_frame (cross, ui, menu->x, menu->y, menu->width, menu->height); break; + + case (menu_type_button): { + boolean sprite_is_used = (menu->sprite != null) && (menu->sprite->data != ~ 0u); + ui_render_button (cross, ui, menu->x, menu->y, menu->width, menu->height); + if (sprite_is_used == true) { + cross_render_sprite_colour (cross, menu->sprite->data, menu->x + menu->offset, menu->y + menu->offset, menu->sprite->colour); + } + if ((menu->string != null) && (menu->string->data != null)) { + integer x = menu->x + menu->offset + (sprite_is_used == true) * menu_sprite_width (cross, menu->sprite) * (menu->layout == menu_layout_horizontal); + integer y = menu->y + menu->offset + (sprite_is_used == true) * menu_sprite_height (cross, menu->sprite) * (menu->layout == menu_layout_vertical); + cross_render_string (cross, menu->string->data, menu->string->font, x, y, menu->string->scale, menu->string->colour); + } + } break; + + default: break; + } +} + +static procedure menu_render (cross_structure * cross, ui_structure * ui, menu_structure * menu) { + menu_subrender (cross, ui, menu); + + for (natural index = 0; index < menu->count; ++index) { + menu_structure * submenu = menu->array [index]; + + menu_structure * root = submenu->root; + + submenu->x = root->x + root->offset; + submenu->y = root->y + root->offset; + + for (natural subindex = 0; subindex < index; ++subindex) { + menu_structure * base = root->array [subindex]; + + submenu->x += (root->layout == menu_layout_horizontal) * base->width; + submenu->y += (root->layout == menu_layout_vertical) * base->height; + } + + menu_render (cross, ui, submenu); + } +} diff --git a/xerminal.h b/xerminal.h index fc768de..d2f83b1 100755 --- a/xerminal.h +++ b/xerminal.h @@ -23,41 +23,41 @@ #define terminal_cursor_length (sizeof ("\033[---;---H") - 1) typedef struct { - c1 * screen; - u4 screen_width; - u4 screen_height; + character * screen; + natural screen_width; + natural screen_height; - c1 format [terminal_format_length + 1]; - c1 cursor [terminal_cursor_length + 1]; + character format [terminal_format_length + 1]; + character cursor [terminal_cursor_length + 1]; - b4 active; - b4 signal [signal_count]; + boolean active; + boolean signal [signal_count]; - u4 character; + natural literal; struct termios * old_terminal; struct termios * new_terminal; } terminal_structure; -static c1 * terminal_screen_offset (terminal_structure * terminal, u4 x, u4 y) { +static character * terminal_screen_offset (terminal_structure * terminal, natural x, natural y) { return (& terminal->screen [terminal_revert_length + terminal_format_length * (y * terminal->screen_width + x) + 2 * y]); } -static u4 terminal_screen_length (terminal_structure * terminal) { - u4 constant = terminal_revert_length + terminal_cursor_length + 1; - u4 variable = terminal_format_length * terminal->screen_height * terminal->screen_width; - u4 new_line = 2 * (terminal->screen_height - 1); +static natural terminal_screen_length (terminal_structure * terminal) { + natural constant = terminal_revert_length + terminal_cursor_length + 1; + natural variable = terminal_format_length * terminal->screen_height * terminal->screen_width; + natural new_line = 2 * (terminal->screen_height - 1); return (constant + variable + new_line); } -static v0 terminal_screen_dimensions (terminal_structure * terminal) { +static procedure terminal_screen_dimensions (terminal_structure * terminal) { struct winsize screen_dimension = { 0 }; - u4 old_width = terminal->screen_width; - u4 old_height = terminal->screen_height; + natural old_width = terminal->screen_width; + natural old_height = terminal->screen_height; - s4 status = ioctl (STDOUT_FILENO, TIOCGWINSZ, & screen_dimension); + integer status = ioctl (STDOUT_FILENO, TIOCGWINSZ, & screen_dimension); fatal_failure (status == -1, "ioctl: Failed to get dimensions."); @@ -74,30 +74,30 @@ static v0 terminal_screen_dimensions (terminal_structure * terminal) { string_copy (& terminal->screen [0], "\033[H"); - for (u4 index = 0; index < terminal->screen_height - 1; ++index) { + for (natural index = 0; index < terminal->screen_height - 1; ++index) { string_copy (& terminal->screen [terminal_revert_length + index * terminal_format_length * terminal->screen_width], "\r\n"); } } -static c1 * terminal_format_character (terminal_structure * terminal, c1 character, s4 colour, s4 effect) { - if (character_is_visible (character) == false) { - character = ' '; +static character * terminal_format_character (terminal_structure * terminal, character data, integer colour, integer effect) { + if (character_is_visible (data) == false) { + data = ' '; } colour %= colour_count; effect %= effect_count; - terminal->format [2] = (char) effect + '0'; - terminal->format [5] = (char) colour + '0'; - terminal->format [7] = character; + terminal->format [2] = (character) effect + '0'; + terminal->format [5] = (character) colour + '0'; + terminal->format [7] = data; return (terminal->format); } -static terminal_structure * terminal_initialize (v0) { +static terminal_structure * terminal_initialize (none) { terminal_structure * terminal = allocate (sizeof (* terminal)); - s4 status = -1; + integer status = -1; string_copy_limit (terminal->format, "\033[-;3-m-\033[0m", terminal_format_length + 1); string_copy_limit (terminal->cursor, "\033[---;---H", terminal_cursor_length + 1); @@ -113,13 +113,13 @@ static terminal_structure * terminal_initialize (v0) { memory_copy (terminal->new_terminal, terminal->old_terminal, sizeof (* terminal->old_terminal)); - terminal->new_terminal->c_cc [VMIN] = (u1) 0; - terminal->new_terminal->c_cc [VTIME] = (u1) 1; + terminal->new_terminal->c_cc [VMIN] = (natural_8) 0; + terminal->new_terminal->c_cc [VTIME] = (natural_8) 1; - terminal->new_terminal->c_iflag &= (u4) ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); - terminal->new_terminal->c_oflag &= (u4) ~(OPOST); - terminal->new_terminal->c_cflag |= (u4) (CS8); - terminal->new_terminal->c_lflag &= (u4) ~(ECHO | ICANON | IEXTEN | ISIG); + terminal->new_terminal->c_iflag &= (natural) ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); + terminal->new_terminal->c_oflag &= (natural) ~(OPOST); + terminal->new_terminal->c_cflag |= (natural) (CS8); + terminal->new_terminal->c_lflag &= (natural) ~(ECHO | ICANON | IEXTEN | ISIG); status = tcsetattr (STDIN_FILENO, TCSAFLUSH, terminal->new_terminal); @@ -135,7 +135,7 @@ static terminal_structure * terminal_initialize (v0) { } static terminal_structure * terminal_deinitialize (terminal_structure * terminal) { - s4 status = tcsetattr (STDIN_FILENO, TCSAFLUSH, terminal->old_terminal); + integer status = tcsetattr (STDIN_FILENO, TCSAFLUSH, terminal->old_terminal); fatal_failure (status == -1, "tcsetattr: Failed to set default attributes."); @@ -150,141 +150,141 @@ static terminal_structure * terminal_deinitialize (terminal_structure * terminal return (deallocate (terminal)); } -static v0 terminal_synchronize (terminal_structure * terminal) { - u4 character = 0; +static procedure terminal_synchronize (terminal_structure * terminal) { + natural signal = 0; output (terminal->screen, terminal_screen_length (terminal)); terminal_screen_dimensions (terminal); - for (u4 index = 0; index < signal_count; ++index) { + for (natural index = 0; index < signal_count; ++index) { terminal->signal [index] = false; } - input (& character, sizeof (character)); + input (& signal, sizeof (signal)); - terminal->character = (u4) character; + terminal->literal = (natural) signal; - if (character == 0x0000001b) { + if (signal == 0x0000001b) { terminal->signal [signal_escape] = true; - } else if (character == 0x00415b1b) { + } else if (signal == 0x00415b1b) { terminal->signal [signal_arrow_up] = true; - } else if (character == 0x00425b1b) { + } else if (signal == 0x00425b1b) { terminal->signal [signal_arrow_down] = true; - } else if (character == 0x00435b1b) { + } else if (signal == 0x00435b1b) { terminal->signal [signal_arrow_right] = true; - } else if (character == 0x00445b1b) { + } else if (signal == 0x00445b1b) { terminal->signal [signal_arrow_left] = true; - } else if (character == 0x00000020) { + } else if (signal == 0x00000020) { terminal->signal [signal_space] = true; - } else if (character == 0x0000007f) { + } else if (signal == 0x0000007f) { terminal->signal [signal_backspace] = true; - } else if (character == 0x0000000d) { + } else if (signal == 0x0000000d) { terminal->signal [signal_return] = true; - } else if (character_is_digit ((char) character) == true) { - terminal->signal [signal_0 + character - '0'] = true; - } else if (character_is_lowercase ((char) character) == true) { - terminal->signal [signal_a + character - 'a'] = true; - } else if (character_is_uppercase ((char) character) == true) { - terminal->signal [signal_a + character - 'A'] = true; - terminal->signal [signal_left_shift] = true; - terminal->signal [signal_right_shift] = true; + } else if (character_is_digit ((character) signal) == true) { + terminal->signal [signal_0 + signal - '0'] = true; + } else if (character_is_lowercase ((character) signal) == true) { + terminal->signal [signal_a + signal - 'a'] = true; + } else if (character_is_uppercase ((character) signal) == true) { + terminal->signal [signal_a + signal - 'A'] = true; + terminal->signal [signal_left_shift] = true; + terminal->signal [signal_right_shift] = true; } } -static v0 terminal_render_cursor (terminal_structure * terminal, u4 x, u4 y) { /* BROKE IT INTENTIONALLY */ +static procedure terminal_render_cursor (terminal_structure * terminal, natural x, natural y) { /* BROKE IT INTENTIONALLY */ string_copy_limit (terminal->cursor + 2, string_align_left (number_to_string (y % 1000 + 1), 3, '0'), 3); string_copy_limit (terminal->cursor + 6, string_align_left (number_to_string (x % 1000 + 1), 3, '0'), 3); string_copy_limit (& terminal->screen [terminal_screen_length (terminal) - terminal_cursor_length - 1], terminal->cursor, terminal_cursor_length); } -static v0 terminal_render_character (terminal_structure * terminal, c1 character, u4 colour, u4 effect, u4 x, u4 y) { +static procedure terminal_render_character (terminal_structure * terminal, character data, natural colour, natural effect, natural x, natural y) { if ((x >= terminal->screen_width) || (y >= terminal->screen_height)) { return; } - string_copy_limit (terminal_screen_offset (terminal, x, y), terminal_format_character (terminal, character, colour, effect), terminal_format_length); + string_copy_limit (terminal_screen_offset (terminal, x, y), terminal_format_character (terminal, data, colour, effect), terminal_format_length); } -static v0 terminal_render_toggle (terminal_structure * terminal, b4 toggle, u4 x, u4 y) { - c1 marker = (toggle == true) ? '+' : '-'; - c1 colour = (toggle == true) ? colour_green : colour_red; +static procedure terminal_render_toggle (terminal_structure * terminal, boolean toggle, natural x, natural y) { + character marker = (toggle == true) ? '+' : '-'; + character colour = (toggle == true) ? colour_green : colour_red; terminal_render_character (terminal, '[', colour_grey, effect_bold, x + 0, y); terminal_render_character (terminal, marker, colour, effect_bold, x + 1, y); terminal_render_character (terminal, ']', colour_grey, effect_bold, x + 2, y); } -static v0 terminal_render_fill_bar (terminal_structure * terminal, u4 value, u4 limit, c1 character, u4 colour, u4 effect, u4 x, u4 y) { +static procedure terminal_render_fill_bar (terminal_structure * terminal, natural value, natural limit, character data, natural colour, natural effect, natural x, natural y) { terminal_render_character (terminal, '[', colour_grey, effect_bold, x, y); terminal_render_character (terminal, ']', colour_grey, effect_bold, x + limit + 1, y); - for (u4 index = 0; index < limit; ++index) { - terminal_render_character (terminal, (index < value) ? character : ' ', colour, effect, x + index + 1, y); + for (natural index = 0; index < limit; ++index) { + terminal_render_character (terminal, (index < value) ? data : ' ', colour, effect, x + index + 1, y); } } -static v0 terminal_render_string (terminal_structure * terminal, c1 * string, u4 colour, u4 effect, u4 x, u4 y) { - for (u4 index = 0; string [index] != '\0'; ++index) { +static procedure terminal_render_string (terminal_structure * terminal, character * string, natural colour, natural effect, natural x, natural y) { + for (natural index = 0; string [index] != '\0'; ++index) { terminal_render_character (terminal, string [index], colour, effect, x + index, y); } } -static v0 terminal_render_number (terminal_structure * terminal, s4 number, u4 colour, u4 effect, u4 x, u4 y) { +static procedure terminal_render_number (terminal_structure * terminal, integer number, natural colour, natural effect, natural x, natural y) { terminal_render_string (terminal, number_to_string (number), colour, effect, x, y); } -static v0 terminal_render_string_crop (terminal_structure * terminal, c1 * string, u4 colour, u4 effect, u4 x, u4 y, u4 crop) { - for (u4 index = 0; (string [index] != '\0') && (index < crop); ++index) { +static procedure terminal_render_string_crop (terminal_structure * terminal, character * string, natural colour, natural effect, natural x, natural y, natural crop) { + for (natural index = 0; (string [index] != '\0') && (index < crop); ++index) { terminal_render_character (terminal, string [index], colour, effect, x + index, y); } } -static v0 terminal_render_number_crop (terminal_structure * terminal, s4 number, u4 colour, u4 effect, u4 x, u4 y, u4 crop) { +static procedure terminal_render_number_crop (terminal_structure * terminal, integer number, natural colour, natural effect, natural x, natural y, natural crop) { terminal_render_string_crop (terminal, number_to_string (number), colour, effect, x, y, crop); } -static v0 terminal_render_vertical_line (terminal_structure * terminal, c1 character, u4 colour, u4 effect, u4 x, u4 y, u4 height) { - for (u4 offset = 0; offset != height; ++offset) { - terminal_render_character (terminal, character, colour, effect, x, y + offset); +static procedure terminal_render_vertical_line (terminal_structure * terminal, character data, natural colour, natural effect, natural x, natural y, natural height) { + for (natural offset = 0; offset != height; ++offset) { + terminal_render_character (terminal, data, colour, effect, x, y + offset); } } -static v0 terminal_render_horizontal_line (terminal_structure * terminal, c1 character, u4 colour, u4 effect, u4 x, u4 y, u4 width) { - for (u4 offset = 0; offset != width; ++offset) { - terminal_render_character (terminal, character, colour, effect, x + offset, y); +static procedure terminal_render_horizontal_line (terminal_structure * terminal, character data, natural colour, natural effect, natural x, natural y, natural width) { + for (natural offset = 0; offset != width; ++offset) { + terminal_render_character (terminal, data, colour, effect, x + offset, y); } } -static v0 terminal_render_rectangle_line (terminal_structure * terminal, c1 character, u4 colour, u4 effect, u4 x, u4 y, u4 width, u4 height) { - terminal_render_vertical_line (terminal, character, colour, effect, x + 0, y + 0, height + 0); - terminal_render_vertical_line (terminal, character, colour, effect, x + width - 1, y + 0, height + 0); - terminal_render_horizontal_line (terminal, character, colour, effect, x + 1, y + 0, width - 1); - terminal_render_horizontal_line (terminal, character, colour, effect, x + 1, y + height - 1, width - 1); +static procedure terminal_render_rectangle_line (terminal_structure * terminal, character data, natural colour, natural effect, natural x, natural y, natural width, natural height) { + terminal_render_vertical_line (terminal, data, colour, effect, x + 0, y + 0, height + 0); + terminal_render_vertical_line (terminal, data, colour, effect, x + width - 1, y + 0, height + 0); + terminal_render_horizontal_line (terminal, data, colour, effect, x + 1, y + 0, width - 1); + terminal_render_horizontal_line (terminal, data, colour, effect, x + 1, y + height - 1, width - 1); } -static v0 terminal_render_rectangle_fill (terminal_structure * terminal, c1 character, u4 colour, u4 effect, u4 x, u4 y, u4 width, u4 height) { - for (u4 offset_y = 0; offset_y != height; ++offset_y) { - for (u4 offset_x = 0; offset_x != width; ++offset_x) { - terminal_render_character (terminal, character, colour, effect, x + offset_x, y + offset_y); +static procedure terminal_render_rectangle_fill (terminal_structure * terminal, character data, natural colour, natural effect, natural x, natural y, natural width, natural height) { + for (natural offset_y = 0; offset_y != height; ++offset_y) { + for (natural offset_x = 0; offset_x != width; ++offset_x) { + terminal_render_character (terminal, data, colour, effect, x + offset_x, y + offset_y); } } } -static v0 terminal_render_background (terminal_structure * terminal, c1 character, u4 colour, u4 effect) { - for (u4 y = 0; y != terminal->screen_height; ++y) { - for (u4 x = 0; x != terminal->screen_width; ++x) { - terminal_render_character (terminal, character, colour, effect, x, y); +static procedure terminal_render_background (terminal_structure * terminal, character data, natural colour, natural effect) { + for (natural y = 0; y != terminal->screen_height; ++y) { + for (natural x = 0; x != terminal->screen_width; ++x) { + terminal_render_character (terminal, data, colour, effect, x, y); } } } -static v0 terminal_render_format (terminal_structure * terminal, c1 * format, u4 x, u4 y, ...) { +static procedure terminal_render_format (terminal_structure * terminal, character * format, natural x, natural y, ...) { va_list list; - u4 offset_x = 0; - u4 offset_y = 0; + natural offset_x = 0; + natural offset_y = 0; colour_enumeration colour = colour_white; effect_enumeration effect = effect_normal; @@ -311,29 +311,29 @@ static v0 terminal_render_format (terminal_structure * terminal, c1 * format, u4 ++offset_x; } break; case ('i'): { - c1 * number = number_to_string (va_arg (list, int)); - terminal_render_string (terminal, number, colour, effect, x + offset_x, y + offset_y); - offset_x += string_length (number); + character * data = number_to_string (va_arg (list, int)); + terminal_render_string (terminal, data, colour, effect, x + offset_x, y + offset_y); + offset_x += string_length (data); } break; case ('t'): { - b4 toggle = (b4) va_arg (list, int); - terminal_render_toggle (terminal, toggle, x + offset_x, y + offset_y); + boolean data = (boolean) va_arg (list, int); + terminal_render_toggle (terminal, data, x + offset_x, y + offset_y); offset_x += 3; } break; case ('b'): { - b4 b4ean = (b4) va_arg (list, int); - terminal_render_string (terminal, (b4ean == true) ? "true" : "false", colour, effect, x + offset_x, y + offset_y); - offset_x += (b4ean == true) ? 4 : 5; + boolean data = (boolean) va_arg (list, int); + terminal_render_string (terminal, (data == true) ? "true" : "false", colour, effect, x + offset_x, y + offset_y); + offset_x += (data == true) ? 4 : 5; } break; case ('c'): { - c1 character = (char) va_arg (list, int); - terminal_render_character (terminal, character, colour, effect, x + offset_x, y + offset_y); + character data = (character) va_arg (list, int); + terminal_render_character (terminal, data, colour, effect, x + offset_x, y + offset_y); ++offset_x; } break; case ('s'): { - c1 * string = va_arg (list, c1 *); - terminal_render_string (terminal, string, colour, effect, x + offset_x, y + offset_y); - offset_x += string_length (string); + character * data = va_arg (list, character *); + terminal_render_string (terminal, data, colour, effect, x + offset_x, y + offset_y); + offset_x += string_length (data); } break; default: { terminal_render_character (terminal, '?', colour, effect, x + offset_x, y + offset_y); @@ -350,8 +350,8 @@ static v0 terminal_render_format (terminal_structure * terminal, c1 * format, u4 } break; case ('A'): effect = effect_normal; break; case ('B'): effect = effect_bold; break; - case ('C'): effect = effect_italic; break; - case ('D'): effect = effect_undefined_code; break; + case ('C'): effect = effect_darken; break; + case ('D'): effect = effect_italic; break; case ('E'): effect = effect_underline; break; case ('F'): effect = effect_blink; break; case ('G'): effect = effect_reverse; break; diff --git a/xhallenge.c b/xhallenge.c index e4e03ca..f9440f7 100755 --- a/xhallenge.c +++ b/xhallenge.c @@ -15,35 +15,35 @@ typedef enum { } special_enumeration; typedef struct { - u4 count; - u4 limit; - u4 * completed; - u4 * * requirement; - u4 * type; - c1 * * class; - c1 * * description; + natural count; + natural limit; + natural * completed; + natural * * requirement; + natural * type; + character * * class; + character * * description; } challenge_structure; -static c1 * special_name [special_count] = { +static character * special_name [special_count] = { "strength", "perception", "edurance", "charisma", "intelligence", "agility", "luck" }; -static b4 challenge_is_repeatable (challenge_structure * challenges, u4 index) { +static boolean challenge_is_repeatable (challenge_structure * challenges, natural index) { return ((challenges->type [index] == special_strength + 1) || (challenges->type [index] == special_edurance + 1) || (challenges->type [index] == special_agility + 1)); } -static b4 challenge_is_available (challenge_structure * challenges, u4 index) { +static boolean challenge_is_available (challenge_structure * challenges, natural index) { return ((challenges->completed [index] == 0) || (challenge_is_repeatable (challenges, index) == true)); } -static b4 challenge_is_completable (u4 * special, challenge_structure * challenges, u4 index) { +static boolean challenge_is_completable (natural * special, challenge_structure * challenges, natural index) { if (challenge_is_available (challenges, index) == false) { return (false); } - for (u4 check = 0; check < special_count; ++check) { + for (natural check = 0; check < special_count; ++check) { if (challenges->requirement [index] [check] > special [check]) { return (false); } @@ -52,11 +52,11 @@ static b4 challenge_is_completable (u4 * special, challenge_structure * challeng return (true); } -static v0 render_challenge_list (terminal_structure * terminal, u4 * special, challenge_structure * challenges, u4 x, u4 y) { - u4 count = 0; - u4 * array = allocate (challenges->count * sizeof (* array)); +static procedure render_challenge_list (terminal_structure * terminal, natural * special, challenge_structure * challenges, natural x, natural y) { + natural count = 0; + natural * array = allocate (challenges->count * sizeof (* array)); - for (u4 index = 0; index < challenges->count; ++index) { + for (natural index = 0; index < challenges->count; ++index) { if (challenge_is_completable (special, challenges, index) == true) { ++count; array [count - 1] = index; @@ -66,10 +66,10 @@ static v0 render_challenge_list (terminal_structure * terminal, u4 * special, ch terminal_render_format (terminal, "Count of unlocked challenges: /2/B%i", x, y + 0, count); terminal_render_format (terminal, "Count of locked challenges: /1/B%i", x, y + 1, challenges->count - count); - for (u4 index = 0; index < count; ++index) { + for (natural index = 0; index < count; ++index) { terminal_render_character (terminal, '[', colour_grey, effect_bold, x, y + index + 2); - for (u4 value = 0; value < special_count; ++value) { + for (natural value = 0; value < special_count; ++value) { terminal_render_number (terminal, challenges->requirement [array [index]] [value], value + 1, effect_bold, x + 3 * value + 2, y + index + 2); } @@ -83,12 +83,12 @@ static v0 render_challenge_list (terminal_structure * terminal, u4 * special, ch array = deallocate (array); } -static v0 render_special_attributes (terminal_structure * terminal, u4 * special, u4 offset, u4 selection) { - for (u4 index = 0; index < special_count; ++index) { - u4 effect = (selection == index) ? effect_bold : effect_normal; - u4 length = attribute_maximum + 3; +static procedure render_special_attributes (terminal_structure * terminal, natural * special, natural offset, natural selection) { + for (natural index = 0; index < special_count; ++index) { + natural effect = (selection == index) ? effect_bold : effect_normal; + natural length = attribute_maximum + 3; - c1 name [32] = ""; + character name [32] = ""; string_copy_limit (name, special_name [index], sizeof (name)); @@ -98,13 +98,13 @@ static v0 render_special_attributes (terminal_structure * terminal, u4 * special } } -static v0 prompt_special_attributes (u4 * special) { +static procedure prompt_special_attributes (natural * special) { terminal_structure * terminal = terminal_initialize (); - u4 selection = 0; - b4 show_help = false; + natural selection = 0; + boolean show_help = false; - c1 * main_messages [] = { + character * main_messages [] = { "Press H or Tab to toggle help.", "Press Q or Escape to use default settings.", "Press S or Enter to save changes.", @@ -112,7 +112,7 @@ static v0 prompt_special_attributes (u4 * special) { "Choose your SPECIAL attributes:" }; - c1 * help_messages [] = { + character * help_messages [] = { "Show help - H or Tab", "Use default settings - Q or Escape", "Save and quit - S or Enter", @@ -122,22 +122,22 @@ static v0 prompt_special_attributes (u4 * special) { "Decrease attribute - N, Left arrow key or KP4" }; - for (u4 index = 0; index < special_count; ++index) { + for (natural index = 0; index < special_count; ++index) { special [index] = 5; } while (terminal->active == true) { terminal_render_background (terminal, ' ', colour_white, effect_normal); - for (u4 index = 0; index < array_length (main_messages); ++index) { + for (natural index = 0; index < array_length (main_messages); ++index) { terminal_render_string (terminal, main_messages [index], colour_white, effect_normal, 0, index); } render_special_attributes (terminal, special, array_length (main_messages) + 1, selection); if (show_help == true) { - for (u4 index = 0; index < array_length (help_messages); ++index) { - u4 offset = array_length (main_messages) + special_count + 2; + for (natural index = 0; index < array_length (help_messages); ++index) { + natural offset = array_length (main_messages) + special_count + 2; terminal_render_string (terminal, help_messages [index], colour_white, effect_normal, 0, index + offset); } @@ -148,7 +148,7 @@ static v0 prompt_special_attributes (u4 * special) { if ((terminal->signal [signal_tabulator] == true) || (terminal->signal [signal_h] == true)) { show_help = ! show_help; } else if ((terminal->signal [signal_escape] == true) || (terminal->signal [signal_q] == true)) { - for (u4 index = 0; index < special_count; ++index) { + for (natural index = 0; index < special_count; ++index) { special [index] = 5; } break; } else if ((terminal->signal [signal_return] == true) || (terminal->signal [signal_s] == true)) { @@ -169,33 +169,33 @@ static v0 prompt_special_attributes (u4 * special) { terminal = terminal_deinitialize (terminal); } -static v0 import_user_configuration (u4 * special, u4 challenge_count, u4 * * daily_challenges, b4 * * completition) { - b4 special_defined [special_count] = { false }; +static procedure import_user_configuration (natural * special, natural challenge_count, natural * * daily_challenges, boolean * * completition) { + boolean special_defined [special_count] = { false }; - b4 daily_challenges_defined = false; - b4 completition_defined = false; + boolean daily_challenges_defined = false; + boolean completition_defined = false; - script_information * information = allocate (sizeof (* information)); - script_structure * structure = script_open (configuration_format ("xhallenge.cfg")); + script_structure * information = allocate (sizeof (* information)); + script_data_structure * structure = script_open (configuration_format ("xhallenge.cfg")); - for (script_word_type word = script_parser (structure); word != script_end; word = script_parser (structure)) { + for (script_word_enumeration word = script_parser (structure); word != script_end; word = script_parser (structure)) { if (word == script_marker) { if (script_compare (structure, "challenges") == true) { - u4 check = 0; + natural check = 0; script_failure (structure, daily_challenges_defined == true, "Challenge array was already defined."); (* daily_challenges) = script_expect_ordered_array (information, structure, & check); daily_challenges_defined = true; script_failure (structure, check != challenges_per_day, "Ordered array 'daily_challenges' is incomplete."); - for (u4 index = 0; index < challenges_per_day; ++index) { + for (natural index = 0; index < challenges_per_day; ++index) { script_failure (structure, (* daily_challenges) [index] >= challenge_count, "Invalid index."); } } else if (script_compare (structure, "completition") == true) { - u4 check = 0; + natural check = 0; script_failure (structure, completition_defined == true, "Completition array was already defined."); (* completition) = script_expect_ordered_array (information, structure, & check); completition_defined = true; script_failure (structure, check != challenges_per_day, "Ordered array 'completition' is incomplete."); - } else for (u4 index = 0; index < special_count; ++index) { + } else for (natural index = 0; index < special_count; ++index) { if (script_compare (structure, special_name [index]) == true) { script_failure (structure, special_defined [index] == true, "Attribute was already defined."); special [index] = script_expect_number (structure); @@ -215,15 +215,15 @@ static v0 import_user_configuration (u4 * special, u4 challenge_count, u4 * * da information = deallocate (information); } -static v0 export_user_configuration (u4 * special, u4 * daily_challenges, b4 * completition) { - c1 buffer [4096] = ""; +static procedure export_user_configuration (natural * special, natural * daily_challenges, boolean * completition) { + character buffer [4096] = ""; - for (u4 index = 0; index < special_count; ++index) { + for (natural index = 0; index < special_count; ++index) { string_concatenate (buffer, format ("%s = %i\n", special_name [index], special [index])); } string_concatenate (buffer, "challenges = ("); - for (u4 index = 0; index < challenges_per_day; ++index) { + for (natural index = 0; index < challenges_per_day; ++index) { string_concatenate (buffer, number_to_string (daily_challenges [index])); if (index < challenges_per_day - 1) { @@ -233,7 +233,7 @@ static v0 export_user_configuration (u4 * special, u4 * daily_challenges, b4 * c string_concatenate (buffer, ")\n"); string_concatenate (buffer, "completition = ("); - for (u4 index = 0; index < challenges_per_day; ++index) { + for (natural index = 0; index < challenges_per_day; ++index) { string_concatenate (buffer, number_to_string (completition [index])); if (index < challenges_per_day - 1) { @@ -245,7 +245,7 @@ static v0 export_user_configuration (u4 * special, u4 * daily_challenges, b4 * c configuration_export ("xhallenge.cfg", buffer); } -static challenge_structure * challenges_initialize (u4 limit) { +static challenge_structure * challenges_initialize (natural limit) { challenge_structure * challenges = allocate (sizeof (* challenges)); challenges->limit = limit; @@ -254,7 +254,7 @@ static challenge_structure * challenges_initialize (u4 limit) { } static challenge_structure * challenges_deinitialize (challenge_structure * challenges) { - for (u4 index = 0; index < challenges->count; ++index) { + for (natural index = 0; index < challenges->count; ++index) { challenges->requirement [index] = deallocate (challenges->requirement [index]); challenges->description [index] = deallocate (challenges->description [index]); challenges->class [index] = deallocate (challenges->class [index]); @@ -269,17 +269,17 @@ static challenge_structure * challenges_deinitialize (challenge_structure * chal return (deallocate (challenges)); } -static v0 import_challenges (challenge_structure * challenges) { - b4 completed_defined = false; - b4 requirement_defined = false; - b4 type_defined = false; - b4 class_defined = false; - b4 description_defined = false; +static procedure import_challenges (challenge_structure * challenges) { + boolean completed_defined = false; + boolean requirement_defined = false; + boolean type_defined = false; + boolean class_defined = false; + boolean description_defined = false; - script_information * information = allocate (sizeof (* information)); - script_structure * structure = script_open (configuration_format ("xhallenge_list.cfg")); + script_structure * information = allocate (sizeof (* information)); + script_data_structure * structure = script_open (configuration_format ("xhallenge_list.cfg")); - for (script_word_type word = script_parser (structure); word != script_end; word = script_parser (structure)) { + for (script_word_enumeration word = script_parser (structure); word != script_end; word = script_parser (structure)) { if (word == script_header) { if (challenges->count > 0) { script_warning (structure, @@ -302,13 +302,13 @@ static v0 import_challenges (challenge_structure * challenges) { class_defined = false; description_defined = false; } else if (word == script_marker) { - u4 current = challenges->count - 1; + natural current = challenges->count - 1; if (script_compare (structure, "completed") == true) { script_failure (structure, completed_defined == true, "Marker 'completed' already defined."); challenges->completed [current] = script_expect_number (structure); completed_defined = true; } else if (script_compare (structure, "requirement") == true) { - u4 check = 0; + natural check = 0; script_failure (structure, requirement_defined == true, "Marker 'requirement' already defined."); challenges->requirement [current] = script_expect_ordered_array (information, structure, & check); requirement_defined = true; @@ -339,16 +339,16 @@ static v0 import_challenges (challenge_structure * challenges) { information = deallocate (information); } -static v0 export_challenges (challenge_structure * challenges) { - s4 file = file_open (configuration_format ("xhallenge_list.cfg"), file_flag_edit | file_flag_truncate); +static procedure export_challenges (challenge_structure * challenges) { + integer file = file_open (configuration_format ("xhallenge_list.cfg"), file_flag_edit | file_flag_truncate); - for (u4 index = 0; index < challenges->count; ++index) { + for (natural index = 0; index < challenges->count; ++index) { file_echo (file, "[] "); file_echo (file, format ("completed = %i ", challenges->completed [index])); file_echo (file, "requirement = ("); - for (u4 subindex = 0; subindex < special_count; ++subindex) { + for (natural subindex = 0; subindex < special_count; ++subindex) { file_echo (file, number_to_string (challenges->requirement [index] [subindex])); if (subindex < special_count - 1) { @@ -365,17 +365,17 @@ static v0 export_challenges (challenge_structure * challenges) { file = file_close (file); } -static u4 generate_challenge (u4 * special, challenge_structure * challenges) { - u4 index = urandomize (0, challenges->count - 1); - b4 valid = false; +static natural generate_challenge (natural * special, challenge_structure * challenges) { + natural index = random_natural (0, challenges->count - 1); + boolean valid = false; while (valid == false) { valid = true; - index = urandomize (0, challenges->count - 1); + index = random_natural (0, challenges->count - 1); if ((challenges->completed [index] > 0) && (challenges->type [index] != 1) && (challenges->type [index] != 3)) continue; - for (u4 check = 0; check < special_count; ++check) { + for (natural check = 0; check < special_count; ++check) { if (challenges->requirement [index] [check] > special [check]) { valid = false; break; @@ -386,23 +386,23 @@ static u4 generate_challenge (u4 * special, challenge_structure * challenges) { return (index); } -static v0 generate_challenges (u4 * special, challenge_structure * challenges, u4 * * daily_challenges, b4 * * completition) { +static procedure generate_challenges (natural * special, challenge_structure * challenges, natural * * daily_challenges, boolean * * completition) { (* daily_challenges) = allocate (challenges_per_day * sizeof (* * daily_challenges)); (* completition) = allocate (challenges_per_day * sizeof (* * completition)); - for (u4 index = 0; index < challenges_per_day; ++index) { + for (natural index = 0; index < challenges_per_day; ++index) { (* daily_challenges) [index] = generate_challenge (special, challenges); } } -static v0 render_challenges (u4 * special, challenge_structure * challenges, u4 * daily_challenges, b4 * completition) { +static procedure render_challenges (natural * special, challenge_structure * challenges, natural * daily_challenges, boolean * completition) { terminal_structure * terminal = terminal_initialize (); - u4 selection = 0; - b4 show_help = false; - b4 show_list = false; + natural selection = 0; + boolean show_help = false; + boolean show_list = false; - c1 * main_messages [] = { + character * main_messages [] = { "Press H or Tab to toggle help.", "Press Q or Escape to quit the program without saving changes.", "Press S or Enter to save changes and quit the program.", @@ -410,7 +410,7 @@ static v0 render_challenges (u4 * special, challenge_structure * challenges, u4 "Your daily challenges:" }; - c1 * help_messages [] = { + character * help_messages [] = { "Show help - H or Tab", "Quit - Q or Escape", "Save and quit - S or Enter", @@ -425,20 +425,20 @@ static v0 render_challenges (u4 * special, challenge_structure * challenges, u4 while (terminal->active == true) { terminal_render_background (terminal, ' ', colour_white, effect_normal); - for (u4 index = 0; index < array_length (main_messages); ++index) { + for (natural index = 0; index < array_length (main_messages); ++index) { terminal_render_string (terminal, main_messages [index], colour_white, effect_normal, 0, index); } - for (u4 index = 0; index < challenges_per_day; ++index) { - u4 type = challenges->type [daily_challenges [index]]; - c1 * class = challenges->class [daily_challenges [index]]; - c1 * description = challenges->description [daily_challenges [index]]; + for (natural index = 0; index < challenges_per_day; ++index) { + natural type = challenges->type [daily_challenges [index]]; + character * class = challenges->class [daily_challenges [index]]; + character * description = challenges->description [daily_challenges [index]]; - u4 effect = (selection == index) ? effect_bold : effect_normal; + natural effect = (selection == index) ? effect_bold : effect_normal; - u4 offset = array_length (main_messages) + 2; + natural offset = array_length (main_messages) + 2; - u4 alignment = string_length (class) + 4; + natural alignment = string_length (class) + 4; terminal_render_toggle (terminal, completition [index], 0, index + offset); @@ -452,9 +452,9 @@ static v0 render_challenges (u4 * special, challenge_structure * challenges, u4 } if (show_help == true) { - u4 offset = array_length (main_messages) + challenges_per_day + 3; + natural offset = array_length (main_messages) + challenges_per_day + 3; - for (u4 index = 0; index < array_length (help_messages); ++index) { + for (natural index = 0; index < array_length (help_messages); ++index) { terminal_render_string (terminal, help_messages [index], colour_white, effect_normal, 0, index + offset); } @@ -483,7 +483,7 @@ static v0 render_challenges (u4 * special, challenge_structure * challenges, u4 daily_challenges [selection] = generate_challenge (special, challenges); completition [selection] = false; } else if (/*(terminal->signal [signal_backspace] == true) || */(terminal->signal [signal_r] == true)) { - for (u4 index = 0; index < challenges_per_day; ++index) { + for (natural index = 0; index < challenges_per_day; ++index) { daily_challenges [index] = generate_challenge (special, challenges); completition [index] = false; } @@ -493,15 +493,15 @@ static v0 render_challenges (u4 * special, challenge_structure * challenges, u4 terminal = terminal_deinitialize (terminal); } -s4 main (s4 argc, c1 * * argv) { - u4 special [special_count] = { 0 }; +integer main (integer argc, character * * argv) { + natural special [special_count] = { 0 }; - u4 * daily_challenges = null; - b4 * completition = null; + natural * daily_challenges = null; + boolean * completition = null; challenge_structure * challenges = challenges_initialize (1024); - randomize_seed_by_time (); + random_integer_seed_by_time (); if (argc == 2) { if (string_compare (argv [1], "-r") == true) { diff --git a/xhape.h b/xhape.h index e97cff3..b14d541 100644 --- a/xhape.h +++ b/xhape.h @@ -17,15 +17,15 @@ /// for more details, if you dare, it is a lot of text that nobody wants to read... typedef struct { - u4 vertex_count; - u4 index_count; - u4 vertex_limit; - u4 index_limit; - f4 * vertex_array; - u4 * index_array; + natural vertex_count; + natural index_count; + natural vertex_limit; + natural index_limit; + real * vertex_array; + natural * index_array; } shape_node; -static shape_node * shape_allocate (u4 vertex_limit, u4 index_limit) { +static shape_node * shape_allocate (natural vertex_limit, natural index_limit) { shape_node * shape = allocate (sizeof (* shape)); shape->vertex_limit = vertex_limit; @@ -44,7 +44,7 @@ static shape_node * shape_deallocate (shape_node * shape) { return (deallocate (shape)); } -static v0 shape_add_vertex_unwrap_colour (shape_node * shape, f4 x, f4 y, f4 z, f4 u, f4 v, u4 colour) { +static procedure shape_add_vertex_unwrap_colour (shape_node * shape, real x, real y, real z, real u, real v, natural colour) { fatal_failure (shape->vertex_count + 9 > shape->vertex_limit, "shape_add_vertex"); if (shape->vertex_count + 9 > shape->vertex_limit) return; @@ -62,7 +62,7 @@ static v0 shape_add_vertex_unwrap_colour (shape_node * shape, f4 x, f4 y, f4 z, shape->vertex_count += 9; } -static v0 shape_add_index (shape_node * shape, u4 a, u4 b, u4 c) { +static procedure shape_add_index (shape_node * shape, natural a, natural b, natural c) { fatal_failure (shape->index_count + 3 > shape->index_limit, "shape_add_index"); if (shape->index_count + 3 > shape->index_limit) return; @@ -74,24 +74,24 @@ static v0 shape_add_index (shape_node * shape, u4 a, u4 b, u4 c) { shape->index_count += 3; } -//~static shape_node * shape_tetrahedron_unwrap (f4 x, f4 y, f4 z, f4 scale) { -//~static shape_node * shape_tetrahedron_unwrap_colour (f4 x, f4 y, f4 z, f4 scale, u4 colour) { -static shape_node * shape_tetrahedron_colour (f4 x, f4 y, f4 z, f4 scale, u4 colour) { +//~static shape_node * shape_tetrahedron_unwrap (real x, real y, real z, real scale) { +//~static shape_node * shape_tetrahedron_unwrap_colour (real x, real y, real z, real scale, natural colour) { +static shape_node * shape_tetrahedron_colour (real x, real y, real z, real scale, natural colour) { shape_node * shape = shape_allocate (4 * 9, 4 * 3); - f4 vertices [12] = { + real vertices [12] = { x + scale, y + scale, z + scale, x - scale, y - scale, z + scale, x - scale, y + scale, z - scale, x + scale, y - scale, z - scale }; - for (u4 vertex = 0; vertex < 4; ++vertex) { - f4 x = vertices [3 * vertex + 0]; - f4 y = vertices [3 * vertex + 1]; - f4 z = vertices [3 * vertex + 2]; - f4 u = (binary_sign (vertex >> 0) + 1.0f) / 2.0f; - f4 v = (binary_sign (vertex >> 1) + 1.0f) / 2.0f; + for (natural vertex = 0; vertex < 4; ++vertex) { + real x = vertices [3 * vertex + 0]; + real y = vertices [3 * vertex + 1]; + real z = vertices [3 * vertex + 2]; + real u = (binary_sign (vertex >> 0) + 1.0f) / 2.0f; + real v = (binary_sign (vertex >> 1) + 1.0f) / 2.0f; shape_add_vertex_unwrap_colour (shape, x, y, z, u, v, colour); } @@ -104,12 +104,12 @@ static shape_node * shape_tetrahedron_colour (f4 x, f4 y, f4 z, f4 scale, u4 col return (shape); } -//~static shape_node * shape_square (vector_3 * origin, f4 scale, u4 colour) { +//~static shape_node * shape_square (vector_3 * origin, real scale, natural colour) { //~shape_node * shape = shape_allocate (4, 2 * 3); //~shape_set_origin (shape, origin); - //~f4 central = square_root (2.0f) * scale / 2.0f; + //~real central = square_root (2.0f) * scale / 2.0f; //~vector_4 normal_colour = { //~normal_r (colour), @@ -118,8 +118,8 @@ static shape_node * shape_tetrahedron_colour (f4 x, f4 y, f4 z, f4 scale, u4 col //~normal_a (colour) //~}; - //~for (u4 vertex = 0; vertex < 4; ++vertex) { - //~vector_3 pos4 = { + //~for (natural vertex = 0; vertex < 4; ++vertex) { + //~vector_3 pointeger = { //~origin->x + binary_sign (vertex >> 0) * central, //~origin->y + binary_sign (vertex >> 1) * central, //~origin->z @@ -139,12 +139,12 @@ static shape_node * shape_tetrahedron_colour (f4 x, f4 y, f4 z, f4 scale, u4 col //~return (shape); //~} -//~static shape_node * shape_cube (vector_3 * origin, f4 scale, u4 colour) { +//~static shape_node * shape_cube (vector_3 * origin, real scale, natural colour) { //~shape_node * shape = shape_allocate (8, 12 * 3); //~shape_set_origin (shape, origin); - //~f4 central = square_root (3.0f) * scale / 2.0f; + //~real central = square_root (3.0f) * scale / 2.0f; //~vector_4 normal_colour = { //~normal_r (colour), @@ -153,8 +153,8 @@ static shape_node * shape_tetrahedron_colour (f4 x, f4 y, f4 z, f4 scale, u4 col //~normal_a (colour) //~}; - //~for (u4 vertex = 0; vertex < 8; ++vertex) { - //~vector_3 pos4 = { + //~for (natural vertex = 0; vertex < 8; ++vertex) { + //~vector_3 pointeger = { //~origin->x + binary_sign (vertex >> 0) * central, //~origin->y + binary_sign (vertex >> 1) * central, //~origin->z + binary_sign (vertex >> 2) * central diff --git a/xiasma.h b/xiasma.h index 93fd0e2..b414456 100755 --- a/xiasma.h +++ b/xiasma.h @@ -115,19 +115,19 @@ enum { register_8, register_9, register_10, register_11, register_12, register_13, register_14, register_15 }; -static s4 empty_count = 0; -static s4 empty_holes = 1; -static s4 * empty_array = null; -static s4 * empty_imbue = null; -static s4 * empty_store = null; +static integer empty_count = 0; +static integer empty_holes = 1; +static integer * empty_array = null; +static integer * empty_imbue = null; +static integer * empty_store = null; -static s4 text_sector_size = 0; -static s4 data_sector_size = 0; +static integer text_sector_size = 0; +static integer data_sector_size = 0; -static unsigned c1 * text_sector_byte = null; -static unsigned c1 * data_sector_byte = null; +static unsigned character * text_sector_byte = null; +static unsigned character * data_sector_byte = null; -static unsigned c1 elf_main_header_byte [elf_main_header_size] = { +static unsigned character elf_main_header_byte [elf_main_header_size] = { 0x7f, 0x45, 0x4c, 0x46, 0x02, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x3e, 0x00, 0x01, 0x00, 0x00, 0x00, @@ -138,7 +138,7 @@ static unsigned c1 elf_main_header_byte [elf_main_header_size] = { 0x02, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static unsigned c1 elf_text_sector_byte [elf_text_sector_size] = { +static unsigned character elf_text_sector_byte [elf_text_sector_size] = { 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -148,7 +148,7 @@ static unsigned c1 elf_text_sector_byte [elf_text_sector_size] = { 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static unsigned c1 elf_data_sector_byte [elf_data_sector_size] = { +static unsigned character elf_data_sector_byte [elf_data_sector_size] = { 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -158,37 +158,37 @@ static unsigned c1 elf_data_sector_byte [elf_data_sector_size] = { 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -static s4 front (s4 data) { return ((data >= register_4) && (data <= register_7)); } -static s4 lower (s4 data) { return ((data >= register_0) && (data <= register_7)); } -static s4 upper (s4 data) { return ((data >= register_8) && (data <= register_15)); } +static integer front (integer data) { return ((data >= register_4) && (data <= register_7)); } +static integer lower (integer data) { return ((data >= register_0) && (data <= register_7)); } +static integer upper (integer data) { return ((data >= register_8) && (data <= register_15)); } -static s4 far (s4 label) { return (label && 1); } -static s4 near (s4 label) { return (label && 0); } +static integer far (integer label) { return (label && 1); } +static integer near (integer label) { return (label && 0); } -static v0 inset (s4 when, s4 data) { +static procedure inset (integer when, integer data) { text_sector_byte [text_sector_size] = (unsigned char) data; text_sector_size += (unsigned int) when; } -static v0 inset_immediate (s4 when, s4 size, s4 data) { +static procedure inset_immediate (integer when, integer size, integer data) { inset ((when), (data >> 0) & 0xff); inset ((when) && (size >= size_16), (data >> 8) & 0xff); inset ((when) && (size >= size_32), (data >> 16) & 0xff); inset ((when) && (size >= size_32), (data >> 24) & 0xff); } -static v0 inset_memory (s4 when, s4 size, s4 data, s4 base) { +static procedure inset_memory (integer when, integer size, integer data, integer base) { empty_array [empty_holes] = text_sector_size; empty_imbue [empty_holes] = data; - empty_holes += (int) when; + empty_holes += (integer) when; inset_immediate (when, size, base); } -static s4 store_relative (s4 * array) { - s4 relative = array [1]; +static integer store_relative (integer * array) { + integer relative = array [1]; empty_array [empty_holes] = text_sector_size; empty_imbue [empty_holes] = relative; @@ -198,8 +198,8 @@ static s4 store_relative (s4 * array) { return (1); } -static s4 store_memory (s4 * array) { - s4 operation = array [0], +static integer store_memory (integer * array) { + integer operation = array [0], memory = array [1]; empty_store [memory] = text_sector_size; @@ -209,8 +209,8 @@ static s4 store_memory (s4 * array) { return (1); } -static s4 store_immediate (s4 * array) { - s4 index = 0, +static integer store_immediate (integer * array) { + integer index = 0, operation = array [0], size = array [1], amount = array [2]; @@ -222,41 +222,41 @@ static s4 store_immediate (s4 * array) { return (amount + 2); } -static v0 short_prefix (s4 size) { +static procedure short_prefix (integer size) { inset (size == size_16, 0x66); } -static v0 long_prefix (s4 size, s4 to, s4 destination, s4 from, s4 source) { - s4 to_upper = (to == for_register) && (upper (destination)), +static procedure long_prefix (integer size, integer to, integer destination, integer from, integer source) { + integer to_upper = (to == for_register) && (upper (destination)), from_upper = (from == for_register) && (upper (source)), extension = (size == size_64); inset (extension || to_upper || from_upper, 0x40 + 0x01 * to_upper + 0x04 * from_upper + 0x08 * extension); } -static v0 modify_registers (s4 to, s4 destination, s4 from, s4 source) { - s4 to_register_from_register = ((to == for_register) && (from == for_register)); +static procedure modify_registers (integer to, integer destination, integer from, integer source) { + integer to_register_from_register = ((to == for_register) && (from == for_register)); inset (to_register_from_register, 0xc0 + 0x01 * (destination & 0x07) + 0x08 * (source & 0x07)); } -static v0 modify_memory (s4 operation, s4 to, s4 from) { - s4 to_register_from_memory = ((to == for_register) && (from == for_memory)), +static procedure modify_memory (integer operation, integer to, integer from) { + integer to_register_from_memory = ((to == for_register) && (from == for_memory)), to_memory_from_register = ((to == for_memory) && (from == for_register)), to_memory_from_immediate = ((to == for_memory) && (from == for_immediate)); inset (to_register_from_memory || to_memory_from_register, 0x05 + 0x08 * operation * to_memory_from_immediate); } -static s4 build_f8 (s4 * array) { - s4 operation = array [0], +static integer build_real_64 (integer * array) { + integer operation = array [0], size = array [1], to = array [2], destination = array [3], from = array [4], source = array [5]; - s4 to_register_from_register = ((to == for_register) && (from == for_register)), + integer to_register_from_register = ((to == for_register) && (from == for_register)), to_register_from_memory = ((to == for_register) && (from == for_memory)), to_register_from_immediate = ((to == for_register) && (from == for_immediate)), to_register_from_relative = ((to == for_register) && (from == for_relative)), @@ -286,13 +286,13 @@ static s4 build_f8 (s4 * array) { return (5); } -static s4 build_single (s4 * array) { - s4 operation = array [0], +static integer build_single (integer * array) { + integer operation = array [0], size = array [1], to = array [2], destination = array [3]; - s4 irregularity = ((operation == increment) || (operation == decrement)); + integer irregularity = ((operation == increment) || (operation == decrement)); short_prefix (size); @@ -310,10 +310,10 @@ static s4 build_single (s4 * array) { return (3); } -static s4 build_static_1 (s4 * array) { - s4 operation = array [0]; +static integer build_static_1 (integer * array) { + integer operation = array [0]; - unsigned c1 data [] = { + unsigned character data [] = { 0x90, 0xc3, 0xcb, 0xc9, 0x9d, 0x9c }; @@ -322,13 +322,13 @@ static s4 build_static_1 (s4 * array) { return (0); } -static s4 build_static_2 (s4 * array) { - s4 operation = array [0]; +static integer build_static_2 (integer * array) { + integer operation = array [0]; - unsigned s2 data [] = { + unsigned integer_16 data [] = { 0x050f, 0xa20f, 0xd0d9, 0xe0d9, 0xe1d9, 0xe4d9, 0xe5d9, 0xe8d9, 0xe9d9, 0xead9, 0xebd9, 0xecd9, 0xedd9, 0xeed9, 0xf0d9, 0xf1d9, - 0xf2d9, 0xf3d9, 0xf4d9, 0xf5d9, 0xf6d9, 0xf7d9, 0xf8d9, 0xf9d9, + 0xf2d9, 0xf3d9, 0xreald9, 0xf5d9, 0xf6d9, 0xf7d9, 0xreal_64d9, 0xf9d9, 0xfad9, 0xfbd9, 0xfcd9, 0xfdd9, 0xfed9, 0xffd9 }; @@ -337,8 +337,8 @@ static s4 build_static_2 (s4 * array) { return (0); } -static s4 build_jump_if (s4 * array) { - s4 operation = array [0], +static integer build_jump_if (integer * array) { + integer operation = array [0], size = array [1], location = array [3]; @@ -352,8 +352,8 @@ static s4 build_jump_if (s4 * array) { return (3); } -static s4 build_move_if (s4 * array) { - s4 operation = array [0], +static integer build_move_if (integer * array) { + integer operation = array [0], size = array [1], to = array [2], destination = array [3], @@ -374,8 +374,8 @@ static s4 build_move_if (s4 * array) { return (5); } -static s4 build_set_if (s4 * array) { - s4 operation = array [0], +static integer build_set_if (integer * array) { + integer operation = array [0], to = array [2], destination = array [3]; @@ -393,8 +393,8 @@ static s4 build_set_if (s4 * array) { return (3); } -static s4 build_jump (s4 * array) { - s4 operation = array [0], +static integer build_jump (integer * array) { + integer operation = array [0], size = array [1], to = array [2], destination = array [3]; @@ -413,8 +413,8 @@ static s4 build_jump (s4 * array) { return (3); } -static s4 build_move (s4 * array) { - s4 operation = array [0], +static integer build_move (integer * array) { + integer operation = array [0], size = array [1], to = array [2], destination = array [3], @@ -454,8 +454,8 @@ static s4 build_move (s4 * array) { return (5 + (size == size_64)); } -static s4 build_call (s4 * array) { - s4 operation = array [0], +static integer build_call (integer * array) { + integer operation = array [0], from = array [1], source = array [2]; @@ -471,8 +471,8 @@ static s4 build_call (s4 * array) { return (2); } -static s4 build_enter (s4 * array) { - s4 operation = array [0], +static integer build_enter (integer * array) { + integer operation = array [0], dynamic_storage = array [1], nesting_level = array [2]; @@ -484,8 +484,8 @@ static s4 build_enter (s4 * array) { return (2); } -static s4 build_f4 (s4 * array) { - s4 operation = array [0], +static integer build_real (integer * array) { + integer operation = array [0], size = array [1], from = array [2], source = array [3]; @@ -499,8 +499,8 @@ static s4 build_f4 (s4 * array) { return (3); } -static s4 build_shift (s4 * array) { - s4 operation = array [0], +static integer build_shift (integer * array) { + integer operation = array [0], size = array [1], to = array [2], destination = array [3], @@ -521,8 +521,8 @@ static s4 build_shift (s4 * array) { return (5); } -static s4 build_in_out (s4 * array) { - s4 move = array [0], +static integer build_in_out (integer * array) { + integer move = array [0], size = array [1], type = array [2], port = array [3]; @@ -536,8 +536,8 @@ static s4 build_in_out (s4 * array) { return (3); } -static s4 build_pop (s4 * array) { - s4 operation = array [0], +static integer build_pop (integer * array) { + integer operation = array [0], size = array [1], to = array [2], destination = array [3]; @@ -555,8 +555,8 @@ static s4 build_pop (s4 * array) { return (3); } -static s4 build_push (s4 * array) { - s4 operation = array [0], +static integer build_push (integer * array) { + integer operation = array [0], size = array [1], from = array [2], source = array [3]; @@ -576,8 +576,8 @@ static s4 build_push (s4 * array) { return (3); } -static s4 build_swap (s4 * array) { - s4 operation = array [0], +static integer build_swap (integer * array) { + integer operation = array [0], size = array [1], destination = array [3]; @@ -589,8 +589,8 @@ static s4 build_swap (s4 * array) { return (3); } -static s4 build_bit_scan (s4 * array) { - s4 operation = array [0], +static integer build_bit_scan (integer * array) { + integer operation = array [0], size = array [1], destination = array [3], from = array [4], @@ -611,8 +611,8 @@ static s4 build_bit_scan (s4 * array) { return (5); } -static s4 build_loop (s4 * array) { - s4 operation = array [0], +static integer build_loop (integer * array) { + integer operation = array [0], location = array [3]; inset (operation == loop_not_equal, 0xe0); @@ -624,8 +624,8 @@ static s4 build_loop (s4 * array) { return (3); } -static v0 elf_main_header (v0) { - s4 enter = empty_store [0] + 0x4000b0; +static procedure elf_main_header (none) { + integer enter = empty_store [0] + 0x4000b0; elf_main_header_byte [16] = 0x02; elf_main_header_byte [ 7] = 0x03; @@ -634,26 +634,26 @@ static v0 elf_main_header (v0) { memory_copy (& elf_main_header_byte [24], & enter, sizeof (enter)); } -static v0 elf_text_sector (unsigned s8 text_size, unsigned s8 data_size) { - unsigned s8 text = elf_header_size + text_size - data_size; +static procedure elf_text_sector (unsigned integer_64 text_size, unsigned integer_64 data_size) { + unsigned integer_64 text = elf_header_size + text_size - data_size; - memory_copy (& elf_text_sector_byte [32], & text, (int) sizeof (text)); - memory_copy (& elf_text_sector_byte [40], & text, (int) sizeof (text)); + memory_copy (& elf_text_sector_byte [32], & text, (integer) sizeof (text)); + memory_copy (& elf_text_sector_byte [40], & text, (integer) sizeof (text)); } -static v0 elf_data_sector (unsigned s8 text_size, unsigned s8 data_size) { - unsigned s8 data = data_size; - unsigned s8 core = elf_header_size + text_size - data_size; - unsigned s8 move = 0x401000 + core; +static procedure elf_data_sector (unsigned integer_64 text_size, unsigned integer_64 data_size) { + unsigned integer_64 data = data_size; + unsigned integer_64 core = elf_header_size + text_size - data_size; + unsigned integer_64 move = 0x401000 + core; - memory_copy (& elf_data_sector_byte [ 8], & core, (int) sizeof (core)); - memory_copy (& elf_data_sector_byte [16], & move, (int) sizeof (move)); - memory_copy (& elf_data_sector_byte [24], & move, (int) sizeof (move)); - memory_copy (& elf_data_sector_byte [32], & data, (int) sizeof (data)); - memory_copy (& elf_data_sector_byte [40], & data, (int) sizeof (data)); + memory_copy (& elf_data_sector_byte [ 8], & core, (integer) sizeof (core)); + memory_copy (& elf_data_sector_byte [16], & move, (integer) sizeof (move)); + memory_copy (& elf_data_sector_byte [24], & move, (integer) sizeof (move)); + memory_copy (& elf_data_sector_byte [32], & data, (integer) sizeof (data)); + memory_copy (& elf_data_sector_byte [40], & data, (integer) sizeof (data)); } -static s4 (* build_instruction []) (s4 * array) = { +static integer (* build_instruction []) (integer * array) = { store_memory, store_relative, store_immediate, build_double, build_double, build_double, build_double, build_double, build_double, build_double, build_double, build_single, build_single, build_single, build_single, build_single, build_single, build_single, build_single, @@ -674,20 +674,20 @@ static s4 (* build_instruction []) (s4 * array) = { build_swap, build_bit_scan, build_bit_scan, build_loop, build_loop, build_loop }; -static s4 assemble (s4 count, s4 * array) { - for (u4 index = 0; index < count; ++index) { +static integer assemble (integer count, integer * array) { + for (natural index = 0; index < count; ++index) { index += build_instruction [array [index]] (& array [index]); } - for (u4 index = 1; index < empty_holes; ++index) { - s4 set = 0; - s4 get = empty_array [index]; + for (natural index = 1; index < empty_holes; ++index) { + integer set = 0; + integer get = empty_array [index]; - memory_copy ((c1 *) & set, (c1 *) & text_sector_byte [get], (int) sizeof (set)); + memory_copy ((character *) & set, (character *) & text_sector_byte [get], (integer) sizeof (set)); set += empty_store [empty_imbue [index]]; - memory_copy ((c1 *) & text_sector_byte [get], (c1 *) & set, (int) sizeof (set)); + memory_copy ((character *) & text_sector_byte [get], (character *) & set, (integer) sizeof (set)); } return (log_success); diff --git a/xighlight.c b/xighlight.c index 7f77bd3..41c9dd8 100755 --- a/xighlight.c +++ b/xighlight.c @@ -20,7 +20,7 @@ #include #include -static v0 conditionally_exit (language_structure * language, syntax_structure * syntax, b4 terminate) { +static procedure conditionally_exit (language_structure * language, syntax_structure * syntax, boolean terminate) { syntax = syntax_deinitialize (syntax); language = language_deinitialize (language); @@ -29,13 +29,13 @@ static v0 conditionally_exit (language_structure * language, syntax_structure * } } -static v0 print_common (v0) { +static procedure print_common (none) { print ("/B/4xighlight/-: /4Terminal syntax highlighter/-\n\n"); print ("\tAuthor: /4Ognjen 'xolatile' Milan Robovic/-\n"); print ("\tLicense: /4GNU//GPLv3/-\n\n"); } -static v0 print_help (v0) { +static procedure print_help (none) { print_common (); print ("Example usage:\n\n"); @@ -45,7 +45,7 @@ static v0 print_help (v0) { print ("Supported languages:\n\n"); for (language_enumeration index = 0; index < language_count; ++index) { - c1 align [32] = ""; + character align [32] = ""; print ("\t/B/4%s/- /4%s/- /0---/- %s syntax highlighting\n", language_short_option [index], @@ -54,21 +54,21 @@ static v0 print_help (v0) { } } -static v0 print_version (v0) { +static procedure print_version (none) { print_common (); print ("\tVersion: /40 (Zero)/-\n"); } -s4 main (s4 argc, c1 * * argv) { - u4 select = language_count; - u4 length = 0; - c1 * buffer = null; +integer main (integer argc, character * * argv) { + natural select = language_count; + natural length = 0; + character * buffer = null; syntax_structure * syntax = syntax_initialize (360); language_structure * language = language_initialize (false); - for (s4 argument = 1; argument < argc; ++argument) { + for (integer argument = 1; argument < argc; ++argument) { if (argument_compare (argv [argument], "-h", "--help") == true) { print_help (); conditionally_exit (language, syntax, true); @@ -77,7 +77,7 @@ s4 main (s4 argc, c1 * * argv) { conditionally_exit (language, syntax, true); } - for (u4 index = 0; index < language_count; ++index) { + for (natural index = 0; index < language_count; ++index) { if (argument_compare (argv [argument], language_short_option [index], language_long_option [index]) == true) { (* (language_highlighter [index])) (language, syntax); select = index; @@ -87,7 +87,7 @@ s4 main (s4 argc, c1 * * argv) { if (file_exists (argv [argument]) == true) { if (select == language_count) { - select = (u4) file_type (argv [argument]); + select = (natural) file_type (argv [argument]); } if (buffer == null) { buffer = file_import (argv [argument]); @@ -105,7 +105,7 @@ s4 main (s4 argc, c1 * * argv) { language_conditionally_select (language, syntax, select); - for (u4 offset = 0; buffer [offset] != '\0'; offset += length) { + for (natural offset = 0; buffer [offset] != '\0'; offset += length) { select = syntax_select (syntax, & buffer [offset], & length); if (select >= syntax->count) { diff --git a/xision.h b/xision.h index c943734..9b188a2 100644 --- a/xision.h +++ b/xision.h @@ -48,70 +48,70 @@ typedef struct { PFNGLBUFFERDATAPROC glBufferData; PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv; - b4 signal [signal_count]; - b4 cursor [cursor_count]; - s4 cursor_x; - s4 cursor_y; - - b4 using_precomputed_spritesheet; - u8 spritesheet_size; - u8 vertex_limit; - u8 index_limit; - u4 gameplay_framerate; - u4 animation_framerate; - u4 tab_width; - u4 default_font; - b4 active; - u4 window_width; - u4 window_height; - f4 pixel_width; - f4 pixel_height; - u4 framerate; - u8 frame_time; - u8 frame_begin; - u8 frame_end; - u4 global_tick; - u4 gameplay_tick; - u4 animation_tick; - b4 freeze_cursor; - b4 freeze_signal; - u4 vertex_object; - u4 vertex_buffer; - u4 index_buffer; - u4 vertex_shader; - u4 fragment_shader; - u4 shader_program; - u4 spritesheet; - u4 vertex_count; - u4 index_count; - f4 * vertex_array; - u4 * index_array; - u4 sprite_count; - u4 font_count; - u4 * spritesheet_data; - u4 * * sprite_data; - u4 * sprite_width; - u4 * sprite_height; - f4 * sprite_u; - f4 * sprite_v; - u4 * * font_index; - u4 * * font_width; - u4 * * font_height; - c1 * font_begin; - c1 * font_end; - f4 projection_matrix [16]; - f4 movement_matrix [16]; - f4 rotation_matrix [16]; - f4 aspect_ratio; - f4 field_of_view; - f4 far_plane; - f4 near_plane; - f4 camera_x; - f4 camera_y; - f4 sensitivity; + boolean signal [signal_count]; + boolean cursor [cursor_count]; + integer cursor_x; + integer cursor_y; + + boolean using_precomputed_spritesheet; + caliber spritesheet_size; + caliber vertex_limit; + caliber index_limit; + natural gameplay_framerate; + natural animation_framerate; + natural tab_width; + natural default_font; + boolean active; + natural window_width; + natural window_height; + real pixel_width; + real pixel_height; + natural framerate; + natural_64 frame_time; + natural_64 frame_begin; + natural_64 frame_end; + natural global_tick; + natural gameplay_tick; + natural animation_tick; + boolean freeze_cursor; + boolean freeze_signal; + natural vertex_object; + natural vertex_buffer; + natural index_buffer; + natural vertex_shader; + natural fragment_shader; + natural shader_program; + natural spritesheet; + natural vertex_count; + natural index_count; + real * vertex_array; + natural * index_array; + natural sprite_count; + natural font_count; + natural * spritesheet_data; + natural * * sprite_data; + natural * sprite_width; + natural * sprite_height; + real * sprite_u; + real * sprite_v; + natural * * font_index; + natural * * font_width; + natural * * font_height; + character * font_begin; + character * font_end; + real projection_matrix [16]; + real movement_matrix [16]; + real rotation_matrix [16]; + real aspect_ratio; + real field_of_view; + real far_plane; + real near_plane; + real camera_x; + real camera_y; + real sensitivity; } vision_structure; -static u4 vision_sprite_raw_import (vision_structure * vision, u4 * data, u4 width, u4 height) { +static natural vision_sprite_raw_import (vision_structure * vision, natural * data, natural width, natural height) { fatal_failure (vision->active == true, "vision_sprite_raw_import: OpenGL renderer is already initialized."); fatal_failure (data == null, "vision_sprite_raw_import: Data is null pointer."); fatal_failure (width == 0, "vision_sprite_raw_import: Font image width is zero."); @@ -134,10 +134,10 @@ static u4 vision_sprite_raw_import (vision_structure * vision, u4 * data, u4 wid return (vision->sprite_count - 1); } -static u4 vision_font_raw_import (vision_structure * vision, u4 * data, u4 image_width, c1 begin, c1 end, u4 empty) { - u4 pointer = 0; - u4 width = 0; - u4 height = 0; +static natural vision_font_raw_import (vision_structure * vision, natural * data, natural image_width, character begin, character end, natural empty) { + natural pointer = 0; + natural width = 0; + natural height = 0; fatal_failure (vision->active == true, "vision_font_raw_import: OpenGL renderer is already initialized."); fatal_failure (data == null, "vision_font_raw_import: Data is null pointer."); @@ -155,19 +155,19 @@ static u4 vision_font_raw_import (vision_structure * vision, u4 * data, u4 image vision->font_begin [vision->font_count - 1] = begin; vision->font_end [vision->font_count - 1] = end; - vision->font_index [vision->font_count - 1] = allocate ((u8) (end - begin + 1) * sizeof (* * vision->font_index)); - vision->font_width [vision->font_count - 1] = allocate ((u8) (end - begin + 1) * sizeof (* * vision->font_width)); - vision->font_height [vision->font_count - 1] = allocate ((u8) (end - begin + 1) * sizeof (* * vision->font_height)); + vision->font_index [vision->font_count - 1] = allocate ((caliber) (end - begin + 1) * sizeof (* * vision->font_index)); + vision->font_width [vision->font_count - 1] = allocate ((caliber) (end - begin + 1) * sizeof (* * vision->font_width)); + vision->font_height [vision->font_count - 1] = allocate ((caliber) (end - begin + 1) * sizeof (* * vision->font_height)); - for (c1 index = begin; index <= end; ++index) { + for (character index = begin; index <= end; ++index) { for ( ; data [pointer] == empty; ++pointer); for (width = 0; data [pointer + width] != empty; ++width); for (height = 0; data [pointer + height * image_width] != empty; ++height); - u4 * buffer = allocate (width * height * sizeof (* buffer)); + natural * buffer = allocate (width * height * sizeof (* buffer)); - for (u4 y = 0; y < height; ++y) { - for (u4 x = 0; x < width; ++x) { + for (natural y = 0; y < height; ++y) { + for (natural x = 0; x < width; ++x) { buffer [y * width + x] = data [pointer + (y * image_width) + x]; } } @@ -188,21 +188,21 @@ static u4 vision_font_raw_import (vision_structure * vision, u4 * data, u4 image return (vision->font_count - 1); } -static u4 vision_sprite_import (vision_structure * vision, c1 * path) { - u4 width = 0; - u4 height = 0; - u4 * data = null; +static natural vision_sprite_import (vision_structure * vision, character * path) { + natural width = 0; + natural height = 0; + natural * data = null; data = format_image_import (path, & width, & height); return (vision_sprite_raw_import (vision, data, width, height)); } -static u4 vision_font_import (vision_structure * vision, c1 * path, c1 begin, c1 end, u4 colour) { - u4 width = 0; - u4 height = 0; - u4 result = 0; - u4 * data = null; +static natural vision_font_import (vision_structure * vision, character * path, character begin, character end, natural colour) { + natural width = 0; + natural height = 0; + natural result = 0; + natural * data = null; data = format_image_import (path, & width, & height); @@ -213,30 +213,30 @@ static u4 vision_font_import (vision_structure * vision, c1 * path, c1 begin, c1 return (result); } -static u4 vision_sprite_width (vision_structure * vision, u4 sprite) { +static natural vision_sprite_width (vision_structure * vision, natural sprite) { return (vision->sprite_width [sprite]); } -static u4 vision_sprite_height (vision_structure * vision, u4 sprite) { +static natural vision_sprite_height (vision_structure * vision, natural sprite) { return (vision->sprite_height [sprite]); } -static u4 vision_center_x (vision_structure * vision, u4 size) { +static natural vision_center_x (vision_structure * vision, natural size) { return ((vision->window_width - size) / 2); } -static u4 vision_center_y (vision_structure * vision, u4 size) { +static natural vision_center_y (vision_structure * vision, natural size) { return ((vision->window_height - size) / 2); } -static b4 vision_cursor_inside (vision_structure * vision, s4 x, s4 y, u4 width, u4 height) { +static boolean vision_cursor_inside (vision_structure * vision, integer x, integer y, natural width, natural height) { return ((vision->cursor_x > x) && (vision->cursor_y > y) && - (vision->cursor_x < x + (int) width) && - (vision->cursor_y < y + (int) height)); + (vision->cursor_x < x + (integer) width) && + (vision->cursor_y < y + (integer) height)); } -static b4 vision_cursor_left_click (vision_structure * vision, s4 x, s4 y, u4 width, u4 height) { +static boolean vision_cursor_left_click (vision_structure * vision, integer x, integer y, natural width, natural height) { if (vision->cursor [cursor_left] == true) { vision->freeze_cursor = true; @@ -246,7 +246,7 @@ static b4 vision_cursor_left_click (vision_structure * vision, s4 x, s4 y, u4 wi return (false); } -static b4 vision_cursor_right_click (vision_structure * vision, s4 x, s4 y, u4 width, u4 height) { +static boolean vision_cursor_right_click (vision_structure * vision, integer x, integer y, natural width, natural height) { if (vision->cursor [cursor_right]) { vision->freeze_cursor = true; @@ -256,8 +256,8 @@ static b4 vision_cursor_right_click (vision_structure * vision, s4 x, s4 y, u4 w return (false); } -static v0 vision_import_spritesheet (vision_structure * vision, c1 * data_file) { - s4 file = file_open (data_file, file_flag_read); +static procedure vision_import_spritesheet (vision_structure * vision, character * data_file) { + integer file = file_open (data_file, file_flag_read); fatal_failure (vision->active == true, "vision_import_spritesheet: OpenGL renderer is already initialized."); @@ -286,14 +286,14 @@ static v0 vision_import_spritesheet (vision_structure * vision, c1 * data_file) file_read (file, vision->font_begin, vision->font_count * sizeof (* vision->font_begin)); file_read (file, vision->font_end, vision->font_count * sizeof (* vision->font_end)); - for (u4 index = 0; index < vision->font_count; ++index) { - u4 range = (u4) (vision->font_end [index] - vision->font_begin [index]) + 1; + for (natural index = 0; index < vision->font_count; ++index) { + natural range = (natural) (vision->font_end [index] - vision->font_begin [index]) + 1; vision->font_index [index] = allocate (range * sizeof (* * vision->font_index)); vision->font_width [index] = allocate (range * sizeof (* * vision->font_width)); vision->font_height [index] = allocate (range * sizeof (* * vision->font_height)); - for (u4 subindex = 0; subindex < range; ++subindex) { + for (natural subindex = 0; subindex < range; ++subindex) { file_read (file, & vision->font_index [index] [subindex], sizeof (* * vision->font_index)); file_read (file, & vision->font_width [index] [subindex], sizeof (* * vision->font_width)); file_read (file, & vision->font_height [index] [subindex], sizeof (* * vision->font_height)); @@ -306,8 +306,8 @@ static v0 vision_import_spritesheet (vision_structure * vision, c1 * data_file) vision->font_count = 0; } -static v0 vision_export_spritesheet (vision_structure * vision, c1 * data_file) { - s4 file = file_open (data_file, file_flag_write | file_flag_create | file_flag_truncate); +static procedure vision_export_spritesheet (vision_structure * vision, character * data_file) { + integer file = file_open (data_file, file_flag_write | file_flag_create | file_flag_truncate); fatal_failure (vision->spritesheet_data == null, "vision_export_spritesheet: OpenGL renderer can't access spritesheet data."); @@ -325,8 +325,8 @@ static v0 vision_export_spritesheet (vision_structure * vision, c1 * data_file) file_write (file, vision->font_begin, vision->font_count * sizeof (* vision->font_begin)); file_write (file, vision->font_end, vision->font_count * sizeof (* vision->font_end)); - for (u4 index = 0; index < vision->font_count; ++index) { - for (u4 subindex = 0; subindex < (u4) (vision->font_end [index] - vision->font_begin [index]) + 1; ++subindex) { + for (natural index = 0; index < vision->font_count; ++index) { + for (natural subindex = 0; subindex < (natural) (vision->font_end [index] - vision->font_begin [index]) + 1; ++subindex) { file_write (file, & vision->font_index [index] [subindex], sizeof (* * vision->font_index)); file_write (file, & vision->font_width [index] [subindex], sizeof (* * vision->font_width)); file_write (file, & vision->font_height [index] [subindex], sizeof (* * vision->font_height)); @@ -338,8 +338,8 @@ static v0 vision_export_spritesheet (vision_structure * vision, c1 * data_file) print ("/c Exported internal binary data of OpenGL spritesheet."); } -static vision_structure * vision_initialize (u4 gameplay_framerate, u4 animation_framerate, b4 use_precomputed_spritesheet, - u4 vertex_limit, u4 index_limit, u4 spritesheet_side) { +static vision_structure * vision_initialize (natural gameplay_framerate, natural animation_framerate, boolean use_precomputed_spritesheet, + natural vertex_limit, natural index_limit, natural spritesheet_side) { vision_structure * vision = allocate (sizeof (* vision)); vision->using_precomputed_spritesheet = use_precomputed_spritesheet; @@ -362,7 +362,7 @@ static vision_structure * vision_initialize (u4 gameplay_framerate, u4 animation vision_import_spritesheet (vision, "binary/spritesheet.bin"); } - print ("[/2Success/-] Initialized OpenGL renderer.\n"); + print ("/s Initialized OpenGL renderer.\n"); return (vision); } @@ -370,7 +370,7 @@ static vision_structure * vision_initialize (u4 gameplay_framerate, u4 animation static vision_structure * vision_deinitialize (vision_structure * vision) { vision->active = false; - for (u4 index = 0; index < vision->font_count; ++index) { + for (natural index = 0; index < vision->font_count; ++index) { vision->font_index [index] = deallocate (vision->font_index [index]); vision->font_width [index] = deallocate (vision->font_width [index]); vision->font_height [index] = deallocate (vision->font_height [index]); @@ -408,13 +408,13 @@ static vision_structure * vision_deinitialize (vision_structure * vision) { glfwTerminate (); - print ("[/2Success/-] Deinitialized OpenGL renderer.\n"); + print ("/s Deinitialized OpenGL renderer.\n"); return (deallocate (vision)); } -static v0 vision_configure (vision_structure * vision, u4 window_width, u4 window_height, c1 * window_title) { - u8 font_bitmap [190] = { +static procedure vision_configure (vision_structure * vision, natural window_width, natural window_height, character * window_title) { + natural_64 font_bitmap [190] = { 0x0000000000000000, 0x0000000000000000, 0x0000101010101010, 0x1000101000000000, 0x0024242400000000, 0x0000000000000000, 0x00002424247e2424, 0x7e24242400000000, 0x0010107c9290907c, 0x1212927c10100000, 0x0000649468081010, 0x202c524c00000000, 0x000018242418304a, 0x4444443a00000000, 0x0010101000000000, 0x0000000000000000, 0x0000081020202020, 0x2020100800000000, @@ -449,7 +449,7 @@ static v0 vision_configure (vision_structure * vision, u4 window_width, u4 windo 0x0000300808080408, 0x0808083000000000, 0x000000000062928c, 0x0000000000000000 }; - c1 * vertex_shader = + character * vertex_shader = "#version 330 core\n" "in vec3 vertex_xyz;\n" "in vec2 vertex_uv;\n" @@ -459,34 +459,34 @@ static v0 vision_configure (vision_structure * vision, u4 window_width, u4 windo "uniform mat4 projection_matrix;\n" "uniform mat4 movement_matrix;\n" "uniform mat4 rotation_matrix;\n" - "v0 main () {\n" + "procedure main () {\n" " gl_Position = movement_matrix * rotation_matrix * projection_matrix * vec4 (vertex_xyz, 1.0);\n" " fragment_uv = vertex_uv;\n" " fragment_rgba = vertex_rgba;\n" "}\n"; - c1 * fragment_shader = + character * fragment_shader = "#version 330 core\n" "uniform sampler2D texture_p;\n" "in vec2 fragment_uv;\n" "in vec4 fragment_rgba;\n" "out vec4 data;\n" - "v0 main () {\n" + "procedure main () {\n" " data = texture (texture_p, fragment_uv) * fragment_rgba;\n" "}\n"; - u4 * dumb_buffer = null; - u4 * order = null; + natural * dumb_buffer = null; + natural * order = null; - u4 xyz_attribute = 0; - u4 uv_attribute = 0; - u4 rgba_attribute = 0; + natural xyz_attribute = 0; + natural uv_attribute = 0; + natural rgba_attribute = 0; - u4 u = 0; - u4 v = 0; + natural u = 0; + natural v = 0; if (vision->using_precomputed_spritesheet == true) { - for (u4 index = 0; index < 95; ++index) { + for (natural index = 0; index < 95; ++index) { vision->font_index [vision->font_count] [index] = ++vision->sprite_count - 1; } @@ -498,13 +498,13 @@ static v0 vision_configure (vision_structure * vision, u4 window_width, u4 windo dumb_buffer = allocate (256 * sizeof (* dumb_buffer)); - for (u4 index = 0; index < 256; ++index) { + for (natural index = 0; index < 256; ++index) { dumb_buffer [index] = 0xffffffff; } ++vision->font_count; - u4 current = vision->font_count - 1; + natural current = vision->font_count - 1; vision->font_index = reallocate (vision->font_index, vision->font_count * sizeof (* vision->font_index)); vision->font_width = reallocate (vision->font_width, vision->font_count * sizeof (* vision->font_width)); @@ -519,13 +519,13 @@ static v0 vision_configure (vision_structure * vision, u4 window_width, u4 windo vision->font_width [vision->font_count - 1] = allocate (95 * sizeof (* * vision->font_width)); vision->font_height [vision->font_count - 1] = allocate (95 * sizeof (* * vision->font_height)); - for (u4 index = 0; index < 95; ++index) { - u4 * buffer = allocate (vision_font_width * vision_font_height * sizeof (* buffer)); + for (natural index = 0; index < 95; ++index) { + natural * buffer = allocate (vision_font_width * vision_font_height * sizeof (* buffer)); - for (u4 value = 0; value < 2; ++value) { - for (u4 bit = 64; bit > 0; --bit) { - u4 destination = ((value << 3) - ((bit - 1) >> 3) + 7) * vision_font_width - ((bit - 1) & 7) + 7; - u4 source = (font_bitmap [2 * index + value] >> (bit - 1)) & 1; + for (natural value = 0; value < 2; ++value) { + for (natural bit = 64; bit > 0; --bit) { + natural destination = ((value << 3) - ((bit - 1) >> 3) + 7) * vision_font_width - ((bit - 1) & 7) + 7; + natural source = (font_bitmap [2 * index + value] >> (bit - 1)) & 1; buffer [destination] = (source) ? 0xffffffff : 0x00000000; } @@ -542,14 +542,14 @@ static v0 vision_configure (vision_structure * vision, u4 window_width, u4 windo order = allocate (vision->sprite_count * sizeof (* order)); - for (u4 index = 0; index < vision->sprite_count; ++index) { + for (natural index = 0; index < vision->sprite_count; ++index) { order [index] = index; } - for (u4 index = 0; index < vision->sprite_count; ++index) { - for (u4 subindex = 0; subindex < vision->sprite_count; ++subindex) { + for (natural index = 0; index < vision->sprite_count; ++index) { + for (natural subindex = 0; subindex < vision->sprite_count; ++subindex) { if (vision->sprite_height [order [index]] < vision->sprite_height [order [subindex]]) { - u4 temporary = order [index]; + natural temporary = order [index]; order [index] = order [subindex]; order [subindex] = temporary; @@ -557,19 +557,19 @@ static v0 vision_configure (vision_structure * vision, u4 window_width, u4 windo } } - for (u4 index = 0; index < vision->sprite_count; ++index) { + for (natural index = 0; index < vision->sprite_count; ++index) { if (u + vision->sprite_width [order [index]] >= vision->spritesheet_size) { u *= 0; v += vision->sprite_height [order [index]]; } - vision->sprite_u [order [index]] = (float) u / (float) vision->spritesheet_size; - vision->sprite_v [order [index]] = (float) v / (float) vision->spritesheet_size; + vision->sprite_u [order [index]] = (real) u / (real) vision->spritesheet_size; + vision->sprite_v [order [index]] = (real) v / (real) vision->spritesheet_size; - for (u4 y = 0; y < vision->sprite_height [order [index]]; ++y) { - for (u4 x = 0; x < vision->sprite_width [order [index]]; ++x) { - u4 destination = (v + y) * vision->spritesheet_size + (u + x); - u4 source = y * vision->sprite_width [order [index]] + x; + for (natural y = 0; y < vision->sprite_height [order [index]]; ++y) { + for (natural x = 0; x < vision->sprite_width [order [index]]; ++x) { + natural destination = (v + y) * vision->spritesheet_size + (u + x); + natural source = y * vision->sprite_width [order [index]] + x; vision->spritesheet_data [destination] = vision->sprite_data [order [index]] [source]; } @@ -588,19 +588,19 @@ static v0 vision_configure (vision_structure * vision, u4 window_width, u4 windo vision->window_width = window_width; vision->window_height = window_height; - vision->aspect_ratio = (float) window_height / (float) window_width; + vision->aspect_ratio = (real) window_height / (real) window_width; - vision->pixel_width = 2.0f / (float) window_width; - vision->pixel_height = 2.0f / (float) window_height; + vision->pixel_width = 2.0f / (real) window_width; + vision->pixel_height = 2.0f / (real) window_height; glfwInit (); - glfwWindowHs4 (GLFW_CONTEXT_VERSION_MAJOR, 3); - glfwWindowHs4 (GLFW_CONTEXT_VERSION_MINOR, 3); - glfwWindowHs4 (GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - glfwWindowHs4 (GLFW_OPENGL_FORWARD_COMPAT, 1); + glfwWindowHinteger (GLFW_CONTEXT_VERSION_MAJOR, 3); + glfwWindowHinteger (GLFW_CONTEXT_VERSION_MINOR, 3); + glfwWindowHinteger (GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glfwWindowHinteger (GLFW_OPENGL_FORWARD_COMPAT, 1); - vision->window = glfwCreateWindow ((int) window_width, (int) window_height, window_title, null, null); + vision->window = glfwCreateWindow ((integer) window_width, (integer) window_height, window_title, null, null); fatal_failure (vision->window == null, "Failed to create GLFW window.\n"); @@ -638,7 +638,7 @@ static v0 vision_configure (vision_structure * vision, u4 window_width, u4 windo vision->glBufferData = (PFNGLBUFFERDATAPROC) glfwGetProcAddress ("glBufferData"); vision->glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) glfwGetProcAddress ("glUniformMatrix4fv"); - glViewport (0, 0, (int) window_width, (int) window_height); + glViewport (0, 0, (integer) window_width, (integer) window_height); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDepthFunc (GL_LESS); @@ -676,28 +676,28 @@ static v0 vision_configure (vision_structure * vision, u4 window_width, u4 windo vision->glLinkProgram (vision->shader_program); vision->glUseProgram (vision->shader_program); - xyz_attribute = (u4) vision->glGetAttribLocation (vision->shader_program, "vertex_xyz"); + xyz_attribute = (natural) vision->glGetAttribLocation (vision->shader_program, "vertex_xyz"); vision->glEnableVertexAttribArray (xyz_attribute); - vision->glVertexAttribPointer (xyz_attribute, 3, GL_FLOAT, GL_FALSE, 9 * sizeof (float), (v0 *) 0); + vision->glVertexAttribPointer (xyz_attribute, 3, GL_FLOAT, GL_FALSE, 9 * sizeof (real), (procedure *) 0); - uv_attribute = (u4) vision->glGetAttribLocation (vision->shader_program, "vertex_uv"); + uv_attribute = (natural) vision->glGetAttribLocation (vision->shader_program, "vertex_uv"); vision->glEnableVertexAttribArray (uv_attribute); - vision->glVertexAttribPointer (uv_attribute, 2, GL_FLOAT, GL_FALSE, 9 * sizeof (float), (v0 *) (3 * sizeof (float))); + vision->glVertexAttribPointer (uv_attribute, 2, GL_FLOAT, GL_FALSE, 9 * sizeof (real), (procedure *) (3 * sizeof (real))); - rgba_attribute = (u4) vision->glGetAttribLocation (vision->shader_program, "vertex_rgba"); + rgba_attribute = (natural) vision->glGetAttribLocation (vision->shader_program, "vertex_rgba"); vision->glEnableVertexAttribArray (rgba_attribute); - vision->glVertexAttribPointer (rgba_attribute, 4, GL_FLOAT, GL_FALSE, 9 * sizeof (float), (v0 *) (5 * sizeof (float))); + vision->glVertexAttribPointer (rgba_attribute, 4, GL_FLOAT, GL_FALSE, 9 * sizeof (real), (procedure *) (5 * sizeof (real))); vision->vertex_array = allocate (vision->vertex_limit * sizeof (vision->vertex_array)); vision->index_array = allocate (vision->index_limit * sizeof (vision->index_array)); - for (u4 index = 0; index < 16; ++index) { + for (natural index = 0; index < 16; ++index) { vision->projection_matrix [index] = 0.0f; vision->movement_matrix [index] = 0.0f; vision->rotation_matrix [index] = 0.0f; @@ -748,11 +748,11 @@ static v0 vision_configure (vision_structure * vision, u4 window_width, u4 windo glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - print ("[/2Success/-] Configured OpenGL renderer.\n"); + print ("/s Configured OpenGL renderer.\n"); } -static v0 vision_synchronize (vision_structure * vision, u4 colour) { - s4 signal_code [signal_count] = { +static procedure vision_synchronize (vision_structure * vision, natural colour) { + integer signal_code [signal_count] = { 0, GLFW_KEY_A, GLFW_KEY_B, GLFW_KEY_C, GLFW_KEY_D, GLFW_KEY_E, GLFW_KEY_F, GLFW_KEY_G, GLFW_KEY_H, @@ -781,8 +781,8 @@ static v0 vision_synchronize (vision_structure * vision, u4 colour) { GLFW_KEY_KP_6, GLFW_KEY_KP_7, GLFW_KEY_KP_8, GLFW_KEY_KP_9 }; - s4 new_window_width = 0; - s4 new_window_height = 0; + integer new_window_width = 0; + integer new_window_height = 0; glClearColor (normal_r (colour), normal_g (colour), normal_b (colour), normal_a (colour)); @@ -794,36 +794,36 @@ static v0 vision_synchronize (vision_structure * vision, u4 colour) { glfwGetWindowSize (vision->window, & new_window_width, & new_window_height); - if ((vision->window_width != (u4) new_window_width) || (vision->window_height != (u4) new_window_height)) { + if ((vision->window_width != (natural) new_window_width) || (vision->window_height != (natural) new_window_height)) { if ((new_window_width <= 0) || (new_window_height <= 0)) return; glViewport (0, 0, new_window_width, new_window_height); - vision->window_width = (u4) new_window_width; - vision->window_height = (u4) new_window_height; + vision->window_width = (natural) new_window_width; + vision->window_height = (natural) new_window_height; - vision->pixel_width = 2.0f / (float) new_window_width; - vision->pixel_height = 2.0f / (float) new_window_height; + vision->pixel_width = 2.0f / (real) new_window_width; + vision->pixel_height = 2.0f / (real) new_window_height; } - vision->cursor [cursor_left] = (b4) (glfwGetMouseButton (vision->window, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS); - vision->cursor [cursor_middle] = (b4) (glfwGetMouseButton (vision->window, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS); - vision->cursor [cursor_right] = (b4) (glfwGetMouseButton (vision->window, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS); + vision->cursor [cursor_left] = (boolean) (glfwGetMouseButton (vision->window, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS); + vision->cursor [cursor_middle] = (boolean) (glfwGetMouseButton (vision->window, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS); + vision->cursor [cursor_right] = (boolean) (glfwGetMouseButton (vision->window, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS); glfwSetCursorPos (vision->window, (double) vision->window_width / 2.0, (double) vision->window_height / 2.0); if (vision->freeze_cursor == false) { - f8 x = 0.0; - f8 y = 0.0; + real_64 x = 0.0; + real_64 y = 0.0; glfwGetCursorPos (vision->window, & x, & y); - vision->cursor_x = (int) x; - vision->cursor_y = (int) y; + vision->cursor_x = (integer) x; + vision->cursor_y = (integer) y; - //~f4 offset_x = vision->camera_x - x; + //~real offset_x = vision->camera_x - x; - //~for (u4 index = 0; index < 16; ++index) { + //~for (natural index = 0; index < 16; ++index) { //~vision->rotation_matrix [index] = 0.0f; //~} @@ -849,8 +849,8 @@ static v0 vision_synchronize (vision_structure * vision, u4 colour) { } if (vision->freeze_signal == false) { - for (u4 index = 0; index < signal_count; ++index) { - vision->signal [index] = (b4) (glfwGetKey (vision->window, signal_code [index]) == GLFW_PRESS); + for (natural index = 0; index < signal_count; ++index) { + vision->signal [index] = (boolean) (glfwGetKey (vision->window, signal_code [index]) == GLFW_PRESS); } } @@ -859,7 +859,7 @@ static v0 vision_synchronize (vision_structure * vision, u4 colour) { vision->glBindBuffer (GL_ARRAY_BUFFER, vision->vertex_buffer); - glDrawElements (GL_TRIANGLES, (int) vision->index_count * 4, GL_UNSIGNED_INT, null); + glDrawElements (GL_TRIANGLES, (integer) vision->index_count * 4, GL_UNSIGNED_INT, null); glfwSwapBuffers (vision->window); @@ -875,7 +875,7 @@ static v0 vision_synchronize (vision_structure * vision, u4 colour) { } if (vision->global_tick % vision->gameplay_framerate == 0) { - vision->framerate = (u4) (1000000000ul / vision->frame_time); + vision->framerate = (natural) (1000000000ul / vision->frame_time); } ++vision->global_tick; @@ -887,21 +887,21 @@ static v0 vision_synchronize (vision_structure * vision, u4 colour) { vision->frame_begin = nano_time (); } -static v0 vision_render_base (vision_structure * vision, u4 vertex_count, f4 * vertex_array, u4 index_count, - u4 * index_array, u4 sprite, u4 colour) { +static procedure vision_render_base (vision_structure * vision, natural vertex_count, real * vertex_array, natural index_count, + natural * index_array, natural sprite, natural colour) { if (sprite >= vision->sprite_count) return; if (vision->vertex_count + vertex_count >= vision->vertex_limit) return; if (vision->index_count + index_count >= vision->index_limit) return; - f4 unwrap_x = (float) vision->sprite_u [sprite] / (float) vision->spritesheet_size; - f4 unwrap_y = (float) vision->sprite_v [sprite] / (float) vision->spritesheet_size; + real unwrap_x = (real) vision->sprite_u [sprite] / (real) vision->spritesheet_size; + real unwrap_y = (real) vision->sprite_v [sprite] / (real) vision->spritesheet_size; - f4 unwrap_width = (float) vision->sprite_width [sprite] / (float) vision->spritesheet_size; - f4 unwrap_height = (float) vision->sprite_height [sprite] / (float) vision->spritesheet_size; + real unwrap_width = (real) vision->sprite_width [sprite] / (real) vision->spritesheet_size; + real unwrap_height = (real) vision->sprite_height [sprite] / (real) vision->spritesheet_size; - //~for (u4 vertex = 0; vertex < vertex_count; ++vertex) { - //~u4 destination = 9 * vertex + vision->vertex_count; - //~u4 source = 5 * vertex; + //~for (natural vertex = 0; vertex < vertex_count; ++vertex) { + //~natural destination = 9 * vertex + vision->vertex_count; + //~natural source = 5 * vertex; //~vision->vertex_array [destination + 0] = vertex_array [source + 0]; //~vision->vertex_array [destination + 1] = vertex_array [source + 1]; @@ -914,14 +914,14 @@ static v0 vision_render_base (vision_structure * vision, u4 vertex_count, f4 * v //~vision->vertex_array [destination + 8] = normal_a (colour); //~} - for (u4 vertex = 0; vertex < vertex_count; ++vertex) { + for (natural vertex = 0; vertex < vertex_count; ++vertex) { vision->vertex_array [vision->vertex_count + vertex] = vertex_array [vertex]; } //~vision->vertex_array [destination + 3] = vertex_array [source + 3] * unwrap_width + unwrap_x; //~vision->vertex_array [destination + 4] = vertex_array [source + 4] * unwrap_height + unwrap_y; - for (u4 index = 0; index < index_count; ++index) { + for (natural index = 0; index < index_count; ++index) { vision->index_array [vision->index_count + index] = index_array [index]; } @@ -931,13 +931,13 @@ static v0 vision_render_base (vision_structure * vision, u4 vertex_count, f4 * v vision->index_count += index_count; } -//~static v0 vision_render_triangle (vision_structure * vision, f4 * vertex_array, u4 colour) { +//~static procedure vision_render_triangle (vision_structure * vision, real * vertex_array, natural colour) { //~if (vision->vertex_count + 3 * 36 >= vision->vertex_limit) return; //~if (vision->index_count + 3 >= vision->index_limit) return; - //~for (u4 vertex = 0; vertex < 3; ++vertex) { - //~u4 destination = 9 * vertex + vision->vertex_count; - //~u4 source = 5 * vertex; + //~for (natural vertex = 0; vertex < 3; ++vertex) { + //~natural destination = 9 * vertex + vision->vertex_count; + //~natural source = 5 * vertex; //~vision->vertex_array [destination + 0] = vertex_array [source + 0]; //~vision->vertex_array [destination + 1] = vertex_array [source + 1]; @@ -950,7 +950,7 @@ static v0 vision_render_base (vision_structure * vision, u4 vertex_count, f4 * v //~vision->vertex_array [destination + 8] = normal_a (colour); //~} - //~for (u4 index = 0; index < 3; ++index) { + //~for (natural index = 0; index < 3; ++index) { //~vision->index_array [vision->index_count + index] = vision->vertex_array [vision->vertex_count / 9 + index]; //~} @@ -958,7 +958,7 @@ static v0 vision_render_base (vision_structure * vision, u4 vertex_count, f4 * v //~vision->index_count += 3; //~} -static v0 vision_change_field_of_view (vision_structure * vision, f4 change) { +static procedure vision_change_field_of_view (vision_structure * vision, real change) { vision->field_of_view += change; vision->projection_matrix [ 0] = vision->aspect_ratio / tangent (vision->field_of_view / 2.0f); @@ -968,7 +968,7 @@ static v0 vision_change_field_of_view (vision_structure * vision, f4 change) { vision->projection_matrix); } -static v0 vision_change_translation (vision_structure * vision, f4 x, f4 y, f4 z) { +static procedure vision_change_translation (vision_structure * vision, real x, real y, real z) { vision->movement_matrix [ 3] += x; vision->movement_matrix [ 7] += y; vision->movement_matrix [11] += z; @@ -977,8 +977,8 @@ static v0 vision_change_translation (vision_structure * vision, f4 x, f4 y, f4 z vision->movement_matrix); } -static v0 vision_change_rotation (vision_structure * vision, f4 vertical, f4 horizontal) { - for (u4 index = 0; index < 16; ++index) { +static procedure vision_change_rotation (vision_structure * vision, real vertical, real horizontal) { + for (natural index = 0; index < 16; ++index) { vision->rotation_matrix [index] = 0.0f; } diff --git a/xogueout.c b/xogueout.c index cae83e7..8659cc6 100644 --- a/xogueout.c +++ b/xogueout.c @@ -20,11 +20,11 @@ #include #include -s4 main (v0) { +integer main (none) { opengl_structure * opengl = opengl_initialize (60, 60, false, 1024, 1024); - s4 x = 0; - s4 y = 0; + integer x = 0; + integer y = 0; //~opengl_sprite_import (opengl, ""); diff --git a/xommon.h b/xommon.h index 24ac318..74b68bd 100755 --- a/xommon.h +++ b/xommon.h @@ -46,53 +46,53 @@ typedef struct { xcb_gcontext_t context; xcb_pixmap_t pixmap; - b4 signal [signal_count]; - b4 cursor [cursor_count]; - - b4 active; - u4 window_width; - u4 window_height; - u4 framerate; - u8 frame_time; - u8 frame_begin; - u8 frame_end; - u4 * framebuffer; - u4 global_tick; - u4 gameplay_tick; - u4 animation_tick; - s4 cursor_x; - s4 cursor_y; - b4 freeze_cursor; - b4 freeze_signal; - u4 sprite_count; - u4 font_count; - u4 dummy; /// TODO USE ME PLEASE - u4 * * sprite_data; - u4 * sprite_width; - u4 * sprite_height; - u4 * * font_index; - u4 * * font_width; - u4 * * font_height; - c1 * font_begin; - c1 * font_end; + boolean signal [signal_count]; + boolean cursor [cursor_count]; + + boolean active; + natural window_width; + natural window_height; + natural framerate; + natural_64 frame_time; + natural_64 frame_begin; + natural_64 frame_end; + natural * framebuffer; + natural global_tick; + natural gameplay_tick; + natural animation_tick; + integer cursor_x; + integer cursor_y; + boolean freeze_cursor; + boolean freeze_signal; + natural sprite_count; + natural font_count; + natural dummy; /// TODO USE ME PLEASE + natural * * sprite_data; + natural * sprite_width; + natural * sprite_height; + natural * * font_index; + natural * * font_width; + natural * * font_height; + character * font_begin; + character * font_end; } common_structure; -static u4 common_center_x (common_structure * common, u4 size) { +static natural common_center_x (common_structure * common, natural size) { return ((common->window_width - size) / 2); } -static u4 common_center_y (common_structure * common, u4 size) { +static natural common_center_y (common_structure * common, natural size) { return ((common->window_height - size) / 2); } -static b4 common_cursor_inside (common_structure * common, s4 x, s4 y, u4 width, u4 height) { +static boolean common_cursor_inside (common_structure * common, integer x, integer y, natural width, natural height) { return ((common->cursor_x > x) && (common->cursor_y > y) - && (common->cursor_x < x + (int) width) - && (common->cursor_y < y + (int) height)); + && (common->cursor_x < x + (integer) width) + && (common->cursor_y < y + (integer) height)); } -static b4 common_cursor_left_click (common_structure * common, s4 x, s4 y, u4 width, u4 height) { +static boolean common_cursor_left_click (common_structure * common, integer x, integer y, natural width, natural height) { if (common->cursor [cursor_left] == true) { common->freeze_cursor = true; @@ -102,7 +102,7 @@ static b4 common_cursor_left_click (common_structure * common, s4 x, s4 y, u4 wi return (false); } -static b4 common_cursor_right_click (common_structure * common, s4 x, s4 y, u4 width, u4 height) { +static boolean common_cursor_right_click (common_structure * common, integer x, integer y, natural width, natural height) { if (common->cursor [cursor_right]) { common->freeze_cursor = true; @@ -112,7 +112,7 @@ static b4 common_cursor_right_click (common_structure * common, s4 x, s4 y, u4 w return (false); } -static u4 common_sprite_raw_import (common_structure * common, u4 * data, u4 width, u4 height) { +static natural common_sprite_raw_import (common_structure * common, natural * data, natural width, natural height) { ++common->sprite_count; common->sprite_data = reallocate (common->sprite_data, common->sprite_count * sizeof (* common->sprite_data)); @@ -126,11 +126,11 @@ static u4 common_sprite_raw_import (common_structure * common, u4 * data, u4 wid return (common->sprite_count - 1); } -static u4 common_font_raw_import (common_structure * common, u4 * data, u4 image_width, c1 begin, c1 end, u4 empty) { - u4 pointer = 0; - u4 width = 0; - u4 height = 0; - u4 * buffer = null; +static natural common_font_raw_import (common_structure * common, natural * data, natural image_width, character begin, character end, natural empty) { + natural pointer = 0; + natural width = 0; + natural height = 0; + natural * buffer = null; ++common->font_count; @@ -143,19 +143,19 @@ static u4 common_font_raw_import (common_structure * common, u4 * data, u4 image common->font_begin [common->font_count - 1] = begin; common->font_end [common->font_count - 1] = end; - common->font_index [common->font_count - 1] = allocate ((u8) (end - begin + 1) * sizeof (* * common->font_index)); - common->font_width [common->font_count - 1] = allocate ((u8) (end - begin + 1) * sizeof (* * common->font_width)); - common->font_height [common->font_count - 1] = allocate ((u8) (end - begin + 1) * sizeof (* * common->font_height)); + common->font_index [common->font_count - 1] = allocate ((caliber) (end - begin + 1) * sizeof (* * common->font_index)); + common->font_width [common->font_count - 1] = allocate ((caliber) (end - begin + 1) * sizeof (* * common->font_width)); + common->font_height [common->font_count - 1] = allocate ((caliber) (end - begin + 1) * sizeof (* * common->font_height)); - for (c1 index = begin; index <= end; ++index) { + for (character index = begin; index <= end; ++index) { for ( ; data [pointer] == empty; ++pointer); for (width = 0; data [pointer + width] != empty; ++width); for (height = 0; data [pointer + height * image_width] != empty; ++height); buffer = allocate (width * height * sizeof (* buffer)); - for (u4 y = 0; y < height; ++y) { - for (u4 x = 0; x < width; ++x) { + for (natural y = 0; y < height; ++y) { + for (natural x = 0; x < width; ++x) { buffer [y * width + x] = data [pointer + (y * image_width) + x]; } } @@ -176,12 +176,12 @@ static u4 common_font_raw_import (common_structure * common, u4 * data, u4 image return (common->font_count - 1); } -static u4 common_sprite_import (common_structure * common, c1 * path) { - u4 width = 0; - u4 height = 0; - u4 * data = null; +static natural common_sprite_import (common_structure * common, character * path) { + natural width = 0; + natural height = 0; + natural * data = null; - c1 buffer [256] = ""; + character buffer [256] = ""; #ifdef use_png_library if ((data == null) && (file_exists (string_concatenate (string_copy (buffer, path), ".png")) == true)) { @@ -200,13 +200,13 @@ static u4 common_sprite_import (common_structure * common, c1 * path) { return (common_sprite_raw_import (common, data, width, height)); } -static u4 common_font_import (common_structure * common, c1 * path, c1 begin, c1 end, u4 colour) { - u4 width = 0; - u4 height = 0; - u4 result = 0; - u4 * data = null; +static natural common_font_import (common_structure * common, character * path, character begin, character end, natural colour) { + natural width = 0; + natural height = 0; + natural result = 0; + natural * data = null; - c1 buffer [256] = ""; + character buffer [256] = ""; #ifdef use_png_library if ((data == null) && (file_exists (string_concatenate (string_copy (buffer, path), ".png")) == true)) { @@ -229,26 +229,26 @@ static u4 common_font_import (common_structure * common, c1 * path, c1 begin, c1 return (result); } -static u4 common_sprite_width (common_structure * common, u4 sprite) { +static natural common_sprite_width (common_structure * common, natural sprite) { return (common->sprite_width [sprite]); } -static u4 common_sprite_height (common_structure * common, u4 sprite) { +static natural common_sprite_height (common_structure * common, natural sprite) { return (common->sprite_height [sprite]); } -static common_structure * common_initialize (v0) { +static common_structure * common_initialize (none) { common_structure * common = allocate (sizeof (* common)); return (common); } static common_structure * common_deinitialize (common_structure * common) { - for (u4 index = 0; index < common->sprite_count; ++index) { + for (natural index = 0; index < common->sprite_count; ++index) { common->sprite_data [index] = deallocate (common->sprite_data [index]); } - for (u4 index = 0; index < common->font_count; ++index) { + for (natural index = 0; index < common->font_count; ++index) { common->font_index [index] = deallocate (common->font_index [index]); common->font_width [index] = deallocate (common->font_width [index]); common->font_height [index] = deallocate (common->font_height [index]); @@ -275,10 +275,10 @@ static common_structure * common_deinitialize (common_structure * common) { return (deallocate (common)); } -static v0 common_configure (common_structure * common, u4 width, u4 height, c1 * title, u4 window_flags) { - u8 font_bitmap [190] = { +static procedure common_configure (common_structure * common, natural width, natural height, character * title, natural window_flags) { + natural_64 font_bitmap [190] = { 0x0000000000000000, 0x0000000000000000, 0x0000101010101010, 0x1000101000000000, 0x0024242400000000, 0x0000000000000000, - 0x00002424247e2424, 0x7e24242400000000, 0x0010107c9290907c, 0x1212927c10100000, 0x0000649468081010, 0x202c524c00000000, + 0x00002424247e2424, 0x7e24242400000000, 0x0010107c9290907c, 0x1212927character0100000, 0x0000649468081010, 0x202c524c00000000, 0x000018242418304a, 0x4444443a00000000, 0x0010101000000000, 0x0000000000000000, 0x0000081020202020, 0x2020100800000000, 0x0000201008080808, 0x0808102000000000, 0x000000000024187e, 0x1824000000000000, 0x000000000010107c, 0x1010000000000000, 0x0000000000000000, 0x0000101020000000, 0x000000000000007e, 0x0000000000000000, 0x0000000000000000, 0x0000101000000000, @@ -300,26 +300,26 @@ static v0 common_configure (common_structure * common, u4 width, u4 height, c1 * 0x0000404020201010, 0x0808040400000000, 0x0000380808080808, 0x0808083800000000, 0x0000102844000000, 0x0000000000000000, 0x0000000000000000, 0x0000007e00000000, 0x1008000000000000, 0x0000000000000000, 0x00000000003c023e, 0x4242423e00000000, 0x00004040407c4242, 0x4242427c00000000, 0x00000000003c4240, 0x4040423c00000000, 0x00000202023e4242, 0x4242423e00000000, - 0x00000000003c4242, 0x7e40403c00000000, 0x00000e10107c1010, 0x1010101000000000, 0x00000000003e4242, 0x4242423e02023c00, + 0x00000000003c4242, 0x7e40403c00000000, 0x00000e10107character010, 0x1010101000000000, 0x00000000003e4242, 0x4242423e02023c00, 0x00004040407c4242, 0x4242424200000000, 0x0000101000301010, 0x1010103800000000, 0x00000404000c0404, 0x0404040444443800, 0x0000404040424448, 0x7048444200000000, 0x0000301010101010, 0x1010103800000000, 0x0000000000fc9292, 0x9292929200000000, 0x00000000007c4242, 0x4242424200000000, 0x00000000003c4242, 0x4242423c00000000, 0x00000000007c4242, 0x4242427c40404000, 0x00000000003e4242, 0x4242423e02020200, 0x00000000005e6040, 0x4040404000000000, 0x00000000003e4040, 0x3c02027c00000000, - 0x00001010107c1010, 0x1010100e00000000, 0x0000000000424242, 0x4242423e00000000, 0x0000000000424242, 0x2424181800000000, + 0x00001010107character010, 0x1010100e00000000, 0x0000000000424242, 0x4242423e00000000, 0x0000000000424242, 0x2424181800000000, 0x0000000000828292, 0x9292927c00000000, 0x0000000000424224, 0x1824424200000000, 0x0000000000424242, 0x4242423e02023c00, - 0x00000000007e0408, 0x1020407e00000000, 0x00000c1010102010, 0x1010100c00000000, 0x0000101010101010, 0x1010101000000000, + 0x00000000007e0408, 0x1020407e00000000, 0x00000character010102010, 0x1010100c00000000, 0x0000101010101010, 0x1010101000000000, 0x0000300808080408, 0x0808083000000000, 0x000000000062928c, 0x0000000000000000 }; - u4 event_mask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK; + natural event_mask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK; - u4 mask_window_flags [2] = { 0 }; + natural mask_window_flags [2] = { 0 }; - (v0) window_flags; + (none) window_flags; - u4 * dumb_buffer = allocate (256 * sizeof (* dumb_buffer)); + natural * dumb_buffer = allocate (256 * sizeof (* dumb_buffer)); - for (u4 index = 0; index < 256; ++index) { + for (natural index = 0; index < 256; ++index) { dumb_buffer [index] = 0xffffffff; } @@ -338,13 +338,13 @@ static v0 common_configure (common_structure * common, u4 width, u4 height, c1 * common->font_width [common->font_count - 1] = allocate (95 * sizeof (* * common->font_width)); common->font_height [common->font_count - 1] = allocate (95 * sizeof (* * common->font_height)); - for (u4 index = 0; index < 95; ++index) { - u4 * buffer = allocate (common_font_width * common_font_height * sizeof (* buffer)); + for (natural index = 0; index < 95; ++index) { + natural * buffer = allocate (common_font_width * common_font_height * sizeof (* buffer)); - for (u4 value = 0; value < 2; ++value) { - for (u4 bit = 64; bit > 0; --bit) { - u4 destination = ((value << 3) - ((bit - 1) >> 3) + 7) * common_font_width - ((bit - 1) & 7) + 7; - u4 source = (font_bitmap [2 * index + value] >> (bit - 1)) & 1; + for (natural value = 0; value < 2; ++value) { + for (natural bit = 64; bit > 0; --bit) { + natural destination = ((value << 3) - ((bit - 1) >> 3) + 7) * common_font_width - ((bit - 1) & 7) + 7; + natural source = (font_bitmap [2 * index + value] >> (bit - 1)) & 1; buffer [destination] = (source) ? 0xffffffff : 0x00000000; } @@ -383,17 +383,17 @@ static v0 common_configure (common_structure * common, u4 width, u4 height, c1 * XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_BUTTON_PRESS; - xcb_create_window (common->connection, common->screen->root_depth, common->window, common->screen->root, 0, 0, (u2) width, - (u2) height, 10, XCB_WINDOW_CLASS_INPUT_OUTPUT, common->screen->root_visual, event_mask, mask_window_flags); + xcb_create_window (common->connection, common->screen->root_depth, common->window, common->screen->root, 0, 0, (natural_16) width, + (natural_16) height, 10, XCB_WINDOW_CLASS_INPUT_OUTPUT, common->screen->root_visual, event_mask, mask_window_flags); xcb_map_window (common->connection, common->window); //~xcb_composite_redirect_window (common->connection, common->window, XCB_COMPOSITE_REDIRECT_MANUAL); xcb_change_property (common->connection, XCB_PROP_MODE_REPLACE, common->window, XCB_ATOM_WM_NAME, XCB_ATOM_STRING, 8, - (u4) string_length (title), title); + (natural) string_length (title), title); - xcb_create_pixmap (common->connection, common->screen->root_depth, common->pixmap, common->window, (u2) width, (u2 ) height); + xcb_create_pixmap (common->connection, common->screen->root_depth, common->pixmap, common->window, (natural_16) width, (natural_16 ) height); xcb_create_gc (common->connection, common->context, common->pixmap, 0, null); @@ -406,8 +406,8 @@ static v0 common_configure (common_structure * common, u4 width, u4 height, c1 * common->frame_begin = nano_time (); } -static v0 common_synchronize (common_structure * common, u4 colour) { - u4 signal_code [signal_count] = { +static procedure common_synchronize (common_structure * common, natural colour) { + natural signal_code [signal_count] = { 0, 38, 56, 54, 40, 26, 41, 42, 43, 31, 44, 45, 46, 58, 57, 32, 33, 24, 27, 39, 28, 30, 55, 25, 53, 29, 52, 19, 10, 11, 12, 13, 14, @@ -421,7 +421,7 @@ static v0 common_synchronize (common_structure * common, u4 colour) { xcb_generic_event_t * generic_event = xcb_wait_for_event (common->connection); //~xcb_generic_event_t * generic_event = null; - (v0) colour; + (none) colour; //~for (; ; ) { //~generic_event = xcb_poll_for_event (common->connection); @@ -461,7 +461,7 @@ static v0 common_synchronize (common_structure * common, u4 colour) { } break; case (XCB_KEY_PRESS): { xcb_key_press_event_t * key_press = (xcb_key_press_event_t *) generic_event; - for (u4 index = 0; index < signal_count; ++index) { + for (natural index = 0; index < signal_count; ++index) { if (key_press->detail == signal_code [index]) { common->signal [index] = true; } @@ -469,7 +469,7 @@ static v0 common_synchronize (common_structure * common, u4 colour) { } break; case (XCB_KEY_RELEASE): { xcb_key_release_event_t * key_release = (xcb_key_release_event_t *) generic_event; - for (u4 index = 0; index < signal_count; ++index) { + for (natural index = 0; index < signal_count; ++index) { if (key_release->detail == signal_code [index]) { common->signal [index] = false; } @@ -482,24 +482,24 @@ static v0 common_synchronize (common_structure * common, u4 colour) { generic_event = deallocate (generic_event); //~} - for (u4 pixel = 0; pixel < common->window_width * common->window_height; ++pixel) { - u4 r = (common->framebuffer [pixel] & 0x00ff0000) >> 16; - u4 b = (common->framebuffer [pixel] & 0x000000ff) << 16; + for (natural pixel = 0; pixel < common->window_width * common->window_height; ++pixel) { + natural r = (common->framebuffer [pixel] & 0x00ff0000) >> 16; + natural b = (common->framebuffer [pixel] & 0x000000ff) << 16; common->framebuffer [pixel] = (common->framebuffer [pixel] & 0xff00ff00) | b | r; } - common->image = xcb_image_create_native (common->connection, (u2) common->window_width, (u2) common->window_height, + common->image = xcb_image_create_native (common->connection, (natural_16) common->window_width, (natural_16) common->window_height, XCB_IMAGE_FORMAT_Z_PIXMAP, common->screen->root_depth, common->framebuffer, - (u4) (common->window_width * common->window_height * sizeof (* common->framebuffer)), - (u1 *) common->framebuffer); + (natural) (common->window_width * common->window_height * sizeof (* common->framebuffer)), + (natural_8 *) common->framebuffer); xcb_image_put (common->connection, common->pixmap, common->context, common->image, 0, 0, 0); xcb_image_destroy (common->image); - xcb_copy_area (common->connection, common->pixmap, common->window, common->context, 0, 0, 0, 0, (u2) common->window_width, - (u2) common->window_height); + xcb_copy_area (common->connection, common->pixmap, common->window, common->context, 0, 0, 0, 0, (natural_16) common->window_width, + (natural_16) common->window_height); common->framebuffer = allocate (common->window_width * common->window_height * sizeof (* common->framebuffer)); @@ -512,7 +512,7 @@ static v0 common_synchronize (common_structure * common, u4 colour) { } if (common->global_tick % common_gameplay_framerate == 0) { - common->framerate = (u4) (1000000000ul / common->frame_time); + common->framerate = (natural) (1000000000ul / common->frame_time); } ++common->global_tick; @@ -524,117 +524,117 @@ static v0 common_synchronize (common_structure * common, u4 colour) { common->frame_begin = nano_time (); } -static v0 common_render_base (common_structure * common, u4 sprite, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height, f4 scale_x, f4 scale_y, s4 flip_x, - s4 flip_y, u4 upper_left, u4 upper_right, u4 lower_left, u4 lower_right) { - (v0) scale_x; - (v0) scale_y; - (v0) flip_x; - (v0) flip_y; +static procedure common_render_base (common_structure * common, natural sprite, integer x, integer y, natural u, natural v, natural width, natural height, real scale_x, real scale_y, integer flip_x, + integer flip_y, natural upper_left, natural upper_right, natural lower_left, natural lower_right) { + (none) scale_x; + (none) scale_y; + (none) flip_x; + (none) flip_y; /// FIX TO INTERPOLATE ALL 4 COLOURS - //~(v0) upper_left; - (v0) upper_right; - (v0) lower_left; - (v0) lower_right; + //~(none) upper_left; + (none) upper_right; + (none) lower_left; + (none) lower_right; /// COLOUR INTERPOLATION WITH RBGA-ABGR CONVERSION - u4 interpolate_pixels (u4 pixel, u4 modifier) { - u4 r = (((pixel & 0xff000000) >> 24) * ((modifier & 0x000000ff) >> 0)) / 0xff; - u4 g = (((pixel & 0x00ff0000) >> 16) * ((modifier & 0x0000ff00) >> 8)) / 0xff; - u4 b = (((pixel & 0x0000ff00) >> 8) * ((modifier & 0x00ff0000) >> 16)) / 0xff; - u4 a = (((pixel & 0x000000ff) >> 0) * ((modifier & 0xff000000) >> 24)) / 0xff; + natural interpolate_pixels (natural pixel, natural modifier) { + natural r = (((pixel & 0xff000000) >> 24) * ((modifier & 0x000000ff) >> 0)) / 0xff; + natural g = (((pixel & 0x00ff0000) >> 16) * ((modifier & 0x0000ff00) >> 8)) / 0xff; + natural b = (((pixel & 0x0000ff00) >> 8) * ((modifier & 0x00ff0000) >> 16)) / 0xff; + natural a = (((pixel & 0x000000ff) >> 0) * ((modifier & 0xff000000) >> 24)) / 0xff; return ((r << 24) | (g << 16) | (b << 8) | a); } - if ((x + (int) width < 0) || (y + (int) height < 0) || (x > (int) common->window_width) || (y > (int) common->window_height)) return; + if ((x + (integer) width < 0) || (y + (integer) height < 0) || (x > (integer) common->window_width) || (y > (integer) common->window_height)) return; - for (u4 vertical = 0; vertical < height; ++vertical) { + for (natural vertical = 0; vertical < height; ++vertical) { if (vertical + y >= common->window_height) break; if (vertical + v >= common->sprite_height [sprite]) break; - for (u4 horizontal = 0; horizontal < width; ++horizontal) { + for (natural horizontal = 0; horizontal < width; ++horizontal) { if (horizontal + x >= common->window_width) break; if (horizontal + u >= common->sprite_width [sprite]) break; - u4 pixel = common->sprite_data [sprite] [(vertical + v) * common->sprite_width [sprite] + horizontal + u]; - u4 at = (y + vertical) * common->window_width + (x + horizontal); + natural pixel = common->sprite_data [sprite] [(vertical + v) * common->sprite_width [sprite] + horizontal + u]; + natural at = (y + vertical) * common->window_width + (x + horizontal); common->framebuffer [at] = (((pixel & 0xff000000) >> 24) > 0x77) ? interpolate_pixels (pixel, upper_left) : common->framebuffer [at]; } } } -static v0 common_render_rectangle (common_structure * common, s4 x, s4 y, u4 width, u4 height, u4 colour) { - common_render_base (common, common->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16, (float) height / 16, 0, 0, colour, colour, +static procedure common_render_rectangle (common_structure * common, integer x, integer y, natural width, natural height, natural colour) { + common_render_base (common, common->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16, (real) height / 16, 0, 0, colour, colour, colour, colour); } -static v0 common_render_rectangle_gradient_v (common_structure * common, s4 x, s4 y, u4 width, u4 height, u4 colour_up, u4 colour_down) { - common_render_base (common, common->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16, (float) height / 16, 0, 0, colour_up, colour_up, +static procedure common_render_rectangle_gradient_v (common_structure * common, integer x, integer y, natural width, natural height, natural colour_up, natural colour_down) { + common_render_base (common, common->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16, (real) height / 16, 0, 0, colour_up, colour_up, colour_down, colour_down); } -static v0 common_render_rectangle_gradient_h (common_structure * common, s4 x, s4 y, u4 width, u4 height, u4 colour_left, u4 colour_right) { - common_render_base (common, common->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16, (float) height / 16, 0, 0, colour_left, +static procedure common_render_rectangle_gradient_h (common_structure * common, integer x, integer y, natural width, natural height, natural colour_left, natural colour_right) { + common_render_base (common, common->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16, (real) height / 16, 0, 0, colour_left, colour_right, colour_left, colour_right); } -static v0 common_render_sprite (common_structure * common, u4 sprite, s4 x, s4 y) { +static procedure common_render_sprite (common_structure * common, natural sprite, integer x, integer y) { common_render_base (common, sprite, x, y, 0, 0, common->sprite_width [sprite], common->sprite_height [sprite], 1, 1, 0, 0, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 common_render_sprite_crop (common_structure * common, u4 sprite, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height) { +static procedure common_render_sprite_crop (common_structure * common, natural sprite, integer x, integer y, natural u, natural v, natural width, natural height) { common_render_base (common, sprite, x, y, u, v, width, height, 1, 1, 0, 0, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 common_render_sprite_colour (common_structure * common, u4 sprite, u4 colour, s4 x, s4 y) { +static procedure common_render_sprite_colour (common_structure * common, natural sprite, natural colour, integer x, integer y) { common_render_base (common, sprite, x, y, 0, 0, common->sprite_width [sprite], common->sprite_height [sprite], 1, 1, 0, 0, colour, colour, colour, colour); } -static v0 common_render_sprite_crop_colour (common_structure * common, u4 sprite, u4 colour, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height) { +static procedure common_render_sprite_crop_colour (common_structure * common, natural sprite, natural colour, integer x, integer y, natural u, natural v, natural width, natural height) { common_render_base (common, sprite, x, y, u, v, width, height, 1, 1, 0, 0, colour, colour, colour, colour); } -static v0 common_render_sprite_flip (common_structure * common, u4 sprite, s4 x, s4 y, s4 flip_x, s4 flip_y) { +static procedure common_render_sprite_flip (common_structure * common, natural sprite, integer x, integer y, integer flip_x, integer flip_y) { common_render_base (common, sprite, x, y, 0, 0, common->sprite_width [sprite], common->sprite_height [sprite], 1, 1, flip_x, flip_y, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 common_render_sprite_animate (common_structure * common, u4 sprite, s4 x, s4 y, u4 frames, u4 state, u4 states) { - u4 width = common->sprite_width [sprite] / states; - u4 height = common->sprite_height [sprite] / frames; - u4 u = width * (state % states); - u4 v = height * (common->animation_tick % frames); +static procedure common_render_sprite_animation (common_structure * common, natural sprite, integer x, integer y, natural frames, natural state, natural states) { + natural width = common->sprite_width [sprite] / states; + natural height = common->sprite_height [sprite] / frames; + natural u = width * (state % states); + natural v = height * (common->animation_tick % frames); common_render_sprite_crop (common, sprite, x, y, u, v, width, height); } -static v0 common_render_sprite_preview (common_structure * common, u4 sprite, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height, f4 zoom) { +static procedure common_render_sprite_preview (common_structure * common, natural sprite, integer x, integer y, natural u, natural v, natural width, natural height, real zoom) { common_render_base (common, sprite, x, y, u, v, width, height, zoom, zoom, false, false, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 common_render_sprite_control (common_structure * common, u4 sprite, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height, s4 flip_x, s4 flip_y) { +static procedure common_render_sprite_control (common_structure * common, natural sprite, integer x, integer y, natural u, natural v, natural width, natural height, integer flip_x, integer flip_y) { common_render_base (common, sprite, x, y, u, v, width, height, 1, 1, flip_x, flip_y, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static u4 common_render_string_width (common_structure * common, c1 * string, u4 font, f4 scale) { - u4 length = 0; +static natural common_render_string_width (common_structure * common, character * string, natural font, real scale) { + natural length = 0; if (string == null) { return (0); } - for (u4 index = 0; string [index] != '\0'; ++index) { - u4 character = common->font_index [font] [string [index] - common->font_begin [font]]; + for (natural index = 0; string [index] != '\0'; ++index) { + natural character = common->font_index [font] [string [index] - common->font_begin [font]]; - length += (u4) ((float) common->sprite_width [character] * scale); + length += (natural) ((real) common->sprite_width [character] * scale); } return (length); } -static v0 common_render_string (common_structure * common, c1 * string, u4 font, s4 x, s4 y, f4 scale, u4 colour) { - s4 offset = x; +static procedure common_render_string (common_structure * common, character * string, natural font, integer x, integer y, real scale, natural colour) { + integer offset = x; if (string == null) return; @@ -642,15 +642,15 @@ static v0 common_render_string (common_structure * common, c1 * string, u4 font, font = common->font_count - 1; } - for (u4 index = 0; string [index] != '\0'; ++index) { - u4 character = 0; + for (natural index = 0; string [index] != '\0'; ++index) { + natural character = 0; if (string [index] == '\t') { - x += (int) (scale * (float) common_font_tabulator * (float) common->sprite_width [common->font_index [font] [' ' - common->font_begin [font]]]); + x += (integer) (scale * (real) common_font_tabulator * (real) common->sprite_width [common->font_index [font] [' ' - common->font_begin [font]]]); continue; } else if (string [index] == '\n') { x = offset; - y += (int) (scale * (float) common->sprite_height [common->font_index [font] [' ' - common->font_begin [font]]]); + y += (integer) (scale * (real) common->sprite_height [common->font_index [font] [' ' - common->font_begin [font]]]); continue; } else if ((string [index] >= common->font_begin [font]) && (string [index] <= common->font_end [font])) { character = common->font_index [font] [string [index] - common->font_begin [font]]; @@ -661,6 +661,6 @@ static v0 common_render_string (common_structure * common, c1 * string, u4 font, common_render_base (common, character, x, y, 0, 0, common->sprite_width [character], common->sprite_height [character], scale, scale, 0, 0, colour, colour, colour, colour); - x += (int) (scale * (float) common->sprite_width [character]); + x += (integer) (scale * (real) common->sprite_width [character]); } } diff --git a/xop.c b/xop.c index ea65aa6..3d30d11 100755 --- a/xop.c +++ b/xop.c @@ -1,16 +1,16 @@ #include -static v0 echo_byte (u1 byte) { +static procedure echo_byte (natural_8 byte) { output ("0123456789ABCDEF" + byte / 16, 1); output ("0123456789ABCDEF" + byte % 16, 1); output (" ", 1); } -s4 main (s4 argc, c1 * * argv) { - s4 file = 0; - u8 size = 0; - u1 * buffer = null; +integer main (integer argc, character * * argv) { + integer file = 0; + caliber size = 0; + natural_8 * buffer = null; if (argc != 2) { print ("> xop input_file\n"); @@ -27,7 +27,7 @@ s4 main (s4 argc, c1 * * argv) { file = file_close (file); - for (u8 offset = 0; offset < size; ++offset) { + for (caliber offset = 0; offset < size; ++offset) { if (buffer [offset] == 0x90) { echo ("\n"); } diff --git a/xormat.h b/xormat.h index 1ac2e58..16b7187 100644 --- a/xormat.h +++ b/xormat.h @@ -15,6 +15,13 @@ /// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License /// for more details, if you dare, it is a lot of text that nobody wants to read... +/// Description +/// +/// Xormat, simple and hacky for file formats that I dislike, but everyone else uses them, so I have to use them too. I hate technology. This +/// more normal library comparing to my other ones, include this header file and use simplistic functions however you want. Don't care too much +/// about abstractions I introduced here, but keep in mind that you have to link your program correctly, this isn't stb-like library, even tho +/// it's header only. You should define a macro of which format(s) you want to use before including this file in your project. + #ifdef use_png_library #include #endif @@ -31,48 +38,54 @@ #include #endif -static v0 * format_image_import (c1 * path, u4 * width, u4 * height) { - u4 * data = null; - -//~#ifdef use_png_library - //~if (data == null) { - //~c1 buffer [256] = ""; - - //~if (file_exists (string_concatenate (string_copy (buffer, path), ".png")) == true) { - //~data = png_image_import (buffer, width, height); - //~} - //~} -//~#endif - -//~#ifdef use_jxl_library - //~if (data == null) { - //~c1 buffer [256] = ""; - - //~if (file_exists (string_concatenate (string_copy (buffer, path), ".jxl")) == true) { - //~data = jxl_image_import (buffer, width, height); - //~} - //~} -//~#endif - -//~#ifdef use_jpg_library - //~if (data == null) { - //~c1 buffer [256] = ""; - - //~if (file_exists (string_concatenate (string_copy (buffer, path), ".jpg")) == true) { - //~data = jpg_image_import (buffer, width, height); - //~} - //~} -//~#endif - -//~#ifdef use_tga_library - //~if (data == null) { - //~c1 buffer [256] = ""; - - //~if (file_exists (string_concatenate (string_copy (buffer, path), ".tga")) == true) { - //~data = tga_image_import (buffer, width, height); - //~} - //~} -//~#endif +/// Return image raw 32-bit colour data, in RGBA channel format by providing file path to image (with or without extension, if there's no +/// extension it's load first file found in order declared below) and two pointers to store width and height values. All images will be +/// implicitly converted into 32-bit RGBA colour, 8 bits per channel. +/// +/// natural_32 * image = format_image_import ("image.png", & width, & height); /// You can omit '.png' part in file path too. + +static natural_32 * format_image_import (character * path, natural * width, natural * height) { + natural_32 * data = null; + +#ifdef use_png_library + if (data == null) { + character buffer [256] = ""; + + if (file_exists (string_concatenate (string_copy (buffer, path), ".png")) == true) { + data = png_image_import (buffer, width, height); + } + } +#endif + +#ifdef use_jxl_library + if (data == null) { + character buffer [256] = ""; + + if (file_exists (string_concatenate (string_copy (buffer, path), ".jxl")) == true) { + data = jxl_image_import (buffer, width, height); + } + } +#endif + +#ifdef use_jpg_library + if (data == null) { + character buffer [256] = ""; + + if (file_exists (string_concatenate (string_copy (buffer, path), ".jpg")) == true) { + data = jpg_image_import (buffer, width, height); + } + } +#endif + +#ifdef use_tga_library + if (data == null) { + character buffer [256] = ""; + + if (file_exists (string_concatenate (string_copy (buffer, path), ".tga")) == true) { + data = tga_image_import (buffer, width, height); + } + } +#endif if (data == null) { switch (file_type (path)) { diff --git a/xormat/jxl.h b/xormat/jxl.h index 5316a1c..f470949 100644 --- a/xormat/jxl.h +++ b/xormat/jxl.h @@ -4,7 +4,7 @@ #define use_jxl_library #endif -static v0 * jxl_image_import (c1 * path, u4 * width, u4 * height) { +static generic * jxl_image_import (character * path, natural * width, natural * height) { JxlDecoder * decoder = null; JxlBasicInfo information = { 0 }; JxlPixelFormat format = { 4, JXL_TYPE_UINT8, JXL_NATIVE_ENDIAN, 0 }; @@ -14,10 +14,10 @@ static v0 * jxl_image_import (c1 * path, u4 * width, u4 * height) { fatal_failure (width == null, "jxl_image_import: Width is null pointer."); fatal_failure (height == null, "jxl_image_import: Height is null pointer."); - u8 size = file_size (path); - u1 * data = file_record (path); - u4 * pixel_array = null; - u8 output_size = 0; + natural_64 size = file_size (path); + natural_8 * data = file_record (path); + natural_32 * pixel_array = null; + natural_64 output_size = 0; decoder = JxlDecoderCreate (null); diff --git a/xormat/png.h b/xormat/png.h index 26577be..8c15c29 100644 --- a/xormat/png.h +++ b/xormat/png.h @@ -5,10 +5,9 @@ #define use_png_library #endif -static v0 * png_image_import (c1 * path, u4 * width, u4 * height) { - FILE * file; - u4 * data; - u4 index; +static generic * png_image_import (character * path, natural * width, natural * height) { + FILE * file = null; + natural * data = null; png_byte colour_type = 0; png_byte bit_depth = 0; @@ -64,7 +63,7 @@ static v0 * png_image_import (c1 * path, u4 * width, u4 * height) { row_pointers = allocate ((* height) * sizeof (* row_pointers)); - for (index = 0; index < (* height); ++index) { + for (natural index = 0; index < (* height); ++index) { row_pointers [index] = allocate (png_get_rowbytes (structure, information)); } @@ -74,7 +73,7 @@ static v0 * png_image_import (c1 * path, u4 * width, u4 * height) { data = allocate ((* width) * (* height) * sizeof (* data)); - for (index = 0; index < (* height); ++index) { + for (natural index = 0; index < (* height); ++index) { memory_copy (& data [index * (* width)], row_pointers [index], (* width) * sizeof (* data)); row_pointers [index] = deallocate (row_pointers [index]); @@ -87,7 +86,7 @@ static v0 * png_image_import (c1 * path, u4 * width, u4 * height) { return (data); } -static v0 png_image_export (c1 * path, u4 * data, u4 width, u4 height) { +static procedure png_image_export (character * path, natural * data, natural width, natural height) { png_image image = { 0 }; fatal_failure (path == null, "png_image_export: File path is null pointer."); diff --git a/xource.c b/xource.c new file mode 100644 index 0000000..4fa78bd --- /dev/null +++ b/xource.c @@ -0,0 +1,21 @@ +/// __ _____ _ _ _ __ ___ ___ +/// \ \/ / _ \| | | | '__/ __/ _ \ +/// > < (_) | |_| | | | (_| __/ +/// /_/\_\___/ \__,_|_| \___\___| +/// +/// Copyright (c) 1997 - Ognjen 'xolatile' Milan Robovic +/// +/// xolatile@chud.cyou - xource - Not quite STANDARD GNU/Linux tiny text editor, but it does the work... +/// +/// This program is free software, free as in freedom and as in free beer, you can redistribute it and/or modify it under the terms of the GNU +/// General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version if you wish... +/// +/// This program is distributed in the hope that it will be useful, but it is probably not, and without any warranty, without even the implied +/// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License +/// for more details, if you dare, it is a lot of text that nobody wants to read... + +#include + +integer main (integer argc, character * * argv) { + return (log_success); +} diff --git a/xpengl.h b/xpengl.h index 06e51c5..6a51d21 100755 --- a/xpengl.h +++ b/xpengl.h @@ -21,13 +21,6 @@ #define opengl_font_width (8) #define opengl_font_height (16) -//~typedef enum { - //~opengl_window_fullscreen = 0x1, - //~opengl_window_transparent = 0x2, - //~opengl_window_resizable = 0x4, - //~opengl_window_decorated = 0x8 -//~} opengl_window_flag; - typedef struct { GLFWwindow * window; @@ -53,251 +46,371 @@ typedef struct { PFNGLDELETEPROGRAMPROC glDeleteProgram; PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation; PFNGLBUFFERDATAPROC glBufferData; - - b4 signal [signal_count]; - b4 cursor [cursor_count]; - s4 cursor_x; - s4 cursor_y; - - b4 using_precomputed_spritesheet; - u8 spritesheet_size; - u8 vertex_limit; - u8 index_limit; - u4 gameplay_framerate; - u4 animation_framerate; - u4 tab_width; - u4 default_font; - b4 active; - u4 window_width; - u4 window_height; - f4 pixel_width; - f4 pixel_height; - u4 framerate; - u8 frame_time; - u8 frame_begin; - u8 frame_end; - u4 global_tick; - u4 gameplay_tick; - u4 animation_tick; - b4 freeze_cursor; - b4 freeze_signal; - u4 vertex_object; - u4 vertex_buffer; - u4 index_buffer; - u4 vertex_shader; - u4 fragment_shader; - u4 shader_program; - u4 spritesheet; - u4 vertex_count; - u4 index_count; - f4 * vertex_array; - u4 * index_array; - u4 sprite_count; - u4 font_count; - u4 * spritesheet_data; - u4 * * sprite_data; - u4 * sprite_width; - u4 * sprite_height; - f4 * sprite_u; - f4 * sprite_v; - u4 * * font_index; - u4 * * font_width; - u4 * * font_height; - c1 * font_begin; - c1 * font_end; + PFNGLGETSHADERIVPROC glGetShaderiv; + PFNGLGETPROGRAMIVPROC glGetProgramiv; + + boolean signal [signal_count]; + boolean cursor [cursor_count]; + + integer cursor_x; + integer cursor_y; + boolean active; + boolean very_verbose_spam; + natural window_width; + natural window_height; + natural_64 frame_time; + natural_64 frame_begin; + natural_64 frame_end; + natural framerate; + natural global_tick; + natural gameplay_tick; + natural animation_tick; + natural gameplay_framerate; + natural animation_framerate; + natural sprite_count; + natural font_count; + natural * * sprite_data; + natural * sprite_width; + natural * sprite_height; + natural * * font_index; + natural * * font_width; + natural * * font_height; + character * font_begin; + character * font_end; + natural tab_width; + natural default_font; + + boolean using_precomputed_spritesheet; + real pixel_width; + real pixel_height; + natural vertex_object; + natural vertex_buffer; + natural index_buffer; + natural vertex_shader; + natural fragment_shader; + natural shader_program; + natural spritesheet; + caliber vertex_limit; + caliber index_limit; + natural vertex_count; + natural index_count; + real * vertex_array; + natural * index_array; + natural * spritesheet_data; + real * sprite_u; + real * sprite_v; + caliber spritesheet_size; + boolean freeze_cursor; + boolean freeze_signal; } opengl_structure; -static u4 opengl_sprite_raw_import (opengl_structure * opengl, u4 * data, u4 width, u4 height) { +static opengl_structure * opengl_initialize (natural gameplay_framerate, natural animation_framerate, boolean use_precomputed_spritesheet, + natural maximum_quads_on_screen, natural spritesheet_side) { + opengl_structure * opengl = allocate (sizeof (* opengl)); + + opengl->using_precomputed_spritesheet = use_precomputed_spritesheet; + + opengl->spritesheet_size = spritesheet_side; + opengl->gameplay_framerate = gameplay_framerate; + opengl->animation_framerate = animation_framerate; + opengl->vertex_limit = maximum_quads_on_screen * 32; + opengl->index_limit = maximum_quads_on_screen * 6; + opengl->tab_width = 4; + opengl->default_font = ~0u; + + print ("/s Initialized OpenGL renderer.\n"); + + return (opengl); +} + +static opengl_structure * opengl_deinitialize (opengl_structure * opengl) { + opengl->active = false; + + for (natural index = 0; index < opengl->font_count; ++index) { + opengl->font_index [index] = deallocate (opengl->font_index [index]); + opengl->font_width [index] = deallocate (opengl->font_width [index]); + opengl->font_height [index] = deallocate (opengl->font_height [index]); + } + + opengl->font_index = deallocate (opengl->font_index); + opengl->font_width = deallocate (opengl->font_width); + opengl->font_height = deallocate (opengl->font_height); + opengl->font_begin = deallocate (opengl->font_begin); + opengl->font_end = deallocate (opengl->font_end); + + opengl->sprite_width = deallocate (opengl->sprite_width); + opengl->sprite_height = deallocate (opengl->sprite_height); + opengl->sprite_u = deallocate (opengl->sprite_u); + opengl->sprite_v = deallocate (opengl->sprite_v); + + if (opengl->using_precomputed_spritesheet == false) { + opengl->spritesheet_data = deallocate (opengl->spritesheet_data); + } + + opengl->vertex_array = deallocate (opengl->vertex_array); + opengl->index_array = deallocate (opengl->index_array); + + glDeleteTextures (1, & opengl->spritesheet); + + opengl->glDeleteProgram (opengl->shader_program); + opengl->glDeleteShader (opengl->fragment_shader); + opengl->glDeleteShader (opengl->vertex_shader); + + opengl->glDeleteBuffers (1, & opengl->index_buffer); + opengl->glDeleteBuffers (1, & opengl->vertex_buffer); + opengl->glDeleteVertexArrays (1, & opengl->vertex_object); + + glfwDestroyWindow (opengl->window); + + glfwTerminate (); + + print ("/s Deinitialized OpenGL renderer.\n"); + + return (deallocate (opengl)); +} + +static natural opengl_sprite_raw_import (opengl_structure * opengl, natural * data, natural width, natural height) { + natural current = ++opengl->sprite_count - 1; + fatal_failure (opengl->active == true, "opengl_sprite_raw_import: OpenGL renderer is already initialized."); fatal_failure (data == null, "opengl_sprite_raw_import: Data is null pointer."); fatal_failure (width == 0, "opengl_sprite_raw_import: Font image width is zero."); fatal_failure (height == 0, "opengl_sprite_raw_import: Font image height is zero."); - ++opengl->sprite_count; - opengl->sprite_data = reallocate (opengl->sprite_data, opengl->sprite_count * sizeof (* opengl->sprite_data)); opengl->sprite_width = reallocate (opengl->sprite_width, opengl->sprite_count * sizeof (* opengl->sprite_width)); opengl->sprite_height = reallocate (opengl->sprite_height, opengl->sprite_count * sizeof (* opengl->sprite_height)); opengl->sprite_u = reallocate (opengl->sprite_u, opengl->sprite_count * sizeof (* opengl->sprite_u)); opengl->sprite_v = reallocate (opengl->sprite_v, opengl->sprite_count * sizeof (* opengl->sprite_v)); - opengl->sprite_data [opengl->sprite_count - 1] = data; - opengl->sprite_width [opengl->sprite_count - 1] = width; - opengl->sprite_height [opengl->sprite_count - 1] = height; - opengl->sprite_u [opengl->sprite_count - 1] = 0; - opengl->sprite_v [opengl->sprite_count - 1] = 0; + opengl->sprite_data [current] = data; + opengl->sprite_width [current] = width; + opengl->sprite_height [current] = height; + opengl->sprite_u [current] = 0; + opengl->sprite_v [current] = 0; - return (opengl->sprite_count - 1); + return (current); } -static u4 opengl_font_raw_import (opengl_structure * opengl, u4 * data, u4 image_width, c1 begin, c1 end, u4 empty) { - u4 pointer = 0; - u4 width = 0; - u4 height = 0; +static natural opengl_font_raw_import (opengl_structure * opengl, natural * data, natural image_width, natural image_height, character begin, + character end, natural separator_colour) { + natural current = ++opengl->font_count - 1; + + natural pointer = 0; + natural width = 0; + natural height = 0; + natural point_count = 0; + natural * point_array = null; fatal_failure (opengl->active == true, "opengl_font_raw_import: OpenGL renderer is already initialized."); fatal_failure (data == null, "opengl_font_raw_import: Data is null pointer."); fatal_failure (image_width == 0, "opengl_font_raw_import: Font image width is zero."); + fatal_failure (image_height == 0, "opengl_font_raw_import: Font image height is zero."); fatal_failure (begin >= end, "opengl_font_raw_import: Font character range is inverted."); - ++opengl->font_count; - opengl->font_index = reallocate (opengl->font_index, opengl->font_count * sizeof (* opengl->font_index)); opengl->font_width = reallocate (opengl->font_width, opengl->font_count * sizeof (* opengl->font_width)); opengl->font_height = reallocate (opengl->font_height, opengl->font_count * sizeof (* opengl->font_height)); opengl->font_begin = reallocate (opengl->font_begin, opengl->font_count * sizeof (* opengl->font_begin)); opengl->font_end = reallocate (opengl->font_end, opengl->font_count * sizeof (* opengl->font_end)); - opengl->font_begin [opengl->font_count - 1] = begin; - opengl->font_end [opengl->font_count - 1] = end; + opengl->font_begin [current] = begin; + opengl->font_end [current] = end; - opengl->font_index [opengl->font_count - 1] = allocate ((u8) (end - begin + 1) * sizeof (* * opengl->font_index)); - opengl->font_width [opengl->font_count - 1] = allocate ((u8) (end - begin + 1) * sizeof (* * opengl->font_width)); - opengl->font_height [opengl->font_count - 1] = allocate ((u8) (end - begin + 1) * sizeof (* * opengl->font_height)); + opengl->font_index [current] = allocate ((caliber) (end - begin + 1) * sizeof (* * opengl->font_index)); + opengl->font_width [current] = allocate ((caliber) (end - begin + 1) * sizeof (* * opengl->font_width)); + opengl->font_height [current] = allocate ((caliber) (end - begin + 1) * sizeof (* * opengl->font_height)); - for (c1 index = begin; index <= end; ++index) { - for ( ; data [pointer] == empty; ++pointer); - for (width = 0; data [pointer + width] != empty; ++width); - for (height = 0; data [pointer + height * image_width] != empty; ++height); + point_array = allocate ((caliber) (end - begin + 1) * sizeof (* point_array)); - u4 * buffer = allocate (width * height * sizeof (* buffer)); + if (separator_colour == 0x00000000u) { + separator_colour = data [0]; + } - for (u4 y = 0; y < height; ++y) { - for (u4 x = 0; x < width; ++x) { - buffer [y * width + x] = data [pointer + (y * image_width) + x]; + for (natural y = 0; y < image_height - 1; ++y) { + for (natural x = 0; x < image_width - 1; ++x) { + if ((data [(y + 0) * image_width + (x + 0)] == separator_colour) + && (data [(y + 1) * image_width + (x + 0)] == separator_colour) + && (data [(y + 0) * image_width + (x + 1)] == separator_colour) + && (data [(y + 1) * image_width + (x + 1)] == 0x00000000u)) { + ++point_count; + point_array [point_count - 1] = (y + 1) * image_width + (x + 1); } } + } + + if (point_count != end - begin + 1) { + print ("/w Mismatch between font character points:\n"); + print ("/c --- Hardcoded expected number of character points: %i\n", end - begin + 1); + print ("/c --- Algorithm found number of character points: %i\n", point_count); + } - opengl->font_index [opengl->font_count - 1] [index - begin] = opengl_sprite_raw_import (opengl, buffer, width, height); - opengl->font_width [opengl->font_count - 1] [index - begin] = width; - opengl->font_height [opengl->font_count - 1] [index - begin] = height; + for (natural index = 0; index < end - begin + 1; ++index) { + for (width = 0; data [point_array [index] + width] != separator_colour; ++width); + for (height = 0; data [point_array [index] + height * image_width] != separator_colour; ++height); - pointer += width; + fatal_failure (width == 0, "opengl_font_raw_import: Font width is zero."); + fatal_failure (height == 0, "opengl_font_raw_import: Font height is zero."); - for (; data [pointer] == empty; ++pointer); + natural * buffer = allocate (width * height * sizeof (* buffer)); - if (pointer % image_width == 2) { - pointer += height * image_width; + for (natural y = 0; y < height; ++y) { + for (natural x = 0; x < width; ++x) { + buffer [y * width + x] = data [point_array [index] + y * image_width + x]; + } } + + opengl->font_index [current] [index] = opengl_sprite_raw_import (opengl, buffer, width, height); + opengl->font_width [current] [index] = width; + opengl->font_height [current] [index] = height; } - return (opengl->font_count - 1); + point_array = deallocate (point_array); + + return (current); } -static u4 opengl_sprite_import (opengl_structure * opengl, c1 * path) { - u4 width = 0; - u4 height = 0; - u4 * data = null; +static natural opengl_sprite_import (opengl_structure * opengl, character * path) { + natural width = 0; + natural height = 0; + natural * data = null; - c1 buffer [256] = ""; + fatal_failure (opengl->active == true, "opengl_sprite_import: OpenGL renderer is already initialized."); if (opengl->using_precomputed_spritesheet == true) { return (++opengl->sprite_count - 1); } -#ifdef use_png_library - if (file_exists (string_concatenate (string_copy (buffer, path), ".png")) == true) { - data = png_image_import (buffer, & width, & height); - } else { - print ("/w File '/3%s/-' doesn't exist.\n", buffer); - } -#endif + data = format_image_import (path, & width, & height); -#ifdef use_jxl_library - if ((data == null) && (file_exists (string_concatenate (string_copy (buffer, path), ".jxl")) == true)) { - data = jxl_image_import (buffer, & width, & height); - } -#endif + conditional_print ((data == null) || (width == 0) || (height == 0), "/f Failed to import sprite '%s'.", path); - fatal_failure (data == null, "opengl_sprite_import: Unsupported image format."); + conditional_print (opengl->very_verbose_spam == true, "/c Importing sprite '/0/B%s/-' of size %i x %i.\n", path, width, height); return (opengl_sprite_raw_import (opengl, data, width, height)); } -static u4 opengl_font_import (opengl_structure * opengl, c1 * path, c1 begin, c1 end, u4 colour) { - u4 width = 0; - u4 height = 0; - u4 result = 0; - u4 * data = null; +static natural opengl_font_import (opengl_structure * opengl, character * path, character begin, character end, natural colour) { + natural width = 0; + natural height = 0; + natural result = 0; + natural * data = null; - c1 buffer [256] = ""; + character buffer [256] = ""; + + fatal_failure (opengl->active == true, "opengl_font_import: OpenGL renderer is already initialized."); if (opengl->using_precomputed_spritesheet == true) { - for (c1 index = begin; index <= end; ++index) { + for (character index = begin; index <= end; ++index) { opengl->font_index [opengl->font_count] [index - begin] = ++opengl->sprite_count - 1; } return (++opengl->font_count - 1); } -#ifdef use_png_library - if (file_exists (string_concatenate (string_copy (buffer, path), ".png")) == true) { - data = png_image_import (buffer, & width, & height); - } else { - print ("/w File '/3%s/-' doesn't exist.\n", buffer); - } -#endif - -#ifdef use_jxl_library - if ((data == null) && (file_exists (string_concatenate (string_copy (buffer, path), ".jxl")) == true)) { - data = jxl_image_import (buffer, & width, & height); - } -#endif + data = format_image_import (path, & width, & height); - fatal_failure (data == null, "opengl_font_import: Unsupported image format."); + conditional_print (opengl->very_verbose_spam == true, "/c Importing font '/0/B%s/-' of size %i x %i, in range from (%i) to (%i).\n", + path, width, height, begin, end); - result = opengl_font_raw_import (opengl, data, width, begin, end, colour); + result = opengl_font_raw_import (opengl, data, width, height, begin, end, colour); data = deallocate (data); return (result); } -static u4 opengl_sprite_width (opengl_structure * opengl, u4 sprite) { - return (opengl->sprite_width [sprite]); +static natural opengl_sprite_width (opengl_structure * opengl, natural sprite) { + return ((sprite >= opengl->sprite_count) ? 0 : opengl->sprite_width [sprite]); } -static u4 opengl_sprite_height (opengl_structure * opengl, u4 sprite) { - return (opengl->sprite_height [sprite]); +static natural opengl_sprite_height (opengl_structure * opengl, natural sprite) { + return ((sprite >= opengl->sprite_count) ? 0 : opengl->sprite_height [sprite]); } -static u4 opengl_center_x (opengl_structure * opengl, u4 size) { - return ((opengl->window_width - size) / 2); -} +static natural opengl_character_width (opengl_structure * opengl, character data, natural font, real scale) { + if (font == ~ 0u) { + font = opengl->font_count - 1; + } -static u4 opengl_center_y (opengl_structure * opengl, u4 size) { - return ((opengl->window_height - size) / 2); + if ((data < opengl->font_begin [font]) || (data > opengl->font_end [font])) { + return (0); + } else { + natural index = opengl->font_index [font] [data - opengl->font_begin [font]]; + + return ((natural) (scale * (real) opengl->sprite_width [index])); + } } -static b4 opengl_cursor_inside (opengl_structure * opengl, s4 x, s4 y, u4 width, u4 height) { - return ((opengl->cursor_x > x) && - (opengl->cursor_y > y) && - (opengl->cursor_x < x + (int) width) && - (opengl->cursor_y < y + (int) height)); +static natural opengl_character_height (opengl_structure * opengl, character data, natural font, real scale) { + if (font == ~ 0u) { + font = opengl->font_count - 1; + } + + if ((data < opengl->font_begin [font]) || (data > opengl->font_end [font])) { + return (0); + } else { + natural index = opengl->font_index [font] [data - opengl->font_begin [font]]; + + return ((natural) (scale * (real) opengl->sprite_height [index])); + } } -static b4 opengl_cursor_left_click (opengl_structure * opengl, s4 x, s4 y, u4 width, u4 height) { - if (opengl->cursor [cursor_left] == true) { - opengl->freeze_cursor = true; +static natural opengl_string_width (opengl_structure * opengl, character * string, natural font, real scale) { + natural width = 0; + natural match = 0; - return (opengl_cursor_inside (opengl, x, y, width, height) == true); + if (string == null) { + return (0); } - return (false); + for (natural index = 0; string [index] != '\0'; ++index) { + if (string [index] == '\t') { + width += opengl->tab_width * opengl_character_width (opengl, ' ', font, scale); + } else if (string [index] == '\n') { + match = maximum_macro (width, match); + width = 0; + } else { + width += opengl_character_width (opengl, string [index], font, scale); + } + } + + return (maximum_macro (width, match)); } -static b4 opengl_cursor_right_click (opengl_structure * opengl, s4 x, s4 y, u4 width, u4 height) { - if (opengl->cursor [cursor_right]) { - opengl->freeze_cursor = true; +static natural opengl_string_height (opengl_structure * opengl, character * string, natural font, real scale) { + natural height = opengl_character_height (opengl, ' ', font, scale); + + if ((string == null) || (string [0] == '\0')) { + return (0); + } - return (opengl_cursor_inside (opengl, x, y, width, height)); + for (natural index = 0; string [index] != '\0'; ++index) { + if (string [index] == '\n') { + height += opengl_character_height (opengl, ' ', font, scale); + } } - return (false); + return (height); } -static v0 opengl_import_spritesheet (opengl_structure * opengl, c1 * data_file) { - s4 file = file_open (data_file, file_flag_read); +static natural opengl_center_x (opengl_structure * opengl, natural size) { + return ((opengl->window_width - size) / 2); +} + +static natural opengl_center_y (opengl_structure * opengl, natural size) { + return ((opengl->window_height - size) / 2); +} + +static boolean opengl_cursor_inside (opengl_structure * opengl, integer x, integer y, natural width, natural height) { + return ((opengl->cursor_x > x) && + (opengl->cursor_y > y) && + (opengl->cursor_x < x + (integer) width) && + (opengl->cursor_y < y + (integer) height)); +} + +static procedure opengl_import_spritesheet (opengl_structure * opengl, character * data_file) { + integer file = file_open (data_file, file_flag_read); fatal_failure (opengl->active == true, "opengl_import_spritesheet: OpenGL renderer is already initialized."); @@ -326,14 +439,14 @@ static v0 opengl_import_spritesheet (opengl_structure * opengl, c1 * data_file) file_read (file, opengl->font_begin, opengl->font_count * sizeof (* opengl->font_begin)); file_read (file, opengl->font_end, opengl->font_count * sizeof (* opengl->font_end)); - for (u4 index = 0; index < opengl->font_count; ++index) { - u4 range = (u4) (opengl->font_end [index] - opengl->font_begin [index]) + 1; + for (natural index = 0; index < opengl->font_count; ++index) { + natural range = (natural) (opengl->font_end [index] - opengl->font_begin [index]) + 1; opengl->font_index [index] = allocate (range * sizeof (* * opengl->font_index)); opengl->font_width [index] = allocate (range * sizeof (* * opengl->font_width)); opengl->font_height [index] = allocate (range * sizeof (* * opengl->font_height)); - for (u4 subindex = 0; subindex < range; ++subindex) { + for (natural subindex = 0; subindex < range; ++subindex) { file_read (file, & opengl->font_index [index] [subindex], sizeof (* * opengl->font_index)); file_read (file, & opengl->font_width [index] [subindex], sizeof (* * opengl->font_width)); file_read (file, & opengl->font_height [index] [subindex], sizeof (* * opengl->font_height)); @@ -344,10 +457,12 @@ static v0 opengl_import_spritesheet (opengl_structure * opengl, c1 * data_file) opengl->sprite_count = 0; opengl->font_count = 0; + + print ("/c Imported internal binary data of OpenGL spritesheet.\n"); } -static v0 opengl_export_spritesheet (opengl_structure * opengl, c1 * data_file) { - s4 file = file_open (data_file, file_flag_write | file_flag_create | file_flag_truncate); +static procedure opengl_export_spritesheet (opengl_structure * opengl, character * data_file) { + integer file = file_open (data_file, file_flag_write | file_flag_create | file_flag_truncate); fatal_failure (opengl->spritesheet_data == null, "opengl_export_spritesheet: OpenGL renderer can't access spritesheet data."); @@ -365,8 +480,8 @@ static v0 opengl_export_spritesheet (opengl_structure * opengl, c1 * data_file) file_write (file, opengl->font_begin, opengl->font_count * sizeof (* opengl->font_begin)); file_write (file, opengl->font_end, opengl->font_count * sizeof (* opengl->font_end)); - for (u4 index = 0; index < opengl->font_count; ++index) { - for (u4 subindex = 0; subindex < (u4) (opengl->font_end [index] - opengl->font_begin [index]) + 1; ++subindex) { + for (natural index = 0; index < opengl->font_count; ++index) { + for (natural subindex = 0; subindex < (natural) (opengl->font_end [index] - opengl->font_begin [index]) + 1; ++subindex) { file_write (file, & opengl->font_index [index] [subindex], sizeof (* * opengl->font_index)); file_write (file, & opengl->font_width [index] [subindex], sizeof (* * opengl->font_width)); file_write (file, & opengl->font_height [index] [subindex], sizeof (* * opengl->font_height)); @@ -375,82 +490,11 @@ static v0 opengl_export_spritesheet (opengl_structure * opengl, c1 * data_file) file = file_close (file); - print ("/c Exported internal binary data of OpenGL spritesheet."); -} - -static opengl_structure * opengl_initialize (u4 gameplay_framerate, u4 animation_framerate, b4 use_precomputed_spritesheet, - u4 maximum_quads_on_screen, u4 spritesheet_side) { - opengl_structure * opengl = allocate (sizeof (* opengl)); - - opengl->using_precomputed_spritesheet = use_precomputed_spritesheet; - - opengl->spritesheet_size = spritesheet_side; - opengl->gameplay_framerate = gameplay_framerate; - opengl->animation_framerate = animation_framerate; - opengl->vertex_limit = maximum_quads_on_screen * 32; - opengl->index_limit = maximum_quads_on_screen * 6; - opengl->tab_width = 4; - opengl->default_font = ~0u; - - if (use_precomputed_spritesheet == true) { - print ("[/0Comment/-] Importing spritesheet image and information...\n"); - - opengl_import_spritesheet (opengl, "binary/spritesheet.bin"); - } - - print ("[/2Success/-] Initialized OpenGL renderer.\n"); - - return (opengl); -} - -static opengl_structure * opengl_deinitialize (opengl_structure * opengl) { - opengl->active = false; - - for (u4 index = 0; index < opengl->font_count; ++index) { - opengl->font_index [index] = deallocate (opengl->font_index [index]); - opengl->font_width [index] = deallocate (opengl->font_width [index]); - opengl->font_height [index] = deallocate (opengl->font_height [index]); - } - - opengl->font_index = deallocate (opengl->font_index); - opengl->font_width = deallocate (opengl->font_width); - opengl->font_height = deallocate (opengl->font_height); - opengl->font_begin = deallocate (opengl->font_begin); - opengl->font_end = deallocate (opengl->font_end); - - opengl->sprite_width = deallocate (opengl->sprite_width); - opengl->sprite_height = deallocate (opengl->sprite_height); - opengl->sprite_u = deallocate (opengl->sprite_u); - opengl->sprite_v = deallocate (opengl->sprite_v); - - if (opengl->using_precomputed_spritesheet == false) { - opengl->spritesheet_data = deallocate (opengl->spritesheet_data); - } - - opengl->vertex_array = deallocate (opengl->vertex_array); - opengl->index_array = deallocate (opengl->index_array); - - glDeleteTextures (1, & opengl->spritesheet); - - opengl->glDeleteProgram (opengl->shader_program); - opengl->glDeleteShader (opengl->fragment_shader); - opengl->glDeleteShader (opengl->vertex_shader); - - opengl->glDeleteBuffers (1, & opengl->index_buffer); - opengl->glDeleteBuffers (1, & opengl->vertex_buffer); - opengl->glDeleteVertexArrays (1, & opengl->vertex_object); - - glfwDestroyWindow (opengl->window); - - glfwTerminate (); - - print ("[/2Success/-] Deinitialized OpenGL renderer.\n"); - - return (deallocate (opengl)); + print ("/c Exported internal binary data of OpenGL spritesheet.\n"); } -static v0 opengl_configure (opengl_structure * opengl, u4 window_width, u4 window_height, c1 * window_title) { - u8 font_bitmap [190] = { +static procedure opengl_configure (opengl_structure * opengl, natural window_width, natural window_height, character * window_title) { + natural_64 font_bitmap [190] = { 0x0000000000000000, 0x0000000000000000, 0x0000101010101010, 0x1000101000000000, 0x0024242400000000, 0x0000000000000000, 0x00002424247e2424, 0x7e24242400000000, 0x0010107c9290907c, 0x1212927c10100000, 0x0000649468081010, 0x202c524c00000000, 0x000018242418304a, 0x4444443a00000000, 0x0010101000000000, 0x0000000000000000, 0x0000081020202020, 0x2020100800000000, @@ -485,60 +529,63 @@ static v0 opengl_configure (opengl_structure * opengl, u4 window_width, u4 windo 0x0000300808080408, 0x0808083000000000, 0x000000000062928c, 0x0000000000000000 }; - c1 * vertex_shader = - "# version 330 core\n" + const character * vertex_shader = + "#version 330 core\n" "in vec2 vertex_xy;\n" "in vec2 vertex_uv;\n" "in vec4 vertex_rgba;\n" "out vec2 fragment_uv;\n" "out vec4 fragment_rgba;\n" - "v0 main () {\n" - " gl_Position = vec4 (vertex_xy, 0, 1);\n" - " fragment_uv = vertex_uv;\n" - " fragment_rgba = vertex_rgba;\n" + "void main () {\n" + " gl_Position = vec4 (vertex_xy, 0, 1);\n" + " fragment_uv = vertex_uv;\n" + " fragment_rgba = vertex_rgba;\n" "}\n"; - c1 * fragment_shader = - "# version 330 core\n" + const character * fragment_shader = + "#version 330 core\n" "uniform sampler2D texture_p;\n" "in vec2 fragment_uv;\n" "in vec4 fragment_rgba;\n" "out vec4 data;\n" - "v0 main () {\n" - " data = texture (texture_p, fragment_uv) * fragment_rgba;\n" + "void main () {\n" + " data = texture (texture_p, fragment_uv) * fragment_rgba;\n" "}\n"; - u4 * dumb_buffer = null; - u4 * order = null; + natural * dumb_buffer = null; + natural * order = null; - u4 xy_attribute = 0; - u4 uv_attribute = 0; - u4 rgba_attribute = 0; - //~u4 flags = 0; + natural xy_attribute = 0; + natural uv_attribute = 0; + natural rgba_attribute = 0; - u4 u = 0; - u4 v = 0; + natural u = 0; + natural v = 0; + + integer status = GL_NO_ERROR; if (opengl->using_precomputed_spritesheet == true) { - for (u4 index = 0; index < 95; ++index) { + for (natural index = 0; index < 95; ++index) { opengl->font_index [opengl->font_count] [index] = ++opengl->sprite_count - 1; } ++opengl->sprite_count; ++opengl->font_count; + print ("[/0Comment/-] Importing spritesheet image and information...\n"); + + opengl_import_spritesheet (opengl, "binary/spritesheet.bin"); + goto ignore_import; } dumb_buffer = allocate (256 * sizeof (* dumb_buffer)); - for (u4 index = 0; index < 256; ++index) { + for (natural index = 0; index < 256; ++index) { dumb_buffer [index] = 0xffffffff; } - ++opengl->font_count; - - u4 current = opengl->font_count - 1; + natural current = ++opengl->font_count - 1; opengl->font_index = reallocate (opengl->font_index, opengl->font_count * sizeof (* opengl->font_index)); opengl->font_width = reallocate (opengl->font_width, opengl->font_count * sizeof (* opengl->font_width)); @@ -546,20 +593,20 @@ static v0 opengl_configure (opengl_structure * opengl, u4 window_width, u4 windo opengl->font_begin = reallocate (opengl->font_begin, opengl->font_count * sizeof (* opengl->font_begin)); opengl->font_end = reallocate (opengl->font_end, opengl->font_count * sizeof (* opengl->font_end)); - opengl->font_begin [opengl->font_count - 1] = ' '; - opengl->font_end [opengl->font_count - 1] = '~'; + opengl->font_begin [current] = ' '; + opengl->font_end [current] = '~'; - opengl->font_index [opengl->font_count - 1] = allocate (95 * sizeof (* * opengl->font_index)); - opengl->font_width [opengl->font_count - 1] = allocate (95 * sizeof (* * opengl->font_width)); - opengl->font_height [opengl->font_count - 1] = allocate (95 * sizeof (* * opengl->font_height)); + opengl->font_index [current] = allocate (95 * sizeof (* * opengl->font_index)); + opengl->font_width [current] = allocate (95 * sizeof (* * opengl->font_width)); + opengl->font_height [current] = allocate (95 * sizeof (* * opengl->font_height)); - for (u4 index = 0; index < 95; ++index) { - u4 * buffer = allocate (opengl_font_width * opengl_font_height * sizeof (* buffer)); + for (natural index = 0; index < 95; ++index) { + natural * buffer = allocate (opengl_font_width * opengl_font_height * sizeof (* buffer)); - for (u4 value = 0; value < 2; ++value) { - for (u4 bit = 64; bit > 0; --bit) { - u4 destination = ((value << 3) - ((bit - 1) >> 3) + 7) * opengl_font_width - ((bit - 1) & 7) + 7; - u4 source = (font_bitmap [2 * index + value] >> (bit - 1)) & 1; + for (natural value = 0; value < 2; ++value) { + for (natural bit = 64; bit > 0; --bit) { + natural destination = ((value << 3) - ((bit - 1) >> 3) + 7) * opengl_font_width - ((bit - 1) & 7) + 7; + natural source = (font_bitmap [2 * index + value] >> (bit - 1)) & 1; buffer [destination] = (source) ? 0xffffffff : 0x00000000; } @@ -576,34 +623,31 @@ static v0 opengl_configure (opengl_structure * opengl, u4 window_width, u4 windo order = allocate (opengl->sprite_count * sizeof (* order)); - for (u4 index = 0; index < opengl->sprite_count; ++index) { + for (natural index = 0; index < opengl->sprite_count; ++index) { order [index] = index; } - for (u4 index = 0; index < opengl->sprite_count; ++index) { - for (u4 subindex = 0; subindex < opengl->sprite_count; ++subindex) { + for (natural index = 0; index < opengl->sprite_count; ++index) { + for (natural subindex = 0; subindex < opengl->sprite_count; ++subindex) { if (opengl->sprite_height [order [index]] < opengl->sprite_height [order [subindex]]) { - u4 temporary = order [index]; - - order [index] = order [subindex]; - order [subindex] = temporary; + exchange_natural (& order [index], & order [subindex]); } } } - for (u4 index = 0; index < opengl->sprite_count; ++index) { + for (natural index = 0; index < opengl->sprite_count; ++index) { if (u + opengl->sprite_width [order [index]] >= opengl->spritesheet_size) { u *= 0; v += opengl->sprite_height [order [index]]; } - opengl->sprite_u [order [index]] = (float) u / (float) opengl->spritesheet_size; - opengl->sprite_v [order [index]] = (float) v / (float) opengl->spritesheet_size; + opengl->sprite_u [order [index]] = (real) u / (real) opengl->spritesheet_size; + opengl->sprite_v [order [index]] = (real) v / (real) opengl->spritesheet_size; - for (u4 y = 0; y < opengl->sprite_height [order [index]]; ++y) { - for (u4 x = 0; x < opengl->sprite_width [order [index]]; ++x) { - u4 destination = (v + y) * opengl->spritesheet_size + (u + x); - u4 source = y * opengl->sprite_width [order [index]] + x; + for (natural y = 0; y < opengl->sprite_height [order [index]]; ++y) { + for (natural x = 0; x < opengl->sprite_width [order [index]]; ++x) { + natural destination = (v + y) * opengl->spritesheet_size + (u + x); + natural source = y * opengl->sprite_width [order [index]] + x; opengl->spritesheet_data [destination] = opengl->sprite_data [order [index]] [source]; } @@ -615,35 +659,29 @@ static v0 opengl_configure (opengl_structure * opengl, u4 window_width, u4 windo } opengl->sprite_data = deallocate (opengl->sprite_data); - order = deallocate (order); + order = deallocate (order); ignore_import: opengl->window_width = window_width; opengl->window_height = window_height; - opengl->pixel_width = 2.0f / (float) window_width; - opengl->pixel_height = 2.0f / (float) window_height; - - //~if (window_flags == 0) { - //~flags = opengl_window_decorated | opengl_window_resizable; - //~} else { - //~flags = window_flags; - //~} + opengl->pixel_width = 2.0f / (real) window_width; + opengl->pixel_height = 2.0f / (real) window_height; glfwInit (); - glfwWindowHs4 (GLFW_CONTEXT_VERSION_MAJOR, 3); - glfwWindowHs4 (GLFW_CONTEXT_VERSION_MINOR, 3); - glfwWindowHs4 (GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); - glfwWindowHs4 (GLFW_OPENGL_FORWARD_COMPAT, 1); - - opengl->window = glfwCreateWindow ((int) window_width, (int) window_height, window_title, null, null); + glfwWindowHint (GLFW_CONTEXT_VERSION_MAJOR, 3); + glfwWindowHint (GLFW_CONTEXT_VERSION_MINOR, 3); + glfwWindowHint (GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); + glfwWindowHint (GLFW_OPENGL_FORWARD_COMPAT, 1); - glfwSetWindowSizeLimits (opengl->window, 320, 240, 1920, 1080); + opengl->window = glfwCreateWindow ((integer) window_width, (integer) window_height, window_title, null, null); fatal_failure (opengl->window == null, "Failed to create GLFW window.\n"); + glfwSetWindowSizeLimits (opengl->window, 320, 240, 1920, 1080); /// REDO + glfwMakeContextCurrent (opengl->window); opengl->glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) glfwGetProcAddress ("glGenVertexArrays"); @@ -668,60 +706,88 @@ static v0 opengl_configure (opengl_structure * opengl, u4 window_width, u4 windo opengl->glDeleteProgram = (PFNGLDELETEPROGRAMPROC) glfwGetProcAddress ("glDeleteProgram"); opengl->glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) glfwGetProcAddress ("glGetUniformLocation"); opengl->glBufferData = (PFNGLBUFFERDATAPROC) glfwGetProcAddress ("glBufferData"); + opengl->glGetShaderiv = (PFNGLGETSHADERIVPROC) glfwGetProcAddress ("glGetShaderiv"); + opengl->glGetProgramiv = (PFNGLGETPROGRAMIVPROC) glfwGetProcAddress ("glGetProgramiv"); - glViewport (0, 0, (int) window_width, (int) window_height); + glViewport (0, 0, (integer) window_width, (integer) window_height); - glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - glEnable (GL_CULL_FACE); - glEnable (GL_BLEND); + conditional_print ((status = glGetError ()) != GL_NO_ERROR, "/f Failed to set OpenGL viewport dimensions: %i\n", status); opengl->glGenVertexArrays (1, & opengl->vertex_object); opengl->glBindVertexArray (opengl->vertex_object); + conditional_print ((status = glGetError ()) != GL_NO_ERROR, "/f Failed to generate and bind OpenGL vertex array object: %i\n", status); + opengl->glGenBuffers (1, & opengl->vertex_buffer); opengl->glBindBuffer (GL_ARRAY_BUFFER, opengl->vertex_buffer); + conditional_print ((status = glGetError ()) != GL_NO_ERROR, "/f Failed to generate and bind OpenGL vertex buffer object: %i\n", status); + opengl->glGenBuffers (1, & opengl->index_buffer); opengl->glBindBuffer (GL_ELEMENT_ARRAY_BUFFER, opengl->index_buffer); + conditional_print ((status = glGetError ()) != GL_NO_ERROR, "/f Failed to generate and bind OpenGL index buffer object: %i\n", status); + opengl->vertex_shader = opengl->glCreateShader (GL_VERTEX_SHADER); + conditional_print (opengl->vertex_shader == 0, "/f Failed to create OpenGL vertex shader: %i\n", glGetError ()); + opengl->glShaderSource (opengl->vertex_shader, 1, & vertex_shader, null); opengl->glCompileShader (opengl->vertex_shader); + opengl->glGetShaderiv (opengl->vertex_shader, GL_COMPILE_STATUS, & status); + + conditional_print (status == GL_FALSE, "/f Failed to compile OpenGL vertex shader: %i\n", status); + opengl->fragment_shader = opengl->glCreateShader (GL_FRAGMENT_SHADER); + conditional_print (opengl->fragment_shader == 0, "/f Failed to create OpenGL fragment shader: %i\n", glGetError ()); + opengl->glShaderSource (opengl->fragment_shader, 1, & fragment_shader, null); opengl->glCompileShader (opengl->fragment_shader); + opengl->glGetShaderiv (opengl->fragment_shader, GL_COMPILE_STATUS, & status); + + conditional_print (status == GL_FALSE, "/f Failed to compile OpenGL fragment shader: %i\n", status); + opengl->shader_program = opengl->glCreateProgram (); + conditional_print (opengl->shader_program == 0, "/f Failed to create OpenGL shader program: /1%i/-.\n", glGetError ()); + opengl->glAttachShader (opengl->shader_program, opengl->vertex_shader); opengl->glAttachShader (opengl->shader_program, opengl->fragment_shader); opengl->glBindFragDataLocation (opengl->shader_program, 0, "data"); opengl->glLinkProgram (opengl->shader_program); - opengl->glUseProgram (opengl->shader_program); - xy_attribute = (u4) opengl->glGetAttribLocation (opengl->shader_program, "vertex_xy"); + opengl->glGetProgramiv (opengl->shader_program, GL_LINK_STATUS, & status); + + conditional_print (status == GL_FALSE, "/f Failed to link OpenGL shader program: %i\n", status); + + opengl->glUseProgram (opengl->shader_program); + /////////////////// + status = glGetError (); if (status != GL_NO_ERROR) printf (">>> using %i\n", status); + + xy_attribute = (natural) opengl->glGetAttribLocation (opengl->shader_program, "vertex_xy"); opengl->glEnableVertexAttribArray (xy_attribute); - opengl->glVertexAttribPointer (xy_attribute, 2, GL_FLOAT, GL_FALSE, 8 * sizeof (float), (v0 *) 0); + opengl->glVertexAttribPointer (xy_attribute, 2, GL_FLOAT, GL_FALSE, 8 * sizeof (real), (procedure *) 0); - uv_attribute = (u4) opengl->glGetAttribLocation (opengl->shader_program, "vertex_uv"); + uv_attribute = (natural) opengl->glGetAttribLocation (opengl->shader_program, "vertex_uv"); opengl->glEnableVertexAttribArray (uv_attribute); - opengl->glVertexAttribPointer (uv_attribute, 2, GL_FLOAT, GL_FALSE, 8 * sizeof (float), (v0 *) (2 * sizeof (float))); + opengl->glVertexAttribPointer (uv_attribute, 2, GL_FLOAT, GL_FALSE, 8 * sizeof (real), (procedure *) (2 * sizeof (real))); - rgba_attribute = (u4) opengl->glGetAttribLocation (opengl->shader_program, "vertex_rgba"); + rgba_attribute = (natural) opengl->glGetAttribLocation (opengl->shader_program, "vertex_rgba"); opengl->glEnableVertexAttribArray (rgba_attribute); - opengl->glVertexAttribPointer (rgba_attribute, 4, GL_FLOAT, GL_FALSE, 8 * sizeof (float), (v0 *) (4 * sizeof (float))); + opengl->glVertexAttribPointer (rgba_attribute, 4, GL_FLOAT, GL_FALSE, 8 * sizeof (real), (procedure *) (4 * sizeof (real))); + + if (glGetError () != GL_NO_ERROR) printf (">>> texture+\n"); opengl->vertex_array = allocate (opengl->vertex_limit * sizeof (opengl->vertex_array)); opengl->index_array = allocate (opengl->index_limit * sizeof (opengl->index_array)); @@ -735,6 +801,8 @@ static v0 opengl_configure (opengl_structure * opengl, u4 window_width, u4 windo opengl->glUniform1i (opengl->glGetUniformLocation (opengl->shader_program, "texture_p"), 0); + if (glGetError () != GL_NO_ERROR) printf (">>> texture-\n"); + glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); @@ -744,6 +812,11 @@ static v0 opengl_configure (opengl_structure * opengl, u4 window_width, u4 windo opengl->spritesheet_data = deallocate (opengl->spritesheet_data); } + glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + glEnable (GL_CULL_FACE); + glEnable (GL_BLEND); + opengl->active = true; opengl->frame_begin = nano_time (); @@ -752,170 +825,37 @@ static v0 opengl_configure (opengl_structure * opengl, u4 window_width, u4 windo glClear (GL_COLOR_BUFFER_BIT); - print ("[/2Success/-] Configured OpenGL renderer.\n"); -} + if (glGetError () != GL_NO_ERROR) printf (">>> done\n"); -static v0 opengl_synchronize (opengl_structure * opengl, u4 colour) { - s4 signal_code [signal_count] = { - 0, - GLFW_KEY_A, GLFW_KEY_B, GLFW_KEY_C, GLFW_KEY_D, - GLFW_KEY_E, GLFW_KEY_F, GLFW_KEY_G, GLFW_KEY_H, - GLFW_KEY_I, GLFW_KEY_J, GLFW_KEY_K, GLFW_KEY_L, - GLFW_KEY_M, GLFW_KEY_N, GLFW_KEY_O, GLFW_KEY_P, - GLFW_KEY_Q, GLFW_KEY_R, GLFW_KEY_S, GLFW_KEY_T, - GLFW_KEY_U, GLFW_KEY_V, GLFW_KEY_W, GLFW_KEY_X, - GLFW_KEY_Y, GLFW_KEY_Z, GLFW_KEY_0, GLFW_KEY_1, - GLFW_KEY_2, GLFW_KEY_3, GLFW_KEY_4, GLFW_KEY_5, - GLFW_KEY_6, GLFW_KEY_7, GLFW_KEY_8, GLFW_KEY_9, - GLFW_KEY_ESCAPE, GLFW_KEY_TAB, GLFW_KEY_ENTER, GLFW_KEY_ENTER, - GLFW_KEY_SLASH, GLFW_KEY_BACKSLASH, GLFW_KEY_SEMICOLON, GLFW_KEY_GRAVE_ACCENT, - GLFW_KEY_SPACE, GLFW_KEY_BACKSPACE, GLFW_KEY_PERIOD, GLFW_KEY_COMMA, - GLFW_KEY_APOSTROPHE, GLFW_KEY_CAPS_LOCK, GLFW_KEY_MINUS, GLFW_KEY_EQUAL, - GLFW_KEY_LEFT_BRACKET, GLFW_KEY_RIGHT_BRACKET, GLFW_KEY_LEFT_CONTROL, GLFW_KEY_RIGHT_CONTROL, - GLFW_KEY_LEFT_SHIFT, GLFW_KEY_RIGHT_SHIFT, GLFW_KEY_LEFT_ALT, GLFW_KEY_RIGHT_ALT, - GLFW_KEY_F1, GLFW_KEY_F2, GLFW_KEY_F3, GLFW_KEY_F4, - GLFW_KEY_F5, GLFW_KEY_F6, GLFW_KEY_F7, GLFW_KEY_F8, - GLFW_KEY_F9, GLFW_KEY_F10, GLFW_KEY_F11, GLFW_KEY_F12, - GLFW_KEY_UP, GLFW_KEY_DOWN, GLFW_KEY_LEFT, GLFW_KEY_RIGHT, - GLFW_KEY_NUM_LOCK, GLFW_KEY_PAUSE, GLFW_KEY_INSERT, GLFW_KEY_HOME, - GLFW_KEY_PAGE_UP, GLFW_KEY_DELETE, GLFW_KEY_END, GLFW_KEY_PAGE_DOWN, - GLFW_KEY_KP_ADD, GLFW_KEY_KP_SUBTRACT, GLFW_KEY_KP_MULTIPLY, GLFW_KEY_KP_DIVIDE, - GLFW_KEY_KP_ENTER, GLFW_KEY_KP_DECIMAL, GLFW_KEY_KP_0, GLFW_KEY_KP_1, - GLFW_KEY_KP_2, GLFW_KEY_KP_3, GLFW_KEY_KP_4, GLFW_KEY_KP_5, - GLFW_KEY_KP_6, GLFW_KEY_KP_7, GLFW_KEY_KP_8, GLFW_KEY_KP_9 - }; - - f4 r = (float) ((colour >> 24) & 0xff) / 255.0f; - f4 g = (float) ((colour >> 16) & 0xff) / 255.0f; - f4 b = (float) ((colour >> 8) & 0xff) / 255.0f; - f4 a = (float) ((colour >> 0) & 0xff) / 255.0f; - - s4 new_window_width = 0; - s4 new_window_height = 0; - - glClearColor (r, g, b, a); - - glClear (GL_COLOR_BUFFER_BIT); - - glfwPollEvents (); - - glfwSetWindowShouldClose (opengl->window, opengl->active == false); - - glfwGetWindowSize (opengl->window, & new_window_width, & new_window_height); - - if ((opengl->window_width != (u4) new_window_width) || (opengl->window_height != (u4) new_window_height)) { - if ((new_window_width <= 0) || (new_window_height <= 0)) return; - - glViewport (0, 0, new_window_width, new_window_height); - - opengl->window_width = (u4) new_window_width; - opengl->window_height = (u4) new_window_height; - - opengl->pixel_width = 2.0f / (float) new_window_width; - opengl->pixel_height = 2.0f / (float) new_window_height; - } - - opengl->cursor [cursor_left] = (b4) (glfwGetMouseButton (opengl->window, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS); - opengl->cursor [cursor_middle] = (b4) (glfwGetMouseButton (opengl->window, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS); - opengl->cursor [cursor_right] = (b4) (glfwGetMouseButton (opengl->window, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS); - - if (opengl->freeze_cursor == false) { - f8 x = 0.0; - f8 y = 0.0; - - glfwGetCursorPos (opengl->window, & x, & y); - - opengl->cursor_x = (int) x; - opengl->cursor_y = (int) y; - - //~if ((opengl->cursor_x < 0) || (opengl->cursor_x > (int) opengl->window_width) || - //~(opengl->cursor_y < 0) || (opengl->cursor_y > (int) opengl->window_height)) { - //~opengl->cursor_x = 0; - //~opengl->cursor_y = 0; - //~} - } else { - if ((opengl->cursor [cursor_left] == false) - && (opengl->cursor [cursor_middle] == false) - && (opengl->cursor [cursor_right] == false)) { - opengl->freeze_cursor = false; - } - } - - if (opengl->freeze_signal == false) { - for (u4 index = 0; index < signal_count; ++index) { - opengl->signal [index] = (b4) (glfwGetKey (opengl->window, signal_code [index]) == GLFW_PRESS); - } - } - - opengl->glBufferData (GL_ARRAY_BUFFER, opengl->vertex_count * 4, opengl->vertex_array, GL_DYNAMIC_DRAW); - opengl->glBufferData (GL_ELEMENT_ARRAY_BUFFER, opengl->index_count * 4, opengl->index_array, GL_DYNAMIC_DRAW); - - opengl->glBindBuffer (GL_ARRAY_BUFFER, opengl->vertex_buffer); - - glDrawElements (GL_TRIANGLES, (int) opengl->index_count * 4, GL_UNSIGNED_INT, null); - - glfwSwapBuffers (opengl->window); - - opengl->vertex_count = 0; - opengl->index_count = 0; - - opengl->frame_end = nano_time (); - - opengl->frame_time = opengl->frame_end - opengl->frame_begin; - - if (opengl->frame_time < 1000000000ul / opengl->gameplay_framerate) { - nano_wait (1000000000ul / opengl->gameplay_framerate - opengl->frame_time); - } - - if (opengl->global_tick % opengl->gameplay_framerate == 0) { - opengl->framerate = (u4) (1000000000ul / opengl->frame_time); - } - - ++opengl->global_tick; - - opengl->global_tick = opengl->global_tick % (opengl->gameplay_framerate * opengl->animation_framerate); - opengl->gameplay_tick = opengl->global_tick % (opengl->gameplay_framerate); - opengl->animation_tick = opengl->global_tick / (opengl->gameplay_framerate / opengl->animation_framerate); - - opengl->frame_begin = nano_time (); + print ("/s Configured OpenGL renderer.\n"); } -static v0 opengl_render_base (opengl_structure * opengl, u4 sprite, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height, - f4 scale_x, f4 scale_y, s4 flip_x, s4 flip_y, - u4 colour_upper_left, u4 colour_upper_right, u4 colour_lower_left, u4 colour_lower_right) { - f4 screen_x = 0.0f; - f4 screen_y = 0.0f; - f4 unwrap_x = 0.0f; - f4 unwrap_y = 0.0f; - f4 screen_width = 0.0f; - f4 screen_height = 0.0f; - f4 unwrap_width = 0.0f; - f4 unwrap_height = 0.0f; - - if ((x > (int) opengl->window_width) || (y > (int) opengl->window_height)) return; - - if ((x < (int) - ((float) width * scale_x)) || (y < (int) - ((float) height * scale_y))) return; +static procedure opengl_render_base (opengl_structure * opengl, natural sprite, integer x, integer y, natural u, natural v, natural width, + natural height, real scale_x, real scale_y, integer flip_x, integer flip_y, natural colour_upper_left, + natural colour_upper_right, natural colour_lower_left, natural colour_lower_right) { + if ((x > (integer) opengl->window_width) || (x < (integer) - ((real) width * scale_x))) return; + if ((y > (integer) opengl->window_height) || (y < (integer) - ((real) height * scale_y))) return; - if (sprite >= opengl->sprite_count) return; - if (opengl->vertex_count + 32 >= opengl->vertex_limit) return; - if (opengl->index_count + 6 >= opengl->index_limit) return; + fatal_failure (sprite >= opengl->sprite_count, "Not rendering, sprite out of range."); + fatal_failure (opengl->vertex_count + 32 >= opengl->vertex_limit, "Not rendering, not enough vertex space."); + fatal_failure (opengl->index_count + 6 >= opengl->index_limit, "Not rendering, not enough index space."); - screen_x = + ((float) x * opengl->pixel_width - 1); - screen_y = - ((float) y * opengl->pixel_height - 1); + real screen_x = + ((real) x * opengl->pixel_width - 1.0f); + real screen_y = - ((real) y * opengl->pixel_height - 1.0f); - unwrap_x = opengl->sprite_u [sprite] + (float) u / (float) opengl->spritesheet_size; - unwrap_y = opengl->sprite_v [sprite] + (float) v / (float) opengl->spritesheet_size; + real screen_width = + ((real) width * opengl->pixel_width * scale_x); + real screen_height = - ((real) height * opengl->pixel_height * scale_y); - screen_width = +((float) width * opengl->pixel_width * scale_x); - screen_height = -((float) height * opengl->pixel_height * scale_y); + real unwrap_x = opengl->sprite_u [sprite] + (real) u / (real) opengl->spritesheet_size; + real unwrap_y = opengl->sprite_v [sprite] + (real) v / (real) opengl->spritesheet_size; - unwrap_width = (float) width / (float) opengl->spritesheet_size; - unwrap_height = (float) height / (float) opengl->spritesheet_size; + real unwrap_width = (real) width / (real) opengl->spritesheet_size; + real unwrap_height = (real) height / (real) opengl->spritesheet_size; opengl->vertex_array [opengl->vertex_count + 0] = screen_x; opengl->vertex_array [opengl->vertex_count + 1] = screen_y; - opengl->vertex_array [opengl->vertex_count + 2] = unwrap_x + unwrap_width * (float) (flip_y != 0); - opengl->vertex_array [opengl->vertex_count + 3] = unwrap_y + unwrap_height * (float) (flip_x != 0); + opengl->vertex_array [opengl->vertex_count + 2] = unwrap_x + unwrap_width * (real) (flip_y != 0); + opengl->vertex_array [opengl->vertex_count + 3] = unwrap_y + unwrap_height * (real) (flip_x != 0); opengl->vertex_array [opengl->vertex_count + 4] = normal_r (colour_upper_left); opengl->vertex_array [opengl->vertex_count + 5] = normal_g (colour_upper_left); opengl->vertex_array [opengl->vertex_count + 6] = normal_b (colour_upper_left); @@ -923,8 +863,8 @@ static v0 opengl_render_base (opengl_structure * opengl, u4 sprite, s4 x, s4 y, opengl->vertex_array [opengl->vertex_count + 8] = screen_x + screen_width; opengl->vertex_array [opengl->vertex_count + 9] = screen_y; - opengl->vertex_array [opengl->vertex_count + 10] = unwrap_x + unwrap_width * (float) (flip_y == 0); - opengl->vertex_array [opengl->vertex_count + 11] = unwrap_y + unwrap_height * (float) (flip_x != 0); + opengl->vertex_array [opengl->vertex_count + 10] = unwrap_x + unwrap_width * (real) (flip_y == 0); + opengl->vertex_array [opengl->vertex_count + 11] = unwrap_y + unwrap_height * (real) (flip_x != 0); opengl->vertex_array [opengl->vertex_count + 12] = normal_r (colour_upper_right); opengl->vertex_array [opengl->vertex_count + 13] = normal_g (colour_upper_right); opengl->vertex_array [opengl->vertex_count + 14] = normal_b (colour_upper_right); @@ -932,8 +872,8 @@ static v0 opengl_render_base (opengl_structure * opengl, u4 sprite, s4 x, s4 y, opengl->vertex_array [opengl->vertex_count + 16] = screen_x; opengl->vertex_array [opengl->vertex_count + 17] = screen_y + screen_height; - opengl->vertex_array [opengl->vertex_count + 18] = unwrap_x + unwrap_width * (float) (flip_y != 0); - opengl->vertex_array [opengl->vertex_count + 19] = unwrap_y + unwrap_height * (float) (flip_x == 0); + opengl->vertex_array [opengl->vertex_count + 18] = unwrap_x + unwrap_width * (real) (flip_y != 0); + opengl->vertex_array [opengl->vertex_count + 19] = unwrap_y + unwrap_height * (real) (flip_x == 0); opengl->vertex_array [opengl->vertex_count + 20] = normal_r (colour_lower_left); opengl->vertex_array [opengl->vertex_count + 21] = normal_g (colour_lower_left); opengl->vertex_array [opengl->vertex_count + 22] = normal_b (colour_lower_left); @@ -941,269 +881,348 @@ static v0 opengl_render_base (opengl_structure * opengl, u4 sprite, s4 x, s4 y, opengl->vertex_array [opengl->vertex_count + 24] = screen_x + screen_width; opengl->vertex_array [opengl->vertex_count + 25] = screen_y + screen_height; - opengl->vertex_array [opengl->vertex_count + 26] = unwrap_x + unwrap_width * (float) (flip_y == 0); - opengl->vertex_array [opengl->vertex_count + 27] = unwrap_y + unwrap_height * (float) (flip_x == 0); + opengl->vertex_array [opengl->vertex_count + 26] = unwrap_x + unwrap_width * (real) (flip_y == 0); + opengl->vertex_array [opengl->vertex_count + 27] = unwrap_y + unwrap_height * (real) (flip_x == 0); opengl->vertex_array [opengl->vertex_count + 28] = normal_r (colour_lower_right); opengl->vertex_array [opengl->vertex_count + 29] = normal_g (colour_lower_right); opengl->vertex_array [opengl->vertex_count + 30] = normal_b (colour_lower_right); opengl->vertex_array [opengl->vertex_count + 31] = normal_a (colour_lower_right); - opengl->index_array [opengl->index_count + 0] = (opengl->vertex_count / 8) + 2; - opengl->index_array [opengl->index_count + 1] = (opengl->vertex_count / 8) + 1; - opengl->index_array [opengl->index_count + 2] = (opengl->vertex_count / 8) + 0; - opengl->index_array [opengl->index_count + 3] = (opengl->vertex_count / 8) + 1; - opengl->index_array [opengl->index_count + 4] = (opengl->vertex_count / 8) + 2; - opengl->index_array [opengl->index_count + 5] = (opengl->vertex_count / 8) + 3; + opengl->index_array [opengl->index_count + 0] = opengl->vertex_count / 8 + 2; + opengl->index_array [opengl->index_count + 1] = opengl->vertex_count / 8 + 1; + opengl->index_array [opengl->index_count + 2] = opengl->vertex_count / 8 + 0; + opengl->index_array [opengl->index_count + 3] = opengl->vertex_count / 8 + 1; + opengl->index_array [opengl->index_count + 4] = opengl->vertex_count / 8 + 2; + opengl->index_array [opengl->index_count + 5] = opengl->vertex_count / 8 + 3; opengl->vertex_count += 32; opengl->index_count += 6; } -static v0 opengl_render_rectangle (opengl_structure * opengl, s4 x, s4 y, u4 width, u4 height, u4 colour) { - opengl_render_base (opengl, opengl->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16.0f, (float) height / 16.0f, 0, 0, +static procedure opengl_render_rectangle (opengl_structure * opengl, integer x, integer y, natural width, natural height, natural colour) { + opengl_render_base (opengl, opengl->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16.0f, (real) height / 16.0f, 0, 0, colour, colour, colour, colour); } -static v0 opengl_render_rectangle_vertical_gradient (opengl_structure * opengl, s4 x, s4 y, u4 width, u4 height, - u4 colour_up, u4 colour_down) { - opengl_render_base (opengl, opengl->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16.0f, (float) height / 16.0f, 0, 0, +static procedure opengl_render_rectangle_vertical_gradient (opengl_structure * opengl, integer x, integer y, natural width, natural height, + natural colour_up, natural colour_down) { + opengl_render_base (opengl, opengl->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16.0f, (real) height / 16.0f, 0, 0, colour_up, colour_up, colour_down, colour_down); } -static v0 opengl_render_rectangle_horizontal_gradient (opengl_structure * opengl, s4 x, s4 y, u4 width, u4 height, - u4 colour_left, u4 colour_right) { - opengl_render_base (opengl, opengl->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16.0f, (float) height / 16.0f, 0, 0, +static procedure opengl_render_rectangle_horizontal_gradient (opengl_structure * opengl, integer x, integer y, natural width, natural height, + natural colour_left, natural colour_right) { + opengl_render_base (opengl, opengl->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16.0f, (real) height / 16.0f, 0, 0, colour_left, colour_right, colour_left, colour_right); } -static v0 opengl_render_sprite (opengl_structure * opengl, u4 sprite, s4 x, s4 y) { +static procedure opengl_render_sprite (opengl_structure * opengl, natural sprite, integer x, integer y) { opengl_render_base (opengl, sprite, x, y, 0, 0, opengl->sprite_width [sprite], opengl->sprite_height [sprite], 1.0f, 1.0f, 0, 0, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 opengl_render_sprite_crop (opengl_structure * opengl, u4 sprite, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height) { - opengl_render_base (opengl, sprite, x, y, u, v, width, height, 1.0f, 1.0f, 0, 0, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); +static procedure opengl_render_sprite_scale (opengl_structure * opengl, natural sprite, integer x, integer y, real scale_x, real scale_y) { + opengl_render_base (opengl, sprite, x, y, 0, 0, opengl->sprite_width [sprite], opengl->sprite_height [sprite], scale_x, scale_y, 0, 0, + 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 opengl_render_sprite_flip (opengl_structure * opengl, u4 sprite, s4 x, s4 y, s4 flip_x, s4 flip_y) { - opengl_render_base (opengl, sprite, x, y, 0, 0, opengl->sprite_width [sprite], opengl->sprite_height [sprite], 1.0f, 1.0f, - flip_x, flip_y, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); +static procedure opengl_render_sprite_crop (opengl_structure * opengl, natural sprite, integer x, integer y, natural u, natural v, + natural width, natural height) { + opengl_render_base (opengl, sprite, x, y, u, v, width, height, 1.0f, 1.0f, 0, 0, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static v0 opengl_render_sprite_colour (opengl_structure * opengl, u4 sprite, s4 x, s4 y, u4 colour) { +static procedure opengl_render_sprite_colour (opengl_structure * opengl, natural sprite, integer x, integer y, natural colour) { opengl_render_base (opengl, sprite, x, y, 0, 0, opengl->sprite_width [sprite], opengl->sprite_height [sprite], 1.0f, 1.0f, 0, 0, colour, colour, colour, colour); } -static v0 opengl_render_sprite_control (opengl_structure * opengl, u4 sprite, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height, - s4 flip_x, s4 flip_y) { - opengl_render_base (opengl, sprite, x, y, u, v, width, height, 1.0f, 1.0f, flip_x, flip_y, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); -} - -static v0 opengl_render_sprite_crop_colour (opengl_structure * opengl, u4 sprite, u4 colour, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height) { - opengl_render_base (opengl, sprite, x, y, u, v, width, height, 1.0f, 1.0f, 0, 0, colour, colour, colour, colour); -} - -static v0 opengl_render_sprite_animate (opengl_structure * opengl, u4 sprite, s4 x, s4 y, u4 frames, u4 state, u4 states) { - u4 width = opengl->sprite_width [sprite] / states; - u4 height = opengl->sprite_height [sprite] / frames; - u4 u = width * (state % states); - u4 v = height * (opengl->animation_tick % frames); - - opengl_render_sprite_crop (opengl, sprite, x, y, u, v, width, height); -} - -static u4 opengl_render_character_width (opengl_structure * opengl, c1 character, u4 font, f4 scale) { - if ((character < opengl->font_begin [font]) || (character > opengl->font_end [font])) { - return (0); - } else { - u4 index = opengl->font_index [font] [character - opengl->font_begin [font]]; - - return ((u4) (scale * (float) opengl->sprite_width [index])); - } +static procedure opengl_render_sprite_flip (opengl_structure * opengl, natural sprite, integer x, integer y, integer flip_x, integer flip_y) { + opengl_render_base (opengl, sprite, x, y, 0, 0, opengl->sprite_width [sprite], opengl->sprite_height [sprite], 1.0f, 1.0f, + flip_x, flip_y, 0xffffffffu, 0xffffffffu, 0xffffffffu, 0xffffffffu); } -static u4 opengl_render_character_height (opengl_structure * opengl, c1 character, u4 font, f4 scale) { - if ((character < opengl->font_begin [font]) || (character > opengl->font_end [font])) { - return (0); - } else { - u4 index = opengl->font_index [font] [character - opengl->font_begin [font]]; - - return ((u4) (scale * (float) opengl->sprite_height [index])); - } +static procedure opengl_render_sprite_orient (opengl_structure * opengl, natural sprite, integer x, integer y, natural u, natural v, + natural width, natural height, integer flip_x, integer flip_y) { + opengl_render_base (opengl, sprite, x, y, u, v, width, height, 1.0f, 1.0f, flip_x, flip_y, 0xffffffffu, 0xffffffffu, 0xffffffffu, + 0xffffffffu); } -static u4 opengl_render_string_width (opengl_structure * opengl, c1 * string, u4 font, f4 scale) { - u4 width = 0; - u4 match = 0; +static procedure opengl_render_sprite_animation (opengl_structure * opengl, natural sprite, integer x, integer y, natural frames, natural state, + natural states) { + natural width = opengl->sprite_width [sprite] / states; + natural height = opengl->sprite_height [sprite] / frames; - if (string == null) { - return (0); - } - - for (u4 index = 0; string [index] != '\0'; ++index) { - if (string [index] == '\t') { - width += opengl->tab_width * opengl_render_character_width (opengl, ' ', font, scale); - } else if (string [index] == '\n') { - match = maximum (width, match); - width = 0; - } else { - width += opengl_render_character_width (opengl, string [index], font, scale); - } - } + natural u = width * (state % states); + natural v = height * (opengl->animation_tick % frames); - return (maximum (width, match)); + opengl_render_sprite_crop (opengl, sprite, x, y, u, v, width, height); } -static u4 opengl_render_string_height (opengl_structure * opengl, c1 * string, u4 font, f4 scale) { - u4 height = opengl_render_character_height (opengl, ' ', font, scale); - - if ((string == null) || (string [0] == '\0')) { - return (0); - } - - for (u4 index = 0; string [index] != '\0'; ++index) { - if (string [index] == '\n') { - height += opengl_render_character_height (opengl, ' ', font, scale); - } - } - - return (height); +static procedure opengl_render_sprite_crop_colour (opengl_structure * opengl, natural sprite, natural colour, integer x, integer y, natural u, + natural v, natural width, natural height) { + opengl_render_base (opengl, sprite, x, y, u, v, width, height, 1.0f, 1.0f, 0, 0, colour, colour, colour, colour); } -static v0 opengl_render_character_base (opengl_structure * opengl, c1 character, u4 font, s4 x, s4 y, f4 scale, - u4 colour_upper_left, u4 colour_upper_right, u4 colour_lower_left, u4 colour_lower_right) { - if ((character < opengl->font_begin [font]) || (character > opengl->font_end [font])) return; +static procedure opengl_render_character_base (opengl_structure * opengl, character data, natural font, integer x, integer y, real scale, + natural colour_upper_left, natural colour_upper_right, natural colour_lower_left, + natural colour_lower_right) { + if ((font >= opengl->font_count) && (font != ~ 0u)) return; - if (font == opengl->default_font) { + if (font == ~ 0u) { font = opengl->font_count - 1; } - u4 index = opengl->font_index [font] [character - opengl->font_begin [font]]; - u4 width = opengl->sprite_width [index]; - u4 height = opengl->sprite_height [index]; + if ((data < opengl->font_begin [font]) || (data > opengl->font_end [font])) return; + + natural index = opengl->font_index [font] [data - opengl->font_begin [font]]; + natural width = opengl->sprite_width [index]; + natural height = opengl->sprite_height [index]; opengl_render_base (opengl, index, x, y, 0, 0, width, height, scale, scale, 0, 0, colour_upper_left, colour_upper_right, colour_lower_left, colour_lower_right); } -static v0 opengl_render_character (opengl_structure * opengl, c1 character, u4 font, s4 x, s4 y, f4 scale, u4 colour) { - opengl_render_character_base (opengl, character, font, x, y, scale, colour, colour, colour, colour); +static procedure opengl_render_character (opengl_structure * opengl, character data, natural font, integer x, integer y, real scale, natural colour) { + opengl_render_character_base (opengl, data, font, x, y, scale, colour, colour, colour, colour); } -static v0 opengl_render_character_vertical_gradient (opengl_structure * opengl, c1 character, u4 font, s4 x, s4 y, f4 scale, - u4 colour_up, u4 colour_down) { - opengl_render_character_base (opengl, character, font, x, y, scale, colour_up, colour_up, colour_down, colour_down); +static procedure opengl_render_character_vertical_gradient (opengl_structure * opengl, character data, natural font, integer x, integer y, real scale, + natural colour_up, natural colour_down) { + opengl_render_character_base (opengl, data, font, x, y, scale, colour_up, colour_up, colour_down, colour_down); } -static v0 opengl_render_character_horizontal_gradient (opengl_structure * opengl, c1 character, u4 font, s4 x, s4 y, f4 scale, - u4 colour_left, u4 colour_right) { - opengl_render_character_base (opengl, character, font, x, y, scale, colour_left, colour_right, colour_left, colour_right); +static procedure opengl_render_character_horizontal_gradient (opengl_structure * opengl, character data, natural font, integer x, integer y, real scale, + natural colour_left, natural colour_right) { + opengl_render_character_base (opengl, data, font, x, y, scale, colour_left, colour_right, colour_left, colour_right); } -static v0 opengl_render_string_base (opengl_structure * opengl, c1 * string, u4 font, s4 x, s4 y, f4 scale, - u4 colour_upper_left, u4 colour_upper_right, u4 colour_lower_left, u4 colour_lower_right) { - s4 offset = x; +static procedure opengl_render_string_base (opengl_structure * opengl, character * string, natural font, integer x, integer y, real scale, + natural colour_upper_left, natural colour_upper_right, natural colour_lower_left, natural colour_lower_right) { + integer offset = x; if (string == null) return; - for (u4 index = 0; string [index] != '\0'; ++index) { + for (natural index = 0; string [index] != '\0'; ++index) { if (string [index] == '\t') { - x += opengl->tab_width * opengl_render_character_width (opengl, ' ', font, scale); + x += opengl->tab_width * opengl_character_width (opengl, ' ', font, scale); continue; } else if (string [index] == '\n') { x = offset; - y += opengl_render_character_height (opengl, ' ', font, scale); + y += opengl_character_height (opengl, ' ', font, scale); continue; } else { opengl_render_character_base (opengl, string [index], font, x, y, scale, colour_upper_left, colour_upper_right, colour_lower_left, colour_lower_right); - x += opengl_render_character_width (opengl, string [index], font, scale); + x += opengl_character_width (opengl, string [index], font, scale); } } } -static v0 opengl_render_string (opengl_structure * opengl, c1 * string, u4 font, s4 x, s4 y, f4 scale, u4 colour) { +static procedure opengl_render_string (opengl_structure * opengl, character * string, natural font, integer x, integer y, real scale, natural colour) { opengl_render_string_base (opengl, string, font, x, y, scale, colour, colour, colour, colour); } -static v0 opengl_render_string_vertical_gradient (opengl_structure * opengl, c1 * string, u4 font, s4 x, s4 y, f4 scale, - u4 colour_up, u4 colour_down) { +static procedure opengl_render_string_vertical_gradient (opengl_structure * opengl, character * string, natural font, integer x, integer y, real scale, + natural colour_up, natural colour_down) { opengl_render_string_base (opengl, string, font, x, y, scale, colour_up, colour_up, colour_down, colour_down); } -static v0 opengl_render_string_horizontal_gradient (opengl_structure * opengl, c1 * string, u4 font, s4 x, s4 y, f4 scale, - u4 colour_left, u4 colour_right) { +static procedure opengl_render_string_horizontal_gradient (opengl_structure * opengl, character * string, natural font, integer x, integer y, real scale, + natural colour_left, natural colour_right) { opengl_render_string_base (opengl, string, font, x, y, scale, colour_left, colour_right, colour_left, colour_right); } -static v0 opengl_render_string_full_vertical_gradient (opengl_structure * opengl, c1 * string, u4 font, s4 x, s4 y, f4 scale, - u4 colour_up, u4 colour_down) { - s4 offset = x; - u4 back = 0; - u4 up = 0; - u4 down = 0; +static procedure opengl_render_string_full_vertical_gradient (opengl_structure * opengl, character * string, natural font, integer x, integer y, real scale, + natural colour_up, natural colour_down) { + integer offset = x; + natural back = 0; + natural up = 0; + natural down = 0; - f4 interpolator = 1.0f / (float) string_full_height (string); + real interpolator = 1.0f / (real) string_full_height (string); if (string == null) return; - for (u4 index = 0; string [index] != '\0'; ++index) { + for (natural index = 0; string [index] != '\0'; ++index) { if (string [index] == '\t') { - x += opengl->tab_width * opengl_render_character_width (opengl, ' ', font, scale); + x += opengl->tab_width * opengl_character_width (opengl, ' ', font, scale); continue; } else if (string [index] == '\n') { back += 1; x = offset; - y += opengl_render_character_height (opengl, ' ', font, scale); + y += opengl_character_height (opengl, ' ', font, scale); continue; } else { - up = colour_linear_interpolation (colour_up, colour_down, (float) (back + 0) * interpolator); - down = colour_linear_interpolation (colour_up, colour_down, (float) (back + 1) * interpolator); + up = colour_linear_interpolation (colour_up, colour_down, (real) (back + 0) * interpolator); + down = colour_linear_interpolation (colour_up, colour_down, (real) (back + 1) * interpolator); opengl_render_character_vertical_gradient (opengl, string [index], font, x, y, scale, up, down); - x += opengl_render_character_width (opengl, string [index], font, scale); + x += opengl_character_width (opengl, string [index], font, scale); } } } -static v0 opengl_render_string_full_horizontal_gradient (opengl_structure * opengl, c1 * string, u4 font, s4 x, s4 y, f4 scale, - u4 colour_left, u4 colour_right) { - s4 offset = x; - u4 back = 0; - u4 left = 0; - u4 right = 0; +static procedure opengl_render_string_full_horizontal_gradient (opengl_structure * opengl, character * string, natural font, integer x, + integer y, real scale, natural colour_left, natural colour_right) { + integer offset = x; + natural back = 0; + natural left = 0; + natural right = 0; - f4 interpolator = 1.0f / (float) string_full_width (string, opengl->tab_width); + real interpolator = 1.0f / (real) string_full_width (string, opengl->tab_width); if (string == null) return; - for (u4 index = 0; string [index] != '\0'; ++index) { + for (natural index = 0; string [index] != '\0'; ++index) { if (string [index] == '\t') { - x += opengl->tab_width * opengl_render_character_width (opengl, ' ', font, scale); + x += opengl->tab_width * opengl_character_width (opengl, ' ', font, scale); continue; } else if (string [index] == '\n') { back = 0; x = offset; - y += opengl_render_character_height (opengl, ' ', font, scale); + y += opengl_character_height (opengl, ' ', font, scale); continue; } else { back += 1; - left = colour_linear_interpolation (colour_left, colour_right, (float) (back + 0) * interpolator); - right = colour_linear_interpolation (colour_left, colour_right, (float) (back + 1) * interpolator); + left = colour_linear_interpolation (colour_left, colour_right, (real) (back + 0) * interpolator); + right = colour_linear_interpolation (colour_left, colour_right, (real) (back + 1) * interpolator); opengl_render_character_horizontal_gradient (opengl, string [index], font, x, y, scale, left, right); - x += opengl_render_character_width (opengl, string [index], font, scale); + x += opengl_character_width (opengl, string [index], font, scale); } } } -static v0 opengl_render_framerate (opengl_structure * opengl, u4 font, s4 x, s4 y, f4 scale, u4 colour) { +static procedure opengl_render_framerate (opengl_structure * opengl, natural font, integer x, integer y, real scale, natural colour) { opengl_render_string (opengl, number_to_string (opengl->framerate), font, x, y, scale, colour); } +static procedure opengl_synchronize (opengl_structure * opengl, natural colour) { + integer signal_code [signal_count] = { + 0, + GLFW_KEY_A, GLFW_KEY_B, GLFW_KEY_C, GLFW_KEY_D, + GLFW_KEY_E, GLFW_KEY_F, GLFW_KEY_G, GLFW_KEY_H, + GLFW_KEY_I, GLFW_KEY_J, GLFW_KEY_K, GLFW_KEY_L, + GLFW_KEY_M, GLFW_KEY_N, GLFW_KEY_O, GLFW_KEY_P, + GLFW_KEY_Q, GLFW_KEY_R, GLFW_KEY_S, GLFW_KEY_T, + GLFW_KEY_U, GLFW_KEY_V, GLFW_KEY_W, GLFW_KEY_X, + GLFW_KEY_Y, GLFW_KEY_Z, GLFW_KEY_0, GLFW_KEY_1, + GLFW_KEY_2, GLFW_KEY_3, GLFW_KEY_4, GLFW_KEY_5, + GLFW_KEY_6, GLFW_KEY_7, GLFW_KEY_8, GLFW_KEY_9, + GLFW_KEY_ESCAPE, GLFW_KEY_TAB, GLFW_KEY_ENTER, GLFW_KEY_ENTER, + GLFW_KEY_SLASH, GLFW_KEY_BACKSLASH, GLFW_KEY_SEMICOLON, GLFW_KEY_GRAVE_ACCENT, + GLFW_KEY_SPACE, GLFW_KEY_BACKSPACE, GLFW_KEY_PERIOD, GLFW_KEY_COMMA, + GLFW_KEY_APOSTROPHE, GLFW_KEY_CAPS_LOCK, GLFW_KEY_MINUS, GLFW_KEY_EQUAL, + GLFW_KEY_LEFT_BRACKET, GLFW_KEY_RIGHT_BRACKET, GLFW_KEY_LEFT_CONTROL, GLFW_KEY_RIGHT_CONTROL, + GLFW_KEY_LEFT_SHIFT, GLFW_KEY_RIGHT_SHIFT, GLFW_KEY_LEFT_ALT, GLFW_KEY_RIGHT_ALT, + GLFW_KEY_F1, GLFW_KEY_F2, GLFW_KEY_F3, GLFW_KEY_F4, + GLFW_KEY_F5, GLFW_KEY_F6, GLFW_KEY_F7, GLFW_KEY_F8, + GLFW_KEY_F9, GLFW_KEY_F10, GLFW_KEY_F11, GLFW_KEY_F12, + GLFW_KEY_UP, GLFW_KEY_DOWN, GLFW_KEY_LEFT, GLFW_KEY_RIGHT, + GLFW_KEY_NUM_LOCK, GLFW_KEY_PAUSE, GLFW_KEY_INSERT, GLFW_KEY_HOME, + GLFW_KEY_PAGE_UP, GLFW_KEY_DELETE, GLFW_KEY_END, GLFW_KEY_PAGE_DOWN, + GLFW_KEY_KP_ADD, GLFW_KEY_KP_SUBTRACT, GLFW_KEY_KP_MULTIPLY, GLFW_KEY_KP_DIVIDE, + GLFW_KEY_KP_ENTER, GLFW_KEY_KP_DECIMAL, GLFW_KEY_KP_0, GLFW_KEY_KP_1, + GLFW_KEY_KP_2, GLFW_KEY_KP_3, GLFW_KEY_KP_4, GLFW_KEY_KP_5, + GLFW_KEY_KP_6, GLFW_KEY_KP_7, GLFW_KEY_KP_8, GLFW_KEY_KP_9 + }; + + integer new_window_width = 0; + integer new_window_height = 0; + + opengl->cursor [cursor_left] = false; + opengl->cursor [cursor_middle] = false; + opengl->cursor [cursor_right] = false; + + glClearColor (normal_r (colour), normal_g (colour), normal_b (colour), normal_a (colour)); + + glClear (GL_COLOR_BUFFER_BIT); + + glfwPollEvents (); + + glfwSetWindowShouldClose (opengl->window, opengl->active == false); + + glfwGetWindowSize (opengl->window, & new_window_width, & new_window_height); + + if ((opengl->window_width != (natural) new_window_width) || (opengl->window_height != (natural) new_window_height)) { + if ((new_window_width <= 0) || (new_window_height <= 0)) return; + + glViewport (0, 0, new_window_width, new_window_height); + + opengl->window_width = (natural) new_window_width; + opengl->window_height = (natural) new_window_height; + + opengl->pixel_width = 2.0f / (real) new_window_width; + opengl->pixel_height = 2.0f / (real) new_window_height; + } + + opengl->cursor [cursor_left] = (boolean) (glfwGetMouseButton (opengl->window, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS); + opengl->cursor [cursor_middle] = (boolean) (glfwGetMouseButton (opengl->window, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS); + opengl->cursor [cursor_right] = (boolean) (glfwGetMouseButton (opengl->window, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS); + + if (opengl->freeze_cursor == false) { + real_64 x = 0.0; + real_64 y = 0.0; + + glfwGetCursorPos (opengl->window, & x, & y); + + opengl->cursor_x = (integer) x; + opengl->cursor_y = (integer) y; + + //~if ((opengl->cursor_x < 0) || (opengl->cursor_x > (integer) opengl->window_width) || + //~(opengl->cursor_y < 0) || (opengl->cursor_y > (integer) opengl->window_height)) { + //~opengl->cursor_x = 0; + //~opengl->cursor_y = 0; + //~} + } else { + if ((opengl->cursor [cursor_left] == false) + && (opengl->cursor [cursor_middle] == false) + && (opengl->cursor [cursor_right] == false)) { + opengl->freeze_cursor = false; + } + } + + if (opengl->freeze_signal == false) { + for (natural index = 0; index < signal_count; ++index) { + opengl->signal [index] = (boolean) (glfwGetKey (opengl->window, signal_code [index]) == GLFW_PRESS); + } + } + + opengl->glBufferData (GL_ARRAY_BUFFER, opengl->vertex_count * 4, opengl->vertex_array, GL_DYNAMIC_DRAW); + opengl->glBufferData (GL_ELEMENT_ARRAY_BUFFER, opengl->index_count * 4, opengl->index_array, GL_DYNAMIC_DRAW); + + opengl->glBindBuffer (GL_ARRAY_BUFFER, opengl->vertex_buffer); + + glDrawElements (GL_TRIANGLES, (integer) opengl->index_count * 4, GL_UNSIGNED_INT, null); + + glfwSwapBuffers (opengl->window); + + opengl->vertex_count = 0; + opengl->index_count = 0; + + opengl->frame_end = nano_time (); + + opengl->frame_time = opengl->frame_end - opengl->frame_begin; + + if (opengl->frame_time < 1000000000ul / opengl->gameplay_framerate) { + nano_wait (1000000000ul / opengl->gameplay_framerate - opengl->frame_time); + } + + if (opengl->global_tick % opengl->gameplay_framerate == 0) { + opengl->framerate = (natural) (1000000000ul / opengl->frame_time); + } + + ++opengl->global_tick; + + opengl->global_tick = opengl->global_tick % (opengl->gameplay_framerate * opengl->animation_framerate); + opengl->gameplay_tick = opengl->global_tick % (opengl->gameplay_framerate); + opengl->animation_tick = opengl->global_tick / (opengl->gameplay_framerate / opengl->animation_framerate); + + opengl->frame_begin = nano_time (); +} + #undef opengl_font_width #undef opengl_font_height diff --git a/xphere.h b/xphere.h index f0d7e00..a3de6fa 100755 --- a/xphere.h +++ b/xphere.h @@ -17,69 +17,69 @@ /// for more details, if you dare, it is a lot of text that nobody wants to read... typedef struct { - f4 distance; - f4 horizontal; - f4 vertical; + real distance; + real horizontal; + real vertical; } sphere_vector; -static b4 sphere_epsilon (f4 error) { +static boolean sphere_epsilon (real error) { return (error < 0.000001); } -static f4 sphere_distance (f4 x, f4 y, f4 z) { +static real sphere_distance (real x, real y, real z) { return (square_root (x * x + y * y + z * z)); } -static f4 sphere_horizontal (f4 x, f4 z) { +static real sphere_horizontal (real x, real z) { return ((sphere_epsilon (z)) ? (sign (x) * pi / 2.0f) : (arc_tangent (x / z))); } -static f4 sphere_vertical (f4 y, f4 z) { +static real sphere_vertical (real y, real z) { return ((sphere_epsilon (z)) ? (sign (y) * pi / 2.0f) : (arc_tangent (y / z))); } -static f4 sphere_x (f4 horizontal, f4 z) { +static real sphere_x (real horizontal, real z) { return (z * tangent (horizontal)); } -static f4 sphere_y (f4 vertical, f4 z) { +static real sphere_y (real vertical, real z) { return (z * tangent (vertical)); } -static f4 sphere_z (f4 distance, f4 horizontal, f4 vertical) { - f4 x_over_z = tangent (horizontal); - f4 y_over_z = tangent (vertical); +static real sphere_z (real distance, real horizontal, real vertical) { + real x_over_z = tangent (horizontal); + real y_over_z = tangent (vertical); return (distance * square_root (1.0f / (x_over_z * x_over_z + y_over_z * y_over_z + 1.0f))); } -static v0 sphere_transpose_x (f4 * distance, f4 * horizontal, f4 x) { - f4 origin = (* distance) * (* distance); - f4 offset = x * x; - f4 square = origin + offset + 2 * x * (* distance) * cosine (* horizontal); +static procedure sphere_transpose_x (real * distance, real * horizontal, real x) { + real origin = (* distance) * (* distance); + real offset = x * x; + real square = origin + offset + 2 * x * (* distance) * cosine (* horizontal); * distance = square_root (square); * horizontal = arc_sine ((square + offset - origin) / (2 * (* distance) * x)); } -static v0 sphere_transpose_y (f4 * distance, f4 * vertical, f4 y) { - f4 origin = (* distance) * (* distance); - f4 offset = y * y; +static procedure sphere_transpose_y (real * distance, real * vertical, real y) { + real origin = (* distance) * (* distance); + real offset = y * y; * distance = square_root (origin + offset + 2 * y * (* distance) * cosine (* vertical)); } -static v0 sphere_transpose_z (f4 * distance, f4 * horizontal, f4 * vertical, f4 z) { - f4 origin = (* distance) * (* distance); - f4 offset = z * z; - f4 side_a = secant (* vertical); - f4 side_b = tangent (* horizontal); +static procedure sphere_transpose_z (real * distance, real * horizontal, real * vertical, real z) { + real origin = (* distance) * (* distance); + real offset = z * z; + real side_a = secant (* vertical); + real side_b = tangent (* horizontal); * distance = square_root (origin + offset + 2 * z * (* distance) * square_root (1.0f / (side_a * side_a + sibe_b * side_b))); } -static v0 sphere_convert (sphere_vector * vector, f4 x, f4 y, f4 z) { +static procedure sphere_convert (sphere_vector * vector, real x, real y, real z) { vector->distance = sphere_distance (x, y, z); vector->horizontal = sphere_horizontal (x, z); vector->vertical = sphere_vertical ( y, z); diff --git a/xprite.h b/xprite.h index 84922e7..20fa637 100755 --- a/xprite.h +++ b/xprite.h @@ -16,7 +16,7 @@ /// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License /// for more details, if you dare, it is a lot of text that nobody wants to read... -static unsigned s4 sprite_colour [128] = { +static unsigned integer sprite_colour [128] = { 0x00000000, 0xff222222, 0xff444444, 0xff666666, 0xff888888, 0xffaaaaaa, 0xffcccccc, 0xffeeeeee, 0x11000000, 0xff000022, 0xff000044, 0xff000066, 0xff000088, 0xff0000aa, 0xff0000cc, 0xff0000ee, 0x22000000, 0xff002200, 0xff004400, 0xff006600, 0xff008800, 0xff00aa00, 0xff00cc00, 0xff00ee00, @@ -35,37 +35,37 @@ static unsigned s4 sprite_colour [128] = { 0xff000000, 0xff221122, 0xff442244, 0xff663366, 0xff884488, 0xffaa55aa, 0xffcc66cc, 0xffee77ee }; -static v0 * sprite_import (c1 * path, s4 * width, s4 * height) { - unsigned c1 check_width = 0; - unsigned c1 check_height = 0; +static generic * sprite_import (character * path, integer * width, integer * height) { + unsigned character check_width = 0; + unsigned character check_height = 0; - s4 file, move; + integer file, move; - unsigned s4 * data = null; + unsigned integer * data = null; file = file_open (path, file_flag_read); - file_read (file, & check_width, (int) sizeof (check_width)); - file_read (file, & check_height, (int) sizeof (check_height)); + file_read (file, & check_width, (integer) sizeof (check_width)); + file_read (file, & check_height, (integer) sizeof (check_height)); - * width = (int) check_width; - * height = (int) check_height; + * width = (integer) check_width; + * height = (integer) check_height; fatal_failure ((* width) == 0, "sprite_import: Invalid sprite width."); fatal_failure ((* height) == 0, "sprite_import: Invalid sprite height."); - data = allocate ((* width) * (* height) * (int) sizeof (* data)); + data = allocate ((* width) * (* height) * (integer) sizeof (* data)); for (move = 0; move < (* width) * (* height); ++move) { - s4 colour = 0; - s4 repeat = 0; + integer colour = 0; + integer repeat = 0; file_read (file, & colour, 1); if ((colour & 0x80) == 0) { data [move] = sprite_colour [colour]; } else { - s4 offset; + integer offset; file_read (file, & repeat, 1); @@ -85,8 +85,8 @@ static v0 * sprite_import (c1 * path, s4 * width, s4 * height) { return (data); } -static v0 sprite_export (c1 * path, s4 width, s4 height, unsigned s4 * data) { - s4 file, move; +static procedure sprite_export (character * path, integer width, integer height, unsigned integer * data) { + integer file, move; file = file_open (path, file_flag_edit | file_flag_truncate | file_flag_create); @@ -97,8 +97,8 @@ static v0 sprite_export (c1 * path, s4 width, s4 height, unsigned s4 * data) { file_write (file, & height, 1); for (move = 0; move < width * height; ++move) { - s4 colour = 0; - s4 repeat = 0; + integer colour = 0; + integer repeat = 0; for (repeat = 1; (move + repeat < width * height) && (data [move] == data [move + repeat]) && (repeat < 256); ++repeat); @@ -122,8 +122,8 @@ static v0 sprite_export (c1 * path, s4 width, s4 height, unsigned s4 * data) { file = file_close (file); } -static v0 sprite_swap_channels (unsigned s4 * data, s4 width, s4 height) { - s4 move; +static procedure sprite_swap_channels (unsigned integer * data, integer width, integer height) { + integer move; for (move = 0; move < width * height; ++move) { data [move] = (data [move] & 0xff00ff00) | ((data [move] & 0xff0000) >> 16) | ((data [move] & 0xff) << 16); diff --git a/xrena.h b/xrena.h index 10feaf5..16adb80 100755 --- a/xrena.h +++ b/xrena.h @@ -14,95 +14,150 @@ /// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License /// for more details, if you dare, it is a lot of text that nobody wants to read... +/// Description +/// +/// Xrena, extremely small header only library serving as arena allocator, with one global variable.In order to use it, include this header file, +/// there's no macro for including implementation (like stb libraries), this is for projects that have only one C source file, and one or more C +/// header files. I'll provide minimal examples below. + +/// Maximum size for single memory "allocation", if you're making a parser, you can use as low as 8 or 16, but as soon as you start working with +/// bigger structures, images or models, you need this to be higher value, for example 64 * 1024 * 1024 (loading 4k textures). If you don't +/// understand how to use this macro, turn off your machine and read some books, or alternatively, fuck around until you find out. + #ifndef arena_block_limit #define arena_block_limit (1024 * 1024) #endif +/// Structure and global variable definition, you shouldn't ever modify this, functions below cover that task. + static struct { - u8 block_count; - u8 block_limit; + caliber block_count; + caliber block_limit; struct { - u8 count; - u8 capacity; - c1 * buffer; + caliber count; + caliber capacity; + character * buffer; } * * block_array; -} * arena = null; +} * arena_memory = null; + +/// Warning: Local function! You don't need to use this at all, it's covered by other functions, don't worry about it. +/// +/// This function will initialize the state of variable 'arena_memory', or extend it's size once memory is filled. -static v0 arena_initialize (v0) { - u8 current = ++arena->block_count - 1; +static procedure arena_begin_or_widen (none) { + caliber current = ++arena_memory->block_count - 1; - arena->block_limit = arena_block_limit; + arena_memory->block_limit = arena_block_limit; - arena->block_array = reallocate (arena->block_array, arena->block_count * sizeof (* arena->block_array)); + arena_memory->block_array = reallocate (arena_memory->block_array, arena_memory->block_count * sizeof (* arena_memory->block_array)); - arena->block_array [current] = allocate (sizeof (* arena)); + arena_memory->block_array [current] = allocate (sizeof (* arena)); - arena->block_array [current]->buffer = allocate (arena_block_limit); - arena->block_array [current]->count = 0; - arena->block_array [current]->capacity = arena_block_limit; + arena_memory->block_array [current]->buffer = allocate (arena_block_limit); + arena_memory->block_array [current]->count = 0; + arena_memory->block_array [current]->capacity = arena_block_limit; } -static v0 arena_deinitialize (v0) { - for (u8 index = 0; index < arena->block_count; ++index) { - arena->block_array [index]->buffer = deallocate (arena->block_array [index]->buffer); - arena->block_array [index] = deallocate (arena->block_array [index]); +/// Warning: Local function! You don't need to use this at all, it's covered by other functions, don't worry about it. +/// +/// This function will clean all memory pools from variable 'arena_memory', freeing all memory used by the arena allocator. + +static procedure arena_clean (none) { + for (caliber index = 0; index < arena_memory->block_count; ++index) { + arena_memory->block_array [index]->buffer = deallocate (arena_memory->block_array [index]->buffer); + arena_memory->block_array [index] = deallocate (arena_memory->block_array [index]); } - arena->block_array = deallocate (arena->block_array); - arena = deallocate (arena); + arena_memory->block_array = deallocate (arena_memory->block_array); + arena_memory = deallocate (arena_memory); } -static v0 * arena_add (u8 size) { - u8 current = arena->block_count - 1; +/// Now, this is finally a function that you want to use. You want to allocate object of some size, just add that size in arena, it'll return +/// you a pointer to that memory location, the same way you'd use 'malloc', and that memory will be zero initialized (unlike 'malloc', just like +/// 'calloc'). You don't ever have to worry about freeing memory, if your program has definite exit routine. Internally, it checks if arena +/// allocator was initialized, if it was, it'll extend it if there's not enough memory and return that pointer, otherwise, it will initialize it +/// and set clean up call at exit. +/// +/// Make an array of 60 integers, they'll all be zero. +/// +/// integer * my_integers = arena_add (60 * sizeof (my_integers)); + +static generic * arena_add (caliber size) { + caliber current = arena_memory->block_count - 1; if (arena == null) { - clean_up (arena_deinitialize); + clean_up (arena_clean); - arena = allocate (sizeof (* arena)); + arena_memory = allocate (sizeof (* arena_memory)); - arena_initialize (); + arena_begin_or_widen (); } - fatal_failure (size > arena->block_limit, "arena_add: Block limit reached."); + fatal_failure (size > arena_memory->block_limit, "arena_add: Block limit reached."); - if (arena->block_array [current]->count + size > arena->block_array [current]->capacity) { - arena_initialize (); + if (arena_memory->block_array [current]->count + size > arena_memory->block_array [current]->capacity) { + arena_begin_or_widen (); } - arena->block_array [current]->count += size; + arena_memory->block_array [current]->count += size; + + return ((generic *) & arena_memory->block_array [current]->buffer [arena_memory->block_array [current]->count - size]); +} + +/// Add null terminated string to arena memory. +/// +/// character * my_token = arena_add_string (parsed_token); - return ((v0*) & arena->block_array [current]->buffer [arena->block_array [current]->count - size]); +static character * arena_add_string (character * string) { + character * pointer = arena_add (string_length (string) * sizeof (pointer)); + + string_copy (pointer, string); + + return (pointer); } -static c1 * arena_add_data (v0 * data, u8 size) { - v0 * pointer = arena_add (size); +/// Add raw memory of certain size to arena memory. +/// +/// generic * my_model = arena_add_memory (raw_model_data, size_of_model_data); + +static generic * arena_add_memory (generic * memory, caliber size) { + generic * pointer = arena_add (size); - memory_copy (pointer, data, size); + memory_copy (pointer, memory, size); return (pointer); } -static c1 * arena_add_file (c1 * path, u4 flag, b4 null_terminate) { - s4 file = -1; - u8 size = 0; - c1 * data = null; +/// Add file data from certain path, specify file flags (similar to 'open' system call) and set if you want it to be null terminated. +/// +/// generic * my_binary_file = arena_add_file ("foo.bin", file_flag_read, false); +/// character * my_text_file = arena_add_file ("foo.txt", file_flag_read, true); + +static character * arena_add_file (character * path, integer flag, boolean null_terminate) { + integer file = -1; + caliber size = 0; + character * data = null; file = file_open (path, flag); - size = file_size (path) + (u8) null_terminate; + size = file_size (path) + (caliber) null_terminate; data = arena_add (size); - file_read (file, data, size - (u8) null_terminate); + file_read (file, data, size - (caliber) null_terminate); file = file_close (file); return (data); } -static u8 arena_usage (v0) { - u8 usage = 0; +/// Simple utility function that returns how many bytes have been added to arena allocator. +/// +/// print ("So far I used %l bytes of memory...\n", arena_usage ()); + +static caliber arena_usage (none) { + caliber usage = 0; - for (u8 block = 0; block < arena->block_count; ++block) { - usage += arena->block_array [block]->count; + for (caliber block = 0; block < arena_memory->block_count; ++block) { + usage += arena_memory->block_array [block]->count; } return (usage); diff --git a/xrocessor.h b/xrocessor.h index fb432e1..143cf33 100755 --- a/xrocessor.h +++ b/xrocessor.h @@ -5,7 +5,7 @@ /// /// Copyright (c) 1997 - Ognjen 'xolatile' Milan Robovic /// -/// xolatile@chud.cyou - xrocessor - Probably the most minimalistic general preprocessor aimed at Ada, Pascal and EAXHLA language syntax. +/// xolatile@chud.cyou - xrocessor - Probably the most minimalistic general preprocessor aimed at EAXHLA language syntax. /// /// This program is free software, free as in freedom and as in free beer, you can redistribute it and/or modify it under the terms of the GNU /// General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version if you wish... @@ -14,18 +14,16 @@ /// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License /// for more details, if you dare, it is a lot of text that nobody wants to read... -#define processor_token_limit (1024) +static natural processor_parse_comment (character * buffer); +static natural processor_parse_include (character * buffer); +static natural processor_parse_use (character * buffer); +static natural processor_parse_alias (character * buffer); +static natural processor_parse_macro (character * buffer); +static natural processor_parse_scope (character * buffer); +static natural processor_parse_unscope (character * buffer); +static natural processor_parse_default (character * buffer); -static u8 processor_parse_comment (c1 * buffer); -static u8 processor_parse_include (c1 * buffer); -static u8 processor_parse_use (c1 * buffer); -static u8 processor_parse_alias (c1 * buffer); -static u8 processor_parse_macro (c1 * buffer); -static u8 processor_parse_scope (c1 * buffer); -static u8 processor_parse_unscope (c1 * buffer); -static u8 processor_parse_default (c1 * buffer); - -static v0 processor_parse_buffer (c1 * buffer, u8 limit); +static procedure processor_parse_buffer (character * buffer, natural limit); typedef enum { processor_token_comment, processor_token_include, processor_token_use, processor_token_alias, @@ -33,28 +31,25 @@ typedef enum { processor_token_count } processor_token_enumeration; -static c1 * processor_token_key [processor_token_count - 1] = { +static character * processor_token_key [processor_token_count - 1] = { "---", "include ", "use ", "alias ", "macro ", "scope ", "unscope " }; -static u8 (* processor_parse_key [processor_token_count]) (c1 * buffer) = { +static natural (* processor_parse_key [processor_token_count]) (character * buffer) = { processor_parse_comment, processor_parse_include, processor_parse_use, processor_parse_alias, processor_parse_macro, processor_parse_scope, processor_parse_unscope, processor_parse_default }; -static u4 token_count = 0; - -static struct { - c1 * data; - u8 size; - s4 type; -} * token_array [processor_token_limit], - * token_value [processor_token_limit]; - -static u8 processor_parse_default (c1 * buffer) { - s4 select; +typedef struct { + natural count; + natural limit; + character * * token_array_data; + natural * token_array_size; + natural * token_array_type; +} processor_structure; - for (select = 0; select < token_count; ++select) { +static natural processor_parse_default (character * buffer) { + for (natural select = 0; select < token_count; ++select) { if (string_compare_limit (buffer, token_array [select]->data, token_array [select]->size) == true) { if (token_array [select]->type == token_alias) { if (character_is_separator (buffer [-1]) == false) continue; @@ -81,21 +76,18 @@ static u8 processor_parse_default (c1 * buffer) { return (1); } -static u8 processor_parse_comment (c1 * buffer) { - s4 offset; - - for (offset = 3; buffer [offset] != '\0'; ++offset) { +static natural processor_parse_comment (character * buffer) { + for (natural offset = 3; buffer [offset] != '\0'; ++offset) { if (buffer [offset] == '\n') break; } return (offset + 1); } -static u8 processor_parse_use (c1 * buffer) { - s4 offset; - s4 length; +static natural processor_parse_use (character * buffer) { + natural length = 0; - for (offset = 4; (buffer [offset] != '\0') && (character_is_blank (buffer [offset]) == true); ++offset); + for (natural offset = 4; (buffer [offset] != '\0') && (character_is_blank (buffer [offset]) == true); ++offset); ++token_count; @@ -111,10 +103,10 @@ static u8 processor_parse_use (c1 * buffer) { return (offset + length + 1); } -static u8 processor_parse_include (c1 * buffer) { - s4 length; - s4 offset; - c1 * data; +static natural processor_parse_include (character * buffer) { + natural length = 0; + natural offset = 0; + character * data = null; for (offset = 8; (buffer [offset] != '\0') && (character_is_blank (buffer [offset]) == true); ++offset); @@ -138,9 +130,9 @@ static u8 processor_parse_include (c1 * buffer) { return (offset + length + 1); } -static u8 processor_parse_alias (c1 * buffer) { - s4 offset; - s4 length; +static natural processor_parse_alias (character * buffer) { + natural offset = 0; + natural length = 0; for (offset = 6; (buffer [offset] != '\0') && (character_is_blank (buffer [offset]) == true); ++offset); @@ -168,9 +160,9 @@ static u8 processor_parse_alias (c1 * buffer) { return (offset + length + 1); } -static u8 processor_parse_macro (c1 * buffer) { - s4 offset; - s4 length; +static natural processor_parse_macro (character * buffer) { + natural offset = 0; + natural length = 0; for (offset = 6; (buffer [offset] != '\0') && (character_is_blank (buffer [offset]) == true); ++offset); @@ -202,10 +194,10 @@ static u8 processor_parse_macro (c1 * buffer) { return (offset + length + 9 + 1); } -static u8 processor_parse_scope (c1 * buffer) { - s4 offset; - s4 length; - s4 select; +static natural processor_parse_scope (character * buffer) { + natural offset = 0; + natural length = 0; + natural select = 0; for (offset = 6; (buffer [offset] != '\0') && (character_is_blank (buffer [offset]) == true); ++offset); @@ -224,10 +216,10 @@ static u8 processor_parse_scope (c1 * buffer) { return (offset + length + 1); } -static u8 processor_parse_unscope (c1 * buffer) { - s4 offset; - s4 length; - s4 select; +static natural processor_parse_unscope (character * buffer) { + natural offset = 0; + natural length = 0; + natural select = 0; for (offset = 8; (buffer [offset] != '\0') && (character_is_blank (buffer [offset]) == true); ++offset); @@ -248,12 +240,10 @@ static u8 processor_parse_unscope (c1 * buffer) { return (offset + length + 1); } -static v0 processor_parse_buffer (c1 * buffer, s4 limit) { - s4 offset; - s4 length; - s4 select; +static procedure processor_parse_buffer (character * buffer, natural limit) { + for (natural length = 0, offset = 0; (buffer [offset] != '\0') && (offset != limit); offset += length) { + natural select = 0; - for (length = offset = 0; (buffer [offset] != '\0') && (offset != limit); offset += length) { for (select = 0; select < token_default; ++select) { length = string_length (token_key [select]); if (string_compare_limit (& buffer [offset], token_key [select], length) == true) { diff --git a/xross.h b/xross.h index c23ad6d..fe5bff0 100755 --- a/xross.h +++ b/xross.h @@ -14,61 +14,51 @@ /// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License /// for more details, if you dare, it is a lot of text that nobody wants to read... -typedef enum { - cross_window_fullscreen = 0x1, - cross_window_transparent = 0x2, - cross_window_resizable = 0x4, - cross_window_decorated = 0x8 -} cross_window_flag; - #ifdef use_raptor_renderer -#define cross_structure raptor_structure -#define cross_initialize raptor_initialize -#define cross_deinitialize raptor_deinitialize -#define cross_sprite_raw_import raptor_sprite_raw_import -#define cross_font_raw_import raptor_font_raw_import -#define cross_sprite_import raptor_sprite_import -#define cross_font_import raptor_font_import -#define cross_sprite_width raptor_sprite_width -#define cross_sprite_height raptor_sprite_height -#define cross_character_width raptor_character_width -#define cross_character_height raptor_character_height -#define cross_string_width raptor_string_width -#define cross_string_height raptor_string_height -#define cross_center_x raptor_center_x -#define cross_center_y raptor_center_y -#define cross_cursor_inside raptor_cursor_inside -#define cross_cursor_left_click raptor_cursor_left_click -#define cross_cursor_right_click raptor_cursor_right_click -#define cross_configure raptor_configure -#define cross_render_base raptor_render_base -#define cross_render_rectangle raptor_render_rectangle -#define cross_render_sprite raptor_render_sprite -#define cross_render_sprite_scale raptor_render_sprite_scale -#define cross_render_sprite_crop raptor_render_sprite_crop -#define cross_render_sprite_colour raptor_render_sprite_colour -#define cross_render_sprite_crop_colour raptor_render_sprite_crop_colour -#define cross_render_sprite_flip raptor_render_sprite_flip -#define cross_render_sprite_animate raptor_render_sprite_animate -#define cross_render_character raptor_render_character -#define cross_render_string raptor_render_string -#define cross_render_framerate raptor_render_framerate -#define cross_synchronize raptor_synchronize -#define cross_render_rectangle_vertical_gradient raptor_render_rectangle_vertical_gradient - -#include "xaptor.h" +#define cross_initialize raptor_initialize +#define cross_deinitialize raptor_deinitialize +#define cross_sprite_raw_import raptor_sprite_raw_import +#define cross_font_raw_import raptor_font_raw_import +#define cross_sprite_import raptor_sprite_import +#define cross_font_import raptor_font_import +#define cross_sprite_width raptor_sprite_width +#define cross_sprite_height raptor_sprite_height +#define cross_character_width raptor_character_width +#define cross_character_height raptor_character_height +#define cross_string_width raptor_string_width +#define cross_string_height raptor_string_height +#define cross_center_x raptor_center_x +#define cross_center_y raptor_center_y +#define cross_cursor_inside raptor_cursor_inside +#define cross_configure raptor_configure +#define cross_render_base raptor_render_base +#define cross_render_rectangle raptor_render_rectangle +#define cross_render_sprite raptor_render_sprite +#define cross_render_sprite_scale raptor_render_sprite_scale +#define cross_render_sprite_crop raptor_render_sprite_crop +#define cross_render_sprite_colour raptor_render_sprite_colour +#define cross_render_sprite_flip raptor_render_sprite_flip +#define cross_render_sprite_animation raptor_render_sprite_animation +#define cross_render_sprite_crop_colour raptor_render_sprite_crop_colour +#define cross_render_character raptor_render_character +#define cross_render_string raptor_render_string +#define cross_render_framerate raptor_render_framerate +#define cross_synchronize raptor_synchronize +#define cross_render_rectangle_vertical_gradient raptor_render_rectangle_vertical_gradient +#define cross_render_rectangle_horizontal_gradient raptor_render_rectangle_horizontal_gradient + +#include + +typedef raptor_structure cross_structure; #endif #ifdef use_common_renderer -#define cross_structure common_structure #define cross_font_width common_font_width #define cross_font_height common_font_height #define cross_font_tabulator common_font_tabulator -#define cross_gameplay_framerate common_gameplay_framerate -#define cross_animation_framerate common_animation_framerate #define cross_center_x common_center_x #define cross_center_y common_center_y #define cross_cursor_inside common_cursor_inside @@ -93,74 +83,71 @@ typedef enum { #define cross_render_sprite_colour common_render_sprite_colour #define cross_render_sprite_crop_colour common_render_sprite_crop_colour #define cross_render_sprite_flip common_render_sprite_flip -#define cross_render_sprite_animate common_render_sprite_animate +#define cross_render_sprite_animation common_render_sprite_animation #define cross_render_sprite_preview common_render_sprite_preview #define cross_render_sprite_control common_render_sprite_control #define cross_render_string_width common_render_string_width #define cross_render_string common_render_string -#include "xommon.h" +#include + +typedef common_structure cross_structure; #endif #ifdef use_opengl_renderer -#define cross_structure opengl_structure -#define cross_font_width opengl_font_width -#define cross_font_height opengl_font_height -#define cross_font_tabulator opengl_font_tabulator -#define cross_gameplay_framerate opengl_gameplay_framerate -#define cross_animation_framerate opengl_animation_framerate -#define cross_center_x opengl_center_x -#define cross_center_y opengl_center_y -#define cross_cursor_inside opengl_cursor_inside -#define cross_cursor_left_click opengl_cursor_left_click -#define cross_cursor_right_click opengl_cursor_right_click -#define cross_sprite_raw_import opengl_sprite_raw_import -#define cross_font_raw_import opengl_font_raw_import -#define cross_sprite_import opengl_sprite_import -#define cross_font_import opengl_font_import -#define cross_sprite_width opengl_sprite_width -#define cross_sprite_height opengl_sprite_height -#define cross_initialize opengl_initialize -#define cross_deinitialize opengl_deinitialize -#define cross_configure opengl_configure -#define cross_synchronize opengl_synchronize -#define cross_render_base opengl_render_base -#define cross_render_rectangle opengl_render_rectangle -#define cross_render_rectangle_gradient_v opengl_render_rectangle_gradient_v -#define cross_render_rectangle_gradient_h opengl_render_rectangle_gradient_h -#define cross_render_sprite opengl_render_sprite -#define cross_render_sprite_crop opengl_render_sprite_crop -#define cross_render_sprite_colour opengl_render_sprite_colour -#define cross_render_sprite_crop_colour opengl_render_sprite_crop_colour -#define cross_render_sprite_flip opengl_render_sprite_flip -#define cross_render_sprite_animate opengl_render_sprite_animate -#define cross_render_sprite_preview opengl_render_sprite_preview -#define cross_render_sprite_control opengl_render_sprite_control -#define cross_render_character opengl_render_character -#define cross_render_string_width opengl_render_string_width -#define cross_render_string opengl_render_string - -#include "xpengl.h" +#define cross_initialize opengl_initialize +#define cross_deinitialize opengl_deinitialize +#define cross_sprite_raw_import opengl_sprite_raw_import +#define cross_font_raw_import opengl_font_raw_import +#define cross_sprite_import opengl_sprite_import +#define cross_font_import opengl_font_import +#define cross_sprite_width opengl_sprite_width +#define cross_sprite_height opengl_sprite_height +#define cross_character_width opengl_character_width +#define cross_character_height opengl_character_height +#define cross_string_width opengl_string_width +#define cross_string_height opengl_string_height +#define cross_center_x opengl_center_x +#define cross_center_y opengl_center_y +#define cross_cursor_inside opengl_cursor_inside +#define cross_configure opengl_configure +#define cross_render_base opengl_render_base +#define cross_render_rectangle opengl_render_rectangle +#define cross_render_sprite opengl_render_sprite +#define cross_render_sprite_scale opengl_render_sprite_scale +#define cross_render_sprite_crop opengl_render_sprite_crop +#define cross_render_sprite_colour opengl_render_sprite_colour +#define cross_render_sprite_flip opengl_render_sprite_flip +#define cross_render_sprite_orient opengl_render_sprite_orient +#define cross_render_sprite_animation opengl_render_sprite_animation +#define cross_render_sprite_crop_colour opengl_render_sprite_crop_colour +#define cross_render_character opengl_render_character +#define cross_render_string opengl_render_string +#define cross_render_framerate opengl_render_framerate +#define cross_synchronize opengl_synchronize +#define cross_render_rectangle_vertical_gradient opengl_render_rectangle_vertical_gradient +#define cross_render_rectangle_horizontal_gradient opengl_render_rectangle_horizontal_gradient + +#include + +typedef opengl_structure cross_structure; #endif #ifdef use_vulkan_renderer -#define cross_structure vulkan_structure #define cross_font_width vulkan_font_width #define cross_font_height vulkan_font_height #define cross_font_tabulator vulkan_font_tabulator -#define cross_gameplay_framerate vulkan_gameplay_framerate -#define cross_animation_framerate vulkan_animation_framerate #define cross_center_x vulkan_center_x #define cross_center_y vulkan_center_y #define cross_cursor_inside vulkan_cursor_inside #define cross_cursor_left_click vulkan_cursor_left_click #define cross_cursor_right_click vulkan_cursor_right_click -#define cross_sprite_raw_import vulkan_sprite_raw_import -#define cross_font_raw_import vulkan_font_raw_import +#define cross_sprite_raw_import vulkan_sprite_raw_import +#define cross_font_raw_import vulkan_font_raw_import #define cross_sprite_import vulkan_sprite_import #define cross_font_import vulkan_font_import #define cross_sprite_width vulkan_sprite_width @@ -178,13 +165,15 @@ typedef enum { #define cross_render_sprite_colour vulkan_render_sprite_colour #define cross_render_sprite_crop_colour vulkan_render_sprite_crop_colour #define cross_render_sprite_flip vulkan_render_sprite_flip -#define cross_render_sprite_animate vulkan_render_sprite_animate +#define cross_render_sprite_animation vulkan_render_sprite_animation #define cross_render_sprite_preview vulkan_render_sprite_preview #define cross_render_sprite_control vulkan_render_sprite_control #define cross_render_character vulkan_render_character #define cross_render_string_width vulkan_render_string_width #define cross_render_string vulkan_render_string -#include "xulkan.h" +#include + +typedef vulkan_structure cross_structure; #endif diff --git a/xscii.c b/xscii.c index 0e657e5..8f63897 100755 --- a/xscii.c +++ b/xscii.c @@ -1,44 +1,44 @@ #include -static v0 echo_base (s4 character, s4 base, s4 colour, s4 effect) { +static procedure echo_base (integer index, integer base, integer colour, integer effect) { print ("/0 | /-"); echo_colour (colour, effect); if (base == 2) { - echo (format_to_string (character, 0, base, 7, '0')); + echo (format_to_string (index, 0, base, 7, '0')); } else if (base == 8) { - echo (format_to_string (character, 0, base, 3, '0')); + echo (format_to_string (index, 0, base, 3, '0')); } else if (base == 16) { - echo (format_to_string (character, 0, base, 2, '0')); + echo (format_to_string (index, 0, base, 2, '0')); } else { - echo (format_to_string (character, 0, base, 3, ' ')); + echo (format_to_string (index, 0, base, 3, ' ')); } echo_cancel (); } -static v0 echo_code (s4 character) { - c1 * code [] = { +static procedure echo_code (integer index) { + character * code [] = { "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US", " " }; - if (character == 127) { + if (index == 127) { print ("/0 | /4DEL/-"); - } else if (character_is_visible (character) == false) { - print ("/0 | /4%s/-", code [character]); - if (string_length (code [character]) == 2) { + } else if (character_is_visible (index) == false) { + print ("/0 | /4%s/-", code [index]); + if (string_length (code [index]) == 2) { echo (" "); } } else { - print ("/0 | /4%c /-", character); + print ("/0 | /4%c /-", index); } } -static v0 echo_name (s4 character) { - c1 * name [] = { +static procedure echo_name (integer index) { + character * name [] = { "Null", "Start of heading", "Start of text", "End of text", "End of transmission", "Enquiry", "Acknowledge", "Bell", "Backspace", "Horizontal tab", "Line feed", "Vertical tab", @@ -73,24 +73,22 @@ static v0 echo_name (s4 character) { "Vertical bar", "Closing brace", "Tilde", "Delete" }; - print ("/0 | /5%s/-", name [character]); + print ("/0 | /5%s/-", name [index]); - output (" ", 24 - string_length (name [character])); + output (" ", 24 - string_length (name [index])); } -s4 main (v0) { - s4 character; +integer main (none) { + for (integer index = 0; index < 128; ++index) { + echo_base (index, 2, colour_white, effect_normal); + echo_base (index, 8, colour_cyan, effect_normal); + echo_base (index, 10, colour_cyan, effect_italic); + echo_base (index, 16, colour_cyan, effect_bold); - for (character = 0; character < 128; ++character) { - echo_base (character, 2, colour_white, effect_normal); - echo_base (character, 8, colour_cyan, effect_normal); - echo_base (character, 10, colour_cyan, effect_italic); - echo_base (character, 16, colour_cyan, effect_bold); + echo_code (index); + echo_name (index); - echo_code (character); - echo_name (character); - - if (character % 2 != 0) { + if (index % 2 != 0) { echo ("\n"); } } diff --git a/xtandard.h b/xtandard.h index 585f135..25bc7a0 100755 --- a/xtandard.h +++ b/xtandard.h @@ -19,6 +19,7 @@ #define _GNU_SOURCE #include + #include #include #include @@ -26,7 +27,7 @@ #include #include -#define null ((v0 *) 0) +#define null ((generic *) 0) #define standard_input (STDIN_FILENO) #define standard_output (STDOUT_FILENO) @@ -43,35 +44,50 @@ #define file_seek_set (SEEK_SET) #define file_seek_end (SEEK_END) +#define maximal_integer (0b01111111111111111111111111111111) +#define minimal_integer (0b10000000000000000000000000000000) +#define maximal_natural (0b11111111111111111111111111111111) +#define minimal_natural (0b00000000000000000000000000000000) + +#define pstring_length (256) + #define echo(text) output ((text), sizeof ((text)) - 1) -#define maximum(x, y) (((x) > (y)) ? (x) : (y)) -#define minimum(x, y) (((x) < (y)) ? (x) : (y)) +#define maximum_macro(x, y) (((x) > (y)) ? (x) : (y)) +#define minimum_macro(x, y) (((x) < (y)) ? (x) : (y)) #define array_length(array) (sizeof ((array)) / sizeof (* (array))) -typedef void v0; -typedef char c1; +typedef void procedure; +typedef void none; +typedef void generic; +typedef char character; +typedef float real; -typedef signed char s1; -typedef signed short s2; -typedef signed int s4; -typedef signed long s8; +typedef signed int integer; +typedef unsigned int natural; -typedef unsigned char u1; -typedef unsigned short u2; -typedef unsigned int u4; -typedef unsigned long u8; +typedef size_t caliber; -typedef float f4; -typedef double f8; +typedef float real_32; +typedef double real_64; -typedef char pstring [256]; +typedef signed char integer_8; +typedef signed short integer_16; +typedef signed int integer_32; +typedef signed long integer_64; + +typedef unsigned char natural_8; +typedef unsigned short natural_16; +typedef unsigned int natural_32; +typedef unsigned long natural_64; + +typedef char pstring [pstring_length]; typedef enum { false, true -} b4; +} boolean; typedef enum { log_success, log_warning, log_failure, log_comment, @@ -97,7 +113,7 @@ typedef enum { } file_type_enumeration; typedef enum { - effect_normal, effect_bold, effect_italic, effect_undefined_code, + effect_normal, effect_bold, effect_darken, effect_italic, effect_underline, effect_blink, effect_reverse, effect_invisible_text, effect_count } effect_enumeration; @@ -156,14 +172,14 @@ typedef enum { signal_count } signal_enumeration; -static c1 * cursor_name [cursor_count] = { +static character * cursor_name [cursor_count] = { "---", "Left button", "Middle button", "Right button", "Scroll up", "Scroll down" }; -static c1 * signal_name [signal_count] = { +static character * signal_name [signal_count] = { "---", "A", "B", "C", "D", "E", "F", "G", "H", @@ -192,48 +208,40 @@ static c1 * signal_name [signal_count] = { "Key 6", "Key 7", "Key 8", "Key 9" }; -static v0 randomize_seed_by_time (v0) { - srand ((u4) time (null)); +static procedure random_integer_seed_by_time (none) { + srand ((natural) time (null)); } -static s4 randomize (s4 from, s4 to) { +static integer random_integer (integer from, integer to) { return (rand () % (to - from + 1) + from); } -static u4 urandomize (u4 from, u4 to) { - return ((u4) rand () % (to - from + 1) + from); +static natural random_natural (natural from, natural to) { + return ((natural) rand () % (to - from + 1) + from); } -static f4 frandomize (f4 from, f4 to) { - return (((float) rand () / (float) RAND_MAX) * (to - from) + from); +static real random_real (real from, real to) { + return (((real) rand () / (real) RAND_MAX) * (to - from) + from); } -static s4 upper_bound (s4 a, s4 b) { - return ((a > b) ? a : b); -} - -static s4 lower_bound (s4 a, s4 b) { - return ((a < b) ? a : b); -} - -static v0 input (v0 * data, u8 size) { +static procedure input (generic * data, caliber size) { read (standard_input, data, size); } -static v0 output (v0 * data, u8 size) { +static procedure output (generic * data, caliber size) { write (standard_output, data, size); } -static v0 clean_up (v0 (* procedure) (v0)) { - atexit (procedure); +static procedure clean_up (procedure (* procedure_pointer) (none)) { + atexit (procedure_pointer); } #ifdef use_fatal_failure -static v0 fatal_failure (b4 condition, c1 * message) { +static procedure fatal_failure (boolean condition, character * message) { if (condition == true) { echo ("[\x1b[1;31m FATAL \x1b[0m] "); - for (s4 index = 0; message [index] != '\0'; ++index) { + for (integer index = 0; message [index] != '\0'; ++index) { output (& message [index], 1); } @@ -246,31 +254,31 @@ static v0 fatal_failure (b4 condition, c1 * message) { #define fatal_failure(...) #endif -static v0 execute (c1 * command) { - s4 status = 0; +static procedure execute (character * command) { + integer status = 0; system (command); fatal_failure (status != 0, "execute: System returned an error code."); } -static u4 tick_tock (v0) { - return ((u4) clock ()); +static natural tick_tock (none) { + return ((natural) clock ()); } -static u8 nano_time (v0) { +static natural_64 nano_time (none) { struct timespec time = { 0 }; - u8 result = 0; + natural_64 result = 0; clock_gettime (CLOCK_MONOTONIC, & time); - result = 1000000000ul * (u8) time.tv_sec + (u8) time.tv_nsec; + result = 1000000000ul * (natural_64) time.tv_sec + (natural_64) time.tv_nsec; return (result); } -static v0 nano_wait (u8 time) { +static procedure nano_wait (natural_64 time) { struct timespec wait = { time / 1000000000, time % 1000000000 @@ -279,26 +287,114 @@ static v0 nano_wait (u8 time) { while (nanosleep (& wait, null)) continue; } -static f4 normal_r (u4 colour) { return ((float) ((colour >> 24) & 0xff) / 255.0f); } -static f4 normal_g (u4 colour) { return ((float) ((colour >> 16) & 0xff) / 255.0f); } -static f4 normal_b (u4 colour) { return ((float) ((colour >> 8) & 0xff) / 255.0f); } -static f4 normal_a (u4 colour) { return ((float) ((colour >> 0) & 0xff) / 255.0f); } +static natural maximum_natural (caliber count, ...) { + va_list list; + + natural match = minimal_natural; + + va_start (list, count); + + for (caliber index = 0; index < count; ++index) { + natural current = (natural) va_arg (list, integer); + + if (current > match) { + match = current; + } + } + + va_end (list); + + return (match); +} + +static natural minimum_natural (caliber count, ...) { + va_list list; + + natural match = maximal_natural; + + va_start (list, count); + + for (caliber index = 0; index < count; ++index) { + natural current = (natural) va_arg (list, integer); + + if (current < match) { + match = current; + } + } + + va_end (list); + + return (match); +} + +static integer maximum_integer (caliber count, ...) { + va_list list; + + integer match = maximal_integer; + + va_start (list, count); + + for (caliber index = 0; index < count; ++index) { + integer current = va_arg (list, integer); + + if (current > match) { + match = current; + } + } + + va_end (list); + + return (match); +} + +static integer minimum_integer (caliber count, ...) { + va_list list; + + integer match = minimal_integer; -static u4 channel_r (u4 colour) { return ((colour >> 24) & 0xff); } -static u4 channel_g (u4 colour) { return ((colour >> 16) & 0xff); } -static u4 channel_b (u4 colour) { return ((colour >> 8) & 0xff); } -static u4 channel_a (u4 colour) { return ((colour >> 0) & 0xff); } + va_start (list, count); -static u4 colour_channel_reverse (u4 colour) { - u4 r = channel_r (colour); - u4 g = channel_g (colour); - u4 b = channel_b (colour); - u4 a = channel_a (colour); + for (caliber index = 0; index < count; ++index) { + integer current = va_arg (list, integer); + + if (current < match) { + match = current; + } + } + + va_end (list); + + return (match); +} + +static procedure exchange_integer (integer * a, integer * b) { integer c = * a; * a = * b; * b = c; } +static procedure exchange_natural (natural * a, natural * b) { natural c = * a; * a = * b; * b = c; } +static procedure exchange_real (real * a, real * b) { real c = * a; * a = * b; * b = c; } + +static procedure clamp_integer (integer * x, integer lower, integer upper) { if (* x < lower) * x = lower; if (* x > upper) * x = upper; } +static procedure clamp_natural (natural * x, natural lower, natural upper) { if (* x < lower) * x = lower; if (* x > upper) * x = upper; } +static procedure clamp_real (real * x, real lower, real upper) { if (* x < lower) * x = lower; if (* x > upper) * x = upper; } + +static real normal_r (natural colour) { return ((real) ((colour >> 24) & 0xff) / 255.0f); } +static real normal_g (natural colour) { return ((real) ((colour >> 16) & 0xff) / 255.0f); } +static real normal_b (natural colour) { return ((real) ((colour >> 8) & 0xff) / 255.0f); } +static real normal_a (natural colour) { return ((real) ((colour >> 0) & 0xff) / 255.0f); } + +static natural channel_r (natural colour) { return ((colour >> 24) & 0xff); } +static natural channel_g (natural colour) { return ((colour >> 16) & 0xff); } +static natural channel_b (natural colour) { return ((colour >> 8) & 0xff); } +static natural channel_a (natural colour) { return ((colour >> 0) & 0xff); } + +static natural colour_channel_reverse (natural colour) { + natural r = channel_r (colour); + natural g = channel_g (colour); + natural b = channel_b (colour); + natural a = channel_a (colour); return ((a << 24) | (b << 16) | (g << 8) | (r << 0)); } -static u4 colour_linear_interpolation (u4 colour_a, u4 colour_b, f4 scale) { +static natural colour_linear_interpolation (natural colour_a, natural colour_b, real scale) { if (scale <= 0.0f) { return (colour_a); } @@ -307,16 +403,16 @@ static u4 colour_linear_interpolation (u4 colour_a, u4 colour_b, f4 scale) { return (colour_b); } - u4 r = (u4) ((1.0f - scale) * channel_r (colour_a) + scale * channel_r (colour_b)); - u4 g = (u4) ((1.0f - scale) * channel_g (colour_a) + scale * channel_g (colour_b)); - u4 b = (u4) ((1.0f - scale) * channel_b (colour_a) + scale * channel_b (colour_b)); - u4 a = (u4) ((1.0f - scale) * channel_a (colour_a) + scale * channel_a (colour_b)); + natural r = (natural) ((1.0f - scale) * channel_r (colour_a) + scale * channel_r (colour_b)); + natural g = (natural) ((1.0f - scale) * channel_g (colour_a) + scale * channel_g (colour_b)); + natural b = (natural) ((1.0f - scale) * channel_b (colour_a) + scale * channel_b (colour_b)); + natural a = (natural) ((1.0f - scale) * channel_a (colour_a) + scale * channel_a (colour_b)); return ((r << 24) | (g << 16) | (b << 8) | (a << 0)); } -static v0 * allocate (u8 size) { - c1 * data = null; +static generic * allocate (caliber size) { + character * data = null; fatal_failure (size <= 0, "allocate: Size is equal or below zero."); @@ -327,7 +423,7 @@ static v0 * allocate (u8 size) { return (data); } -static v0 * reallocate (v0 * data, u8 size) { +static generic * reallocate (generic * data, caliber size) { fatal_failure (size <= 0, "reallocate: Size is equal or below zero."); data = realloc (data, size); @@ -337,7 +433,7 @@ static v0 * reallocate (v0 * data, u8 size) { return (data); } -static v0 * deallocate (v0 * data) { +static generic * deallocate (generic * data) { fatal_failure (data == null, "deallocate: Data is null pointer."); free (data); @@ -345,10 +441,10 @@ static v0 * deallocate (v0 * data) { return (null); } -static v0 * record (v0) { - c1 * buffer = null; - u8 offset = 0; - u8 memory = 64 * 1024; +static generic * record (none) { + character * buffer = null; + caliber offset = 0; + caliber memory = 64 * 1024; buffer = reallocate (buffer, memory); @@ -369,9 +465,9 @@ static v0 * record (v0) { return (buffer); } -static b4 character_compare_array (c1 character, c1 * character_array) { - for (u8 index = 0; character_array [index] != '\0'; ++index) { - if (character == character_array [index]) { +static boolean character_compare_array (character c, character * character_array) { + for (caliber index = 0; character_array [index] != '\0'; ++index) { + if (c == character_array [index]) { return (true); } } @@ -379,44 +475,47 @@ static b4 character_compare_array (c1 character, c1 * character_array) { return (false); } -static b4 character_is_uppercase (c1 character) { - return ((character >= 'A') && (character <= 'Z')); +static boolean character_is_uppercase (character c) { + return ((c >= 'A') && (c <= 'Z')); } -static b4 character_is_lowercase (c1 character) { - return ((character >= 'a') && (character <= 'z')); +static boolean character_is_lowercase (character c) { + return ((c >= 'a') && (c <= 'z')); } -static b4 character_is_digit (c1 character) { - return ((character >= '0') && (character <= '9')); +static boolean character_is_digit (character c) { + return ((c >= '0') && (c <= '9')); } -static b4 character_is_letter (c1 character) { - return (((character >= 'A') && (character <= 'Z')) || ((character >= 'a') && (character <= 'z'))); +static boolean character_is_letter (character c) { + return (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))); } -static b4 character_is_blank (c1 character) { - return ((character == ' ') || (character == '\t') || (character == '\r') || (character == '\n')); +static boolean character_is_blank (character c) { + return ((c == ' ') || (c == '\t') || (c == '\r') || (c == '\n')); } -static b4 character_is_symbol (c1 character) { - return (((character >= '!') && (character <= '/')) || ((character >= ':') && (character <= '@')) - || ((character >= '[') && (character <= '`')) || ((character >= '{') && (character <= '~'))); +static boolean character_is_symbol (character c) { + return (((c >= '!') && (c <= '/')) || ((c >= ':') && (c <= '@')) || ((c >= '[') && (c <= '`')) || ((c >= '{') && (c <= '~'))); } -static b4 character_is_separator (c1 character) { - return ((character != '_') && ((character_is_blank (character) == true) || (character_is_symbol (character) == true))); +static boolean character_is_separator (character c) { + return ((c != '_') && ((character_is_blank (c) == true) || (character_is_symbol (c) == true))); } -static b4 character_is_identifier (c1 character) { - return ((character == '_') || (character_is_letter (character) == true) || (character_is_digit (character) == true)); +static boolean character_is_identifier (character c) { + return ((c == '_') || (character_is_letter (c) == true) || (character_is_digit (c) == true)); } -static b4 character_is_visible (c1 character) { - return ((character >= '!') && (character <= '~')); +static boolean character_is_visible (character c) { + return ((c >= '!') && (c <= '~')); } -static c1 * capitalize (c1 * string) { +static boolean character_is_invisible (character c) { + return (character_is_visible (c) == false); +} + +static character * capitalize (character * string) { fatal_failure (string == null, "capitalize: String is null pointer."); string [0] -= (character_is_lowercase (string [0]) == true) ? ' ' : '\0'; @@ -424,28 +523,28 @@ static c1 * capitalize (c1 * string) { return (string); } -static c1 * uppercase (c1 * string) { +static character * uppercase (character * string) { fatal_failure (string == null, "uppercase: String is null pointer."); - for (u4 index = 0; string [index] != '\0'; ++index) { + for (natural index = 0; string [index] != '\0'; ++index) { string [index] += (character_is_lowercase (string [index]) == true) ? ' ' : '\0'; } return (string); } -static c1 * lowercase (c1 * string) { +static character * lowercase (character * string) { fatal_failure (string == null, "lowercase: String is null pointer."); - for (u4 index = 0; string [index] != '\0'; ++index) { + for (natural index = 0; string [index] != '\0'; ++index) { string [index] -= (character_is_uppercase (string [index]) == true) ? ' ' : '\0'; } return (string); } -static u8 string_length (c1 * string) { - u8 length = 0; +static caliber string_length (character * string) { + caliber length = 0; fatal_failure (string == null, "string_length: String is null pointer."); @@ -454,41 +553,41 @@ static u8 string_length (c1 * string) { return (length); } -static c1 * string_nullify (c1 * string, u8 length) { - fatal_failure (string == null, "string_nullify: String is null pointer."); - fatal_failure (length <= 0, "string_nullify: Length is equal or below zero."); +static character * string_nullify (character * destination, caliber length) { + fatal_failure (destination == null, "string_reverse_limit: Destination string is null pointer."); + fatal_failure (length <= 0, "string_reverse_limit: Length is equal or below zero."); - for (u8 index = 0; index < length; ++index) { - string [index] = '\0'; + for (caliber index = 0; index < length; ++index) { + destination [index] = '\0'; } - return (string); + return (destination); } -static c1 * string_reverse_limit (c1 * string, u8 limit) { - fatal_failure (string == null, "string_reverse_limit: String is null pointer."); - fatal_failure (limit <= 0, "string_reverse_limit: Limit is equal or below zero."); +static character * string_reverse_limit (character * destination, caliber limit) { + fatal_failure (destination == null, "string_reverse_limit: Destination string is null pointer."); + fatal_failure (limit <= 0, "string_reverse_limit: Limit is equal or below zero."); - for (u8 index = 0; index < limit / 2; ++index) { - c1 temporary = string [index]; + for (caliber index = 0; index < limit / 2; ++index) { + character temporary = destination [index]; - string [index] = string [limit - 1 - index]; - string [limit - 1 - index] = temporary; + destination [index] = destination [limit - 1 - index]; + destination [limit - 1 - index] = temporary; } - return (string); + return (destination); } -static c1 * string_reverse (c1 * string) { - return (string_reverse_limit (string, string_length (string))); +static character * string_reverse (character * destination) { + return (string_reverse_limit (destination, string_length (destination))); } -static b4 string_compare_limit (c1 * string_a, c1 * string_b, u8 limit) { +static boolean string_compare_limit (character * string_a, character * string_b, caliber limit) { fatal_failure (string_a == null, "string_compare_limit: First source string is null pointer."); fatal_failure (string_b == null, "string_compare_limit: Second source string is null pointer."); fatal_failure (limit <= 0, "string_compare_limit: Limit is equal or below zero."); - for (u8 index = 0; index < limit; ++index) { + for (caliber index = 0; index < limit; ++index) { if (string_a [index] != string_b [index]) { return (false); } @@ -497,94 +596,98 @@ static b4 string_compare_limit (c1 * string_a, c1 * string_b, u8 limit) { return (true); } -static b4 string_compare (c1 * string_a, c1 * string_b) { +static boolean string_compare (character * string_a, character * string_b) { return (string_compare_limit (string_a, string_b, string_length (string_a) + 1)); } -static c1 * string_copy_limit (c1 * destination, c1 * source, u8 limit) { +static character * string_copy_limit (character * destination, character * source, caliber limit) { fatal_failure (destination == null, "string_copy_limit: Destination string is null pointer."); fatal_failure (source == null, "string_copy_limit: Source string is null pointer."); fatal_failure (limit <= 0, "string_copy_limit: Limit is equal or below zero."); - for (u8 index = 0; index < limit; ++index) { + for (caliber index = 0; index < limit; ++index) { destination [index] = source [index]; } return (destination); } -static c1 * string_copy (c1 * destination, c1 * source) { +static character * string_copy (character * destination, character * source) { return (string_copy_limit (destination, source, string_length (source) + 1)); } -static c1 * string_concatenate_limit (c1 * destination, c1 * source, u8 limit) { - u8 offset = string_length (destination); +static character * string_concatenate_limit (character * destination, character * source, caliber limit) { + caliber offset = string_length (destination); fatal_failure (destination == null, "string_concatenate_limit: Destination string is null pointer."); fatal_failure (source == null, "string_concatenate_limit: Source string is null pointer."); fatal_failure (limit <= 0, "string_concatenate_limit: Limit is equal or below zero."); - for (u8 index = 0; index < limit; ++index) { + for (caliber index = 0; index < limit; ++index) { destination [offset + index] = source [index]; } return (destination); } -static c1 * string_concatenate (c1 * destination, c1 * source) { +static character * string_concatenate (character * destination, character * source) { return (string_concatenate_limit (destination, source, string_length (source) + 1)); } -static c1 * string_duplicate (c1 * string) { - c1 * duplicate = null; +static character * string_duplicate (character * source) { + character * duplicate = allocate ((string_length (source) + 1) * sizeof (* duplicate)); - duplicate = allocate ((string_length (string) + 1) * sizeof (* duplicate)); - - string_copy (duplicate, string); + string_copy (duplicate, source); return (duplicate); } -static c1 * string_duplicate_limit (c1 * string, u4 limit) { - c1 * duplicate = null; - - duplicate = allocate ((limit + 1) * sizeof (* duplicate)); +static character * string_duplicate_limit (character * source, caliber limit) { + character * duplicate = allocate ((limit + 1) * sizeof (* duplicate)); - string_copy_limit (duplicate, string, limit); + string_copy_limit (duplicate, source, limit); return (duplicate); } -static c1 * string_align_left (c1 * string, u8 amount, c1 character) { - u8 length = string_length (string); - - for (u8 offset = length; offset < amount; ++offset) { - string [offset] = character; +static character * string_align_left (character * destination, caliber amount, character with) { + for (caliber offset = string_length (destination); offset < amount; ++offset) { + destination [offset] = with; } - string [amount] = '\0'; + destination [amount] = '\0'; - return (string); + return (destination); +} + +static character * string_remove_extension (character * destination) { + caliber length = string_length (destination); + + for (--length; destination [length] != '.'; --length); + + destination [length] = '\0'; + + return (destination); } -static v0 memory_nullify (v0 * memory, u8 size) { - c1 * cast = (c1 *) memory; +static procedure memory_nullify (generic * memory, caliber size) { + character * cast = (character *) memory; fatal_failure (memory == null, "memory_nullify: Memory is null pointer."); - for (u8 offset = 0; offset < size; ++offset) { - cast [offset] = (char) 0; + for (caliber offset = 0; offset < size; ++offset) { + cast [offset] = '\0'; } } -static s4 memory_compare (v0 * memory_0, v0 * memory_1, u8 size) { - c1 * cast_0 = ( c1 *) memory_0; - c1 * cast_1 = (c1 *) memory_1; +static integer memory_compare (generic * memory_0, generic * memory_1, caliber size) { + character * cast_0 = (character *) memory_0; + character * cast_1 = (character *) memory_1; fatal_failure (memory_0 == null, "memory_compare: Memory is null pointer."); fatal_failure (memory_1 == null, "memory_compare: Source is null pointer."); - for (u8 offset = 0; offset < size; ++offset) { + for (caliber offset = 0; offset < size; ++offset) { if (cast_0 [offset] != cast_1 [offset]) { return (false); } @@ -593,46 +696,36 @@ static s4 memory_compare (v0 * memory_0, v0 * memory_1, u8 size) { return (true); } -static v0 memory_copy (v0 * destination, v0 * source, u8 size) { - c1 * cast_0 = ( c1 *) destination; - c1 * cast_1 = (c1 *) source; +static procedure memory_copy (generic * destination, generic * source, caliber size) { + character * cast_0 = (character *) destination; + character * cast_1 = (character *) source; fatal_failure (destination == null, "memory_copy: Destination is null pointer."); fatal_failure (source == null, "memory_copy: Source is null pointer."); - for (u8 offset = 0; offset < size; ++offset) { + for (caliber offset = 0; offset < size; ++offset) { cast_0 [offset] = cast_1 [offset]; } } -static c1 * string_remove_extension (c1 * string) { - u8 length = string_length (string); - - for (--length; string [length] != '.'; --length); - - string [length] = '\0'; - - return (string); -} - -static v0 echo_clear (v0) { +static procedure echo_clear (none) { echo ("\033[2J\033[H"); } -static v0 echo_colour (colour_enumeration colour, effect_enumeration effect) { - c1 format [8] = "\033[ ;3 m"; +static procedure echo_colour (colour_enumeration colour, effect_enumeration effect) { + character format [8] = "\033[ ;3 m"; - format [2] = (char) (effect % effect_count) + '0'; - format [5] = (char) (colour % colour_count) + '0'; + format [2] = (character) (effect % effect_count) + '0'; + format [5] = (character) (colour % colour_count) + '0'; echo (format); } -static v0 echo_cancel (v0) { +static procedure echo_cancel (none) { echo ("\033[0m"); } -static v0 show_cursor (b4 show) { +static procedure show_cursor (boolean show) { if (show == true) { echo ("\033[?25h"); } else { @@ -640,13 +733,13 @@ static v0 show_cursor (b4 show) { } } -static s4 file_open (c1 * path, s4 mode) { +static integer file_open (character * path, integer mode) { fatal_failure (path == null, "file_open: File path is null pointer."); return (open (path, mode, 0777)); } -static s4 file_close (s4 file) { +static integer file_close (integer file) { fatal_failure (file == -1, "file_close: Invalid file descriptor."); close (file); @@ -654,7 +747,7 @@ static s4 file_close (s4 file) { return (-1); } -static v0 file_read (s4 file, v0 * data, u8 size) { +static procedure file_read (integer file, generic * data, caliber size) { fatal_failure (file <= -1, "file_read: File descriptor is closed or invalid."); fatal_failure (data == null, "file_read: Data is null pointer."); fatal_failure (size == 0, "file_read: Size is zero."); @@ -662,7 +755,7 @@ static v0 file_read (s4 file, v0 * data, u8 size) { read (file, data, size); } -static v0 file_write (s4 file, v0 * data, u8 size) { +static procedure file_write (integer file, generic * data, caliber size) { fatal_failure (file <= -1, "file_write: File descriptor is closed or invalid."); fatal_failure (data == null, "file_write: Data is null pointer."); fatal_failure (size == 0, "file_write: Size is zero."); @@ -670,28 +763,34 @@ static v0 file_write (s4 file, v0 * data, u8 size) { write (file, data, size); } -static v0 file_echo (s4 file, c1 * data) { +static procedure file_echo (integer file, character * data) { file_write (file, data, string_length (data)); } -static u8 file_seek (s4 file, s4 whence) { +static caliber file_seek (integer file, integer whence) { fatal_failure (file == -1, "file_seek: Invalid file descriptor."); - - return ((u8) lseek (file, 0, whence)); +/// CHECK FOR ERRORS + return ((caliber) lseek (file, 0, whence)); } -static u8 file_size (c1 * path) { +static caliber file_size (character * path) { struct stat data = { 0 }; fatal_failure (path == null, "file_size: File path is null pointer."); lstat (path, & data); - return ((u8) data.st_size); + return ((caliber) data.st_size); +} + +static boolean file_exists (character * path) { + fatal_failure (path == null, "file_record: File path is null pointer."); + + return ((access (path, F_OK) == 0) ? true : false); } -static file_type_enumeration file_type (c1 * path) { /// SHIT BREAKS ON "./THIS/THAT.EXT"... - c1 * extensions [file_type_count] = { +static file_type_enumeration file_type (character * path) { + character * extensions [file_type_count] = { ".c", ".h", ".adb", ".ads", ".cpp", ".hpp", ".f90", ".mod", ".pas", ".d", ".go", ".jai", ".asm", ".eax", ".gas", ".fasm", ".hs", ".el", ".cfg", ".lua", ".sh", ".py", ".tcl", ".4th", @@ -701,33 +800,31 @@ static file_type_enumeration file_type (c1 * path) { /// SHIT BREAKS ON "./THIS/ ".obj", ".iqm", ".md5", ".ply", ".o", ".spv" }; - fatal_failure (path == null, "file_type: File path is null pointer."); + natural cut_at = 0; - for (; * path != '.'; ++path); + fatal_failure ((path == null) || (* path == '\0'), "file_type: File path is null pointer."); + + for (cut_at = string_length (path) - 1; cut_at != 0; --cut_at) { + if (path [cut_at] == '.') break; + } for (file_type_enumeration type = 0; type != file_type_count; ++type) { - if (string_compare (path, extensions [type])) { + if (string_compare (& path [cut_at], extensions [type])) { return (type); } } - return (~ 0u); + return (file_type_count); } -static b4 file_exists (c1 * path) { - fatal_failure (path == null, "file_record: File path is null pointer."); - - return ((access (path, F_OK) == 0) ? true : false); -} - -static v0 file_remove (c1 * path) { +static procedure file_remove (character * path) { unlink (path); } -static v0 * file_record (c1 * path) { - s4 file = -1; - u8 size = 0; - c1 * data = null; +static generic * file_record (character * path) { + integer file = -1; + caliber size = 0; + character * data = null; fatal_failure (path == null, "file_record: File path is null pointer."); @@ -742,10 +839,10 @@ static v0 * file_record (c1 * path) { return (data); } -static c1 * file_import (c1 * path) { - s4 file = -1; - u8 size = 0; - c1 * data = null; +static character * file_import (character * path) { + integer file = -1; + caliber size = 0; + character * data = null; fatal_failure (path == null, "file_import: File path is null pointer."); @@ -762,8 +859,8 @@ static c1 * file_import (c1 * path) { return (data); } -static v0 file_export (c1 * path, c1 * data) { - s4 file = -1; +static procedure file_export (character * path, character * data) { + integer file = -1; fatal_failure (path == null, "file_export: File path is null pointer."); fatal_failure (data == null, "file_export: Data is null pointer."); @@ -775,17 +872,17 @@ static v0 file_export (c1 * path, c1 * data) { file = file_close (file); } -static v0 * folder_open (c1 * path) { +static generic * folder_open (character * path) { DIR * folder = null; fatal_failure (path == null, "folder_open: Folder path is null pointer."); folder = opendir (path); - return ((v0 *) folder); + return ((generic *) folder); } -static c1 * folder_read (v0 * handle) { +static character * folder_read (generic * handle) { struct dirent * file = null; DIR * folder = (DIR *) handle; @@ -801,7 +898,7 @@ static c1 * folder_read (v0 * handle) { } } -static v0 * folder_close (v0 * handle) { +static generic * folder_close (generic * handle) { DIR * folder = (DIR *) handle; fatal_failure (handle == null, "folder_read: Folder handle is null pointer."); @@ -811,18 +908,18 @@ static v0 * folder_close (v0 * handle) { return (null); } -static c1 * * folder_create_path_list (c1 * folder, u4 * path_count, b4 sort) { - v0 * handle = null; - c1 * * path_array = 0; +static character * * folder_create_path_list (character * folder, natural * path_count, boolean sort) { + procedure * handle = null; + character * * path_array = 0; - (v0) sort; + (none) sort; fatal_failure (folder == null, "folder_create_path_list: Folder handle is null pointer."); fatal_failure (path_count == null, "folder_create_path_list: Path count address is null pointer."); handle = folder_open (folder); - for (c1 * path = folder_read (handle); path != null; path = folder_read (handle)) { + for (character * path = folder_read (handle); path != null; path = folder_read (handle)) { if (path [0] != '.') { (* path_count) += 1; @@ -839,16 +936,16 @@ static c1 * * folder_create_path_list (c1 * folder, u4 * path_count, b4 sort) { return (path_array); } -static c1 * * folder_remove_path_list (c1 * * path_array, u4 path_count) { - for (u4 index = 0; index < path_count; ++index) { +static character * * folder_remove_path_list (character * * path_array, natural path_count) { + for (natural index = 0; index < path_count; ++index) { path_array [index] = deallocate (path_array [index]); } return (deallocate (path_array)); } -static c1 * configuration_format (c1 * path) { - static c1 buffer [512] = ""; +static character * configuration_format (character * path) { + static character buffer [512] = ""; string_copy (buffer, getenv ("HOME")); string_concatenate (buffer, "/.config/xolatile/"); @@ -857,29 +954,29 @@ static c1 * configuration_format (c1 * path) { return (buffer); } -static b4 configuration_exists (c1 * path) { +static boolean configuration_exists (character * path) { return (file_exists (configuration_format (path))); } -static v0 configuration_remove (c1 * path) { +static procedure configuration_remove (character * path) { file_remove (configuration_format (path)); } -static c1 * configuration_import (c1 * path) { +static character * configuration_import (character * path) { return (file_import (configuration_format (path))); } -static v0 configuration_export (c1 * path, c1 * data) { +static procedure configuration_export (character * path, character * data) { file_export (configuration_format (path), data); } -static b4 argument_compare (c1 * argument, c1 * short_option, c1 * long_option) { +static boolean argument_compare (character * argument, character * short_option, character * long_option) { return ((string_compare (argument, short_option) == true) || (string_compare (argument, long_option) == true)); } -static u4 string_full_width (c1 * string, u4 tab_width) { - u4 width = 0; - u4 count = 0; +static natural string_full_width (character * string, natural tab_width) { + natural width = 0; + natural count = 0; do { if (* string == '\t') { @@ -895,8 +992,8 @@ static u4 string_full_width (c1 * string, u4 tab_width) { return (width - 1); } -static u4 string_full_height (c1 * string) { - u4 height = 0; +static natural string_full_height (character * string) { + natural height = 0; do { if (* string == '\n') { @@ -907,26 +1004,26 @@ static u4 string_full_height (c1 * string) { return (height + 1); } -static u4 string_limit_to_number (c1 * string, u4 limit) { - u4 number = 0; +static natural string_limit_to_number (character * string, natural limit) { + natural number = 0; - for (u4 index = 0; (string [index] != '\0') && (index < limit); ++index) { + for (natural index = 0; (string [index] != '\0') && (index < limit); ++index) { number *= 10; - number += (u4) (string [index] - '0'); + number += (natural) (string [index] - '0'); } return (number); } -static u4 string_to_number (c1 * string) { +static natural string_to_number (character * string) { return (string_limit_to_number (string, string_length (string))); } -static c1 * number_to_string (s4 number) { - static c1 string [34] = ""; +static character * number_to_string (integer number) { + static character string [34] = ""; - u4 index = 0; - b4 sign = false; + natural index = 0; + boolean sign = false; string_nullify (string, sizeof (string)); @@ -943,8 +1040,8 @@ static c1 * number_to_string (s4 number) { sign = false; } - for (index = 0; (number != 0) && (index < (u4) sizeof (string) - 1); ++index) { - string [index] = (char) (number % 10) + '0'; + for (index = 0; (number != 0) && (index < (natural) sizeof (string) - 1); ++index) { + string [index] = (character) (number % 10) + '0'; number /= 10; } @@ -960,10 +1057,10 @@ static c1 * number_to_string (s4 number) { return (string); } -static c1 * format_to_string (s4 number, b4 sign, u4 base, u8 amount, c1 character) { - static c1 string [36]; +static character * format_to_string (integer number, boolean sign, natural base, caliber amount, character with) { + static character string [36]; - s4 i; + integer i; string_nullify (string, sizeof (string)); @@ -971,7 +1068,7 @@ static c1 * format_to_string (s4 number, b4 sign, u4 base, u8 amount, c1 charact string [0] = '0'; string [1] = '\0'; - string_align_left (string, amount, character); + string_align_left (string, amount, with); return (string); } @@ -994,13 +1091,13 @@ static c1 * format_to_string (s4 number, b4 sign, u4 base, u8 amount, c1 charact string_reverse (string); - string_align_left (string, amount, character); + string_align_left (string, amount, with); return (string); } -static c1 * format (c1 * base, ...) { - static c1 string [1024]; +static character * format (character * base, ...) { + static character string [1024]; va_list list; @@ -1013,10 +1110,10 @@ static c1 * format (c1 * base, ...) { case ('%'): { ++base; switch (* base) { - case ('%'): string_concatenate (string, "%"); break; - case ('i'): string_concatenate (string, number_to_string (va_arg (list, int))); break; - case ('s'): string_concatenate (string, va_arg (list, c1 *)); break; - default: string_concatenate (string, "?"); break; + case ('%'): string_concatenate (string, "%"); break; + case ('i'): string_concatenate (string, number_to_string (va_arg (list, integer))); break; + case ('s'): string_concatenate (string, va_arg (list, character *)); break; + default: string_concatenate (string, "?"); break; } } break; default: { @@ -1030,7 +1127,7 @@ static c1 * format (c1 * base, ...) { return (string); } -static v0 print (c1 * format, ...) { +static procedure print (character * format, ...) { va_list list; va_start (list, format); @@ -1044,34 +1141,34 @@ static v0 print (c1 * format, ...) { output ("%", 1); } break; case ('i'): { - c1 * string = number_to_string (va_arg (list, int)); + character * string = number_to_string (va_arg (list, integer)); output (string, string_length (string)); } break; case ('f'): { - f4 number = (float) va_arg (list, double); - c1 * upper = number_to_string ((int) number); - c1 * lower = number_to_string ((int) (number * 1000.0f) % 1000); + real data = (real) va_arg (list, real_64); + character * upper = number_to_string ((integer) data); + character * lower = number_to_string ((integer) (data * 1000.0f) % 1000); output (upper, string_length (upper)); output (".", 1); output (lower, string_length (lower)); } break; case ('t'): { - s4 toggle = (va_arg (list, int)); - echo_colour ((toggle == true) ? colour_green : colour_red, effect_normal); - output ((toggle == true) ? "+" : "-", 1); + integer data = (va_arg (list, integer)); + echo_colour ((data == true) ? colour_green : colour_red, effect_normal); + output ((data == true) ? "+" : "-", 1); echo_cancel (); } break; case ('b'): { - s4 b4ean = (va_arg (list, int)); - output ((b4ean == true) ? "true" : "false", (b4ean == true) ? 4 : 5); + integer data = (va_arg (list, integer)); + output ((data == true) ? "true" : "false", (data == true) ? 4 : 5); } break; case ('c'): { - c1 character = (char) va_arg (list, int); - output (& character, 1); + character data = (character) va_arg (list, integer); + output (& data, 1); } break; case ('s'): { - c1 * string = va_arg (list, c1 *); - output (string, string_length (string)); + character * data = va_arg (list, character *); + output (data, string_length (data)); } break; default: { output ("?", 1); @@ -1115,18 +1212,91 @@ static v0 print (c1 * format, ...) { va_end (list); } -static v0 uint_exchange (u4 * a, u4 * b) { - u4 c = * a; +static procedure conditional_print (boolean condition, character * format, ...) { + va_list list; - * a = * b; - * b = c; -} + if (condition == false) return; -static v0 float_exchange (f4 * a, f4 * b) { - f4 c = * a; + va_start (list, format); + + for (; * format != character_null; ++format) { + switch (* format) { + case ('%'): { + ++format; + switch (* format) { + case ('%'): { + output ("%", 1); + } break; + case ('i'): { + character * string = number_to_string (va_arg (list, integer)); + output (string, string_length (string)); + } break; + case ('f'): { + real data = (real) va_arg (list, real_64); + character * upper = number_to_string ((integer) data); + character * lower = number_to_string ((integer) (data * 1000.0f) % 1000); + output (upper, string_length (upper)); + output (".", 1); + output (lower, string_length (lower)); + } break; + case ('t'): { + integer data = (va_arg (list, integer)); + echo_colour ((data == true) ? colour_green : colour_red, effect_normal); + output ((data == true) ? "+" : "-", 1); + echo_cancel (); + } break; + case ('b'): { + integer data = (va_arg (list, integer)); + output ((data == true) ? "true" : "false", (data == true) ? 4 : 5); + } break; + case ('c'): { + character data = (character) va_arg (list, integer); + output (& data, 1); + } break; + case ('s'): { + character * data = va_arg (list, character *); + output (data, string_length (data)); + } break; + default: { + output ("?", 1); + } break; + } + } break; + case ('/'): { + ++format; + switch (* format) { + case ('/'): echo ("/"); break; + case ('s'): echo ("[\x1b[1;32mSuccess\x1b[0m]"); break; + case ('f'): echo ("[\x1b[1;31mFailure\x1b[0m]"); break; + case ('w'): echo ("[\x1b[1;33mWarning\x1b[0m]"); break; + case ('c'): echo ("[\x1b[1;30mComment\x1b[0m]"); break; + case ('A'): echo ("\x1b[0m"); break; + case ('B'): echo ("\x1b[1m"); break; + case ('C'): echo ("\x1b[2m"); break; + case ('D'): echo ("\x1b[3m"); break; + case ('E'): echo ("\x1b[4m"); break; + case ('F'): echo ("\x1b[5m"); break; + case ('G'): echo ("\x1b[6m"); break; + case ('H'): echo ("\x1b[7m"); break; + case ('0'): echo ("\x1b[30m"); break; + case ('1'): echo ("\x1b[31m"); break; + case ('2'): echo ("\x1b[32m"); break; + case ('3'): echo ("\x1b[33m"); break; + case ('4'): echo ("\x1b[34m"); break; + case ('5'): echo ("\x1b[35m"); break; + case ('6'): echo ("\x1b[36m"); break; + case ('7'): echo ("\x1b[37m"); break; + case ('-'): echo ("\x1b[0m"); break; + default: echo ("?"); break; + } + } break; + default: { + output (format, 1); + } break; + } + } - * a = * b; - * b = c; + va_end (list); } #ifdef use_mathematics @@ -1135,22 +1305,22 @@ static v0 float_exchange (f4 * a, f4 * b) { #define pi (3.14159265f) -static f4 sign (f4 x) { return ((x > 0.0f) ? + 1.0f : - 1.0f); } -static f4 binary_sign (u4 x) { return ((x > 0) ? + 1.0f : - 1.0f); } +static real sign (real x) { return ((x > 0.0f) ? + 1.0f : - 1.0f); } +static real binary_sign (natural x) { return ((x > 0) ? + 1.0f : - 1.0f); } -static f4 square_root (f4 x) { return (sqrtf (x)); } -static f4 cube_root (f4 x) { return (cbrtf (x)); } +static real square_root (real x) { return (sqrtf (x)); } +static real cube_root (real x) { return (cbrtf (x)); } -static f4 sine (f4 x) { return (sinf (x)); } -static f4 cosine (f4 x) { return (cosf (x)); } -static f4 tangent (f4 x) { return (tanf (x)); } +static real sine (real x) { return (sinf (x)); } +static real cosine (real x) { return (cosf (x)); } +static real tangent (real x) { return (tanf (x)); } -static f4 arc_sine (f4 x) { return (asinf (x)); } -static f4 arc_cosine (f4 x) { return (acosf (x)); } -static f4 arc_tangent (f4 x) { return (atanf (x)); } +static real arc_sine (real x) { return (asinf (x)); } +static real arc_cosine (real x) { return (acosf (x)); } +static real arc_tangent (real x) { return (atanf (x)); } -static f4 cosecant (f4 x) { return (1.0f / sinf (x)); } -static f4 secant (f4 x) { return (1.0f / cosf (x)); } -static f4 cotangent (f4 x) { return (1.0f / tanf (x)); } +static real cosecant (real x) { return (1.0f / sinf (x)); } +static real secant (real x) { return (1.0f / cosf (x)); } +static real cotangent (real x) { return (1.0f / tanf (x)); } #endif diff --git a/xui.h b/xui.h index defcf62..2af9e28 100755 --- a/xui.h +++ b/xui.h @@ -30,15 +30,15 @@ typedef enum { ui_button_upper_left, ui_button_upper_right, ui_button_lower_left, ui_button_lower_right, ui_button_middle, ui_fill_bar_left, ui_fill_bar_middle, ui_fill_bar_right, ui_fill_bar_base, - ui_tiny_fill_bar_middle, ui_tiny_fill_bar_left, ui_tiny_fill_bar_right, ui_tiny_fill_middle, + ui_tiny_fill_bar_left, ui_tiny_fill_bar_middle, ui_tiny_fill_bar_right, ui_tiny_fill_bar_base, ui_check_box_off, ui_check_box_on, - ui_end_turn_button, + ui_cursor, ui_icon_frame, ui_overicon_frame, ui_ubericon_frame, ui_scroll_bar_lower, ui_scroll_bar_middle, ui_scroll_bar_upper, ui_scroll_bar_slider, ui_separator_left, ui_separator_middle, ui_separator_right, ui_separator_center, ui_title_bar_left, ui_title_bar_middle, ui_title_bar_right, ui_subcount -} ui_subtype; +} ui_subtype_enumeration; typedef enum { ui_window = ui_window_left, @@ -46,224 +46,344 @@ typedef enum { ui_status = ui_status_left, ui_menu = ui_menu_left, ui_button = ui_button_left -} ui_type; +} ui_type_enumeration; typedef struct { - b4 freeview; - u4 ignore; - u4 camera_x; - u4 camera_y; - c1 * help_box_none; - c1 * help_box_text; - u4 help_box_icon; - u4 side_panel; - u4 font; - u4 monofont; - u4 sprite [ui_subcount]; - u4 width [ui_subcount]; - u4 height [ui_subcount]; - u4 separator_size; - u4 icon_size; - u4 overicon_size; - u4 ubericon_size; - u4 title_bar_size; - u4 fill_bar_size; - u4 scroll_bar_size; - u4 camera_speed; + natural count; + natural limit; + natural active; + natural ignore; + natural help_box_icon; + character * help_box_none; + character * help_box_text; + character * * folder; + natural * * sprite; + natural * * width; + natural * * height; + natural * font; + natural * monofont; + natural * separator_size; + natural * icon_size; + natural * overicon_size; + natural * ubericon_size; + natural * title_bar_size; + natural * fill_bar_size; + natural * tiny_fill_bar_size; + natural * scroll_bar_size; } ui_structure; -static ui_structure * ui_initialize (cross_structure * cross) { - c1 * subtype_file_name [ui_subcount] = { - "window_left", "window_right", "window_upper", "window_lower", - "window_upper_left", "window_upper_right", "window_lower_left", "window_lower_right", - "frame_left", "frame_right", "frame_upper", "frame_lower", - "frame_upper_left", "frame_upper_right", "frame_lower_left", "frame_lower_right", - "status_left", "status_right", "status_upper", "status_lower", - "status_upper_left", "status_upper_right", "status_lower_left", "status_lower_right", - "status_middle", - "menu_left", "menu_right", "menu_upper", "menu_lower", - "menu_upper_left", "menu_upper_right", "menu_lower_left", "menu_lower_right", - "menu_middle", - "button_left", "button_right", "button_upper", "button_lower", - "button_upper_left", "button_upper_right", "button_lower_left", "button_lower_right", - "button_middle", - "fill_bar_left", "fill_bar_middle", "fill_bar_right", "fill_bar_base", - "tiny_fill_bar_left", "tiny_fill_bar_middle", "tiny_fill_bar_right", "tiny_fill_bar_base", - "check_box_off", "check_box_on", - "end_turn_button", - "cursor", - "icon_frame", "overicon_frame", "ubericon_frame", - "scroll_bar_lower", "scroll_bar_middle", "scroll_bar_upper", "scroll_bar_slider", - "separator_left", "separator_middle", "separator_right", "separator_center", - "title_bar_left", "title_bar_middle", "title_bar_right" - }; - +static character * ui_subtype_file_name [ui_subcount] = { + "window_left", "window_right", "window_upper", "window_lower", + "window_upper_left", "window_upper_right", "window_lower_left", "window_lower_right", + "frame_left", "frame_right", "frame_upper", "frame_lower", + "frame_upper_left", "frame_upper_right", "frame_lower_left", "frame_lower_right", + "status_left", "status_right", "status_upper", "status_lower", + "status_upper_left", "status_upper_right", "status_lower_left", "status_lower_right", + "status_middle", + "menu_left", "menu_right", "menu_upper", "menu_lower", + "menu_upper_left", "menu_upper_right", "menu_lower_left", "menu_lower_right", + "menu_middle", + "button_left", "button_right", "button_upper", "button_lower", + "button_upper_left", "button_upper_right", "button_lower_left", "button_lower_right", + "button_middle", + "fill_bar_left", "fill_bar_middle", "fill_bar_right", "fill_bar_base", + "tiny_fill_bar_left", "tiny_fill_bar_middle", "tiny_fill_bar_right", "tiny_fill_bar_base", + "check_box_off", "check_box_on", + "cursor", + "icon_frame", "overicon_frame", "ubericon_frame", + "scroll_bar_lower", "scroll_bar_middle", "scroll_bar_upper", "scroll_bar_slider", + "separator_left", "separator_middle", "separator_right", "separator_center", + "title_bar_left", "title_bar_middle", "title_bar_right" +}; + +static ui_structure * ui_initialize (cross_structure * cross, natural limit) { ui_structure * ui = allocate (sizeof (* ui)); - ui->freeview = false; + ui->limit = limit; + ui->ignore = ~ 0u; - ui->camera_x = 0; - ui->camera_y = 0; ui->help_box_none = string_duplicate ("---"); ui->help_box_text = ui->help_box_none; ui->help_box_icon = ui->ignore; - ui->side_panel = 400; - - ui->font = cross_font_import (cross, configuration_format ("xui/regular"), ' ', '~', 0xffee0000u); - ui->monofont = cross_font_import (cross, configuration_format ("xui/monospace"), ' ', '~', 0xffeeee00u); - for (u4 index = 0; index < ui_subcount; ++index) { - c1 * file_name = configuration_format (format ("xui/%s", subtype_file_name [index])); - - ui->sprite [index] = cross_sprite_import (cross, file_name); - - ui->width [index] = cross_sprite_width (cross, ui->sprite [index]); - ui->height [index] = cross_sprite_height (cross, ui->sprite [index]); + ui->folder = allocate (limit * sizeof (* ui->folder)); + ui->sprite = allocate (limit * sizeof (* ui->sprite)); + ui->width = allocate (limit * sizeof (* ui->width)); + ui->height = allocate (limit * sizeof (* ui->height)); + ui->font = allocate (limit * sizeof (* ui->font)); + ui->monofont = allocate (limit * sizeof (* ui->monofont)); + ui->separator_size = allocate (limit * sizeof (* ui->separator_size)); + ui->icon_size = allocate (limit * sizeof (* ui->icon_size)); + ui->overicon_size = allocate (limit * sizeof (* ui->overicon_size)); + ui->ubericon_size = allocate (limit * sizeof (* ui->ubericon_size)); + ui->title_bar_size = allocate (limit * sizeof (* ui->title_bar_size)); + ui->fill_bar_size = allocate (limit * sizeof (* ui->fill_bar_size)); + ui->tiny_fill_bar_size = allocate (limit * sizeof (* ui->tiny_fill_bar_size)); + ui->scroll_bar_size = allocate (limit * sizeof (* ui->scroll_bar_size)); + + for (natural index = 0; index < limit; ++index) { + ui->sprite [index] = allocate (ui_subcount * sizeof (* * ui->sprite)); + ui->width [index] = allocate (ui_subcount * sizeof (* * ui->width)); + ui->height [index] = allocate (ui_subcount * sizeof (* * ui->height)); } - ui->separator_size = ui->height [ui_separator_middle]; - ui->icon_size = ui->height [ui_icon_frame]; - ui->overicon_size = ui->height [ui_overicon_frame]; - ui->ubericon_size = ui->height [ui_ubericon_frame]; - ui->title_bar_size = ui->height [ui_title_bar_middle]; - ui->fill_bar_size = ui->height [ui_fill_bar_middle]; - ui->scroll_bar_size = ui->width [ui_scroll_bar_middle]; - - print ("[/2Success/-] Initialized UI structure.\n"); + print ("/s Initialized UI structure.\n"); return (ui); } static ui_structure * ui_deinitialize (ui_structure * ui) { - ui->help_box_none = deallocate (ui->help_box_none); + for (natural index = 0; index < ui->limit; ++index) { + ui->sprite [index] = deallocate (ui->sprite [index]); + ui->width [index] = deallocate (ui->width [index]); + ui->height [index] = deallocate (ui->height [index]); - print ("[/2Success/-] Deinitialized UI information.\n"); + if (ui->folder [index] != null) { + ui->folder [index] = deallocate (ui->folder [index]); + } + } + + ui->folder = deallocate (ui->folder); + ui->sprite = deallocate (ui->sprite); + ui->width = deallocate (ui->width); + ui->height = deallocate (ui->height); + ui->font = deallocate (ui->font); + ui->monofont = deallocate (ui->monofont); + ui->separator_size = deallocate (ui->separator_size); + ui->icon_size = deallocate (ui->icon_size); + ui->overicon_size = deallocate (ui->overicon_size); + ui->ubericon_size = deallocate (ui->ubericon_size); + ui->title_bar_size = deallocate (ui->title_bar_size); + ui->fill_bar_size = deallocate (ui->fill_bar_size); + ui->tiny_fill_bar_size = deallocate (ui->tiny_fill_bar_size); + ui->scroll_bar_size = deallocate (ui->scroll_bar_size); + ui->help_box_none = deallocate (ui->help_box_none); + + print ("/s Deinitialized UI structure.\n"); return (deallocate (ui)); } -static s4 ui_offset_x (cross_structure * cross, ui_structure * ui) { - return (ui->camera_x - cross->window_width / 2); +static boolean ui_validate_dimensions (ui_structure * ui, ui_subtype_enumeration subtype) { + if (ui->width [ui->active] [subtype] != ui->height [ui->active] [subtype]) { + print ("/w Mismatching sizes for sprite '%s', in UI '%s'.\n", ui_subtype_file_name [subtype], ui->folder [ui->active]); + } } -static s4 ui_offset_y (cross_structure * cross, ui_structure * ui) { - return (ui->camera_y - cross->window_height / 2); +static boolean ui_validate_width_dimensions (ui_structure * ui, ui_subtype_enumeration begin, ui_subtype_enumeration end) { + for (ui_subtype_enumeration index = begin; index <= end; ++index) { + if (ui->width [ui->active] [index] != ui->width [ui->active] [begin]) { + print ("/w Mismatching width for sprite '%s', in UI '%s'.\n", ui_subtype_file_name [index], ui->folder [ui->active]); + } + } } -static u4 ui_side_panel (ui_structure * ui) { - return (ui->side_panel); /// MAKE IT WINDOW SIZE DEPENDENT? +static boolean ui_validate_height_dimensions (ui_structure * ui, ui_subtype_enumeration begin, ui_subtype_enumeration end) { + for (ui_subtype_enumeration index = begin; index <= end; ++index) { + if (ui->height [ui->active] [index] != ui->height [ui->active] [begin]) { + print ("/w Mismatching height for sprite '%s', in UI '%s'.\n", ui_subtype_file_name [index], ui->folder [ui->active]); + } + } } -static v0 ui_camera_upper (ui_structure * ui) { ui->freeview = true; ui->camera_y -= ui->camera_speed; } -static v0 ui_camera_lower (ui_structure * ui) { ui->freeview = true; ui->camera_y += ui->camera_speed; } -static v0 ui_camera_left (ui_structure * ui) { ui->freeview = true; ui->camera_x -= ui->camera_speed; } -static v0 ui_camera_right (ui_structure * ui) { ui->freeview = true; ui->camera_x += ui->camera_speed; } +static boolean ui_validate_grid_dimensions (ui_structure * ui, ui_subtype_enumeration begin, ui_subtype_enumeration end) { + for (ui_subtype_enumeration index = begin; index <= end; ++index) { + if ((ui->width [ui->active] [index] != ui->width [ui->active] [begin]) + || (ui->height [ui->active] [index] != ui->height [ui->active] [begin])) { + print ("/w Mismatching grid for sprite '%s', in UI '%s'.\n", ui_subtype_file_name [index], ui->folder [ui->active]); + } + } +} -static v0 ui_render (cross_structure * cross, ui_structure * ui, ui_subtype index, s4 x, s4 y) { - cross_render_sprite (cross, ui->sprite [index], x, y); +static procedure ui_configure (cross_structure * cross, ui_structure * ui, character * folder) { + if (ui->count >= ui->limit) { + print ("/w You are trying to configure more UIs than you set the limit to.\n"); + return; + } + + natural current = ui->active = ++ui->count - 1; + + if (cross->very_verbose_spam == true) { + print ("/c Importing UI sprites from '%s' at index %i...\n", folder, current); + } + + if (folder != null) { + ui->folder [current] = string_duplicate (folder); + } + + ui->font [current] = cross_font_import (cross, (folder == null) + ? configuration_format ("xui/regular") + : format ("%s/regular", folder), ' ', '~' + 0, 0); + + ui->monofont [current] = cross_font_import (cross, (folder == null) + ? configuration_format ("xui/monospace") + : format ("%s/monospace", folder), ' ', '~' + 1, 0); + + for (natural index = 0; index < ui_subcount; ++index) { + character * file_name = (folder == null) + ? configuration_format (format ("xui/%s", ui_subtype_file_name [index])) + : format ("%s/%s", folder, ui_subtype_file_name [index]); + + ui->sprite [current] [index] = cross_sprite_import (cross, file_name); + + ui->width [current] [index] = cross_sprite_width (cross, ui->sprite [current] [index]); + ui->height [current] [index] = cross_sprite_height (cross, ui->sprite [current] [index]); + + if ((ui->width [current] [index] == 0) || (ui->height [current] [index] == 0)) { + print ("/f UI sprite '%s' has width or height zero.\n", file_name); + exit (log_failure); + } + } + + ui_validate_dimensions (ui, ui_cursor); + ui_validate_dimensions (ui, ui_icon_frame); + ui_validate_dimensions (ui, ui_overicon_frame); + ui_validate_dimensions (ui, ui_ubericon_frame); + + ui_validate_grid_dimensions (ui, ui_status_left, ui_status_lower_right); + ui_validate_grid_dimensions (ui, ui_menu_left, ui_menu_lower_right); + ui_validate_grid_dimensions (ui, ui_button_left, ui_button_lower_right); + + ui_validate_width_dimensions (ui, ui_scroll_bar_lower, ui_scroll_bar_slider); + + ui_validate_height_dimensions (ui, ui_fill_bar_left, ui_fill_bar_base); + ui_validate_height_dimensions (ui, ui_tiny_fill_bar_left, ui_tiny_fill_bar_base); + ui_validate_height_dimensions (ui, ui_separator_left, ui_separator_center); + ui_validate_height_dimensions (ui, ui_title_bar_left, ui_title_bar_right); + + ui->separator_size [current] = ui->height [current] [ui_separator_middle]; + ui->icon_size [current] = ui->height [current] [ui_icon_frame]; + ui->overicon_size [current] = ui->height [current] [ui_overicon_frame]; + ui->ubericon_size [current] = ui->height [current] [ui_ubericon_frame]; + ui->title_bar_size [current] = ui->height [current] [ui_title_bar_middle]; + ui->fill_bar_size [current] = ui->height [current] [ui_fill_bar_middle]; + ui->tiny_fill_bar_size [current] = ui->height [current] [ui_tiny_fill_bar_middle]; + ui->scroll_bar_size [current] = ui->width [current] [ui_scroll_bar_middle]; + + if (cross->very_verbose_spam == true) { + print ("/c Imported UI sprites from '%s' at index %i.\n", folder, ui->count); + } +} + +static procedure ui_render (cross_structure * cross, ui_structure * ui, ui_subtype_enumeration index, integer x, integer y) { + cross_render_sprite (cross, ui->sprite [ui->active] [index], x, y); } -static v0 ui_render_colour (cross_structure * cross, ui_structure * ui, ui_subtype index, u4 colour, s4 x, s4 y) { - cross_render_sprite_colour (cross, ui->sprite [index], colour, x, y); +static procedure ui_render_colour (cross_structure * cross, ui_structure * ui, ui_subtype_enumeration index, natural colour, integer x, integer y) { + cross_render_sprite_colour (cross, ui->sprite [ui->active] [index], colour, x, y); } -static v0 ui_subrender (cross_structure * cross, ui_structure * ui, ui_subtype index, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height) { - cross_render_sprite_crop (cross, ui->sprite [index], x, y, u, v, width, height); +static procedure ui_subrender (cross_structure * cross, ui_structure * ui, ui_subtype_enumeration index, integer x, integer y, natural u, natural v, + natural width, natural height) { + cross_render_sprite_crop (cross, ui->sprite [ui->active] [index], x, y, u, v, width, height); } -static v0 ui_subrender_colour (cross_structure * cross, ui_structure * ui, ui_subtype index, u4 colour, s4 x, s4 y, u4 u, u4 v, u4 width, u4 height) { - cross_render_sprite_crop_colour (cross, ui->sprite [index], colour, x, y, u, v, width, height); +static procedure ui_subrender_colour (cross_structure * cross, ui_structure * ui, ui_subtype_enumeration index, natural colour, integer x, integer y, + natural u, natural v, natural width, natural height) { + cross_render_sprite_crop_colour (cross, ui->sprite [ui->active] [index], colour, x, y, u, v, width, height); } -static v0 ui_render_horizontal (cross_structure * cross, ui_structure * ui, ui_subtype index, s4 x, s4 y, u4 width) { - s4 entire = (width / ui->width [index]) * ui->width [index]; +static procedure ui_render_horizontal (cross_structure * cross, ui_structure * ui, ui_subtype_enumeration index, integer x, integer y, natural width) { + integer entire = (width / ui->width [ui->active] [index]) * ui->width [ui->active] [index]; - for (u4 margin = 0; margin < width / ui->width [index]; ++margin) { - ui_render (cross, ui, index, x + margin * ui->width [index], y); + for (natural margin = 0; margin < width / ui->width [ui->active] [index]; ++margin) { + ui_render (cross, ui, index, x + margin * ui->width [ui->active] [index], y); } - if (width % ui->width [index] > 0) { - ui_subrender (cross, ui, index, x + entire, y, 0, 0, width % ui->width [index], ui->height [index]); + if (width % ui->width [ui->active] [index] > 0) { + ui_subrender (cross, ui, index, x + entire, y, 0, 0, width % ui->width [ui->active] [index], ui->height [ui->active] [index]); } } -static v0 ui_render_horizontal_colour (cross_structure * cross, ui_structure * ui, ui_subtype index, u4 colour, s4 x, s4 y, u4 width) { - s4 entire = (width / ui->width [index]) * ui->width [index]; +static procedure ui_render_horizontal_colour (cross_structure * cross, ui_structure * ui, ui_subtype_enumeration index, natural colour, + integer x, integer y, natural width) { + //~natural width_divisor = width / ui->width [ui->active] [index]; + //~natural width_remainder = width % ui->width [ui->active] [index]; + + //~for (natural offset = 0; offset < width_divisor; ++offset) { + //~ui_render_colour (cross, ui, index, colour, x + offset * ui->width [ui->active] [index], y); + //~} + + //~if (width_remainder > 0) { + //~ui_subrender_colour (cross, ui, index, colour, x + width - width_remainder, y, 0, 0, width_remainder, ui->height [ui->active] [index]); + //~} + integer entire = (width / ui->width [ui->active] [index]) * ui->width [ui->active] [index]; - for (u4 margin = 0; margin < width / ui->width [index]; ++margin) { - ui_render_colour (cross, ui, index, colour, x + margin * ui->width [index], y); + for (natural margin = 0; margin < width / ui->width [ui->active] [index]; ++margin) { + ui_render (cross, ui, index, x + margin * ui->width [ui->active] [index], y); } - if (width % ui->width [index] > 0) { - ui_subrender_colour (cross, ui, index, colour, x + entire, y, 0, 0, width % ui->width [index], ui->height [index]); + if (width % ui->width [ui->active] [index] > 0) { + ui_subrender (cross, ui, index, x + entire, y, 0, 0, width % ui->width [ui->active] [index], ui->height [ui->active] [index]); } } -static v0 ui_render_vertical (cross_structure * cross, ui_structure * ui, ui_subtype index, s4 x, s4 y, u4 height) { - s4 entire = (height / ui->height [index]) * ui->height [index]; +static procedure ui_render_vertical (cross_structure * cross, ui_structure * ui, ui_subtype_enumeration index, integer x, integer y, natural height) { + integer entire = (height / ui->height [ui->active] [index]) * ui->height [ui->active] [index]; - for (u4 margin = 0; margin < height / ui->height [index]; ++margin) { - ui_render (cross, ui, index, x, y + margin * ui->height [index]); + for (natural margin = 0; margin < height / ui->height [ui->active] [index]; ++margin) { + ui_render (cross, ui, index, x, y + margin * ui->height [ui->active] [index]); } - if (height % ui->height [index] > 0) { - ui_subrender (cross, ui, index, x, y + entire, 0, 0, ui->width [index], height % ui->height [index]); + if (height % ui->height [ui->active] [index] > 0) { + ui_subrender (cross, ui, index, x, y + entire, 0, 0, ui->width [ui->active] [index], height % ui->height [ui->active] [index]); } } -static v0 ui_render_background (cross_structure * cross, ui_structure * ui, ui_subtype index, s4 x, s4 y, u4 width, u4 height) { - u4 offset_x = (width / ui->width [index]) * ui->width [index]; - u4 offset_y = (height / ui->height [index]) * ui->height [index]; +static procedure ui_render_background (cross_structure * cross, ui_structure * ui, ui_subtype_enumeration index, integer x, integer y, natural width, natural height) { + natural offset_x = (width / ui->width [ui->active] [index]) * ui->width [ui->active] [index]; + natural offset_y = (height / ui->height [ui->active] [index]) * ui->height [ui->active] [index]; - u4 cutoff_x = width % ui->width [index]; - u4 cutoff_y = height % ui->height [index]; + natural cutoff_x = width % ui->width [ui->active] [index]; + natural cutoff_y = height % ui->height [ui->active] [index]; - for (u4 vertical = 0; vertical < height / ui->height [index]; ++vertical) { - for (u4 horizontal = 0; horizontal < width / ui->width [index]; ++horizontal) { - ui_render (cross, ui, index, x + horizontal * ui->width [index], y + vertical * ui->height [index]); + for (natural vertical = 0; vertical < height / ui->height [ui->active] [index]; ++vertical) { + for (natural horizontal = 0; horizontal < width / ui->width [ui->active] [index]; ++horizontal) { + ui_render (cross, ui, index, x + horizontal * ui->width [ui->active] [index], y + vertical * ui->height [ui->active] [index]); } - if (width % ui->width [index] > 0) { - ui_subrender (cross, ui, index, x + offset_x, y + vertical * ui->height [index], 0, 0, cutoff_x, ui->height [index]); + if (width % ui->width [ui->active] [index] > 0) { + ui_subrender (cross, ui, index, x + offset_x, y + vertical * ui->height [ui->active] [index], 0, 0, cutoff_x, ui->height [ui->active] [index]); } } - for (u4 horizontal = 0; horizontal < width / ui->width [index]; ++horizontal) { - ui_subrender (cross, ui, index, x + horizontal * ui->width [index], y + offset_y, 0, 0, ui->width [index], cutoff_y); + for (natural horizontal = 0; horizontal < width / ui->width [ui->active] [index]; ++horizontal) { + ui_subrender (cross, ui, index, x + horizontal * ui->width [ui->active] [index], y + offset_y, 0, 0, ui->width [ui->active] [index], cutoff_y); } - if (width % ui->width [index] > 0) { + if (width % ui->width [ui->active] [index] > 0) { ui_subrender (cross, ui, index, x + offset_x, y + offset_y, 0, 0, cutoff_x, cutoff_y); } } -static v0 ui_screen_overlay (cross_structure * cross) { - cross_render_rectangle_vertical_gradient (cross, 0, 0, cross->window_width, cross->window_height / 2, 0xcc, 0x00); - cross_render_rectangle_vertical_gradient (cross, 0, cross->window_height / 2, cross->window_width, cross->window_height / 2, 0x00, 0xcc); +static procedure ui_screen_overlay (cross_structure * cross, natural colour) { + cross_render_rectangle (cross, 0, 0, cross->window_width, cross->window_height, colour); } -static v0 ui_render_grid (cross_structure * cross, ui_structure * ui, ui_type element, s4 x, s4 y, u4 width, u4 height, u4 margin, b4 background) { - u4 upper_length = width - ui->width [element + 4] - ui->width [element + 5]; - u4 lower_length = width - ui->width [element + 6] - ui->width [element + 7]; - u4 left_length = height - ui->height [element + 4] - ui->height [element + 6]; - u4 right_length = height - ui->height [element + 5] - ui->height [element + 7]; +static procedure ui_render_grid (cross_structure * cross, ui_structure * ui, ui_type_enumeration element, integer x, integer y, natural width, + natural height, boolean background) { + if ((width < ui->width [ui->active] [element + 4] + ui->width [ui->active] [element + 5] + ui->width [ui->active] [element + 2]) || + (height < ui->height [ui->active] [element + 4] + ui->height [ui->active] [element + 6] + ui->height [ui->active] [element + 0])) { + return; + } - s4 upper_offset_x = ui->width [element + 4]; - s4 lower_offset_x = ui->width [element + 6]; - s4 lower_offset_y = height - ui->height [element + 3]; + natural upper_length = width - ui->width [ui->active] [element + 4] - ui->width [ui->active] [element + 5]; + natural lower_length = width - ui->width [ui->active] [element + 6] - ui->width [ui->active] [element + 7]; + natural left_length = height - ui->height [ui->active] [element + 4] - ui->height [ui->active] [element + 6]; + natural right_length = height - ui->height [ui->active] [element + 5] - ui->height [ui->active] [element + 7]; - s4 right_offset_x = width - ui->width [element + 1]; - s4 left_offset_y = ui->height [element + 4]; - s4 right_offset_y = ui->height [element + 5]; + integer upper_offset_x = ui->width [ui->active] [element + 4]; + integer lower_offset_x = ui->width [ui->active] [element + 6]; + integer lower_offset_y = height - ui->height [ui->active] [element + 3]; - s4 upper_right_offset_x = width - ui->width [element + 5]; - s4 lower_right_offset_x = width - ui->width [element + 7]; - s4 lower_left_offset_y = height - ui->height [element + 6]; - s4 lower_right_offset_y = height - ui->height [element + 7]; + integer right_offset_x = width - ui->width [ui->active] [element + 1]; + integer left_offset_y = ui->height [ui->active] [element + 4]; + integer right_offset_y = ui->height [ui->active] [element + 5]; - if ((background == true) && (width > 2 * margin) && (height > 2 * margin)) { - ui_render_background (cross, ui, element + 8, x + margin, y + margin, width - 2 * margin, height - 2 * margin); - } + integer upper_right_offset_x = width - ui->width [ui->active] [element + 5]; + integer lower_right_offset_x = width - ui->width [ui->active] [element + 7]; + integer lower_left_offset_y = height - ui->height [ui->active] [element + 6]; + integer lower_right_offset_y = height - ui->height [ui->active] [element + 7]; ui_render_vertical (cross, ui, element + 0, x, y + left_offset_y, left_length); ui_render_vertical (cross, ui, element + 1, x + right_offset_x, y + right_offset_y, right_length); @@ -275,31 +395,35 @@ static v0 ui_render_grid (cross_structure * cross, ui_structure * ui, ui_type el ui_render (cross, ui, element + 5, x + upper_right_offset_x, y); ui_render (cross, ui, element + 6, x, y + lower_left_offset_y); ui_render (cross, ui, element + 7, x + lower_right_offset_x, y + lower_right_offset_y); + + if (background == true) { + ui_render_background (cross, ui, element + 8, x + upper_offset_x, y + left_offset_y, upper_length, left_length); + } } -static v0 ui_render_window (cross_structure * cross, ui_structure * ui, s4 x, s4 y, u4 width, u4 height) { - ui_render_grid (cross, ui, ui_window, x, y, width, height, 0, false); +static procedure ui_render_window (cross_structure * cross, ui_structure * ui, integer x, integer y, natural width, natural height) { + ui_render_grid (cross, ui, ui_window, x, y, width, height, false); } -static v0 ui_render_frame (cross_structure * cross, ui_structure * ui, s4 x, s4 y, u4 width, u4 height) { - ui_render_grid (cross, ui, ui_frame, x, y, width, height, 0, false); +static procedure ui_render_frame (cross_structure * cross, ui_structure * ui, integer x, integer y, natural width, natural height) { + ui_render_grid (cross, ui, ui_frame, x, y, width, height, false); } -static v0 ui_render_status (cross_structure * cross, ui_structure * ui, s4 x, s4 y, u4 width, u4 height) { - ui_render_grid (cross, ui, ui_status, x, y, width, height, 16, true); +static procedure ui_render_status (cross_structure * cross, ui_structure * ui, integer x, integer y, natural width, natural height) { + ui_render_grid (cross, ui, ui_status, x, y, width, height, true); } -static v0 ui_render_menu (cross_structure * cross, ui_structure * ui, s4 x, s4 y, u4 width, u4 height) { - ui_render_grid (cross, ui, ui_menu, x, y, width, height, 24, true); +static procedure ui_render_menu (cross_structure * cross, ui_structure * ui, integer x, integer y, natural width, natural height) { + ui_render_grid (cross, ui, ui_menu, x, y, width, height, true); } -static v0 ui_render_button (cross_structure * cross, ui_structure * ui, s4 x, s4 y, u4 width, u4 height) { - ui_render_grid (cross, ui, ui_button, x, y, width, height, 16, true); +static procedure ui_render_button (cross_structure * cross, ui_structure * ui, integer x, integer y, natural width, natural height) { + ui_render_grid (cross, ui, ui_button, x, y, width, height, true); } -static v0 ui_render_separator (cross_structure * cross, ui_structure * ui, s4 x, s4 y, u4 width) { - u4 margin = ui->width [ui_separator_left]; - u4 length = width - margin - ui->width [ui_separator_right]; +static procedure ui_render_separator (cross_structure * cross, ui_structure * ui, integer x, integer y, natural width) { + natural margin = ui->width [ui->active] [ui_separator_left]; + natural length = width - margin - ui->width [ui->active] [ui_separator_right]; ui_render (cross, ui, ui_separator_left, x, y); @@ -307,12 +431,12 @@ static v0 ui_render_separator (cross_structure * cross, ui_structure * ui, s4 x, ui_render (cross, ui, ui_separator_right, x + margin + length, y); - ui_render (cross, ui, ui_separator_center, x + (width - ui->width [ui_separator_center]) / 2, y); + ui_render (cross, ui, ui_separator_center, x + (width - ui->width [ui->active] [ui_separator_center]) / 2, y); } -static v0 ui_render_title_bar (cross_structure * cross, ui_structure * ui, c1 * title, s4 x, s4 y, u4 width) { - u4 margin = ui->width [ui_title_bar_left]; - u4 length = width - margin - ui->width [ui_title_bar_right]; +static procedure ui_render_title_bar (cross_structure * cross, ui_structure * ui, character * title, integer x, integer y, natural width) { + natural margin = ui->width [ui->active] [ui_title_bar_left]; + natural length = width - margin - ui->width [ui->active] [ui_title_bar_right]; ui_render (cross, ui, ui_title_bar_left, x, y); @@ -320,18 +444,21 @@ static v0 ui_render_title_bar (cross_structure * cross, ui_structure * ui, c1 * ui_render (cross, ui, ui_title_bar_right, x + margin + length, y); - cross_render_string (cross, title, ui->font, x + margin + 8, y + 8, 1, 0x112233ff); + cross_render_string (cross, title, ui->font [ui->active], x + margin + 8, y + 8, 1, 0x112233ff); } -static v0 ui_render_icon_and_text (cross_structure * cross, ui_structure * ui, c1 * title, u4 icon, s4 x, s4 y) { +static procedure ui_render_icon_and_text (cross_structure * cross, ui_structure * ui, character * title, natural icon, integer x, integer y, + natural colour) { cross_render_sprite (cross, icon, x, y); - - cross_render_string (cross, title, ui->font, x - 2 + ui->icon_size, y + 2, 1, 0x112233ffu); +////////////////////////////////////////// + cross_render_string (cross, title, ui->font [ui->active], x - 2 + ui->icon_size [ui->active], y + 2, 1.0f, colour); } -static v0 ui_render_scroll_bar (cross_structure * cross, ui_structure * ui, f4 slider, s4 x, s4 y, u4 height) { - u4 margin = ui->height [ui_scroll_bar_upper]; - u4 length = height - margin - ui->height [ui_scroll_bar_lower]; +static procedure ui_render_scroll_bar (cross_structure * cross, ui_structure * ui, real slider, integer x, integer y, natural height) { + natural margin = ui->height [ui->active] [ui_scroll_bar_upper]; + natural length = height - margin - ui->height [ui->active] [ui_scroll_bar_lower]; + + real slider_offset = slider * (real) (length - ui->height [ui->active] [ui_scroll_bar_slider]); ui_render (cross, ui, ui_scroll_bar_upper, x, y); @@ -339,12 +466,12 @@ static v0 ui_render_scroll_bar (cross_structure * cross, ui_structure * ui, f4 s ui_render (cross, ui, ui_scroll_bar_lower, x, y + margin + length); - ui_render (cross, ui, ui_scroll_bar_slider, x, y + margin + (u4) (slider * (float) (length - ui->height [ui_scroll_bar_slider]))); + ui_render (cross, ui, ui_scroll_bar_slider, x, y + margin + (natural) slider_offset); } -static v0 ui_render_fill_bar (cross_structure * cross, ui_structure * ui, f4 fill, u4 colour, s4 x, s4 y, u4 width) { - u4 margin = ui->width [ui_fill_bar_left]; - u4 length = width - margin - ui->width [ui_fill_bar_right]; +static procedure ui_render_fill_bar (cross_structure * cross, ui_structure * ui, real fill, natural colour, integer x, integer y, natural width) { + natural margin = ui->width [ui->active] [ui_fill_bar_left]; + natural length = width - margin - ui->width [ui->active] [ui_fill_bar_right]; ui_render (cross, ui, ui_fill_bar_left, x, y); @@ -352,41 +479,42 @@ static v0 ui_render_fill_bar (cross_structure * cross, ui_structure * ui, f4 fil ui_render (cross, ui, ui_fill_bar_right, x + margin + length, y); - ui_render_horizontal_colour (cross, ui, ui_fill_bar_base, colour, x + margin, y, (u4) (fill * (float) length)); + ui_render_horizontal_colour (cross, ui, ui_fill_bar_base, colour, x + margin, y, (natural) (fill * (real) length)); } -static v0 ui_render_icon (cross_structure * cross, ui_structure * ui, u4 icon, s4 x, s4 y) { - cross_render_sprite (cross, ui->sprite [ui_icon_frame], x, y); +static procedure ui_render_icon (cross_structure * cross, ui_structure * ui, natural icon, integer x, integer y) { + cross_render_sprite (cross, ui->sprite [ui->active] [ui_icon_frame], x, y); if (icon != ui->ignore) { cross_render_sprite (cross, icon, x, y); } } -static v0 ui_render_overicon (cross_structure * cross, ui_structure * ui, u4 icon, s4 x, s4 y) { +static procedure ui_render_overicon (cross_structure * cross, ui_structure * ui, natural icon, integer x, integer y) { if (icon != ui->ignore) { cross_render_sprite (cross, icon, x, y); } - cross_render_sprite (cross, ui->sprite [ui_overicon_frame], x, y); + cross_render_sprite (cross, ui->sprite [ui->active] [ui_overicon_frame], x, y); } -static v0 ui_render_ubericon (cross_structure * cross, ui_structure * ui, u4 icon, s4 x, s4 y) { - cross_render_sprite (cross, ui->sprite [ui_ubericon_frame], x, y); +static procedure ui_render_ubericon (cross_structure * cross, ui_structure * ui, natural icon, integer x, integer y, natural offset) { + cross_render_sprite (cross, ui->sprite [ui->active] [ui_ubericon_frame], x, y); if (icon != ui->ignore) { - cross_render_sprite (cross, icon, x + 16, y + 16); + cross_render_sprite (cross, icon, x + offset, y + offset); } } -static v0 ui_render_menu_full (cross_structure * cross, ui_structure * ui, c1 * title, s4 x, s4 y, u4 width, u4 height) { - u4 margin = 24; - - ui_screen_overlay (cross); +static procedure ui_render_menu_full (cross_structure * cross, ui_structure * ui, character * title, integer x, integer y, natural width, + natural height, natural overlay_colour, natural margin) { + if (overlay_colour != 0x00000000u) { + ui_screen_overlay (cross, overlay_colour); + } ui_render_menu (cross, ui, x, y, width, height); if (title != null) { - ui_render_title_bar (cross, ui, format ("<%s>", title), x + margin, y + margin / 2 - ui->title_bar_size, width - 2 * margin); + ui_render_title_bar (cross, ui, title, x + margin, y + margin / 2 - ui->title_bar_size [ui->active], width - 2 * margin); } } diff --git a/xui/button_left.png b/xui/button_left.png new file mode 100755 index 0000000000000000000000000000000000000000..9b460c64949ad46f9052afcbbda9a58f3be471ed GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{D5&b` z;us=vIXNUK=-2usOO7l6;tlEN<=9l)s(DT{bT%?b$Z;{m{AVqlwSK-NPy>UftDnm{ Hr-UW|+a@2L literal 0 HcmV?d00001 diff --git a/xui/button_lower.png b/xui/button_lower.png new file mode 100755 index 0000000000000000000000000000000000000000..ac26ead93cebeee975a87adac72a88400a4af686 GIT binary patch literal 116 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{D5&P? z;us=vIk_Y->Bsp7b^}8JhAG+!JC84DiEr%g=4KRrcXzQ5BZJ*-j@r*Qt2=-?7(8A5 KT-G@yGywp%t{)o! literal 0 HcmV?d00001 diff --git a/xui/button_lower_left.png b/xui/button_lower_left.png new file mode 100755 index 0000000000000000000000000000000000000000..e4e42f1c881d3134c93b31bc60f6b662d5cd163b GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{C}{2J z;us=vd1>!P-U9|ahi5FB{y}X1+vqP|yVzKJ_?~JAUJBaYX9XOb49+&d1Q+LQy|8i2+yc)I$ztaD0e0sy=vEg1j+ literal 0 HcmV?d00001 diff --git a/xui/button_lower_right.png b/xui/button_lower_right.png new file mode 100755 index 0000000000000000000000000000000000000000..67b09868cfa884e49b080d4ba6d407554cc9ca5f GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{C}`#B z;us=vIk_Y->Bsp7mUo64h8miVALiLsOU#hqU^peZ;ZAbEq4fuj9%Xg@aBpw5hnhm+ f2F*h&8Q2&!c?37+Oq*Q=G=;&_)z4*}Q$iB}$}%U$ literal 0 HcmV?d00001 diff --git a/xui/button_middle.png b/xui/button_middle.png new file mode 100755 index 0000000000000000000000000000000000000000..58f49edbec231232426f1767f70b22798a17ade6 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{C@ALX t;us=vIk_Y->Bsp7b^}8JhQrQ`3?;uAORaexJprm<@O1TaS?83{1OUSL7jXap literal 0 HcmV?d00001 diff --git a/xui/button_right.png b/xui/button_right.png new file mode 100755 index 0000000000000000000000000000000000000000..44aafbc20dcaa285d28dc2588267fe352c310c4d GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{D5&J= z;us=vIk_Y->Bsp7mUo64h8miVALiLsOU#hqXn42~sCYMPY0!nI|ADF*JYD@<);T3K F0RT4#9h(3E literal 0 HcmV?d00001 diff --git a/xui/button_upper.png b/xui/button_upper.png new file mode 100755 index 0000000000000000000000000000000000000000..7a76ea43cac6e6eaa91e9e262d6633e373edd0df GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{D5&n~ z;us=vIXNUK=-2rM_6<9B>@au`TJZj!EtjZ<;e+r4M;sUe)-fgTe~DWM4f6w)9W literal 0 HcmV?d00001 diff --git a/xui/button_upper_left.png b/xui/button_upper_left.png new file mode 100755 index 0000000000000000000000000000000000000000..82f470713fc807ba5b2562c232799a9742162744 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{C}{5K z;us=vdFdHLUIqn$0|%S}g8mD|osMqoZF!iu;PX=7xiL}%fgs|}21xR_kt|M@6ft2<0i4{Ht zD`eqz!%D@r4z0WJIBbN!Wz^7+1@DgH$FUC+3 z;sLivh!>od5KlNGA>MGUg!}@ok*I)qKYvDZvLD-9b4<+FD=0{pdi4dFmA8-3OQICM zx(%%o8u;dqh?UU7cYnoN2?l<67?nz}@S@}RNCM#DMHSJJM9Mr|Rg!H^@R9M5sm)#YDFbqb&xB)A41s#DETmeVW5nMq=a0W)e6*7Vy z0UwYb6=?gV=a{#`fqQ9blK_Tr1v*!t!#~0m=-LY1^K6q47Jfeh>ico&fI|(aPk*0S z;X|+zk^^p$kX&$9LUO_xiJb+m9%%IUdZR#F_0O7SAOx=;(-)VHn+dVNueW}DIq?!= zfx9Z$VxEq)q^Nif`xA$#jz6eqc{~FOhz#hLo#CEQRz4&0r2psiYO$Z zo`)xuWNQ+O+c6TJT$IL0q`;}Nd`lt~PB$h?5)9nbn$0CxI4v-ja0L&~(ji;h^B15R VR)t6;6iWaA002ovPDHLkV1oKskr4m@ literal 0 HcmV?d00001 diff --git a/xui/cursor.png b/xui/cursor.png new file mode 100755 index 0000000000000000000000000000000000000000..954f14147bd57f8790e4547a9db125c431491962 GIT binary patch literal 396 zcmV;70dxL|P)AsvCC7$IGO5iToug^rN^ z;7}Zbagv@TR7I8F2l&|-^svI0L2oe9e+~d3{*-k$9tl>Cd&LIFjtbC0i==%_-?Q)*BI?2?)Tu7fTi=fc);yixQ4yslz@Bj zQP{h7e7?&17eI|V5T7rA5CX&)Rfv^}s9KQ-i0JwWT1ZcPo(dr64D&Pwm?{!*a|(Aw zE3OT`)=7q6LkmH_7nde&Z(|j5X!{n@HjxC7Af`9q+Js(*YB?2RHP36}QlF>~P8|`M q&OJapr*7;}gWl24zHU5+e}4cb$?b1BRX_g#0000e9bsPJlKGPje&uIyJOd4AjMc5D48sqX>N8jv7z*5f w9=|cO@m7`p-Up}Wc{n&IELvx2>mygrAZ^7a>2dBf&`}Hwp00i_>zopr0OprI8~^|S delta 115 zcmaFO*vvRVJV%0qje&vTLAmV@AjMhW5n0T@F!K}$Gd`ZULgnPb;&D7VL4tL0 zL(qX4WzWvkM@1b_TCv0>Sl-~GRfn6d#MXo>Ol)k^zJGt$D>h?s!USdpAtg3RQQdt( QKm!;&UHx3vIVCg!0I{4WH2?qr diff --git a/xui/dwarf/fill_bar_left.png b/xui/dwarf/fill_bar_left.png index 87232883816139279d35965c7b13c1cb4e7ade93..f44f66407bb46fcb5ae4efb1ed643b808167953b 100755 GIT binary patch delta 102 zcmdnVHkEyXiW_5bkh>G(&67Iy3=9k`>5jgR3=A9lx&I`x0{IHb9znhg3{`3j3=J&| z48MRv4KElNN(~qoUL`OvSj}Ky5HFasE6`@5qPQRfdx@v7EBi|}ZhmHUg{8*#HkvUr F0|0bC8lnII delta 29 icmbQrzLRZ&iV$akM`SSrgPt-7Ggd6MFWWeYnHd0Y!3S*s diff --git a/xui/dwarf/fill_bar_middle.png b/xui/dwarf/fill_bar_middle.png index 76ef017e8fd7f76438e3349af3394fd7fffb7d3e..e666d76da64ee4850507a4374828427a33eac8b9 100755 GIT binary patch delta 223 zcmbQk*u*qJJlKGPje&uIyJOd4AjMc5Eaj?aro`kjl2y8JT4cxQzk_p)UFUae{e}0tJ#8L=KrR8`<0GvVgai4 zjN118a!R6R?EIOFfcOB=e%+4%9E6T3LhAr_9#D8 UT&1G|)W_iI>gTe~DS@#G0QBQa-T(jq delta 141 zcmZo-n!`9jyk3HXje&vTLAmV@AjMhW5n0T@F!K}$Gd`ZULz@;j|==^ z1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF*m;eA5aGbhPJdq(7e+P6) zO+^Rk1`7`a6{j=wnE(I*1xZ9fR7l6|l)H@sF$_d!eQH20u!T)8WDC9$SjUB~K_$2b zw&2tuTiDc@FS-5eL+2tOKp-$r(r6^0SFc{Zdi7dsAforNX=Z~L5JcqEOewv+kU>OF zJ0K#Ylw3O*m^lmZLb4vr01qSpe*iP@nyR|YMWpJsM z)^WmCtmAzTc>FXWm)Uil2zaD*0MPLcGpima@4;jXq~*yOFbWXK{g^^)nw3D=t1~FR!@xrOjTn r!~hVE#(7t+0{-Lb`cz8*_qYBBS(xf0F{Qd200000NkvXXu0mjfPokjB delta 314 zcmV-A0mc5W1IPl97k?NC1^@s6^PqhU00009a7bBm005cF005cF0ppRRA^-pY`bk7V zR5;6(l)DiEF$_f4;0D}+TDX)@EkFsXgOD0r0yU@wQbM(GDH$Z(aUXw#XEfvS%s$)e zl>-sIu^DC-;2cpzc8fXZw-*vbWOo80LeANBlEBPGfEN-<9)C;#4X=UYf1^{6G5LN@cPwlu%cL1=X9=K;dZ8NTQ|ks z9Q4G^BznYEfHPNIZD+5z`lU@?^uz!Vx5jyQZUVk>b$zNefcsnj08@bKBkm$kt^fc4 M07*qoM6N<$f|#L)*8l(j diff --git a/xui/dwarf/monospace.png b/xui/dwarf/monospace.png new file mode 100755 index 0000000000000000000000000000000000000000..074f192aef028bad1c66491c76b85a69ad85dc71 GIT binary patch literal 6376 zcmeHLdpy(a``_fSbfhRGYp8|U!OXUtViQH=^f)D-ZJ)82u`R}uQcv;-KaomBMX5|V z6KYAq^euWsQtIi^QFzip%9HPBqtoyAeZ79KUccY-U)$^6ecji6ectzVy|3%OW>P%X zubHE+s}6&~=D0Z1JfXQ98es@k=+g&#b{RBvfPOA)7Z(#40$M}B@RLw$$%8K*njn%4ki$t?CsMQDOA9+t-8=u> z)=)oID^^3iCHyWqxA@re>O*UU5lQi zI9_EOPuovo)4dGymZzW2T|e${jk*7|c4$cu_%HG3B2~c$8KH-hj@&^vTb+bZ@yYhs zorW%6 zmT}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q6B@IN^3zWLVq5OqnCDE)I{aQVzVKD7 zne@VP<;t$1Kbj2DgP|vHc1{NN74OG%*3?p34xeXoV2w(FJGwgE870oGueqHows(6u zJ*n0AJ+)Z9WgE}y zdhYFK`n6~<^_d|fQ^V{pGvqj8X@>6uW4%&+9oHDuWvRCUhx2bUat`e$|2Fs9-jv$+ zoGqAu{EufrT1`J|<;7*5SN?d{f2mxy6F<|b&hq}&fmS2KOnA{#F|j@2D&~ns`$VhO zYBkh}EgNTTSej^;db@o%aTY{J(m=qToMU#Ik8eM8x%+xP^aT!cp|7W%a|lWLH`&mk AiU0rr literal 0 HcmV?d00001 diff --git a/xui/dwarf/regular.png b/xui/dwarf/regular.png new file mode 100755 index 0000000000000000000000000000000000000000..0e5bfe7e285393030848adc8626d3743c903644f GIT binary patch literal 9327 zcmeHsc{r5q`}dgaOAU%58Doo#F=L&vGxjC2M5)YXjGY<#E|rok3dxcsYm{td4~2TN zlO-flgpvs1cT>;yd%wr=9?$W<-~XPO zaB%_jF3;}8N5`-?UI%FYUvv^cAOFR(D}$s1gE)Y3R~-tV4+3Kma8a)O)YSmcyD#Rw z_YVmW=qxb%ebh5BF@vI{kuuVpf(iW@(Hei0rz6gQ#7Yscf~&~BXn{;GB>{%*`o z1qU4q;S90Zg4?F+TF(eKzw(gp+mU_?T;^q@ZgirCD6!CR9VyKSW(KPyv&%8Z?_(r* zPE`mlO&+KXxoXGy*wB93MuUNmICNl}sj;?l*&^}$DVhDWMx|HJk3(KF@X0@4SM#~^ zjAb&Ev2^8D<0&Qwb%V0Xigr$!2OM^G)pDc*HDh#_Guele&UKu$XrB#Vlij!{B|~Fd zDfO?HU-R4ma3pYZ&G=EH;B79iDw~xK2ne+QEXC4>W@BQE zA-KCrcM`qhkD2VSBh3fZkn3z@U39G-p+q4Nyng z?p`FQoV1*@3|z;L;)8;zu|ie6hz^)jSlwR`z)Th9NTYdR5C~siUuj=iX?HI&0*OYW z5i%$Q3Izu^;8cG%8qN>yMit(L_=$lf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ea~ z6!aqSU4)fdK4BM`7OZPA5aWI3S(Cg*gbgUp$&((qk*kW@4%5n%Kq6DXIbG(k0|q(X z+8>ABh2i5xFL#y2l2wV>nK2^H?H54e7O}OD{dwqa$6y}fRn90Tg`A5mu$|~oaeiEM zezW9?@yesS#PA=f%qd{uA>Qso?|PgCIZur2P~HijaSV1#@J4rH)oTrTJndQUP-Blu zq_nr?;Ol%j#iBzhmxk1Yr*h=Kxb-#5mcsGQ(HdeJw|T&=-4do9HEmW$G!LvB}=YinS!tSSkfh3?aB?SV1F(T6-!y9gP<<>x}8Y=gOoR_8rfA;-eqT($px|I z@CJ=e!+i{)^mc;-N3GPd+cu|P9rT0d1zU|+2@Rh%PPu;}x>0)mGw_H@PRc}E&5k|QnP+amR7kWl%^UJaoF&LXW%yE{g(lYX?O@O+_@gj%h-Qqh_N&itW}raAOq#R586Ka26t<`=_6zoUT+bWE|OTJ{nD15yS_UjP6A literal 0 HcmV?d00001 diff --git a/xui/dwarf/scroll_bar_slider.png b/xui/dwarf/scroll_bar_slider.png index c54c9be29b8d7607c705a4c6ca1d2f442d55e591..bf9fa9d5829b0f57ef5413b5f42e1a3ba29a7c5d 100755 GIT binary patch delta 315 zcmbQpbdo8nGr-TCmrII^fq{Y7)59eQNDF{42OE%-|NK7@NHG=%xjQl5JgHL;D3k9e!k7Me?P{Io$yR=S$4mxIo`OutHN9V#`tiSf9sF;v+#&w*yyW8&KtC}sc)I$z JtaD0e0swb)a#8>Q literal 273 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6g=$d z;usQf`0ezAyoU`qTopg5oOu)}(G_XKz50UpN+s0^VM;Gs^`AaDTrbx5#lgeLg^e{Z zwC9|GcKWlfI)RA-Op8BRs)w|8IB}dg6}pv2p-JNA+0_g-XLyv7syhUyuHSm;_~&Gu zrUUG!?8UzXzB#_}XXE)-eMSF8Lq-22rzt4iesDgsfh_}u4){!8HT8|p?+>SLzSFUP z!f?;GZpUi)(B0MI)O Mp00i_>zopr0P&-3eEfP?@5`Tzg`fam}Kbua(` z>RI+y?e7jT@qQ9O|$7=H(JNliru=>`iA5*JmaAYuRj0P{&iK~y-)m6O4F!ypVs zA8r?51+9=3Gz%-_+GA(X3SNN~SV7kuGlFx7<=P4OOLf8)@8_2gi9v|Svj2AX)Z3Rv za4F^R&&;|asRyen0JT;CR232Filj3*T$tHVB%Q(T9=V~&bOxIXmVbY7cSMG0LP;O@}u%}KSLzSFUP z!f?;GZpUi)(B0MI)O Mp00i_>zopr0P&-3eEX$e7g`;OEZECB?eK@{Ea{HE zjtmSN`?>!lvVv45dj$D1FjT2AFf_C@V54`8h4ZovtkeDt7mDaSVw#{Px^J-U9{#EC-9dZbt1pwf<>!aX^Qt zn7}4&S!)CC8xHeI%U5aTpY=JXKS4kCrzIm33x|M$Ljwbpae#NrJ#Oxhg1Pg6MlyK1 L`njxgN@xNAm-9c& literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C}`m6 z;uvCaIyodL=-2usOO7xc-kf$esi3eh@c`SmH#ZMAtee)^=wy&}UiZUFT%c)I$ztaD0e0s!D?CUO7( diff --git a/xui/dwarf/status_lower.png b/xui/dwarf/status_lower.png index 1c0a3e7b093bfaafcdbfaf25fb04ddead6594e86..1a482d7d2c4b09b58dc4ac45024b9e33e62a81cf 100755 GIT binary patch delta 224 zcmb>bz?jt;;OEZECB?eK@{Ea{HE zjtmSN`?>!lvVv45dj$D1FjT2AFf_C@V54`MLOyTvEsdDt7a9aSVw#{PwydFM|P()5Wrxld>GWQ?H*=Yj(Eh zinEw7VN#q#@gW(YQV=*WS5kk$?&;lH5Bt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`7`g888Nw zJOBUz8c9S!R9M69m%$CfFbqY1Aq#W`ufPhPB{Oh@8#8!?u8AL{U+33pMC2hNct2(aRmE6@5HQ>;BA62gY#ckl4zL5b)P@j3Z%q;;d+UFZ z@(DMEQdP5m4Tt0xd@(?(%96^n0CHe*m2$aNO_4PR!j*Kcs>0e^@7=96nA!5DU@Yto zp#4a8@;FBiforgdvq?!8~330opWc|p7r#WO-J1xP}`fn`_t z1SFG^4ihe}K&~zS8gR1!M5O3{u-Gx2V!x$Ixw#TW&W&S?@e1JbnXv1+*%yw<006Kh zL^Ei%uWMRWfH8>bLn+Ayz+=;?xF$rCFrd{To|UqHF_dV$IRF3v07*qoM6N<$g7QzL A*Z=?k delta 345 zcmV-f0jB=M1M~urB!3BTNLh0L04^f{04^f|c%?sf0003dNkl1mpBW;e;2 zm}Xq7T3~1WaS6s+DQC^9rmPkS*RpcG_t5_K^zPOxRCWDbFekkO=qJH00oN2D&;xuR z5xDDiKJZePPz+x33Ac6TA%qPUVNb*)-w=;L>5AB}ZJPi{Lcq+j+kC@W1D8sg2VA`Z zR$KnB!8HMhNK(^zu-Z1PvESB8xuqpss`r%ACxDM>z+o87r&==r02~R?<+hn$y>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`7`gAK7Iv z2><{AC`m*?R9M69mRqgEFbszOOd(JTrf?`2OE3(=Fc^y|jDjf?!p_4k>az93xt#W; zzf`Get@!gLP69LE&>=Ge5xpJ}0W*KKRn-sM6L!`CZ~zEhXs|_fY4vT#7bTw`393Z0Mj;jE)p}<~K;37b&M4Mz_gjDq{7!iS)h0`9+ zRTX9y03Z<2?Y{xmoV!Nx2t6Azciw*(RhA)lz8S#d)*Qwk$9{mY_U{+APMhLg@u-{t O0000U6I2u420Jm z69@%SCuxr1>j5OJhz4 zZ~*Wz#{bK`*VoR>{{UKMJWPbm@(b}%oFA~G07yc>2Ya7zwhXH(U&2HFP&;a1}zWo4rhL(6D8Q$~&0000LB(2 diff --git a/xui/dwarf/status_right.png b/xui/dwarf/status_right.png index 99020edee27228d3c5831f74dc5288dceede900e..3182906817b4fdf9bff0d04e1ce6f6c50f3e980a 100755 GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%C&rs6b?Si}mUKs7M+SzC z{oH>NSwSk3J%W507^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10g0sLQ zvY3HEPZ@+6E0)@q0R`DhJbhi+U$SxYb91d-{B$u;$kWrsF(l&f+j9#A84P)t9aWd^ z5DR@771JH<8R0R{mSg8^LE#&T)i2%euI;cm?Q`?rpRlW6=T^x8wW5Fo<{QSmOXV8# QzJi23UHx3vIVCg!0LaimqyPW_ literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C}`m6 z;uvCaIyodL=-2usOO7xc-kf$esi3eh@c`SmH#ZMAtee)^=wy&}UiZUFT%c)I$ztaD0e0s!D?CUO7( diff --git a/xui/dwarf/status_upper.png b/xui/dwarf/status_upper.png index 1c0a3e7b093bfaafcdbfaf25fb04ddead6594e86..9dfe0b19f15c948bffbdb86f8c1770d6083f62ff 100755 GIT binary patch delta 223 zcmb<_&zRL2;OEZECB?eK@{Ea{HE zjtmSN`?>!lvVv45dj$D1FjT2AFf_C@V54`MLEbE?_JIDt7gBaSVw#{Pv2YAcFzN5r-EcCo>(nH*IuEy|cKp zsa91rS7P^F*{}m=7(OtqI>lv?$j8u-a&*oGz6nRzf!cwfVLv1PCRZ_kwrORPL3~eF KKbLh*2~7Y3RzK1J literal 127 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C}`;E z;uvCaIyodL=+}7%#sp7q@8kt18mhm)<1J;5iHXrLYUpfqGRR_JW`3LzwCoN8LrS6O Vaq)?l?*lb6c)I$ztaD0e0svmqBcK2P diff --git a/xui/dwarf/status_upper_left.png b/xui/dwarf/status_upper_left.png index 3d8c27165eee288e2abd968796b08ed4f0d8c360..7458c32e09c300a1de62d8a95a7c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!PB#Kr)4j)`wKm`F8%AQ53F%%-*8wALHk8Ynhv?S{|c z)?+i>k1^%}k1=L{9>##hd%wkgg7>p@iN!sRINI^_cYnUbv%nJn^Q@hs;f3u$kvr^d zbE$UHZ1KuWz6K51Un%2PrDt QN&o-=07*qoM6N<$g0IQx9RL6T literal 0 HcmV?d00001 diff --git a/xui/fairy/fill_bar_base.png b/xui/fairy/fill_bar_base.png index cf08f70eda74d52f70a25e152438ddd61d97db28..80ab4a6e504a99015ad6403da9a2c331770f906e 100755 GIT binary patch delta 213 zcmbQu_>*yhc(4Ko8v_FaN8AnzAjMc5J_jGX#@i_kWvY{Y@B9F^Oe>Ucb15EP*s-=K$*}+_KjYVn1`n=Pm2@T_FKezo=^hjb`w4 L^>bP0l+XkK^Mgb& delta 140 zcmey#IGb^Tc)bJ%8v_HwgL2y+K#H@#BeIx*Vdg0iW_&zxi4suI*VDx@#N&8!f&}a0 zhM)r(XC{1`KTT`{hmnS1PgDcH!9kq`qG!L%dnnhe&@9BfHbX5+>K~Bzw)Vh`V+C#7 pem<~0Y}*#d?RHROfi44sm}f}96ODa0fCe*oy85xYtaD0e0s!7kG{yh` diff --git a/xui/fairy/fill_bar_left.png b/xui/fairy/fill_bar_left.png index 09c10c644fa4b787f710ce6982ca7282af391b8b..8729ed8b78ad8a63268c8d182c627e2d681428c5 100755 GIT binary patch delta 412 zcmV;N0b~CC0?GrBBt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1qu{1I|Pjg zMgRZ-AW1|)R9M5!R$C2(Fc2Kb8aNBpPzlw51VmK=8dd@t)=IWgs|fe@UC?YsOIRA!GJK_Z}9c;-6djo*e){ zHSiAwf9E1P(}Q7Ph)ahdRtvl=5Xny>Mhl`?uqC0ufRnZmQtCy}G2b7yq7X2zZPPkSZxN-ihn{GA^#nxFC5h3Kb3nc} zZgT+lKmsuwPPw`V6ZpZf?3JnoB=5SA?7NVwe8m<~EBgZ18-*T}S$lr~0000fW7^hJn!U9E^Y*oxwe5QpZZ=A@-)B)8rIH&EL#gg*r;PnAN^`(K@|)BdKN^8C_W_4?t{`Sh)f}gO0f^H-UvZX$6K!M z(iyaW&!sSo&ViaUp2dQF6?!|qRgR}Cp64z01>*CB&#SCqw*UYD07*qoM6N<$g0Og+ Ae*gdg diff --git a/xui/fairy/fill_bar_middle.png b/xui/fairy/fill_bar_middle.png index d7b6b15ea28edac4c658c9e525d754a9607a05fc..40e4f39aef80e59c2a807447dc01937bbce7c177 100755 GIT binary patch delta 239 zcmdnYIEiV3c(4Ko8v_FaN8AnzAjMc5#N+tesg8mN z3^-W&eWt7t+Y;iu)y3Q7sFU`B^Is~S&ijy1F44wdYovDV6W@#CQ?t~H->^N5D>}c& z&eb9LPLs%ntJ~i%uzcB=)V%+t_d6i#HBZbJQ#QX}vO>)k@^5Rlyxn8^)jgiSrSlEY OMg~t;KbLh*2~7ZQSVZ6e diff --git a/xui/fairy/fill_bar_right.png b/xui/fairy/fill_bar_right.png index 8b0279b0c152e0eda579e708feb24f9b0ca506c0..0fcbddea91fa9bd734aa158322fab2a71937551f 100755 GIT binary patch delta 144 zcmcc0xRq&wc(4Ko8v_G_n)J+7K#H+A$lZzY=1HA;AcrO0(btiIVPik{pF~z5Um@8e z$d`ekN{xY`p@o6r7f`6-1p`B=0RzLU1O^7H84L{K1#@-<+DufG5MeLz^mS!_$;K@r rXSS5fcp*@6_e85!sY@CXG7Jp83hKf06ZgabMHxI@{an^LB{Ts53MVAZ delta 68 zcmdnWbd_;}xUvKX8v_HwIU|`YAjMhW5n0T@F!K}$Gd`ZUL) S0=>IH5e83JKbLh*2~7ZQy%S6T diff --git a/xui/fairy/monospace.png b/xui/fairy/monospace.png new file mode 100755 index 0000000000000000000000000000000000000000..074f192aef028bad1c66491c76b85a69ad85dc71 GIT binary patch literal 6376 zcmeHLdpy(a``_fSbfhRGYp8|U!OXUtViQH=^f)D-ZJ)82u`R}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dkX>@9GFmNM$sbu*VOsDg-Wb1Esr_bII9%C3 zxVftPFucBF-JxFo`)YiTQd^z{RCbbIYZ17z}@*<5e z|Bt`tZa2DHRS`rC2@u3UDa~0^e1!&+8Cu*EpF1laWWZ!P4=T1TXr5JITbChOK+a6E z$!ra`SDC)WF&O0z-``&?DA4mxF{oN>xi{-zl;hQCjD32b4OK6%?7hn%MxJj6Ne%Ufo>qg@Ef=Gmrbl?GQT z&-B9vT(6pM9|*26Uv-h*y_8=+At7t|Zd89q6B@IN^3zWLVq5OqnCDE)I{aQVzVKD7 zne@VP<;t$1Kbj2DgP|vHc1{NN74OG%*3?p34xeXoV2w(FJGwgE870oGueqHows(6u zJ*n0AJ+)Z9WgE}y zdhYFK`n6~<^_d|fQ^V{pGvqj8X@>6uW4%&+9oHDuWvRCUhx2bUat`e$|2Fs9-jv$+ zoGqAu{EufrT1`J|<;7*5SN?d{f2mxy6F<|b&hq}&fmS2KOnA{#F|j@2D&~ns`$VhO zYBkh}EgNTTSej^;db@o%aTY{J(m=qToMU#Ik8eM8x%+xP^aT!cp|7W%a|lWLH`&mk AiU0rr literal 0 HcmV?d00001 diff --git a/xui/fairy/regular.png b/xui/fairy/regular.png new file mode 100755 index 0000000000000000000000000000000000000000..0e5bfe7e285393030848adc8626d3743c903644f GIT binary patch literal 9327 zcmeHsc{r5q`}dgaOAU%58Doo#F=L&vGxjC2M5)YXjGY<#E|rok3dxcsYm{td4~2TN zlO-flgpvs1cT>;yd%wr=9?$W<-~XPO zaB%_jF3;}8N5`-?UI%FYUvv^cAOFR(D}$s1gE)Y3R~-tV4+3Kma8a)O)YSmcyD#Rw z_YVmW=qxb%ebh5BF@vI{kuuVpf(iW@(Hei0rz6gQ#7Yscf~&~BXn{;GB>{%*`o z1qU4q;S90Zg4?F+TF(eKzw(gp+mU_?T;^q@ZgirCD6!CR9VyKSW(KPyv&%8Z?_(r* zPE`mlO&+KXxoXGy*wB93MuUNmICNl}sj;?l*&^}$DVhDWMx|HJk3(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FheND?d*d}GxlB@Nm99{?ZXWO0-UokGkNo5|7ytfZ>~=y6KvCgvrE2QcThtP z#fg$DH}fj-5m+!vGG)Hdok4t9nty+pKvWmbT=;@$wHZY*@Yv_5vWsXEvqpJ)tWN|9 zrA7D~-{W6-B<1Ap81dCOoCOBXtsq?ko?TiKM81Fb7-hZ`l@8{{if~n&XE*%)I|HJ7 zWqk_Iq6yK9a1Nu_lwo*g6`*Hb8E4b8eb6=ob@IVo9n*Q++>*hySW%4#sMw^b-2Ea~ z6!aqSU4)fdK4BM`7OZPA5aWI3S(Cg*gbgUp$&((qk*kW@4%5n%Kq6DXIbG(k0|q(X z+8>ABh2i5xFL#y2l2wV>nK2^H?H54e7O}OD{dwqa$6y}fRn90Tg`A5mu$|~oaeiEM zezW9?@yesS#PA=f%qd{uA>Qso?|PgCIZur2P~HijaSV1#@J4rH)oTrTJndQUP-Blu zq_nr?;Ol%j#iBzhmxk1Yr*h=Kxb-#5mcsGQ(HdeJw|T&=-4do9HEmW$G!LvB}=YinS!tSSkfh3?aB?SV1F(T6-!y9gP<<>x}8Y=gOoR_8rfA;-eqT($px|I z@CJ=e!+i{)^mc;-N3GPd+cu|P9rT0d1zU|+2@Rh%PPu;}x>0)mGw_H@PRc}E&5k|QnP+amR7kWl%^UJaoF&LXW%yE{g(lYX?O@O+_@gj%h-Qqh_N&itW}raAOq#R586Ka26t<`=_6zoUT+bWE|OTJ{nD15yS_UjP6A literal 0 HcmV?d00001 diff --git a/xui/fairy/scroll_bar_lower.png b/xui/fairy/scroll_bar_lower.png index f4c77c117346e8c740294c32714c728baddd2552..746765cb7c08557998a82f1843d6d61fefe1bba2 100755 GIT binary patch delta 418 zcmV;T0bTyQ0fP?@5`Tzg`fam}Kbua(` z>RI+y?e7jT@qQ9O|$7=H(JNliru=>`iF3?H9N+a3S_0R>4!K~zY`&6QgbgD?<9 zZx{?&k`LR#BFRTm6rDC;YH|P=2m%Z5!zVK^&uLq`Qg=*KumsDY zk_UoPBlM|aF$X0zb3l}zgQ`{WqKHWk{+FWHS}sYkNRnV2zp(5gMT`3Epnb0FsFr!} zu#);q)^%4Jf99aN)i3*d5NH&&>MtRvj%@+1^Nh7+mEVUTQndbvo~L+tKvqP}IRF3v M07*qoM6N<$f;vy0T>t<8 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRm!3HEhFR0}KQk(@Ik;M!QGf#mqoo!v~l>|-*5^?3cHbG3M@%Mo_6P%wuE3u!+Ss7_2k)z~P z#8<$lz%(PU({jEwdynz~9%csSe^WF$>oi4}l#kv^-y^*967T7(e<(oMW2PzB!byiMCw@WNV)K?ZNkKjMVlj} zb7v+donia-q+!K5N8?lST$)-Jwyv@9oSgJj?Vw4i&g6hOrR$rPgh%Z z{8sY}pREhuZ0}s)Qh4RBSkvYss_!RGV||%(b-uDd*XsUfynaz-)27e56bke?gQu&X J%Q~loCIBa>ejES* diff --git a/xui/fairy/scroll_bar_middle.png b/xui/fairy/scroll_bar_middle.png index d627d82e7d56b23f20b1b77668401e46b7b4e0de..1a6ac9d499889aa49e2f5ef40ee07b975c73a4ec 100755 GIT binary patch delta 223 zcmeBVe8-s88Q|y6%O%Cdz`(%k>ERLtq$NO@gAGVND7XCqq!^2X+?^P2p46!aa#+$G zeH|GXHuiJ>Nn{1`6_P!Id>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew z%|u0s9QG1VUsv{*Y}_I|W_SNN7XcN!c)B=-cpQIwb|Wu?q5$*3)}VE4UIqVEcZhOy zO!)EUEvdd*`@d!H%WV%n hY-D7Uc%XlPb)GJ#g5{T+sz75HJYD@<);T3K0RSNmEOY<> diff --git a/xui/fairy/scroll_bar_upper.png b/xui/fairy/scroll_bar_upper.png index fd83ff9f8d8cfec6d89fbe851e17dfaf3960c155..7d67c40a5160da84b6d7d6d762b88c503eb4a10e 100755 GIT binary patch delta 400 zcmdnVG?zK6Gr-TCmrII^fq{Y7)59eQNK1e)2OE%lP;UDJNHG=%xjQl5JgHL;DCA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OXi3O-3-U4o({}H ze4Gl&b~CgpPO9AvJNKG*hHe21hd=}KD(eivt5G@$XHL#zU=R6~;6GvSTSi7E7LFh0 o2~T$3%zvS9ke$=k>tl`UBjN9#Uu=^B+QZ=K>c{G`&MBb@0MTPgHUIzs literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9F3${@^GvDCf{DCq6! z;uzv_JUL;3VM0hy(hvV&?t6O|uVvM#{&vBvBO{Mdxp@+IZgYoYK<6^Mghi!BvRf0b wGzD_EHM8pQynlajn~Ch&0=7MumRm9~==TY3UH_2b2+&vtPgg&ebxsLQ06DNQRR910 diff --git a/xui/fairy/status_lower_left.png b/xui/fairy/status_lower_left.png index 5fad49d3325a5fa5e51cb32043fa710ae393b219..a1cfc4a18be0ff4de380ab52acb50b5d303c8b9f 100755 GIT binary patch delta 454 zcmV;%0XhDe1M~xsBt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8AlIU5`K zWdHyHN=ZaPR9M5+*6XdpFboCY6O;wIf@jDGnSl`)sv~p;kI)&s0wZvLlu{t?G|3f~ zkU*&9Yw8@M0DuS&Yk~b`464fa8)Db!H9GXgx|S{OLoW+(y_zT@2w+B&N+G%eL;#{V zqWcb{5J3Qckp&TDE+P=&D#QgHOT>M@EC8_?1IR&i0WfdJc%IV;-D1J5S1kD1xz-+t zRH*4zcO63v0mKkRfMe?zK>kq-AyTD|3y*=c>y0VPgOY4;0KE{OpV^t1`s>UpW<1xlZ(f|Me07*qoM6N<$g2%46y8r+H delta 382 zcmV-^0fGMX1DOMmB!3BTNLh0L04^f{04^f|c%?sf0003?NklZ&d(5gvA(OeT^fE%Jmx} zP@!wI?~D6AZ*doTo`LHXO9l5%yx{YDUQ%J7PP%$z^~3VW<$h6P1m~X5TXkpgvbJHTgL#>N709f zmD(=c4y08-j(K^IlMM$zE5!aYA5KjDHM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AAih%j>6kQwv*9 xYdx-X2(*cBVB|?)V3s(*z-9nt{VEGGr-TCmrII^fq{Y7)59eQNGpIa2OE$quB!S1q!^2X+?^P2p46!aa#+$G zeH|GXHuiJ>Nn{17O!f%!WnidMV_;}#VPNgI1*3{)KA>Eaj?aro^yL%{|E0oIGWd=5?~b6PG7O`X`# zwz+}j#U-NERLtq!mDzgAGU)S5?NMQuIw+_xJ9@*g72M>11gU4ba4!cIQ;fnpx^-m4wj4F?95vmrk&_($?9kc zaneq%7h}y&Xz+d@b@yk$0ZW|)*OJ^DnBA&2DWABT!LC=u%gQ03;NbA|?i+KH2@e`u k_?B*c{#X_$#1Lg4<0ZWPU!#mH&=v+yS3j3^%uWeS07dIcWB>pF literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9F3${@^GvDCf{DCq6! z;uzv_JUL;3VM0hy(hvV&?t6O|uVvM#{&vBvBO{Mdxp@+IZgYoYK<6^Mghi!BvRf0b wGzD_EHM8pQynlajn~Ch&0=7MumRm9~==TY3UH_2b2+&vtPgg&ebxsLQ06DNQRR910 diff --git a/xui/fairy/status_upper_left.png b/xui/fairy/status_upper_left.png index bc7528d96727104f4c462c1242f327d699bf97d7..ac9b958b34759295cf7911849557b1d5c9cbf797 100755 GIT binary patch delta 430 zcmV;f0a5<`0^9?TBt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8Am3(D7- zqyPW`GD$>1R9M5smfa15Fbsr`iUqoYXJCZP!YrM^BQQfoUbRFu!J)ML@xS`h=+6d zz0;&rAm!?R7@QI=yz+?Jf|#@SQs=^}J;1z`D|Vt5c##Q3&Lt#jhZhN$=gl-{kF>$7 z#_;I!R(SOuumGz9!Z~N|a~nQNm(20>{C42y%T_=x902eZK)hWGir@fd5&)7IUHy6- zYT^3c5J*OKhMw@8fbtU%-clCuoPaV~j?@)g%Lij!P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y%1E)7n0V00000NkvXXu0mjfNEo^X diff --git a/xui/fairy/title_bar_middle.png b/xui/fairy/title_bar_middle.png index be3768c8d53039e897674ff4a25270eb52d8ee27..7b838e02fcd5aa957bb88f9b31f7be32f3dda3f7 100755 GIT binary patch delta 266 zcmV+l0rmdQ0j&a%7gI0@1^@s63y8X-00001b5ch_0olnce*gdg1ZP1_K>z@;j|==^ z1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF*m;eA5aGbhPJdq(7e+P6) zO+^Rk1`8A%C~Y%rKmY&$gGod|R9M69m%$CdAPfToVv?JMSvmu=FbgxWLOVd8ts^1X zPk7`^h^$0dmL*q#xTOX5))r`MX`iU7dmwipZ*uGXdL05W=LqNle7cwSpepHsWCwrK zr_4cB(&sr)(dRf&(x*5m5VwjxEN7CH^mC4+U*tS+9ykvU&jarV-VYAY1LRAF5nWSY Q;Q#;t07*qoM6N<$f*njbdGU?c)bP(8v_Hw6JD!OAjMhW5n0T@F!K}$Gd`ZUL_kO{GoH3pp@XEw?M}*c)I$ztaD0e0ssppQQQCk diff --git a/xui/fairy/title_bar_right.png b/xui/fairy/title_bar_right.png index f2fc8b1ea5cb7f1b101ce9a6e18d5dcb8310af8a..b73dbc19d8250e08a593367f8814eb1de56442eb 100755 GIT binary patch delta 347 zcmV-h0i^z*0{#M!7gI0@1^@s63y8X-00001b5ch_0olnce*gdg1ZP1_K>z@;j|==^ z1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF*m;eA5aGbhPJdq(7e+P6) zO+^Rk1`8A%IR}GGvH$=8)Ja4^R9M69m(dM_FbqVmC=0McR)7&a3$t{F&f*d13Lb%s z(0)YzL9~rgj8w@dMSNJ?OL8PKKqwS)*DYtfTmjqW2bgCdG5eSk)#u=yLH8Bt%v}I` za{x$M&>~R{M?fa?jN_T6uWyaHea*ed$C7)<0SLg=fN25f?gW^YdZ2_&kilfGGC&5i zxe@XkAbjc$Y6lcKHX1YVe00iS4{0>FeMJf}nA^`m5tDh`MFIE|Kswv+m;lUmv~+4_ tz`FL^4v{)syX)&i_F92%mHSViyWRzvM}F!G!LtAW002ovPDHLkV1hj7hvonP delta 274 zcmV+t0qy?&0-yqr7k?-S1^@s6<>&pI;ja$r6Rzgqh5m3m^)5S3);_%yxfxHX~Jj@rJ zmZf|WH09jPp!LhK?EHbHD_MYwcs8E9Sjwh!dC!8|yAyWXD>yVXh=k5(H#oq|!@QGP!WTttDnm{r-UW|O~yaO literal 0 HcmV?d00001 diff --git a/xui/fill_bar_left.png b/xui/fill_bar_left.png new file mode 100755 index 0000000000000000000000000000000000000000..ba693f68800237a1365b89ea250fc8037136a7cf GIT binary patch literal 681 zcmV;a0#^NrP)0eUz7_Fp|9!C&vwid&=O ziAodxb{55m*9VQv{ZR*Ajsx;Wb25n($H{$ZAKc(j>wl;>JQ+i(c%$JfeyUVnydsaWy^S%2MU`-hjIpII;IQO#_@;9_Z@#CJ&_yUnlV~>w;{l^Hmisn@TRqk`>I~8 zMq3MXr{r(~(1RBnnjD@;-mqr}M3nYkXf2thzOWjK836~1|O5LW5-z&5$%Dk z<8PiBUoy6FK;Kt!3~3y30T(($Gz|>CzFzA;=P@t6xRvriPOHO)rlVI+gza05ttGR) z<3#^I;630c>}XoWuzlNO;TZEaFt<>&pI;ja$r6`}&m4)j**@PZ!6Kh{JEM2J#+I;9+}M z&%zwB!t;#pX_bV=l{>_DoIjwNyP#9WbJC8oLpL_M p?Pq3Y<>&pI;ja$snY|Etki-1B4JY5_^JdVGea*(&#fXCJT z1owuf^cNiSRJAv7YnQP0JA{AWFkq4i5NL9kGf&I(|0J1v=lgZl9YRAxuja3O$mcyV z@zvk9>kJcS@r&IHo340B@30^ngVXWvUutZ7XIy66Tv8%!zKSdK?6u2o5iSBwCuV7s zx2808960k$CEST`kI37r@ntW|rZF6_>wI|md%%@2sl&zvb^7nre{Eg(V|FB?*E(00 U-J6!21iF>M)78&qol`;+0J5=jUjP6A literal 0 HcmV?d00001 diff --git a/xui/frame_left.png b/xui/frame_left.png new file mode 100755 index 0000000000000000000000000000000000000000..007b90c40ccf366306884378776f1f53c7781d22 GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{D5&n~ z;us=vIXNUK=-2usOO7l6;tlEN<=U#hzcVyaU{qscN~q9aV0f{MU0{j1?M0v#22WQ% Jmvv4FO#midAUXg5 literal 0 HcmV?d00001 diff --git a/xui/frame_lower.png b/xui/frame_lower.png new file mode 100755 index 0000000000000000000000000000000000000000..41c176eac63101ac0e3a09af1201dc9b608ead18 GIT binary patch literal 110 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{D5&7+ z;us=vIXOY1;=qa}OTNg@XA%<^7vH0{;m+>zej`?fKZWeYor|o+fNB{$UHx3vIVCg! E0QXfK6aWAK literal 0 HcmV?d00001 diff --git a/xui/frame_lower_left.png b/xui/frame_lower_left.png new file mode 100755 index 0000000000000000000000000000000000000000..35e703caccdbb66b868d74f9fa5d566cb779db42 GIT binary patch literal 139 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{C}`{H z;us=vd1>!P-U9|ahi52F{~$L1ZS)tfU1F>~d`~q5F9r2?d6iF2`S{>b^Z!G2?5`wS jSIrWibVfXwvw(St5MS+l_5(M81~GWL`njxgN@xNA-03VP literal 0 HcmV?d00001 diff --git a/xui/frame_lower_right.png b/xui/frame_lower_right.png new file mode 100755 index 0000000000000000000000000000000000000000..ea819a5c14ae14bffa70a2ac69632c788bda8a37 GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{C}`v9 z;us=vIXT6F*~`o8|I{f{B&GoIw>LKrA2{N`5U{Sn)zkB(eH^Qvo}NV0_jh-lH5{HL e1h)h;@-Q&?*b0itoYMr^#Ng@b=d#Wzp$PyU=qBI* literal 0 HcmV?d00001 diff --git a/xui/frame_right.png b/xui/frame_right.png new file mode 100755 index 0000000000000000000000000000000000000000..6ed84463e793d58637b85c193b8eab9e95e925ff GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{D5&J= z;us=vIXT6F*~`o8|I{f{B&GoIw>LKrA2{N`z{AhVpcuna`mn7^9jKbY)78&qol`;+ E06$6{D*ylh literal 0 HcmV?d00001 diff --git a/xui/frame_upper.png b/xui/frame_upper.png new file mode 100755 index 0000000000000000000000000000000000000000..a885c775810b0c3e3e50702d8dc57dd1b0c02778 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{C@Amg z;us=vIXNUK=-2rM_6<9B>@au`TJZj!?I{r+pytb^?8Ur0e(nY;W$<+Mb6Mw<&;$S# CDjmfD literal 0 HcmV?d00001 diff --git a/xui/frame_upper_left.png b/xui/frame_upper_left.png new file mode 100755 index 0000000000000000000000000000000000000000..aee9a0454baf29834fe37988b45e9b402122e37f GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{C}`p7 z;us=vdFh#rybKCFM;zDV1(Q_t8me-o+Y cm;2kyd*Th3gwcPkM4%ZAp00i_>zopr01uxfM*si- literal 0 HcmV?d00001 diff --git a/xui/frame_upper_right.png b/xui/frame_upper_right.png new file mode 100755 index 0000000000000000000000000000000000000000..2bdcf7c5729227908e45efbb27fb0cb181896e98 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqoCO|{#S9F3${@^GvDCf{C}{5K z;us=vIXNUK=-2rM_6<9B?07Kc&gOJ}=F@wtzi;r;($sYHIk1dDjWhT_hg#<&H8nP- ch9Xvm|G|8<+Kvxz0F7YqboFyt=akR{0H8-FS^xk5 literal 0 HcmV?d00001 diff --git a/xui/fullscreen_off.png b/xui/fullscreen_off.png deleted file mode 100755 index eb8c8135979a1ac1d81392d3b07457e592831cde..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6zukN zaSVw#{5H&z?|=di^OWtMH0)mM$!dM|%2*-T70xDo+;E8q$ApRU=RUAspUZG1D)we{ z_Vk)oTc$v*_s3>Wel%g~7ghH!f;yTE#uf~#8fI3iPRS@-5)J5h4RjWR Mr>mdKI;Vst0N@x-2LJ#7 diff --git a/xui/fullscreen_on.png b/xui/fullscreen_on.png deleted file mode 100755 index 5d1c0b303c45fa79e56ae7fe137cf97bc34b3830..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 219 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6zuhM zaSVw#{5I?)?*RoK<|&*v>fOQ$>}x|_O}!AHEK*;2!=g`dsY650pMo~~9q(8cY<+er zE_?42?KgrQL6zqB=7_YfS)y;bs6WAzamGQ$0M<7r*-e>mDMgoaZ($8%o0Ptc`PH*2 zjM{0da$oMb`*P>D8}AI8YIq{`cOGTbnAE4pw5Q(fvZ&zSU@49Z8yR2f%PwN>6x|DS O7=x#)pUXO@geCw+3Qw;9 diff --git a/xui/gnoll/fill_bar_base.png b/xui/gnoll/fill_bar_base.png index 5456dc3f2024f0a380fd322947258de6ea140948..099ae6a9e62d164f70a36c611e56fa83f35b0f30 100755 GIT binary patch delta 196 zcmZo=e8D(DJlKGPje&uIyJOd4AjMc5*$PRmk037T?lX3+ZOSa$xv(v>VgMLZkNT`Xl& sy1Zw>?cE8x?G+pv8bm_pvl|>>=HcMv{vjhg2dId_)78&qol`;+0ER3%+5i9m delta 117 zcmaFC*vdFTJWqmyje&vTLAmV@AjMhW5n0T@F!K}$Gd`ZUL!Q!QkoY=d#Wzp$Pyuq$#8T diff --git a/xui/gnoll/fill_bar_middle.png b/xui/gnoll/fill_bar_middle.png index d7cbdf5c7bf6348c13f5b36cdfda8831455c8155..6161bfb4ce9c8432ae97356829c98bf85857f1a1 100755 GIT binary patch delta 215 zcmbQt_?vNpc(4Hn8v_FacgL>9K#H+A$lZzY=1HA;AcrO0(btiIVPik{pF~z5Um@8e z$d`ekN{xY`p@o6r7f`6-1p`B=0RzLU1O^7H84L{K1#@-<+DufGsAMnk^mS!_$;K^a zsC|9P=4zngKu;IPkch)?uLklSP~c&ESkJ;7vBL9=?`f5U#+5t7cbq?ca;6uh5cH6}_1VcAAy6tCXX5*P7aNxg^|1(zg&+N_-f(92Pep&(z OXYh3Ob6Mw<&;$Vg$44{( delta 131 zcmey(IGJ&Rc#Q-H8v_HwgL2y+K#H@#BeIx*Vdg0iW_&zxi4suI)zif>#N&8!h)~Lp z^A64jeyp3bO>D!PoyQLtEYVF^QYy2-fJ5t|S;v$q8QF}&%)JL!ur3zsi87GUSx^~y h#3Cw{@4uEXgO!7z!PYBFoq+~2c)I$ztaD0e0st5uFM9w0 diff --git a/xui/gnoll/fill_bar_right.png b/xui/gnoll/fill_bar_right.png index d5ea533bfa4c34b01ad935d168743996209f5242..d1a58bc6b641f10016d33665bf65f5c03ab28b20 100755 GIT binary patch delta 295 zcmV+?0oeZK0m=f97gI0@1^@s6CC!^L00001b5ch_0olnce*gdg1ZP1_K>z@;j|==^ z1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF*m;eA5aGbhPJdq(7e+P6) zO+^Rk1`8H3Hnfu8q5uE@ph-kQR7l6|l)(*yFbqXM$P2K7XXpr?B`dHCD|7{qKv(bx zFajJ<5Q0FQo+>r}k{sU8k1Z!aRaI5hZ>ix9OOavf{f5^7keUw`-d2|(!Y;!R1^`0G z_w;-{jhNF0vvhPDH>wI%&DPUKNmxV>LdcpZcZFnvh``MDBv(QXycF%#Uv}wsmH@y$ tiQ&`tP}Ei$!!vMxFYYJ$wW0W%SpiC}MFhLDq{#pP002ovPDHLkV1j$_ZYBT# delta 214 zcmX@b^ptUec)bJ%8v_HwIU|`YAjMhW5n0T@F!K}$Gd`ZULH1L|JGGvuQP>olsXK>TtmDRUn?jX zY`%Q*X#kVFYxQIO-CwM{84`-qew4_py5$x8hwa_(M{yVDvo8EL`zE8Cm@7-5w1^eZ OjSQZyelF{r5}E){zE7M0 diff --git a/xui/gnoll/monospace.png b/xui/gnoll/monospace.png new file mode 100755 index 0000000000000000000000000000000000000000..074f192aef028bad1c66491c76b85a69ad85dc71 GIT binary patch literal 6376 zcmeHLdpy(a``_fSbfhRGYp8|U!OXUtViQH=^f)D-ZJ)82u`R}uQcv;-KaomBMX5|V z6KYAq^euWsQtIi^QFzip%9HPBqtoyAeZ79KUccY-U)$^6ecji6ectzVy|3%OW>P%X zubHE+s}6&~=D0Z1JfXQ98es@k=+g&#b{RBvfPOA)7Z(#40$M}B@RLw$$%8K*njn%4ki$t?CsMQDOA9+t-8=u> z)=)oID^^3iCHyWqxA@re>O*UU5lQi zI9_EOPuovo)4dGymZzW2T|e${jk*7|c4$cu_%HG3B2~c$8KH-hj@&^vTb+bZ@yYhs zorW%6 zmT}vdBiCj=OjJGhCP(V2##yDhjbz3oX9bR4=|O{y64ZAvMU=X`2s&%?;#u z`w9KrT&YYR*BoH+7@)a`8zoN|%-T*A1u(-wA(8=xaw2U|BlS`glEbn={bK2cbBl5W z!#K|Ie9$X?y*D#HoJnD!>}=JoMN|lY3km_Gh#L_ppo(lz3S25A%hgyEQeh$tw?X+q zb>zt7gGiz|(Hw`Ni#Ra^l&w0_n$KcWJ!wwU5YWm76($r$QL)(A*jV#e3v(Vn6pN=& zC|Dc;OCVq%3ydHxQV57Jkpe?G#1sY%6fpUmC?SUziIigk4Bi%@4GIPABR~7cjdFAQ z0v{=uW&z>@D*~dhcyk<<%f){Cgg{7-fk37m`j1ZtyyK!ktS2boZQ(OPdJGsTH2fAq zeuKUs$U_R{aHAAKLF9dR7>oJEE@}%uLSe&VV!;TI3xNtC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s((_sFImJtE*1{lj1u`@tVE+IA`AU{cT%N@Zd&>{}CP480}zx zQ$%iY?wL(uT5`O)dv^E|k6P1phcZ_5Trp9mg%n`4uk1|T)XpPFqB^ZAI;lFch&p;2 zZo<1?Pa{J!%Cx)5Bw0gt^c6d%m@ra7Fn{E_+vggP_+s(sUm;I+XeJ~RMo!+imv6Jj z;~CmMZlvvi7EC&7RNQ}pZL|zfc1Ij*Fy795i*52^Z?LAd?Y&>q)Q;rGR}-A`8nJ^< z)DElp*7sHa{cHJ~*5mDZDAb0!5O<^8TL-jDgN;(nG>w{g~J8 z3~67BS9(~|i>Lp++@(veD<2P59uMJdkX>@9GFmNM$sbu*VOsDg-Wb1Esr_bII9%C3 zxVftPFucBF-JxFo`)YiTQd^z{RCbbIYZ17z}@*<5e z|Bt`tZa2DHRS`rC2@u3UDa~0^e1!&+8Cu*EpF1laWWZ!P4=T1TXr5JITbChOK+a6E z$!ra`SDC)WF&O0z-``&?DA4mxF{oN>xi{-zl;hQCjD32b4OK6%?7hn%MxJj6Ne%Ufo>qg@Ef=Gmrbl?GQT z&-B9vT(6pM9|*26Uv-h*y_8=+At7t|Zd89q6B@IN^3zWLVq5OqnCDE)I{aQVzVKD7 zne@VP<;t$1Kbj2DgP|vHc1{NN74OG%*3?p34xeXoV2w(FJGwgE870oGueqHows(6u zJ*n0AJ+)Z9WgE}y zdhYFK`n6~<^_d|fQ^V{pGvqj8X@>6uW4%&+9oHDuWvRCUhx2bUat`e$|2Fs9-jv$+ zoGqAu{EufrT1`J|<;7*5SN?d{f2mxy6F<|b&hq}&fmS2KOnA{#F|j@2D&~ns`$VhO zYBkh}EgNTTSej^;db@o%aTY{J(m=qToMU#Ik8eM8x%+xP^aT!cp|7W%a|lWLH`&mk AiU0rr literal 0 HcmV?d00001 diff --git a/xui/gnoll/regular.png b/xui/gnoll/regular.png new file mode 100755 index 0000000000000000000000000000000000000000..0e5bfe7e285393030848adc8626d3743c903644f GIT binary patch literal 9327 zcmeHsc{r5q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_N&itW}raAOq#R586Ka26t<`=_6zoUT+bWE|OTJ{nD15yS_UjP6A literal 0 HcmV?d00001 diff --git a/xui/gnoll/scroll_bar_slider.png b/xui/gnoll/scroll_bar_slider.png index 356dd535f3592ff2affe1b66adc8204e7394774c..87cb4ae2a41225a32a0f34d21e9fe0d4734e90c8 100755 GIT binary patch delta 309 zcmey)bciXdGr-TCmrII^fq{Y7)59eQNDF{42OE%-|NK7@NHG=%xjQl5JgHL;D zQ=ESPdl5_iMirq(+fJ86Zzbao9!i@(#1%0`%>SHx&uNA~ceh!#%1#qUy%X2f-BfIC zWEQL6Jp4?lS4H_o?9;fUgUc37&)D?vf~(xz&(fZ9aTmfuzm)+U$>8bg=d#Wzp$Pz_ C3v37g literal 375 zcmV--0f_#IP)^@R9M5sm)#YDFbqb&xB)A41s#DETmeVW5nMq=a0W)e6*7Vy z0UwYb6=?gV=a{#`fqQ9blK_Tr1v*!t!#~0m=-LY1^K6q47Jfeh>ico&fI|(aPk*0S z;X|+zk^^p$kX&$9LUO_xiJb+m9%%IUdZR#F_0O7SAOx=;(-)VHn+dVNueW}DIq?!= zfx9Z$VxEq)q^Nif`xA$#jz6eqc{~FOhz#hLo#CEQRz4&0r2psiYO$Z zo`)xuWNQ+O+c6TJT$IL0q`;}Nd`lt~PB$h?5)9nbn$0CxI4v-ja0L&~(ji;h^B15R VR)t6;6iWaA002ovPDHLkV1oKskr4m@ diff --git a/xui/gnoll/separator_center.png b/xui/gnoll/separator_center.png index 356dd535f3592ff2affe1b66adc8204e7394774c..87cb4ae2a41225a32a0f34d21e9fe0d4734e90c8 100755 GIT binary patch delta 309 zcmey)bciXdGr-TCmrII^fq{Y7)59eQNDF{42OE%-|NK7@NHG=%xjQl5JgHL;D zQ=ESPdl5_iMirq(+fJ86Zzbao9!i@(#1%0`%>SHx&uNA~ceh!#%1#qUy%X2f-BfIC zWEQL6Jp4?lS4H_o?9;fUgUc37&)D?vf~(xz&(fZ9aTmfuzm)+U$>8bg=d#Wzp$Pz_ C3v37g literal 375 zcmV--0f_#IP)^@R9M5sm)#YDFbqb&xB)A41s#DETmeVW5nMq=a0W)e6*7Vy z0UwYb6=?gV=a{#`fqQ9blK_Tr1v*!t!#~0m=-LY1^K6q47Jfeh>ico&fI|(aPk*0S z;X|+zk^^p$kX&$9LUO_xiJb+m9%%IUdZR#F_0O7SAOx=;(-)VHn+dVNueW}DIq?!= zfx9Z$VxEq)q^Nif`xA$#jz6eqc{~FOhz#hLo#CEQRz4&0r2psiYO$Z zo`)xuWNQ+O+c6TJT$IL0q`;}Nd`lt~PB$h?5)9nbn$0CxI4v-ja0L&~(ji;h^B15R VR)t6;6iWaA002ovPDHLkV1oKskr4m@ diff --git a/xui/gnoll/status_left.png b/xui/gnoll/status_left.png index 6eff431156d71b6ccccb77ff05559c7fbe37f83b..443235eb6c862516ea88dd4cd1d0879af5bb2f22 100755 GIT binary patch delta 368 zcmZo;`p1;j8Q|y6%O%Cdz`(%k>ERLtq!mDzgAGU)S5?NMQuIw+_xW!B*cr?T_fr_tqx;TbJ9DX|`n)k2)kL&wY0vfEr60Jce6j%;# zU~zI+6mdH!!j$;?#ixi_?xrj4C+oVNbH289-JIfulIvR=S~qZiJ8<{m^97aBZ-Vul z85S`7PR!zopr0QM4v)c^nh literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^5EamTas2J%gS>|ocwFlP#7=OE`16Pj&UuMIkHkU_XH^rML z?)%z%-$D41&jB9`7WM}(FA5*#V3@Z(`sR`1b;5zC&dhmNdgcAKTPqk2*z9BdzWK7e z`WemlO6Es4GxN>9@#z%r9JY*KhTDYM(@R6o-F~Taj`6JFowcif1xG)MwxL#j`-(G%8VeL;IM|_7{gH!Q&#p|GF8O}8AJ7jBp00i_>zopr E0Df*}B>(^b diff --git a/xui/gnoll/status_lower.png b/xui/gnoll/status_lower.png index c0c69c9cb29c2ce24716dbd5cfd31ecf6e5409b5..975daca97de1f6c1cc04bf4db2d983b53bb988c2 100755 GIT binary patch delta 392 zcmV;30eAkY0;&U$7gHbz1^@s6b9#F800001b5ch_0olnce*gdg1ZP1_K>z@;j|==^ z1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF*m;eA5aGbhPJdq(7e+P6) zO+^Rk1`8H78sa8)MF0Q+07*naR9M69mcfyOFbqYX6&j!gwU8EQfi1yx>~U*I32X~# zAuXr{m*5dYi*ks7aGSYp!piO0N=}BW!QM zMfWqn?E%wRui3YUFAvj5zT13gn8y0a#ghxbpmY2Bt*i9p@`*u?xO~FqDkCl}2L}l8 mIxoU_-9I{e@}Pa&ec%a|Hy+G45R)YU0000Z!TNu zTBgm53zhW`p!yj&0k`>8S=KQ|JbCqZV9G#AF~(^HUc6oI(Oh{2p1j%lRUV@Deul>z zh6`x7Hayr i=K;KUqg~y1;1vU19={;4Oq`nl0000hW8|HBmaqhtH9kFV$-Z)``T=ouH>10!qAKm6l-UZZ<| z9rwqtGk`+c4Ch1}TA#!)MtC4G7@o&47Mv5M6Sa;(N98%!0jDB#MiWrP;yG7CF35u5C3}Taz7zcm?bBbB%L}@c{pWMl`VZt0V#si?hxt&aOqC^{*9-yU(2G*za wOcbEhhb2wWDJ>u+IxHz7!I73p;{QYT&nAhk+}UUTJkT~W vaR1T29xmr!^T(eKlx1WQa9}_t_Hpwxz1C>m_fVw@Xg-6dtDnm{r-UW|f)+2F diff --git a/xui/gnoll/status_right.png b/xui/gnoll/status_right.png index b4b434350979d6606fb19730a17f3da7f93f1a4f..935c21d9f0d18d6c1b641616560a2cc72a4e5e8d 100755 GIT binary patch delta 379 zcmeyz*uk9D8Q|y6%O%Cdz`(%k>ERLtq!mDzgAGU)S5?NMQuIw+_xW!CmxLq$702SZ!ba4!cIQ(|XMc%^-JTB`4#S&Q8Ul5IG>^l(9 z;}Cv=EApVWfz$6s4h|>BwU_iiI~ORutLeJ$D;y`o5X8W4(k-&Va9`XvzKpEbG7Q_9 zU#k}?bO|4o?%+66Ge>&!)#~SW68D*GEX>RDe6*zg9B&5GjK|ksekzgcT+ZTk@XH%t z8-C#xulKU-`YLc#?tIRH*>^q|H14wVT5!F^JaSJ?)=sO&TQ0Tt}K= S2?4#zz~SlY=d#Wzp$Py{&x&OL literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^5EamTas2IMN8ZB*Jg)JJgd|vlC0YYtD6oVml!$mO6!B3M*yTJ$)hk^0R@oN+t#|+3 z*Z*l*^tLAQA(y%3Ia9|w2~1@Z|Fm^1ST$we`a1dKl&gEPeZ!ubes2gq8~by|m-$D$ zo5D8O=oi0R?!09(%ks}tj=t;9+Hgi;`m6_U=l7k9o~*QP<-0%YIjbgz{mJKyn!NAN u3(>Fa0!|WE$>}l@?8h1l6JQj>2bTQ%ZCkV>iW-1!XYh3Ob6Mw<&;$TYx?*Pl diff --git a/xui/gnoll/status_upper.png b/xui/gnoll/status_upper.png index acab93f0639d1e366b62f974915a7c2f66287476..97dee85b830bc23b7071ac7887335145853ca5ac 100755 GIT binary patch delta 393 zcmV;40e1eO0;>a%7gHbz1^@s6b9#F800001b5ch_0olnce*gdg1ZP1_K>z@;j|==^ z1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF*m;eA5aGbhPJdq(7e+P6) zO+^Rk1`8H79_352TmS$80ZBwbR9M69ma&n8Fc3wb)+7#l!no7(8jWzDX+ZC+ex9D4)J_rL-8o_;FxG3SgY zZ+;HE9H>Rk`LzNs-p$|9G|CD*dC_H9u33f%fqK<9t}oYOqPx&Pc8sYUDE4Yo`0n$mpcZz;&Mlruej74 z93aGQIfSt*H_jb+@c?z-0Rf0H7GbXU$o`-jfS}svgW{hN|MtWm_oa z-dxVYwGW#Y7b@#Nf$C@A0lc?YWuK>%@Z{Csfi(gprIgkcc=2YxM_c6;+`-Sj3*b9x30ha!EIWqu`?>K6N0w1!R2pHtnZJ3;%8^fB$GjnWY;K(iS< MUHx3vIVCg!0G*dZp#T5? delta 138 zcmeyxIFoULc)bJ%8v_Hw=LNMqK#H@#BeIx*Vdg0iW_&zxi4suI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)I{aQVzVKD7 zne@VP<;t$1Kbj2DgP|vHc1{NN74OG%*3?p34xeXoV2w(FJGwgE870oGueqHows(6u zJ*n0AJ+)Z9WgE}y zdhYFK`n6~<^_d|fQ^V{pGvqj8X@>6uW4%&+9oHDuWvRCUhx2bUat`e$|2Fs9-jv$+ zoGqAu{EufrT1`J|<;7*5SN?d{f2mxy6F<|b&hq}&fmS2KOnA{#F|j@2D&~ns`$VhO zYBkh}EgNTTSej^;db@o%aTY{J(m=qToMU#Ik8eM8x%+xP^aT!cp|7W%a|lWLH`&mk AiU0rr literal 0 HcmV?d00001 diff --git a/xui/goblin/regular.png b/xui/goblin/regular.png new file mode 100755 index 0000000000000000000000000000000000000000..0e5bfe7e285393030848adc8626d3743c903644f GIT binary patch literal 9327 zcmeHsc{r5q`}dgaOAU%58Doo#F=L&vGxjC2M5)YXjGY<#E|rok3dxcsYm{td4~2TN zlO-flgpvs1cT>;yd%wr=9?$W<-~XPO zaB%_jF3;}8N5`-?UI%FYUvv^cAOFR(D}$s1gE)Y3R~-tV4+3Kma8a)O)YSmcyD#Rw z_YVmW=qxb%ebh5BF@vI{kuuVpf(iW@(Hei0rz6gQ#7Yscf~&~BXn{;GB>{%*`o z1qU4q;S90Zg4?F+TF(eKzw(gp+mU_?T;^q@ZgirCD6!CR9VyKSW(KPyv&%8Z?_(r* zPE`mlO&+KXxoXGy*wB93MuUNmICNl}sj;?l*&^}$DVhDWMx|HJk3(KF@X0@4SM#~^ zjAb&Ev2^8D<0&Qwb%V0Xigr$!2OM^G)pDc*HDh#_Guele&UKu$XrB#Vlij!{B|~Fd zDfO?HU-R4ma3pYZ&G=EH;B79iDw~xK2ne+QEXC4>W@BQE zA-KCrcM`qhkD2VSBh3fZkn3z@U39G-p+q4Nyng z?p`FQoV1*@3|z;L;)8;zu|ie6hz^)jSlwR`z)Th9NTYdR5C~siUuj=iX?HI&0*OYW z5i%$Q3Izu^;8cG%8qN>yMit(L_=$lfQ3+lY4;sbY4Z4eo!@GOa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ZPA5aWI3S(Cg*gbgUp$&((qk*kW@4%5n%Kq6DXIbG(k0|q(X z+8>ABh2i5xFL#y2l2wV>nK2^H?H54e7O}OD{dwqa$6y}fRn90Tg`A5mu$|~oaeiEM zezW9?@yesS#PA=f%qd{uA>Qso?|PgCIZur2P~HijaSV1#@J4rH)oTrTJndQUP-Blu zq_nr?;Ol%j#iBzhmxk1Yr*h=Kxb-#5mcsGQ(HdeJw|T&=-4do9HEmW$G!LvB}=YinS!tSSkfh3?aB?SV1F(T6-!y9gP<<>x}8Y=gOoR_8rfA;-eqT($px|I z@CJ=e!+i{)^mc;-N3GPd+cu|P9rT0d1zU|+2@Rh%PPu;}x>0)mGw_H@PRc}E&5k|QnP+amR7kWl%^UJaoF&LXW%yE{g(lYX?O@O+_@gj%h-Qqh_N&itW}raAOq#R586Ka26t<`=_6zoUT+bWE|OTJ{nD15yS_UjP6A literal 0 HcmV?d00001 diff --git a/xui/goblin/scroll_bar_slider.png b/xui/goblin/scroll_bar_slider.png index b6c208a9378cb6718352ee11443808f6f34ff031..cffdccb5820ab0f978abc7cb8bd20da2eb099cd9 100755 GIT binary patch delta 348 zcmbQw{E{iFGr-TCmrII^fq{Y7)59eQNDF{42OE%-|NK7@NHG=%xjQl5JgHL;Dg3zJhZT5S*RR$)z!ldhIxAG7 zD|D7<#6fKXroRdSa&22YJUBmE9x7nYVUt!d^VltQ>)^R(>GBMnRk~{*h?l?jKKYn$ z+KlC!f8Gwea44rCcwf`hCp(*J8J@iTbm*b>1DyxVL7AED+cq58b)ubJ`by-vmUXL{ zX2(=}F`G9{O|fadZFns}ct&0IY_V5<${lT2&I%=P`a51yIVmV+1y-OVbOo=Fj*zav3LPP=kQKB7 zBaj~rMQ~8ir`*MNxeMgt_iW3S1tgl*7`4Wj=|eK`a=8Kky6-R8!1X08y!|Zmvnnki zS$I}LGVuPV0{~3#7zxS1OY{4^yYmvl!dqSZPD@A@o|TYSz%vq(f!i>HS&1q$avSE4 ze^;7$hnN}4<%+!%Q&@O!fZd*>{OF)HHxrVAyER}XBn9_DKuSm&?n#71r8P!v+6CPI zdFtR_xQj@;l~7<-cys$(0&QBT>S7kQrt!=Y>@DAVnQee9f{>OV;hWnqEaA3c6ux^9 zg(RK_5d+`N1rZ4VH2g3bossZKDGEQ8j*leRk%ulMXC*YYTwE=;_{A_ju+RB5)BVBqQEbV}oP@9E++)m~AaKLB&gf53Q>{el1h002ov JPDHLkV1mmAvKjyY diff --git a/xui/goblin/separator_center.png b/xui/goblin/separator_center.png index b6c208a9378cb6718352ee11443808f6f34ff031..5fb8a5d367ea8a4eb51dd189eb4d60c3f8b0e5aa 100755 GIT binary patch delta 316 zcmbQwe3B`vGr-TCmrII^fq{Y7)59eQNDF{42OE%-|NK7@NHG=%xjQl5JgHL;DEw%o%?bjn-&1oAh-DlUTchf_ zR4jS}Yt#mozYgjh<;!P&U^UL4-ptJ5_9`;?yi}^l!S@T#*c(4NdhS&7@sgmV+1y-OVbOo=Fj*zav3LPP=kQKB7 zBaj~rMQ~8ir`*MNxeMgt_iW3S1tgl*7`4Wj=|eK`a=8Kky6-R8!1X08y!|Zmvnnki zS$I}LGVuPV0{~3#7zxS1OY{4^yYmvl!dqSZPD@A@o|TYSz%vq(f!i>HS&1q$avSE4 ze^;7$hnN}4<%+!%Q&@O!fZd*>{OF)HHxrVAyER}XBn9_DKuSm&?n#71r8P!v+6CPI zdFtR_xQj@;l~7<-cys$(0&QBT>S7kQrt!=Y>@DAVnQee9f{>OV;hWnqEaA3c6ux^9 zg(RK_5d+`N1rZ4VH2g3bossZKDGEQ8j*leRk%ulMXC*YYTwE=;_{A_ju+RB5)BVBqQEbV}oP@9E++)m~AaKLB&gf53Q>{el1h002ov JPDHLkV1mmAvKjyY diff --git a/xui/goblin/status_middle.png b/xui/goblin/status_middle.png index a41240361c7ab78b60a17f11f5e659fd6c601a49..b2e22e1a4a0712e057c267078afd7c358b5492d3 100755 GIT binary patch literal 777 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZzY=1HA;AcrO0(btiI zVPik{pF~z5Um@8e$d`ekN{xY`p@o6r7f`6-1p`B=0RzLU1O^7H84L{K1#@-<+5jau z3p^r=85s1GL71^(seKtxkiEpy*OmPx8xOCv#+sn0gA5Ez@t!V@Ar-gYUNK~3FyJ__ z!H_-TzQjT%Y45TKq(46_;U1T%*m U`g$cDnEDtzUHx3vIVCg!0DGWy4gdfE literal 125 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6x8>0 zaSVw#{Pvt7BLf2qgMmqa3*0;?c|o6mWpC+KF+BnuAb0P%DF{tDnm{ Hr-UW|M(895 diff --git a/xui/goblin/title_bar_middle.png b/xui/goblin/title_bar_middle.png index 31f331e983f2e10bfeb061ddf38cc6c08d3e9e39..3b3b4aa38287632a801f69a5d0bc54eab009be00 100755 GIT binary patch delta 294 zcmcc0xP>XJGr-TCmrII^fq{Y7)59eQNJ{{*0S6n9}SlEq&N|ipbe*W zJp<1>Ut08QYJ0Ad{oP2tHfLc&1^#Y5gUxo~S1V`CEM;iea?L4W$CtZ*P5t(#D+m0L z2;KVp%-!eDa+YY=Rj=z1RCeo;Fii3`7n^DS=+L>zbDtaCV1Dvb!|Yzg!fv3G7(8A5 KT-G@yGywpB`BCHm diff --git a/xui/goblin/title_bar_right.png b/xui/goblin/title_bar_right.png index 611c36495748289432a06577aba0ab1a897a024c..49bc95144007756f86ff474ea7f425e4f2a05569 100755 GIT binary patch delta 542 zcmV+(0^$AK1HJ^17gI0@1^@s63y8X-00001b5ch_0olnce*gdg1ZP1_K>z@;j|==^ z1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF*m;eA5aGbhPJdq(6e*gz` zNliru=>`iI1Tg*r(iQ*!0hCEZK~z}7?U&oF!ypWXornck!7F41&%z8{p)0V$S-~rG z1+Tye=R6Qn!c8HiFGnCDRaEuo3&pRB3V-z76B0fGiOaDeU@8Y zuckDz=Q@@iav??hV^3YI+A>2Fwf0yuPS{c8P=k=JYC1#!oLn+q>}W0hlcpvUzXgrd zt?cac0cP|1vnGCHh_cVeK#cvowZp-&L=S}fD;@_GYWr;?pPa`O$ gE*=6$1F|vp55_+1Ojhd8y#N3J07*qoM6N<$f>W{F_y7O^ delta 463 zcmV;=0Wki)1l$9V7k?-S1^@s6oh@i66Q#;!1IxmR#D1xU;{>f8Qh+jn`bt^mfe1Khp{z$Be-xOlp^YQu1rct*`FC0yg z=i)a$LN3eqH0Mq6JL2D(8)ZqJP@hJir7nF0js_IZ*gwNI>`a=F*GvEa002ovPDHLk FV1jlW$5sFU diff --git a/xui/icon_frame.png b/xui/icon_frame.png new file mode 100755 index 0000000000000000000000000000000000000000..75b387f588b353ddc46f2727c9723a7294343fd2 GIT binary patch literal 312 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6ny3B z;usQf`0eyS(ZdQnu8qRXn*(^K8gOql2=tiI=5<3SVWH5q`Kjzdn^;cWto!uOqID1V z%j4bUb7$$jo4Wq;vl@Td``JHsOuhd+V%=7Uxa^8}KDO3%!SVuMq}ILseO609Bv*35 z#*`ae3s{+I>`ofk9cMmkn0;_J?|i38ilN*A|Mtr;T!=85a)j~XeA5iRet~e~9rmXg zcn&}j)8vl!?$w+z6>E;X3T~6A$_!!FJFdybKUMLr|My0-i(U?EH_Dx7=HtlLVs8&q zsN!^8^WByE#fvLkOH5_V=3J_Xt!ykl{Br%V&$5CyDt4VyKF$jCHG`+CpUXO@geCw= Cxp%$* literal 0 HcmV?d00001 diff --git a/xui/imp/fill_bar_base.png b/xui/imp/fill_bar_base.png index 11b3869e6fd494c4d6639051347ba6ecbe16f58e..c174986e89efcee796c675958d49beb1fb9c8f2b 100755 GIT binary patch delta 202 zcmZo=e8)IJJlKGPje&uIyJOd4AjMc5&t;ucLK6VHus*{8 delta 117 zcmaFI*vdFTJWqmyje&vTLAmV@AjMhW5n0T@F!K}$Gd`ZUL!?Ml$RZAxKYE=Qg3@9r+{>z*=Y%8C?$sfRi`6R#*VU3_npb6K#vyZdy8nB-Zd#gQ%F7#PCz W1g3TJ@-7A%!{F)a=d#Wzp$Py9pDcd> diff --git a/xui/imp/fill_bar_right.png b/xui/imp/fill_bar_right.png index 524795f5446de61c888c285e40a7a0df747e53a5..6a2d6119a4227b81384ed933ab2ede529abc2061 100755 GIT binary patch delta 307 zcmV-30nGmI0oDSL7gI0@1^@s67+?BV00001b5ch_0olnce*gdg1ZP1_K>z@;j|==^ z1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF*m;eA5aGbhPJdq(7e+P6) zO+^Rk1`8JsIejsLH~;_utVu*cR7l6|l+g*pFbqVm#*^GEnngot7SEzp(vM)$7^m2X z(jPqtm|)9iPA4Eqk|aqkUI32G{Wq$r!ptBdAo+OG%%=Z~yT_hD@^E*M{HlOtS8;nr zK~O=7y0Bcp-Jz-&U901!ZFpAPRsAjnve*YhPaNHi+GVfGA1?_vQW23@fvAG|S>Qi5 z_Qk4=W320r{MiM|S$K|fG>vj5?Dsad)}})>J`0`CEk7k?NC1^@s6^PqhU00009a7bBm005cF005cF0ppRRA^-pYp-DtR zR5;7URM81UAqIkRUslE z`S?;*x98Q&kU=3i%?u>JDj>O3e0-xKsh}c>FoBt&_YUt`^I4aU!He;9y%k8X4_r^o zP%X zubHE+s}6&~=D0Z1JfXQ98es@k=+g&#b{RBvfPOA)7Z(#40$M}B@RLw$$%8K*njn%4ki$t?CsMQDOA9+t-8=u> z)=)oID^^3iCHyWqxA@re>O*UU5lQi zI9_EOPuovo)4dGymZzW2T|e${jk*7|c4$cu_%HG3B2~c$8KH-hj@&^vTb+bZ@yYhs zorW%6 zmT}vdBiCj=OjJGhCP(V2##yDhjbz3oX9bR4=|O{y64ZAvMU=X`2s&%?;#u z`w9KrT&YYR*BoH+7@)a`8zoN|%-T*A1u(-wA(8=xaw2U|BlS`glEbn={bK2cbBl5W z!#K|Ie9$X?y*D#H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j8X@>6uW4%&+9oHDuWvRCUhx2bUat`e$|2Fs9-jv$+ zoGqAu{EufrT1`J|<;7*5SN?d{f2mxy6F<|b&hq}&fmS2KOnA{#F|j@2D&~ns`$VhO zYBkh}EgNTTSej^;db@o%aTY{J(m=qToMU#Ik8eM8x%+xP^aT!cp|7W%a|lWLH`&mk AiU0rr literal 0 HcmV?d00001 diff --git a/xui/imp/regular.png b/xui/imp/regular.png new file mode 100755 index 0000000000000000000000000000000000000000..0e5bfe7e285393030848adc8626d3743c903644f GIT binary patch literal 9327 zcmeHsc{r5q`}dgaOAU%58Doo#F=L&vGxjC2M5)YXjGY<#E|rok3dxcsYm{td4~2TN zlO-flgpvs1cT>;yd%wr=9?$W<-~XPO zaB%_jF3;}8N5`-?UI%FYUvv^cAOFR(D}$s1gE)Y3R~-tV4+3Kma8a)O)YSmcyD#Rw z_YVmW=qxb%ebh5BF@vI{kuuVpf(iW@(Hei0rz6gQ#7Yscf~&~BXn{;GB>{%*`o z1qU4q;S90Zg4?F+TF(eKzw(gp+mU_?T;^q@ZgirCD6!CR9VyKSW(KPyv&%8Z?_(r* zPE`mlO&+KXxoXGy*wB93MuUNmICNl}sj;?l*&^}$DVhDWMx|HJk3(KF@X0@4SM#~^ zjAb&Ev2^8D<0&Qwb%V0Xigr$!2OM^G)pDc*HDh#_Guele&UKu$XrB#Vlij!{B|~Fd zDfO?HU-R4ma3pYZ&G=EH;B79iDw~xK2ne+QEXC4>W@BQE zA-KCrcM`qhkD2VSBh3fZkn3z@U39G-p+q4Nyng z?p`FQoV1*@3|z;L;)8;zu|ie6hz^)jSlwR`z)Th9NTYdR5C~siUuj=iX?HI&0*OYW z5i%$Q3Izu^;8cG%8qN>yMit(L_=$lfQ3+lY4;sbY4Z4eo!@GOaRADe+ANsp}t{x^P zf55v@e?~PHec)v8@6A^;_?NRq{qlu&TIk^>4Z zN5bLYXgL%TE{9YgDJl|CvPc|q4{A3L7)>(+RTxTI=Fb%~7aYyO-OE)KW=wJO_WN_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9?@yesS#PA=f%qd{uA>Qso?|PgCIZur2P~HijaSV1#@J4rH)oTrTJndQUP-Blu zq_nr?;Ol%j#iBzhmxk1Yr*h=Kxb-#5mcsGQ(HdeJw|T&=-4do9HEmW$G!LvB}=YinS!tSSkfh3?aB?SV1F(T6-!y9gP<<>x}8Y=gOoR_8rfA;-eqT($px|I z@CJ=e!+i{)^mc;-N3GPd+cu|P9rT0d1zU|+2@Rh%PPu;}x>0)mGw_H@PRc}E&5k|QnP+amR7kWl%^UJaoF&LXW%yE{g(lYX?O@O+_@gj%h-Qqh_N&itW}raAOq#R586Ka26t<`=_6zoUT+bWE|OTJ{nD15yS_UjP6A literal 0 HcmV?d00001 diff --git a/xui/imp/scroll_bar_slider.png b/xui/imp/scroll_bar_slider.png index 216040c67d6e194ea8dcf7850fdd514281747cc9..943003da7c3a80256c39fbbfc7dc1287adf571ed 100644 GIT binary patch delta 238 zcmcb}e1=J}Gr-TCmrII^fq{Y7)59eQNDF{42OE%-|NK93qGCop8@ITC!G$%f&Oot6 zo-U3d7N^fnJ}7uVfrF*rM{8%)n$|@+ePNTt`IMebta)@?@=I8wbAZmIa8YyPlZGo> zRzkLz47kre168f8FlF5UM+OMz^h`rra^R^n#qni}^kD%KGGH)@*qFIc>(Gi!2Q1 mOfs(rA7pYkm04qa&V1vCQuz#Hp){a#89ZJ6T-G@yGywprzgCt2 delta 372 zcmV-)0gL|30?`8@iBL{Q4GJ0x0000DNk~Le0000W0000W2nGNE0CReJ^pPQGe*^^< zHU}^gZ43Ya0VhdBK~z}7?N-4NgCGz*GB!X9)Q}Qr!4|9`C8P#gNDG!=TG$pS!8{T( z2Xd%HXH4RK7|(%Q_I3fHBmO;9;k<;gjD9%h7Oz>AY~L6|07kizIDMN2 z`le|{yXPz{ZNpbF5bR#kz)}{}e_YF1Yu^a~)YTz?^Ub6{Ox93SKIesp#jn~C{Oem2 z!9T|s1hb}CPf0$PL}tAsqoce4BDQC$HAxYsR6eITJW*F8m=8d7%_=V7#ba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7086ff45330ca257b5efb6053fd3fa018f090a 100755 GIT binary patch delta 312 zcmX@gc#J8lGr-TCmrII^fq{Y7)59eQNGpIa2OE$quB!S1q!^2X+?^P2p46!aa#+$G zeH|GXHuiJ>Nn{17O!f%!WnidMV_;}#VPNEaj?aro`Dje>_2cwFZv>mT5%7fVazdv-zR z%pop0Ma?43BKJF*MT)o7-_2w3$Z1kqW9s(h`V^HsmD-%o?n*!j|@ yy;YxnaJi(_&rcMYx_8NUogJ^P-?OQa+0URR-1q3cy+bq5p$wj`elF{r5}E*(HgK5$ literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9F3${@^GvDCf{C|K_4 z;uxZFe(t1;yayCGT+Y8@T2rvupxfE7d-IMa?JtLy$b0!}#y@d<*TBG{%oq?l$@}1$ zm^g+n_r$G!$IQ!KyVjIJ>66GYiB+#YY436tn`mx0{kW`$oZ7w08xLn4H!_}d`f99P sImgNWg&x6g7TcUO+Wa^7oQ;6F!Xn2v9Ogw0KqoMGy85}Sb4q9e0QT}m0{{R3 diff --git a/xui/imp/status_lower_left.png b/xui/imp/status_lower_left.png index 02247af94e7e64324cbfff333448027c382bd183..2ad4401dd7e5e591f154f7dff079a4bd8df1d2c0 100755 GIT binary patch delta 637 zcmV-@0)qY31gQm(Bt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8Jy5%{Ul z82|tQ|4BqaR9M5!SHX3IFbw@r7Vx!4tK5 zFoe8T@9`kU@TIRWp)>$4-g^K*2mv)lL;!%k??HIZTD_}` zaSE=vABN$7zSrJ=)`1jQ#o71$WDhe(XRK`zWoM~QflH1MQIVZZ3@D|ga0ot=zN^Q98Py}TCLC)2W*`) z^FyA$KL!N3{dPbQ;Cu`ZPNXGFb0V~Krl1y_r3blxWc}s@IpA=jNlDu4oIu-LAIJ%^ z23(o2&o8y}Rw=i%tuYIpI=8wCYMPAZUeBeq;`7PTsnG0@F*}U7=b}zoegp8OKSTr} z1UTm)A`lTc=i)tiXE+&);5iX4y}JQ$A(}p9%TU+tS;c6b2m*YLkKl799T{-W#Yh!I zk8vD-A#zP_^!~;K0Lahv7@U6qR$-6h2qKzbO!`2|K&d&|ed+$RMcZiOM=FEU)ryCi zBb~W>IZ2q`n8jhGSKWb0p}d3)j$(MxYW*fxtVZF08M6X zu_|nBrzu(!eMy9i>0svAQuVxbDlSz)wI=2)qFaidh-Ujh)WjZtSWEYtig#aL*&}`d X4=9*J$udTD00000NkvXXu0mjfk~O1=R$QB!3BTNLh0L04^f{04^f|c%?sf00069Nkl3>*jz z_?n|y$d;fMwgqa)F?CQvwgpO9T5t=x=H?uN9ARuQ`+14p*lTmQeYM5 zEVg)$nPW0GhG7UtljtnfDR3zfA}X?T69Y)Ef8Fs)hiiGL_UOJ@pd!C3~7OV;Nk$N{GdEn3oE=LFj3d>|*t8gOO8et*x-TczC6 zb|fr#n%vi?-G3ODc!c)ryCiBb~WnZ(?3*9${rc+w0000< KMNUMnLSTYE(+=1G diff --git a/xui/imp/status_lower_right.png b/xui/imp/status_lower_right.png index ce9f6d64388c2c1fe92b4866b9643a39c64b8f1b..fa7ea694e8f91f992d35537c23b0be02fb06cb5c 100755 GIT binary patch delta 612 zcmV-q0-OD)1ds)gBt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8Jy7=d+Y zy#N3K=1D|BR9M5sSM7C!Fbq6+UVs%eLr3rm=?I>sGkArpzzCT^D=T z_wte$(4F;h799cKxL^z*rS$yGT=fhQ0RVE&=O2wCKGB~F2=Y5dfe7&__)7{Go`c?91)ov zQ_QRZ>00NLi10OJ@HGD)0G^)TANLoS%(LaI)JyPx`rIp?IOP?=0?rfgxbZ3yvht-) z$cXf{2TK8`L9Gv467qR1$GUDVcYy@gmno)jnaW8 zA@e?e4hclOdG6?32$phbGDS2r2`|LVd zU<=fc61Ih030uq6uq~toOGpj0UE$93~&LbjgO-;>5!XhG+Qf4juX&xB^wLCi9)F1^jRn-3^?-z}dFc~!g(CD+z6YE~;C@}UU)zqYZcbN$2Djwa`h*Cz zo${@(O+ft{twmT(;Aeo;HHBy`?~K7)u~zS}w%I)AToSu#?ymP8a{X5Iv@I*xVz zBHbJTpZkDBA)4Xzkn!(B=^Du+yPs0pwEAF(PA>iY9X1KHIW>}bGvS^;CmI|8x+A-n z%j*++!f(N=BVhZ)*3c1w13-IZ_t9{9H0*8!w(?i|d|GeTMzRM!YpbLG4;9699K#$e RKL7v#00>D%PDHLkV1fzs@tyzx diff --git a/xui/imp/status_middle.png b/xui/imp/status_middle.png index 9344b80da8e1c725dc0ea4d854e869931dfe13fc..239650139a8247d8aca422b3580e32fd675cc55c 100755 GIT binary patch literal 678 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911L)MWvCLlCbx$lZzY=1HA;AcrO0(btiI zVPik{pF~z5Um@8e$d`ekN{xY`p@o6r7f`6-1p`B=0RzLU1O^7H84L{K1#@-<+5jau z3p^r=85s1GL71^(seKtxkiEpy*OmPx8xOCH7O(7DEuejWJY5_^DsH{K?8wW&z;VRD z;nYv@lhV9fgr=Nn{17O!f%!WnidMV_;}#VPNXiSK;ie@8yS?_FTQh@Xl_IPh4uv z_G#OGr!rPO{$_dhjiE=MOliIi7t;i#tQ#h)9&fE%sKa=KvCu(AfE}6oVam>zBX?KP TW4miJ&^-*Eu6{1-oD!MZ1E z;uxZF{_VtroCh2@Se`%8+Gx?eX~$|+{(~Hr{GU##?-NNYjbu+qI}p{qFGRGUyz{3| zxI;zcrMIv1&b@u<)&9G8!6L!t-S(-*ydhgAGb-=ayTkKE>`(oVfBfRJ;?kyuI!;^! Pw1>gd)z4*}Q$iB}S4KNs diff --git a/xui/imp/status_upper.png b/xui/imp/status_upper.png index df5aac98abf9cf8aabfc0207b6660a0efc114c1c..55cfc933c7ddc0a60724ca5155720310b511334e 100755 GIT binary patch delta 313 zcmX@gc$_J#Gr-TCmrII^fq{Y7)59eQNGpIa2OE$quB!S1q!^2X+?^P2p46!aa#+$G zeH|GXHuiJ>Nn{17O!f%!WnidMV_;}#VPNwFxOIJXrGfqNs>5;x%y|cRcQBeiV7t?>RL{%0_t{g$`Q|{EGI+ZBxvX66GYiB+#YY436tn`mx0{kW`$oZ7w08xLn4H!_}d`f99P sImgNWg&x6g7TcUO+Wa^7oQ;6F!Xn2v9Ogw0KqoMGy85}Sb4q9e0QT}m0{{R3 diff --git a/xui/imp/status_upper_left.png b/xui/imp/status_upper_left.png index dfb727fde3896d90c104371e7f8091aeb96228cd..6f2ed9a0c77b9eaf242a008ce7ae17f8a6baf9ad 100755 GIT binary patch delta 621 zcmV-z0+Rir1epbpBt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8JyCO{N* z761SN?@2^KR9M5cSHY3PAPn5(+yLKus)eKkTF8|^9rwH%Xdx|7Laqh1!1sQ>M}mW8 zgfVfL@nm9bR$56b`GEB`;*IOD2JW0wH@)`&0BbFXNPVWZKh(gjwP5DrW`5w>GqwF= z4ZLMJ=fKQ=MG$6Q-5+|uLkNp7FtbYYmKL<>rLyazDl zKr{H-+L{YT0As85A%y9m8b}WVZ(X$lo=)}|uQp;uL)eJ5HrhI5If;1gy zWkFK@>N?h_l5_>*s+5=^e{Q4OnYVB^G+T@6v(2*Ra>CyB!3BTNLh0L04^f{04^f|c%?sf0005hNklI(~*B8cGvuMiu z`JKd(IHj=M5U~YZ9s5R0CV#m~aHf>r(n&~o?>>JI&81jo zKMkyNxK>hoz*hxCE)9G%Lwd*Z#RK-5lchqB^<8z~>@}V>dRcSg#{_f`*6Ku${4N2V zj=Da`SpMww!)Y$4)qyicaF>9d?Q~XnL{3Y?@;k5PV^b0N$OV6Y9fOww270mp0000< LMNUMnLIPld%pB}# diff --git a/xui/imp/status_upper_right.png b/xui/imp/status_upper_right.png index 618735b5c731f578d5f402fd8a9fd9306341be39..f81649e0c029ad9169c70ffd0a0517fc8ee0c3d1 100755 GIT binary patch delta 655 zcmV;A0&xA;1iJ;0Bt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8JyGFr}| zYXATO5lKWrR9M5cmtA%2FbsrebCy6Th(ZfN6j}%dWe6<=K_~`M2!!01Rq9nF$8K-^ zvS;%*pQVwa+yLzO+jYA-xid3}D7>K73IJf{DOC|cDaGzjA?^U6s^Lk4GI16e6K4i9 zqth zc_xZjdtc;4u!v=W@LARagc5sL#lRstTcU zn6ZU_&<%K(v-qi`-Lvn#_qu<8hiLOIYXOmV8(4QH9BIWiFSM=KhuBg#+=>at8ca(wAN8bJ455T#>Qy#4Zu4BU-C6p5LSQ@h7@ pZqrfw0W<_)5K|Qp0DBMs_y_5!{}-0)4XywH002ovPDHLkV1fvaALal6 delta 574 zcmV-E0>S;e1=j?SB!3BTNLh0L04^f{04^f|c%?sf0006BNklECt8cpO0z>eP?Q|sl<%pjt4 zLMa6Rz|2FaB7${YZGDx*4FFU%eQBf&oJIP;nZe8`r5K65Mt@>n*A=Rok|?DNgZsIj zL@m{~s}M$TdHk0O89$#zx*{<#^G-x4rGSV)L{0FTX0nL+b(tpSk&}CESlVjoldwlE z9kYqhw9o<{s)P;_b5HnUX=Nw2LqvVFNX)%qe`nN4JQ-07Jf1#A!9;0-&WtM)=0V^p z?9mBT75C3)0)HQ0bRv;CsK*hJ+y{IfIjMkue+0Tc{x5)T!2MJ4@%6t#9yvaU)a?9r zRfd^0^H$)`u3Mc1fP=^(^k~HyP^NMNrzJdJ&LsT$nonF37#SWslIt1sD}esD_UzXP z#E`!`ssv*0R28zUmm#O+xg1-%N~?e$^_huKRUxz3CMFkz$z?ClY=mM(Uxdrwc0 zMWJ^3T5D$39Lw-WBT?%oeMx3M&_yElgfSvD@R4iN{!Uxo0=J%FYD9787gOQEv(hyJ zt#8389XF%k{^pf^ny1b^_g5~bw#H6w-I2clO#^!lUE?#tkq7{M1DBfiqj?D%=>Px# M07*qoM6N<$g7}gOOaK4? diff --git a/xui/imp/title_bar_middle.png b/xui/imp/title_bar_middle.png index 444f836d2a3e02c3e7c4f3474802788f8f9f384c..767d429ff73384f8cb7270d2b14353702e131b6f 100755 GIT binary patch delta 210 zcmbQv_>FObc(4Hn8v_FacgL>9K#H+A$lZzY=1HA;AcrO0(btiIVPik{pF~z5Um@8e z$d`ekN{xY`p@o6r7f`6-1p`B=0RzLU1O^7H84L{K1#@-<+DufGC}A)0^mS!_$;K_t zt70m(R|%-t$J50zB;xSfX^y-M1{}=0Su-;n&BDw?&l(k_Ke%*gu@J+7>S;?Ji@2mk z3A>d4kGFMGa;&J@#HAh|s z0}khld5%(16MComy7EuxZ=5d1=W+SDN0py~(dAhRyQ<4vxu?a1USqi)JMnMV8&05h gF!<5EZO?o8qr7~=OJhC1frLC={an^LB``Jt0KK6t{Qv*} diff --git a/xui/kobold/fill_bar_base.png b/xui/kobold/fill_bar_base.png index 9700b8d8e6b9969fb63173b72f545a00a4c275a9..6edb90dfeb62f59fcbe6cd4775adc19c40ba01d2 100755 GIT binary patch delta 241 zcmZ3^IE86~c(4Np8v_um+MWa?8H9x(lT m|4Lkfz34Zl?>moukJ~Q%uz@$H!Vl*0@ delta 152 zcmbQjw48B*c)bJ%8v_HwgL2y+K#H@#BeIx*Vdg0iW_&zxi4ssS($mE;#N&8!f&?ow zuf*k^%l|H4Vp3xR0#!#_XSFTBD^q`7`1|F5F??qPNcd-~nca6+0UQc~4DV6AZM4!PC{xWt~$(695aW BHkJSY diff --git a/xui/kobold/fill_bar_middle.png b/xui/kobold/fill_bar_middle.png index 792516403a2602be728546bafdc0cb098931a0e6..d14294445ea372076e90f25ca991487fc85ae6ad 100755 GIT binary patch delta 242 zcmZ3@IF)IFc(4Np8v_um+MWa?8H8~fW?M7=3i6s1lfHxb*22WSi)K9EFij@8f_c~Pnb-I`&a9EWpz`*X?2hsP n`v%qj2`68hO+PdL&r?Q`CEL@hrpN68*~{SR>gTe~DWM4fe{EFX delta 156 zcmbQrw3=~(c)bJ%8v_HwgL2y+K#H@#BeIx*Vdg0iW_&zxi4ssS*3-o?#N+tesg9fs zhCD3ls%%+`Vp$Kj%sG|S+3NMebH{Zj=DYs$n0NDRJh)qMnXVAS)l$;~R*Gv+92fRr z6pV6kp7V?0{Fz$}%w=zRugG0tkD1JGQ0e>e#CP@oPeqxh_NP}l^i2R-#K7R`>gTe~ HDWM4fldw6W diff --git a/xui/kobold/fill_bar_right.png b/xui/kobold/fill_bar_right.png index 186aeeff2b4fdb2dabede9f976faa20627328750..01dd0bb942639547d145513ce6683601e5056450 100755 GIT binary patch delta 669 zcmV;O0%HBn1iS^17gIn81^@s6dyaLk00001b5ch_0olnce*gdg1ZP1_K>z@;j|==^ z1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF*m;eA5aGbhPJdq(6e*gz` zNliru=>`iI0}B91t@Qu^0uo6?K~!ko?N_mpgD?fRXM2{s!{Dzw3@BZRfA%c71JCZ4ifGT0D^T>jL_~9z++swhClS^#!jxEy zNl!GT(TC=$_%i?_}xa&|mBU;!dR zr>9j)8S@LkV@rSoZ<3p*neI7;dpUmqfN~1zN8wummJROc004J%aNx%af9}_(V6R*h z$d}oYoD_i+;qz{f<+D^e8m)CCz#8`CvJyGuM?~C~E`E+?mI45)ZZ8250UEGoj4G?e zKO+**50mK#8VUr0hBXXkK1>p(fS_loSY3gB&|nzv0R{3RbgyS67r|mP|6%)<>RL77 z(u~2ZUpHeI?MIyM^)9)1f2<+epIVNQ6tNVLOD?nEoiPV?MT7{+mrYE_!}87&kP@+G zxGnO9fF_xO+;rrShmlJsycIPVnj2H9L-}poH&`4geDj=F{-kfLF%{9RMG6 z1oZ2h@Gqs{U4OY4B$e3`T#O(_`1y9S<+G!7G}hV`0q-<{$4HcbpCR#Bs`xp&Sqgwn zwbz)4fCcZyRb{pOvaJa8!z4PvVh{w2cZ#Z>2FX((*jXwzBhU{P#U%|GB$2Saot50m zJiGbN+jp$4O%X1|n9cfaG3MU>kh8sg3m!Grh`gU#L4P?Uu_RCm9%sR;U=F+`ky{SF zY+?~SFYh7(MW_qG#w@2x#zJHKB^jw%!L`NBjO!-o;A2M6(6-7P6pvQ zx63~_B%dp?FE6$r$u8BCpBf(s7xBnMJ5;=iV&yxnO z^!PX_y*tyShohXY2m~jWCz{Lwi@}Tbgf-`qoUbErBY_&vi}r+PtoHBtKO^4hH~M{p QH2?qr07*qoM6N<$f`!`+=Kufz diff --git a/xui/kobold/monospace.png b/xui/kobold/monospace.png new file mode 100755 index 0000000000000000000000000000000000000000..074f192aef028bad1c66491c76b85a69ad85dc71 GIT binary patch literal 6376 zcmeHLdpy(a``_fSbfhRGYp8|U!OXUtViQH=^f)D-ZJ)82u`R}uQcv;-KaomBMX5|V z6KYAq^euWsQtIi^QFzip%9HPBqtoyAeZ79KUccY-U)$^6ecji6ectzVy|3%OW>P%X zubHE+s}6&~=D0Z1JfXQ98es@k=+g&#b{RBvfPOA)7Z(#40$M}B@RLw$$%8K*njn%4ki$t?CsMQDOA9+t-8=u> z)=)oID^^3iCHyWqxA@re>O*UU5lQi zI9_EOPuovo)4dGymZzW2T|e${jk*7|c4$cu_%HG3B2~c$8KH-hj@&^vTb+bZ@yYhs zorW%6 zmT}vdBiCj=OjJGhCP(V2##yDhjbz3oX9bR4=|O{y64ZAvMU=X`2s&%?;#u z`w9KrT&YYR*BoH+7@)a`8zoN|%-T*A1u(-wA(8=xaw2U|BlS`glEbn={bK2cbBl5W z!#K|Ie9$X?y*D#HoJnD!>}=JoMN|lY3km_Gh#L_ppo(lz3S25A%hgyEQeh$tw?X+q zb>zt7gGiz|(Hw`Ni#Ra^l&w0_n$KcWJ!wwU5YWm76($r$QL)(A*jV#e3v(Vn6pN=& zC|Dc;OCVq%3ydHxQV57Jkpe?G#1sY%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xP^aT!cp|7W%a|lWLH`&mk AiU0rr literal 0 HcmV?d00001 diff --git a/xui/kobold/regular.png b/xui/kobold/regular.png new file mode 100755 index 0000000000000000000000000000000000000000..0e5bfe7e285393030848adc8626d3743c903644f GIT binary patch literal 9327 zcmeHsc{r5q`}dgaOAU%58Doo#F=L&vGxjC2M5)YXjGY<#E|rok3dxcsYm{td4~2TN zlO-flgpvs1cT>;yd%wr=9?$W<-~XPO zaB%_jF3;}8N5`-?UI%FYUvv^cAOFR(D}$s1gE)Y3R~-tV4+3Kma8a)O)YSmcyD#Rw z_YVmW=qxb%ebh5BF@vI{kuuVpf(iW@(Hei0rz6gQ#7Yscf~&~BXn{;GB>{%*`o z1qU4q;S90Zg4?F+TF(eKzw(gp+mU_?T;^q@ZgirCD6!CR9VyKSW(KPyv&%8Z?_(r* zPE`mlO&+KXxoXGy*wB93MuUNmICNl}sj;?l*&^}$DVhDWMx|HJk3(KF@X0@4SM#~^ zjAb&Ev2^8D<0&Qwb%V0Xigr$!2OM^G)pDc*HDh#_Guele&UKu$XrB#Vlij!{B|~Fd zDfO?HU-R4ma3pYZ&G=EH;B79iDw~xK2ne+QEXC4>W@BQE zA-KCrcM`qhkD2VSBh3fZkn3z@U39G-p+q4Nyng z?p`FQoV1*@3|z;L;)8;zu|ie6hz^)jSlwR`z)Th9NTYdR5C~siUuj=iX?HI&0*OYW z5i%$Q3Izu^;8cG%8qN>yMit(L_=$lfQ3+lY4;sbY4Z4eo!@GOaRADe+ANsp}t{x^P zf55v@e?~PHec)v8@6A^;_?NRq{qlu&TIk^>4Z zN5bLYXgL%TE{9YgDJl|CvPc|q4{A3L7)>(+RTxTI=Fb%~7aYyO-OE)KW=wJO_WN_g zlHy9Tpy76dhE$Y8q0veT@`^~L3>y6xX={=f6)3n}%)J)5Cr%__bOA&hP&gD<9GQgh za3k++?4|_+I0FP0w_B$G^4>b&3r5?Egrm88S-QKssKWl}x_@k&0LO`lqv5bP8VS($ zM<2HQy$_#|L1JWnTDA*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y9gP<<>x}8Y=gOoR_8rfA;-eqT($px|I z@CJ=e!+i{)^mc;-N3GPd+cu|P9rT0d1zU|+2@Rh%PPu;}x>0)mGw_H@PRc}E&5k|QnP+amR7kWl%^UJaoF&LXW%yE{g(lYX?O@O+_@gj%h-Qqh_N&itW}raAOq#R586Ka26t<`=_6zoUT+bWE|OTJ{nD15yS_UjP6A literal 0 HcmV?d00001 diff --git a/xui/kobold/scroll_bar_slider.png b/xui/kobold/scroll_bar_slider.png index 67ade15afa31a6e30f851cbc10a7685512796367..82ab1d22c8a20b91d05f574c9e3cef605182cbd1 100755 GIT binary patch delta 372 zcmV-)0gL|00)Yc+iBL{Q4GJ0x0000DNk~Le0000G0000G2nGNE03Y-JVE_OC0drDE zLIK&yEPnt100d`2O+f$vv5yPfP?@5`Tzg`fam}Kbua(` z>RI+y?e7jT@qQ9O|$7=H(JNliru=>`iI0Xh1qp7#I%0M|)GK~y-)rIWD{gD?z5 zp9u}6R?rGr!Lwur%9PBISy+J;)TUIMjubhFF*Zjo>d^VUL*H_sQi9Iuw_~AnF4W*F zw@q*2QIv!dti+PEC<#Zf>-gzgtV+TWtf~N*Syd8_;8akPTm+p3rGG|s2l^2c@aqQk~t}27g4Rd3VVeK!uEY7Z)l2lXQ`CxVp-zB&{3Oo002ovPDHLkU;%>b2$8b@ literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6#VV! z;usQf`0ezAg3SsdF5>NM8Hw2&#kx0%W!)4DVzN}R`r$ZP(qqqoqZ1`7{r|Sdwoev4 z(9-vsap$eN(#a`{rp>GA&|VUBDEy&Hi>PDq{O##1o(vvghps-@y_KaSw}k84nV3Vd z2S5K_c7A;^XFcnC)dbZ~_YGMM9BXRd$sgSQnU6=8BjHxNK}MSZ_m6J@+&25Yta!HD zpF7QDP&T*u5s&c|;k-EK1P-1?MFW<$0|Fn+tb}b^I^!Bu_*Yh{0eSfjvs0>44(ZO} z5PW#o`i{L*Cg1jxKfXo$+c;xOm`UN^bu&b+o>_8T?&_IC`lmCCRab{>iLxv$zy4XB Yzj^cbjMV{=z+hnTboFyt=akR{08d7P#{d8T diff --git a/xui/kobold/separator_center.png b/xui/kobold/separator_center.png index 67ade15afa31a6e30f851cbc10a7685512796367..c848a49ca0beabc5dba74281ae447c5c3f5eaf72 100755 GIT binary patch delta 337 zcmX@fbe}1!Gr-TCmrII^fq{Y7)59eQNDF{42OE%-|NK7@NHG=%xjQl5JgHL;DlFzu{gbS@@q}Tb~lLs`Dmy+WraA z6BXKbG6?I3i*~H2V~dqyo_=KEUzx}D!qG+ZkGz(MuV1pWI-SX@LNL$W%JygBi~{kc gHZse;l+Ce!HDm6t{;ghrfj(gHboFyt=akR{0D1s>LI3~& literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6#VV! z;usQf`0ezAg3SsdF5>NM8Hw2&#kx0%W!)4DVzN}R`r$ZP(qqqoqZ1`7{r|Sdwoev4 z(9-vsap$eN(#a`{rp>GA&|VUBDEy&Hi>PDq{O##1o(vvghps-@y_KaSw}k84nV3Vd z2S5K_c7A;^XFcnC)dbZ~_YGMM9BXRd$sgSQnU6=8BjHxNK}MSZ_m6J@+&25Yta!HD zpF7QDP&T*u5s&c|;k-EK1P-1?MFW<$0|Fn+tb}b^I^!Bu_*Yh{0eSfjvs0>44(ZO} z5PW#o`i{L*Cg1jxKfXo$+c;xOm`UN^bu&b+o>_8T?&_IC`lmCCRab{>iLxv$zy4XB Yzj^cbjMV{=z+hnTboFyt=akR{08d7P#{d8T diff --git a/xui/kobold/status_left.png b/xui/kobold/status_left.png index 5a0b0cd19a84c92cc909567b5c83e41122f281f9..e8bd43d3186f470d9644b9b460c62c6e9b483e8e 100755 GIT binary patch delta 347 zcmdnR_>w8BGr-TCmrII^fq{Y7)59eQNGpIa2OE$quB!S1q!^2X+?^P2p46!aa#+$G zeH|GXHuiJ>Nn{17O!f%!WnidMV_;}#VPNz6q^5j&Ewvs-@&@^^aPdF051Z|&kIsvASot6aVQO`hlHbdF)h&FH$=@H20|WE=>aSoPo2|L!*%`A@!AT%+ve zUaq|QY#RHi_tnZ$TdSAEe>?EzOuOulqs*I)?O#o|HL(7?xb7yHbFlG&LxF;YfD8v8 j3wskYnET+pOa;TGy&{JgXDNe#Ap72HUM?|mDtQ_0_dFKQSj>0p`*D_f f_ImdFZxfiW9V-3BINn{17O!f%!WnidMV_;}#VPNgE4ju= zF~TQN;L>^1%IluR^tDR}%tq-YF9843`#Gk(JPcPmXZDl?GY--G|>TNS^ z=H?$z{yed}{F$=&`!nu(_h$CnxbnMzVaglc5bpHq!yoRm&0{%nK6J*+)%QFOomsHz z?xgAaBvx$Q^~(L+PgaJdQ}m?ubt7yN9nP$==E~puhgIn0woM(6(zo0>z!+}UKJ!|w S;ai})89ZJ6T-G@yGywnr?0H=P literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{D46Z( z;uvCa`s(C^ybT6C%(5?-);tj1@_S{ET@A5NfEG^mH`>APxU4p_&?$l|Ag(Xgk fS*ra0ZybAqF=>_Dho$R))-rgy`njxgN@xNA?+`&Z diff --git a/xui/kobold/status_lower_left.png b/xui/kobold/status_lower_left.png index 3d3061aba8904d7b85bf07187a73db69b5ac62a9..962f11a8ecef2c889a8b38fcc402021b563d67b2 100755 GIT binary patch delta 650 zcmV;50(Je=1hxf`Bt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8HB8cvfr zNdN!>3`s;mR9M5cm)ntpFbqWxOd6mCwLlB5#Vuq@*lj_zxCL5J3zU%kAohSU*svS_ zi&d2(}Y{hZVq8h_!GHB1TxSjW|FjBCiNwW=%Vv4Msc@i*S5DNLl#oI1)gNL=Vm?~M1-BDVp>{9@O-HdnC^*tH5h6c-j=ohKD2u;yrzH}l)whZtCD~sg z`c`ox9E$%1q6lzDyal2OU^X^a?232|Vzvsv6qYO>kYqGh#cL3`Z6_xzh3Kw$DWCH7 z{Pw77n-P6-_3PaN2#x_ka838P)j>N+IQb#CN+q=;v0b255~5v z72>LR9=+box+t9YhG!7bC!&3~?mX|d`!`jWlbu0CpIAqvwRYq!|6}z-2fXr5XAO~j z!onugXKVozs;zxKd3A*c62#evmKT_#d!7q9n^_tILkRm@P&$qyvuYJzZ)QD#6(dlJ k#DA`Q0_!Rde|&WR1<@k)$kNfs0{{R307*qoM6N<$g30|8B>(^b delta 571 zcmV-B0>u5c1=IwPB!3BTNLh0L04^f{04^f|c%?sf00068NklrG*Me$M3$&mXD1rOntO3Wyf+YS4Gceg_Sz1d25v};}Qq`gL?vWo- zN>Ei0k^R1FG4tAj2mnAtVCI9ks&@bQ_nYzi%{_6Xl+cQ_0e@VD*bDa{a)fIT0}-tm zKvi8kUlf>-Fk=(W&m+}^%ZTic!vJz5L3KMBn2Gonwfu-`2J5F$np2+>u?UI!&a zGpetjRL_Aa5)@)NFoJGFwCsB?Uaf+WV7HvP-$jU)cz^A>uI9iLw+P&UIJ>yqMwCnF zDnxm4_3ZofF1QMD*S>?tOnMM^#SZ|vAIxo;7vidT8NHyYLl!Q3!!wBN6WPAKJ1@KK zkSCXt>`*QLcDjyic*@#wNFs(W- zg;mwYKr|6~u7cWew9LvYzTeD#0;@)#7KwMRasnGVAAfvw{{yDz_+bVw-1Gnd002ov JPDHLkV1k&B0`dR= diff --git a/xui/kobold/status_lower_right.png b/xui/kobold/status_lower_right.png index 4db83b499b3151a5f0f2d76950f92de990c79424..62875d3efa78c1f1d2ba8e44b67395a4afde8c14 100755 GIT binary patch delta 662 zcmV;H0%`r)1i}T7Bt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8HB7@(b4 zWdHyI7)eAyR9M5km(g|PAPhyXIn#h!Pz$s`Ewqr7khDN8wBQ!hf=kGLu&@|o8#~GB z$1^@Nz7O$`vp@bW(gOAJ_iB_e?1^5~ij5!vru4F~%0zYBPOnh8_G>L0gopbP)52-CaSgDdgW z;ZH?$1w4U|h!_&EDw`vA2Yw}D)e8YjOfH`hR`e14N<>?>ClUD)k#35f!h3#d$3?d+oaG0qbPbZtsXVYh1mGYtD|)T@h{L>Xq-@bMkY{)j1v&Fc_Z*VXXJ4_&xWtjvf7GBbs`o)BXFQxLkOtqWbW4X?Cf@1 zj(SHsVdZsQ-gtlOI{J3fnO;k%LSPUowE wE&S-6poNzVw3G2qMV*Bnd?VmD;|LD$2aEybMliSrTmS$707*qoM6N<$f=XX14gdfE delta 577 zcmV-H0>1si1=<9VB!3BTNLh0L04^f{04^f|c%?sf0006ENklJn3$&mXC?Wemk3Q}7t0EkNO|D1X5tB1-tB1QtA{ba}`w zfJelJ1FWCdjtZ46NE& zMD#^ONGWB7J@5_3YJH$wiWw2F?+i3oP6!ux{$BvL#PEoP2nGV0Th}Rs=vuoH4#0+g zFJLwku7s68u7BYGO!&WwFpbE93({kU&x$Yw%)om@bP3o6r!6)DZ;9BYAz({Km#-k~ zkSTaeL~YxP`hb<9S-90tb-aBea^df8Bo8-#%1jDC-_Cc$m>@< zV053C89LLBR}nS*awHp>d?m1k-@Oym@SK7AWc*W6X2F7=1pH>)!2#e8wq)O-1eK1~ P00000NkvXXu0mjfj4ci} diff --git a/xui/kobold/status_middle.png b/xui/kobold/status_middle.png index fc8774ac1bb6f8f26179a3c6a27d77e8f85882a1..533fd7f0534a47aec9b83bda3f0f11bea9a22925 100755 GIT binary patch literal 1482 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZzY=1HA;AcrO0(btiI zVPik{pF~z5Um@8e$d`ekN{xY`p@o6r7f`6-1p`B=0RzLU1O^7H84L{K1#@-<+5jau z3p^r=85s1GL71^(seKtxkiEpy*OmPx8xOCH8q4a3K#|NlnM|E#mO zm;Lqc>4Q1Oe2-L~mY?16d7ZtP;Pcq}9Hn!+|6O7%xK}F6 z@I3K4W5GJ+4V@PHyZ9PDZ+OjMF`w^%+M^mPhS{CPvJGdC?BqL;_UO+Rpu}~?8!mIi zW7!W>-Y8|5ppnLfU=={CeCEstNdVo^@p%!@cK+Q!_q_y}4K#8l z$T2=3tJKc<10{ei1$y!#(Drtq`+k;y%mx|>RROe0`1x|61kf*PkM_I(+I|@5K9C}s`K+@pajsR!i8}q(9i+;(f0_*NQeq>p#01n4Ytu>8%=F=&7{u%*xPT# W_U*VOkqIn589ZJ6T-G@yGywpy8+z*i literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6wL5+ zaSVw#{PxO5-UA9eE*C%dK8my{OFOCM+3lw?_in)!d6kxn+$pv{BBmZFWu7~C>i_oL z*5$LW%`Pv0we0TZ(r*#}4;(qOwYcipElb;T^lM(YIjHx062j?DW5 Z-27iAo;V+VGa6_ogQu&X%Q~loCIC{!M>qfg diff --git a/xui/kobold/status_right.png b/xui/kobold/status_right.png index 2b472066342b0c6b126d3db596803a67a6596460..d6ff0ed75454fa38532e49167a74f8eb45efe407 100755 GIT binary patch delta 340 zcmdnU_=qX1Gr-TCmrII^fq{Y7)59eQNGpIa2OE$quB!S1q!^2X+?^P2p46!aa#+$G zeH|GXHuiJ>Nn{17O!f%!WnidMV_;}#VPNqEc3v*`HnmkzhXyzV!_g^P=?C-obD_VbV=l72u_Y-aoX?CmhQxi&`?fzHHHi`LU;}eG>1Rr6&fg>+ Vdal2J3nS1v22WQ%mvv4FO#nlIIzIpa diff --git a/xui/kobold/status_upper.png b/xui/kobold/status_upper.png index 8ba8817e9dae9ab55a22810a50821e3684c7f65b..277f26eb41c2906370438372c471eb995a2ab2ee 100755 GIT binary patch delta 341 zcmX@W_?RiHGr-TCmrII^fq{Y7)59eQNGpIa2OE$quB!S1q!^2X+?^P2p46!aa#+$G zeH|GXHuiJ>Nn{17O!f%!WnidMV_;}#VPNEaj?aro_2N8ZB*Jg)J3gfv?H6-9bfE!ftG zcqxjoEwt8swP@AytF}6JPhVSJnm+f2X0Taa&r8>*`*~Bsg|~(+iO8Ka;Yz|5v-0D2 z87H`G@mo42H*(rD9)%!j^Wz2|PFUKjZd|9$@YzN}Sl znzOuKgx{aPO|xJB`E>P8-=uHn)<3(ZE<5$D*Srb&6K&t`bp5{Px!B#$^P)@6SO5FU kc1%X1IN?m={yEI~=N_fkPu#jP73d2FPgg&ebxsLQ0Md+u9{>OV literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C|Km_ z;uvCa`s!szUKT@+)`$D=8U}EmXA-**B&)qfEQ^s_dtvdcd!GE0pB@pPBrfD+`0LSv zb@B&yGd{c3!Lek{Y892YiPx^)Ei7kHnOORA?|Q>yerzXp6h*veuQ~HZyVFvgVXdi= n-Mt509kr8|pWpH4zwzDLx#6?Z*}|BBwljFT`njxgN@xNA%0oqW diff --git a/xui/kobold/status_upper_left.png b/xui/kobold/status_upper_left.png index 4db83b499b3151a5f0f2d76950f92de990c79424..d7d7d88cde4369cf746987eaa13578a939f7a865 100755 GIT binary patch delta 657 zcmV;C0&e}<1ib~2Bt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8HB4pd3) zGynhs6G=otR9M5km(g{@APhyHIa$CfXa!ba7FK9SXjjlItl$;2f=6gS98rvAgK1j* zr15ccACh>22^T>`U-;vguHZ37hzN)%f4(Z1835qU;2{Js^A0W|yZ1id8K3Vw1dlP= z0uMm(N55OA>fQtk{>sBVrMT z4|Liq)?(Z!e8v&t5wRpW^vYE@BKjgCq?EG49{7T7wLVZT#fXTvAFxt13b*>Hj<=5pX106aKf{%)1pq?8 z3<4qCw$-!MdqfaIHmbLeX!n2*1VPF@FoT9goY{8?H+R8ITj%HR10v4g*0?r%zz5om z+dCqEt_GLoxbA8T-4#&}F3Y}k=IHOZ);{hP(QDtD0e$9r%%mma&g`f&@aS>0ZQlQ! zf>ea^dfT8r3xB4t56Z~*y}nIWKlCoIdMK2etCY z^=!o|TL#oGvT+&v{0e>$aOe6}4;bC&WyZ8X<5ffrKOD*KOuiCW!_V#n0z&=jq&MJK rUOcTVlq(MeXacAIxPpsuiBS>Xofg>2Zrp@t00000NkvXXu0mjfdrlkb delta 577 zcmV-H0>1sd1=<9VB!3BTNLh0L04^f{04^f|c%?sf0006ENklJn3$&mXC?Wemk3Q}7t0EkNO|D1X5tB1-tB1QtA{ba}`w zfJelJ1FWCdjtZ46NE& zMD#^ONGWB7J@5_3YJH$wiWw2F?+i3oP6!ux{$BvL#PEoP2nGV0Th}Rs=vuoH4#0+g zFJLwku7s68u7BYGO!&WwFpbE93({kU&x$Yw%)om@bP3o6r!6)DZ;9BYAz({Km#-k~ zkSTaeL~YxP`hb<9S-90tb-aBea^df8Bo8-#%1jDC-_Cc$m>@< zV053C89LLBR}nS*awHp>d?m1k-@Oym@SK7AWc*W6X2F7=1pH>)!2#e8wq)O-1eK1~ P00000NkvXXu0mjffane} diff --git a/xui/kobold/status_upper_right.png b/xui/kobold/status_upper_right.png index 616a8b55797862c5cb8c77f0065049d33ac35c15..b037126d2c0a28974ef727570a0b32916aaf7b27 100755 GIT binary patch delta 797 zcmV+&1LFMW1;_@FBt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8HB3R5I0 zEdT%lo=HSOR9M5cS21$qFbrJl(zs-s5?@ezCBBd^=nF}iGWi0&p!Q09f$f#}g4*kR zg+iL5K#877*jQuQ+9j}9fEOaV;fI%*U0Qoj>0z2Cm>GyDe}2~zkz0$z002Y;5!ry7 z+3AZv-vpn3Z*m5XX`0ZAbSCg9i4ypXM2fIS;zC5XM8M3tPQDm0VnW0UoSp;uz;#5* zbYuc45~>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rM}j#z1D? zSAmv}ky*`x*N3SmFf{^NB))U?6WHbC;U6E}{{vY}O66k(s*L~u002ovPDHLkV1g`E BNIn1n diff --git a/xui/main/fill_bar_base.png b/xui/main/fill_bar_base.png index a00e65cdc3ce0d0aa6a178194f202ba5994357c2..4095c1fb99c3541298811840ed6b46f8efa1eadb 100755 GIT binary patch delta 184 zcmb=s%Q!(iSb>9$fq{V|ZifYsVk{1FcVfJGQl}osVM%xNb!1@J*w6hZkrl{SNcITw zWnidMV_;}#VPNEamTas2HSM_vX6k;4}n>(_1$(3voyUa^*KR_wGF)vI+UH`?w!(7?#d hmUoU%VbT(F_CEamTaXdLeg7vVR z!M^J6@9cGT6Bcddchi;FnsB8lkh??k&A0$C>U^sY;{lUHchjf5?89ZJ6 KT-G@yGywqqFep0! diff --git a/xui/main/fill_bar_left.png b/xui/main/fill_bar_left.png index 718b784a74c757d04b79fe740bb22d2eac2d2c8f..5019a64a664a52ed16d0ab8752a8f2248d859ced 100755 GIT binary patch delta 450 zcmV;z0X_bm1MmZoBt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1qu}!5(B$s z_5c6@MoC0LR9M5^m&1MI=;Ag4c#GNqFzy76nA)wgx;V zVT{qCgqp(vsI}mKRlQk3yE1bZRzgKP1v7UKQ!p)Yl%}$pGx{*I9L(9O5-E5z?IJR! zZmfY9eU4isA|o&F2Wlir;8`obM4}X4)Rd+qa_79MA)Pmq)BcHwPLXrlbj2ZPH+W29 sSNM{Ih}>w;m`m&q5B`+?2mUni4bYKuX7*;9Bczz`*b-fq}tl1_Oh5!JJ)zHWL*kQrSy9eO=jKvT=)x zTh&`s%>pX6^>lFz@i_kW>Oo!x1)jqW%@T7uH#6}xescWA^nJyZ9+mba<`qnni%Jtz r7uGhv}%W;&J@#)s4Ii z3JgpKuUqU8{?BFAve0nD0Z|o$E6xVY9ZZu89vuksEZ=b3v5|?DYtOn&{m=hT@A0qY Vzp{dJMhVaq22WQ%mvv4FO#q%OE2aPd diff --git a/xui/main/fill_bar_right.png b/xui/main/fill_bar_right.png index 7b0d2b3f5bed8f1969913857e2b599906f897425..ae9d6bf59654b160b20a934c71460bf31773e07a 100755 GIT binary patch delta 145 zcmdnYIGJgJc(4Ko8v_G_n)J+7K#H+A$lZzY=1HA;AcrO0(btiIVPik{pF~z5Um@8e z$d`ekN{xY`p@o6r7f`6-1p`B=0RzLU1O^7H84L{K1#@-<+DufG5MeLz^mS!_$;K@% s!M@;xmJ3jE=0vL`X))u)2@e<P%X zubHE+s}6&~=D0Z1JfXQ98es@k=+g&#b{RBvfPOA)7Z(#40$M}B@RLw$$%8K*njn%4ki$t?CsMQDOA9+t-8=u> z)=)oID^^3iCHyWqxA@re>O*UU5lQi zI9_EOPuovo)4dGymZzW2T|e${jk*7|c4$cu_%HG3B2~c$8KH-hj@&^vTb+bZ@yYhs zorW%6 zmT}vdBiCj=OjJGhCP(V2##yDhjbz3oX9bR4=|O{y64ZAvMU=X`2s&%?;#u z`w9KrT&YYR*BoH+7@)a`8zoN|%-T*A1u(-wA(8=xaw2U|BlS`glEbn={bK2cbBl5W z!#K|Ie9$X?y*D#HoJnD!>}=JoMN|lY3km_Gh#L_ppo(lz3S25A%hgyEQeh$tw?X+q zb>zt7gGiz|(Hw`Ni#Ra^l&w0_n$KcWJ!wwU5YWm76($r$QL)(A*jV#e3v(Vn6pN=& zC|Dc;OCVq%3ydHxQV57Jkpe?G#1sY%6fpUmC?SUziIigk4Bi%@4GIPABR~7cjdFAQ z0v{=uW&z>@D*~dhcyk<<%f){Cgg{7-fk37m`j1ZtyyK!ktS2boZQ(OPdJGsTH2fAq zeuKUs$U_R{aHAAKLF9dR7>oJEE@}%uLSe&VV!;TI3xNtC|M1`03pwnsWPRtGd`A(^ zw~j!^eZl|E`g80GW5~+QjY{J&x5y85q1mA1{!&>yCWl2;h?ZmvJjlY4Fd%~nVu(yK z83W*~Kn%l*K_CD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ZAI;lFch&p;2 zZo<1?Pa{J!%Cx)5Bw0gt^c6d%m@ra7Fn{E_+vggP_+s(sUm;I+XeJ~RMo!+imv6Jj z;~CmMZlvvi7EC&7RNQ}pZL|zfc1Ij*Fy795i*52^Z?LAd?Y&>q)Q;rGR}-A`8nJ^< z)DElp*7sHa{cHJ~*5mDZDAb0!5O<^8TL-jDgN;(nG>w{g~J8 z3~67BS9(~|i>Lp++@(veD<2P59uMJdkX>@9GFmNM$sbu*VOsDg-Wb1Esr_bII9%C3 zxVftPFucBF-JxFo`)YiTQd^z{RCbbIYZ17z}@*<5e z|Bt`tZa2DHRS`rC2@u3UDa~0^e1!&+8Cu*EpF1laWWZ!P4=T1TXr5JITbChOK+a6E z$!ra`SDC)WF&O0z-``&?DA4mxF{oN>xi{-zl;hQCjD32b4OK6%?7hn%MxJj6Ne%Ufo>qg@Ef=Gmrbl?GQT z&-B9vT(6pM9|*26Uv-h*y_8=+At7t|Zd89q6B@IN^3zWLVq5OqnCDE)I{aQVzVKD7 zne@VP<;t$1Kbj2DgP|vHc1{NN74OG%*3?p34xeXoV2w(FJGwgE870oGueqHows(6u zJ*n0AJ+)Z9WgE}y zdhYFK`n6~<^_d|fQ^V{pGvqj8X@>6uW4%&+9oHDuWvRCUhx2bUat`e$|2Fs9-jv$+ zoGqAu{EufrT1`J|<;7*5SN?d{f2mxy6F<|b&hq}&fmS2KOnA{#F|j@2D&~ns`$VhO zYBkh}EgNTTSej^;db@o%aTY{J(m=qToMU#Ik8eM8x%+xP^aT!cp|7W%a|lWLH`&mk AiU0rr literal 0 HcmV?d00001 diff --git a/xui/main/regular.png b/xui/main/regular.png new file mode 100755 index 0000000000000000000000000000000000000000..0e5bfe7e285393030848adc8626d3743c903644f GIT binary patch literal 9327 zcmeHsc{r5q`}dgaOAU%58Doo#F=L&vGxjC2M5)YXjGY<#E|rok3dxcsYm{td4~2TN zlO-flgpvs1cT>;yd%wr=9?$W<-~XPO zaB%_jF3;}8N5`-?UI%FYUvv^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2c30e7dbe463e7714d8efa10115f3985443..2d2c5b3fd56f5d6277a8ab4ee60b4cd458345fb7 100755 GIT binary patch delta 312 zcmaFJbd)KpGr-TCmrII^fq{Y7)59eQNDF{42OE%-|NK7@NHG=%xjQl5JgHL;DzTh9e;@RffAg1t z@p;e^6E9B3$WHD{Jcqa)l;6$s5bHT|SGa*eV7ltNeIYya%FpjDxOe#OBwHUNk8hrR z2@J*!KOHuO_%Sr31ct7ht+H^{{I`rM_gDQgRyVHpbmhM@$wzRap@d+i$J;w+=7q0w zFbXOCb^Gs0fzN+U?|qsOH7WOd?9aLdT+0{E@|b2^!OAFj+vN|>z7(K489ZJ6T-G@y GGywn%*KUgd literal 353 zcmV-n0iOPeP)FauByX420$Wm37-LQ77Sv0l%v1DFl>DWDB&w zOC`)6a3UfRxc~^q?3}wMGXUTo)~gnt%EaRZho=ne0gq)uRZowG_EZ9PPvBYMrxJF|0!>B}}_Bby2sQexm zl4gl+@HL4;ZpJYQ0Qau{2BAcEcqnlg{B7bNty+P`-S;*z00000NkvXXu0mjf5S5Y^ diff --git a/xui/main/separator_center.png b/xui/main/separator_center.png index 62aad2c30e7dbe463e7714d8efa10115f3985443..2e685837e03e48fe95ddd6b8b8f9e74d557c443e 100755 GIT binary patch delta 312 zcmaFJbd)KpGr-TCmrII^fq{Y7)59eQNDF{42OE%-|NK7@NHG=%xjQl5JgHL;D&@`EMCj?yve~tZrQG>B@g+l8@j-LkYo3kGFTu%nM)V zU=&jN>-OK10-yhy-upBmYEtg^*q?O^xRx)RFauByX420$Wm37-LQ77Sv0l%v1DFl>DWDB&w zOC`)6a3UfRxc~^q?3}wMGXUTo)~gnt%EaRZho=ne0gq)uRZowG_EZ9PPvBYMrxJF|0!>B}}_Bby2sQexm zl4gl+@HL4;ZpJYQ0Qau{2BAcEcqnlg{B7bNty+P`-S;*z00000NkvXXu0mjf5S5Y^ diff --git a/xui/main/status_left.png b/xui/main/status_left.png index ecd9b46dbd8b4d0210a76235aaff42a4c06a979a..8f3e195a026ee51b32909c9b8df2dbf9bfe23650 100755 GIT binary patch delta 223 zcmZo+e8-s88Q|y6%O%Cdz`(%k>ERLtq!mDzgAGU)S5?NMQuIw+_xW#2u1&^#-0#xkc>Eaj?aro`Ig`y1x3`Z_3R=#uSLhEKG2^OZC z-?M~dKlbloEWgc=Y5iHapl+Tvx75u!42(=H90Cds4N%4dMu956{UTewG6BtF@O1Ta JS?83{1OV$RK5PI0 literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C}`&C z;uvCa`t6y8f((ixM=m&U-Zm)aUCwI2!Sashk$ZYv^73;kD^z~&Skm`6lVR?B(Eta= b^$gr47x@&<|Nf%|G=ag>)z4*}Q$iB}H3cS{ diff --git a/xui/main/status_lower.png b/xui/main/status_lower.png index 3a59006a975d2a9863c93606a38b3c33d0285cab..e22d2ce65f6ac07a454bab4a5abd29f0d21e61cd 100755 GIT binary patch delta 218 zcmb<>#hBF@;OEZECB?eK@{Ea{HE zjtmSN`?>!lvVv45dj$D1FjT2AFf_C@V54#bs2|4$m_JDt7R6aSVw#{PxO0UIqo8!w%vb&3)#GCiK+2;q;q2 zi;?fB*i#k`0R@K!21X{eldG8;v=Y=8);7Kt=P2lqQOf?t*z{f??zFVI0?;f5Pgg&e IbxsLQ06gzJO#lD@ literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C}`m6 z;uvCaIypfi%ApOk@)(4_;+3=1py V_c$fEcmnk@c)I$ztaD0e0sz9QB^>|& diff --git a/xui/main/status_lower_left.png b/xui/main/status_lower_left.png index d75c94a0979e8c4450cf352c1ba0cd2a38ec06e0..edc80f4c39f624bfeae7c610e9e2257c130e0a4f 100755 GIT binary patch delta 468 zcmV;_0W1EI1AzpPBt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+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M08C&b6z|n0ARo$ z$I!TH$IQNEj#CSKwy{OT&J5Hnp^n_tb44WJ&t1*~dm?J# zMJJ+^h!C!|zU9J;&xA1%AzUf-QZlEgJ=2HTptb%~O1;+B<)%V2P1AdAQxL7cR@T~& faU9?9AC>V1Fd!Cw?F}2w00000NkvXXu0mjfWPYz- diff --git a/xui/main/status_middle.png b/xui/main/status_middle.png index bf7008517cc790a6074be12783f5fc1d86c7b3e1..cf38b84edb3c9bbf90981b68f2d99b610f999db6 100755 GIT binary patch literal 773 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZzY=1HA;AcrO0(btiI zVPik{pF~z5Um@8e$d`ekN{xY`p@o6r7f`6-1p`B=0RzLU1O^7H84L{K1#@-<+5jau z3p^r=85s1GL71^(seKtxkiEpy*OmPx8xOCHa>+r_J_ZJ+Xipc%kcwMxuNVRy!*O^+ zW6_di26h#psx6az8m31v8894RU|?q8VW1X+dM3eLG-@RELV$WE?a;aD&D5|b=Km^S P%46_!^>bP0l+XkKCggFW literal 122 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6x8u_ zaSVw#{Pvt9BZC14!@|o?y7x)cDKG}_<;y+Jf(q=EwlN&oWbpMSP#=S*tDnm{r-UW| D2Jjq( diff --git a/xui/main/status_right.png b/xui/main/status_right.png index ecd9b46dbd8b4d0210a76235aaff42a4c06a979a..dd6f2043e54b8595e25e71f1fdc40f7448b15f54 100755 GIT binary patch delta 222 zcmZo+e9M^C8Q|y6%O%Cdz`(%k>ERLtq!mDzgAGU)S5?NMQuIw+_xW#3Z`WINU0~I@ax;TbJ9DaLlq38hxh9egaaBMf&@ZoGgbnx}> z2AzFBm?QoK+@9OAO~q3Fe3dP8LXjmS6AOocf~K;sxZUHx3v IIVCg!0OUnK;Q#;t literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C}`&C z;uvCa`t6y8f((ixM=m&U-Zm)aUCwI2!Sashk$ZYv^73;kD^z~&Skm`6lVR?B(Eta= b^$gr47x@&<|Nf%|G=ag>)z4*}Q$iB}H3cS{ diff --git a/xui/main/status_upper.png b/xui/main/status_upper.png index 3a59006a975d2a9863c93606a38b3c33d0285cab..8647bafc2ed21831fe95595ceb221cd3fc085204 100755 GIT binary patch delta 222 zcmb<>$C%X_;OEZECB?eK@{Ea{HE zjtmSN`?>!lvVv45dj$D1FjT2AFf_C@V54#bp!{*F|Xq6}x!4IEF+VetV^nmqCGt$C!xj literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C}`m6 z;uvCaIypfi%ApOk@)(4_;+3=1py V_c$fEcmnk@c)I$ztaD0e0sz9QB^>|& diff --git a/xui/main/status_upper_left.png b/xui/main/status_upper_left.png index a83439b67b1fca65bae08cc5eef2c5186758a0fe..15ff199cd3b32711015ddee8df238b2bf2181e4b 100755 GIT binary patch delta 446 zcmV;v0YUzV1MCBkBt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8J(EGJoj z#{d8ULP9n40{ox+U4AovJhtW3%lrq)3Q_yoUiB z;J-I#nH*!h48w5z6Z0731ppQRSeSXa_gf!T1X4=xA%xe*F=qaqEl4R{LkKTh@0b}7 zar`lXHT=GRYD82^hy`-aA4GImfu8!U63z-QjY%b354c6b?Z7{YXpq3Q60QQDh{(6V zD-ui7fzLTlkI6!lXx4L>c@`xi%gXm6k#nA$b3<_pn0ZD-*8^UYAfmUe4`*xGrQ4BG zx&pun08YMFWo&8Q`|oV(O9cfH)dfayEzg?*Yp7LiVh{c#&@&Pecu@cmM~j3MUKFrM zw7{zZ8i`i;u0V@~1}+kiNNC|=ftrK`-Xu`Eq87MHpmGM5R=7%FD-t*OsQHgt01?l( oGoXe8030lZMicUG5$M&v0B$~Wu@jj*TL1t607*qoM6N<$f}`@WMF0Q* delta 365 zcmV-z0h0dg1Be5VB!3BTNLh0L04^f{04^f|c%?sf0003xNkle^>3_$s4 zwVe$=c>TR#Upuu;*`-KPMhLdk_E4lq2?*Z9AVZA#^kOxgQ%Yy={r6kUQ%YxJOfkk3 zA}aNr`-mctbN-Dne$DHM=rv1_bH2nFkF7Q$G5~OTn!plXXMYUjfCBR-$Dp}1TK}Z9rzSNa2$9?qOdkRB2M#UAxSjLK16gMN<^BO zZ$$zTCu^;PBN9^hus}~j17``e zZodGaf{O$?d!TUPB7s&U9&piE2dMx6*qU&paFsxnP@jzN{yY8yX5R8vXnZ=G00000 LNkvXXu0mjfmGYbB diff --git a/xui/main/status_upper_right.png b/xui/main/status_upper_right.png index ac1a9e2ab2236f361b7fed5e939c5325bd4b3355..3fb059dfd94534b54b0085e5bb8b61b66763674c 100755 GIT binary patch delta 482 zcmV<80UiFV1CIodBt`*qQb$4o*~u(_00004XF*Lt006O%3;baP0000WV@Og>004R> z004l5008;`004mK004C`008P>0026e000+ooVrmwks%j<00(qQO+^Rk1`8J(D$Y73 z@&EtZ5ddjsCiqmwclT6qW$^Jq5{38{%(--Bge z5aPc-J4AFn3D$M}oTlm2lf$(v5AK8zZdsO(msbD){=6GwzO>fw)c`_>x#kaucn-x0 z#8qqkR+CSE_J|{*K*Yzp*7|6S`F;vOOdJ3N0Bj(vwb!8lDRJ5l6hbL=;6lh=@m>fy zLc9R+(>jI@0CrS7HhvN4O`Ns%rj**VjR+BMDbu09bLJGrS!>r6v7^hEEGyXhEd_DD zFOGOmRY-NW0Ny}YNofo>E(P(J0x9M3m8b9q003rxIzr({#kxJ_gsHf2N}@i%g(x{; zPCOiA88MSA1lI{mJI^{{3WDo|iJf1ntT+bIa#_iV7tey$#^j2#PQ%v5`(`>^lFzWdQ YOt#_?im|e7_5c6?07*qoM6N<$f-F|bJpcdz delta 402 zcmV;D0d4+|1gry)B!3BTNLh0L04^f{04^f|c%?sf0004ANklxhMle?bS@PgeqSq2+kGK~wL~2Gl|oh(ls+p$uuwI{HBn*F%~r8vuQ=b+yRQUsIR(a; z{Uf_@F&`fA3x8s@0ro&hpZ(g+4qStfMuq1~*9cH^Fq)XjKI8yQrL0c8thOp(X;?|+ z`(4xvauD3kmEjTbu5Q>1ArbGM2U-wP@u7*R1fdZho(XdhTk+9lMqfw}v6TaN14s~t wLrA_{1;8QFmrqhZJ55VNL<7pDcA#B9<~2!E$`}eB01E&B07*qoM6N<$g4e09@&Et; diff --git a/xui/map_preview_panel_off.png b/xui/map_preview_panel_off.png deleted file mode 100755 index d0fb58af34677080f0a3df345b85eab4a16fe1dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6s+=e zaSVw#{5H&y?|=eF@T2HTk@-hY@7dYe;^}j1^%1d5ouv#8Mz4;~ocEwgc)=N&Q+i6l zcBkYVi%T{hIrn<2@1v|W;j0C>jMnU)w&&T#jtxCJcUuG)7=g%}@qGQeo4h7g++X^m tf~ETW+)l~%C!arheTG4;CTl}U$@|0d$sNr9ynwD?@O1TaS?83{1OU$MNMry2 diff --git a/xui/map_preview_panel_on.png b/xui/map_preview_panel_on.png deleted file mode 100755 index 08dd569284cc2dfd49a289bbec82547e6cea65bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6s+-d zaSVw#{5H&y?|=eF@FVUY|D}I2#XURgtKyS%DNc2pN3td>!=ym_b6;4l&t?#v7*Lir z?^ED6j#-PlRmmP>l4#{*Ot_jmuf8x91RQ{5nL7jiqGdQxEQ&h w{>rRN1tms7? z;uvCaIypor<;VL)M-DI?R@*F)BN6X8fl)mnX@NkGltI>k6^zYC85k~cv$n3RbOYJJ N;OXk;vd$@?2>@GnAIAUy literal 0 HcmV?d00001 diff --git a/xui/menu_lower.png b/xui/menu_lower.png new file mode 100755 index 0000000000000000000000000000000000000000..95cd0df177297072453abe18d7912db7afd5dbcd GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C}{5K z;uvCaI=Lh;>Bo5o#)PB=0zFa=tjrPb_AWoeaIF04l%>qmY`<%KVOq*&pv4*Vto5Qn cLIMLr+bP0l+XkKBY-t@ literal 0 HcmV?d00001 diff --git a/xui/menu_lower_right.png b/xui/menu_lower_right.png new file mode 100755 index 0000000000000000000000000000000000000000..7aa4bb9b88f8edebad6ec0604154e1da3cbf9293 GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C>ZPM z;uvCaI=Lh;>Bsp7<~!Br4?I}ZazJgf!A~C^k)}ZA6$uQd_kI_VDp2FyzT~8ikD<7# z3G=r*i!ZP)k!n~sFNZn7Bo5o#)PB=0zFa&SqD}yHXmhRc&*OZy3Bsp7<~!Br4?I}ZazJgf!A~C^k)}XqH(m+Tgbfl546PpQL9dpq-3rvi N;OXk;vd$@?2>^n1Az}ak literal 0 HcmV?d00001 diff --git a/xui/menu_upper.png b/xui/menu_upper.png new file mode 100755 index 0000000000000000000000000000000000000000..6b2d146f49ff0ed106675ce9608f534204c7d6bf GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{C}`;E z;uvCaIypor<;Qsk#)O)1znP3W)$a@qcvdj>EKYQ&l-Qub8T5=vjjb(^ne7e(!;d@s V@}Z7G z;uvCaIyuFG*{g}?zoZ9)&J7mp7zv4(DH;X|=WV%S9l8>Ae*Af}=*WS9jqM!b3cqir zh%H-WoXNtY@WiL)lg<$qk&A2(x~#fl7pQbZ_jNWp8Duet@-Q%L?G`#2r}HHjXbXd< LtDnm{r-UW|RLwH& literal 0 HcmV?d00001 diff --git a/xui/menu_upper_right.png b/xui/menu_upper_right.png new file mode 100755 index 0000000000000000000000000000000000000000..9019c3554e002b2232375ab1f3e1700cfbe3f501 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F3${@^GvDCf{D462u z;uvCaIypor<;QskrXAnsH44r=U!>MsaaL`!!O@6sca;4$cMFvjF5)?`bY>$EOuS-n zz~Diw@MTJDval literal 0 HcmV?d00001 diff --git a/xui/overicon_frame.png b/xui/overicon_frame.png new file mode 100755 index 0000000000000000000000000000000000000000..e11efa5ebfcbd4316830b4610e555cd4ee057e83 GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6nyFF z;usQf`0ezAyoVKdTp24H*Bs!HT&P{r%6F7wuA=f5?F~+D8TzHHEX{=h)f@9Qxc*BD zy}T)v`19zVOQm;ur@l#E+SnicuZH*MEbf$@jo)7@Dy;6F&e&*D(EawDmU_ruqXQ4( z9%wL#bA0$w)%ftH-6h>;vPBKoCd3?kF12s&SEkcaj9&YvGc&Mx*RPff__@*Q+-c*k zTbF0rPiN9-fFg@N!Sfnf{tKQ=+!T?i;FYhr*>`jWmkxNVhV7eC;q z5_NZ$@Qx_{%{KKVeHONJrd7pSHWnX#x&GK^^Zb)dI}6TUv;%sY!PC{xWt~$(69CBJ BdmsP+ literal 0 HcmV?d00001 diff --git a/xui/palette.png b/xui/palette.png deleted file mode 100755 index 8a8ab27c131fc01974627ef1a5083f39346ff98b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~c!3HEhl+{lMQfx`y?k+$Y2!1;6t_M<_1s;*b z3=De8Ak0{?)V>TTSmf#A7@~3h?D>tp%mF+M7uk~-*BAUg|0VnbM}SJahl%E;gve{5 z>i60A?KO-SeQxn^37@*U)#){|*ES?i%e=YqaJuT9U==U7!$(>tO8G9EC;vzALhn%oc$@@B=5UY_ePsB7czopr0P9vr Ab^rhX diff --git a/xui/scroll_bar_lower.png b/xui/scroll_bar_lower.png new file mode 100755 index 0000000000000000000000000000000000000000..9a2c0ac32b08c36347b20a0882e79a7625130fcf GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRm!3HEhFR0}KQk(@Ik;M!QGf#mq+@q3D2K*9El0vQ}u=4>??WUy7ocygLJMJ z-!wI1o2K5-?VWsWcK3qpy$8?!U}jpy8&kSpQNXRj?%J+hiziHAD{JRlll>|CiqPEI zH?GW@x8>fOt-I1%LRl+Y0*lzf`UAD4CSLY=cD2^`=A_%o`57N7btJ8M5?gM5tz(q# Ws|-Gp!r~9~4}+(xpUXO@geCxn{cxoK literal 0 HcmV?d00001 diff --git a/xui/scroll_bar_middle.png b/xui/scroll_bar_middle.png new file mode 100755 index 0000000000000000000000000000000000000000..453539e8707ea177bd2576c5d2ab429b32954346 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9EHPk}Jwz)sq@Br5SFgsI6YN z>Ticb_k*017Y!B!t}kJkYj1UC^}pXN=W8FHKe)Vj17k~Vo@n#T9YDhw7(8A5T-G@y GGywqPsXNpF literal 0 HcmV?d00001 diff --git a/xui/scroll_bar_slider.png b/xui/scroll_bar_slider.png new file mode 100755 index 0000000000000000000000000000000000000000..87cb4ae2a41225a32a0f34d21e9fe0d4734e90c8 GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jPK-BC>eK@{Ea{HEjtmSN z`?>!lvI6-E$sR$z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8X6a z5n0T@pr;JNj1^1m%YcIHC7!;n>@V54#q_mGF6}V_3eE6zaSX9IJ$G`TAd?{vtGUIB z)(nS3kq4N>J`@REU=q`6^wN-@n|$ixlc0O?X}hc^t1+t2S}|+IA7S4s$EW_<^;2l$ zgWs%0nO_$b#3@d{|GkJMf1`>}qiv^4qPLRq2M?vqAL5FbBIbWizBj|4yW1>VWv7Xw z-ihn#ZYs7mGK#S-$2f0@O1Ta JS?83{1OTMHY*_#R literal 0 HcmV?d00001 diff --git a/xui/scroll_bar_upper.png b/xui/scroll_bar_upper.png new file mode 100755 index 0000000000000000000000000000000000000000..1412b7de16a45445aded0ae40b7cc69f1d38098c GIT binary patch literal 271 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRm!3HEhFR0}KQk(@Ik;M!QGf#mq1|pj`IEA0!l5DJF;o|J%e6%>o-^uAm&9?U} z5&_2-^&NfGanDU3EA)7 znJ1oE9a!+-@Vh!i#hMPAj+Hh3JF?=`7xAUVe@OWDo8@u5hnWXU-L`{|MeHQLmDN{- S@5~2!hQZU-&t;ucLK6V;r)~5A literal 0 HcmV?d00001 diff --git a/xui/separator_center.png b/xui/separator_center.png new file mode 100755 index 0000000000000000000000000000000000000000..87cb4ae2a41225a32a0f34d21e9fe0d4734e90c8 GIT binary patch literal 322 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jPK-BC>eK@{Ea{HEjtmSN z`?>!lvI6-E$sR$z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8X6a z5n0T@pr;JNj1^1m%YcIHC7!;n>@V54#q_mGF6}V_3eE6zaSX9IJ$G`TAd?{vtGUIB z)(nS3kq4N>J`@REU=q`6^wN-@n|$ixlc0O?X}hc^t1+t2S}|+IA7S4s$EW_<^;2l$ zgWs%0nO_$b#3@d{|GkJMf1`>}qiv^4qPLRq2M?vqAL5FbBIbWizBj|4yW1>VWv7Xw z-ihn#ZYs7mGK#S-$2f0@O1Ta JS?83{1OTMHY*_#R literal 0 HcmV?d00001 diff --git a/xui/separator_left.png b/xui/separator_left.png new file mode 100755 index 0000000000000000000000000000000000000000..6fdd0ebe361fb5991de865101d6730ae1a7ec8e9 GIT binary patch literal 164 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9EHPk}JwZe|H8eIhI(klc_?4 zb3)Fio)a=fJPZ4{r?5!=TP~S=oyVAAx{We3bLvI|t`!Uno0sV6hvsif0ouUe>FVdQ I&MBb@02Ns@c>n+a literal 0 HcmV?d00001 diff --git a/xui/separator_middle.png b/xui/separator_middle.png new file mode 100755 index 0000000000000000000000000000000000000000..5b4a7b487e5315a9e5eee0b83636f9c0f6329f42 GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9EHPk}JwZe|HmIJR(U^EGlC3RtArFsN(+sY(xkvTS@6ej^@c+DO9-iuV zjv{xf`&V+zw-IJ$W^V2lVrgG{ERWl+Qq9RsU{bn|aa)DrS&7|gGZ=q7`LCRuv1US( dJL6IYhUY#Gn#*sigad75@O1TaS?83{1OTm;JthDE literal 0 HcmV?d00001 diff --git a/xui/separator_right.png b/xui/separator_right.png new file mode 100755 index 0000000000000000000000000000000000000000..e58569d9447bd9e1900431dea6a0416dd8cd0295 GIT binary patch literal 244 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9EHPk}JwxrAF+#XwJS`kp7T zMc?@r3c7u^JMZMOr1WR%`p>(YrDZ=TroRyQz}Rz6(qZbJ&>VrJa}1~a9+X8)zrW#$ z>5=>bN$tgnW*=@$^3WGiVf0Ws|C66l{!;XGn}=$R$v;ml5@-4;n&o)wWfkXkb?%~7 o=^Hz@8uN)~?l@)iOIq?M`=xYu&FhXlAU`p9y85}Sb4q9e0E{_W`Tzg` literal 0 HcmV?d00001 diff --git a/xui/status_left.png b/xui/status_left.png new file mode 100755 index 0000000000000000000000000000000000000000..443235eb6c862516ea88dd4cd1d0879af5bb2f22 GIT binary patch literal 382 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%C&rs6b?Si}mUKs7M+SzC z{oH>NSwSk3J%W507^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10g0sLQ zvY3HEPZ@+6E0)@q0R`DhJbhi+U$SwFnM&|zh-U(Yu6VjQhD02GJ0+U;umO+j`&9xO ztickkK_?Vg4sT#_a#s{_J1D}G`1{4Dh*|EYEA1!ix}I~swsqZ{;)RmyTN_$8aDO{+ z_u=yemC1Mn{?OvCaNwCUGUu%iKDrwvExodn`2Y*UvtPOr-&X&#I4Dyr zV5t;m6~HaJCeE~=dI?)ttbUf|g+1TdWlqfIc(k@@BJ)kNdNSwSk3J%W507^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10g0sLQ zvY3HEPZ@+6E0)@q0R`DhJbhi+U$SwFnMyrUD{}?f$KdJW7!q;#?X-gvn+dFr<67}n>3amcZ%j}4bO$>Z@lCh}Aka>34r+Is{vyysbTE)c~ zj8`9;^!*9bf>pC;pXCWXI{WmeMc1l}Z*I=coh>ddbzF17PpKUY_fN;C-d#TB!;`b$ z8@DrW_0Zg#{^02Dujapk-QtZuJb4&8bC&CO;{$IQFGsAuxxHPV|FXxv+cg<8j{Q1$ zbTapW1;xLAtzG@)$)`@oz8y7(o+<0;va@r1w9-FRao66e`qP5i+qDlkr<%*1F&CJu Q3Je|wPgg&ebxsLQ0Jm_a%>V!Z literal 0 HcmV?d00001 diff --git a/xui/status_lower_left.png b/xui/status_lower_left.png new file mode 100755 index 0000000000000000000000000000000000000000..8a73b352372ec124978ed4d2608a81e4abc0cddd GIT binary patch literal 546 zcmV+-0^R+IP)bH-ORq#+ZeO1P%aj005xRM?n5P_ID+mTSf*c0gn}stYfLi9$>hv1jb%o zlu{r$KNTntl3?)Ef;|PKILIk*h}q`AU#dX3K=Q6u0U~+;&&I%>g)a^RvS{s&0!0MI zUak`*_Hp*$8n-0eR7k)E&T^)3isp<-6VXx=LL;Iw0wK888W0f%V~R+GU`0V#5)Y-{ zUy7l4zKX!u`$g8;D(}M#iK}W?t3VBKTqC6M0B)tkHMJQscnqgWIVdz+C;6YI3)PP*VwcwOM3swoVkd$DzKnZpWlwh@R zC4>^34}20LLP#=6Cif*kbGt0JJSuAOpcY_k)U;-@Q zk~gbB+@Dh*l|x8ePt%+~u0Tv8o={c+%a|lytAN&em7B6IklDrGDY>^s!!B(}DVV4G0F(8syxZX@B?_lpFU)@*HbH$W)`B0^`(Kw?eQrPh;~cjc+$3f@y> z*OUL>TDxiX!xDsBY;M0_BC#jxl)XyXY&C(uivLBRyN!M?P9RqU;&rWcQ4;kQ7wq+V zk$qsR*G(VXsN9NuprqH?0Us8)YvAp9#GKXq{i2yWaz&N!POvtp9l_ZFpYPL?QHV%X z03M~SCE#Jm=_o|*+81_pR(P0xdQp5e4wv+MK#{Kx(*x{KHPrgf?lymC+k7gzd~pi+ z-~vS>iC0yi)~~bazt@huh6H@F5tSs7QYHqUxFCEqyt)jc!iOE(bKrvlCBf&&q`(27 t(nmZj`>OqIZ~&;NEx!*$YhNvme*ySeSSDK3&z}GQ002ovPDHLkV1in~`l|o{ literal 0 HcmV?d00001 diff --git a/xui/status_middle.png b/xui/status_middle.png new file mode 100755 index 0000000000000000000000000000000000000000..23cf2e733e971d0a6e1bb4bf710e82092ca25866 GIT binary patch literal 1160 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZzY=1HA;AcrO0(btiI zVPik{pF~z5Um@8e$d`ekN{xY`p@o6r7f`6-1p`B=0RzLU1O^7H84L{K1#@-<+5jau z3p^r=85s1GL71^(seKtxkiEpy*OmPx8xOCH?&L~~P6h_%d!8hW8|HBmaqhtH9kFV$-Z)``T=ouH>10!qAKm6l-UZZ<| z9rwqtGk`+c4Ch1}TA#!)MtC4G7@o&47Mv5M6Sa;(N98%!0jDB#MiWrP;yG7CF35u5C3}Taz7zcm?bBbB%L}@c{pWMl`VZt0V#si?hxt&aOqC^{*9-yU(2G*za wOcbEhhb2wWDJ>u+IxHz7!I73p;{QYTe+H{?tv{HI$prV1u`l(s3-*_wIgTe~DWM4f DA6Q5d diff --git a/xui/status_preview_panel_on.png b/xui/status_preview_panel_on.png deleted file mode 100755 index 530fc12f183e0aea5107202f0ff7730c19c3bc3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6m0c$ zaSVw#{C3(w-U9|4%nOs4zRjN~dSbP`*J7s!fq&M9M5ntmC75K1S>4}q=(T1;m&Yn= zpw z)*d)CXCwD2iCY2^Op=Tue4S<&NSwSk3J%W507^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10g0sLQ zvY3HEPZ@+6E0)@q0R`DhJbhi+U$SwFnaXgxUM>I%-Sc#D42d}WcFING!wNhu>jT9S zSl3?=jcDvU5YXcgeu69Vptgb2??w&|C&#sy^glZnD7~xcy6-C-C&LiLz;4nlvcYg) z+&8|Atk*IO+nHah7bOlI8!r6dh^xl=XVnKnQSb~%kq4*s-#_b@0m@UmJem6|eWQ?D{HjRPKDvf!TLH7&Pv(^ICAd#XNFPPS#GV##=76_v3|L zm>N$#@J8f{{fez+Sw7c|8jXc#HLRV{RP;Y}XKfKz3-ckyhYbY|778)~d>rgx?t!Z^ a70gzl!j8*N^$7ue%HZkh=d#Wzp$Pye%Zj4_ literal 0 HcmV?d00001 diff --git a/xui/status_upper.png b/xui/status_upper.png new file mode 100755 index 0000000000000000000000000000000000000000..97dee85b830bc23b7071ac7887335145853ca5ac GIT binary patch literal 427 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%C&rs6b?Si}mUKs7M+SzC z{oH>NSwSk3J%W507^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10g0sLQ zvY3HEPZ@+6E0)@q0R`DhJbhi+U$SwFnaVx&-V_70kI~b`F(l&f+i4poHX8`I&cCL@ zH`VHnSjNMs4c-B=;qBfVq6@h55~BmEB*hCpB?_cutG?k`oOnNe%P$UIM`dQ-#oo3t z^9!t-k1c)h>&w%JWoZ=>HaQ}Zaa}e$8ERfu#J>BgXS=f|X_Btq{0)`e-ltD8I=wpX zJL6YXVP%6j|AlWd0u57wM5pahfB)>!)(?-E64F8=KFy0^2q{%GGY%2W*SkFX){C>L zXV>k_jf=^Usb)U={Q%>Sd39Q!4WIX@=hyM=ky+t-?&nq}{d;HcUo<(zWm9?KM8eL0 z(xIQ`{kbszpIKtdpU-+7$NxL&%b6HW(YtDfv&&^?FwFj z5qdvzhBS!@&~T@-6h#V^-^+`?T0zE)h8LV@RStaU0E|8kV4rSDeySY!)dD;afTrUl zMsjQDVn6DvoBP%pxB7eRvy#A>X=?y3x6f6Olu&EnB~5yUY76+MDy+po?StE=1Cxv< z=jaFlY@Gin3yg*rHUM9vJHTeSbqLPCDQPu3f1o?K+E{)Df8hSixZD5`5v;Y*H$-#< zm;^vf#OMW_rhPHstB8oQ0-@AQgeI4}TZ6B^yM5>apG06x99%?{E<{X(Z;%R}6nNXV zfQU1ZIm3(rBAP*cQgz9IV&|!ICK2wc6!_3Npm7|dCkSuu??n|z0q0D?AKU*U(BC17 z@;w0>?rJZ%lxjI}DGTaSskS=Wt<(WkGS!aMhx#{CO(L+6}i%ThTujo;L;#7 zPeenv6c`4V-c9Q5$@6K00zL_8dQIi@rt^#fDrB4cUvQcN;YhZnsufpY4K$YpVSpmy dJjAXk@C^*gTDw_B({um;002ovPDHLkV1lqB=U4y$ literal 0 HcmV?d00001 diff --git a/xui/status_upper_right.png b/xui/status_upper_right.png new file mode 100755 index 0000000000000000000000000000000000000000..ecc87d6a654f626448ff9ee43d902b57376878fd GIT binary patch literal 583 zcmV-N0=WH&P)!fDWE0b zcy$mwY$x7X;C=%3CJs>n4nQEjk%gNEVx_L+VoL~_{Y|@T%W;Siz_L5GEQ230h-z!` zaP~QfTEwLrK8=>r_f790#F#r^`*lD!uOO0*&bsqWJHOQcptXiEX8w@p*yWI)RTw|N zQ#O`_fywB#FBmh=+PI%42q~)w3y=U*0KlAAF+&Thbn-V{Pwsc@AWRRO+sTki2Co2s zh(?I;Jl2pI%p8U2dIFIj?(9Uq*SK!jgm*$jl^xeUZ6ArRrt`|BA9A;RbVO9o<-DawH5vMvY>8r$TC@dv!X Vud=ZNOvS)e3hN{G0d!f>gTe~DWM4fMkhfy diff --git a/xui/text_box_panel_on.png b/xui/text_box_panel_on.png deleted file mode 100755 index 0576c966d6e20681f00494fbbbf687b6b320bf1b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6ioAU zaSVw#{C27%-vI>8a@w?8 zk)isp-M6xSD*3eA#p~3wbuK@)F)g3|W6^WlqfJ-2FPAg0#_=tyXn5oBD^_6Ye^v$t a1BM?{M3ZEG6r2Xy$l&Sf=d#Wzp$Pzfyg@1e diff --git a/xui/tiny_fill_bar_base.png b/xui/tiny_fill_bar_base.png new file mode 100755 index 0000000000000000000000000000000000000000..4d72d7a6a9385974f6009537b77470ce40c630c0 GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg`npr$CtT@x&!cKtVfC z7srr@!*4GI@-i53Fb8g1!1A-h$w}8h^6w2>*6GUx84}8NRnKLN486yy5-Gmp9lwAB j10&0mGk;_m7|Qr(+4D43-rH0OG>O5})z4*}Q$iB}0njOP literal 0 HcmV?d00001 diff --git a/xui/tiny_fill_bar_left.png b/xui/tiny_fill_bar_left.png new file mode 100755 index 0000000000000000000000000000000000000000..254499a3118652ea6a841d6a8b117a849f5aa0c5 GIT binary patch literal 400 zcmV;B0dM|^P)P(}8KOz6V#{8@WnzVx7TOp7I`Y|9k zDoEVES*1hOk+~$?6SM+ofm~`|PcYs^#l;ICHUq8kG=je|95<7K{tKH0rG5+O{9X!x zB#c`CHr&d4uL6>f)l~_N;%cD1tU31z5fKoP896K>IJ#)IHi){nZErQ0@`$a4!$(Bp6);r6^!)oi3_jGANAkG&DtIwCM?b-Tc uF?qH+S%I{IFI!IKNGcup-*Wn{_52q+{^0e` z7srr@!*8zz3IbKL1eRzduzE$E({bC-bnFKIccDF!c?}$&tD|~%Xgu%{n~=R(`2b@D zyOG;Qt4Nl5$Ube511f8H-PCVoIBsK1Z;6qB|G6J1nh7ckO@Rx)9jGK7s`7mrDy8s#( zs`?93Bfblufw%J-NLa$NUHsHGRO%xf8^%v`oD|*P8U@HQv1+Wwpq(YCIFzP7eSr# zU1QVF#%njZ)VNcqK3A=?AoXl)+-3*Pj0H!qID!QL8~KU#>ee_9{HnqJejg+bm)81Fx5Ni7 z_}c}*Jhp4q0ADkJy6EUVTI*z+vAE=fcV#h~#PTyAert?5)P5<6OK$j>gfRvXak~%k z4Yo8c&wvj}_)zYL&N#OV)ffD%J z@NNjzNYuUqf)jpU6h0R-+%CVkI8N#?%ec?6SxB4#Un>FQYyMxB1(Z_3 z#S9V41$yCICH4zisE9M+TO|BNt@;V{z`M;{3Nj~Q9w45(&k(B>obdDg1w$ZFH-sqQ zUB@_r?Ukq!poHJI*(QXoD7Pbnb* zUi0-^CScm?T)d~m+Hig5;$-u5%Mj{)@;IsEOMI3D6?||S<(8m?k1k|f64da)Bc*wO z$Q}O*4(gTzK9rgao{6a?DBxFJd8nt7pn&)HKl_r*PCq5A8{Z*Fx7Cfs-Jzy=*dRe# zCAOH9Jc-`JP*+~4Dq$Ou;NG4{(u8eBf@5zbd*MqZxHg880zN0fxvQ0}@VV5vli=Qx z53TU~St2*Za>4%#w7|PgbL&KI9q54v02tintp&bhu`6w-Ss(>a+G%MUB*#!M(L0m? zlyq7m(F=ba=lDw;1E}dVCD98X8;(N?przB01Q&cVH>xL^lnIXQ?Su|S=iIz&gQA^O Z`2*%85623a;;SzuJ#W5%{1D#~xdRe2`O%LT00000NkvXXu0mjfjhJtm literal 0 HcmV?d00001 diff --git a/xui/title_bar_right.png b/xui/title_bar_right.png new file mode 100755 index 0000000000000000000000000000000000000000..2b2cec2079faf0ac43dffa5df78d58b3e3616dfa GIT binary patch literal 482 zcmV<80UiE{P)$IB=;hu6NEAFP zpdvZoVHZg8GS`cpGHbsK@UR%TM^>C|K00;NjbmGf_c>l5K|n}(RaGD&G}fL%=9209 zy{4+<(_Eyg$y--DQ_$8x(~ZFLd zD!kfqujbspOY0qM^cjc*M3$>ZwcLe@fpw> zC^);gP0MBF%8q3P5vr$Ey&t#so-B*pcXx(N^4UJ)<*VQPWZe>%mMqs}?F`c3>FVdQ I&MBb@0Q#y=H~;_u literal 0 HcmV?d00001 diff --git a/xui/window_left.png b/xui/window_left.png new file mode 100755 index 0000000000000000000000000000000000000000..54e60b43214b3ec6c91b6cde8a6b691eb4a8985f GIT binary patch literal 405 zcmV;G0c!q}Fc60Sb})d2wa}9g3sgchAR!tefwK?`wXhbD zaD8AFD1-zqa4>V(r%p)!`DPQoS#DI~M-iY1v*H%09Y91N@@xnc5y4su{aDVnukM*5 zfXZ%7N)hm7fdT*=4~tTchxL?7&AtPGetiB(em7M*U}|U3Ixob!IL+?8Sq9$Xn5)L3jseK=i>R{)_qbQ5c+29eG{X-p|id zJSdO?FbqZ?E(>%8ufPgjp&cP}^w=2~fv(UMx`J28 z2<-u-LLu~KeBqN&MBYb!Oh`ejgs*`Ua9@5Zb(wRMB9Khr8aTwT*e+NFXGt^bCj507k=GGaBG~1Hc`Mnw|mv{|i5lJHYlxU&kF3 zG;Hc`ph*#6)}Zz44c6M{J;uBPJnZe^0RX1I7b=SY7T<5M2=KE4z>a{3FYv|~Sl87F z@oDf*fKm|B^CwwCOsQ@`506bme6XBx*h(!SSSoov> z5)p7u!oj+{KTp?b0=}&PDG@@A;PhhLlF3EjmZ4`CYz-0NO9-Sa!a?7<6rQgV+uvtB zzq$qP&n5PIgX30{V2LI8@WvR>TEn(&V9fJxXW=mmySs`o<=h+#mVC1h1xm5K0R>xn zep=csE#S-&Lh$}xAr>c$w1nc9kO<_{KD;zM9xcM97m&G@!qX&}*ov#$%mE>QEAZRn z>HDz_SnE0AiU3C_50JYz_*ut_phm*ebuxEBW=h>bfU595WN#7F9pFcbpzZ=cN(6N$ z_z@yZBjIt6&;C7D2Q?C&@&T!Dx}_zkk?=HdN#?1Q2x>HZPWr8d25vCA)sN~fv?=PuP)m$B>klFj0oZdx`o+2m!IJDLd*mr@E6`vmNFaZE)t=$iY zr_Z!r`)yr7bp1*@>x15zx}Fl)Spe1f$Py6IiGmN?Jy_8*94#%6`gayUe$T~lH!lWy zPE5Vvai;?k{M!!H{CkSf6aHlxj9EZ05h}rFiTk!2JhOn-BGiD_i=p66+<#G0w6+Mf z;H|YTkmDl6`Y+B3*Ak&7Jda>WgjD}uaG~kNfPGlE+=U?N5XIT`)cFDlJa=Eu?32%5 zDvYFp6^SL(f;YwhBD!y162ZD2oaO5jr>jDpV=AO~KW^6m{!u>!TPR`7f~npz@T!_$FI|J;(;0!rZZVno5x6?kdB zA{OdT5_mcgnFBA47%#%BoKx<8tRNB~1|S`@w2xf)oE#z-f#*L(E|3C{3|b;W34DnN zMXSIWfMn1T5w5^r5g}_C^Z|05F&sQ_>c%S;d4cJsSEg9O3DwO)d}%o zi{Sk}NRV3axpjrN!bs@zS&r~(BZ1FqkyqfQB2ecCuM6;Ki3?J@@meH5RbC5TA_9fN z3K0*#IKorrRR+Q=iUN{QCZ{Gmn-hZn@4zQPHAi|qqExZsfjUoK!RIBZ4rDc z;1g{t_?SC{mO<6Z=cBoT4)7sMh#rz^ R>iGZw002ovPDHLkV1fdl^m70J literal 0 HcmV?d00001 diff --git a/xui/window_lower_right.png b/xui/window_lower_right.png new file mode 100755 index 0000000000000000000000000000000000000000..14e3543f34780e2615557fd65af289ffad6c25d6 GIT binary patch literal 1145 zcmV-<1cv*GP)SC5lkvTs^eo)0lz(fQ9&uSgBL=e@B3B6U3dVf zLO`elrS?DHg$F8`0-@8voC0^@s}vBrCWOFOE8vaoE>c(DR#_jnfkt;v%vqsD#4Obyx@xoAb7fSTE)k7_+gl1 zyzhH&33uR&)Bz^Ep68b-vBFcKGYkVn*TYsPgu-VRa0Y)O!CL5CNeF?@It8xa&sKNQ z?We#_mN6Yd;j;trS2%{stU_FhegWx*`J2;PN1KxUS}YJe{(fz<+EN&>41 zzJ!FPB)l3OtAB>Nj6vT);{uU6N?<5>b zVWTCTY)<+_T5Ndlj!;b!a>DPjfTskcl#m<#kOmzWIdRT`mM4)=0{*lPuw3NCIp6YW zWC^9<*G15Akt;k^R52x#ga?2ZU7#z)QAM>IEr(ow7n&kn@9(FC2Y|+BVZ*3EQ6Qz< zpVxaB388JY7)92$26#Y_1oN=sQwgCx#5IDx^0@%t)g9vnK?DhR8>lfPtXZJ6gplrW z3<#z-5#W+B%OVp&@wv;Big~KB>-k0S%GR*t#aZ`|-2Cxg)_R z&-1rPCZPf5!^V{3*R%Kj$4}W43BE;6DhX=@2qB)Fx(=3br^54SN3dJO{CMF7AnGQ2Kf zI^8!IyGT0c7qYA4ZvnY1bW%B{&T=gTPCqlB{rH1(cyWHUXTJ@FI*PzTsAFrYA zFl9aV+ha-uZx4w(3?2a3KY=MDynl*}90jl)1-SF3WeN$IzO3U9me4-_;{}+400000 LNkvXXu0mjfhd>St literal 0 HcmV?d00001 diff --git a/xui/window_right.png b/xui/window_right.png new file mode 100755 index 0000000000000000000000000000000000000000..587bc2a7c7ea41e4c039da5f455551cb96415b9b GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?31We{epSZZGe6uj)| z;usQf`0bRlyoVKdTH^(|Q&`tu5Z%Ni+bC(pt$aZ=LQ%V-wdaCd6o=A7_md07e?LlC zlm11d-h9@Fd7LvicRvuVV2k0ZUZ1_2^#X&ykLWYf%=x8CUNdK2-r4i%p5^tcVIQYf z8rD^RuGTF+Re0jW2fdct#U!L6;#hZr9=6gXHY$O!Op iu(yD?2ku*bVEi^iVv(!Q9%G>Q7(8A5T-G@yGywqL4{-4S literal 0 HcmV?d00001 diff --git a/xui/window_upper.png b/xui/window_upper.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G~I?X(oI4Ryn3Wht8WD1dj1QBB$%}i{4N4^xq8CMw}2-wN@UI? zBu$G2@K3YAX!v7KpN%=a;Gd_#3GlTNYT);Y&_wuB3AOM)sc<4Z^*}V)itR7C1KbISz%u}hdfyo1BB2Gm zS;5Q-Hd6wRz|-a=w1oFQn(K?vd29efcy z1K#$8?=6AAeGzUD{4MZ3B^)Dw7GjyWT`z!)hCd!VR;^B`X1lvxzbsBO8c#Vn|Gqtx zjKucWY-erIF{Asv#En*=Xgv}@TF*4<36|UYwUOs%u(Uql>K&UD#z$R~IqM3o;6qcO z5W>MHN5IHPXbtc6wm%lQb6}GOCN>H_AYymynWHnC4PPvvwS-ylRRUT`xGH(~hOZXT zLc&?edjxzF0ksmY%3ZzTn+a$sVI+K00WBnqhHoyQM#2pEE&@s<%!2PGAV-3@&4ceM zAXP$29?%QEyMPo4u{ToqNWDmf`@ku^`b4-*iRP`egcDq-~Zgo2ktpn7cmN^Wd9uBHY#MSw4X@_@hz zyT|Wx9+AtHFiikSh)iQPwj5{Hx*FtE0V#q~o-?c|#PU~$7k63xfH!+(c=z{0K!2&C zNMNrF@6QsY68I~_S3KbT`vl~MeK1ifkicFQ{&)%O+RL~c*ek%NCP0C typedef struct { - b4 active; - b4 reconfigure_active; - b4 validation_layers; - b4 hide_cursor_full; - b4 hide_cursor; - u4 time; - - u4 cursor; /// TODO: PROPER INPUT - s4 cursor_x; - s4 cursor_y; - - b4 signal [signal_count]; - - f4 pixel_width; - f4 pixel_height; - u4 frame; - u4 width; - u4 height; - u4 sprite_count; - u4 * * sprite_data; - u4 * sprite_width; - u4 * sprite_height; - f4 * sprite_u; - f4 * sprite_v; - u4 font_count; - u4 * * font_index; - u4 * * font_width; - u4 * * font_height; - c1 * font_begin; - c1 * font_end; + boolean active; + boolean reconfigure_active; + boolean validation_layers; + boolean hide_cursor_full; + boolean hide_cursor; + natural time; + + natural cursor; /// TODO: PROPER INPUT + integer cursor_x; + integer cursor_y; + + boolean signal [signal_count]; + + real pixel_width; + real pixel_height; + natural frame; + natural width; + natural height; + natural sprite_count; + natural * * sprite_data; + natural * sprite_width; + natural * sprite_height; + real * sprite_u; + real * sprite_v; + natural font_count; + natural * * font_index; + natural * * font_width; + natural * * font_height; + character * font_begin; + character * font_end; xcb_connection_t * connection; xcb_screen_t * screen; xcb_window_t window; - u4 global_time; - u4 gameplay_time; - u4 animation_time; - u4 framerate; - u4 gameplay_framerate; - u4 animation_framerate; - u8 frame_time_in_ns; + natural global_time; + natural gameplay_time; + natural animation_time; + natural framerate; + natural gameplay_framerate; + natural animation_framerate; + natural_64 frame_time_in_ns; VkInstance instance; VkSurfaceKHR surface; VkPhysicalDevice physical_device; VkQueue queue; - u4 queue_index; - VkDevice logical_device; - u4 image_count; + natural queue_index; + VkDevice boolean_device; + natural image_count; VkExtent2D extent; VkFormat format; VkPresentModeKHR present_mode; @@ -98,27 +98,27 @@ typedef struct { VkCommandBuffer transfer_buffer; VkBuffer vertex_buffer; VkDeviceMemory vertex_memory; - f4 * vertex_data; + real * vertex_data; VkDeviceSize vertex_size; - u4 vertex_count; - u4 vertex_limit; + natural vertex_count; + natural vertex_limit; VkBuffer index_buffer; VkDeviceMemory index_memory; - u4 * index_data; + natural * index_data; VkDeviceSize index_size; - u4 index_count; - u4 index_limit; + natural index_count; + natural index_limit; VkSampler sampler; VkImage layout_image; VkDeviceMemory layout_memory; VkImageView layout_image_view; - u4 * layout_data; - u4 layout_size; - u4 layout_width; - u4 layout_height; + natural * layout_data; + natural layout_size; + natural layout_width; + natural layout_height; } vulkan_structure; -static c1 * vulkan_continue_execution [] = { +static character * vulkan_continue_execution [] = { "/s Commands successfully completed.\n", "/w Fence or query hasn't yet completed.\n", "/w Wait operation hasn't completed in the specified time.\n", @@ -127,7 +127,7 @@ static c1 * vulkan_continue_execution [] = { "/w Return array was too small for the result.\n" }; -static c1 * vulkan_break_execution [] = { +static character * vulkan_break_execution [] = { "/f Host memory allocation has failed.\n", "/f Device memory allocation has failed.\n", "/f Initialization of an object couldn't be completed.\n", @@ -144,7 +144,7 @@ static c1 * vulkan_break_execution [] = { "/f Undefined error has occured.\n" }; -static v0 vulkan_result (VkResult result) { +static procedure vulkan_result (VkResult result) { if (result == 0) { return; } else if (result > 0) { @@ -155,7 +155,7 @@ static v0 vulkan_result (VkResult result) { } } -static vulkan_structure * vulkan_initialize (u8 quad_memory, u8 layout_side, u4 gameplay_framerate, u4 animation_framerate) { +static vulkan_structure * vulkan_initialize (caliber quad_memory, caliber layout_side, natural gameplay_framerate, natural animation_framerate) { vulkan_structure * vulkan = allocate (sizeof (* vulkan)); vulkan->vertex_limit = quad_memory * 32; @@ -172,7 +172,7 @@ static vulkan_structure * vulkan_deinitialize (vulkan_structure * vulkan) { print ("/c Destroying and deallocating all the bullshit used so far...\n"); vulkan_result (vkQueueWaitIdle (vulkan->queue)); - vulkan_result (vkDeviceWaitIdle (vulkan->logical_device)); + vulkan_result (vkDeviceWaitIdle (vulkan->boolean_device)); vulkan->sprite_width = deallocate (vulkan->sprite_width); vulkan->sprite_height = deallocate (vulkan->sprite_height); @@ -180,7 +180,7 @@ static vulkan_structure * vulkan_deinitialize (vulkan_structure * vulkan) { vulkan->sprite_v = deallocate (vulkan->sprite_v); if (vulkan->font_count > 0) { - for (u4 index = 0; index < vulkan->font_count; ++index) { + for (natural index = 0; index < vulkan->font_count; ++index) { vulkan->font_index [index] = deallocate (vulkan->font_index [index]); vulkan->font_width [index] = deallocate (vulkan->font_width [index]); vulkan->font_height [index] = deallocate (vulkan->font_height [index]); @@ -193,64 +193,64 @@ static vulkan_structure * vulkan_deinitialize (vulkan_structure * vulkan) { vulkan->font_end = deallocate (vulkan->font_end); } - vkFreeDescriptorSets (vulkan->logical_device, vulkan->descriptor_pool, vulkan->image_count, vulkan->descriptor_sets); + vkFreeDescriptorSets (vulkan->boolean_device, vulkan->descriptor_pool, vulkan->image_count, vulkan->descriptor_sets); vulkan->descriptor_set_layouts = deallocate (vulkan->descriptor_set_layouts); vulkan->descriptor_sets = deallocate (vulkan->descriptor_sets); - vkDestroyDescriptorPool (vulkan->logical_device, vulkan->descriptor_pool, null); - vkDestroySampler (vulkan->logical_device, vulkan->sampler, null); - vkDestroyImageView (vulkan->logical_device, vulkan->layout_image_view, null); - vkDestroyImage (vulkan->logical_device, vulkan->layout_image, null); - vkFreeMemory (vulkan->logical_device, vulkan->layout_memory, null); + vkDestroyDescriptorPool (vulkan->boolean_device, vulkan->descriptor_pool, null); + vkDestroySampler (vulkan->boolean_device, vulkan->sampler, null); + vkDestroyImageView (vulkan->boolean_device, vulkan->layout_image_view, null); + vkDestroyImage (vulkan->boolean_device, vulkan->layout_image, null); + vkFreeMemory (vulkan->boolean_device, vulkan->layout_memory, null); vulkan->layout_data = deallocate (vulkan->layout_data); vulkan->index_data = deallocate (vulkan->index_data); vulkan->vertex_data = deallocate (vulkan->vertex_data); /* - vkFreeCommandBuffers (vulkan->logical_device, vulkan->command_pool, vulkan->image_count, vulkan->command_buffers); + vkFreeCommandBuffers (vulkan->boolean_device, vulkan->command_pool, vulkan->image_count, vulkan->command_buffers); */ vulkan->command_buffers = deallocate (vulkan->command_buffers); - vkDestroyCommandPool (vulkan->logical_device, vulkan->command_pool, null); + vkDestroyCommandPool (vulkan->boolean_device, vulkan->command_pool, null); - for (u4 index = 0; index < vulkan->image_count; ++index) { - vkDestroyFramebuffer (vulkan->logical_device, vulkan->framebuffers [index], null); + for (natural index = 0; index < vulkan->image_count; ++index) { + vkDestroyFramebuffer (vulkan->boolean_device, vulkan->framebuffers [index], null); } vulkan->framebuffers = deallocate (vulkan->framebuffers); - vkDestroyPipeline (vulkan->logical_device, vulkan->pipeline, null); - vkDestroyPipelineLayout (vulkan->logical_device, vulkan->pipeline_layout, null); - vkDestroyShaderModule (vulkan->logical_device, vulkan->fragment_shader, null); - vkDestroyShaderModule (vulkan->logical_device, vulkan->vertex_shader, null); - vkDestroyDescriptorSetLayout (vulkan->logical_device, vulkan->descriptor_set_layout, null); - vkDestroyRenderPass (vulkan->logical_device, vulkan->render_pass, null); - - for (u4 index = 0; index < vulkan->image_count; ++index) { - vkDestroySemaphore (vulkan->logical_device, vulkan->semaphore_set_1 [index], null); - vkDestroySemaphore (vulkan->logical_device, vulkan->semaphore_set_2 [index], null); - vkDestroyFence (vulkan->logical_device, vulkan->fence_set_1 [index], null); + vkDestroyPipeline (vulkan->boolean_device, vulkan->pipeline, null); + vkDestroyPipelineLayout (vulkan->boolean_device, vulkan->pipeline_layout, null); + vkDestroyShaderModule (vulkan->boolean_device, vulkan->fragment_shader, null); + vkDestroyShaderModule (vulkan->boolean_device, vulkan->vertex_shader, null); + vkDestroyDescriptorSetLayout (vulkan->boolean_device, vulkan->descriptor_set_layout, null); + vkDestroyRenderPass (vulkan->boolean_device, vulkan->render_pass, null); + + for (natural index = 0; index < vulkan->image_count; ++index) { + vkDestroySemaphore (vulkan->boolean_device, vulkan->semaphore_set_1 [index], null); + vkDestroySemaphore (vulkan->boolean_device, vulkan->semaphore_set_2 [index], null); + vkDestroyFence (vulkan->boolean_device, vulkan->fence_set_1 [index], null); } vulkan->semaphore_set_1 = deallocate (vulkan->semaphore_set_1); vulkan->semaphore_set_2 = deallocate (vulkan->semaphore_set_2); vulkan->fence_set_1 = deallocate (vulkan->fence_set_1); - for (u4 index = 0; index < vulkan->image_count; ++index) { - vkDestroyImageView (vulkan->logical_device, vulkan->image_views [index], null); + for (natural index = 0; index < vulkan->image_count; ++index) { + vkDestroyImageView (vulkan->boolean_device, vulkan->image_views [index], null); } vulkan->image_views = deallocate (vulkan->image_views); - vkDestroySwapchainKHR (vulkan->logical_device, vulkan->swapchain, null); + vkDestroySwapchainKHR (vulkan->boolean_device, vulkan->swapchain, null); vulkan->images = deallocate (vulkan->images); vkDestroySurfaceKHR (vulkan->instance, vulkan->surface, null); - vkDestroyDevice (vulkan->logical_device, null); + vkDestroyDevice (vulkan->boolean_device, null); vkDestroyInstance (vulkan->instance, null); xcb_destroy_window (vulkan->connection, vulkan->window); @@ -261,9 +261,9 @@ static vulkan_structure * vulkan_deinitialize (vulkan_structure * vulkan) { return (deallocate (vulkan)); } -static u4 vulkan_choose_memory_property (vulkan_structure * vulkan, u4 wanted) { - u4 index = 0; - u4 usable = 0; +static natural vulkan_choose_memory_property (vulkan_structure * vulkan, natural wanted) { + natural index = 0; + natural usable = 0; VkPhysicalDeviceMemoryProperties memory_properties = { 0 }; @@ -282,8 +282,8 @@ static u4 vulkan_choose_memory_property (vulkan_structure * vulkan, u4 wanted) { return (usable); } -static v0 vulkan_create_buffer (vulkan_structure * vulkan, VkBuffer * buffer, VkDeviceMemory * memory, VkDeviceSize size, VkMemoryPropertyFlags usage) { - u4 wanted_memory_index = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; +static procedure vulkan_create_buffer (vulkan_structure * vulkan, VkBuffer * buffer, VkDeviceMemory * memory, VkDeviceSize size, VkMemoryPropertyFlags usage) { + natural wanted_memory_index = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; VkBufferCreateInfo buffer_information = { 0 }; VkMemoryRequirements memory_requirements = { 0 }; @@ -294,20 +294,20 @@ static v0 vulkan_create_buffer (vulkan_structure * vulkan, VkBuffer * buffer, Vk buffer_information.usage = usage; buffer_information.sharingMode = VK_SHARING_MODE_EXCLUSIVE; - vulkan_result (vkCreateBuffer (vulkan->logical_device, & buffer_information, null, buffer)); + vulkan_result (vkCreateBuffer (vulkan->boolean_device, & buffer_information, null, buffer)); - vkGetBufferMemoryRequirements (vulkan->logical_device, * buffer, & memory_requirements); + vkGetBufferMemoryRequirements (vulkan->boolean_device, * buffer, & memory_requirements); memory_allocation_information.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; memory_allocation_information.allocationSize = memory_requirements.size; memory_allocation_information.memoryTypeIndex = vulkan_choose_memory_property (vulkan, wanted_memory_index); - vulkan_result (vkAllocateMemory (vulkan->logical_device, & memory_allocation_information, null, memory)); + vulkan_result (vkAllocateMemory (vulkan->boolean_device, & memory_allocation_information, null, memory)); - vulkan_result (vkBindBufferMemory (vulkan->logical_device, * buffer, * memory, 0)); + vulkan_result (vkBindBufferMemory (vulkan->boolean_device, * buffer, * memory, 0)); } -static v0 vulkan_begin_command_buffer (vulkan_structure * vulkan) { +static procedure vulkan_begin_command_buffer (vulkan_structure * vulkan) { VkCommandBufferAllocateInfo command_buffer_allocation_information = { 0 }; VkCommandBufferBeginInfo command_buffer_begin_information = { 0 }; @@ -319,12 +319,12 @@ static v0 vulkan_begin_command_buffer (vulkan_structure * vulkan) { command_buffer_begin_information.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; command_buffer_begin_information.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; - vulkan_result (vkAllocateCommandBuffers (vulkan->logical_device, & command_buffer_allocation_information, & vulkan->transfer_buffer)); + vulkan_result (vkAllocateCommandBuffers (vulkan->boolean_device, & command_buffer_allocation_information, & vulkan->transfer_buffer)); vulkan_result (vkBeginCommandBuffer (vulkan->transfer_buffer, & command_buffer_begin_information)); } -static v0 vulkan_end_command_buffer (vulkan_structure * vulkan) { +static procedure vulkan_end_command_buffer (vulkan_structure * vulkan) { VkSubmitInfo submit_information = { 0 }; vkEndCommandBuffer (vulkan->transfer_buffer); @@ -337,13 +337,13 @@ static v0 vulkan_end_command_buffer (vulkan_structure * vulkan) { vkQueueWaitIdle (vulkan->queue); - vkFreeCommandBuffers (vulkan->logical_device, vulkan->command_pool, 1, & vulkan->transfer_buffer); + vkFreeCommandBuffers (vulkan->boolean_device, vulkan->command_pool, 1, & vulkan->transfer_buffer); vulkan->transfer_buffer = VK_NULL_HANDLE; } -static v0 vulkan_create_window (vulkan_structure * vulkan, c1 * application) { - u4 window_flags [2] = { 0 }; +static procedure vulkan_create_window (vulkan_structure * vulkan, character * application) { + natural window_flags [2] = { 0 }; vulkan->time = tick_tock (); @@ -367,7 +367,7 @@ static v0 vulkan_create_window (vulkan_structure * vulkan, c1 * application) { XCB_EVENT_MASK_BUTTON_PRESS; xcb_create_window (vulkan->connection, vulkan->screen->root_depth, vulkan->window, vulkan->screen->root, 0, 0, - (u2) vulkan->width, (u2) vulkan->height, 10, XCB_WINDOW_CLASS_INPUT_OUTPUT, + (natural_16) vulkan->width, (natural_16) vulkan->height, 10, XCB_WINDOW_CLASS_INPUT_OUTPUT, vulkan->screen->root_visual, XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK, window_flags); print ("/c Created /3XCB window/-.\n"); @@ -383,31 +383,31 @@ static v0 vulkan_create_window (vulkan_structure * vulkan, c1 * application) { print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_instance (vulkan_structure * vulkan, c1 * application) { - u4 current = 0; - u4 general = 0; +static procedure vulkan_create_instance (vulkan_structure * vulkan, character * application) { + natural current = 0; + natural general = 0; VkApplicationInfo application_information = { 0 }; VkInstanceCreateInfo instance_information = { 0 }; - u4 instance_layer_count = 0; - u4 * instance_layer_index = null; + natural instance_layer_count = 0; + natural * instance_layer_index = null; VkLayerProperties * instance_layer_array = null; - u4 instance_extension_count = 0; - u4 * instance_extension_index = null; + natural instance_extension_count = 0; + natural * instance_extension_index = null; VkExtensionProperties * instance_extension_array = null; - u4 default_instance_layer_count = (u4) (vulkan->validation_layers == true); - u4 default_instance_extension_count = 2; + natural default_instance_layer_count = (natural) (vulkan->validation_layers == true); + natural default_instance_extension_count = 2; - c1 * default_instance_layer_array [VK_MAX_EXTENSION_NAME_SIZE] = { + character * default_instance_layer_array [VK_MAX_EXTENSION_NAME_SIZE] = { "VK_LAYER_KHRONOS_validation" //~"VK_LAYER_LUNARG_parameter_validation", //~"VK_LAYER_LUNARG_core_validation", //~"VK_LAYER_LUNARG_standard_validation" }; - c1 * default_instance_extension_array [VK_MAX_EXTENSION_NAME_SIZE] = { + character * default_instance_extension_array [VK_MAX_EXTENSION_NAME_SIZE] = { VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_XCB_SURFACE_EXTENSION_NAME }; @@ -425,7 +425,7 @@ static v0 vulkan_create_instance (vulkan_structure * vulkan, c1 * application) { for (current = 0; current < instance_layer_count; ++current) { for (general = 0; general < default_instance_layer_count; ++general) { - if (string_compare (instance_layer_array [current].layerName, (c1 *) default_instance_layer_array [general])) { + if (string_compare (instance_layer_array [current].layerName, (character *) default_instance_layer_array [general])) { instance_layer_index [current] = true; } } @@ -451,7 +451,7 @@ static v0 vulkan_create_instance (vulkan_structure * vulkan, c1 * application) { for (current = 0; current < instance_extension_count; ++current) { for (general = 0; general < default_instance_extension_count; ++general) { - if (string_compare (instance_extension_array [current].extensionName, (c1 *) default_instance_extension_array [general])) { + if (string_compare (instance_extension_array [current].extensionName, (character *) default_instance_extension_array [general])) { instance_extension_index [current] = true; } } @@ -486,7 +486,7 @@ static v0 vulkan_create_instance (vulkan_structure * vulkan, c1 * application) { print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_surface (vulkan_structure * vulkan) { +static procedure vulkan_create_surface (vulkan_structure * vulkan) { VkXcbSurfaceCreateInfoKHR surface_information = { 0 }; vulkan->time = tick_tock (); @@ -501,21 +501,21 @@ static v0 vulkan_create_surface (vulkan_structure * vulkan) { print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_device (vulkan_structure * vulkan) { +static procedure vulkan_create_device (vulkan_structure * vulkan) { VkDeviceQueueCreateInfo queues = { 0 }; VkDeviceCreateInfo device_information = { 0 }; VkPhysicalDeviceMemoryProperties memory_properties = { 0 }; - u4 queue_count = 0; - u4 physical_device_count = 0; + natural queue_count = 0; + natural physical_device_count = 0; VkPhysicalDevice * physical_device_array = null; VkBool32 * support = null; - f4 queue_priorities [1] = { 1 }; + real queue_priorities [1] = { 1 }; - u4 default_device_extension_count = 1; + natural default_device_extension_count = 1; - c1 * default_device_extension_array [VK_MAX_EXTENSION_NAME_SIZE] = { + character * default_device_extension_array [VK_MAX_EXTENSION_NAME_SIZE] = { VK_KHR_SWAPCHAIN_EXTENSION_NAME }; @@ -531,12 +531,12 @@ static v0 vulkan_create_device (vulkan_structure * vulkan) { print ("Enumerated available physical devices.\n"); - for (u4 index = 0; index < physical_device_count; ++index) { - u4 general = 0; - u4 current = 0; + for (natural index = 0; index < physical_device_count; ++index) { + natural general = 0; + natural current = 0; - u4 device_extension_count = 0; - u4 * device_extension_index = null; + natural device_extension_count = 0; + natural * device_extension_index = null; VkExtensionProperties * device_extension_array = null; VkPhysicalDeviceProperties physical_device_properties = { 0 }; @@ -587,7 +587,7 @@ static v0 vulkan_create_device (vulkan_structure * vulkan) { for (current = 0; current < device_extension_count; ++current) { for (general = 0; general < default_device_extension_count; ++general) { - if (string_compare (device_extension_array [current].extensionName, (c1 *) default_device_extension_array [general])) { + if (string_compare (device_extension_array [current].extensionName, (character *) default_device_extension_array [general])) { device_extension_index [current] = true; } } @@ -642,21 +642,21 @@ static v0 vulkan_create_device (vulkan_structure * vulkan) { device_information.ppEnabledExtensionNames = default_device_extension_array; device_information.pEnabledFeatures = null; - vulkan_result (vkCreateDevice (vulkan->physical_device, & device_information, null, & vulkan->logical_device)); + vulkan_result (vkCreateDevice (vulkan->physical_device, & device_information, null, & vulkan->boolean_device)); - print ("/c Created Vulkan logical device.\n"); + print ("/c Created Vulkan boolean device.\n"); - vkGetDeviceQueue (vulkan->logical_device, vulkan->queue_index, 0, & vulkan->queue); + vkGetDeviceQueue (vulkan->boolean_device, vulkan->queue_index, 0, & vulkan->queue); vkGetPhysicalDeviceQueueFamilyProperties (vulkan->physical_device, & queue_count, null); support = allocate (queue_count * sizeof (VkBool32)); - for (u4 index = 0; index < queue_count; ++index) { + for (natural index = 0; index < queue_count; ++index) { vulkan_result (vkGetPhysicalDeviceSurfaceSupportKHR (vulkan->physical_device, index, vulkan->surface, & support [index])); } - for (u4 index = 0; (index != queue_count) && (! (vulkan->queue_index = support [index] ? (index++) : 0)); ); + for (natural index = 0; (index != queue_count) && (! (vulkan->queue_index = support [index] ? (index++) : 0)); ); support = deallocate (support); @@ -664,7 +664,7 @@ static v0 vulkan_create_device (vulkan_structure * vulkan) { print ("Found /2Vulkan physical device/- memory properties.\n"); - for (u4 index = 0; index < memory_properties.memoryTypeCount; ++index) { + for (natural index = 0; index < memory_properties.memoryTypeCount; ++index) { print ("> %i\n", memory_properties.memoryTypes [index].propertyFlags); } @@ -672,7 +672,7 @@ static v0 vulkan_create_device (vulkan_structure * vulkan) { print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_choose_extent (vulkan_structure * vulkan) { +static procedure vulkan_choose_extent (vulkan_structure * vulkan) { VkSurfaceCapabilitiesKHR capabilities = { 0 }; vulkan->time = tick_tock (); @@ -697,8 +697,8 @@ static v0 vulkan_choose_extent (vulkan_structure * vulkan) { print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_choose_format (vulkan_structure * vulkan) { - u4 format_count = 0; +static procedure vulkan_choose_format (vulkan_structure * vulkan) { + natural format_count = 0; VkSurfaceFormatKHR * format_array = null; vulkan->time = tick_tock (); @@ -719,8 +719,8 @@ static v0 vulkan_choose_format (vulkan_structure * vulkan) { print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_choose_present_mode (vulkan_structure * vulkan) { - u4 present_mode_count = 0; +static procedure vulkan_choose_present_mode (vulkan_structure * vulkan) { + natural present_mode_count = 0; VkPresentModeKHR * present_mode_array = null; vulkan->time = tick_tock (); @@ -740,7 +740,7 @@ static v0 vulkan_choose_present_mode (vulkan_structure * vulkan) { print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_swapchain (vulkan_structure * vulkan) { +static procedure vulkan_create_swapchain (vulkan_structure * vulkan) { VkSwapchainCreateInfoKHR swapchain_information = { 0 }; vulkan->time = tick_tock (); @@ -762,28 +762,28 @@ static v0 vulkan_create_swapchain (vulkan_structure * vulkan) { swapchain_information.clipped = VK_TRUE; swapchain_information.oldSwapchain = VK_NULL_HANDLE; - vulkan_result (vkCreateSwapchainKHR (vulkan->logical_device, & swapchain_information, null, & vulkan->swapchain)); + vulkan_result (vkCreateSwapchainKHR (vulkan->boolean_device, & swapchain_information, null, & vulkan->swapchain)); print ("/c Created /2Vulkan swapchain/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_images (vulkan_structure * vulkan) { - u4 temporary = vulkan->image_count; +static procedure vulkan_create_images (vulkan_structure * vulkan) { + natural temporary = vulkan->image_count; vulkan->time = tick_tock (); - vulkan_result (vkGetSwapchainImagesKHR (vulkan->logical_device, vulkan->swapchain, & temporary, null)); + vulkan_result (vkGetSwapchainImagesKHR (vulkan->boolean_device, vulkan->swapchain, & temporary, null)); vulkan->images = allocate (vulkan->image_count * sizeof (VkImage)); - vulkan_result (vkGetSwapchainImagesKHR (vulkan->logical_device, vulkan->swapchain, & temporary, vulkan->images)); + vulkan_result (vkGetSwapchainImagesKHR (vulkan->boolean_device, vulkan->swapchain, & temporary, vulkan->images)); print ("/c Created /2Vulkan swapchain images/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_image_views (vulkan_structure * vulkan) { +static procedure vulkan_create_image_views (vulkan_structure * vulkan) { VkComponentMapping component_mapping = { 0 }; VkImageSubresourceRange image_subresource_range = { 0 }; VkImageViewCreateInfo image_view_information = { 0 }; @@ -809,17 +809,17 @@ static v0 vulkan_create_image_views (vulkan_structure * vulkan) { image_view_information.components = component_mapping; image_view_information.subresourceRange = image_subresource_range; - for (u4 index = 0; index < vulkan->image_count; ++index) { + for (natural index = 0; index < vulkan->image_count; ++index) { image_view_information.image = vulkan->images [index]; - vulkan_result (vkCreateImageView (vulkan->logical_device, & image_view_information, null, & vulkan->image_views [index])); + vulkan_result (vkCreateImageView (vulkan->boolean_device, & image_view_information, null, & vulkan->image_views [index])); } print ("/c Created /2Vulkan swapchain image views/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_semaphores (vulkan_structure * vulkan) { +static procedure vulkan_create_semaphores (vulkan_structure * vulkan) { VkSemaphoreCreateInfo semaphore_information = { 0 }; vulkan->time = tick_tock (); @@ -829,17 +829,17 @@ static v0 vulkan_create_semaphores (vulkan_structure * vulkan) { semaphore_information.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; - for (u4 index = 0; index < vulkan->image_count; ++index) { - vulkan_result (vkCreateSemaphore (vulkan->logical_device, & semaphore_information, null, & vulkan->semaphore_set_1 [index])); - vulkan_result (vkCreateSemaphore (vulkan->logical_device, & semaphore_information, null, & vulkan->semaphore_set_2 [index])); + for (natural index = 0; index < vulkan->image_count; ++index) { + vulkan_result (vkCreateSemaphore (vulkan->boolean_device, & semaphore_information, null, & vulkan->semaphore_set_1 [index])); + vulkan_result (vkCreateSemaphore (vulkan->boolean_device, & semaphore_information, null, & vulkan->semaphore_set_2 [index])); } print ("/c Created /2Vulkan synchronization semaphores/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_fences (vulkan_structure * vulkan) { - u4 index = 0; +static procedure vulkan_create_fences (vulkan_structure * vulkan) { + natural index = 0; VkFenceCreateInfo fence_information = { 0 }; @@ -851,14 +851,14 @@ static v0 vulkan_create_fences (vulkan_structure * vulkan) { fence_information.flags = VK_FENCE_CREATE_SIGNALED_BIT; for (index = 0; index < vulkan->image_count; ++index) { - vulkan_result (vkCreateFence (vulkan->logical_device, & fence_information, null, & vulkan->fence_set_1 [index])); + vulkan_result (vkCreateFence (vulkan->boolean_device, & fence_information, null, & vulkan->fence_set_1 [index])); } print ("/c Created /2Vulkan synchronization fences/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_render_pass (vulkan_structure * vulkan) { +static procedure vulkan_create_render_pass (vulkan_structure * vulkan) { VkAttachmentDescription attachment_description = { 0 }; VkAttachmentReference attachment_reference = { 0 }; VkSubpassDescription subpass_description = { 0 }; @@ -881,7 +881,7 @@ static v0 vulkan_create_render_pass (vulkan_structure * vulkan) { attachment_reference.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; subpass_description.flags = 0; - subpass_description.pipelineBindPos4 = VK_PIPELINE_BIND_POINT_GRAPHICS; + subpass_description.pipelineBindPointeger = VK_PIPELINE_BIND_POINT_GRAPHICS; subpass_description.inputAttachmentCount = 0; subpass_description.pInputAttachments = null; subpass_description.colorAttachmentCount = 1; @@ -914,13 +914,13 @@ static v0 vulkan_create_render_pass (vulkan_structure * vulkan) { render_pass_information.dependencyCount = 2; render_pass_information.pDependencies = subpass_dependencies; - vulkan_result (vkCreateRenderPass (vulkan->logical_device, & render_pass_information, null, & vulkan->render_pass)); + vulkan_result (vkCreateRenderPass (vulkan->boolean_device, & render_pass_information, null, & vulkan->render_pass)); print ("/c Created /2Vulkan render pass/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_descriptor_set_layout (vulkan_structure * vulkan) { +static procedure vulkan_create_descriptor_set_layout (vulkan_structure * vulkan) { VkDescriptorSetLayoutBinding descriptor_set_layout_bindings [2] = { { 0 } }; VkDescriptorSetLayoutCreateInfo descriptor_set_layout_information = { 0 }; @@ -941,15 +941,15 @@ static v0 vulkan_create_descriptor_set_layout (vulkan_structure * vulkan) { descriptor_set_layout_information.bindingCount = 2; descriptor_set_layout_information.pBindings = descriptor_set_layout_bindings; - vulkan_result (vkCreateDescriptorSetLayout (vulkan->logical_device, & descriptor_set_layout_information, null, + vulkan_result (vkCreateDescriptorSetLayout (vulkan->boolean_device, & descriptor_set_layout_information, null, & vulkan->descriptor_set_layout)); print ("/c Created /2 Vulkan descriptor layout/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_vertex_shader (vulkan_structure * vulkan) { - u4 vertex_shader_code [] = { +static procedure vulkan_create_vertex_shader (vulkan_structure * vulkan) { + natural vertex_shader_code [] = { 0x07230203, 0x00010000, 0x000d000b, 0x00000028, 0x00000000, 0x00020011, 0x00000001, 0x0006000b, 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001, 0x000b000f, 0x00000000, 0x00000004, 0x6e69616d, 0x00000000, 0x0000000d, 0x00000012, 0x00000021, @@ -1000,14 +1000,14 @@ static v0 vulkan_create_vertex_shader (vulkan_structure * vulkan) { vertex_shader_information.codeSize = sizeof (vertex_shader_code); vertex_shader_information.pCode = vertex_shader_code; - vulkan_result (vkCreateShaderModule (vulkan->logical_device, & vertex_shader_information, null, & vulkan->vertex_shader)); + vulkan_result (vkCreateShaderModule (vulkan->boolean_device, & vertex_shader_information, null, & vulkan->vertex_shader)); print ("/c Created /2Vulkan vertex shader module/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_fragment_shader (vulkan_structure * vulkan) { - u4 fragment_shader_code [] = { +static procedure vulkan_create_fragment_shader (vulkan_structure * vulkan) { + natural fragment_shader_code [] = { 0x07230203, 0x00010000, 0x000d000b, 0x00000018, 0x00000000, 0x00020011, 0x00000001, 0x0006000b, 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001, 0x0008000f, 0x00000004, 0x00000004, 0x6e69616d, 0x00000000, 0x00000009, 0x00000011, 0x00000015, @@ -1041,13 +1041,13 @@ static v0 vulkan_create_fragment_shader (vulkan_structure * vulkan) { fragment_shader_information.codeSize = sizeof (fragment_shader_code); fragment_shader_information.pCode = fragment_shader_code; - vulkan_result (vkCreateShaderModule (vulkan->logical_device, & fragment_shader_information, null, & vulkan->fragment_shader)); + vulkan_result (vkCreateShaderModule (vulkan->boolean_device, & fragment_shader_information, null, & vulkan->fragment_shader)); print ("/c Created /2Vulkan fragment shader module/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_pipeline_layout (vulkan_structure * vulkan) { +static procedure vulkan_create_pipeline_layout (vulkan_structure * vulkan) { VkPipelineLayoutCreateInfo pipeline_layout_information = { 0 }; vulkan->time = tick_tock (); @@ -1056,13 +1056,13 @@ static v0 vulkan_create_pipeline_layout (vulkan_structure * vulkan) { pipeline_layout_information.setLayoutCount = 1; pipeline_layout_information.pSetLayouts = & vulkan->descriptor_set_layout; - vulkan_result (vkCreatePipelineLayout (vulkan->logical_device, & pipeline_layout_information, VK_NULL_HANDLE, & vulkan->pipeline_layout)); + vulkan_result (vkCreatePipelineLayout (vulkan->boolean_device, & pipeline_layout_information, VK_NULL_HANDLE, & vulkan->pipeline_layout)); print ("/c Created /2Vulkan graphics pipeline layout/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_pipeline (vulkan_structure * vulkan) { +static procedure vulkan_create_pipeline (vulkan_structure * vulkan) { VkPipelineShaderStageCreateInfo pipeline_shader_stage_information [2] = { { 0 } }; VkPipelineInputAssemblyStateCreateInfo pipeline_input_assembly_state_information = { 0 }; VkVertexInputBindingDescription vertex_input_binding_description [1] = { { 0 } }; @@ -1198,13 +1198,13 @@ static v0 vulkan_create_pipeline (vulkan_structure * vulkan) { pipeline_information.basePipelineHandle = VK_NULL_HANDLE; pipeline_information.basePipelineIndex = -1; - vulkan_result (vkCreateGraphicsPipelines (vulkan->logical_device, VK_NULL_HANDLE, 1, & pipeline_information, null, & vulkan->pipeline)); + vulkan_result (vkCreateGraphicsPipelines (vulkan->boolean_device, VK_NULL_HANDLE, 1, & pipeline_information, null, & vulkan->pipeline)); print ("/c Created /2Vulkan graphics pipeline/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_framebuffers (vulkan_structure * vulkan) { +static procedure vulkan_create_framebuffers (vulkan_structure * vulkan) { VkFramebufferCreateInfo framebuffer_information = { 0 }; vulkan->time = tick_tock (); @@ -1218,17 +1218,17 @@ static v0 vulkan_create_framebuffers (vulkan_structure * vulkan) { framebuffer_information.height = vulkan->extent.height; framebuffer_information.layers = 1; - for (u4 index = 0; index < vulkan->image_count; ++index) { + for (natural index = 0; index < vulkan->image_count; ++index) { framebuffer_information.pAttachments = & vulkan->image_views [index]; - vulkan_result (vkCreateFramebuffer (vulkan->logical_device, & framebuffer_information, null, & vulkan->framebuffers [index])); + vulkan_result (vkCreateFramebuffer (vulkan->boolean_device, & framebuffer_information, null, & vulkan->framebuffers [index])); } print ("/c Created /2Vulkan framebuffers/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_command_pool (vulkan_structure * vulkan) { +static procedure vulkan_create_command_pool (vulkan_structure * vulkan) { VkCommandPoolCreateInfo command_pool_information = { 0 }; vulkan->time = tick_tock (); @@ -1237,13 +1237,13 @@ static v0 vulkan_create_command_pool (vulkan_structure * vulkan) { command_pool_information.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; command_pool_information.queueFamilyIndex = vulkan->queue_index; - vulkan_result (vkCreateCommandPool (vulkan->logical_device, & command_pool_information, null, & vulkan->command_pool)); + vulkan_result (vkCreateCommandPool (vulkan->boolean_device, & command_pool_information, null, & vulkan->command_pool)); print ("/c Created /2Vulkan command pool/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_command_buffers (vulkan_structure * vulkan) { +static procedure vulkan_create_command_buffers (vulkan_structure * vulkan) { VkCommandBufferAllocateInfo command_buffer_information = { 0 }; vulkan->time = tick_tock (); @@ -1255,16 +1255,16 @@ static v0 vulkan_create_command_buffers (vulkan_structure * vulkan) { command_buffer_information.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; command_buffer_information.commandBufferCount = vulkan->image_count; - vulkan_result (vkAllocateCommandBuffers (vulkan->logical_device, & command_buffer_information, vulkan->command_buffers)); + vulkan_result (vkAllocateCommandBuffers (vulkan->boolean_device, & command_buffer_information, vulkan->command_buffers)); print ("/c Allocated /2Vulkan command buffers/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_vertex_buffer (vulkan_structure * vulkan) { +static procedure vulkan_create_vertex_buffer (vulkan_structure * vulkan) { VkBuffer transfer_buffer = VK_NULL_HANDLE; VkDeviceMemory transfer_memory = VK_NULL_HANDLE; - v0 * transfer_v0 = null; + procedure * transfer_procedure = null; VkBufferCopy copy_information = { 0 }; /* @@ -1274,7 +1274,7 @@ static v0 vulkan_create_vertex_buffer (vulkan_structure * vulkan) { vulkan_create_buffer (vulkan, & transfer_buffer, & transfer_memory, vulkan->vertex_size, VK_BUFFER_USAGE_TRANSFER_SRC_BIT); - vulkan_result (vkMapMemory (vulkan->logical_device, transfer_memory, 0, vulkan->vertex_size, 0, & transfer_v0)); + vulkan_result (vkMapMemory (vulkan->boolean_device, transfer_memory, 0, vulkan->vertex_size, 0, & transfer_v0)); memory_copy (transfer_v0, vulkan->vertex_data, vulkan->vertex_size); @@ -1291,17 +1291,17 @@ static v0 vulkan_create_vertex_buffer (vulkan_structure * vulkan) { vulkan_end_command_buffer (vulkan); - vkDestroyBuffer (vulkan->logical_device, transfer_buffer, null); - vkFreeMemory (vulkan->logical_device, transfer_memory, null); + vkDestroyBuffer (vulkan->boolean_device, transfer_buffer, null); + vkFreeMemory (vulkan->boolean_device, transfer_memory, null); /*print ("/c Created /2Vulkan vertex buffer/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time);*/ } -static v0 vulkan_create_index_buffer (vulkan_structure * vulkan) { +static procedure vulkan_create_index_buffer (vulkan_structure * vulkan) { VkBuffer transfer_buffer = VK_NULL_HANDLE; VkDeviceMemory transfer_memory = VK_NULL_HANDLE; - v0 * transfer_v0 = null; + procedure * transfer_procedure = null; VkBufferCopy copy_information = { 0 }; /* @@ -1311,7 +1311,7 @@ static v0 vulkan_create_index_buffer (vulkan_structure * vulkan) { vulkan_create_buffer (vulkan, & transfer_buffer, & transfer_memory, vulkan->index_size, VK_BUFFER_USAGE_TRANSFER_SRC_BIT); - vulkan_result (vkMapMemory (vulkan->logical_device, transfer_memory, 0, vulkan->index_size, 0, & transfer_v0)); + vulkan_result (vkMapMemory (vulkan->boolean_device, transfer_memory, 0, vulkan->index_size, 0, & transfer_v0)); memory_copy (transfer_v0, vulkan->index_data, vulkan->index_size); @@ -1328,17 +1328,17 @@ static v0 vulkan_create_index_buffer (vulkan_structure * vulkan) { vulkan_end_command_buffer (vulkan); - vkDestroyBuffer (vulkan->logical_device, transfer_buffer, null); - vkFreeMemory (vulkan->logical_device, transfer_memory, null); + vkDestroyBuffer (vulkan->boolean_device, transfer_buffer, null); + vkFreeMemory (vulkan->boolean_device, transfer_memory, null); /* print ("/c Created /2Vulkan index buffer/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time);*/ } -static v0 vulkan_create_image_buffer (vulkan_structure * vulkan) { +static procedure vulkan_create_image_buffer (vulkan_structure * vulkan) { VkBuffer transfer_buffer = VK_NULL_HANDLE; VkDeviceMemory transfer_memory = VK_NULL_HANDLE; - v0 * transfer_v0 = null; + procedure * transfer_procedure = null; VkExtent3D image_extent = { 0 }; VkImageCreateInfo image_information = { 0 }; @@ -1357,7 +1357,7 @@ static v0 vulkan_create_image_buffer (vulkan_structure * vulkan) { vulkan_create_buffer (vulkan, & transfer_buffer, & transfer_memory, vulkan->layout_size, VK_BUFFER_USAGE_TRANSFER_SRC_BIT); - vulkan_result (vkMapMemory (vulkan->logical_device, transfer_memory, 0, vulkan->layout_size, 0, & transfer_v0)); + vulkan_result (vkMapMemory (vulkan->boolean_device, transfer_memory, 0, vulkan->layout_size, 0, & transfer_v0)); memory_copy (transfer_v0, vulkan->layout_data, vulkan->layout_size); @@ -1383,17 +1383,17 @@ static v0 vulkan_create_image_buffer (vulkan_structure * vulkan) { image_subresource_range.baseArrayLayer = 0; image_subresource_range.layerCount = 1; - vulkan_result (vkCreateImage (vulkan->logical_device, & image_information, null, & vulkan->layout_image)); + vulkan_result (vkCreateImage (vulkan->boolean_device, & image_information, null, & vulkan->layout_image)); - vkGetImageMemoryRequirements (vulkan->logical_device, vulkan->layout_image, & memory_requirements); + vkGetImageMemoryRequirements (vulkan->boolean_device, vulkan->layout_image, & memory_requirements); memory_allocation_information.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; memory_allocation_information.allocationSize = memory_requirements.size; memory_allocation_information.memoryTypeIndex = vulkan_choose_memory_property (vulkan, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); - vulkan_result (vkAllocateMemory (vulkan->logical_device, & memory_allocation_information, null, & vulkan->layout_memory)); + vulkan_result (vkAllocateMemory (vulkan->boolean_device, & memory_allocation_information, null, & vulkan->layout_memory)); - vulkan_result (vkBindImageMemory (vulkan->logical_device, vulkan->layout_image, vulkan->layout_memory, 0)); + vulkan_result (vkBindImageMemory (vulkan->boolean_device, vulkan->layout_image, vulkan->layout_memory, 0)); vulkan_begin_command_buffer (vulkan); @@ -1470,16 +1470,16 @@ static v0 vulkan_create_image_buffer (vulkan_structure * vulkan) { image_view_information.subresourceRange = image_subresource_range; image_view_information.image = vulkan->layout_image; - vulkan_result (vkCreateImageView (vulkan->logical_device, & image_view_information, null, & vulkan->layout_image_view)); + vulkan_result (vkCreateImageView (vulkan->boolean_device, & image_view_information, null, & vulkan->layout_image_view)); - vkDestroyBuffer (vulkan->logical_device, transfer_buffer, null); - vkFreeMemory (vulkan->logical_device, transfer_memory, null); + vkDestroyBuffer (vulkan->boolean_device, transfer_buffer, null); + vkFreeMemory (vulkan->boolean_device, transfer_memory, null); print ("/c Created /2Vulkan image layout buffer/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_sampler (vulkan_structure * vulkan) { +static procedure vulkan_create_sampler (vulkan_structure * vulkan) { VkSamplerCreateInfo sampler_information = { 0 }; vulkan->time = tick_tock (); @@ -1501,13 +1501,13 @@ static v0 vulkan_create_sampler (vulkan_structure * vulkan) { sampler_information.borderColor = VK_BORDER_COLOR_INT_OPAQUE_BLACK; sampler_information.unnormalizedCoordinates = VK_FALSE; - vulkan_result (vkCreateSampler (vulkan->logical_device, & sampler_information, null, & vulkan->sampler)); + vulkan_result (vkCreateSampler (vulkan->boolean_device, & sampler_information, null, & vulkan->sampler)); print ("/c Created /2Vulkan sampler/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_descriptor_pool (vulkan_structure * vulkan) { +static procedure vulkan_create_descriptor_pool (vulkan_structure * vulkan) { VkDescriptorPoolSize descriptor_pool_sizes [2] = { { 0 } }; VkDescriptorPoolCreateInfo descriptor_pool_information = { 0 }; @@ -1524,20 +1524,20 @@ static v0 vulkan_create_descriptor_pool (vulkan_structure * vulkan) { descriptor_pool_information.poolSizeCount = 2; descriptor_pool_information.pPoolSizes = descriptor_pool_sizes; - vulkan_result (vkCreateDescriptorPool (vulkan->logical_device, & descriptor_pool_information, null, & vulkan->descriptor_pool)); + vulkan_result (vkCreateDescriptorPool (vulkan->boolean_device, & descriptor_pool_information, null, & vulkan->descriptor_pool)); print ("/c Created /2Vulkan descriptor pool/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_create_descriptor_sets (vulkan_structure * vulkan) { +static procedure vulkan_create_descriptor_sets (vulkan_structure * vulkan) { VkDescriptorSetAllocateInfo descriptor_set_allocation_information = { 0 }; vulkan->time = tick_tock (); vulkan->descriptor_set_layouts = allocate (vulkan->image_count * sizeof (VkDescriptorSetLayout)); - for (u4 index = 0; index < vulkan->image_count; ++index) { + for (natural index = 0; index < vulkan->image_count; ++index) { vulkan->descriptor_set_layouts [index] = vulkan->descriptor_set_layout; } @@ -1548,13 +1548,13 @@ static v0 vulkan_create_descriptor_sets (vulkan_structure * vulkan) { vulkan->descriptor_sets = allocate (vulkan->image_count * sizeof (VkDescriptorSet)); - vulkan_result (vkAllocateDescriptorSets (vulkan->logical_device, & descriptor_set_allocation_information, vulkan->descriptor_sets)); + vulkan_result (vkAllocateDescriptorSets (vulkan->boolean_device, & descriptor_set_allocation_information, vulkan->descriptor_sets)); print ("/c Allocated /2Vulkan descriptor sets/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_record_descriptor_sets (vulkan_structure * vulkan) { +static procedure vulkan_record_descriptor_sets (vulkan_structure * vulkan) { VkDescriptorBufferInfo descriptor_buffer_information = { 0 }; VkDescriptorImageInfo descriptor_image_information = { 0 }; VkWriteDescriptorSet write_descriptor_set = { 0 }; @@ -1573,18 +1573,18 @@ static v0 vulkan_record_descriptor_sets (vulkan_structure * vulkan) { write_descriptor_set.pImageInfo = & descriptor_image_information; write_descriptor_set.pBufferInfo = null; - for (u4 index = 0; index < vulkan->image_count; ++index) { + for (natural index = 0; index < vulkan->image_count; ++index) { write_descriptor_set.dstSet = vulkan->descriptor_sets [index]; - vkUpdateDescriptorSets (vulkan->logical_device, 1, & write_descriptor_set, 0, null); + vkUpdateDescriptorSets (vulkan->boolean_device, 1, & write_descriptor_set, 0, null); } print ("/c Recorded /2Vulkan descriptor sets/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time); } -static v0 vulkan_record_command_buffers (vulkan_structure * vulkan, s4 clear_colour, s4 frame) { - u4 index = 0; +static procedure vulkan_record_command_buffers (vulkan_structure * vulkan, integer clear_colour, integer frame) { + natural index = 0; VkCommandBufferBeginInfo command_buffer_begin_information = { 0 }; //~VkImageSubresourceRange image_subresource_range = { 0 }; @@ -1596,13 +1596,13 @@ static v0 vulkan_record_command_buffers (vulkan_structure * vulkan, s4 clear_col VkDeviceSize vertex_offset = 0; VkClearColorValue clear_colour_value = { { - (float) ((clear_colour & 0xff000000) >> 24) / 255, - (float) ((clear_colour & 0x00ff0000) >> 16) / 255, - (float) ((clear_colour & 0x0000ff00) >> 8) / 255, - (float) ((clear_colour & 0x000000ff) >> 0) / 255 + (real) ((clear_colour & 0xff000000) >> 24) / 255, + (real) ((clear_colour & 0x00ff0000) >> 16) / 255, + (real) ((clear_colour & 0x0000ff00) >> 8) / 255, + (real) ((clear_colour & 0x000000ff) >> 0) / 255 } }; - (v0) frame; + (none) frame; /* vulkan->time = tick_tock (); */ @@ -1678,13 +1678,13 @@ static v0 vulkan_record_command_buffers (vulkan_structure * vulkan, s4 clear_col vulkan_result (vkEndCommandBuffer (vulkan_command_buffers [frame])); */ vulkan_result (vkQueueWaitIdle (vulkan->queue)); - vulkan_result (vkDeviceWaitIdle (vulkan->logical_device)); + vulkan_result (vkDeviceWaitIdle (vulkan->boolean_device)); /*print ("/c Recorded /2Vulkan command buffers/-.\n"); print ("/c Time approximation: /6%i/-\n", tick_tock () - vulkan->time);*/ } -static u4 vulkan_import_sprite (vulkan_structure * vulkan, u4 * data, u4 width, u4 height) { +static natural vulkan_import_sprite (vulkan_structure * vulkan, natural * data, natural width, natural height) { fatal_failure (vulkan->active == true, "vulkan_import_sprite: Failed to import sprite, engine was already configured."); fatal_failure (data == null, "vulkan_import_sprite: Failed to import sprite, data is null pointer."); fatal_failure (width <= 0, "vulkan_import_sprite: Failed to import sprite, width is equal or below zero."); @@ -1707,15 +1707,15 @@ static u4 vulkan_import_sprite (vulkan_structure * vulkan, u4 * data, u4 width, return (vulkan->sprite_count - 1); } -static u4 vulkan_import_font (vulkan_structure * vulkan, u4 * data, u4 image_width, u4 image_height, c1 begin, c1 end, u4 empty) { - u4 pointer = 0; - c1 index = 0; - u4 width = 0; - u4 height = 0; - u4 x = 0; - u4 y = 0; +static natural vulkan_import_font (vulkan_structure * vulkan, natural * data, natural image_width, natural image_height, character begin, character end, natural empty) { + natural pointer = 0; + character index = 0; + natural width = 0; + natural height = 0; + natural x = 0; + natural y = 0; - u4 * buffer = null; + natural * buffer = null; ++vulkan->font_count; @@ -1761,23 +1761,23 @@ static u4 vulkan_import_font (vulkan_structure * vulkan, u4 * data, u4 image_wid return (vulkan->font_count - 1); } -static v0 vulkan_bundle_layout (vulkan_structure * vulkan) { - u4 * order = null; +static procedure vulkan_bundle_layout (vulkan_structure * vulkan) { + natural * order = null; - vulkan->layout_size = vulkan->layout_width * vulkan->layout_height * (u4) sizeof (* vulkan->layout_data); + vulkan->layout_size = vulkan->layout_width * vulkan->layout_height * (natural) sizeof (* vulkan->layout_data); vulkan->layout_data = allocate (vulkan->layout_size); order = allocate (vulkan->sprite_count * sizeof (* order)); - for (u4 index = 0; index < vulkan->sprite_count; ++index) { + for (natural index = 0; index < vulkan->sprite_count; ++index) { order [index] = index; } - for (u4 index = 0; index < vulkan->sprite_count; ++index) { - for (u4 subindex = 0; subindex < vulkan->sprite_count; ++subindex) { + for (natural index = 0; index < vulkan->sprite_count; ++index) { + for (natural subindex = 0; subindex < vulkan->sprite_count; ++subindex) { if (vulkan->sprite_height [order [index]] < vulkan->sprite_height [order [subindex]]) { - s4 temporary = order [index]; + integer temporary = order [index]; order [index] = order [subindex]; order [subindex] = temporary; @@ -1785,11 +1785,11 @@ static v0 vulkan_bundle_layout (vulkan_structure * vulkan) { } } - for (u4 index = 0; index < vulkan->sprite_count; ++index) { - u4 x = 0; - u4 y = 0; - u4 u = 0; - u4 v = 0; + for (natural index = 0; index < vulkan->sprite_count; ++index) { + natural x = 0; + natural y = 0; + natural u = 0; + natural v = 0; if (u + vulkan->sprite_width [order [index]] >= vulkan->layout_width) { @@ -1797,13 +1797,13 @@ static v0 vulkan_bundle_layout (vulkan_structure * vulkan) { v += vulkan->sprite_height [order [index]]; } - vulkan->sprite_u [order [index]] = (float) u / (float) vulkan->layout_width; - vulkan->sprite_v [order [index]] = (float) v / (float) vulkan->layout_height; + vulkan->sprite_u [order [index]] = (real) u / (real) vulkan->layout_width; + vulkan->sprite_v [order [index]] = (real) v / (real) vulkan->layout_height; - for (u4 y = 0; y < vulkan->sprite_height [order [index]]; ++y) { - for (u4 x = 0; x < vulkan->sprite_width [order [index]]; ++x) { - u4 destination = (v + y) * vulkan->layout_width + (u + x); - u4 source = y * vulkan->sprite_width [order [index]] + x; + for (natural y = 0; y < vulkan->sprite_height [order [index]]; ++y) { + for (natural x = 0; x < vulkan->sprite_width [order [index]]; ++x) { + natural destination = (v + y) * vulkan->layout_width + (u + x); + natural source = y * vulkan->sprite_width [order [index]] + x; vulkan->layout_data [destination] = vulkan->sprite_data [order [index]] [source]; } @@ -1818,10 +1818,10 @@ static v0 vulkan_bundle_layout (vulkan_structure * vulkan) { order = deallocate (order); } -static v0 vulkan_configure (vulkan_structure * vulkan, s4 width, s4 height, c1 * application) { - s4 index = 0; +static procedure vulkan_configure (vulkan_structure * vulkan, integer width, integer height, character * application) { + integer index = 0; - u4 * dumb_buffer = null; + natural * dumb_buffer = null; if (vulkan->active == true) { return; @@ -1830,8 +1830,8 @@ static v0 vulkan_configure (vulkan_structure * vulkan, s4 width, s4 height, c1 * vulkan->width = width; vulkan->height = height; - vulkan->pixel_width = (float) 2 / (float) width; - vulkan->pixel_height = (float) 2 / (float) height; + vulkan->pixel_width = (real) 2 / (real) width; + vulkan->pixel_height = (real) 2 / (real) height; dumb_buffer = allocate (256 * sizeof (* dumb_buffer)); @@ -1888,25 +1888,25 @@ static v0 vulkan_configure (vulkan_structure * vulkan, s4 width, s4 height, c1 * vulkan->active = true; } /* -static v0 vulkan_reconfigure (v0) { - s4 index; +static procedure vulkan_reconfigure (none) { + integer index; vulkan_result (vkQueueWaitIdle (vulkan_queue)); - vulkan_result (vkDeviceWaitIdle (vulkan_logical_device)); + vulkan_result (vkDeviceWaitIdle (vulkan_boolean_device)); for (index = 0; index < vulkan_image_count; ++index) { - vkDestroyFramebuffer (vulkan_logical_device, vulkan_framebuffers [index], null); + vkDestroyFramebuffer (vulkan_boolean_device, vulkan_framebuffers [index], null); } vulkan_framebuffers = deallocate (vulkan_framebuffers); for (index = 0; index < vulkan_image_count; ++index) { - vkDestroyImageView (vulkan_logical_device, vulkan_image_views [index], null); + vkDestroyImageView (vulkan_boolean_device, vulkan_image_views [index], null); } vulkan_image_views = deallocate (vulkan_image_views); - vkDestroySwapchainKHR (vulkan_logical_device, vulkan_swapchain, null); + vkDestroySwapchainKHR (vulkan_boolean_device, vulkan_swapchain, null); vulkan_images = deallocate (vulkan_images); @@ -1919,25 +1919,25 @@ static v0 vulkan_reconfigure (v0) { vulkan_create_framebuffers (); vulkan_result (vkQueueWaitIdle (vulkan_queue)); - vulkan_result (vkDeviceWaitIdle (vulkan_logical_device)); + vulkan_result (vkDeviceWaitIdle (vulkan_boolean_device)); vulkan_reconfigure_active = false; } */ -static v0 vulkan_render_core (vulkan_structure * vulkan, s4 sprite, s4 x, s4 y, s4 u, s4 v, s4 width, s4 height, - f4 scale_x, f4 scale_y, s4 flip_x, s4 flip_y, - s4 colour_0, u4 colour_1, u4 colour_2, u4 colour_3) { - f4 screen_x = x * vulkan->pixel_width; - f4 screen_y = y * vulkan->pixel_height; +static procedure vulkan_render_core (vulkan_structure * vulkan, integer sprite, integer x, integer y, integer u, integer v, integer width, integer height, + real scale_x, real scale_y, integer flip_x, integer flip_y, + integer colour_0, natural colour_1, natural colour_2, natural colour_3) { + real screen_x = x * vulkan->pixel_width; + real screen_y = y * vulkan->pixel_height; - f4 unwrap_x = vulkan->sprite_u [sprite] + (float) u / vulkan->layout_width; - f4 unwrap_y = vulkan->sprite_v [sprite] + (float) v / vulkan->layout_height; + real unwrap_x = vulkan->sprite_u [sprite] + (real) u / vulkan->layout_width; + real unwrap_y = vulkan->sprite_v [sprite] + (real) v / vulkan->layout_height; - f4 screen_width = (float) width * vulkan->pixel_width * scale_x; - f4 screen_height = (float) height * vulkan->pixel_height * scale_y; + real screen_width = (real) width * vulkan->pixel_width * scale_x; + real screen_height = (real) height * vulkan->pixel_height * scale_y; - f4 unwrap_width = (float) width / vulkan->layout_width; - f4 unwrap_height = (float) height / vulkan->layout_height; + real unwrap_width = (real) width / vulkan->layout_width; + real unwrap_height = (real) height / vulkan->layout_height; fatal_failure (vulkan->vertex_count + 32 >= vulkan->vertex_limit, "Reached vertex limit."); fatal_failure (vulkan->index_count + 6 >= vulkan->index_limit, "Reached index limit."); @@ -1946,37 +1946,37 @@ static v0 vulkan_render_core (vulkan_structure * vulkan, s4 sprite, s4 x, s4 y, vulkan->vertex_data [vulkan->vertex_count + 1] = screen_y; vulkan->vertex_data [vulkan->vertex_count + 2] = unwrap_x + unwrap_width * (flip_y != 0); vulkan->vertex_data [vulkan->vertex_count + 3] = unwrap_y + unwrap_height * (flip_x != 0); - vulkan->vertex_data [vulkan->vertex_count + 4] = (float) ((colour_0 >> 24) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 5] = (float) ((colour_0 >> 16) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 6] = (float) ((colour_0 >> 8) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 7] = (float) ((colour_0 >> 0) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 4] = (real) ((colour_0 >> 24) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 5] = (real) ((colour_0 >> 16) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 6] = (real) ((colour_0 >> 8) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 7] = (real) ((colour_0 >> 0) & 0xff) / 255; vulkan->vertex_data [vulkan->vertex_count + 8] = screen_x + screen_width; vulkan->vertex_data [vulkan->vertex_count + 9] = screen_y; vulkan->vertex_data [vulkan->vertex_count + 10] = unwrap_x + unwrap_width * (flip_y == 0); vulkan->vertex_data [vulkan->vertex_count + 11] = unwrap_y + unwrap_height * (flip_x != 0); - vulkan->vertex_data [vulkan->vertex_count + 12] = (float) ((colour_1 >> 24) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 13] = (float) ((colour_1 >> 16) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 14] = (float) ((colour_1 >> 8) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 15] = (float) ((colour_1 >> 0) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 12] = (real) ((colour_1 >> 24) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 13] = (real) ((colour_1 >> 16) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 14] = (real) ((colour_1 >> 8) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 15] = (real) ((colour_1 >> 0) & 0xff) / 255; vulkan->vertex_data [vulkan->vertex_count + 16] = screen_x; vulkan->vertex_data [vulkan->vertex_count + 17] = screen_y + screen_height; vulkan->vertex_data [vulkan->vertex_count + 18] = unwrap_x + unwrap_width * (flip_y != 0); vulkan->vertex_data [vulkan->vertex_count + 19] = unwrap_y + unwrap_height * (flip_x == 0); - vulkan->vertex_data [vulkan->vertex_count + 20] = (float) ((colour_2 >> 24) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 21] = (float) ((colour_2 >> 16) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 22] = (float) ((colour_2 >> 8) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 23] = (float) ((colour_2 >> 0) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 20] = (real) ((colour_2 >> 24) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 21] = (real) ((colour_2 >> 16) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 22] = (real) ((colour_2 >> 8) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 23] = (real) ((colour_2 >> 0) & 0xff) / 255; vulkan->vertex_data [vulkan->vertex_count + 24] = screen_x + screen_width; vulkan->vertex_data [vulkan->vertex_count + 25] = screen_y + screen_height; vulkan->vertex_data [vulkan->vertex_count + 26] = unwrap_x + unwrap_width * (flip_y == 0); vulkan->vertex_data [vulkan->vertex_count + 27] = unwrap_y + unwrap_height * (flip_x == 0); - vulkan->vertex_data [vulkan->vertex_count + 28] = (float) ((colour_3 >> 24) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 29] = (float) ((colour_3 >> 16) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 30] = (float) ((colour_3 >> 8) & 0xff) / 255; - vulkan->vertex_data [vulkan->vertex_count + 31] = (float) ((colour_3 >> 0) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 28] = (real) ((colour_3 >> 24) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 29] = (real) ((colour_3 >> 16) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 30] = (real) ((colour_3 >> 8) & 0xff) / 255; + vulkan->vertex_data [vulkan->vertex_count + 31] = (real) ((colour_3 >> 0) & 0xff) / 255; vulkan->index_data [vulkan->index_count + 0] = (vulkan->vertex_count >> 3) + 0; vulkan->index_data [vulkan->index_count + 1] = (vulkan->vertex_count >> 3) + 1; @@ -1989,35 +1989,35 @@ static v0 vulkan_render_core (vulkan_structure * vulkan, s4 sprite, s4 x, s4 y, vulkan->index_count += 6; } -static v0 vulkan_render_sprite (vulkan_structure * vulkan, s4 sprite, s4 x, s4 y, u4 colour) { +static procedure vulkan_render_sprite (vulkan_structure * vulkan, integer sprite, integer x, integer y, natural colour) { vulkan_render_core (vulkan, sprite, x, y, 0, 0, vulkan->sprite_width [sprite], vulkan->sprite_height [sprite], 1.0, 1.0, 0, 0, colour, colour, colour,colour); } -static v0 vulkan_render_sprite_scale (vulkan_structure * vulkan, s4 sprite, s4 x, s4 y, f4 scale, u4 colour) { +static procedure vulkan_render_sprite_scale (vulkan_structure * vulkan, integer sprite, integer x, integer y, real scale, natural colour) { vulkan_render_core (vulkan, sprite, x, y, 0, 0, vulkan->sprite_width [sprite], vulkan->sprite_height [sprite], scale, scale, 0, 0, colour, colour, colour,colour); } -static v0 vulkan_render_sprite_crop (vulkan_structure * vulkan, s4 sprite, s4 x, s4 y, s4 u, s4 v, s4 width, s4 height, u4 colour) { +static procedure vulkan_render_sprite_crop (vulkan_structure * vulkan, integer sprite, integer x, integer y, integer u, integer v, integer width, integer height, natural colour) { vulkan_render_core (vulkan, sprite, x, y, u, v, width, height, 1.0, 1.0, 0, 0, colour, colour, colour, colour); } -static v0 vulkan_render_rectangle (vulkan_structure * vulkan, s4 x, s4 y, s4 width, s4 height, u4 colour) { - vulkan_render_core (vulkan, vulkan->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16, (float) height / 16, 0, 0, colour, colour, colour, colour); +static procedure vulkan_render_rectangle (vulkan_structure * vulkan, integer x, integer y, integer width, integer height, natural colour) { + vulkan_render_core (vulkan, vulkan->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16, (real) height / 16, 0, 0, colour, colour, colour, colour); } -static v0 vulkan_render_rectangle_gradient_v (vulkan_structure * vulkan, s4 x, s4 y, s4 width, s4 height, u4 colour_up, u4 colour_down) { - vulkan_render_core (vulkan, vulkan->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16, (float) height / 16, 0, 0, colour_up, colour_up, colour_down, colour_down); +static procedure vulkan_render_rectangle_gradient_v (vulkan_structure * vulkan, integer x, integer y, integer width, integer height, natural colour_up, natural colour_down) { + vulkan_render_core (vulkan, vulkan->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16, (real) height / 16, 0, 0, colour_up, colour_up, colour_down, colour_down); } -static v0 vulkan_render_rectangle_gradient_h (vulkan_structure * vulkan, s4 x, s4 y, s4 width, s4 height, u4 colour_left, u4 colour_right) { - vulkan_render_core (vulkan, vulkan->sprite_count - 1, x, y, 0, 0, 16, 16, (float) width / 16, (float) height / 16, 0, 0, colour_left, colour_right, colour_left, colour_right); +static procedure vulkan_render_rectangle_gradient_h (vulkan_structure * vulkan, integer x, integer y, integer width, integer height, natural colour_left, natural colour_right) { + vulkan_render_core (vulkan, vulkan->sprite_count - 1, x, y, 0, 0, 16, 16, (real) width / 16, (real) height / 16, 0, 0, colour_left, colour_right, colour_left, colour_right); } -static s4 vulkan_string_width (vulkan_structure * vulkan, c1 * string, s4 font, f4 scale) { - s4 length = 0; +static integer vulkan_string_width (vulkan_structure * vulkan, character * string, integer font, real scale) { + integer length = 0; - for (u4 index = 0; string [index] != '\0'; ++index) { - s4 character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; + for (natural index = 0; string [index] != '\0'; ++index) { + integer character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; /* if (string [index] == '\t') { length += 8 * vulkan->sprite_width [vulkan->font_index [font] [' ' - vulkan->font_begin [font]]]; @@ -2034,11 +2034,11 @@ static s4 vulkan_string_width (vulkan_structure * vulkan, c1 * string, s4 font, return (length); } -static v0 vulkan_render_string (vulkan_structure * vulkan, c1 * string, s4 font, s4 x, s4 y, u4 colour) { - s4 offset = x; +static procedure vulkan_render_string (vulkan_structure * vulkan, character * string, integer font, integer x, integer y, natural colour) { + integer offset = x; - for (u4 index = 0; string [index] != '\0'; ++index) { - s4 character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; + for (natural index = 0; string [index] != '\0'; ++index) { + integer character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; if (string [index] == '\t') { x += 8 * vulkan->sprite_width [vulkan->font_index [font] [' ' - vulkan->font_begin [font]]]; @@ -2057,11 +2057,11 @@ static v0 vulkan_render_string (vulkan_structure * vulkan, c1 * string, s4 font, } } -static v0 vulkan_render_string_scale (vulkan_structure * vulkan, c1 * string, s4 font, s4 x, s4 y, f4 scale, u4 colour) { - s4 offset = x; +static procedure vulkan_render_string_scale (vulkan_structure * vulkan, character * string, integer font, integer x, integer y, real scale, natural colour) { + integer offset = x; - for (u4 index = 0; string [index] != '\0'; ++index) { - s4 character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; + for (natural index = 0; string [index] != '\0'; ++index) { + integer character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; if (string [index] == '\t') { x += 8 * vulkan->sprite_width [vulkan->font_index [font] [' ' - vulkan->font_begin [font]]]; @@ -2081,9 +2081,9 @@ static v0 vulkan_render_string_scale (vulkan_structure * vulkan, c1 * string, s4 } } -static v0 vulkan_render_string_offset (vulkan_structure * vulkan, c1 * string, u4 length, u4 font, u4 offset, s4 * x, s4 * y, u4 colour) { - for (u4 index = 0; (string [index] != '\0') && (index < length); ++index) { - u4 character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; +static procedure vulkan_render_string_offset (vulkan_structure * vulkan, character * string, natural length, natural font, natural offset, integer * x, integer * y, natural colour) { + for (natural index = 0; (string [index] != '\0') && (index < length); ++index) { + natural character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; if (string [index] == '\t') { * x += 8 * vulkan->sprite_width [vulkan->font_index [font] [' ' - vulkan->font_begin [font]]]; @@ -2102,11 +2102,11 @@ static v0 vulkan_render_string_offset (vulkan_structure * vulkan, c1 * string, u } } -static v0 vulkan_render_string_gradient_v (vulkan_structure * vulkan, c1 * string, s4 font, s4 x, s4 y, f4 scale, u4 colour_up, u4 colour_down) { - s4 offset = x; +static procedure vulkan_render_string_gradient_v (vulkan_structure * vulkan, character * string, integer font, integer x, integer y, real scale, natural colour_up, natural colour_down) { + integer offset = x; - for (u4 index = 0; string [index] != '\0'; ++index) { - u4 character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; + for (natural index = 0; string [index] != '\0'; ++index) { + natural character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; if (string [index] == '\t') { x += 8 * vulkan->sprite_width [vulkan->font_index [font] [' ' - vulkan->font_begin [font]]] * scale; @@ -2126,11 +2126,11 @@ static v0 vulkan_render_string_gradient_v (vulkan_structure * vulkan, c1 * strin } } -static v0 vulkan_render_string_gradient_h (vulkan_structure * vulkan, c1 * string, s4 font, s4 x, s4 y, f4 scale, u4 colour_left, u4 colour_right) { - s4 offset = x; +static procedure vulkan_render_string_gradient_h (vulkan_structure * vulkan, character * string, integer font, integer x, integer y, real scale, natural colour_left, natural colour_right) { + integer offset = x; - for (u4 index = 0; string [index] != '\0'; ++index) { - u4 character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; + for (natural index = 0; string [index] != '\0'; ++index) { + natural character = vulkan->font_index [font] [string [index] - vulkan->font_begin [font]]; if (string [index] == '\t') { x += 8 * vulkan->sprite_width [vulkan->font_index [font] [' ' - vulkan->font_begin [font]]] * scale; @@ -2150,8 +2150,8 @@ static v0 vulkan_render_string_gradient_h (vulkan_structure * vulkan, c1 * strin } } -static v0 vulkan_handle_events (vulkan_structure * vulkan) { - static s4 signal_code [signal_count] = { +static procedure vulkan_handle_events (vulkan_structure * vulkan) { + static integer signal_code [signal_count] = { 0, 38, 56, 54, 40, 26, 41, 42, 43, 31, 44, 45, 46, 58, 57, 32, 33, 24, 27, 39, 28, 30, 55, 25, 53, 29, 52, 19, 10, 11, 12, 13, 14, @@ -2162,7 +2162,7 @@ static v0 vulkan_handle_events (vulkan_structure * vulkan) { 85, 79, 80, 81 }; - s4 index, key_code; + integer index, key_code; xcb_generic_event_t * generic_event; @@ -2189,17 +2189,17 @@ static v0 vulkan_handle_events (vulkan_structure * vulkan) { } } break;*/ case (XCB_BUTTON_PRESS): { - vulkan->cursor = (int) ((xcb_button_press_event_t *) generic_event)->detail; - vulkan->cursor_x = (int) ((xcb_button_press_event_t *) generic_event)->event_x; - vulkan->cursor_y = (int) ((xcb_button_press_event_t *) generic_event)->event_y; + vulkan->cursor = (integer) ((xcb_button_press_event_t *) generic_event)->detail; + vulkan->cursor_x = (integer) ((xcb_button_press_event_t *) generic_event)->event_x; + vulkan->cursor_y = (integer) ((xcb_button_press_event_t *) generic_event)->event_y; } break; case (XCB_BUTTON_RELEASE): { vulkan->cursor = cursor_none; - vulkan->cursor_x = (int) ((xcb_button_release_event_t *) generic_event)->event_x; - vulkan->cursor_y = (int) ((xcb_button_release_event_t *) generic_event)->event_y; + vulkan->cursor_x = (integer) ((xcb_button_release_event_t *) generic_event)->event_x; + vulkan->cursor_y = (integer) ((xcb_button_release_event_t *) generic_event)->event_y; } break; case (XCB_KEY_PRESS): { - key_code = (int) ((xcb_key_press_event_t *) generic_event)->detail; + key_code = (integer) ((xcb_key_press_event_t *) generic_event)->detail; for (index = 0; index < signal_count; ++index) { if (key_code == signal_code [index]) { vulkan->signal [index] = true; @@ -2208,7 +2208,7 @@ static v0 vulkan_handle_events (vulkan_structure * vulkan) { } } break; case (XCB_KEY_RELEASE): { - key_code = (int) ((xcb_key_release_event_t *) generic_event)->detail; + key_code = (integer) ((xcb_key_release_event_t *) generic_event)->detail; for (index = 0; index < signal_count; ++index) { if (key_code == signal_code [index]) { vulkan->signal [index] = false; @@ -2217,8 +2217,8 @@ static v0 vulkan_handle_events (vulkan_structure * vulkan) { } } break; /*case (XCB_MOTION_NOTIFY): { - vulkan->cursor_x = (int) ((xcb_motion_notify_event_t *) generic_event)->event_x; - vulkan->cursor_y = (int) ((xcb_motion_notify_event_t *) generic_event)->event_y; + vulkan->cursor_x = (integer) ((xcb_motion_notify_event_t *) generic_event)->event_x; + vulkan->cursor_y = (integer) ((xcb_motion_notify_event_t *) generic_event)->event_y; } break;*/ default: { } break; @@ -2227,13 +2227,13 @@ static v0 vulkan_handle_events (vulkan_structure * vulkan) { generic_event = deallocate (generic_event); } -static v0 vulkan_synchronize (vulkan_structure * vulkan, u4 clear_colour) { - u4 index = 0; - u4 frame = 0; +static procedure vulkan_synchronize (vulkan_structure * vulkan, natural clear_colour) { + natural index = 0; + natural frame = 0; VkResult result = VK_SUCCESS; - v0 * ubo_v0 = null; + generic * ubo_procedure = null; VkPipelineStageFlags wait_stages [1] = { VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT} ; @@ -2264,12 +2264,12 @@ static v0 vulkan_synchronize (vulkan_structure * vulkan, u4 clear_colour) { vulkan_record_command_buffers (vulkan, clear_colour, frame); - vulkan_result (vkWaitForFences (vulkan->logical_device, 1, & vulkan->fence_set_1 [vulkan->frame], VK_TRUE, ~0)); + vulkan_result (vkWaitForFences (vulkan->boolean_device, 1, & vulkan->fence_set_1 [vulkan->frame], VK_TRUE, ~0)); - vulkan_result (vkAcquireNextImageKHR (vulkan->logical_device, vulkan->swapchain, ~0, vulkan->semaphore_set_1 [vulkan->frame], + vulkan_result (vkAcquireNextImageKHR (vulkan->boolean_device, vulkan->swapchain, ~0, vulkan->semaphore_set_1 [vulkan->frame], VK_NULL_HANDLE, & frame)); /* - result = vkAcquireNextImageKHR (vulkan->logical_device, vulkan->swapchain, ~0, vulkan->semaphore_set_1 [vulkan->frame], + result = vkAcquireNextImageKHR (vulkan->boolean_device, vulkan->swapchain, ~0, vulkan->semaphore_set_1 [vulkan->frame], VK_NULL_HANDLE, & frame); print ("vkAcquireNextImageKHR : /5%i/-\n", result); @@ -2279,7 +2279,7 @@ static v0 vulkan_synchronize (vulkan_structure * vulkan, u4 clear_colour) { return; } */ - vulkan_result (vkResetFences (vulkan->logical_device, 1, & vulkan->fence_set_1 [vulkan->frame])); + vulkan_result (vkResetFences (vulkan->boolean_device, 1, & vulkan->fence_set_1 [vulkan->frame])); submit_information.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; submit_information.waitSemaphoreCount = 1; @@ -2314,25 +2314,25 @@ static v0 vulkan_synchronize (vulkan_structure * vulkan, u4 clear_colour) { vulkan->frame = (vulkan->frame + 1) % vulkan->image_count; vulkan_result (vkQueueWaitIdle (vulkan->queue)); - vulkan_result (vkDeviceWaitIdle (vulkan->logical_device)); + vulkan_result (vkDeviceWaitIdle (vulkan->boolean_device)); - vkDestroyBuffer (vulkan->logical_device, vulkan->index_buffer, null); - vkFreeMemory (vulkan->logical_device, vulkan->index_memory, null); - vkDestroyBuffer (vulkan->logical_device, vulkan->vertex_buffer, null); - vkFreeMemory (vulkan->logical_device, vulkan->vertex_memory, null); + vkDestroyBuffer (vulkan->boolean_device, vulkan->index_buffer, null); + vkFreeMemory (vulkan->boolean_device, vulkan->index_memory, null); + vkDestroyBuffer (vulkan->boolean_device, vulkan->vertex_buffer, null); + vkFreeMemory (vulkan->boolean_device, vulkan->vertex_memory, null); vulkan->vertex_count = 0; vulkan->index_count = 0; vulkan_result (vkQueueWaitIdle (vulkan->queue)); - vulkan_result (vkDeviceWaitIdle (vulkan->logical_device)); + vulkan_result (vkDeviceWaitIdle (vulkan->boolean_device)); clock_gettime (CLOCK_REALTIME, & frame_end); if (vulkan->gameplay_time % (vulkan->gameplay_framerate / 10) == 0) { vulkan->frame_time_in_ns = (frame_end.tv_sec - frame_begin.tv_sec) * 1000000000 + frame_end.tv_nsec - frame_begin.tv_nsec; - vulkan->framerate = (int) (1000000000 / vulkan->frame_time_in_ns); + vulkan->framerate = (integer) (1000000000 / vulkan->frame_time_in_ns); } if (vulkan->framerate > vulkan->gameplay_framerate) { diff --git a/xungeon.h b/xungeon.h index 5478c60..163b49d 100755 --- a/xungeon.h +++ b/xungeon.h @@ -16,64 +16,64 @@ // for more details, if you dare, it is a lot of text that nobody wants to read... //~typedef struct { - //~c1 * name; + //~character * name; //~} * _definition; typedef struct { - c1 * name; // Name string copy. - u4 temperature; // ; - u4 humidity; // ; + character * name; // Name string copy. + natural temperature; // ; + natural humidity; // ; } * dungeon_biome_definition; typedef struct { - c1 * name; // Name string copy. - u4 biome; // Index in biome array. - b4 clip; // Can entities move through? + character * name; // Name string copy. + natural biome; // Index in biome array. + boolean clip; // Can entities move through? } * dungeon_landmark_definition; typedef struct { - c1 * name; // Name string copy. + character * name; // Name string copy. } * dungeon_expertise_definition; typedef struct { - c1 * name; // Name string copy. - u4 base; // Default amount of points per entity. - u4 limit; // After this point, points won't increase. + character * name; // Name string copy. + natural base; // Default amount of points per entity. + natural limit; // After this point, points won't increase. } * dungeon_attribute_definition; typedef struct { - c1 * name; // Name string copy. - u4 base; // Default amount of points per entity. - u4 limit; // After this point, points won't increase. + character * name; // Name string copy. + natural base; // Default amount of points per entity. + natural limit; // After this point, points won't increase. } * dungeon_skill_definition; typedef struct { - c1 * name; // Name string copy. - u4 base; // Default amount of points per entity. - u4 limit; // After this point, points won't increase. - u4 value; // Constant trade value per index 0. - u4 trade; // Trade rate for acquiring the resource. + character * name; // Name string copy. + natural base; // Default amount of points per entity. + natural limit; // After this point, points won't increase. + natural value; // Constant trade value per index 0. + natural trade; // Trade rate for acquiring the resource. } * dungeon_resource_definition; typedef struct { - c1 * name; // Name string copy. + character * name; // Name string copy. } * dungeon_item_slot_definition; typedef struct { - c1 * name; // Name string copy. - u4 slot; // Index in item slot array. - u4 effect; // Index in effect array. + character * name; // Name string copy. + natural slot; // Index in item slot array. + natural effect; // Index in effect array. } * dungeon_item_definition; typedef struct { - u4 biome_count; - u4 landmark_count; - u4 expertise_count; - u4 attribute_count; - u4 skill_count; - u4 resource_count; - u4 item_slot_count; - u4 item_count; + natural biome_count; + natural landmark_count; + natural expertise_count; + natural attribute_count; + natural skill_count; + natural resource_count; + natural item_slot_count; + natural item_count; dungeon_biome_definition * biome_array; dungeon_landmark_definition * landmark_array; dungeon_expertise_definition * expertise_array; @@ -84,7 +84,7 @@ typedef struct { dungeon_item_definition * item_array; } * dungeon_structure; -static u4 dungeon_biome_define (dungeon_structure dungeon, c1 * name, u4 temperature, u4 humidity) { +static natural dungeon_biome_define (dungeon_structure dungeon, character * name, natural temperature, natural humidity) { dungeon_biome_definition biome = arena_add (sizeof (* biome)); fatal_failure (dungeon == null, "biome_define: Dungeon is not configured."); @@ -102,11 +102,11 @@ static u4 dungeon_biome_define (dungeon_structure dungeon, c1 * name, u4 tempera return (dungeon->biome_count - 1); } -static c1 * dungeon_biome_name (dungeon_structure dungeon, u4 index) { return (dungeon->biome_array [index]->name); } -static u4 dungeon_biome_temperature (dungeon_structure dungeon, u4 index) { return (dungeon->biome_array [index]->temperature); } -static u4 dungeon_biome_humidity (dungeon_structure dungeon, u4 index) { return (dungeon->biome_array [index]->humidity); } +static character * dungeon_biome_name (dungeon_structure dungeon, natural index) { return (dungeon->biome_array [index]->name); } +static natural dungeon_biome_temperature (dungeon_structure dungeon, natural index) { return (dungeon->biome_array [index]->temperature); } +static natural dungeon_biome_humidity (dungeon_structure dungeon, natural index) { return (dungeon->biome_array [index]->humidity); } -static u4 dungeon_landmark_define (dungeon_structure dungeon, c1 * name, u4 biome, b4 clip) { +static natural dungeon_landmark_define (dungeon_structure dungeon, character * name, natural biome, boolean clip) { dungeon_landmark_definition landmark = arena_add (sizeof (* landmark)); fatal_failure (dungeon == null, "landmark_define: Dungeon is not configured."); @@ -124,11 +124,11 @@ static u4 dungeon_landmark_define (dungeon_structure dungeon, c1 * name, u4 biom return (dungeon->landmark_count - 1); } -static c1 * dungeon_landmark_name (dungeon_structure dungeon, u4 index) { return (dungeon->landmark_array [index]->name); } -static u4 dungeon_landmark_biome (dungeon_structure dungeon, u4 index) { return (dungeon->landmark_array [index]->biome); } -static b4 dungeon_landmark_clip (dungeon_structure dungeon, u4 index) { return (dungeon->landmark_array [index]->clip); } +static character * dungeon_landmark_name (dungeon_structure dungeon, natural index) { return (dungeon->landmark_array [index]->name); } +static natural dungeon_landmark_biome (dungeon_structure dungeon, natural index) { return (dungeon->landmark_array [index]->biome); } +static boolean dungeon_landmark_clip (dungeon_structure dungeon, natural index) { return (dungeon->landmark_array [index]->clip); } -static u4 dungeon_expertise_define (dungeon_structure dungeon, c1 * name) { +static natural dungeon_expertise_define (dungeon_structure dungeon, character * name) { dungeon_expertise_definition expertise = arena_add (sizeof (* expertise)); fatal_failure (dungeon == null, "expertise_define: Dungeon is not configured."); @@ -143,9 +143,9 @@ static u4 dungeon_expertise_define (dungeon_structure dungeon, c1 * name) { return (dungeon->expertise_count - 1); } -static c1 * dungeon_expertise_name (dungeon_structure dungeon, u4 index) { return (dungeon->expertise_array [index]->name); } +static character * dungeon_expertise_name (dungeon_structure dungeon, natural index) { return (dungeon->expertise_array [index]->name); } -static u4 dungeon_attribute_define (dungeon_structure dungeon, c1 * name, u4 base, u4 limit) { +static natural dungeon_attribute_define (dungeon_structure dungeon, character * name, natural base, natural limit) { dungeon_attribute_definition attribute = arena_add (sizeof (* attribute)); fatal_failure (dungeon == null, "attribute_define: Dungeon is not configured."); @@ -163,11 +163,11 @@ static u4 dungeon_attribute_define (dungeon_structure dungeon, c1 * name, u4 bas return (dungeon->attribute_count - 1); } -static c1 * dungeon_attribute_name (dungeon_structure dungeon, u4 index) { return (dungeon->attribute_array [index]->name); } -static u4 dungeon_attribute_base (dungeon_structure dungeon, u4 index) { return (dungeon->attribute_array [index]->base); } -static u4 dungeon_attribute_limit (dungeon_structure dungeon, u4 index) { return (dungeon->attribute_array [index]->limit); } +static character * dungeon_attribute_name (dungeon_structure dungeon, natural index) { return (dungeon->attribute_array [index]->name); } +static natural dungeon_attribute_base (dungeon_structure dungeon, natural index) { return (dungeon->attribute_array [index]->base); } +static natural dungeon_attribute_limit (dungeon_structure dungeon, natural index) { return (dungeon->attribute_array [index]->limit); } -static u4 dungeon_skill_define (dungeon_structure dungeon, c1 * name, u4 base, u4 limit) { +static natural dungeon_skill_define (dungeon_structure dungeon, character * name, natural base, natural limit) { dungeon_skill_definition skill = arena_add (sizeof (* skill)); fatal_failure (dungeon == null, "skill_define: Dungeon is not configured."); @@ -185,11 +185,11 @@ static u4 dungeon_skill_define (dungeon_structure dungeon, c1 * name, u4 base, u return (dungeon->skill_count - 1); } -static c1 * dungeon_skill_name (dungeon_structure dungeon, u4 index) { return (dungeon->skill_array [index]->name); } -static u4 dungeon_skill_base (dungeon_structure dungeon, u4 index) { return (dungeon->skill_array [index]->base); } -static u4 dungeon_skill_limit (dungeon_structure dungeon, u4 index) { return (dungeon->skill_array [index]->limit); } +static character * dungeon_skill_name (dungeon_structure dungeon, natural index) { return (dungeon->skill_array [index]->name); } +static natural dungeon_skill_base (dungeon_structure dungeon, natural index) { return (dungeon->skill_array [index]->base); } +static natural dungeon_skill_limit (dungeon_structure dungeon, natural index) { return (dungeon->skill_array [index]->limit); } -static u4 dungeon_resource_define (dungeon_structure dungeon, c1 * name, u4 base, u4 limit, u4 value, u4 trade) { +static natural dungeon_resource_define (dungeon_structure dungeon, character * name, natural base, natural limit, natural value, natural trade) { dungeon_resource_definition resource = arena_add (sizeof (* resource)); fatal_failure (dungeon == null, "resource_define: Dungeon is not configured."); @@ -209,13 +209,13 @@ static u4 dungeon_resource_define (dungeon_structure dungeon, c1 * name, u4 base return (dungeon->resource_count - 1); } -static c1 * dungeon_resource_name (dungeon_structure dungeon, u4 index) { return (dungeon->resource_array [index]->name); } -static u4 dungeon_resource_base (dungeon_structure dungeon, u4 index) { return (dungeon->resource_array [index]->base); } -static u4 dungeon_resource_limit (dungeon_structure dungeon, u4 index) { return (dungeon->resource_array [index]->limit); } -static u4 dungeon_resource_value (dungeon_structure dungeon, u4 index) { return (dungeon->resource_array [index]->value); } -static u4 dungeon_resource_trade (dungeon_structure dungeon, u4 index) { return (dungeon->resource_array [index]->trade); } +static character * dungeon_resource_name (dungeon_structure dungeon, natural index) { return (dungeon->resource_array [index]->name); } +static natural dungeon_resource_base (dungeon_structure dungeon, natural index) { return (dungeon->resource_array [index]->base); } +static natural dungeon_resource_limit (dungeon_structure dungeon, natural index) { return (dungeon->resource_array [index]->limit); } +static natural dungeon_resource_value (dungeon_structure dungeon, natural index) { return (dungeon->resource_array [index]->value); } +static natural dungeon_resource_trade (dungeon_structure dungeon, natural index) { return (dungeon->resource_array [index]->trade); } -static u4 dungeon_item_slot_define (dungeon_structure dungeon, c1 * name) { +static natural dungeon_item_slot_define (dungeon_structure dungeon, character * name) { dungeon_item_slot_definition item_slot = arena_add (sizeof (* item_slot)); fatal_failure (dungeon == null, "item_slot_define: Dungeon is not configured."); @@ -230,9 +230,9 @@ static u4 dungeon_item_slot_define (dungeon_structure dungeon, c1 * name) { return (dungeon->item_slot_count - 1); } -static c1 * dungeon_item_slot_name (dungeon_structure dungeon, u4 index) { return (dungeon->item_slot_array [index]->name); } +static character * dungeon_item_slot_name (dungeon_structure dungeon, natural index) { return (dungeon->item_slot_array [index]->name); } -static u4 dungeon_item_define (dungeon_structure dungeon, c1 * name, u4 slot, u4 effect) { +static natural dungeon_item_define (dungeon_structure dungeon, character * name, natural slot, natural effect) { dungeon_item_definition item = arena_add (sizeof (* item)); fatal_failure (dungeon == null, "item_define: Dungeon is not configured."); @@ -250,12 +250,12 @@ static u4 dungeon_item_define (dungeon_structure dungeon, c1 * name, u4 slot, u4 return (dungeon->item_count - 1); } -static c1 * dungeon_item_name (dungeon_structure dungeon, u4 index) { return (dungeon->item_array [index]->name); } -static u4 dungeon_item_slot (dungeon_structure dungeon, u4 index) { return (dungeon->item_array [index]->slot); } -static u4 dungeon_item_effect (dungeon_structure dungeon, u4 index) { return (dungeon->item_array [index]->effect); } +static character * dungeon_item_name (dungeon_structure dungeon, natural index) { return (dungeon->item_array [index]->name); } +static natural dungeon_item_slot (dungeon_structure dungeon, natural index) { return (dungeon->item_array [index]->slot); } +static natural dungeon_item_effect (dungeon_structure dungeon, natural index) { return (dungeon->item_array [index]->effect); } -static dungeon_structure dungeon_configure (u4 biome_limit, u4 landmark_limit, u4 expertise_limit, u4 attribute_limit, u4 skill_limit, - u4 resource_limit, u4 item_slot_limit, u4 item_limit) { +static dungeon_structure dungeon_configure (natural biome_limit, natural landmark_limit, natural expertise_limit, natural attribute_limit, natural skill_limit, + natural resource_limit, natural item_slot_limit, natural item_limit) { dungeon_structure dungeon = arena_add (sizeof (* dungeon)); dungeon->biome_array = arena_add (biome_limit * sizeof (* dungeon->biome_array)); diff --git a/xuxuxu.c b/xuxuxu.c index 1423d35..c29f751 100755 --- a/xuxuxu.c +++ b/xuxuxu.c @@ -10,16 +10,16 @@ #define font_height ( 8) #define font_count (96) -static u4 * render = null; -static u4 colour = foreground; +static natural * render = null; +static natural colour = foreground; -static u4 width = 0; -static u4 height = 0; -static u4 x = 0; -static u4 y = 0; +static natural width = 0; +static natural height = 0; +static natural x = 0; +static natural y = 0; -static v0 render_character (c1 character) { - u8 font_code [font_count] = { +static procedure render_character (character character) { + natural_64 font_code [font_count] = { 0x0000000000000000, 0x00180018183c3c18, 0x0000000000363636, 0x006c6cfe6cfe6c6c, 0x00187ed07c16fc30, 0x0060660c18306606, 0x00dc66b61c36361c, 0x0000000000181818, 0x0030180c0c0c1830, 0x000c18303030180c, 0x0000187e3c7e1800, 0x000018187e181800, @@ -46,18 +46,18 @@ static v0 render_character (c1 character) { 0x0018181818181818, 0x000c18187018180c, 0x000000000062d68c, 0x0000000000000000 }; - for (u4 offset = 0; offset < font_width * font_height; ++offset) { - u4 u = offset / font_width + y; - u4 v = offset % font_width + x; + for (natural offset = 0; offset < font_width * font_height; ++offset) { + natural u = offset / font_width + y; + natural v = offset % font_width + x; - render [u * width + v] = ((font_code [(u4) (character - ' ')] >> offset) % 2) ? colour : background; + render [u * width + v] = ((font_code [(natural) (character - ' ')] >> offset) % 2) ? colour : background; } x += font_width + 1; } -static v0 render_string (c1 * string, u4 length) { - for (u4 offset = 0; offset < length; ++offset) { +static procedure render_string (character * string, natural length) { + for (natural offset = 0; offset < length; ++offset) { if (string [offset] == '\t') { x += font_width * font_indent; } else if (string [offset] == '\n') { @@ -69,14 +69,14 @@ static v0 render_string (c1 * string, u4 length) { } } -s4 main (v0) { - u4 index = 0; - u4 length = 0; - c1 * buffer = null; +integer main (none) { + natural index = 0; + natural length = 0; + character * buffer = null; - c1 separator [] = ".,:;<=>+-*/%!&~^()[]{}'\" \t\r\n"; + character separator [] = ".,:;<=>+-*/%!&~^()[]{}'\" \t\r\n"; - c1 * keywords [] = { + character * keywords [] = { "register", "volatile", "auto", "const", "static", "extern", "if", "else", "do", "while", "for", "continue", "switch", "case", "default", "break", "enum", "union", "struct", "typedef", "goto", "v0", "return", "sizeof", @@ -93,7 +93,7 @@ s4 main (v0) { syntax_define (syntax, true, false, ".,:;<=>+-*/%!&~^?|", "", '\0', 0xffccaa33, 0); syntax_define (syntax, true, false, "(){}[]", "", '\0', 0xffcc3333, 0); - for (u8 word = 0; word < array_length (keywords); ++word) { + for (natural_64 word = 0; word < array_length (keywords); ++word) { syntax_define (syntax, false, true, keywords [word], separator, '\0', 0xff33aacc, 0); } @@ -107,11 +107,11 @@ s4 main (v0) { render = allocate (4 * width * height); - for (u4 offset = 0; offset < width * height; ++offset) { + for (natural offset = 0; offset < width * height; ++offset) { render [offset] = background; } - for (u4 offset = 0; buffer [offset] != '\0'; offset += length) { + for (natural offset = 0; buffer [offset] != '\0'; offset += length) { index = syntax_select (syntax, & buffer [offset], & length); colour = syntax->colour [index]; diff --git a/xyntax.h b/xyntax.h index 4495105..76c164a 100755 --- a/xyntax.h +++ b/xyntax.h @@ -16,19 +16,21 @@ /// warranty of merchantability or fitness for a particular purpose, because it is pointless. Please see the GNU (Geenoo) General Public License /// for more details, if you dare, it is a lot of text that nobody wants to read... +/// Description +/// /// Xyntax, the most minimal text parser that can deal with syntax highlighting that I could've come up with, and the most generic name for it /// also, it's rather slow, but if you're creating heavy duty program, you'd use heavy duty library for it. This library has only one header, so /// it's easy to incorporate it into existing projects. If you want to see how it is used, check out simple examples below, if you want more /// robust example, check out my other programs, Xarbon and Xighlight. /// /// For start, you want to include this header file, there's no macro for including implementation (like stb libraries), this is for projects -/// that have only one C source file, and one or more C header files. After that simple make global or local variable 'syntax_structure * x' -/// defined below, initialize it, define the rules, then in main loop select rule, do your thing with it, then deinitialize the structure. It's +/// that have only one C source file, and one or more C header files. Then make global or local variable 'syntax_structure * whatever_syntax' +/// defined below, initialize it, define the rules, then in main loop select rule, do whatever you wanted, then deinitialize the structure. It's /// simple, I'll provide minimal examples below. /// Structure for single syntax definition (array of rules), if you want to parse multiple languages simultaneously, use an array. /// -/// syntax_structure * c_syntax = null; +/// syntax_structure * syntax = null; typedef struct { natural count; /// Count of syntax rules used, maximum is set with limit below, if limit is 0, it'll allocate it dynamically. @@ -44,7 +46,7 @@ typedef struct { /// Initialize syntax structure before calling other functions that take it as an argument, set 'limit' to 0 if you want dynamic array of rules. /// -/// c_syntax = syntax_initialize (0); +/// syntax = syntax_initialize (0); static syntax_structure * syntax_initialize (natural limit) { syntax_structure * syntax = allocate (sizeof (* syntax)); @@ -66,7 +68,7 @@ static syntax_structure * syntax_initialize (natural limit) { /// Deinitialize syntax structure after using it, in order to avoid memory leaks. /// -/// c_syntax = syntax_deinitialize (c_syntax); +/// syntax = syntax_deinitialize (syntax); static syntax_structure * syntax_deinitialize (syntax_structure * syntax) { for (natural index = 0; index < syntax->count; ++index) { @@ -89,15 +91,27 @@ static syntax_structure * syntax_deinitialize (syntax_structure * syntax) { /// /// Take a look into few simple examples of defining some simplified rules of C programming language. /// Two examples below show how to define multiline comments and strings, since these have priority, both enrange and derange are false. +/// /// syntax_define (syntax, false, false, "/*", "*/", '\\', 1, 0); /// syntax_define (syntax, false, false, "\"", "\"", '\\', 2, 0); +/// /// Now we're defining syntax rule for one keyword, static, notice that end string contaings separator characters because derange is true. +/// /// syntax_define (syntax, false, true, "static", "()[]{}.,:;<=>+*-/%!&~^?| \t\r\n", '\0', 3, 0); +/// /// You can define brackets and operator characters separately, or if you want to, you can define some of them separately again. +/// /// syntax_define (syntax, true, false, "()[]{}", "", '\0', 4, 0); /// syntax_define (syntax, true, false, ".,:;<=>+*-/%!&~^?|", "", '\0', 5, 0); +/// /// And lastly, we can define number selection like this below, by setting both enrange and derange as false. +/// /// syntax_define (syntax, true, true, "0123456789", "()[]{}.,:;<=>+*-/%!&~^?| \t\r\n", '\0', 6, 0); +/// +/// I hope this is pretty clear, if you want to select a number, you start by matching any of digits provided above, and you end matching that +/// number by any character from 'end' string, if you want to support floating point numbers, you'd exclude '.' character, or alternatively add +/// letters f, u, l and whatever else your language supports (like in C/C++). However, this approach is too weak for detecting syntax errors, +/// you shouldn't use this library for robust linter or parser. static natural syntax_define (syntax_structure * syntax, boolean enrange, boolean derange, character * begin, character * end, character escape, natural colour, natural effect) { @@ -139,6 +153,7 @@ static natural syntax_define (syntax_structure * syntax, boolean enrange, boolea /// /// Now, imagine that 'buffer' is file you've loaded into memory, you have declared natural numbers 'offset', 'length' and 'select', and you've /// properly initialized syntax structure 'syntax', defined its rules for wanted language(s), simple main loop would look like this: +/// /// for (offset = 0; buffer [offset] != '\0'; offset += length) { /// /// Notice that we're not incrementing 'offset', we're increasing it by 'length'. /// select = syntax_select (syntax, & buffer [offset], & length); @@ -146,6 +161,7 @@ static natural syntax_define (syntax_structure * syntax, boolean enrange, boolea /// /// Syntax definition is incomplete, unknown sequence has been detected, either print nothing, or print default. /// } else { /// /// Print string of 'length', at '& buffer [offset]', using 'syntax->colour [select]' and 'syntax->effect [select]'. +/// /// Strings here aren't null terminated, you want to print sized string. /// } /// } @@ -154,20 +170,17 @@ static natural syntax_select (syntax_structure * syntax, character * string, nat natural subset = 0; natural select = 0; - natural_64 begin_length = 0; - natural_64 end_length = 0; - for (; select != syntax->count; ++select) { - begin_length = string_length (syntax->begin [select]); + caliber begin_length = string_length (syntax->begin [select]); - if (! syntax->enrange [select]) { - if (! syntax->derange [select]) { - if (string_compare_limit (string, syntax->begin [select], begin_length)) { + if (syntax->enrange [select] == false) { + if (syntax->derange [select] == false) { + if (string_compare_limit (string, syntax->begin [select], begin_length) == true) { break; } } else { - if ((string_compare_limit (string, syntax->begin [select], begin_length)) - && (character_compare_array (string [offset + begin_length], syntax->end [select]))) { + if ((string_compare_limit (string, syntax->begin [select], begin_length) == true) + && (character_compare_array (string [offset + begin_length], syntax->end [select]) == true)) { break; } } @@ -188,7 +201,7 @@ static natural syntax_select (syntax_structure * syntax, character * string, nat return (syntax->count); } - end_length = string_length (syntax->end [select]); + caliber end_length = string_length (syntax->end [select]); for (offset = 1; string [offset - 1] != character_null; ++offset) { if (string [offset] == syntax->escape [select]) { @@ -196,7 +209,7 @@ static natural syntax_select (syntax_structure * syntax, character * string, nat continue; } - if (syntax->derange [select]) { + if (syntax->derange [select] == true) { subset = 0; if (end_length == 0) { break; -- 2.39.5