From 6492ba6b4107a4da228e18db4fc5fc871bfb0579 Mon Sep 17 00:00:00 2001 From: epoch Date: Wed, 17 Aug 2022 21:34:02 -0500 Subject: updated README to show that everything that got deleted went to an -extras repo. also, hackvr script updated to be better bash --- README | 21 +- bin/hackvr | 11 +- share/hackvr/examples/anonet_map.sh | 12 - share/hackvr/examples/anonet_map/map | 74 - share/hackvr/examples/anonet_map/paths-to-edges | 5 - share/hackvr/examples/anonet_map/run | 8 - share/hackvr/examples/calendar/Makefile | 7 - share/hackvr/examples/calendar/calvr | 196 - share/hackvr/examples/chess/board.sh | 54 - share/hackvr/examples/chess/camera.pos | 2 - share/hackvr/examples/chess/gnuchess-to-hackvr.sh | 32 - share/hackvr/examples/chess/hackvr-to-gnuchess.sh | 18 - share/hackvr/examples/chess/pieces/bishop | 2 - share/hackvr/examples/chess/pieces/king | 2 - share/hackvr/examples/chess/pieces/knight | 2 - share/hackvr/examples/chess/pieces/pawn | 1 - share/hackvr/examples/chess/pieces/queen | 1 - share/hackvr/examples/chess/pieces/rook | 1 - share/hackvr/examples/chess/run | 5 - share/hackvr/examples/clock/Makefile | 11 - share/hackvr/examples/clock/generate.py | 10 - share/hackvr/examples/clock/hackvr-clock | 72 - share/hackvr/examples/clock/run.pre | 24 - share/hackvr/examples/clock/set_clock.sh | 10 - share/hackvr/examples/dothack/chaosgate.py | 63 - share/hackvr/examples/dothack/test.sh | 6 - share/hackvr/examples/draw/draw.sh | 48 - share/hackvr/examples/draw/run | 3 - share/hackvr/examples/dungen/Makefile | 8 - share/hackvr/examples/dungen/dun2ascii.c | 46 - share/hackvr/examples/dungen/dun2hackvr.c | 59 - share/hackvr/examples/dungen/dunexplore.sh | 42 - share/hackvr/examples/dungen/dungen.c | 61 - share/hackvr/examples/editor/editor.sh | 6 - share/hackvr/examples/fib.sh | 24 - .../examples/filebrowser/action_to_target.sh | 11 - .../examples/filebrowser/backend-filebrowser.sh | 18 - .../hackvr/examples/filebrowser/backend-gopher.sh | 22 - share/hackvr/examples/filebrowser/backend-ps.sh | 12 - share/hackvr/examples/filebrowser/camera.pos | 2 - .../hackvr/examples/filebrowser/frontend-hackvr.sh | 6 - .../hackvr/examples/filebrowser/frontend-zenity.sh | 6 - share/hackvr/examples/filebrowser/list_to_cubes.sh | 33 - share/hackvr/examples/filebrowser/run | 3 - share/hackvr/examples/grid_floor.sh | 10 - share/hackvr/examples/hackvr_term/Makefile | 19 - share/hackvr/examples/hackvr_term/camera.pos | 4 - .../examples/hackvr_term/hackvr_data_decode.sh | 3 - share/hackvr/examples/hackvr_term/hackvr_term | Bin 30508 -> 0 bytes share/hackvr/examples/hackvr_term/hackvr_term.c | 184 - .../hackvr/examples/hackvr_term/libtmt/README.rst | 637 - share/hackvr/examples/hackvr_term/libtmt/tmt.c | 500 - share/hackvr/examples/hackvr_term/libtmt/tmt.h | 140 - share/hackvr/examples/hackvr_term/pty | Bin 7776 -> 0 bytes share/hackvr/examples/hackvr_term/pty.c | 70 - share/hackvr/examples/hackvr_term/read_line.sh | 5 - share/hackvr/examples/hackvr_term/run | 9 - share/hackvr/examples/hackvr_term/run.pty | 9 - share/hackvr/examples/hackvrd/hackvr-subsystem | 7 - share/hackvr/examples/hackvrd/hackvrd.sh | 115 - share/hackvr/examples/hackvrd/ident | 16 - share/hackvr/examples/hackvrd/list_to_cubes.sh | 33 - share/hackvr/examples/hackvrd/multi.sh | 10 - share/hackvr/examples/hackvrd/radio.sh | 84 - share/hackvr/examples/hackvrnet/connect.sh | 3 - share/hackvr/examples/marquee/marquee.sh | 28 - share/hackvr/examples/spinners/square.sh | 19 - share/hackvr/examples/starfield | Bin 7296 -> 0 bytes share/hackvr/examples/starfield.c | 12 - share/hackvr/examples/subsume/arms.hackvr | 7 - share/hackvr/examples/subsume/test.sh | 11 - share/hackvr/examples/tictactoe/board | 13 - share/hackvr/examples/tictactoe/board_orig | 14 - share/hackvr/examples/tictactoe/camera.pos | 5 - share/hackvr/examples/tictactoe/game.sh | 37 - share/hackvr/examples/tictactoe/listen.sh | 11 - share/hackvr/examples/tictactoe/marker0 | 2 - share/hackvr/examples/tictactoe/marker1 | 1 - share/hackvr/examples/tictactoe/run | 4 - share/hackvr/examples/uristart.conf | 2 - share/hackvr/examples/wget-log | 0 share/hackvr/examples/wget-log.1 | 0 share/hackvr/examples/wget-log.2 | 0 share/hackvr/examples/wordsearch/game.sh | 37 - share/hackvr/examples/wordsearch/run | 8 - share/hackvr/examples/xcmd.sh | 4 - share/hackvr/font/apple410.hackvr | 526 - share/hackvr/font/default.hackvr | 1 - share/hackvr/font/epoch_font.hackvr | 699 - share/hackvr/meshes/.n64.hackvr.swp | Bin 12288 -> 0 bytes share/hackvr/meshes/Deer.obj | 1239 - share/hackvr/meshes/bowser.hackvr | 1002 - share/hackvr/meshes/bowser.obj | 3233 --- share/hackvr/meshes/bowser/bowser.mtl | 167 - share/hackvr/meshes/bowser/bowser.zip | Bin 328200 -> 0 bytes share/hackvr/meshes/bowser/bowser_grp.png | Bin 273233 -> 0 bytes share/hackvr/meshes/bowser/readme.txt | 1 - share/hackvr/meshes/bowser/textures/100EF06A_c.bmp | Bin 3126 -> 0 bytes share/hackvr/meshes/bowser/textures/12545C5B_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/bowser/textures/1255BC5B_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/bowser/textures/1AFD7ECE_c.bmp | Bin 3126 -> 0 bytes share/hackvr/meshes/bowser/textures/1C026C20_c.bmp | Bin 3126 -> 0 bytes share/hackvr/meshes/bowser/textures/1D630F9B_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/bowser/textures/23860B32_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/bowser/textures/25A0F12B_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/bowser/textures/4566EEE9_c.bmp | Bin 3126 -> 0 bytes share/hackvr/meshes/bowser/textures/5278DE3_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/bowser/textures/5F9833D7_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/bowser/textures/628F696F_c.bmp | Bin 3126 -> 0 bytes share/hackvr/meshes/bowser/textures/7255709C_c.bmp | Bin 3126 -> 0 bytes share/hackvr/meshes/bowser/textures/78DA6E54_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/bowser/textures/7C0ED1D5_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/bowser/textures/7FBF04C8_c.bmp | Bin 3126 -> 0 bytes share/hackvr/meshes/bowser/textures/889C0E_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/bowser/textures/AE0327_c.bmp | Bin 6198 -> 0 bytes share/hackvr/meshes/cube.hackvr | 13 - share/hackvr/meshes/cube.obj | 47 - share/hackvr/meshes/cube2.hackvr | 6 - share/hackvr/meshes/drugsandwires/generate.py | 60 - share/hackvr/meshes/female_basemesh1_2.hackvr | 1372 -- share/hackvr/meshes/female_basemesh1_2.obj | 4342 ---- share/hackvr/meshes/floorgrid.hackvr | 2 - share/hackvr/meshes/floppy.hackvr | 30 - share/hackvr/meshes/grid_floor.sh | 2 - share/hackvr/meshes/guy_fawkes.obj | 553 - share/hackvr/meshes/interceptor/Ship/Ship.mtl | 156 - share/hackvr/meshes/interceptor/Ship/Ship.obj | 15070 ----------- share/hackvr/meshes/interceptor/Ship/Ship.smd | 24664 ------------------- share/hackvr/meshes/interceptor/Ship/Thumbs.db | Bin 41472 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture000.png | Bin 52951 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture001.png | Bin 95100 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture002.png | Bin 41385 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture003.png | Bin 26236 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture004.png | Bin 11459 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture005.png | Bin 85465 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture006.png | Bin 37260 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture007.png | Bin 10859 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture008.png | Bin 54284 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture009.png | Bin 67603 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture010.png | Bin 79301 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture011.png | Bin 5572 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture012.png | Bin 12729 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture013.png | Bin 21131 -> 0 bytes .../hackvr/meshes/interceptor/Ship/texture014.png | Bin 30569 -> 0 bytes share/hackvr/meshes/interceptor/interceptor.zip | Bin 955523 -> 0 bytes share/hackvr/meshes/interceptor/readme.txt | 1 - share/hackvr/meshes/male_basemesh1.obj | 3636 --- share/hackvr/meshes/monkey.blend | Bin 439088 -> 0 bytes share/hackvr/meshes/monkey.obj | 1013 - share/hackvr/meshes/n64.hackvr | 13 - share/hackvr/meshes/porygon/porygon.hackvr | 59 - share/hackvr/meshes/porygon2/Porygon/porygon.mtl | 11 - share/hackvr/meshes/porygon2/Porygon/porygon.obj | 1525 -- share/hackvr/meshes/porygon2/Porygon/porygon1.png | Bin 411 -> 0 bytes share/hackvr/meshes/porygon2/Porygon/porygon2.png | Bin 434 -> 0 bytes share/hackvr/meshes/porygon2/Porygon/porygon3.png | Bin 467 -> 0 bytes share/hackvr/meshes/porygon2/Porygon/porygon4.png | Bin 534 -> 0 bytes share/hackvr/meshes/porygon2/porygon.zip | Bin 10402 -> 0 bytes share/hackvr/meshes/radial_to_cartesian.py | 16 - share/hackvr/meshes/shittree.blend | Bin 428904 -> 0 bytes share/hackvr/meshes/shittree.obj | 32 - share/hackvr/meshes/test.hackvr | 5 - 162 files changed, 23 insertions(+), 62606 deletions(-) delete mode 100755 share/hackvr/examples/anonet_map.sh delete mode 100755 share/hackvr/examples/anonet_map/map delete mode 100755 share/hackvr/examples/anonet_map/paths-to-edges delete mode 100755 share/hackvr/examples/anonet_map/run delete mode 100644 share/hackvr/examples/calendar/Makefile delete mode 100755 share/hackvr/examples/calendar/calvr delete mode 100755 share/hackvr/examples/chess/board.sh delete mode 100644 share/hackvr/examples/chess/camera.pos delete mode 100755 share/hackvr/examples/chess/gnuchess-to-hackvr.sh delete mode 100755 share/hackvr/examples/chess/hackvr-to-gnuchess.sh delete mode 100644 share/hackvr/examples/chess/pieces/bishop delete mode 100644 share/hackvr/examples/chess/pieces/king delete mode 100644 share/hackvr/examples/chess/pieces/knight delete mode 100644 share/hackvr/examples/chess/pieces/pawn delete mode 100644 share/hackvr/examples/chess/pieces/queen delete mode 100644 share/hackvr/examples/chess/pieces/rook delete mode 100755 share/hackvr/examples/chess/run delete mode 100644 share/hackvr/examples/clock/Makefile delete mode 100755 share/hackvr/examples/clock/generate.py delete mode 100755 share/hackvr/examples/clock/hackvr-clock delete mode 100755 share/hackvr/examples/clock/run.pre delete mode 100755 share/hackvr/examples/clock/set_clock.sh delete mode 100755 share/hackvr/examples/dothack/chaosgate.py delete mode 100755 share/hackvr/examples/dothack/test.sh delete mode 100755 share/hackvr/examples/draw/draw.sh delete mode 100755 share/hackvr/examples/draw/run delete mode 100644 share/hackvr/examples/dungen/Makefile delete mode 100644 share/hackvr/examples/dungen/dun2ascii.c delete mode 100644 share/hackvr/examples/dungen/dun2hackvr.c delete mode 100755 share/hackvr/examples/dungen/dunexplore.sh delete mode 100644 share/hackvr/examples/dungen/dungen.c delete mode 100755 share/hackvr/examples/editor/editor.sh delete mode 100755 share/hackvr/examples/fib.sh delete mode 100755 share/hackvr/examples/filebrowser/action_to_target.sh delete mode 100755 share/hackvr/examples/filebrowser/backend-filebrowser.sh delete mode 100755 share/hackvr/examples/filebrowser/backend-gopher.sh delete mode 100755 share/hackvr/examples/filebrowser/backend-ps.sh delete mode 100644 share/hackvr/examples/filebrowser/camera.pos delete mode 100755 share/hackvr/examples/filebrowser/frontend-hackvr.sh delete mode 100755 share/hackvr/examples/filebrowser/frontend-zenity.sh delete mode 100755 share/hackvr/examples/filebrowser/list_to_cubes.sh delete mode 100755 share/hackvr/examples/filebrowser/run delete mode 100755 share/hackvr/examples/grid_floor.sh delete mode 100644 share/hackvr/examples/hackvr_term/Makefile delete mode 100644 share/hackvr/examples/hackvr_term/camera.pos delete mode 100755 share/hackvr/examples/hackvr_term/hackvr_data_decode.sh delete mode 100755 share/hackvr/examples/hackvr_term/hackvr_term delete mode 100644 share/hackvr/examples/hackvr_term/hackvr_term.c delete mode 100644 share/hackvr/examples/hackvr_term/libtmt/README.rst delete mode 100644 share/hackvr/examples/hackvr_term/libtmt/tmt.c delete mode 100644 share/hackvr/examples/hackvr_term/libtmt/tmt.h delete mode 100755 share/hackvr/examples/hackvr_term/pty delete mode 100644 share/hackvr/examples/hackvr_term/pty.c delete mode 100755 share/hackvr/examples/hackvr_term/read_line.sh delete mode 100755 share/hackvr/examples/hackvr_term/run delete mode 100755 share/hackvr/examples/hackvr_term/run.pty delete mode 100755 share/hackvr/examples/hackvrd/hackvr-subsystem delete mode 100755 share/hackvr/examples/hackvrd/hackvrd.sh delete mode 100755 share/hackvr/examples/hackvrd/ident delete mode 100755 share/hackvr/examples/hackvrd/list_to_cubes.sh delete mode 100755 share/hackvr/examples/hackvrd/multi.sh delete mode 100755 share/hackvr/examples/hackvrd/radio.sh delete mode 100755 share/hackvr/examples/hackvrnet/connect.sh delete mode 100755 share/hackvr/examples/marquee/marquee.sh delete mode 100755 share/hackvr/examples/spinners/square.sh delete mode 100755 share/hackvr/examples/starfield delete mode 100644 share/hackvr/examples/starfield.c delete mode 100644 share/hackvr/examples/subsume/arms.hackvr delete mode 100755 share/hackvr/examples/subsume/test.sh delete mode 100644 share/hackvr/examples/tictactoe/board delete mode 100644 share/hackvr/examples/tictactoe/board_orig delete mode 100644 share/hackvr/examples/tictactoe/camera.pos delete mode 100755 share/hackvr/examples/tictactoe/game.sh delete mode 100755 share/hackvr/examples/tictactoe/listen.sh delete mode 100644 share/hackvr/examples/tictactoe/marker0 delete mode 100644 share/hackvr/examples/tictactoe/marker1 delete mode 100755 share/hackvr/examples/tictactoe/run delete mode 100644 share/hackvr/examples/uristart.conf delete mode 100644 share/hackvr/examples/wget-log delete mode 100644 share/hackvr/examples/wget-log.1 delete mode 100644 share/hackvr/examples/wget-log.2 delete mode 100755 share/hackvr/examples/wordsearch/game.sh delete mode 100755 share/hackvr/examples/wordsearch/run delete mode 100755 share/hackvr/examples/xcmd.sh delete mode 100644 share/hackvr/font/apple410.hackvr delete mode 120000 share/hackvr/font/default.hackvr delete mode 100644 share/hackvr/font/epoch_font.hackvr delete mode 100644 share/hackvr/meshes/.n64.hackvr.swp delete mode 100644 share/hackvr/meshes/Deer.obj delete mode 100644 share/hackvr/meshes/bowser.hackvr delete mode 100644 share/hackvr/meshes/bowser.obj delete mode 100644 share/hackvr/meshes/bowser/bowser.mtl delete mode 100644 share/hackvr/meshes/bowser/bowser.zip delete mode 100644 share/hackvr/meshes/bowser/bowser_grp.png delete mode 100644 share/hackvr/meshes/bowser/readme.txt delete mode 100644 share/hackvr/meshes/bowser/textures/100EF06A_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/12545C5B_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/1255BC5B_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/1AFD7ECE_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/1C026C20_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/1D630F9B_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/23860B32_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/25A0F12B_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/4566EEE9_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/5278DE3_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/5F9833D7_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/628F696F_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/7255709C_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/78DA6E54_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/7C0ED1D5_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/7FBF04C8_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/889C0E_c.bmp delete mode 100644 share/hackvr/meshes/bowser/textures/AE0327_c.bmp delete mode 100644 share/hackvr/meshes/cube.hackvr delete mode 100644 share/hackvr/meshes/cube.obj delete mode 100644 share/hackvr/meshes/cube2.hackvr delete mode 100755 share/hackvr/meshes/drugsandwires/generate.py delete mode 100644 share/hackvr/meshes/female_basemesh1_2.hackvr delete mode 100644 share/hackvr/meshes/female_basemesh1_2.obj delete mode 100644 share/hackvr/meshes/floorgrid.hackvr delete mode 100644 share/hackvr/meshes/floppy.hackvr delete mode 100755 share/hackvr/meshes/grid_floor.sh delete mode 100644 share/hackvr/meshes/guy_fawkes.obj delete mode 100644 share/hackvr/meshes/interceptor/Ship/Ship.mtl delete mode 100644 share/hackvr/meshes/interceptor/Ship/Ship.obj delete mode 100644 share/hackvr/meshes/interceptor/Ship/Ship.smd delete mode 100644 share/hackvr/meshes/interceptor/Ship/Thumbs.db delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture000.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture001.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture002.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture003.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture004.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture005.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture006.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture007.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture008.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture009.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture010.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture011.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture012.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture013.png delete mode 100644 share/hackvr/meshes/interceptor/Ship/texture014.png delete mode 100644 share/hackvr/meshes/interceptor/interceptor.zip delete mode 100644 share/hackvr/meshes/interceptor/readme.txt delete mode 100644 share/hackvr/meshes/male_basemesh1.obj delete mode 100644 share/hackvr/meshes/monkey.blend delete mode 100644 share/hackvr/meshes/monkey.obj delete mode 100644 share/hackvr/meshes/n64.hackvr delete mode 100644 share/hackvr/meshes/porygon/porygon.hackvr delete mode 100644 share/hackvr/meshes/porygon2/Porygon/porygon.mtl delete mode 100644 share/hackvr/meshes/porygon2/Porygon/porygon.obj delete mode 100644 share/hackvr/meshes/porygon2/Porygon/porygon1.png delete mode 100644 share/hackvr/meshes/porygon2/Porygon/porygon2.png delete mode 100644 share/hackvr/meshes/porygon2/Porygon/porygon3.png delete mode 100644 share/hackvr/meshes/porygon2/Porygon/porygon4.png delete mode 100644 share/hackvr/meshes/porygon2/porygon.zip delete mode 100755 share/hackvr/meshes/radial_to_cartesian.py delete mode 100644 share/hackvr/meshes/shittree.blend delete mode 100644 share/hackvr/meshes/shittree.obj delete mode 100644 share/hackvr/meshes/test.hackvr diff --git a/README b/README index 17dde36..f028f76 100644 --- a/README +++ b/README @@ -11,7 +11,7 @@ so do some plumbing and get a multiplayer game going? How about a nice GL version written in zig made by someone else? https://git.random-projects.net/xq/hackvr-turbo -I'm telling you. It looks a lot nicer than my stuff. +It looks a lot nicer than my stuff. :::::::::::::::::::: ::: DEPENDENCIES ::: @@ -36,17 +36,17 @@ libhashtable (LIBrary for HASH TABLEs.) You can usually get these libs from the same place you got hackvr. where to find hackvr: -git://thebackupbox.net/hackvr +git://git.thebackupbox.net/hackvr git://main.lv/hackvr https://github.com/kkabrams/hackvr where to find libidc: -git://thebackupbox.net/libidc +git://git.thebackupbox.net/libidc git://main.lv/libidc https://github.com/kkabrams/libidc where to find libhashtable: -git://thebackupbox.net/libhashtable +git://git.thebackupbox.net/libhashtable git://main.lv/libhashtable https://github.com/kkabrams/libhashtable @@ -111,6 +111,19 @@ A few helper scripts are written in perl and python. So you might want to install perl and python if you want to play with them. They're pretty nifty. +:::::::::::::: +::: Extras ::: +:::::::::::::: + +There is another repo that contains a lot of experiments, examples, toys, and, well, extra files. +stuff like a vector font. +something that renders a terminal using it into hackvr. +a clock. +dungeon map generator and viewer. +etc. + +git://git.thebackupbox.net/hackvr-extras + ::::::::::::::::::: ::: Stereoscopy ::: ::::::::::::::::::: diff --git a/bin/hackvr b/bin/hackvr index 1c9d16c..bb0185e 100755 --- a/bin/hackvr +++ b/bin/hackvr @@ -1,9 +1,10 @@ -#!/bin/sh +#!/usr/bin/env bash +set -eo pipefail if [ "_$HACKVR" != "_" -a "_$HACKVR" != "_$0" ];then - exec $HACKVR $* + exec "$HACKVR" "$@" fi -if [ $DISPLAY ]; then - exec hackvr_x11 $* +if [ "$DISPLAY" ]; then + exec hackvr_x11 "$@" else - exec hackvr_fb $* + exec hackvr_fb "$@" fi diff --git a/share/hackvr/examples/anonet_map.sh b/share/hackvr/examples/anonet_map.sh deleted file mode 100755 index 188dd78..0000000 --- a/share/hackvr/examples/anonet_map.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -cat <(printf "%s move 0 0 -270\n" "$USER") \ - <(wget http://hacking.allowed.org/cgi-bin/map_hackvr.cgi -qO- 2>/dev/null) \ - /dev/stdin \ - | slowcat 0 \ - | hackvr "$USER" | tee -a /dev/stderr \ - | grep --line-buffered action \ - | stdbuf -oL cut '-d ' -f3 \ - | xargs -r -L1 printf "whois://hacking.allowed.org/AS%s\n" \ - | tee /dev/stderr \ - | xargs -r -L1 urlstart - diff --git a/share/hackvr/examples/anonet_map/map b/share/hackvr/examples/anonet_map/map deleted file mode 100755 index 51a9e59..0000000 --- a/share/hackvr/examples/anonet_map/map +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -echo $USER set title anonet_AS_map - -paths="$(ncat --recv-only 21.41.41.1 64777 | sort | uniq | tee ${PREFIX}/var/cache/hackvr/anonet_data.new)" - -MAP=${PREFIX}/var/cache/hackvr/anonet_map.hackvr -mkdir -p ${PREFIX}/var/cache/hackvr/ - -#see if the data actually changed before regenerating this shit... -if cmp ${PREFIX}/var/cache/hackvr/anonet_data.new ${PREFIX}/var/cache/hackvr/anonet_data.old ; then - cat $MAP - exit 0 -fi - -mv ${PREFIX}/var/cache/hackvr/anonet_data.new ${PREFIX}/var/cache/hackvr/anonet_data.old - -> $MAP - -nodes=$(printf "%s\n" "$paths" | tr ' ' '\n' | sort | uniq) -nodes_count="$(printf "%s\n" "$nodes" | tr ' ' '\n' | wc -l | tr -cd '0-9')" -#echo $nodes -#echo $nodes_count -echo $USER move 0 0 -20 -coords="$( (for node in $nodes;do - printf "AS%s addshape 4 2 0 8 0 0 0 0\n" "$node" - printf "AS* rotate 0 0 +%d\n" "$[360 / ${nodes_count} ]" - printf "AS* flatten\n" -done -printf "* export *\n" -) | hackvr_headless 2>/dev/null | sed 's/^*_AS//g' | cut '-d ' -f5,6)" -#printf "%s\n" "$coords" -xcoords="$(printf "%s\n" "$coords" | cut '-d ' -f1)" -ycoords="$(printf "%s\n" "$coords" | cut '-d ' -f2)" - -#echo $xcoords -#echo $ycoords - -edges=$(printf "%s\n" "$paths" | tr '\n' '\0' | xargs -n1 -0 ./paths-to-edges | sort | uniq | tr ' ' '_') - -index_of() { - printf "%s\n" "$nodes" | grep -n '^'"$1"'$' | cut -d: -f1 -} - -xcoord_by_ASN() { - printf "%s\n" "$xcoords" | head -n "$(index_of $1)" | tail -n1 -} - -ycoord_by_ASN() { - printf "%s\n" "$ycoords" | head -n "$(index_of $1)" | tail -n1 -} - -line_between_nodes() { - a=$(printf "%s\n" "$1" | cut -d_ -f1) - b=$(printf "%s\n" "$1" | cut -d_ -f2) - printf "%s->%s addshape 2 2 %s %s 0 %s %s 0\n" "$a" "$b" $(xcoord_by_ASN $a) $(ycoord_by_ASN $a) $(xcoord_by_ASN $b) $(ycoord_by_ASN $b) -} - -for node in $nodes;do - printf " addshape 5 4 -1 8 0 -1 10 0 1 10 0 1 8 0\n" "$node" - printf "$' | sed 's/^<\(.*\)>$/\1/g' | tr '\n' '\0' | xargs -n1 -0 copy_start_nevermind.sh & - fi - done diff --git a/share/hackvr/examples/calendar/Makefile b/share/hackvr/examples/calendar/Makefile deleted file mode 100644 index 1646279..0000000 --- a/share/hackvr/examples/calendar/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -PREFIX:=/usr/local - -all: calvr - @echo using PREFIX: $(PREFIX) - -install: - install -t $(PREFIX)/bin calvr diff --git a/share/hackvr/examples/calendar/calvr b/share/hackvr/examples/calendar/calvr deleted file mode 100755 index afef593..0000000 --- a/share/hackvr/examples/calendar/calvr +++ /dev/null @@ -1,196 +0,0 @@ -#!/usr/bin/env bash -#draw a 7x7 grid -#top row gets the day names -#figure out what the first day of the week for that month is -#then looping is easy after that -#use date with format string of day-of-week for an alternate time of the viewing month's first day - -### :D atq in my calendar? -# atq files are stored in: /var/spool/cron/atjobs/ -# filename format: %1c %5x %8x -# order: queue, job number, time / 60 - -set -eo pipefail -current_year=$(date +%Y) -current_month=$(date +%m | sed 's/^0//') -current_day=$(date +%d | sed 's/^0//') - -year=$current_year -month=$current_month -day=$current_day - -### we're testing this weirdness -#year=1752 -#month=9 -#day=1 - -cw=30 -ch=30 - -yoff=51 -xoff=105 -backup=238 - -WORKING_DIR=~/.local/var/cal -mkdir -p $WORKING_DIR - -cd "${WORKING_DIR}" -#git pull - -### hack to load in clock widget? -hackvr-clock init | sed 's/_clock_face_digit[^ ]* /_clock_face_ /g' -clock_left=15 -printf "_clock_face_hand_hour_ move -%s 0 0\n" $clock_left -printf "_clock_face_hand_minute_ move -%s 0 0\n" $clock_left -printf "_clock_face_hand_second_ move -%s 0 0\n" $clock_left -printf "_clock_face_ move -%s 0 0\n" $clock_left -while true;do - hackvr-clock set - sleep 1 -done & -### - -printf "%s move %s 0 -%s\n" "$USER" "$xoff" "$backup" - -refresh="yep" - -stdbuf -oL grep -v '^#' | while true;do - if [ "$refresh" ];then - unset refresh -# first_dow="$(date -d $month/1/$year +%w)" - -### this doesn't work for august 2020. outputs 4, should output 6 - first_dow=$[$(cal -d "${year}-${month}" | tail -n+3 | head -n1 | cut -d1 -f1 | wc -c) / 3] - monthname="$(date -d $month/1/2000 +%B)" #year isn't important - dow=$first_dow - row=0 - d=1 - -### current month and its "button" - printf "_cal_MONTH_ addshape 1 4 %s %s 0 %s %s 0 %s %s 0 %s %s 0\n" \ - $[0] $[1*$ch + $yoff] \ - $[(($cw * 7 ) / 2) - 1] $[1*$ch + $yoff] \ - $[(($cw * 7 ) / 2) - 1] $[1*$ch+($ch/2) + $yoff - 1] \ - $[0] $[1*$ch+($ch/2) + $yoff - 1] - printf "%s\n" "${monthname}" | makelabel.sh "_cal_MONTH_" $[$xoff / 3] $[$yoff + $ch + 5] 0 - -### current year and its "button" - printf "_cal_YEAR_ addshape 1 4 %s %s 0 %s %s 0 %s %s 0 %s %s 0\n" \ - $[($cw * 7 ) / 2 ] $[1*$ch + $yoff] \ - $[$cw * 7 - 1] $[1*$ch + $yoff] \ - $[$cw * 7 - 1] $[1*$ch+($ch/2) + $yoff - 1] \ - $[($cw * 7 ) / 2 ] $[1*$ch+($ch/2) + $yoff - 1] - printf "%s\n" "${year}" | makelabel.sh "_cal_YEAR_" $[$xoff + 5] $[$yoff + $ch + 5] 0 - -### the <== button - printf "_cal_prevmonth_ addshape 1 4 %s %s 0 %s %s 0 %s %s 0 %s %s 0\n" \ - $[-$cw] $[1*$ch + $yoff] \ - $[-1] $[1*$ch + $yoff] \ - $[-1] $[1*$ch+($ch/2) + $yoff - 1] \ - $[-$cw] $[1*$ch+($ch/2) + $yoff - 1] - printf "<==\n" | makelabel.sh "_cal_prevmonth_" $[0 - $cw + 1] $[$yoff + $ch + 5] 0 - -### the ==> button - printf "_cal_nextmonth_ addshape 1 4 %s %s 0 %s %s 0 %s %s 0 %s %s 0\n" \ - $[$cw * 7] $[1*$ch + $yoff] \ - $[$cw * 8 -1] $[1*$ch + $yoff] \ - $[$cw * 8 -1] $[1*$ch+($ch/2) + $yoff - 1] \ - $[$cw * 7] $[1*$ch+($ch/2) + $yoff - 1] - printf "==>\n" | makelabel.sh "_cal_nextmonth_" $[$cw * 7 + 1] $[$yoff + $ch + 5] 0 - - for d in $(cal -d $year-$month | tail -n+3 | tr '\n' ' ' | tr -s ' ');do -# while [ "$d" -le "$days_in_month" ];do -# printf "%s %s : %s\n" "$row" "$dow" "$d" - if [ -f ${WORKING_DIR}/${year}_${month}_${d} ];then - color=$[4+16] - else - color=$[5+16] - fi - printf "%s addshape %s 4 %s %s 0 %s %s 0 %s %s 0 %s %s 0\n" \ - "_cal_day_${d}_" "${color}" \ - "$[$dow*$cw]" "$[-1*$row*$ch + $yoff]" \ - "$[$dow*$cw+$cw-1]" "$[-1*$row*$ch + $yoff]" \ - "$[$dow*$cw+$cw-1]" "$[-1*$row*$ch+$ch-1 + $yoff]" \ - "$[$dow*$cw]" "$[-1*$row*$ch+$ch-1 + $yoff]" - printf "%s\n" "${d}" | makelabel.sh "_cal_day_${d}_" "$[$dow*$cw + 1]" "$[-1*$row*$ch + $yoff + 1]" 0 - d=$[$d+1] - dow=$[$dow + 1] - if [ $dow = 7 ];then - dow=0 - row=$[$row + 1] - fi - done - if [ $month = $current_month -a $year = $current_year ];then - printf "_cal_day_%s_ move 0 0 -2\n" "${current_day}" - fi - fi - if ! read group action target;then - exit - fi - #xmessage "$group $action $target" - if [ "$action" = "action" ];then - if [ "$target" = "_cal_nextmonth_" ];then - month=$[month + 1] - if [ $month = 13 ];then - month=1 - year=$[$year + 1] - fi - refresh="yep" - fi - if [ "$target" = "_cal_prevmonth_" ];then - month=$[month - 1] - if [ $month = 0 ];then - month=12 - year=$[$year - 1] - fi - refresh="yep" - fi - if [ "$target" = "_cal_MONTH_" ];then - month="$(xmessage -buttons January:1,February:2,March:3,April:4,May:5,June:6,July:7,August:8,September:9,October:10,November:11,December:12 'pick a month';echo $?)" - refresh="yep" - fi - if [ "$target" = "_cal_YEAR_" ];then - year="$(seq $[$year - 5] $[$year + 5] | dmenu -p 'enter a year' | tr -cd '0-9' | sed 's/^$/1970/')" - refresh="yep" - fi - if printf "%s\n" "$target" | grep '^_cal_day_' 2>&1 >/dev/null;then - d="$(printf "%s\n" "$target" | cut -d_ -f4)" - file=${WORKING_DIR}/${year}_${month}_${d} - if [ -e "${file}" ];then - derp=exists - else - derp=notexists - fi - x-terminal-emulator -e nano "${file}" - if [ -e "${file}" ];then #if the file exists - if [ ! -s "${file}" ];then #but the file is empty - rm "${file}" >&2 - #git rm "${file}" >&2 - #git commit -m '[calvr] removed: ${file}' >&2 - else #the file is NOT empty, so it was changed, or not, might as well try to add and commit. - echo "# lol wat?" - #git add "${file}" >&2 - #git commit -m '[calvr] maybe changed: ${file}' >&2 # if nothing changed it won't bother to commit - #git push # just to make it more magical - fi - fi - if [ -e "${file}" ];then - merp=exists - else - merp=notexists - fi - if [ "${derp}" != "${merp}" ];then - refresh="yep" - fi - fi - fi - if [ "$action" = "quit" ];then - exit - fi - if [ "$refresh" ];then - ### I /might/ want to just make all of the calendar parts - ### start with _cal_* so I can deletegroup _cal_* - ### instead of nuking the world except the user. - printf '%s deletegroup _cal_*\n' "$USER" - fi -done diff --git a/share/hackvr/examples/chess/board.sh b/share/hackvr/examples/chess/board.sh deleted file mode 100755 index dc3fb3b..0000000 --- a/share/hackvr/examples/chess/board.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -e=$1 #elevation of board -width=8 -height=8 -cols="a b c d e f g h" - -printf "junk set camera.r.x -45\n" - -for x in $(seq 1 $width);do - for y in $(seq 1 $height);do - color=$[((($y % 2) + ($x % 2))%2)+16] -### board is on the wall. draw in x and y. -# printf "%s%s addshape %s 4 %s %s %s %s %s %s %s %s %s %s %s %s\n" \ -# $(printf "%s\n" "$cols" | cut '-d ' -f$x) $y $color \ -# $x $y $e \ -# $[x+1] $y $e \ -# $[x+1] $[y+1] $e \ -# $x $[y+1] $e -### board is on floor. draw in x and z. - printf "%s%s addshape %s 4 %s %s %s %s %s %s %s %s %s %s %s %s\n" \ - $(printf "%s\n" "$cols" | cut '-d ' -f$x) $y $color \ - $x $e $y \ - $[x+1] $e $y \ - $[x+1] $e $[y+1] \ - $x $e $[y+1] - done -done - -row8="rook knight bishop queen king bishop knight rook" -row1="$row8" - -color="19 19 0 0 0 0 20 20" - -#draw pawns. triangles. -for x in $(seq $width);do - for y in 2 7;do - locat="$(printf "%s\n" "$cols" | cut '-d ' "-f$x")$y" - cat "./pieces/pawn" | sed 's/^[^ ][^ ]* addshape [0-9][0-9]* /piece_'"${locat}"' addshape '"$(printf "%s\n" "$color" | cut '-d ' "-f$y")"' /g' -### board is on wall. use x and y. -# printf "piece_%s move %s %s %s\n" "$locat" "$x" "$y" "$e" -### board is on floor. use x and z. - printf "piece_%s move %s %s %s\n" "$locat" "$x" "$e" "$y" - done - for y in 1 8;do - locat="$(printf "%s\n" "$cols" | cut '-d ' "-f$x")$y" - cat "./pieces/$(printf "%s\n" "$row1" | cut '-d ' "-f$x")" \ - | sed 's/^[^ ][^ ]* addshape [0-9][0-9]* /piece_'"${locat}"' addshape '"$(printf "%s\n" "$color" | cut '-d ' "-f$y")"' /g' -### board is on wall. use x and y. -# printf "piece_%s move %s %s %s\n" "$locat" "$x" "$y" "$e" -### board is on floor. use x and z. - printf "piece_%s move %s %s %s\n" "$locat" "$x" "$e" "$y" - done -done diff --git a/share/hackvr/examples/chess/camera.pos b/share/hackvr/examples/chess/camera.pos deleted file mode 100644 index 32433c2..0000000 --- a/share/hackvr/examples/chess/camera.pos +++ /dev/null @@ -1,2 +0,0 @@ -epoch move 5 5 -6 -derp set global.zoom 60 diff --git a/share/hackvr/examples/chess/gnuchess-to-hackvr.sh b/share/hackvr/examples/chess/gnuchess-to-hackvr.sh deleted file mode 100755 index 841389b..0000000 --- a/share/hackvr/examples/chess/gnuchess-to-hackvr.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -e=$1 -tee /dev/stderr | while read first second third;do - if [ "_$first" = "_feature" ];then - printf "# just gnuchess saying what features it has: %s %s %s\n" "$first" "$second" "$third" >&2 - elif printf "%s\n" "$first" | grep '^[0-9][0-9]*\.$' >/dev/null 2>&1;then - #we made a successful move. - ### how to tell hackvr to move the piece now? $second should contain what the move was. - printf "# Hey! Hackvr! do this move: %s\n" "$second" >&2 - if [ "_$second" = "_..." ];then #computer/other person made a move. - move=$third - else - move=$second - fi - from=$(printf "%s\n" "$move" | fold -w1 | head -n2 | tr -d '\n') - to=$(printf "%s\n" "$move" | fold -w1 | tail -n+3 | head -n2 | tr -d '\n') - x=$(echo "a b c d e f g h" | tr ' ' '\n' | grep -n "$(printf "%s\n" "$to" | fold -w1 | head -n1)" | cut -d: -f1) - y=$(printf "%s\n" "$to" | fold -w1 | tail -n1) - magic=$(printf "%s\n" "$move" | fold -w1 | tail -n+5 | tr -d '\n') -### if the board is on the wall we need to use x and y -# printf "piece_%s move %s %s %s\n" "$from" "$x" "$y" "$e" | tee /dev/stderr -### the board is on the floor atm. use x and z - printf "piece_%s move %s %s %s\n" "$from" "$x" "$e" "$y" | tee /dev/stderr - - printf "#delete the old piece_%s group\n" - printf "epoch deletegroup piece_%s\n" "$to" - printf "epoch renamegroup piece_%s piece_%s\n" "$from" "$to" | tee /dev/stderr - else - #something else. - printf "oops. something else happened. let's see: %s %s %s\n" "$first" "$second" "$third" >&2 - fi -done diff --git a/share/hackvr/examples/chess/hackvr-to-gnuchess.sh b/share/hackvr/examples/chess/hackvr-to-gnuchess.sh deleted file mode 100755 index 94cd1ab..0000000 --- a/share/hackvr/examples/chess/hackvr-to-gnuchess.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -part1="" -echo "sleeping 3 seconds. might have gnuchess less likely to not do anything." >&2 -sleep 3 -echo "protover 2" -while read derp command target extra;do - if [ "_$command" = "_action" ];then - if printf "%s\n" "$target" | grep -v "^piece_" 2>&1 > /dev/null;then #we are ignoring clicks on pieces in favor of squares atm. when full 3d probably want pieces. - if [ "_$part1" = "_" ];then - part1=$target - else - #we have two parts. let's tell gnuchess! - printf "%s%s\n" $part1 $target - part1="" - fi - fi - fi -done diff --git a/share/hackvr/examples/chess/pieces/bishop b/share/hackvr/examples/chess/pieces/bishop deleted file mode 100644 index db6f144..0000000 --- a/share/hackvr/examples/chess/pieces/bishop +++ /dev/null @@ -1,2 +0,0 @@ -rook addshape 4 4 .4 .1 0 .6 .1 0 .6 .9 0 .4 .9 0 -rook addshape 4 4 .3 .6 0 .7 .6 0 .7 .8 0 .3 .8 0 diff --git a/share/hackvr/examples/chess/pieces/king b/share/hackvr/examples/chess/pieces/king deleted file mode 100644 index 8ca79ef..0000000 --- a/share/hackvr/examples/chess/pieces/king +++ /dev/null @@ -1,2 +0,0 @@ -king addshape 4 4 .1 .7 0 .3 .9 0 .9 .3 0 .7 .1 0 -king addshape 4 4 .3 .1 0 .9 .7 0 .7 .9 0 .1 .3 0 diff --git a/share/hackvr/examples/chess/pieces/knight b/share/hackvr/examples/chess/pieces/knight deleted file mode 100644 index adc7f53..0000000 --- a/share/hackvr/examples/chess/pieces/knight +++ /dev/null @@ -1,2 +0,0 @@ -knight addshape 4 4 .1 .1 0 .3 .1 0 .3 .9 0 .1 .9 0 -knight addshape 4 4 .1 .1 0 .9 .1 0 .9 .3 0 .1 .3 0 diff --git a/share/hackvr/examples/chess/pieces/pawn b/share/hackvr/examples/chess/pieces/pawn deleted file mode 100644 index d7d2d29..0000000 --- a/share/hackvr/examples/chess/pieces/pawn +++ /dev/null @@ -1 +0,0 @@ -pawn addshape 4 3 .2 .1 0 .8 .1 0 .5 .5 0 diff --git a/share/hackvr/examples/chess/pieces/queen b/share/hackvr/examples/chess/pieces/queen deleted file mode 100644 index 3ebb4ab..0000000 --- a/share/hackvr/examples/chess/pieces/queen +++ /dev/null @@ -1 +0,0 @@ -pawn addshape 4 3 .2 .1 0 .8 .1 0 .5 .9 0 diff --git a/share/hackvr/examples/chess/pieces/rook b/share/hackvr/examples/chess/pieces/rook deleted file mode 100644 index 2550eb5..0000000 --- a/share/hackvr/examples/chess/pieces/rook +++ /dev/null @@ -1 +0,0 @@ -rook addshape 4 4 .4 .1 0 .6 .1 0 .6 .9 0 .4 .9 0 diff --git a/share/hackvr/examples/chess/run b/share/hackvr/examples/chess/run deleted file mode 100755 index 1168044..0000000 --- a/share/hackvr/examples/chess/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -export elevation=0 -mknod p p -stdbuf -oL cat camera.pos <(./board.sh $elevation) <(cat p | ./gnuchess-to-hackvr.sh $elevation) | hackvr "$USER" | ./hackvr-to-gnuchess.sh | gnuchess -x > p -rm p diff --git a/share/hackvr/examples/clock/Makefile b/share/hackvr/examples/clock/Makefile deleted file mode 100644 index ea7944a..0000000 --- a/share/hackvr/examples/clock/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -PREFIX:=/usr/local - -.PHONY: all install - -hackvr-clock: run.pre generate.py - ./generate.py | cat run.pre /dev/stdin > hackvr-clock - chmod +x hackvr-clock -all: hackvr-clock - -install: all - install -t $(PREFIX)/bin hackvr-clock diff --git a/share/hackvr/examples/clock/generate.py b/share/hackvr/examples/clock/generate.py deleted file mode 100755 index f3db105..0000000 --- a/share/hackvr/examples/clock/generate.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python3 -import math - -for i in range(1,13): - x=math.floor(math.sin(math.pi / 6 * i) * 1000) / 100 - y=math.floor(math.cos(math.pi / 6 * i) * 1000) / 100 - print("_clock_face_digit_{}_ addshape 2 4 {} {} 0 {} {} 0 {} {} 0 {} {} 0".format(i,x-1,y-1,x+1,y-1,x+1,y+1,x-1,y+1)) - print("_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0") - print("_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0") - print("_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0") diff --git a/share/hackvr/examples/clock/hackvr-clock b/share/hackvr/examples/clock/hackvr-clock deleted file mode 100755 index 95ba948..0000000 --- a/share/hackvr/examples/clock/hackvr-clock +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash -if [ "$1" = "init" ];then - grep -A1000 '^___CUT___' "$0" | tail -n+2 - exit -elif [ "$1" = "set" ];then - hour=$(date +%H | sed 's/^0//') - minute=$(date +%M | sed 's/^0//') - second=$(date +%S | sed 's/^0//') - printf "_clock_face_hand_hour_ rotate 0 0 -%s\n" "$[$hour * 30 + ($minute / 2)]" - printf "_clock_face_hand_minute_ rotate 0 0 -%s\n" "$[$minute * 6]" - printf "_clock_face_hand_second_ rotate 0 0 -%s\n" "$[$second * 6]" - #printf "_clock_face_hand_hour_ rotate 0 0 %s\n" "$[$hour * 30 + ($minute / 2)]" - #printf "_clock_face_hand_minute_ rotate 0 0 %s\n" "$[$minute * 6]" - #printf "_clock_face_hand_second_ rotate 0 0 %s\n" "$[$second * 6]" -else - nonblocktail \ - <(echo $USER move 0 0 -30) \ - <("$0" init) \ - <(while true;do "$0" set;sleep 1;done) \ - /dev/stdin 2>/dev/null \ - | hackvr 2>/dev/null -fi -exit 0 -___CUT___ -_clock_face_digit_1_ addshape 2 4 3.99 7.66 0 5.99 7.66 0 5.99 9.66 0 3.99 9.66 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_2_ addshape 2 4 7.66 4.0 0 9.66 4.0 0 9.66 6.0 0 7.66 6.0 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_3_ addshape 2 4 9.0 -1.0 0 11.0 -1.0 0 11.0 1.0 0 9.0 1.0 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_4_ addshape 2 4 7.66 -6.0 0 9.66 -6.0 0 9.66 -4.0 0 7.66 -4.0 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_5_ addshape 2 4 4.0 -9.67 0 6.0 -9.67 0 6.0 -7.67 0 4.0 -7.67 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_6_ addshape 2 4 -1.0 -11.0 0 1.0 -11.0 0 1.0 -9.0 0 -1.0 -9.0 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_7_ addshape 2 4 -6.0 -9.67 0 -4.0 -9.67 0 -4.0 -7.67 0 -6.0 -7.67 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_8_ addshape 2 4 -9.67 -6.01 0 -7.67 -6.01 0 -7.67 -4.01 0 -9.67 -4.01 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_9_ addshape 2 4 -11.0 -1.01 0 -9.0 -1.01 0 -9.0 0.99 0 -11.0 0.99 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_10_ addshape 2 4 -9.67 3.99 0 -7.67 3.99 0 -7.67 5.99 0 -9.67 5.99 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_11_ addshape 2 4 -6.01 7.66 0 -4.01 7.66 0 -4.01 9.66 0 -6.01 9.66 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_12_ addshape 2 4 -1.01 9.0 0 0.99 9.0 0 0.99 11.0 0 -1.01 11.0 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 diff --git a/share/hackvr/examples/clock/run.pre b/share/hackvr/examples/clock/run.pre deleted file mode 100755 index ed0e68b..0000000 --- a/share/hackvr/examples/clock/run.pre +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -if [ "$1" = "init" ];then - grep -A1000 '^___CUT___' "$0" | tail -n+2 - exit -elif [ "$1" = "set" ];then - hour=$(date +%H | sed 's/^0//') - minute=$(date +%M | sed 's/^0//') - second=$(date +%S | sed 's/^0//') - printf "_clock_face_hand_hour_ rotate 0 0 -%s\n" "$[$hour * 30 + ($minute / 2)]" - printf "_clock_face_hand_minute_ rotate 0 0 -%s\n" "$[$minute * 6]" - printf "_clock_face_hand_second_ rotate 0 0 -%s\n" "$[$second * 6]" - #printf "_clock_face_hand_hour_ rotate 0 0 %s\n" "$[$hour * 30 + ($minute / 2)]" - #printf "_clock_face_hand_minute_ rotate 0 0 %s\n" "$[$minute * 6]" - #printf "_clock_face_hand_second_ rotate 0 0 %s\n" "$[$second * 6]" -else - nonblocktail \ - <(echo $USER move 0 0 -30) \ - <("$0" init) \ - <(while true;do "$0" set;sleep 1;done) \ - /dev/stdin 2>/dev/null \ - | hackvr 2>/dev/null -fi -exit 0 -___CUT___ diff --git a/share/hackvr/examples/clock/set_clock.sh b/share/hackvr/examples/clock/set_clock.sh deleted file mode 100755 index 36c3fb4..0000000 --- a/share/hackvr/examples/clock/set_clock.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -hour=$(date +%H | sed 's/^0//') -minute=$(date +%M | sed 's/^0//') -second=$(date +%S | sed 's/^0//') -printf "_clock_face_hand_hour_ rotate 0 0 -%s\n" "$[$hour * 30 + ($minute / 2)]" -printf "_clock_face_hand_minute_ rotate 0 0 -%s\n" "$[$minute * 6]" -printf "_clock_face_hand_second_ rotate 0 0 -%s\n" "$[$second * 6]" -#printf "_clock_face_hand_hour_ rotate 0 0 %s\n" "$[$hour * 30 + ($minute / 2)]" -#printf "_clock_face_hand_minute_ rotate 0 0 %s\n" "$[$minute * 6]" -#printf "_clock_face_hand_second_ rotate 0 0 %s\n" "$[$second * 6]" diff --git a/share/hackvr/examples/dothack/chaosgate.py b/share/hackvr/examples/dothack/chaosgate.py deleted file mode 100755 index b1cea43..0000000 --- a/share/hackvr/examples/dothack/chaosgate.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python - -import math - -def fp(p): - return " {} {} {}".format(p[0],p[1],p[2]) - -def print_rect(r): - print("gate addshape 3 4 {} {} {} {}".format(fp(r[0]),fp(r[1]),fp(r[2]),fp(r[3]))) - -d=1 - -sides = 16.0 -step = 360.0/sides -rot=0.0 -zoff = 0.0 -while rot < 360: -# print("rot: {}".format(rot)) - x1=math.sin(rot * math.pi / 180.0) - y1=math.cos(rot * math.pi / 180.0) - rot = rot + step - x2=math.sin(rot * math.pi / 180.0) - y2=math.cos(rot * math.pi / 180.0) - -# print("{} {}".format(x1,y1)) - - ### now to calculate points for the 4 rectangles we need to draw... - v1 = x1 * (d+30.0) # inner first point - v2 = x1 * (d+32.0) # outer first point - v3 = x1 * (d+31.0) # center first point - - v4 = y1 * (d+30.0) - v5 = y1 * (d+32.0) - v6 = y1 * (d+31.0) - - v7 = x2 * (d+30.0) - v8 = x2 * (d+32.0) - v9 = x2 * (d+31.0) - - v10 = y2 * (d+30.0) - v11 = y2 * (d+32.0) - v12 = y2 * (d+31.0) - - p1 = (v1, v4, zoff + 0.0) - p2 = (v2, v5, zoff + 0.0) - p3 = (v3, v6, zoff + 1.0) - p4 = (v3, v6, zoff - 1.0) - - p5 = (v7, v10, zoff + 0.0) - p6 = (v8, v11, zoff + 0.0) - p7 = (v9, v12, zoff + 1.0) - p8 = (v9, v12, zoff - 1.0) - - r1 = (p1, p5, p7, p3) #inner near - r2 = (p1, p5, p8, p4) #inner far - r3 = (p2, p6, p7, p3) #outer near - r4 = (p2, p6, p8, p4) #outer far - - ### first rectange is... - print_rect(r1) - print_rect(r2) - print_rect(r3) - print_rect(r4) diff --git a/share/hackvr/examples/dothack/test.sh b/share/hackvr/examples/dothack/test.sh deleted file mode 100755 index 7a30544..0000000 --- a/share/hackvr/examples/dothack/test.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -nonblocktail \ - <(./chaosgate.py) \ - <(echo gate move 0 0 150) \ - <(while true;do for i in $(seq 0 5 360);do echo "gate rotate 0 $i 0";sleep .1;done;done) \ - | hackvr_open diff --git a/share/hackvr/examples/draw/draw.sh b/share/hackvr/examples/draw/draw.sh deleted file mode 100755 index e18a8b4..0000000 --- a/share/hackvr/examples/draw/draw.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash -echo "$USER move 5 7 -19" - -for y in $(seq 0 1 15);do - for x in $(seq 0 1 15);do - echo cell_${x}_${y} addshape 2 4 -.5 -.5 0 -.5 .5 0 .5 .5 0 .5 -.5 0 - #echo cell_${x}_${y} addshape 2 4 $x $y 0 $[x] $[y+1] 0 $[x+1] $[y+1] 0 $[x+1] $[y] 0 - echo cell_${x}_${y} move $x $y 0 - done -done - -### color pallete -### 0-8 are ansi colors. -for c in $(seq 0 16);do - echo color_${c} addshape $[c] 4 $[-2 - ($c / 8)] $[($c%8)+3] 0 $[-1 - ($c / 8)] $[($c%8)+3] 0 $[-1 - ($c / 8)] $[($c%8)+4] 0 $[-2 - ($c / 8)] $[($c%8)+4] 0 -done - -#cat ${PREFIX}/share/hackvr/meshes/floppy.hackvr | grep '^[^ #]' | sed 's/^[^ ][^ ]*/save/g' -#echo save move -5 0 0 - -tee /dev/stderr | while read -r source command target;do - if [ "$command" = "action" ];then - if echo "$target" | grep "^save" 2>&1 >/dev/null;then - echo "$USER export *" - date=$(date +%s) - echo "$USER ping $date" - while read -r line;do - if [ "$line" = "${USER} pong ${date}" ];then - break - else - printf "%s\n" "$line" >> ~/drawsave.hackvr - fi - done - fi - if echo "$target" | grep "^color_" 2>&1 >/dev/null;then - color=$(echo $target | cut -d_ -f2) - echo deletegroup $target - echo color_${color}_current addshape $[$color] 4 -2 0 0 -2 1 0 -1 1 0 -1 0 0 - elif echo "$target" | grep '^cell_' 2>&1 >/dev/null;then - x=$(echo $target | cut -d_ -f2) - y=$(echo $target | cut -d_ -f3) - echo $target deletegroup $target - #echo $target addshape $[$color] 4 $x $y 0 $x $[y+1] 0 $[x+1] $[y+1] 0 $[x+1] $y 0 | tee /dev/stderr - echo $target addshape $[$color] 4 -.5 -.5 0 -.5 .5 0 .5 .5 0 .5 -.5 0 - printf "%s move %d %d 0" "$target" "$x" "$y" - fi - fi -done diff --git a/share/hackvr/examples/draw/run b/share/hackvr/examples/draw/run deleted file mode 100755 index 699a38c..0000000 --- a/share/hackvr/examples/draw/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -mknod p p -hackvr_coproc ./draw.sh diff --git a/share/hackvr/examples/dungen/Makefile b/share/hackvr/examples/dungen/Makefile deleted file mode 100644 index cd05f4b..0000000 --- a/share/hackvr/examples/dungen/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -.PHONY: all clean - -all: dungen dun2ascii dun2hackvr - -clean: - rm -f dungen - rm -f dun2ascii - rm -f dun2hackvr diff --git a/share/hackvr/examples/dungen/dun2ascii.c b/share/hackvr/examples/dungen/dun2ascii.c deleted file mode 100644 index d7a9996..0000000 --- a/share/hackvr/examples/dungen/dun2ascii.c +++ /dev/null @@ -1,46 +0,0 @@ -#include -#include -#include - -//nsew -char *a[16]; - -char field[256]; - -void print_field() { - int i; - fprintf(stderr,"\x1b[H"); - for(i=0;i<(16*strlen(a[field[0]]))+1;i++) fprintf(stderr,"#"); - for(i=0;i<256;i++) { - if(i%16 == 0) fprintf(stderr,"#\n#"); - fprintf(stderr,"%s",a[field[i]]); - } - fprintf(stderr,"#\n"); - for(i=0;i<(16*strlen(a[field[0]]))+2;i++) fprintf(stderr,"#"); - fprintf(stderr,"\n"); -} - -int main(int argc,char *argv[]) { - int i; - fprintf(stderr,"\x1b[H\x1b[2J"); - a[0x0]=" "; - a[0x1]="- "; - a[0x2]=" -"; - a[0x3]="---"; - a[0x4]=" . "; - a[0x5]="-. "; - a[0x6]=" .-"; - a[0x7]="-.-"; - a[0x8]=" ' "; - a[0x9]="-' "; - a[0xa]=" '-"; - a[0xb]="-'-"; - a[0xc]=" | "; - a[0xd]="-| "; - a[0xe]=" |-"; - a[0xf]="-|-"; - while(read(0,field,sizeof(field)) > 0) { - print_field(); - sleep(1); - } -} diff --git a/share/hackvr/examples/dungen/dun2hackvr.c b/share/hackvr/examples/dungen/dun2hackvr.c deleted file mode 100644 index b67af14..0000000 --- a/share/hackvr/examples/dungen/dun2hackvr.c +++ /dev/null @@ -1,59 +0,0 @@ -#include -#include -#include - -//nsew -char field[256]; - -#define NORTH_EXIT 8 -#define SOUTH_EXIT 4 -#define EAST_EXIT 2 -#define WEST_EXIT 1 - -int deg[]={0,180,270,90}; -int doorx[]={}; -int doory[]={}; - -void print_field() { - int i,d; - int x,y; - for(i=0;i<256;i++) { - //we need to draw the room here. - //each room will be... 16x16? sure.... - //we can use bitmasks to find which sides of the room need to be whole walls - //and which will contain passages to the next rooms - //whole walls are a single rectangle - //we need to loop over each wall and check if it has a passage through it - if(field[i]) { - for(d=0;d<4;d++) {//loop over the 4 possible directions/walls - x=(i%16) * 16 - (7 * 16); - y=(i/16) * -16 + 16; - if((field[i] & (1<<(3-d))) > 0) {//if this has an exit in this bit... - printf("wall_%d_%d addshape 2 4 -7 0 7 -7 8 7 -2 8 7 -2 0 7\n",i,d);//we need 4 parts for the doorway - printf("wall_%d_%d addshape 2 4 2 0 7 2 8 7 7 8 7 7 0 7\n",i,d); - if(d % 2) {//only do the south and west doorjams. every door has an opposite door that matches it anyway - printf("wall_%d_%d addshape 2 4 -2 0 7 -2 8 7 -2 8 9 -2 0 9\n",i,d); - printf("wall_%d_%d addshape 2 4 2 0 9 2 8 9 2 8 7 2 0 7\n",i,d); - printf("door_close_%d_%d addshape 3 4 0 0 0 0 8 0 4 8 0 4 0 0\n",i,d);//door needs to be built to where its hinge is at 0,y,0, then moved into place so opening will work. - printf("door_close_%d_%d rotate 0 %d 0\n",i,d,deg[d]); - if(d == 1) printf("door_close_%d_%d move %d 0 %d\n",i,d,x+2,y-8); - if(d == 3) printf("door_close_%d_%d move %d 0 %d\n",i,d,x-8,y-2); - } - } else {//no door in this wall - printf("wall_%d_%d addshape 2 4 -7 0 7 -7 8 7 7 8 7 7 0 7\n",i,d);//solid wall - } - printf("wall_%d_%d rotate 0 %d 0\n",i,d,deg[d]);//rotate this wall into position - printf("wall_%d_%d move %d 0 %d\n",i,d,x,y);//and put it in the right spot ofc - //the door needs to move either -2, +8 - } - } - } -} - -int main(int argc,char *argv[]) { - if(read(0,field,sizeof(field)) > 0) { - print_field(); - return 0; - } - return 1; -} diff --git a/share/hackvr/examples/dungen/dunexplore.sh b/share/hackvr/examples/dungen/dunexplore.sh deleted file mode 100755 index 6fbd5c3..0000000 --- a/share/hackvr/examples/dungen/dunexplore.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -### run me with hackvr_coproc -#the $USER triangle we add first is to give us some sort of avatar to see where the camera is. -#seed=1337 -red=1 -green=2 -blue=4 -echo $USER addshape 6 3 -1 0 -1 0 0 2 1 0 -1 ; echo $USER move 0 2 0 -echo world-x addshape $red 2 0 0 0 1 0 0 -echo world-y addshape $green 2 0 0 0 0 1 0 -echo world-z addshape $blue 2 0 0 0 0 0 1 -./dungen $seed | ./dun2hackvr -while read group action target;do - if [ "$action" = "action" ];then - if printf "%s\n" "${target}" | grep ^door_;then - printf "# clicked a door! %s\n" "${target}" >&2 - if printf "%s\n" "${target}" | grep ^door_open;then - tmp=$(printf "%s\n" "${target}" | sed 's/_open/_CLOSING/') - printf "%s renamegroup %s %s\n" ${target} ${target} ${tmp} - ( - for i in $(seq 1 5 90);do - printf "%s rotate 0 +5 0\n" ${tmp} - sleep .1 - done - tmp2=$(printf "%s\n" "${target}" | sed 's/_open/_close/') - printf "%s renamegroup %s %s\n" ${tmp} ${tmp} ${tmp2} - ) & - elif printf "%s\n" "${target}" | grep ^door_close;then - tmp=$(printf "%s\n" "${target}" | sed 's/_close/_OPENING/') - printf "%s renamegroup %s %s\n" ${target} ${target} ${tmp} - ( - for i in $(seq 1 5 90);do - printf "%s rotate 0 +-5 0\n" ${tmp} - sleep .1 - done - tmp2=$(printf "%s\n" "${target}" | sed 's/_close/_open/') - printf "%s renamegroup %s %s\n" ${tmp} ${tmp} ${tmp2} - ) & - fi - fi - fi -done diff --git a/share/hackvr/examples/dungen/dungen.c b/share/hackvr/examples/dungen/dungen.c deleted file mode 100644 index 738b395..0000000 --- a/share/hackvr/examples/dungen/dungen.c +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include -#include -#include -#include - -#define ITERATIONS 16 - -char field[256]; -char nfield[256]; - -void prune() {//remove paths into wall - int i; - memcpy(nfield,field,256);//make a copy just for comparison - for(i=0;i<256;i++) { - if(i%16 == 0) field[i] &= ~0x1;//remove all left exits at left of map - else if((field[i]&0x1) && !(nfield[i-1]&0x2)) field[i] &= ~0x1; - if(i%16 == 15) field[i] &= ~0x2;//remove all right exits at right of map. - else if((field[i]&0x2) && !(nfield[i+1]&0x1)) field[i] &= ~0x2; - if(i > 240) field[i] &= ~0x4; - else if((field[i]&0x4) && !(nfield[i+16]&0x8)) field[i] &= ~0x4; - if(i < 16) field[i] &= ~0x8; - else if((field[i]&0x8) && !(nfield[i-16]&0x4)) field[i] &= ~0x8; - } -} - -void grow() { - int i=0; - memcpy(nfield,field,256); - for(i=0;i<256;i++) { - if(random() % 2 == 0) { - if((field[i]&0x1) && !nfield[i-1] && i%16 != 0) nfield[i-1]=random()%16 | 0x2; - if((field[i]&0x2) && !nfield[i+1] && i%16 != 15) nfield[i+1]=random()%16 | 0x1; - if((field[i]&0x4) && !nfield[i+16] && i<240) nfield[i+16]=random()%16 | 0x8; - if((field[i]&0x8) && !nfield[i-16] && i>16) nfield[i-16]=random()%16 | 0x4; - } - } - memcpy(field,nfield,256); -} - -void dump() { - int i; - write(1,field,sizeof(field)); -} - -int main(int argc,char *argv[]) { - int i; - int seed=time(0) * getpid(); - if(argc > 1) { - seed=atoi(argv[1]); - } - srandom(seed); - field[7+16] = 0x4;//center top - for(i=0;i 2) dump(); - grow(); - } - prune(); - dump(); -// fprintf(stderr,"seed: %d\n",seed); -} diff --git a/share/hackvr/examples/editor/editor.sh b/share/hackvr/examples/editor/editor.sh deleted file mode 100755 index e8ae65e..0000000 --- a/share/hackvr/examples/editor/editor.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -cat p | hackvr $USER \ - | stdbuf -oL tr -s ' ' \ - | grep --line-buffered "^[^ ][^ ]* action " \ - | stdbuf -oL cut '-d ' -f3 \ - | xargs -L1 printf "epoch control %s\n" > p diff --git a/share/hackvr/examples/fib.sh b/share/hackvr/examples/fib.sh deleted file mode 100755 index c1d87ab..0000000 --- a/share/hackvr/examples/fib.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -z=0 -a=1 -b=1 - -for i in $(seq 1 10);do - if [ $[$i % 2] = 0 ];then - x=$[$z] - y=0 - else - x=0 - y=$[$z] - fi - - w=$a - h=$a - - echo fib_$a addshape 2 4 $x $y 0 $[$x+$w] $y 0 $[$x+$w] $[$y+$h] 0 $x $[$y+$h] 0 - z=$a - s=$[$a+$b] - a=$b - b=$s - -done diff --git a/share/hackvr/examples/filebrowser/action_to_target.sh b/share/hackvr/examples/filebrowser/action_to_target.sh deleted file mode 100755 index 2abbe58..0000000 --- a/share/hackvr/examples/filebrowser/action_to_target.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -#this script gets the action lines that hackvr outputs and turns them into as normal of a string as possible -#for the backend script to use. -#so hex encoded strings need to be unencoded before they leave here. -#the hex encoded strings don't have a newline at the end. we need to add one. see xargs printf "%s0a" -grep --line-buffered ^USER \ - | stdbuf -oL cut '-d ' -f2- \ - | grep --line-buffered ^action \ - | stdbuf -oL cut '-d ' -f2- \ - | xargs -L1 printf "%s0a\n" \ - | stdbuf -oL xxd -r -p diff --git a/share/hackvr/examples/filebrowser/backend-filebrowser.sh b/share/hackvr/examples/filebrowser/backend-filebrowser.sh deleted file mode 100755 index 7fdfc2e..0000000 --- a/share/hackvr/examples/filebrowser/backend-filebrowser.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -#give a list of files. -#wait for a selection on stdin -#cd or start that file -#repeat. -while true;do -#not sure why this needs to be printed to show up every time. - echo .. - find . -maxdepth 1 #| tr ' ' '\n' #wut? no? - read -r selection - if [ -f "$selection" ];then - xdg-open "$selection" #good enough? - fi - if [ -d "$selection" ];then - cd "$selection" - fi - echo -done diff --git a/share/hackvr/examples/filebrowser/backend-gopher.sh b/share/hackvr/examples/filebrowser/backend-gopher.sh deleted file mode 100755 index fe73755..0000000 --- a/share/hackvr/examples/filebrowser/backend-gopher.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -#give a list of files. -#wait for a selection on stdin -#cd or start that file -#repeat. -server=$1 -${server:="gopher.hacking.allowed.org"} -#gopher.hacking.allowed.org -port=70 -selection=/ -while true;do -#not sure why this needs to be printed to show up every time. - printf "/\n" - printf '%s\n' "$selection" | ncat "$server" "$port" | tee /dev/stderr | grep -v ^i | cut -f2 | tr -d '\r' -### need to ask user for input in the form of a pop-up window if the selected target was of type 7 - read -r selection - if [ "_" = "_$selection" ];then - echo "looks like there's nothing here. exiting." >&2 - exit 1 - fi - echo -done diff --git a/share/hackvr/examples/filebrowser/backend-ps.sh b/share/hackvr/examples/filebrowser/backend-ps.sh deleted file mode 100755 index ac1eb47..0000000 --- a/share/hackvr/examples/filebrowser/backend-ps.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -#give a list of files. -#wait for a selection on stdin -#cd or start that file -#repeat. -while true