From 6c4fe3323d79253af707df90623e433ce12c35f2 Mon Sep 17 00:00:00 2001 From: scarab Date: Sat, 5 Jul 2008 16:43:55 +0000 Subject: * Prechod na novou verzi instalace pseudoautotools -> cmake * Odstraneni bordelu kterej tu byl (pokud vam neco chybi brecte na me ja to zkusim najit v zaloze) * TODO instalace: SEPSAT AUTORY, IKONKU VYROBIT git-svn-id: http://opensvn.csie.org/tuxanci_ng@94 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- CMakeLists.txt | 92 +++++ Makefile | 75 ---- README.sk | 109 ------ arena/ba_in_a_captivity_of_8-bit.map | 107 ------ arena/construction_site.map | 27 -- arena/for_a_good_night.map | 23 -- arena/in_a_captivity_of_8-bit.map | 31 -- arena/night_workshift.map | 35 -- build.sh | 31 -- cmake/Po.cmake | 54 +++ cmake_uninstall.cmake.in | 21 + conf/keytable.conf | 273 ------------- control | 12 - current_config.h | 1 - data/AUTHORS | 0 data/LICENCE | 345 +++++++++++++++++ data/README.sk | 109 ++++++ data/arena/ba_in_a_captivity_of_8-bit.map | 107 ++++++ data/arena/construction_site.map | 27 ++ data/arena/for_a_good_night.map | 23 ++ data/arena/in_a_captivity_of_8-bit.map | 31 ++ data/arena/night_workshift.map | 35 ++ data/conf/keytable.conf | 273 +++++++++++++ data/conf/server.conf | 7 + data/font/DejaVuSans.ttf | Bin 0 -> 124884 bytes data/image/ba_in_a_captivity_of_8-bit.png | Bin 0 -> 9847 bytes data/image/big-explosion.png | Bin 0 -> 68479 bytes data/image/bombball.png | Bin 0 -> 510 bytes data/image/button0.png | Bin 0 -> 2592 bytes data/image/button1.png | Bin 0 -> 2956 bytes data/image/check.png | Bin 0 -> 2737 bytes data/image/construction_site.png | Bin 0 -> 69255 bytes data/image/cross.png | Bin 0 -> 2204 bytes data/image/explosion.png | Bin 0 -> 17959 bytes data/image/for_a_good_night.png | Bin 0 -> 69784 bytes data/image/graf.bonus.png | Bin 0 -> 1202 bytes data/image/icon.bonus.4x.png | Bin 0 -> 590 bytes data/image/icon.bonus.ghost.png | Bin 0 -> 502 bytes data/image/icon.bonus.hidden.png | Bin 0 -> 940 bytes data/image/icon.bonus.shot.png | Bin 0 -> 1019 bytes data/image/icon.bonus.speed.png | Bin 0 -> 928 bytes data/image/icon.bonus.teleport.png | Bin 0 -> 891 bytes data/image/icon.gun.bombball.png | Bin 0 -> 1528 bytes data/image/icon.gun.dual.simple.png | Bin 0 -> 1314 bytes data/image/icon.gun.lasser.png | Bin 0 -> 727 bytes data/image/icon.gun.mine.png | Bin 0 -> 1116 bytes data/image/icon.gun.scatter.png | Bin 0 -> 869 bytes data/image/icon.gun.simple.png | Bin 0 -> 761 bytes data/image/icon.gun.tommy.png | Bin 0 -> 1298 bytes data/image/in_a_captivity_of_8-bit.png | Bin 0 -> 10085 bytes data/image/item.bombball.png | Bin 0 -> 3788 bytes data/image/item.bonus.4x.png | Bin 0 -> 1045 bytes data/image/item.bonus.ghost.png | Bin 0 -> 1078 bytes data/image/item.bonus.hidden.png | Bin 0 -> 1812 bytes data/image/item.bonus.shot.png | Bin 0 -> 1687 bytes data/image/item.bonus.speed.png | Bin 0 -> 1486 bytes data/image/item.bonus.teleport.png | Bin 0 -> 1363 bytes data/image/item.dual.png | Bin 0 -> 1944 bytes data/image/item.lasser.png | Bin 0 -> 1200 bytes data/image/item.mine.png | Bin 0 -> 1612 bytes data/image/item.scatter.png | Bin 0 -> 1237 bytes data/image/item.tommy.png | Bin 0 -> 2486 bytes data/image/l1.grow.png | Bin 0 -> 170671 bytes data/image/l1.hut.png | Bin 0 -> 65499 bytes data/image/l1.peduncle.png | Bin 0 -> 15239 bytes data/image/l1.tree.png | Bin 0 -> 66388 bytes data/image/l1.wood.png | Bin 0 -> 14764 bytes data/image/l2.barel.png | Bin 0 -> 23817 bytes data/image/l2.nadrz.png | Bin 0 -> 49503 bytes data/image/l2.pitch.png | Bin 0 -> 789030 bytes data/image/l2.potrubi.png | Bin 0 -> 47152 bytes data/image/l2.retez.png | Bin 0 -> 41687 bytes data/image/l2.trubka2.png | Bin 0 -> 4658 bytes data/image/l2.trubka4.png | Bin 0 -> 3892 bytes data/image/l2.trubka6.png | Bin 0 -> 5778 bytes data/image/l2.trubka8.png | Bin 0 -> 5906 bytes data/image/l2.trubky.png | Bin 0 -> 15349 bytes data/image/l3.ihlan.png | Bin 0 -> 24543 bytes data/image/l3.kvader1.png | Bin 0 -> 5458 bytes data/image/l3.kvader2.png | Bin 0 -> 18573 bytes data/image/l3.nic.png | Bin 0 -> 44575 bytes data/image/l3.teleport.png | Bin 0 -> 1043 bytes data/image/l4.anim.blikacka.png | Bin 0 -> 4499 bytes data/image/l4.bagr.png | Bin 0 -> 38796 bytes data/image/l4.overlay.png | Bin 0 -> 69708 bytes data/image/l4.palety.png | Bin 0 -> 30513 bytes data/image/l4.pozadi.png | Bin 0 -> 773685 bytes data/image/l4.pytle.png | Bin 0 -> 15128 bytes data/image/l4.tvarnice.png | Bin 0 -> 8289 bytes data/image/lasserX.png | Bin 0 -> 167 bytes data/image/lasserY.png | Bin 0 -> 163 bytes data/image/level4.png | Bin 0 -> 41126 bytes data/image/mine.png | Bin 0 -> 697 bytes data/image/naboj.png | Bin 0 -> 139 bytes data/image/night_workshift.png | Bin 0 -> 42982 bytes data/image/panel.png | Bin 0 -> 11260 bytes data/image/panel_shot.png | Bin 0 -> 139 bytes data/image/pokus.png | Bin 0 -> 223 bytes data/image/radar.png | Bin 0 -> 314 bytes data/image/screen_main.png | Bin 0 -> 129909 bytes data/image/screen_table.png | Bin 0 -> 170783 bytes data/image/shot.png | Bin 0 -> 123 bytes data/image/textfield0.png | Bin 0 -> 2661 bytes data/image/textfield1.png | Bin 0 -> 3594 bytes data/image/tux2.png | Bin 0 -> 28339 bytes data/image/tux4.png | Bin 0 -> 12596 bytes data/image/tux6.png | Bin 0 -> 22249 bytes data/image/tux8.png | Bin 0 -> 16558 bytes data/image/tuxanci.png | Bin 0 -> 1697 bytes data/lang/CMakeLists.txt | 6 + data/lang/cs.lang | 46 +++ data/lang/en.lang | 46 +++ data/lang/fr.lang | 39 ++ data/lang/sk.lang | 46 +++ data/music/for_a_good_night.ogg | Bin 0 -> 319720 bytes data/music/in_a_captivity_of_8-bit.ogg | Bin 0 -> 129990 bytes data/music/menu.ogg | Bin 0 -> 140527 bytes data/music/night_workshift.ogg | Bin 0 -> 119222 bytes data/sound/dead.ogg | Bin 0 -> 17112 bytes data/sound/end.ogg | Bin 0 -> 153633 bytes data/sound/explozion.ogg | Bin 0 -> 15987 bytes data/sound/gun2.ogg | Bin 0 -> 4789 bytes data/sound/gun_lasser.ogg | Bin 0 -> 8348 bytes data/sound/gun_revolver.ogg | Bin 0 -> 9460 bytes data/sound/gun_scatter.ogg | Bin 0 -> 10303 bytes data/sound/gun_tommy.ogg | Bin 0 -> 7441 bytes data/sound/item_bonus.ogg | Bin 0 -> 7339 bytes data/sound/item_gun.ogg | Bin 0 -> 4604 bytes data/sound/odraz-gun.ogg | Bin 0 -> 14901 bytes data/sound/odraz-l.ogg | Bin 0 -> 13561 bytes data/sound/odraz-r.ogg | Bin 0 -> 13581 bytes data/sound/put_mine.ogg | Bin 0 -> 5463 bytes data/sound/smrt.ogg | Bin 0 -> 8545 bytes data/sound/switch_gun.ogg | Bin 0 -> 6401 bytes data/sound/teleport.ogg | Bin 0 -> 20232 bytes data/sound/tuxanci-smrt.ogg | Bin 0 -> 17112 bytes data/tuxanci-ng.desktop | 9 + deb-build.sh | 33 -- deb_config.h | 3 - font/DejaVuSans.ttf | Bin 124884 -> 0 bytes image/ba_in_a_captivity_of_8-bit.png | Bin 9847 -> 0 bytes image/big-explosion.png | Bin 68479 -> 0 bytes image/bombball.png | Bin 510 -> 0 bytes image/button0.png | Bin 2592 -> 0 bytes image/button1.png | Bin 2956 -> 0 bytes image/check.png | Bin 2737 -> 0 bytes image/construction_site.png | Bin 69255 -> 0 bytes image/cross.png | Bin 2204 -> 0 bytes image/explosion.png | Bin 17959 -> 0 bytes image/for_a_good_night.png | Bin 69784 -> 0 bytes image/graf.bonus.png | Bin 1202 -> 0 bytes image/icon.bonus.4x.png | Bin 590 -> 0 bytes image/icon.bonus.ghost.png | Bin 502 -> 0 bytes image/icon.bonus.hidden.png | Bin 940 -> 0 bytes image/icon.bonus.shot.png | Bin 1019 -> 0 bytes image/icon.bonus.speed.png | Bin 928 -> 0 bytes image/icon.bonus.teleport.png | Bin 891 -> 0 bytes image/icon.gun.bombball.png | Bin 1528 -> 0 bytes image/icon.gun.dual.simple.png | Bin 1314 -> 0 bytes image/icon.gun.lasser.png | Bin 727 -> 0 bytes image/icon.gun.mine.png | Bin 1116 -> 0 bytes image/icon.gun.scatter.png | Bin 869 -> 0 bytes image/icon.gun.simple.png | Bin 761 -> 0 bytes image/icon.gun.tommy.png | Bin 1298 -> 0 bytes image/in_a_captivity_of_8-bit.png | Bin 10085 -> 0 bytes image/item.bombball.png | Bin 3788 -> 0 bytes image/item.bonus.4x.png | Bin 1045 -> 0 bytes image/item.bonus.ghost.png | Bin 1078 -> 0 bytes image/item.bonus.hidden.png | Bin 1812 -> 0 bytes image/item.bonus.shot.png | Bin 1687 -> 0 bytes image/item.bonus.speed.png | Bin 1486 -> 0 bytes image/item.bonus.teleport.png | Bin 1363 -> 0 bytes image/item.dual.png | Bin 1944 -> 0 bytes image/item.lasser.png | Bin 1200 -> 0 bytes image/item.mine.png | Bin 1612 -> 0 bytes image/item.scatter.png | Bin 1237 -> 0 bytes image/item.tommy.png | Bin 2486 -> 0 bytes image/l1.grow.png | Bin 170671 -> 0 bytes image/l1.hut.png | Bin 65499 -> 0 bytes image/l1.peduncle.png | Bin 15239 -> 0 bytes image/l1.tree.png | Bin 66388 -> 0 bytes image/l1.wood.png | Bin 14764 -> 0 bytes image/l2.barel.png | Bin 23817 -> 0 bytes image/l2.nadrz.png | Bin 49503 -> 0 bytes image/l2.pitch.png | Bin 789030 -> 0 bytes image/l2.potrubi.png | Bin 47152 -> 0 bytes image/l2.retez.png | Bin 41687 -> 0 bytes image/l2.trubka2.png | Bin 4658 -> 0 bytes image/l2.trubka4.png | Bin 3892 -> 0 bytes image/l2.trubka6.png | Bin 5778 -> 0 bytes image/l2.trubka8.png | Bin 5906 -> 0 bytes image/l2.trubky.png | Bin 15349 -> 0 bytes image/l3.ihlan.png | Bin 24543 -> 0 bytes image/l3.kvader1.png | Bin 5458 -> 0 bytes image/l3.kvader2.png | Bin 18573 -> 0 bytes image/l3.nic.png | Bin 44575 -> 0 bytes image/l3.teleport.png | Bin 1043 -> 0 bytes image/l4.anim.blikacka.png | Bin 4499 -> 0 bytes image/l4.bagr.png | Bin 38796 -> 0 bytes image/l4.overlay.png | Bin 69708 -> 0 bytes image/l4.palety.png | Bin 30513 -> 0 bytes image/l4.pozadi.png | Bin 773685 -> 0 bytes image/l4.pytle.png | Bin 15128 -> 0 bytes image/l4.tvarnice.png | Bin 8289 -> 0 bytes image/lasserX.png | Bin 167 -> 0 bytes image/lasserY.png | Bin 163 -> 0 bytes image/level4.png | Bin 41126 -> 0 bytes image/mine.png | Bin 697 -> 0 bytes image/naboj.png | Bin 139 -> 0 bytes image/night_workshift.png | Bin 42982 -> 0 bytes image/panel.png | Bin 11260 -> 0 bytes image/panel_shot.png | Bin 139 -> 0 bytes image/pokus.png | Bin 223 -> 0 bytes image/radar.png | Bin 314 -> 0 bytes image/screen_main.png | Bin 129909 -> 0 bytes image/screen_table.png | Bin 170783 -> 0 bytes image/shot.png | Bin 123 -> 0 bytes image/textfield0.png | Bin 2661 -> 0 bytes image/textfield1.png | Bin 3594 -> 0 bytes image/tux2.png | Bin 28339 -> 0 bytes image/tux4.png | Bin 12596 -> 0 bytes image/tux6.png | Bin 22249 -> 0 bytes image/tux8.png | Bin 16558 -> 0 bytes image/tuxanci.png | Bin 1697 -> 0 bytes include/arena.h | 43 --- include/arenaFile.h | 21 - include/audio.h | 12 - include/bool.h | 13 - include/buffer.h | 24 -- include/checkFront.h | 22 -- include/client.h | 35 -- include/configFile.h | 20 - include/director.h | 18 - include/dynamicInt.h | 10 - include/fake_audio.h | 41 -- include/font.h | 26 -- include/game.h | 9 - include/gun.h | 21 - include/hashTable.h | 24 -- include/heightScore.h | 13 - include/homeDirector.h | 13 - include/idManager.h | 19 - include/image.h | 35 -- include/interface.h | 40 -- include/item.h | 79 ---- include/keytable.h | 27 -- include/language.h | 12 - include/layer.h | 53 --- include/list.h | 33 -- include/logFile.h | 18 - include/main.h | 35 -- include/modules.h | 78 ---- include/music.h | 36 -- include/myTimer.h | 32 -- include/net_multiplayer.h | 35 -- include/network.h | 12 - include/panel.h | 27 -- include/path.h | 33 -- include/protect.h | 30 -- include/proto.h | 89 ----- include/publicServer.h | 18 - include/screen.h | 32 -- include/screen_analyze.h | 25 -- include/screen_choiceArena.h | 17 - include/screen_credits.h | 20 - include/screen_gameType.h | 15 - include/screen_mainMenu.h | 13 - include/screen_setting.h | 18 - include/screen_table.h | 17 - include/screen_world.h | 31 -- include/sdl_udp.h | 28 -- include/server.h | 94 ----- include/serverConfigFile.h | 11 - include/shot.h | 60 --- include/sound.h | 33 -- include/space.h | 38 -- include/storage.h | 16 - include/string_length.h | 16 - include/tcp.h | 25 -- include/term.h | 17 - include/textFile.h | 21 - include/tux.h | 137 ------- include/udp.h | 34 -- include/widget_button.h | 27 -- include/widget_buttonimage.h | 27 -- include/widget_check.h | 27 -- include/widget_image.h | 21 - include/widget_label.h | 24 -- include/widget_select.h | 26 -- include/widget_textfield.h | 33 -- lang/cs.lang | 46 --- lang/en.lang | 46 --- lang/fr.lang | 39 -- lang/sk.lang | 46 --- modules/Makefile | 28 -- modules/Makefile-publicserver | 24 -- modules/list.c | 241 ------------ modules/list.h | 33 -- modules/modAI.c | 256 ------------- modules/modPipe.c | 453 ---------------------- modules/modTeleport.c | 506 ------------------------ modules/modWall.c | 343 ----------------- modules/space.c | 615 ------------------------------ modules/space.h | 38 -- music/for_a_good_night.ogg | Bin 319720 -> 0 bytes music/in_a_captivity_of_8-bit.ogg | Bin 129990 -> 0 bytes music/menu.ogg | Bin 140527 -> 0 bytes music/night_workshift.ogg | Bin 119222 -> 0 bytes packaging/deb/control | 12 - packaging/deb/deb-build.sh | 41 -- packaging/deb/r | 2 - packaging/deb/tuxanci-ng.desktop | 9 - path_config.h | 2 - publicserver.sh | 5 - r | 1 - readme.txt | 6 - server.conf | 7 - sound/dead.ogg | Bin 17112 -> 0 bytes sound/end.ogg | Bin 153633 -> 0 bytes sound/explozion.ogg | Bin 15987 -> 0 bytes sound/gun2.ogg | Bin 4789 -> 0 bytes sound/gun_lasser.ogg | Bin 8348 -> 0 bytes sound/gun_revolver.ogg | Bin 9460 -> 0 bytes sound/gun_scatter.ogg | Bin 10303 -> 0 bytes sound/gun_tommy.ogg | Bin 7441 -> 0 bytes sound/item_bonus.ogg | Bin 7339 -> 0 bytes sound/item_gun.ogg | Bin 4604 -> 0 bytes sound/odraz-gun.ogg | Bin 14901 -> 0 bytes sound/odraz-l.ogg | Bin 13561 -> 0 bytes sound/odraz-r.ogg | Bin 13581 -> 0 bytes sound/put_mine.ogg | Bin 5463 -> 0 bytes sound/smrt.ogg | Bin 8545 -> 0 bytes sound/switch_gun.ogg | Bin 6401 -> 0 bytes sound/teleport.ogg | Bin 20232 -> 0 bytes sound/tuxanci-smrt.ogg | Bin 17112 -> 0 bytes src/CMakeLists.txt | 84 ++++ src/Makefile | 29 -- src/Makefile-nosound | 28 -- src/Makefile-sdlnet | 29 -- src/Makefile-server | 26 -- src/audio/Makefile | 17 - src/audio/audio.c | 6 +- src/audio/audio.h | 2 +- src/audio/music.c | 12 +- src/audio/music.h | 2 +- src/audio/sound.c | 12 +- src/audio/sound.h | 2 +- src/base/Makefile | 70 ---- src/base/arena.c | 20 +- src/base/arena.h | 8 +- src/base/arenaFile.c | 26 +- src/base/arenaFile.h | 4 +- src/base/checkFront.c | 12 +- src/base/checkFront.h | 4 +- src/base/director.c | 4 +- src/base/director.h | 4 +- src/base/gun.c | 28 +- src/base/homeDirector.c | 4 +- src/base/homeDirector.h | 2 +- src/base/idManager.c | 6 +- src/base/idManager.h | 2 +- src/base/item.c | 32 +- src/base/item.h | 10 +- src/base/list.c | 4 +- src/base/list.h | 2 +- src/base/main.c | 8 +- src/base/main.h | 8 +- src/base/modules.c | 24 +- src/base/modules.h | 12 +- src/base/myTimer.c | 8 +- src/base/myTimer.h | 4 +- src/base/net_multiplayer.c | 26 +- src/base/net_multiplayer.h | 8 +- src/base/path.h | 6 +- src/base/protect.c | 6 +- src/base/protect.h | 4 +- src/base/proto.c | 48 +-- src/base/proto.h | 28 +- src/base/server.c | 30 +- src/base/server.h | 14 +- src/base/shot.c | 20 +- src/base/shot.h | 10 +- src/base/storage.h | 4 +- src/base/string_length.h | 2 +- src/base/textFile.c | 4 +- src/base/textFile.h | 2 +- src/base/tux.c | 38 +- src/base/tux.h | 6 +- src/client/Makefile | 38 -- src/client/client.c | 20 +- src/client/client.h | 2 +- src/client/configFile.c | 4 +- src/client/configFile.h | 4 +- src/client/font.c | 6 +- src/client/font.h | 2 +- src/client/game.c | 60 +-- src/client/image.c | 10 +- src/client/image.h | 4 +- src/client/interface.c | 8 +- src/client/interface.h | 2 +- src/client/keytable.c | 12 +- src/client/language.c | 12 +- src/client/layer.c | 14 +- src/client/layer.h | 2 +- src/client/panel.c | 16 +- src/client/panel.h | 4 +- src/client/radar.c | 16 +- src/client/radar.h | 2 +- src/client/screen.c | 10 +- src/client/screen.h | 2 +- src/client/term.c | 12 +- src/client/term.h | 2 +- src/modules/CMakeLists.txt | 52 +++ src/modules/Makefile | 31 -- src/modules/modAI.c | 20 +- src/modules/modPipe.c | 20 +- src/modules/modTeleport.c | 20 +- src/modules/modWall.c | 20 +- src/net/dns.c | 19 + src/net/dns.h | 8 + src/net/udp.c | 374 ++++++++++++++++++ src/net/udp.h | 31 ++ src/net_sdl/Makefile | 9 - src/net_sdl/sdl_udp.c | 219 ----------- src/net_sdl/sdl_udp.h | 28 -- src/net_unix/Makefile | 12 - src/net_unix/dns.c | 19 - src/net_unix/dns.h | 8 - src/net_unix/udp.c | 374 ------------------ src/net_unix/udp.h | 31 -- src/screen/Makefile | 31 -- src/screen/screen_analyze.c | 22 +- src/screen/screen_analyze.h | 2 +- src/screen/screen_browser.c | 36 +- src/screen/screen_choiceArena.c | 28 +- src/screen/screen_choiceArena.h | 2 +- src/screen/screen_credits.c | 24 +- src/screen/screen_gameType.c | 32 +- src/screen/screen_gameType.h | 2 +- src/screen/screen_mainMenu.c | 28 +- src/screen/screen_mainMenu.h | 2 +- src/screen/screen_setting.c | 44 +-- src/screen/screen_setting.h | 2 +- src/screen/screen_table.c | 26 +- src/screen/screen_world.c | 64 ++-- src/screen/screen_world.h | 8 +- src/server/Makefile | 15 - src/server/heightScore.c | 8 +- src/server/publicServer.c | 36 +- src/server/publicServer.h | 2 +- src/server/serverConfigFile.c | 8 +- src/widget/Makefile | 28 -- src/widget/widget_button.c | 8 +- src/widget/widget_button.h | 2 +- src/widget/widget_buttonimage.c | 8 +- src/widget/widget_buttonimage.h | 2 +- src/widget/widget_check.c | 6 +- src/widget/widget_check.h | 2 +- src/widget/widget_image.c | 8 +- src/widget/widget_image.h | 4 +- src/widget/widget_label.c | 6 +- src/widget/widget_label.h | 2 +- src/widget/widget_select.c | 6 +- src/widget/widget_select.h | 4 +- src/widget/widget_textfield.c | 8 +- src/widget/widget_textfield.h | 2 +- tarball-build.sh | 33 -- tarballbin-build.sh | 31 -- tuxanci-ng.desktop | 9 - tuxanci-ng.sh | 5 - 470 files changed, 2523 insertions(+), 7327 deletions(-) create mode 100644 CMakeLists.txt delete mode 100644 Makefile delete mode 100644 README.sk delete mode 100644 arena/ba_in_a_captivity_of_8-bit.map delete mode 100644 arena/construction_site.map delete mode 100644 arena/for_a_good_night.map delete mode 100644 arena/in_a_captivity_of_8-bit.map delete mode 100644 arena/night_workshift.map delete mode 100755 build.sh create mode 100644 cmake/Po.cmake create mode 100644 cmake_uninstall.cmake.in delete mode 100755 conf/keytable.conf delete mode 100644 control delete mode 100644 current_config.h create mode 100644 data/AUTHORS create mode 100644 data/LICENCE create mode 100644 data/README.sk create mode 100644 data/arena/ba_in_a_captivity_of_8-bit.map create mode 100644 data/arena/construction_site.map create mode 100644 data/arena/for_a_good_night.map create mode 100644 data/arena/in_a_captivity_of_8-bit.map create mode 100644 data/arena/night_workshift.map create mode 100755 data/conf/keytable.conf create mode 100644 data/conf/server.conf create mode 100755 data/font/DejaVuSans.ttf create mode 100644 data/image/ba_in_a_captivity_of_8-bit.png create mode 100644 data/image/big-explosion.png create mode 100755 data/image/bombball.png create mode 100644 data/image/button0.png create mode 100644 data/image/button1.png create mode 100644 data/image/check.png create mode 100644 data/image/construction_site.png create mode 100644 data/image/cross.png create mode 100644 data/image/explosion.png create mode 100644 data/image/for_a_good_night.png create mode 100644 data/image/graf.bonus.png create mode 100644 data/image/icon.bonus.4x.png create mode 100644 data/image/icon.bonus.ghost.png create mode 100644 data/image/icon.bonus.hidden.png create mode 100644 data/image/icon.bonus.shot.png create mode 100644 data/image/icon.bonus.speed.png create mode 100644 data/image/icon.bonus.teleport.png create mode 100755 data/image/icon.gun.bombball.png create mode 100644 data/image/icon.gun.dual.simple.png create mode 100644 data/image/icon.gun.lasser.png create mode 100644 data/image/icon.gun.mine.png create mode 100644 data/image/icon.gun.scatter.png create mode 100644 data/image/icon.gun.simple.png create mode 100644 data/image/icon.gun.tommy.png create mode 100644 data/image/in_a_captivity_of_8-bit.png create mode 100755 data/image/item.bombball.png create mode 100644 data/image/item.bonus.4x.png create mode 100644 data/image/item.bonus.ghost.png create mode 100644 data/image/item.bonus.hidden.png create mode 100644 data/image/item.bonus.shot.png create mode 100644 data/image/item.bonus.speed.png create mode 100644 data/image/item.bonus.teleport.png create mode 100644 data/image/item.dual.png create mode 100644 data/image/item.lasser.png create mode 100644 data/image/item.mine.png create mode 100644 data/image/item.scatter.png create mode 100644 data/image/item.tommy.png create mode 100644 data/image/l1.grow.png create mode 100644 data/image/l1.hut.png create mode 100644 data/image/l1.peduncle.png create mode 100644 data/image/l1.tree.png create mode 100644 data/image/l1.wood.png create mode 100644 data/image/l2.barel.png create mode 100644 data/image/l2.nadrz.png create mode 100644 data/image/l2.pitch.png create mode 100644 data/image/l2.potrubi.png create mode 100644 data/image/l2.retez.png create mode 100644 data/image/l2.trubka2.png create mode 100644 data/image/l2.trubka4.png create mode 100644 data/image/l2.trubka6.png create mode 100644 data/image/l2.trubka8.png create mode 100644 data/image/l2.trubky.png create mode 100644 data/image/l3.ihlan.png create mode 100644 data/image/l3.kvader1.png create mode 100644 data/image/l3.kvader2.png create mode 100644 data/image/l3.nic.png create mode 100644 data/image/l3.teleport.png create mode 100644 data/image/l4.anim.blikacka.png create mode 100644 data/image/l4.bagr.png create mode 100644 data/image/l4.overlay.png create mode 100644 data/image/l4.palety.png create mode 100644 data/image/l4.pozadi.png create mode 100644 data/image/l4.pytle.png create mode 100644 data/image/l4.tvarnice.png create mode 100644 data/image/lasserX.png create mode 100644 data/image/lasserY.png create mode 100644 data/image/level4.png create mode 100644 data/image/mine.png create mode 100644 data/image/naboj.png create mode 100644 data/image/night_workshift.png create mode 100644 data/image/panel.png create mode 100644 data/image/panel_shot.png create mode 100644 data/image/pokus.png create mode 100644 data/image/radar.png create mode 100644 data/image/screen_main.png create mode 100644 data/image/screen_table.png create mode 100644 data/image/shot.png create mode 100644 data/image/textfield0.png create mode 100644 data/image/textfield1.png create mode 100644 data/image/tux2.png create mode 100644 data/image/tux4.png create mode 100644 data/image/tux6.png create mode 100644 data/image/tux8.png create mode 100644 data/image/tuxanci.png create mode 100644 data/lang/CMakeLists.txt create mode 100644 data/lang/cs.lang create mode 100644 data/lang/en.lang create mode 100644 data/lang/fr.lang create mode 100644 data/lang/sk.lang create mode 100644 data/music/for_a_good_night.ogg create mode 100644 data/music/in_a_captivity_of_8-bit.ogg create mode 100644 data/music/menu.ogg create mode 100644 data/music/night_workshift.ogg create mode 100644 data/sound/dead.ogg create mode 100644 data/sound/end.ogg create mode 100644 data/sound/explozion.ogg create mode 100644 data/sound/gun2.ogg create mode 100644 data/sound/gun_lasser.ogg create mode 100644 data/sound/gun_revolver.ogg create mode 100644 data/sound/gun_scatter.ogg create mode 100644 data/sound/gun_tommy.ogg create mode 100644 data/sound/item_bonus.ogg create mode 100644 data/sound/item_gun.ogg create mode 100644 data/sound/odraz-gun.ogg create mode 100644 data/sound/odraz-l.ogg create mode 100644 data/sound/odraz-r.ogg create mode 100644 data/sound/put_mine.ogg create mode 100644 data/sound/smrt.ogg create mode 100644 data/sound/switch_gun.ogg create mode 100644 data/sound/teleport.ogg create mode 100644 data/sound/tuxanci-smrt.ogg create mode 100644 data/tuxanci-ng.desktop delete mode 100755 deb-build.sh delete mode 100644 deb_config.h delete mode 100755 font/DejaVuSans.ttf delete mode 100644 image/ba_in_a_captivity_of_8-bit.png delete mode 100644 image/big-explosion.png delete mode 100755 image/bombball.png delete mode 100644 image/button0.png delete mode 100644 image/button1.png delete mode 100644 image/check.png delete mode 100644 image/construction_site.png delete mode 100644 image/cross.png delete mode 100644 image/explosion.png delete mode 100644 image/for_a_good_night.png delete mode 100644 image/graf.bonus.png delete mode 100644 image/icon.bonus.4x.png delete mode 100644 image/icon.bonus.ghost.png delete mode 100644 image/icon.bonus.hidden.png delete mode 100644 image/icon.bonus.shot.png delete mode 100644 image/icon.bonus.speed.png delete mode 100644 image/icon.bonus.teleport.png delete mode 100755 image/icon.gun.bombball.png delete mode 100644 image/icon.gun.dual.simple.png delete mode 100644 image/icon.gun.lasser.png delete mode 100644 image/icon.gun.mine.png delete mode 100644 image/icon.gun.scatter.png delete mode 100644 image/icon.gun.simple.png delete mode 100644 image/icon.gun.tommy.png delete mode 100644 image/in_a_captivity_of_8-bit.png delete mode 100755 image/item.bombball.png delete mode 100644 image/item.bonus.4x.png delete mode 100644 image/item.bonus.ghost.png delete mode 100644 image/item.bonus.hidden.png delete mode 100644 image/item.bonus.shot.png delete mode 100644 image/item.bonus.speed.png delete mode 100644 image/item.bonus.teleport.png delete mode 100644 image/item.dual.png delete mode 100644 image/item.lasser.png delete mode 100644 image/item.mine.png delete mode 100644 image/item.scatter.png delete mode 100644 image/item.tommy.png delete mode 100644 image/l1.grow.png delete mode 100644 image/l1.hut.png delete mode 100644 image/l1.peduncle.png delete mode 100644 image/l1.tree.png delete mode 100644 image/l1.wood.png delete mode 100644 image/l2.barel.png delete mode 100644 image/l2.nadrz.png delete mode 100644 image/l2.pitch.png delete mode 100644 image/l2.potrubi.png delete mode 100644 image/l2.retez.png delete mode 100644 image/l2.trubka2.png delete mode 100644 image/l2.trubka4.png delete mode 100644 image/l2.trubka6.png delete mode 100644 image/l2.trubka8.png delete mode 100644 image/l2.trubky.png delete mode 100644 image/l3.ihlan.png delete mode 100644 image/l3.kvader1.png delete mode 100644 image/l3.kvader2.png delete mode 100644 image/l3.nic.png delete mode 100644 image/l3.teleport.png delete mode 100644 image/l4.anim.blikacka.png delete mode 100644 image/l4.bagr.png delete mode 100644 image/l4.overlay.png delete mode 100644 image/l4.palety.png delete mode 100644 image/l4.pozadi.png delete mode 100644 image/l4.pytle.png delete mode 100644 image/l4.tvarnice.png delete mode 100644 image/lasserX.png delete mode 100644 image/lasserY.png delete mode 100644 image/level4.png delete mode 100644 image/mine.png delete mode 100644 image/naboj.png delete mode 100644 image/night_workshift.png delete mode 100644 image/panel.png delete mode 100644 image/panel_shot.png delete mode 100644 image/pokus.png delete mode 100644 image/radar.png delete mode 100644 image/screen_main.png delete mode 100644 image/screen_table.png delete mode 100644 image/shot.png delete mode 100644 image/textfield0.png delete mode 100644 image/textfield1.png delete mode 100644 image/tux2.png delete mode 100644 image/tux4.png delete mode 100644 image/tux6.png delete mode 100644 image/tux8.png delete mode 100644 image/tuxanci.png delete mode 100644 include/arena.h delete mode 100644 include/arenaFile.h delete mode 100644 include/audio.h delete mode 100644 include/bool.h delete mode 100755 include/buffer.h delete mode 100644 include/checkFront.h delete mode 100644 include/client.h delete mode 100644 include/configFile.h delete mode 100644 include/director.h delete mode 100644 include/dynamicInt.h delete mode 100644 include/fake_audio.h delete mode 100755 include/font.h delete mode 100644 include/game.h delete mode 100644 include/gun.h delete mode 100644 include/hashTable.h delete mode 100644 include/heightScore.h delete mode 100755 include/homeDirector.h delete mode 100644 include/idManager.h delete mode 100755 include/image.h delete mode 100755 include/interface.h delete mode 100644 include/item.h delete mode 100644 include/keytable.h delete mode 100644 include/language.h delete mode 100755 include/layer.h delete mode 100755 include/list.h delete mode 100644 include/logFile.h delete mode 100644 include/main.h delete mode 100644 include/modules.h delete mode 100644 include/music.h delete mode 100644 include/myTimer.h delete mode 100644 include/net_multiplayer.h delete mode 100755 include/network.h delete mode 100644 include/panel.h delete mode 100644 include/path.h delete mode 100644 include/protect.h delete mode 100644 include/proto.h delete mode 100644 include/publicServer.h delete mode 100644 include/screen.h delete mode 100644 include/screen_analyze.h delete mode 100644 include/screen_choiceArena.h delete mode 100644 include/screen_credits.h delete mode 100644 include/screen_gameType.h delete mode 100644 include/screen_mainMenu.h delete mode 100644 include/screen_setting.h delete mode 100644 include/screen_table.h delete mode 100644 include/screen_world.h delete mode 100644 include/sdl_udp.h delete mode 100644 include/server.h delete mode 100644 include/serverConfigFile.h delete mode 100644 include/shot.h delete mode 100644 include/sound.h delete mode 100644 include/space.h delete mode 100644 include/storage.h delete mode 100644 include/string_length.h delete mode 100644 include/tcp.h delete mode 100644 include/term.h delete mode 100755 include/textFile.h delete mode 100644 include/tux.h delete mode 100644 include/udp.h delete mode 100644 include/widget_button.h delete mode 100644 include/widget_buttonimage.h delete mode 100644 include/widget_check.h delete mode 100644 include/widget_image.h delete mode 100644 include/widget_label.h delete mode 100644 include/widget_select.h delete mode 100644 include/widget_textfield.h delete mode 100644 lang/cs.lang delete mode 100644 lang/en.lang delete mode 100644 lang/fr.lang delete mode 100644 lang/sk.lang delete mode 100755 modules/Makefile delete mode 100755 modules/Makefile-publicserver delete mode 100755 modules/list.c delete mode 100755 modules/list.h delete mode 100755 modules/modAI.c delete mode 100755 modules/modPipe.c delete mode 100755 modules/modTeleport.c delete mode 100755 modules/modWall.c delete mode 100644 modules/space.c delete mode 100644 modules/space.h delete mode 100644 music/for_a_good_night.ogg delete mode 100644 music/in_a_captivity_of_8-bit.ogg delete mode 100644 music/menu.ogg delete mode 100644 music/night_workshift.ogg delete mode 100644 packaging/deb/control delete mode 100755 packaging/deb/deb-build.sh delete mode 100644 packaging/deb/r delete mode 100644 packaging/deb/tuxanci-ng.desktop delete mode 100644 path_config.h delete mode 100755 publicserver.sh delete mode 100644 r delete mode 100644 readme.txt delete mode 100644 server.conf delete mode 100644 sound/dead.ogg delete mode 100644 sound/end.ogg delete mode 100644 sound/explozion.ogg delete mode 100644 sound/gun2.ogg delete mode 100644 sound/gun_lasser.ogg delete mode 100644 sound/gun_revolver.ogg delete mode 100644 sound/gun_scatter.ogg delete mode 100644 sound/gun_tommy.ogg delete mode 100644 sound/item_bonus.ogg delete mode 100644 sound/item_gun.ogg delete mode 100644 sound/odraz-gun.ogg delete mode 100644 sound/odraz-l.ogg delete mode 100644 sound/odraz-r.ogg delete mode 100644 sound/put_mine.ogg delete mode 100644 sound/smrt.ogg delete mode 100644 sound/switch_gun.ogg delete mode 100644 sound/teleport.ogg delete mode 100644 sound/tuxanci-smrt.ogg create mode 100644 src/CMakeLists.txt delete mode 100644 src/Makefile delete mode 100644 src/Makefile-nosound delete mode 100644 src/Makefile-sdlnet delete mode 100644 src/Makefile-server delete mode 100644 src/audio/Makefile delete mode 100644 src/base/Makefile delete mode 100644 src/client/Makefile create mode 100644 src/modules/CMakeLists.txt delete mode 100755 src/modules/Makefile create mode 100644 src/net/dns.c create mode 100644 src/net/dns.h create mode 100644 src/net/udp.c create mode 100644 src/net/udp.h delete mode 100644 src/net_sdl/Makefile delete mode 100644 src/net_sdl/sdl_udp.c delete mode 100644 src/net_sdl/sdl_udp.h delete mode 100644 src/net_unix/Makefile delete mode 100644 src/net_unix/dns.c delete mode 100644 src/net_unix/dns.h delete mode 100644 src/net_unix/udp.c delete mode 100644 src/net_unix/udp.h delete mode 100644 src/screen/Makefile delete mode 100644 src/server/Makefile delete mode 100644 src/widget/Makefile delete mode 100755 tarball-build.sh delete mode 100755 tarballbin-build.sh delete mode 100644 tuxanci-ng.desktop delete mode 100755 tuxanci-ng.sh diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e6cea02 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,92 @@ +# Created by Tomas Chvatal +# volani se vsemy externimy moznostmy: + +# cmake . -DNO_Server=1 -DNO_Audio=1 -DDebug=1 -DCMAKE_C_FLAGS="-Wall" +# make +# make install + +# pri zmene zdrojovych souboru se podivejte co je treba delat do souboru +# CMakeLists.txt v adresari src +SET ( APPNAME "tuxanci-ng") +MESSAGE ( "<******************************>" ) +MESSAGE ( "Configure for ${APPNAME} Started" ) +MESSAGE ( "<******************************>" ) +CMAKE_MINIMUM_REQUIRED ( VERSION 2.4.8 FATAL_ERROR ) + +SET ( CMAKE_COLOR_MAKEFILE ON ) +## balickovani +set ( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/data/README.sk" ) +set ( CPACK_GENERATOR "TBZ2" ) +set ( CPACK_SOURCE_GENERATOR "TBZ2" ) +set ( CPACK_PACKAGE_VERSION_MAJOR "0" ) +set ( CPACK_PACKAGE_VERSION_MINOR "2" ) +set ( CPACK_PACKAGE_VERSION_PATCH "0" ) +set ( TUXANCI_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}" ) +set ( TUXANCI_VERSION_FULL "${KGTK_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}" ) +set ( CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${KGTK_VERSION_FULL}" ) +include ( CPack ) +set(CMAKE_BUILD_TYPE_SHARED_LIBS ON) + +# flagy +SET( CMAKE_C_FLAGS $ENV{CFLAGS} ) +SET( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} ) +SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") + +# nazev projektu +PROJECT ( tuxanci ) +# verbose nastaveni vypnout pred release +IF ( Debug ) + set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/dist) + SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0") + SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0") + SET ( CMAKE_VERBOSE_MAKEFILE on ) +ENDIF ( Debug) +MESSAGE ( "EXTRA Cflags:${CMAKE_C_FLAGS}" ) +MESSAGE ( "EXTRA CXXflags:${CMAKE_CXX_FLAGS}" ) +# pouzite podadresare +# nestarame se o adresare s daty +MESSAGE ( STATUS "" ) +MESSAGE ( STATUS "<******************************>" ) +ADD_SUBDIRECTORY ( src ) + +#MESSAGE(STATUS "") +#MESSAGE(STATUS "<******************************>") +#ADD_SUBDIRECTORY ( lang ) + +# instalace +# data !TODO +#MESSAGE ( STATUS "" ) +#MESSAGE ( STATUS "<******************************>" ) +IF ( NOT CMAKE_INSTALL_DATADIR EQUAL "" ) + SET ( CMAKE_INSTALL_DATADIR share/ ) +ENDIF ( NOT CMAKE_INSTALL_DATADIR EQUAL "" ) +SET ( CMAKE_INSTALL_ETCDIR /etc ) +INSTALL ( FILES ${CMAKE_SOURCE_DIR}/data/tuxanci-ng.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/doc/) +INSTALL ( FILES ${CMAKE_SOURCE_DIR}/data/LICENCE DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/doc/) +INSTALL ( FILES ${CMAKE_SOURCE_DIR}/data/AUTHORS DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/doc/ ) +INSTALL ( FILES ${CMAKE_SOURCE_DIR}/data/credits.en DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/doc/ ) +INSTALL ( FILES ${CMAKE_SOURCE_DIR}/data/README.sk DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/doc/) # meli by sme vytvorit jeste soubory authors a licence +IF ( NOT NO_Server ) + INSTALL ( FILES ${CMAKE_SOURCE_DIR}/data/conf/server.conf DESTINATION ${CMAKE_INSTALL_ETCDIR}/${APPNAME} ) +ENDIF ( NOT NO_Server ) +INSTALL ( FILES ${CMAKE_SOURCE_DIR}/data/conf/keytable.conf DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/conf/ ) +FILE ( GLOB files "${CMAKE_SOURCE_DIR}/data/arena/*.map" ) +INSTALL ( FILES ${files} DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/arena/ ) +FILE ( GLOB files "${CMAKE_SOURCE_DIR}/data/font/*.ttf" ) +INSTALL ( FILES ${files} DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/font/ ) +FILE ( GLOB files "${CMAKE_SOURCE_DIR}/data/image/*.png" ) +INSTALL ( FILES ${files} DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/image/ ) +FILE ( GLOB files "${CMAKE_SOURCE_DIR}/data/lang/*.lang" ) +INSTALL ( FILES ${files} DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/lang/ ) +FILE ( GLOB files "${CMAKE_SOURCE_DIR}/data/music/*.ogg" ) +INSTALL ( FILES ${files} DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/music/ ) +FILE ( GLOB files "${CMAKE_SOURCE_DIR}/data/sound/*.ogg" ) +INSTALL ( FILES ${files} DESTINATION ${CMAKE_INSTALL_DATADIR}/${APPNAME}/sound/ ) +# uninstall +CONFIGURE_FILE( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + +ADD_CUSTOM_TARGET(uninstall + "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 3a00d40..0000000 --- a/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -DESTDIR:=/usr/local - -all: - make -C ./src - -clean: - make -C ./src clean - -run: - ./tuxanci-ng.sh - -srun: - ./publicserver.sh - -package: - ./deb-build.sh - -tarball: - ./tarball-build.sh - -tarballbin: - ./tarballbin-build.sh - -kill: - kill -9 `pidof publicserver` - -stat: - cat /proc/`pidof publicserver`/status - -tuxstat: - cat /proc/`pidof tuxanci-ng`/status - -core: - gcore `pidof publicserver` - -svn: - svn ci - -svnr: - svn co http://opensvn.csie.org/tuxanci_ng/ - -server: - make -C ./src -f Makefile-server - -nosound: - make -C ./src -f Makefile-nosound - -mod: - make -C ./modules -f Makefile modTeleport - make -C ./modules -f Makefile modPipe - make -C ./modules -f Makefile modWall - make -C ./modules -f Makefile modAI - -servermod: - make -C ./modules -f Makefile-publicserver modTeleport - make -C ./modules -f Makefile-publicserver modPipe - make -C ./modules -f Makefile-publicserver modWall - -install: - mkdir -p $(DESTDIR)/bin - mkdir -p $(DESTDIR)/share/tuxanci-ng/{arena,data,font,image,lang,music,sound,conf,modules} - cp ./src/tuxanci-ng $(DESTDIR)/bin/ - - cp -rf ./arena/* $(DESTDIR)/share/tuxanci-ng/arena/ - cp -rf ./font/* $(DESTDIR)/share/tuxanci-ng/font/ - cp -rf ./image/* $(DESTDIR)/share/tuxanci-ng/image/ - cp -rf ./lang/* $(DESTDIR)/share/tuxanci-ng/lang/ - cp -rf ./music/* $(DESTDIR)/share/tuxanci-ng/music/ - cp -rf ./sound/* $(DESTDIR)/share/tuxanci-ng/sound/ - cp -rf ./data/* $(DESTDIR)/share/tuxanci-ng/data/ - cp -rf ./conf/* $(DESTDIR)/share/tuxanci-ng/conf/ - cp -rf ./modules/*.so $(DESTDIR)/share/tuxanci-ng/modules/ - -uninstall: - rm -rf $(DESTDIR)/{bin,share}/tuxanci-ng diff --git a/README.sk b/README.sk deleted file mode 100644 index c8b65e2..0000000 --- a/README.sk +++ /dev/null @@ -1,109 +0,0 @@ - - *** - - Navod ako skompilovat zdrojove kody - - *** - - Projekt sa da kompilovat ako hra ( client ) s GUI, alebo ako herny server - - ************************************************ - - kompilacia hry s GUI - - Pri kompilacii, hry ako grafickeho klienta sa potrebuju kniznice : - (g)libc, SDL, SDL_Image, SDL_Mixer, SDL_ttf, SDL_Net - v ratane hlavickovych suborov a konfiguracnych striptov ( sdl-config ) - - ldd -u `which tuxanci-ng` - Unused direct dependencies: - /usr/lib/libSDL-1.2.so.0 - /usr/lib/libSDL_image-1.2.so.0 - /usr/lib/libSDL_ttf-2.0.so.0 - /usr/lib/libSDL_mixer-1.2.so.0 - /usr/lib/libSDL_net-1.2.so.0 - - make clean - ---------- - - pre istotu vymazeme subory z predchadzajucej kompilacie - - v subore config.h do makra DESTDIR ulozime nas prefix-path, - ktory sa natvrdo skompiluje do programu - #define DESTDIR "/usr/local/" - - Ak toto makro nebude existovat, program bude pouzivat svoje podaresare :) - ( vhodne pri vyvoji, ked sa casto menia subory ) - - make mod - -------- - - skompilujeme moduly hry - - su - -- - - prepneme sa na roota - - make install DESTDIR=/usr/local - nainstalujeme subory, DESTDIR urcuje kam sa budu subory kopirovat. - bolo by dobre, keby sa rovnala hodnoty makru DESTDIR, ale nie je to podmienka. - Ak bude hodnota makra DESTDIR a premennej DESTDIR v Makefile rozdielna, program - si nenajde svoje subory. - - tuxanci-ng - ---------- - Program spustime tymto prikazom. - Hra si vytvara domovsky adresar v domovskom adresari uzivatela ~/.tuxanci-ng - - make uninstall DESTDIR=/usr/local - --------------------------------- - - Program sa odinstaluje - - ************************************************ - - kompilacia herneho servera - - Pri kompilacii, herneho servera musi existovat makro PUBLIC_SERVER v config.h - Je automaticky zakomentovane, tak ho pls. odkomentujte - - Makro DESTDIR, nehra pri kompilacii herneho server ziadnu rolu. Server pouziva - svoje podadresare a ani sa neinstaluje - - make clean - ---------- - - pre istotu vymazame subory z predchadzajucej kompilacie. - - make server - ----------- - - kompilujeme server - - make servermod - -------------- - - skompilumjeme moduly pre server - - ./build-server/publicserver - -------------- - - Spustame server - - konfiguracia servera je v server.conf : - - IP4 0.0.0.0 # IPv4 adresa - IP6 ::1 # IPv6 adresa - PORTv4 2200 # sietovy port pre IPv4 aredu - PORTv6 2206 # sietovy port pre IPv4 aredu - MAX_CLIENTS 32 # maximalny pocet clientov - ARENA FAGN # sietovy nazov areny - - - ************************************************ - - Dušan Ďurech - email: Dusan.D@Centrum.Sk - jabber IM: Oroborus@Jabbim.sk - //fakt narychlo napisane diff --git a/arena/ba_in_a_captivity_of_8-bit.map b/arena/ba_in_a_captivity_of_8-bit.map deleted file mode 100644 index 049fa0b..0000000 --- a/arena/ba_in_a_captivity_of_8-bit.map +++ /dev/null @@ -1,107 +0,0 @@ - -name In a captivity of 8-bit -netName BAIACO8B -screen ba_in_a_captivity_of_8-bit.png - -loadModule file="modWall.so" -loadModule file="modTeleport.so" - -loadMusic file="in_a_captivity_of_8-bit.ogg" name="in_a_captivity_of_8-bit" - -loadImage file="l3.nic.png" name="nic" alpha="no" -loadImage file="l3.ihlan.png" name="ihlan" alpha="yes" -loadImage file="l3.kvader1.png" name="kvader1" alpha="yes" -loadImage file="l3.kvader2.png" name="kvader2" alpha="yes" -loadImage file="l3.teleport.png" name="teleport" alpha="yes" - -arena background="nic" w="2500" h="2500" - -playMusic music="in_a_captivity_of_8-bit" - -#wall rel="1" x="512" y="320" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -#wall rel="1" x="273" y="152" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -#wall rel="1" x="90" y="275" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" - -wwall rel="1" x="1518" y="426" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="1479" y="1228" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="1139" y="2241" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="1854" y="1988" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="270" y="140" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="1254" y="1107" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="1717" y="803" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="2228" y="771" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="1986" y="2311" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="2125" y="2299" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="2000" y="71" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="1077" y="1214" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="302" y="1194" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="2175" y="109" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="571" y="1964" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="328" y="387" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="1616" y="1378" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="2471" y="659" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="147" y="1607" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="1748" y="1825" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="433" y="1769" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="73" y="1854" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="125" y="1002" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="2165" y="1153" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="952" y="963" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="1035" y="642" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="708" y="1804" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1850" y="964" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1074" y="1011" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="475" y="1525" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="765" y="497" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1875" y="2156" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="315" y="1233" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="340" y="698" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="23" y="1815" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1084" y="2088" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="295" y="1808" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1663" y="9" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1162" y="1772" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="236" y="180" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="823" y="2115" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="271" y="1271" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1087" y="1531" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1394" y="2122" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="2499" y="1013" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1510" y="1870" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="378" y="764" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1997" y="2237" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1787" y="693" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="1360" y="1190" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="2130" y="1811" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="2471" y="2445" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="2454" y="2425" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1698" y="1634" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1815" y="2469" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="2084" y="1934" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="2057" y="1490" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1873" y="1207" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="829" y="644" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1658" y="768" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1490" y="2181" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1797" y="2020" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="610" y="720" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1413" y="147" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1337" y="2397" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="560" y="274" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1571" y="967" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="893" y="532" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1018" y="377" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="346" y="91" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="877" y="333" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="675" y="1282" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="2490" y="434" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="2430" y="49" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="2169" y="2171" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" -wall rel="1" x="1852" y="440" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" - - -teleport x="100" y="100" w="58" h="58" layer="-1" image="teleport" -teleport x="2342" y="100" w="58" h="58" layer="-1" image="teleport" -teleport x="100" y="2342" w="58" h="58" layer="-1" image="teleport" -teleport x="2342" y="2342" w="58" h="58" layer="-1" image="teleport" - diff --git a/arena/construction_site.map b/arena/construction_site.map deleted file mode 100644 index 3422b85..0000000 --- a/arena/construction_site.map +++ /dev/null @@ -1,27 +0,0 @@ - -name construction site -netName CS -screen construction_site.png - -loadModule file="modWall.so" - -loadMusic file="night_workshift.ogg" name="night_workshift" - -loadImage file="l4.pozadi.png" name="pozadi" alpha="no" -loadImage file="l4.bagr.png" name="bagr" alpha="yes" -loadImage file="l4.pytle.png" name="pytle" alpha="yes" -loadImage file="l4.tvarnice.png" name="tvarnice" alpha="yes" -loadImage file="l4.palety.png" name="palety" alpha="yes" -loadImage file="l4.overlay.png" name="overlay" alpha="yes" - -arena background="pozadi" w="800" h="600" - -playMusic music="night_workshift" - -wall x="96" y="423" w="162" h="96" img_x="86" img_y="235" layer="0" image="bagr" -wall x="425" y="358" w="120" h="55" img_x="410" img_y="326" layer="0" image="pytle" -wall x="55" y="52" w="62" h="87" img_x="51" img_y="37" layer="0" image="tvarnice" -wall x="92" y="0" w="198" h="118" img_x="65" img_y="0" layer="0" image="palety" -wall x="0" y="0" w="0" h="0" img_x="0" img_y="0" layer="1" image="overlay" - - diff --git a/arena/for_a_good_night.map b/arena/for_a_good_night.map deleted file mode 100644 index a4f8969..0000000 --- a/arena/for_a_good_night.map +++ /dev/null @@ -1,23 +0,0 @@ - -name For a good night -netName FAGN -screen for_a_good_night.png - -loadModule file="modWall.so" - -loadMusic file="for_a_good_night.ogg" name="for_a_good_night" - -loadImage file="l1.grow.png" name="grow" alpha="no" -loadImage file="l1.hut.png" name="hut" alpha="yes" -loadImage file="l1.peduncle.png" name="peduncle" alpha="yes" -loadImage file="l1.tree.png" name="tree" alpha="yes" -loadImage file="l1.wood.png" name="wood" alpha="yes" - -arena background="grow" w="800" h="600" - -playMusic music="for_a_good_night" - -wall x="1" y="1" w="0" h="0" img_x="75" img_y="20" layer="1" image="hut" -wall x="120" y="159" w="180" h="65" img_x="90" img_y="159" layer="0" image="peduncle" -wall x="520" y="260" w="161" h="100" img_x="500" img_y="180" layer="0" image="tree" -wall x="220" y="400" w="110" h="10" img_x="200" img_y="370" layer="0" image="wood" diff --git a/arena/in_a_captivity_of_8-bit.map b/arena/in_a_captivity_of_8-bit.map deleted file mode 100644 index 3316aef..0000000 --- a/arena/in_a_captivity_of_8-bit.map +++ /dev/null @@ -1,31 +0,0 @@ - -name In a captivity of 8-bit -netName IACO8B -screen in_a_captivity_of_8-bit.png - -loadModule file="modWall.so" -loadModule file="modTeleport.so" - -loadMusic file="in_a_captivity_of_8-bit.ogg" name="in_a_captivity_of_8-bit" - -loadImage file="l3.nic.png" name="nic" alpha="no" -loadImage file="l3.ihlan.png" name="ihlan" alpha="yes" -loadImage file="l3.kvader1.png" name="kvader1" alpha="yes" -loadImage file="l3.kvader2.png" name="kvader2" alpha="yes" -loadImage file="l3.teleport.png" name="teleport" alpha="yes" - -arena background="nic" w="800" h="600" - -playMusic music="in_a_captivity_of_8-bit" - -wall rel="1" x="512" y="320" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" -wall rel="1" x="273" y="152" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" -wall rel="1" x="90" y="275" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" - -#wall x="512" y="320" w="125" h="100" img_x="500" img_y="125" layer="0" image="ihlan" -#wall x="273" y="152" w="180" h="75" img_x="250" img_y="62" layer="0" image="kvader1" -#wall x="90" y="275" w="87" h="205" img_x="62" img_y="187" layer="0" image="kvader2" - -teleport x="112" y="112" w="58" h="58" layer="-1" image="teleport" -teleport x="375" y="375" w="58" h="58" layer="-1" image="teleport" -teleport x="700" y="120" w="58" h="58" layer="-1" image="teleport" diff --git a/arena/night_workshift.map b/arena/night_workshift.map deleted file mode 100644 index 2211665..0000000 --- a/arena/night_workshift.map +++ /dev/null @@ -1,35 +0,0 @@ - -name night workshift -netName NW -screen night_workshift.png - -loadModule file="modWall.so" -loadModule file="modPipe.so" - -loadMusic file="night_workshift.ogg" name="night_workshift" - -loadImage file="l2.pitch.png" name="pitch" alpha="no" -loadImage file="l2.potrubi.png" name="potrubi" alpha="yes" -loadImage file="l2.retez.png" name="retez" alpha="yes" -loadImage file="l2.barel.png" name="barel" alpha="yes" -loadImage file="l2.nadrz.png" name="nadrz" alpha="yes" -loadImage file="l2.trubky.png" name="trubky" alpha="yes" -loadImage file="l2.trubka2.png" name="trubka2" alpha="yes" -loadImage file="l2.trubka6.png" name="trubka6" alpha="yes" -loadImage file="l2.trubka4.png" name="trubka4" alpha="yes" -loadImage file="l2.trubka8.png" name="trubka8" alpha="yes" - -arena background="pitch" w="800" h="600" - -playMusic music="night_workshift" - -wall x="0" y="0" w="0" h="0" img_x="0" img_y="366" layer="1" image="potrubi" -wall x="0" y="0" w="0" h="0" img_x="393" img_y="20" layer="1" image="retez" -wall x="535" y="480" w="175" h="31" img_x="531" img_y="421" layer="0" image="barel" -wall x="333" y="146" w="287" h="18" img_x="331" img_y="2" layer="0" image="nadrz" -wall x="125" y="318" w="37" h="162" img_x="106" img_y="320" layer="0" image="trubky" - -pipe x="187" y="0" w="50" h="100" layer="0" position="2" id="1" id_out="4" image="trubka2" -pipe x="0" y="187" w="100" h="50" layer="0" position="6" id="2" id_out="3" image="trubka6" -pipe x="737" y="312" w="100" h="50" layer="0" position="4" id="3" id_out="2" image="trubka4" -pipe x="400" y="500" w="50" h="100" layer="0" position="8" id="4" id_out="1" image="trubka8" diff --git a/build.sh b/build.sh deleted file mode 100755 index 02ceac4..0000000 --- a/build.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -mv config.h zal_config.h - -rm -rf deb myusr tuxanci-ng_svn*_i386.deb -rm -rf tuxanci_ng-i386-bin tuxanci_ng-i386-bin tuxanci_ng-i386-bin.tar.bz2 -rm -rf tuxanci_ng tuxanci_ng.tar tuxanci_ng.tar.bz2 - -make clean -mv current_config.h config.h -make -mv config.h current_config.h -./tarballbin-build.sh - -make clean -./tarball-build.sh - -make clean -mv path_config.h config.h -make - -rm -rf myusr -mkdir myusr -mkdir myusr/bin -mkdir myusr/share - -make install DESTDIR=./myusr/ -mv config.h path_config.h -./deb-build.sh - -mv zal_config.h config.h \ No newline at end of file diff --git a/cmake/Po.cmake b/cmake/Po.cmake new file mode 100644 index 0000000..8c6d5f0 --- /dev/null +++ b/cmake/Po.cmake @@ -0,0 +1,54 @@ +# a small macro to create mo files out of po's +# Taken from sim-im.org + +MACRO(FIND_MSGFMT) + IF(NOT MSGFMT_EXECUTABLE) + IF(NOT MSGFMT_NOT_FOUND) + SET(MSGFMT_NAME "msgfmt") + FIND_PROGRAM(MSGFMT_EXECUTABLE ${MSGFMT_NAME}) + + IF (NOT MSGFMT_EXECUTABLE) + MESSAGE(FATAL_ERROR "${MSGFMT_NAME} not found - po files can't be processed") + SET(MSGFMT_NOT_FOUND "1") # to avoid double checking in one cmake run + ENDIF (NOT MSGFMT_EXECUTABLE) + + MARK_AS_ADVANCED(MSGFMT_EXECUTABLE) + ENDIF(NOT MSGFMT_NOT_FOUND) + ENDIF(NOT MSGFMT_EXECUTABLE) +ENDMACRO(FIND_MSGFMT) + +MACRO(COMPILE_PO_FILES po_subdir _sources) + FIND_MSGFMT() + SET(_basename avidemux2) + + IF(MSGFMT_EXECUTABLE) + FILE(GLOB po_files ${po_subdir}/*.po) + + FOREACH(po_input ${po_files}) + + GET_FILENAME_COMPONENT(_in ${po_input} ABSOLUTE) + GET_FILENAME_COMPONENT(_basename ${po_input} NAME_WE) + + FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + GET_FILENAME_COMPONENT(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.mo ABSOLUTE) + + ADD_CUSTOM_COMMAND( + OUTPUT ${_out} + COMMAND ${CMAKE_COMMAND} + -E echo + "Generating" ${_out} "from" ${_in} + COMMAND ${MSGFMT_EXECUTABLE} + ${_in} + -o ${_out} + DEPENDS ${_in} + ) + + SET(mo_files ${mo_files} ${_out}) + + INSTALL(FILES ${_out} DESTINATION "${CMAKE_INSTALL_PREFIX}/share/locale/${_basename}/LC_MESSAGES" RENAME avidemux.mo) + ENDFOREACH(po_input ${po_files}) + + SET(${_sources} ${${_sources}} ${mo_files}) + ENDIF(MSGFMT_EXECUTABLE) +ENDMACRO(COMPILE_PO_FILES) + diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in new file mode 100644 index 0000000..cd4c9d8 --- /dev/null +++ b/cmake_uninstall.cmake.in @@ -0,0 +1,21 @@ +IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +STRING(REGEX REPLACE "\n" ";" files "${files}") +FOREACH(file ${files}) + MESSAGE(STATUS "Uninstalling: \"$ENV{DESTDIR}${file}\"") + IF(EXISTS "$ENV{DESTDIR}${file}") + EXEC_PROGRAM( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + IF(NOT "${rm_retval}" STREQUAL 0) + MESSAGE(FATAL_ERROR "Problem when removing: \"$ENV{DESTDIR}${file}\"") + ENDIF(NOT "${rm_retval}" STREQUAL 0) + ELSE(EXISTS "$ENV{DESTDIR}${file}") + MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") + ENDIF(EXISTS "$ENV{DESTDIR}${file}") +ENDFOREACH(file) diff --git a/conf/keytable.conf b/conf/keytable.conf deleted file mode 100755 index 236b72c..0000000 --- a/conf/keytable.conf +++ /dev/null @@ -1,273 +0,0 @@ - -#******************************************** - -# -# Key table : -# - -#******************************************** - -keycode SDLK_FIRST = 0 -keycode SDLK_BACKSPACE = 8 -keycode SDLK_TAB = 9 -keycode SDLK_CLEAR = 12 -keycode SDLK_RETURN = 13 -keycode SDLK_PAUSE = 19 -keycode SDLK_ESCAPE = 27 -keycode SDLK_SPACE = 32 -keycode SDLK_EXCLAIM = 33 -keycode SDLK_QUOTEDBL = 34 -keycode SDLK_HASH = 35 -keycode SDLK_DOLLAR = 36 -keycode SDLK_AMPERSAND = 38 -keycode SDLK_QUOTE = 39 -keycode SDLK_LEFTPAREN = 40 -keycode SDLK_RIGHTPAREN = 41 -keycode SDLK_ASTERISK = 42 -keycode SDLK_PLUS = 43 -keycode SDLK_COMMA = 44 -keycode SDLK_MINUS = 45 -keycode SDLK_PERIOD = 46 -keycode SDLK_SLASH = 47 - -#******************************************** - -keycode SDLK_0 = 48 -keycode SDLK_1 = 49 -keycode SDLK_2 = 50 -keycode SDLK_3 = 51 -keycode SDLK_4 = 52 -keycode SDLK_5 = 53 -keycode SDLK_6 = 54 -keycode SDLK_7 = 55 -keycode SDLK_8 = 56 -keycode SDLK_9 = 57 - -#******************************************** - -keycode SDLK_COLON = 58 -keycode SDLK_SEMICOLON = 59 -keycode SDLK_LESS = 60 -keycode SDLK_EQUALS = 61 -keycode SDLK_GREATER = 62 -keycode SDLK_QUESTION = 63 -keycode SDLK_AT = 64 - -#******************************************** - -keycode SDLK_LEFTBRACKET = 91 -keycode SDLK_BACKSLASH = 92 -keycode SDLK_RIGHTBRACKET = 93 -keycode SDLK_CARET = 94 -keycode SDLK_UNDERSCORE = 95 -keycode SDLK_BACKQUOTE = 96 - -#******************************************** - -keycode SDLK_a = 97 -keycode SDLK_b = 98 -keycode SDLK_c = 99 -keycode SDLK_d = 100 -keycode SDLK_e = 101 -keycode SDLK_f = 102 -keycode SDLK_g = 103 -keycode SDLK_h = 104 -keycode SDLK_i = 105 -keycode SDLK_j = 106 -keycode SDLK_k = 107 -keycode SDLK_l = 108 -keycode SDLK_m = 1 -keycode SDLK_n = 110 -keycode SDLK_o = 111 -keycode SDLK_p = 112 -keycode SDLK_q = 113 -keycode SDLK_r = 114 -keycode SDLK_s = 115 -keycode SDLK_t = 116 -keycode SDLK_u = 117 -keycode SDLK_v = 118 -keycode SDLK_w = 119 -keycode SDLK_x = 120 -keycode SDLK_y = 121 -keycode SDLK_z = 122 -keycode SDLK_DELETE = 127 - -#******************************************** - -keycode SDLK_WORLD_0 = 160 -keycode SDLK_WORLD_1 = 161 -keycode SDLK_WORLD_2 = 162 -keycode SDLK_WORLD_3 = 163 -keycode SDLK_WORLD_4 = 164 -keycode SDLK_WORLD_5 = 165 -keycode SDLK_WORLD_6 = 166 -keycode SDLK_WORLD_7 = 167 -keycode SDLK_WORLD_8 = 168 -keycode SDLK_WORLD_9 = 169 -keycode SDLK_WORLD_10 = 170 -keycode SDLK_WORLD_11 = 171 -keycode SDLK_WORLD_12 = 172 -keycode SDLK_WORLD_13 = 173 -keycode SDLK_WORLD_14 = 174 -keycode SDLK_WORLD_15 = 175 -keycode SDLK_WORLD_16 = 176 -keycode SDLK_WORLD_17 = 177 -keycode SDLK_WORLD_18 = 178 -keycode SDLK_WORLD_19 = 179 -keycode SDLK_WORLD_20 = 180 -keycode SDLK_WORLD_21 = 181 -keycode SDLK_WORLD_22 = 182 -keycode SDLK_WORLD_23 = 183 -keycode SDLK_WORLD_24 = 184 -keycode SDLK_WORLD_25 = 185 -keycode SDLK_WORLD_26 = 186 -keycode SDLK_WORLD_27 = 187 -keycode SDLK_WORLD_28 = 188 -keycode SDLK_WORLD_29 = 189 -keycode SDLK_WORLD_30 = 190 -keycode SDLK_WORLD_31 = 191 -keycode SDLK_WORLD_32 = 192 -keycode SDLK_WORLD_33 = 193 -keycode SDLK_WORLD_34 = 194 -keycode SDLK_WORLD_35 = 195 -keycode SDLK_WORLD_36 = 196 -keycode SDLK_WORLD_37 = 197 -keycode SDLK_WORLD_38 = 198 -keycode SDLK_WORLD_39 = 199 -keycode SDLK_WORLD_40 = 200 -keycode SDLK_WORLD_41 = 201 -keycode SDLK_WORLD_42 = 202 -keycode SDLK_WORLD_43 = 203 -keycode SDLK_WORLD_44 = 204 -keycode SDLK_WORLD_45 = 205 -keycode SDLK_WORLD_46 = 206 -keycode SDLK_WORLD_47 = 207 -keycode SDLK_WORLD_48 = 208 -keycode SDLK_WORLD_49 = 2 -keycode SDLK_WORLD_50 = 210 -keycode SDLK_WORLD_51 = 211 -keycode SDLK_WORLD_52 = 212 -keycode SDLK_WORLD_53 = 213 -keycode SDLK_WORLD_54 = 214 -keycode SDLK_WORLD_55 = 215 -keycode SDLK_WORLD_56 = 216 -keycode SDLK_WORLD_57 = 217 -keycode SDLK_WORLD_58 = 218 -keycode SDLK_WORLD_59 = 219 -keycode SDLK_WORLD_60 = 220 -keycode SDLK_WORLD_61 = 221 -keycode SDLK_WORLD_62 = 222 -keycode SDLK_WORLD_63 = 223 -keycode SDLK_WORLD_64 = 224 -keycode SDLK_WORLD_65 = 225 -keycode SDLK_WORLD_66 = 226 -keycode SDLK_WORLD_67 = 227 -keycode SDLK_WORLD_68 = 228 -keycode SDLK_WORLD_69 = 229 -keycode SDLK_WORLD_70 = 230 -keycode SDLK_WORLD_71 = 231 -keycode SDLK_WORLD_72 = 232 -keycode SDLK_WORLD_73 = 233 -keycode SDLK_WORLD_74 = 234 -keycode SDLK_WORLD_75 = 235 -keycode SDLK_WORLD_76 = 236 -keycode SDLK_WORLD_77 = 237 -keycode SDLK_WORLD_78 = 238 -keycode SDLK_WORLD_79 = 239 -keycode SDLK_WORLD_80 = 240 -keycode SDLK_WORLD_81 = 241 -keycode SDLK_WORLD_82 = 242 -keycode SDLK_WORLD_83 = 243 -keycode SDLK_WORLD_84 = 244 -keycode SDLK_WORLD_85 = 245 -keycode SDLK_WORLD_86 = 246 -keycode SDLK_WORLD_87 = 247 -keycode SDLK_WORLD_88 = 248 -keycode SDLK_WORLD_89 = 249 -keycode SDLK_WORLD_90 = 250 -keycode SDLK_WORLD_91 = 251 -keycode SDLK_WORLD_92 = 252 -keycode SDLK_WORLD_93 = 253 -keycode SDLK_WORLD_94 = 254 -keycode SDLK_WORLD_95 = 255 - -#******************************************** - -keycode SDLK_KP0 = 256 -keycode SDLK_KP1 = 257 -keycode SDLK_KP2 = 258 -keycode SDLK_KP3 = 259 -keycode SDLK_KP4 = 260 -keycode SDLK_KP5 = 261 -keycode SDLK_KP6 = 262 -keycode SDLK_KP7 = 263 -keycode SDLK_KP8 = 264 -keycode SDLK_KP9 = 265 -keycode SDLK_KP_PERIOD = 266 -keycode SDLK_KP_DIVIDE = 267 -keycode SDLK_KP_MULTIPLY = 268 -keycode SDLK_KP_MINUS = 269 -keycode SDLK_KP_PLUS = 270 -keycode SDLK_KP_ENTER = 271 -keycode SDLK_KP_EQUALS = 272 - -#******************************************** - -keycode SDLK_UP = 273 -keycode SDLK_DOWN = 274 -keycode SDLK_RIGHT = 275 -keycode SDLK_LEFT = 276 -keycode SDLK_INSERT = 277 -keycode SDLK_HOME = 278 -keycode SDLK_END = 279 -keycode SDLK_PAGEUP = 280 -keycode SDLK_PAGEDOWN = 281 - -#******************************************** - -keycode SDLK_F1 = 282 -keycode SDLK_F2 = 283 -keycode SDLK_F3 = 284 -keycode SDLK_F4 = 285 -keycode SDLK_F5 = 286 -keycode SDLK_F6 = 287 -keycode SDLK_F7 = 288 -keycode SDLK_F8 = 289 -keycode SDLK_F9 = 290 -keycode SDLK_F10 = 291 -keycode SDLK_F11 = 292 -keycode SDLK_F12 = 293 -keycode SDLK_F13 = 294 -keycode SDLK_F14 = 295 -keycode SDLK_F15 = 296 - -#******************************************** - -keycode SDLK_NUMLOCK = 300 -keycode SDLK_CAPSLOCK = 301 -keycode SDLK_SCROLLOCK = 302 -keycode SDLK_RSHIFT = 303 -keycode SDLK_LSHIFT = 304 -keycode SDLK_RCTRL = 305 -keycode SDLK_LCTRL = 306 -keycode SDLK_RALT = 307 -keycode SDLK_LALT = 308 -keycode SDLK_RMETA = 3 -keycode SDLK_LMETA = 310 -keycode SDLK_LSUPER = 311 -keycode SDLK_RSUPER = 312 -keycode SDLK_MODE = 313 -keycode SDLK_COMPOSE = 314 - -#******************************************** - -keycode SDLK_HELP = 315 -keycode SDLK_PRINT = 316 -keycode SDLK_SYSREQ = 317 -keycode SDLK_BREAK = 318 -keycode SDLK_MENU = 319 -keycode SDLK_POWER = 320 -keycode SDLK_EURO = 321 -keycode SDLK_UNDO = 322 - -#******************************************** diff --git a/control b/control deleted file mode 100644 index b2ab100..0000000 --- a/control +++ /dev/null @@ -1,12 +0,0 @@ -Package: tuxanci-ng -Version: svn27 -Section: Game -Priority: optional -Depends: libc6 (>= 2.2.4-4), libsdl1.2debian (>= 1.2), libsdl-image1.2 (>= 1.2), libsdl-mixer1.2 (>= 1.2), libsdl-net1.2 (>= 1.2), libsdl-ttf2.0-0 (>= 2.0) -Architecture: i386 -Installed-Size: 4510 -Maintainer: Dušan Ďurech -Description: Game tuxanci next generation SVN revision 27 - Game tuxanci next generation SVN revision 27 - . - http://www.tuxanci.org diff --git a/current_config.h b/current_config.h deleted file mode 100644 index e8a73bd..0000000 --- a/current_config.h +++ /dev/null @@ -1 +0,0 @@ -#define SUPPORT_NET_SDL_UDP diff --git a/data/AUTHORS b/data/AUTHORS new file mode 100644 index 0000000..e69de29 diff --git a/data/LICENCE b/data/LICENCE new file mode 100644 index 0000000..553e45a --- /dev/null +++ b/data/LICENCE @@ -0,0 +1,345 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; 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 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. \ No newline at end of file diff --git a/data/README.sk b/data/README.sk new file mode 100644 index 0000000..c8b65e2 --- /dev/null +++ b/data/README.sk @@ -0,0 +1,109 @@ + + *** + + Navod ako skompilovat zdrojove kody + + *** + + Projekt sa da kompilovat ako hra ( client ) s GUI, alebo ako herny server + + ************************************************ + + kompilacia hry s GUI + + Pri kompilacii, hry ako grafickeho klienta sa potrebuju kniznice : + (g)libc, SDL, SDL_Image, SDL_Mixer, SDL_ttf, SDL_Net + v ratane hlavickovych suborov a konfiguracnych striptov ( sdl-config ) + + ldd -u `which tuxanci-ng` + Unused direct dependencies: + /usr/lib/libSDL-1.2.so.0 + /usr/lib/libSDL_image-1.2.so.0 + /usr/lib/libSDL_ttf-2.0.so.0 + /usr/lib/libSDL_mixer-1.2.so.0 + /usr/lib/libSDL_net-1.2.so.0 + + make clean + ---------- + + pre istotu vymazeme subory z predchadzajucej kompilacie + + v subore config.h do makra DESTDIR ulozime nas prefix-path, + ktory sa natvrdo skompiluje do programu + #define DESTDIR "/usr/local/" + + Ak toto makro nebude existovat, program bude pouzivat svoje podaresare :) + ( vhodne pri vyvoji, ked sa casto menia subory ) + + make mod + -------- + + skompilujeme moduly hry + + su + -- + + prepneme sa na roota + + make install DESTDIR=/usr/local + nainstalujeme subory, DESTDIR urcuje kam sa budu subory kopirovat. + bolo by dobre, keby sa rovnala hodnoty makru DESTDIR, ale nie je to podmienka. + Ak bude hodnota makra DESTDIR a premennej DESTDIR v Makefile rozdielna, program + si nenajde svoje subory. + + tuxanci-ng + ---------- + Program spustime tymto prikazom. + Hra si vytvara domovsky adresar v domovskom adresari uzivatela ~/.tuxanci-ng + + make uninstall DESTDIR=/usr/local + --------------------------------- + + Program sa odinstaluje + + ************************************************ + + kompilacia herneho servera + + Pri kompilacii, herneho servera musi existovat makro PUBLIC_SERVER v config.h + Je automaticky zakomentovane, tak ho pls. odkomentujte + + Makro DESTDIR, nehra pri kompilacii herneho server ziadnu rolu. Server pouziva + svoje podadresare a ani sa neinstaluje + + make clean + ---------- + + pre istotu vymazame subory z predchadzajucej kompilacie. + + make server + ----------- + + kompilujeme server + + make servermod + -------------- + + skompilumjeme moduly pre server + + ./build-server/publicserver + -------------- + + Spustame server + + konfiguracia servera je v server.conf : + + IP4 0.0.0.0 # IPv4 adresa + IP6 ::1 # IPv6 adresa + PORTv4 2200 # sietovy port pre IPv4 aredu + PORTv6 2206 # sietovy port pre IPv4 aredu + MAX_CLIENTS 32 # maximalny pocet clientov + ARENA FAGN # sietovy nazov areny + + + ************************************************ + + Dušan Ďurech + email: Dusan.D@Centrum.Sk + jabber IM: Oroborus@Jabbim.sk + //fakt narychlo napisane diff --git a/data/arena/ba_in_a_captivity_of_8-bit.map b/data/arena/ba_in_a_captivity_of_8-bit.map new file mode 100644 index 0000000..345916e --- /dev/null +++ b/data/arena/ba_in_a_captivity_of_8-bit.map @@ -0,0 +1,107 @@ + +name In a captivity of 8-bit +netName BAIACO8B +screen ba_in_a_captivity_of_8-bit.png + +loadModule file="libmodWall.so" +loadModule file="libmodTeleport.so" + +loadMusic file="in_a_captivity_of_8-bit.ogg" name="in_a_captivity_of_8-bit" + +loadImage file="l3.nic.png" name="nic" alpha="no" +loadImage file="l3.ihlan.png" name="ihlan" alpha="yes" +loadImage file="l3.kvader1.png" name="kvader1" alpha="yes" +loadImage file="l3.kvader2.png" name="kvader2" alpha="yes" +loadImage file="l3.teleport.png" name="teleport" alpha="yes" + +arena background="nic" w="2500" h="2500" + +playMusic music="in_a_captivity_of_8-bit" + +#wall rel="1" x="512" y="320" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +#wall rel="1" x="273" y="152" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +#wall rel="1" x="90" y="275" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" + +wwall rel="1" x="1518" y="426" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="1479" y="1228" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="1139" y="2241" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="1854" y="1988" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="270" y="140" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="1254" y="1107" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="1717" y="803" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="2228" y="771" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="1986" y="2311" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="2125" y="2299" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="2000" y="71" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="1077" y="1214" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="302" y="1194" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="2175" y="109" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="571" y="1964" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="328" y="387" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="1616" y="1378" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="2471" y="659" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="147" y="1607" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="1748" y="1825" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="433" y="1769" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="73" y="1854" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="125" y="1002" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="2165" y="1153" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="952" y="963" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="1035" y="642" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="708" y="1804" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1850" y="964" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1074" y="1011" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="475" y="1525" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="765" y="497" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1875" y="2156" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="315" y="1233" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="340" y="698" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="23" y="1815" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1084" y="2088" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="295" y="1808" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1663" y="9" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1162" y="1772" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="236" y="180" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="823" y="2115" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="271" y="1271" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1087" y="1531" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1394" y="2122" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="2499" y="1013" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1510" y="1870" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="378" y="764" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1997" y="2237" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1787" y="693" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="1360" y="1190" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="2130" y="1811" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="2471" y="2445" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="2454" y="2425" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1698" y="1634" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1815" y="2469" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="2084" y="1934" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="2057" y="1490" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1873" y="1207" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="829" y="644" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1658" y="768" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1490" y="2181" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1797" y="2020" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="610" y="720" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1413" y="147" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1337" y="2397" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="560" y="274" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1571" y="967" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="893" y="532" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1018" y="377" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="346" y="91" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="877" y="333" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="675" y="1282" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="2490" y="434" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="2430" y="49" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="2169" y="2171" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" +wall rel="1" x="1852" y="440" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" + + +teleport x="100" y="100" w="58" h="58" layer="-1" image="teleport" +teleport x="2342" y="100" w="58" h="58" layer="-1" image="teleport" +teleport x="100" y="2342" w="58" h="58" layer="-1" image="teleport" +teleport x="2342" y="2342" w="58" h="58" layer="-1" image="teleport" + diff --git a/data/arena/construction_site.map b/data/arena/construction_site.map new file mode 100644 index 0000000..baed284 --- /dev/null +++ b/data/arena/construction_site.map @@ -0,0 +1,27 @@ + +name construction site +netName CS +screen construction_site.png + +loadModule file="libmodWall.so" + +loadMusic file="night_workshift.ogg" name="night_workshift" + +loadImage file="l4.pozadi.png" name="pozadi" alpha="no" +loadImage file="l4.bagr.png" name="bagr" alpha="yes" +loadImage file="l4.pytle.png" name="pytle" alpha="yes" +loadImage file="l4.tvarnice.png" name="tvarnice" alpha="yes" +loadImage file="l4.palety.png" name="palety" alpha="yes" +loadImage file="l4.overlay.png" name="overlay" alpha="yes" + +arena background="pozadi" w="800" h="600" + +playMusic music="night_workshift" + +wall x="96" y="423" w="162" h="96" img_x="86" img_y="235" layer="0" image="bagr" +wall x="425" y="358" w="120" h="55" img_x="410" img_y="326" layer="0" image="pytle" +wall x="55" y="52" w="62" h="87" img_x="51" img_y="37" layer="0" image="tvarnice" +wall x="92" y="0" w="198" h="118" img_x="65" img_y="0" layer="0" image="palety" +wall x="0" y="0" w="0" h="0" img_x="0" img_y="0" layer="1" image="overlay" + + diff --git a/data/arena/for_a_good_night.map b/data/arena/for_a_good_night.map new file mode 100644 index 0000000..da33cac --- /dev/null +++ b/data/arena/for_a_good_night.map @@ -0,0 +1,23 @@ + +name For a good night +netName FAGN +screen for_a_good_night.png + +loadModule file="libmodWall.so" + +loadMusic file="for_a_good_night.ogg" name="for_a_good_night" + +loadImage file="l1.grow.png" name="grow" alpha="no" +loadImage file="l1.hut.png" name="hut" alpha="yes" +loadImage file="l1.peduncle.png" name="peduncle" alpha="yes" +loadImage file="l1.tree.png" name="tree" alpha="yes" +loadImage file="l1.wood.png" name="wood" alpha="yes" + +arena background="grow" w="800" h="600" + +playMusic music="for_a_good_night" + +wall x="1" y="1" w="0" h="0" img_x="75" img_y="20" layer="1" image="hut" +wall x="120" y="159" w="180" h="65" img_x="90" img_y="159" layer="0" image="peduncle" +wall x="520" y="260" w="161" h="100" img_x="500" img_y="180" layer="0" image="tree" +wall x="220" y="400" w="110" h="10" img_x="200" img_y="370" layer="0" image="wood" diff --git a/data/arena/in_a_captivity_of_8-bit.map b/data/arena/in_a_captivity_of_8-bit.map new file mode 100644 index 0000000..ca0eca2 --- /dev/null +++ b/data/arena/in_a_captivity_of_8-bit.map @@ -0,0 +1,31 @@ + +name In a captivity of 8-bit +netName IACO8B +screen in_a_captivity_of_8-bit.png + +loadModule file="libmodWall.so" +loadModule file="libmodTeleport.so" + +loadMusic file="in_a_captivity_of_8-bit.ogg" name="in_a_captivity_of_8-bit" + +loadImage file="l3.nic.png" name="nic" alpha="no" +loadImage file="l3.ihlan.png" name="ihlan" alpha="yes" +loadImage file="l3.kvader1.png" name="kvader1" alpha="yes" +loadImage file="l3.kvader2.png" name="kvader2" alpha="yes" +loadImage file="l3.teleport.png" name="teleport" alpha="yes" + +arena background="nic" w="800" h="600" + +playMusic music="in_a_captivity_of_8-bit" + +wall rel="1" x="512" y="320" w="125" h="100" img_x="-12" img_y="-195" layer="0" image="ihlan" +wall rel="1" x="273" y="152" w="180" h="75" img_x="-23" img_y="-90" layer="0" image="kvader1" +wall rel="1" x="90" y="275" w="87" h="205" img_x="-28" img_y="-88" layer="0" image="kvader2" + +#wall x="512" y="320" w="125" h="100" img_x="500" img_y="125" layer="0" image="ihlan" +#wall x="273" y="152" w="180" h="75" img_x="250" img_y="62" layer="0" image="kvader1" +#wall x="90" y="275" w="87" h="205" img_x="62" img_y="187" layer="0" image="kvader2" + +teleport x="112" y="112" w="58" h="58" layer="-1" image="teleport" +teleport x="375" y="375" w="58" h="58" layer="-1" image="teleport" +teleport x="700" y="120" w="58" h="58" layer="-1" image="teleport" diff --git a/data/arena/night_workshift.map b/data/arena/night_workshift.map new file mode 100644 index 0000000..24282bc --- /dev/null +++ b/data/arena/night_workshift.map @@ -0,0 +1,35 @@ + +name night workshift +netName NW +screen night_workshift.png + +loadModule file="libmodWall.so" +loadModule file="libmodPipe.so" + +loadMusic file="night_workshift.ogg" name="night_workshift" + +loadImage file="l2.pitch.png" name="pitch" alpha="no" +loadImage file="l2.potrubi.png" name="potrubi" alpha="yes" +loadImage file="l2.retez.png" name="retez" alpha="yes" +loadImage file="l2.barel.png" name="barel" alpha="yes" +loadImage file="l2.nadrz.png" name="nadrz" alpha="yes" +loadImage file="l2.trubky.png" name="trubky" alpha="yes" +loadImage file="l2.trubka2.png" name="trubka2" alpha="yes" +loadImage file="l2.trubka6.png" name="trubka6" alpha="yes" +loadImage file="l2.trubka4.png" name="trubka4" alpha="yes" +loadImage file="l2.trubka8.png" name="trubka8" alpha="yes" + +arena background="pitch" w="800" h="600" + +playMusic music="night_workshift" + +wall x="0" y="0" w="0" h="0" img_x="0" img_y="366" layer="1" image="potrubi" +wall x="0" y="0" w="0" h="0" img_x="393" img_y="20" layer="1" image="retez" +wall x="535" y="480" w="175" h="31" img_x="531" img_y="421" layer="0" image="barel" +wall x="333" y="146" w="287" h="18" img_x="331" img_y="2" layer="0" image="nadrz" +wall x="125" y="318" w="37" h="162" img_x="106" img_y="320" layer="0" image="trubky" + +pipe x="187" y="0" w="50" h="100" layer="0" position="2" id="1" id_out="4" image="trubka2" +pipe x="0" y="187" w="100" h="50" layer="0" position="6" id="2" id_out="3" image="trubka6" +pipe x="737" y="312" w="100" h="50" layer="0" position="4" id="3" id_out="2" image="trubka4" +pipe x="400" y="500" w="50" h="100" layer="0" position="8" id="4" id_out="1" image="trubka8" diff --git a/data/conf/keytable.conf b/data/conf/keytable.conf new file mode 100755 index 0000000..236b72c --- /dev/null +++ b/data/conf/keytable.conf @@ -0,0 +1,273 @@ + +#******************************************** + +# +# Key table : +# + +#******************************************** + +keycode SDLK_FIRST = 0 +keycode SDLK_BACKSPACE = 8 +keycode SDLK_TAB = 9 +keycode SDLK_CLEAR = 12 +keycode SDLK_RETURN = 13 +keycode SDLK_PAUSE = 19 +keycode SDLK_ESCAPE = 27 +keycode SDLK_SPACE = 32 +keycode SDLK_EXCLAIM = 33 +keycode SDLK_QUOTEDBL = 34 +keycode SDLK_HASH = 35 +keycode SDLK_DOLLAR = 36 +keycode SDLK_AMPERSAND = 38 +keycode SDLK_QUOTE = 39 +keycode SDLK_LEFTPAREN = 40 +keycode SDLK_RIGHTPAREN = 41 +keycode SDLK_ASTERISK = 42 +keycode SDLK_PLUS = 43 +keycode SDLK_COMMA = 44 +keycode SDLK_MINUS = 45 +keycode SDLK_PERIOD = 46 +keycode SDLK_SLASH = 47 + +#******************************************** + +keycode SDLK_0 = 48 +keycode SDLK_1 = 49 +keycode SDLK_2 = 50 +keycode SDLK_3 = 51 +keycode SDLK_4 = 52 +keycode SDLK_5 = 53 +keycode SDLK_6 = 54 +keycode SDLK_7 = 55 +keycode SDLK_8 = 56 +keycode SDLK_9 = 57 + +#******************************************** + +keycode SDLK_COLON = 58 +keycode SDLK_SEMICOLON = 59 +keycode SDLK_LESS = 60 +keycode SDLK_EQUALS = 61 +keycode SDLK_GREATER = 62 +keycode SDLK_QUESTION = 63 +keycode SDLK_AT = 64 + +#******************************************** + +keycode SDLK_LEFTBRACKET = 91 +keycode SDLK_BACKSLASH = 92 +keycode SDLK_RIGHTBRACKET = 93 +keycode SDLK_CARET = 94 +keycode SDLK_UNDERSCORE = 95 +keycode SDLK_BACKQUOTE = 96 + +#******************************************** + +keycode SDLK_a = 97 +keycode SDLK_b = 98 +keycode SDLK_c = 99 +keycode SDLK_d = 100 +keycode SDLK_e = 101 +keycode SDLK_f = 102 +keycode SDLK_g = 103 +keycode SDLK_h = 104 +keycode SDLK_i = 105 +keycode SDLK_j = 106 +keycode SDLK_k = 107 +keycode SDLK_l = 108 +keycode SDLK_m = 1 +keycode SDLK_n = 110 +keycode SDLK_o = 111 +keycode SDLK_p = 112 +keycode SDLK_q = 113 +keycode SDLK_r = 114 +keycode SDLK_s = 115 +keycode SDLK_t = 116 +keycode SDLK_u = 117 +keycode SDLK_v = 118 +keycode SDLK_w = 119 +keycode SDLK_x = 120 +keycode SDLK_y = 121 +keycode SDLK_z = 122 +keycode SDLK_DELETE = 127 + +#******************************************** + +keycode SDLK_WORLD_0 = 160 +keycode SDLK_WORLD_1 = 161 +keycode SDLK_WORLD_2 = 162 +keycode SDLK_WORLD_3 = 163 +keycode SDLK_WORLD_4 = 164 +keycode SDLK_WORLD_5 = 165 +keycode SDLK_WORLD_6 = 166 +keycode SDLK_WORLD_7 = 167 +keycode SDLK_WORLD_8 = 168 +keycode SDLK_WORLD_9 = 169 +keycode SDLK_WORLD_10 = 170 +keycode SDLK_WORLD_11 = 171 +keycode SDLK_WORLD_12 = 172 +keycode SDLK_WORLD_13 = 173 +keycode SDLK_WORLD_14 = 174 +keycode SDLK_WORLD_15 = 175 +keycode SDLK_WORLD_16 = 176 +keycode SDLK_WORLD_17 = 177 +keycode SDLK_WORLD_18 = 178 +keycode SDLK_WORLD_19 = 179 +keycode SDLK_WORLD_20 = 180 +keycode SDLK_WORLD_21 = 181 +keycode SDLK_WORLD_22 = 182 +keycode SDLK_WORLD_23 = 183 +keycode SDLK_WORLD_24 = 184 +keycode SDLK_WORLD_25 = 185 +keycode SDLK_WORLD_26 = 186 +keycode SDLK_WORLD_27 = 187 +keycode SDLK_WORLD_28 = 188 +keycode SDLK_WORLD_29 = 189 +keycode SDLK_WORLD_30 = 190 +keycode SDLK_WORLD_31 = 191 +keycode SDLK_WORLD_32 = 192 +keycode SDLK_WORLD_33 = 193 +keycode SDLK_WORLD_34 = 194 +keycode SDLK_WORLD_35 = 195 +keycode SDLK_WORLD_36 = 196 +keycode SDLK_WORLD_37 = 197 +keycode SDLK_WORLD_38 = 198 +keycode SDLK_WORLD_39 = 199 +keycode SDLK_WORLD_40 = 200 +keycode SDLK_WORLD_41 = 201 +keycode SDLK_WORLD_42 = 202 +keycode SDLK_WORLD_43 = 203 +keycode SDLK_WORLD_44 = 204 +keycode SDLK_WORLD_45 = 205 +keycode SDLK_WORLD_46 = 206 +keycode SDLK_WORLD_47 = 207 +keycode SDLK_WORLD_48 = 208 +keycode SDLK_WORLD_49 = 2 +keycode SDLK_WORLD_50 = 210 +keycode SDLK_WORLD_51 = 211 +keycode SDLK_WORLD_52 = 212 +keycode SDLK_WORLD_53 = 213 +keycode SDLK_WORLD_54 = 214 +keycode SDLK_WORLD_55 = 215 +keycode SDLK_WORLD_56 = 216 +keycode SDLK_WORLD_57 = 217 +keycode SDLK_WORLD_58 = 218 +keycode SDLK_WORLD_59 = 219 +keycode SDLK_WORLD_60 = 220 +keycode SDLK_WORLD_61 = 221 +keycode SDLK_WORLD_62 = 222 +keycode SDLK_WORLD_63 = 223 +keycode SDLK_WORLD_64 = 224 +keycode SDLK_WORLD_65 = 225 +keycode SDLK_WORLD_66 = 226 +keycode SDLK_WORLD_67 = 227 +keycode SDLK_WORLD_68 = 228 +keycode SDLK_WORLD_69 = 229 +keycode SDLK_WORLD_70 = 230 +keycode SDLK_WORLD_71 = 231 +keycode SDLK_WORLD_72 = 232 +keycode SDLK_WORLD_73 = 233 +keycode SDLK_WORLD_74 = 234 +keycode SDLK_WORLD_75 = 235 +keycode SDLK_WORLD_76 = 236 +keycode SDLK_WORLD_77 = 237 +keycode SDLK_WORLD_78 = 238 +keycode SDLK_WORLD_79 = 239 +keycode SDLK_WORLD_80 = 240 +keycode SDLK_WORLD_81 = 241 +keycode SDLK_WORLD_82 = 242 +keycode SDLK_WORLD_83 = 243 +keycode SDLK_WORLD_84 = 244 +keycode SDLK_WORLD_85 = 245 +keycode SDLK_WORLD_86 = 246 +keycode SDLK_WORLD_87 = 247 +keycode SDLK_WORLD_88 = 248 +keycode SDLK_WORLD_89 = 249 +keycode SDLK_WORLD_90 = 250 +keycode SDLK_WORLD_91 = 251 +keycode SDLK_WORLD_92 = 252 +keycode SDLK_WORLD_93 = 253 +keycode SDLK_WORLD_94 = 254 +keycode SDLK_WORLD_95 = 255 + +#******************************************** + +keycode SDLK_KP0 = 256 +keycode SDLK_KP1 = 257 +keycode SDLK_KP2 = 258 +keycode SDLK_KP3 = 259 +keycode SDLK_KP4 = 260 +keycode SDLK_KP5 = 261 +keycode SDLK_KP6 = 262 +keycode SDLK_KP7 = 263 +keycode SDLK_KP8 = 264 +keycode SDLK_KP9 = 265 +keycode SDLK_KP_PERIOD = 266 +keycode SDLK_KP_DIVIDE = 267 +keycode SDLK_KP_MULTIPLY = 268 +keycode SDLK_KP_MINUS = 269 +keycode SDLK_KP_PLUS = 270 +keycode SDLK_KP_ENTER = 271 +keycode SDLK_KP_EQUALS = 272 + +#******************************************** + +keycode SDLK_UP = 273 +keycode SDLK_DOWN = 274 +keycode SDLK_RIGHT = 275 +keycode SDLK_LEFT = 276 +keycode SDLK_INSERT = 277 +keycode SDLK_HOME = 278 +keycode SDLK_END = 279 +keycode SDLK_PAGEUP = 280 +keycode SDLK_PAGEDOWN = 281 + +#******************************************** + +keycode SDLK_F1 = 282 +keycode SDLK_F2 = 283 +keycode SDLK_F3 = 284 +keycode SDLK_F4 = 285 +keycode SDLK_F5 = 286 +keycode SDLK_F6 = 287 +keycode SDLK_F7 = 288 +keycode SDLK_F8 = 289 +keycode SDLK_F9 = 290 +keycode SDLK_F10 = 291 +keycode SDLK_F11 = 292 +keycode SDLK_F12 = 293 +keycode SDLK_F13 = 294 +keycode SDLK_F14 = 295 +keycode SDLK_F15 = 296 + +#******************************************** + +keycode SDLK_NUMLOCK = 300 +keycode SDLK_CAPSLOCK = 301 +keycode SDLK_SCROLLOCK = 302 +keycode SDLK_RSHIFT = 303 +keycode SDLK_LSHIFT = 304 +keycode SDLK_RCTRL = 305 +keycode SDLK_LCTRL = 306 +keycode SDLK_RALT = 307 +keycode SDLK_LALT = 308 +keycode SDLK_RMETA = 3 +keycode SDLK_LMETA = 310 +keycode SDLK_LSUPER = 311 +keycode SDLK_RSUPER = 312 +keycode SDLK_MODE = 313 +keycode SDLK_COMPOSE = 314 + +#******************************************** + +keycode SDLK_HELP = 315 +keycode SDLK_PRINT = 316 +keycode SDLK_SYSREQ = 317 +keycode SDLK_BREAK = 318 +keycode SDLK_MENU = 319 +keycode SDLK_POWER = 320 +keycode SDLK_EURO = 321 +keycode SDLK_UNDO = 322 + +#******************************************** diff --git a/data/conf/server.conf b/data/conf/server.conf new file mode 100644 index 0000000..e34a73b --- /dev/null +++ b/data/conf/server.conf @@ -0,0 +1,7 @@ +NAME oroborus gameserver +IP4 0.0.0.0 +#IP6 ::1 +PORTv4 2200 +#PORTv6 2206 +MAX_CLIENTS 32 +ARENA BAIACO8B diff --git a/data/font/DejaVuSans.ttf b/data/font/DejaVuSans.ttf new file mode 100755 index 0000000..cc767e6 Binary files /dev/null and b/data/font/DejaVuSans.ttf differ diff --git a/data/image/ba_in_a_captivity_of_8-bit.png b/data/image/ba_in_a_captivity_of_8-bit.png new file mode 100644 index 0000000..4d2158c Binary files /dev/null and b/data/image/ba_in_a_captivity_of_8-bit.png differ diff --git a/data/image/big-explosion.png b/data/image/big-explosion.png new file mode 100644 index 0000000..a8d0586 Binary files /dev/null and b/data/image/big-explosion.png differ diff --git a/data/image/bombball.png b/data/image/bombball.png new file mode 100755 index 0000000..bb3cda7 Binary files /dev/null and b/data/image/bombball.png differ diff --git a/data/image/button0.png b/data/image/button0.png new file mode 100644 index 0000000..6dde5c6 Binary files /dev/null and b/data/image/button0.png differ diff --git a/data/image/button1.png b/data/image/button1.png new file mode 100644 index 0000000..a60f343 Binary files /dev/null and b/data/image/button1.png differ diff --git a/data/image/check.png b/data/image/check.png new file mode 100644 index 0000000..1d905c5 Binary files /dev/null and b/data/image/check.png differ diff --git a/data/image/construction_site.png b/data/image/construction_site.png new file mode 100644 index 0000000..c6aecc3 Binary files /dev/null and b/data/image/construction_site.png differ diff --git a/data/image/cross.png b/data/image/cross.png new file mode 100644 index 0000000..52636ef Binary files /dev/null and b/data/image/cross.png differ diff --git a/data/image/explosion.png b/data/image/explosion.png new file mode 100644 index 0000000..6b71c36 Binary files /dev/null and b/data/image/explosion.png differ diff --git a/data/image/for_a_good_night.png b/data/image/for_a_good_night.png new file mode 100644 index 0000000..da8e981 Binary files /dev/null and b/data/image/for_a_good_night.png differ diff --git a/data/image/graf.bonus.png b/data/image/graf.bonus.png new file mode 100644 index 0000000..6f195b1 Binary files /dev/null and b/data/image/graf.bonus.png differ diff --git a/data/image/icon.bonus.4x.png b/data/image/icon.bonus.4x.png new file mode 100644 index 0000000..cd08e3f Binary files /dev/null and b/data/image/icon.bonus.4x.png differ diff --git a/data/image/icon.bonus.ghost.png b/data/image/icon.bonus.ghost.png new file mode 100644 index 0000000..ff483f3 Binary files /dev/null and b/data/image/icon.bonus.ghost.png differ diff --git a/data/image/icon.bonus.hidden.png b/data/image/icon.bonus.hidden.png new file mode 100644 index 0000000..dfee367 Binary files /dev/null and b/data/image/icon.bonus.hidden.png differ diff --git a/data/image/icon.bonus.shot.png b/data/image/icon.bonus.shot.png new file mode 100644 index 0000000..d10c84f Binary files /dev/null and b/data/image/icon.bonus.shot.png differ diff --git a/data/image/icon.bonus.speed.png b/data/image/icon.bonus.speed.png new file mode 100644 index 0000000..1179ad6 Binary files /dev/null and b/data/image/icon.bonus.speed.png differ diff --git a/data/image/icon.bonus.teleport.png b/data/image/icon.bonus.teleport.png new file mode 100644 index 0000000..21c1f25 Binary files /dev/null and b/data/image/icon.bonus.teleport.png differ diff --git a/data/image/icon.gun.bombball.png b/data/image/icon.gun.bombball.png new file mode 100755 index 0000000..65eb972 Binary files /dev/null and b/data/image/icon.gun.bombball.png differ diff --git a/data/image/icon.gun.dual.simple.png b/data/image/icon.gun.dual.simple.png new file mode 100644 index 0000000..257c600 Binary files /dev/null and b/data/image/icon.gun.dual.simple.png differ diff --git a/data/image/icon.gun.lasser.png b/data/image/icon.gun.lasser.png new file mode 100644 index 0000000..5942665 Binary files /dev/null and b/data/image/icon.gun.lasser.png differ diff --git a/data/image/icon.gun.mine.png b/data/image/icon.gun.mine.png new file mode 100644 index 0000000..6af9154 Binary files /dev/null and b/data/image/icon.gun.mine.png differ diff --git a/data/image/icon.gun.scatter.png b/data/image/icon.gun.scatter.png new file mode 100644 index 0000000..30eb363 Binary files /dev/null and b/data/image/icon.gun.scatter.png differ diff --git a/data/image/icon.gun.simple.png b/data/image/icon.gun.simple.png new file mode 100644 index 0000000..0b7b491 Binary files /dev/null and b/data/image/icon.gun.simple.png differ diff --git a/data/image/icon.gun.tommy.png b/data/image/icon.gun.tommy.png new file mode 100644 index 0000000..dafc7a5 Binary files /dev/null and b/data/image/icon.gun.tommy.png differ diff --git a/data/image/in_a_captivity_of_8-bit.png b/data/image/in_a_captivity_of_8-bit.png new file mode 100644 index 0000000..922786e Binary files /dev/null and b/data/image/in_a_captivity_of_8-bit.png differ diff --git a/data/image/item.bombball.png b/data/image/item.bombball.png new file mode 100755 index 0000000..d310d8f Binary files /dev/null and b/data/image/item.bombball.png differ diff --git a/data/image/item.bonus.4x.png b/data/image/item.bonus.4x.png new file mode 100644 index 0000000..a74241e Binary files /dev/null and b/data/image/item.bonus.4x.png differ diff --git a/data/image/item.bonus.ghost.png b/data/image/item.bonus.ghost.png new file mode 100644 index 0000000..bee6542 Binary files /dev/null and b/data/image/item.bonus.ghost.png differ diff --git a/data/image/item.bonus.hidden.png b/data/image/item.bonus.hidden.png new file mode 100644 index 0000000..3ac96db Binary files /dev/null and b/data/image/item.bonus.hidden.png differ diff --git a/data/image/item.bonus.shot.png b/data/image/item.bonus.shot.png new file mode 100644 index 0000000..c899209 Binary files /dev/null and b/data/image/item.bonus.shot.png differ diff --git a/data/image/item.bonus.speed.png b/data/image/item.bonus.speed.png new file mode 100644 index 0000000..d228128 Binary files /dev/null and b/data/image/item.bonus.speed.png differ diff --git a/data/image/item.bonus.teleport.png b/data/image/item.bonus.teleport.png new file mode 100644 index 0000000..b2202bf Binary files /dev/null and b/data/image/item.bonus.teleport.png differ diff --git a/data/image/item.dual.png b/data/image/item.dual.png new file mode 100644 index 0000000..7747ca1 Binary files /dev/null and b/data/image/item.dual.png differ diff --git a/data/image/item.lasser.png b/data/image/item.lasser.png new file mode 100644 index 0000000..d3f7f30 Binary files /dev/null and b/data/image/item.lasser.png differ diff --git a/data/image/item.mine.png b/data/image/item.mine.png new file mode 100644 index 0000000..b774d44 Binary files /dev/null and b/data/image/item.mine.png differ diff --git a/data/image/item.scatter.png b/data/image/item.scatter.png new file mode 100644 index 0000000..7568270 Binary files /dev/null and b/data/image/item.scatter.png differ diff --git a/data/image/item.tommy.png b/data/image/item.tommy.png new file mode 100644 index 0000000..ca0fd85 Binary files /dev/null and b/data/image/item.tommy.png differ diff --git a/data/image/l1.grow.png b/data/image/l1.grow.png new file mode 100644 index 0000000..14a110e Binary files /dev/null and b/data/image/l1.grow.png differ diff --git a/data/image/l1.hut.png b/data/image/l1.hut.png new file mode 100644 index 0000000..7e42da6 Binary files /dev/null and b/data/image/l1.hut.png differ diff --git a/data/image/l1.peduncle.png b/data/image/l1.peduncle.png new file mode 100644 index 0000000..258f34c Binary files /dev/null and b/data/image/l1.peduncle.png differ diff --git a/data/image/l1.tree.png b/data/image/l1.tree.png new file mode 100644 index 0000000..5e3995e Binary files /dev/null and b/data/image/l1.tree.png differ diff --git a/data/image/l1.wood.png b/data/image/l1.wood.png new file mode 100644 index 0000000..ae1550a Binary files /dev/null and b/data/image/l1.wood.png differ diff --git a/data/image/l2.barel.png b/data/image/l2.barel.png new file mode 100644 index 0000000..8da54ef Binary files /dev/null and b/data/image/l2.barel.png differ diff --git a/data/image/l2.nadrz.png b/data/image/l2.nadrz.png new file mode 100644 index 0000000..4bc0a42 Binary files /dev/null and b/data/image/l2.nadrz.png differ diff --git a/data/image/l2.pitch.png b/data/image/l2.pitch.png new file mode 100644 index 0000000..15150ba Binary files /dev/null and b/data/image/l2.pitch.png differ diff --git a/data/image/l2.potrubi.png b/data/image/l2.potrubi.png new file mode 100644 index 0000000..3afa5ff Binary files /dev/null and b/data/image/l2.potrubi.png differ diff --git a/data/image/l2.retez.png b/data/image/l2.retez.png new file mode 100644 index 0000000..c97ea24 Binary files /dev/null and b/data/image/l2.retez.png differ diff --git a/data/image/l2.trubka2.png b/data/image/l2.trubka2.png new file mode 100644 index 0000000..f874ccc Binary files /dev/null and b/data/image/l2.trubka2.png differ diff --git a/data/image/l2.trubka4.png b/data/image/l2.trubka4.png new file mode 100644 index 0000000..7be65d2 Binary files /dev/null and b/data/image/l2.trubka4.png differ diff --git a/data/image/l2.trubka6.png b/data/image/l2.trubka6.png new file mode 100644 index 0000000..29755ae Binary files /dev/null and b/data/image/l2.trubka6.png differ diff --git a/data/image/l2.trubka8.png b/data/image/l2.trubka8.png new file mode 100644 index 0000000..6026467 Binary files /dev/null and b/data/image/l2.trubka8.png differ diff --git a/data/image/l2.trubky.png b/data/image/l2.trubky.png new file mode 100644 index 0000000..5d405ad Binary files /dev/null and b/data/image/l2.trubky.png differ diff --git a/data/image/l3.ihlan.png b/data/image/l3.ihlan.png new file mode 100644 index 0000000..20cb373 Binary files /dev/null and b/data/image/l3.ihlan.png differ diff --git a/data/image/l3.kvader1.png b/data/image/l3.kvader1.png new file mode 100644 index 0000000..67973a9 Binary files /dev/null and b/data/image/l3.kvader1.png differ diff --git a/data/image/l3.kvader2.png b/data/image/l3.kvader2.png new file mode 100644 index 0000000..d0df146 Binary files /dev/null and b/data/image/l3.kvader2.png differ diff --git a/data/image/l3.nic.png b/data/image/l3.nic.png new file mode 100644 index 0000000..3852007 Binary files /dev/null and b/data/image/l3.nic.png differ diff --git a/data/image/l3.teleport.png b/data/image/l3.teleport.png new file mode 100644 index 0000000..f901589 Binary files /dev/null and b/data/image/l3.teleport.png differ diff --git a/data/image/l4.anim.blikacka.png b/data/image/l4.anim.blikacka.png new file mode 100644 index 0000000..da353c6 Binary files /dev/null and b/data/image/l4.anim.blikacka.png differ diff --git a/data/image/l4.bagr.png b/data/image/l4.bagr.png new file mode 100644 index 0000000..a9f6a13 Binary files /dev/null and b/data/image/l4.bagr.png differ diff --git a/data/image/l4.overlay.png b/data/image/l4.overlay.png new file mode 100644 index 0000000..a8f8507 Binary files /dev/null and b/data/image/l4.overlay.png differ diff --git a/data/image/l4.palety.png b/data/image/l4.palety.png new file mode 100644 index 0000000..3a3e797 Binary files /dev/null and b/data/image/l4.palety.png differ diff --git a/data/image/l4.pozadi.png b/data/image/l4.pozadi.png new file mode 100644 index 0000000..9d9b214 Binary files /dev/null and b/data/image/l4.pozadi.png differ diff --git a/data/image/l4.pytle.png b/data/image/l4.pytle.png new file mode 100644 index 0000000..ea6a1f3 Binary files /dev/null and b/data/image/l4.pytle.png differ diff --git a/data/image/l4.tvarnice.png b/data/image/l4.tvarnice.png new file mode 100644 index 0000000..0f2d99a Binary files /dev/null and b/data/image/l4.tvarnice.png differ diff --git a/data/image/lasserX.png b/data/image/lasserX.png new file mode 100644 index 0000000..191af4d Binary files /dev/null and b/data/image/lasserX.png differ diff --git a/data/image/lasserY.png b/data/image/lasserY.png new file mode 100644 index 0000000..b64a346 Binary files /dev/null and b/data/image/lasserY.png differ diff --git a/data/image/level4.png b/data/image/level4.png new file mode 100644 index 0000000..0136b2b Binary files /dev/null and b/data/image/level4.png differ diff --git a/data/image/mine.png b/data/image/mine.png new file mode 100644 index 0000000..6e8b373 Binary files /dev/null and b/data/image/mine.png differ diff --git a/data/image/naboj.png b/data/image/naboj.png new file mode 100644 index 0000000..2985273 Binary files /dev/null and b/data/image/naboj.png differ diff --git a/data/image/night_workshift.png b/data/image/night_workshift.png new file mode 100644 index 0000000..08f4c42 Binary files /dev/null and b/data/image/night_workshift.png differ diff --git a/data/image/panel.png b/data/image/panel.png new file mode 100644 index 0000000..24a8e6c Binary files /dev/null and b/data/image/panel.png differ diff --git a/data/image/panel_shot.png b/data/image/panel_shot.png new file mode 100644 index 0000000..2985273 Binary files /dev/null and b/data/image/panel_shot.png differ diff --git a/data/image/pokus.png b/data/image/pokus.png new file mode 100644 index 0000000..9e66d2e Binary files /dev/null and b/data/image/pokus.png differ diff --git a/data/image/radar.png b/data/image/radar.png new file mode 100644 index 0000000..f7d6f62 Binary files /dev/null and b/data/image/radar.png differ diff --git a/data/image/screen_main.png b/data/image/screen_main.png new file mode 100644 index 0000000..9734d1a Binary files /dev/null and b/data/image/screen_main.png differ diff --git a/data/image/screen_table.png b/data/image/screen_table.png new file mode 100644 index 0000000..769496e Binary files /dev/null and b/data/image/screen_table.png differ diff --git a/data/image/shot.png b/data/image/shot.png new file mode 100644 index 0000000..3d6ebc7 Binary files /dev/null and b/data/image/shot.png differ diff --git a/data/image/textfield0.png b/data/image/textfield0.png new file mode 100644 index 0000000..f6cc862 Binary files /dev/null and b/data/image/textfield0.png differ diff --git a/data/image/textfield1.png b/data/image/textfield1.png new file mode 100644 index 0000000..2b0aad8 Binary files /dev/null and b/data/image/textfield1.png differ diff --git a/data/image/tux2.png b/data/image/tux2.png new file mode 100644 index 0000000..cae602b Binary files /dev/null and b/data/image/tux2.png differ diff --git a/data/image/tux4.png b/data/image/tux4.png new file mode 100644 index 0000000..f5e46fb Binary files /dev/null and b/data/image/tux4.png differ diff --git a/data/image/tux6.png b/data/image/tux6.png new file mode 100644 index 0000000..286b80a Binary files /dev/null and b/data/image/tux6.png differ diff --git a/data/image/tux8.png b/data/image/tux8.png new file mode 100644 index 0000000..cfbf80a Binary files /dev/null and b/data/image/tux8.png differ diff --git a/data/image/tuxanci.png b/data/image/tuxanci.png new file mode 100644 index 0000000..34b770b Binary files /dev/null and b/data/image/tuxanci.png differ diff --git a/data/lang/CMakeLists.txt b/data/lang/CMakeLists.txt new file mode 100644 index 0000000..17feca8 --- /dev/null +++ b/data/lang/CMakeLists.txt @@ -0,0 +1,6 @@ +# vyroba jazyku pomoci gettexu doufam ze na nej prejdem +IF ( HAVE_GETTEXT ) + INCLUDE( Po ) + COMPILE_PO_FILES( ${CMAKE_SOURCE_DIR}/po MO_FILES ) + ADD_CUSTOM_TARGET( mofiles ALL DEPENDS ${MO_FILES} ) +ENDIF ( HAVE_GETTEXT ) diff --git a/data/lang/cs.lang b/data/lang/cs.lang new file mode 100644 index 0000000..9920dfa --- /dev/null +++ b/data/lang/cs.lang @@ -0,0 +1,46 @@ +### +# Czech translation file +# Author: xHire +### + +# about the author of this translation +AUTHOR xHire +AUTHOR_EMAIL xhire@tuxportal.cz +AUTHOR_JABBER Miczek@gmail.com + +# specify font for this language +HEAD fontfile="DejaVuSans.ttf" fontsize="16" + +# general +OK Ok +BACK Zpět +NEXT Další + +# browser +REFRESH Obnovit + +# error message +ERROR_BAD_VERSION Máte verzi klienta, kterou server nepodporuje. +ERROR_SERVER_DONT_ALIVE Server neodpovida. + +# main menu +PLAY Hraj +SETTING Nastavení +TABLE Top Skóre +CREDITS Autoři +END Konec + +# settings - menu +COUNT_ROUND Počet kol: +NAME_PLAYER1 Hráč 1: +NAME_PLAYER2 Hráč 2: +MUSIC Hudba: +SOUND Zvuky: + +# settings - game type +NONE Lokální hra +SERVER Vytvoření serveru +CLIENT Síťová hra +IP_ADDR IP adresa serveru: +NET_PORT Síťový port: +BROWSER Vyhledávač diff --git a/data/lang/en.lang b/data/lang/en.lang new file mode 100644 index 0000000..2fbfaca --- /dev/null +++ b/data/lang/en.lang @@ -0,0 +1,46 @@ +### +# Englis translation file +# Author: Oroborus +### + +# about the author of this translation +AUTHOR Oroborus +AUTHOR_EMAIL dusan.d@centrum.sk +AUTHOR_JABBER oroborus@jabbim.sk + +# specify font for this language +HEAD fontfile="DejaVuSans.ttf" fontsize="16" + +# general +OK Ok +BACK Back +NEXT Next + +# browser +REFRESH Refresh + +# error message +ERROR_BAD_VERSION Version of your client isn't supported by the server. +ERROR_SERVER_DONT_ALIVE Server's not responding, connection was closed. + +# main menu +PLAY Play +SETTING Settings +TABLE Top Score +CREDITS Credits +END End + +# settings - menu +COUNT_ROUND Count Round: +NAME_PLAYER1 Player 1: +NAME_PLAYER2 Player 2: +MUSIC Music: +SOUND Sound: +BROWSER Browser + +# settings - game type +NONE Local game +SERVER Set up a server +CLIENT Network game +IP_ADDR IP address: +NET_PORT Network port: diff --git a/data/lang/fr.lang b/data/lang/fr.lang new file mode 100644 index 0000000..84a1326 --- /dev/null +++ b/data/lang/fr.lang @@ -0,0 +1,39 @@ +### +# Englis translation file +# Author: Oroborus +### + +# about the author of this translation +AUTHOR MeV +AUTHOR_EMAIL chrystalyst@free.fr +AUTHOR_JABBER unknown + + +# specify font for this language +HEAD fontfile="DejaVuSans.ttf" fontsize="16" + +# general +OK Ok +BACK Précédent +NEXT Suivant + +# browser +REFRESH Refresh + +# error message +ERROR_BAD_VERSION Version of your client isn't supported by the server. + +# main menu +PLAY Jouer +SETTING Paramètres +TABLE Meilleur Score +CREDITS Auteurs +END Quitter + +# settings - menu +COUNT_ROUND Count Round: +NAME_PLAYER1 Joueur de droite : +NAME_PLAYER2 Joueur de gauche : +MUSIC Musique : +SOUND Son : +BROWSER Browser \ No newline at end of file diff --git a/data/lang/sk.lang b/data/lang/sk.lang new file mode 100644 index 0000000..bd710c4 --- /dev/null +++ b/data/lang/sk.lang @@ -0,0 +1,46 @@ +### +# Slovak translation file +# Author: Oroborus +### + +# about the author of this translation +AUTHOR Oroborus +AUTHOR_EMAIL dusan.d@centrum.sk +AUTHOR_JABBER oroborus@jabbim.sk + +# specify font for this language +HEAD fontfile="DejaVuSans.ttf" fontsize="16" + +# general +OK Ok +BACK Späť +NEXT Ďalej + +# browser +REFRESH Refresh + +# error message +ERROR_BAD_VERSION Mate verziu clienta, ktoru server nepodporuje. +ERROR_SERVER_DONT_ALIVE Server neodpoveda. + +# main menu +PLAY Hrať +SETTING Nastavenia +TABLE Tabuľka +CREDITS Autori +END Koniec + +# settings - menu +COUNT_ROUND Počet kôl: +NAME_PLAYER1 Meno Hraca 1: +NAME_PLAYER2 Meno Hraca 2: +MUSIC Hudba: +SOUND Zvuk: +BROWSER Browser + +# settings - game type +NONE žiadne +SERVER server +CLIENT client +IP_ADDR IP adresa: +NET_PORT Sieotvy port: \ No newline at end of file diff --git a/data/music/for_a_good_night.ogg b/data/music/for_a_good_night.ogg new file mode 100644 index 0000000..3ce2996 Binary files /dev/null and b/data/music/for_a_good_night.ogg differ diff --git a/data/music/in_a_captivity_of_8-bit.ogg b/data/music/in_a_captivity_of_8-bit.ogg new file mode 100644 index 0000000..db8ee5c Binary files /dev/null and b/data/music/in_a_captivity_of_8-bit.ogg differ diff --git a/data/music/menu.ogg b/data/music/menu.ogg new file mode 100644 index 0000000..0866ccb Binary files /dev/null and b/data/music/menu.ogg differ diff --git a/data/music/night_workshift.ogg b/data/music/night_workshift.ogg new file mode 100644 index 0000000..c5ce5fc Binary files /dev/null and b/data/music/night_workshift.ogg differ diff --git a/data/sound/dead.ogg b/data/sound/dead.ogg new file mode 100644 index 0000000..a78c53a Binary files /dev/null and b/data/sound/dead.ogg differ diff --git a/data/sound/end.ogg b/data/sound/end.ogg new file mode 100644 index 0000000..613265e Binary files /dev/null and b/data/sound/end.ogg differ diff --git a/data/sound/explozion.ogg b/data/sound/explozion.ogg new file mode 100644 index 0000000..6018394 Binary files /dev/null and b/data/sound/explozion.ogg differ diff --git a/data/sound/gun2.ogg b/data/sound/gun2.ogg new file mode 100644 index 0000000..2a360fd Binary files /dev/null and b/data/sound/gun2.ogg differ diff --git a/data/sound/gun_lasser.ogg b/data/sound/gun_lasser.ogg new file mode 100644 index 0000000..56a7257 Binary files /dev/null and b/data/sound/gun_lasser.ogg differ diff --git a/data/sound/gun_revolver.ogg b/data/sound/gun_revolver.ogg new file mode 100644 index 0000000..3c2ea41 Binary files /dev/null and b/data/sound/gun_revolver.ogg differ diff --git a/data/sound/gun_scatter.ogg b/data/sound/gun_scatter.ogg new file mode 100644 index 0000000..32c267f Binary files /dev/null and b/data/sound/gun_scatter.ogg differ diff --git a/data/sound/gun_tommy.ogg b/data/sound/gun_tommy.ogg new file mode 100644 index 0000000..79dcefd Binary files /dev/null and b/data/sound/gun_tommy.ogg differ diff --git a/data/sound/item_bonus.ogg b/data/sound/item_bonus.ogg new file mode 100644 index 0000000..c2b8ba8 Binary files /dev/null and b/data/sound/item_bonus.ogg differ diff --git a/data/sound/item_gun.ogg b/data/sound/item_gun.ogg new file mode 100644 index 0000000..1b749da Binary files /dev/null and b/data/sound/item_gun.ogg differ diff --git a/data/sound/odraz-gun.ogg b/data/sound/odraz-gun.ogg new file mode 100644 index 0000000..c007ae7 Binary files /dev/null and b/data/sound/odraz-gun.ogg differ diff --git a/data/sound/odraz-l.ogg b/data/sound/odraz-l.ogg new file mode 100644 index 0000000..258dbd5 Binary files /dev/null and b/data/sound/odraz-l.ogg differ diff --git a/data/sound/odraz-r.ogg b/data/sound/odraz-r.ogg new file mode 100644 index 0000000..c885172 Binary files /dev/null and b/data/sound/odraz-r.ogg differ diff --git a/data/sound/put_mine.ogg b/data/sound/put_mine.ogg new file mode 100644 index 0000000..b5fa822 Binary files /dev/null and b/data/sound/put_mine.ogg differ diff --git a/data/sound/smrt.ogg b/data/sound/smrt.ogg new file mode 100644 index 0000000..4981dba Binary files /dev/null and b/data/sound/smrt.ogg differ diff --git a/data/sound/switch_gun.ogg b/data/sound/switch_gun.ogg new file mode 100644 index 0000000..e453472 Binary files /dev/null and b/data/sound/switch_gun.ogg differ diff --git a/data/sound/teleport.ogg b/data/sound/teleport.ogg new file mode 100644 index 0000000..1d1ead1 Binary files /dev/null and b/data/sound/teleport.ogg differ diff --git a/data/sound/tuxanci-smrt.ogg b/data/sound/tuxanci-smrt.ogg new file mode 100644 index 0000000..a78c53a Binary files /dev/null and b/data/sound/tuxanci-smrt.ogg differ diff --git a/data/tuxanci-ng.desktop b/data/tuxanci-ng.desktop new file mode 100644 index 0000000..45ed4b0 --- /dev/null +++ b/data/tuxanci-ng.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=tuxanci-ng +Comment=game tuxanci next generation +Exec=/usr/bin/tuxanci-ng +Terminal=false +Type=Application +Icon=/usr/share/tuxanci-ng/image/tuxanci.png +Encoding=UTF-8 +Categories=Game diff --git a/deb-build.sh b/deb-build.sh deleted file mode 100755 index 83730e7..0000000 --- a/deb-build.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -PROJECT="tuxanci-ng" -DEB_DIR="deb" -DEB_ARCH="i386" -DEB_NAME="tuxanci-ng_svn" - -SRC_DIR="../myusr" - -rm -rf $DEB_DIR - -mkdir $DEB_DIR -mkdir $DEB_DIR/DEBIAN -mkdir $DEB_DIR/usr -mkdir $DEB_DIR/usr/bin -mkdir $DEB_DIR/usr/share -mkdir $DEB_DIR/usr/share/applications - -cp control deb/DEBIAN/ -cp $PROJECT.desktop deb/usr/share/applications - -cd deb - -echo -e "2.0\n" > DEBIAN/debian-binary - -cp $SRC_DIR/bin/$PROJECT usr/bin/ -cp -rf $SRC_DIR/share/$PROJECT usr/share/ - -md5sum `find ./ -type f | awk '/.\// { print substr($0, 3) }'` > DEBIAN/md5sums - -cd .. -rm -rf *.deb -dpkg -b ./deb $DEB_NAME`cat r`_$DEB_ARCH.deb diff --git a/deb_config.h b/deb_config.h deleted file mode 100644 index 5bc118e..0000000 --- a/deb_config.h +++ /dev/null @@ -1,3 +0,0 @@ - -#define TUXANCI_NG_VERSION "svn68" -#define DESTDIR "/usr/" diff --git a/font/DejaVuSans.ttf b/font/DejaVuSans.ttf deleted file mode 100755 index cc767e6..0000000 Binary files a/font/DejaVuSans.ttf and /dev/null differ diff --git a/image/ba_in_a_captivity_of_8-bit.png b/image/ba_in_a_captivity_of_8-bit.png deleted file mode 100644 index 4d2158c..0000000 Binary files a/image/ba_in_a_captivity_of_8-bit.png and /dev/null differ diff --git a/image/big-explosion.png b/image/big-explosion.png deleted file mode 100644 index a8d0586..0000000 Binary files a/image/big-explosion.png and /dev/null differ diff --git a/image/bombball.png b/image/bombball.png deleted file mode 100755 index bb3cda7..0000000 Binary files a/image/bombball.png and /dev/null differ diff --git a/image/button0.png b/image/button0.png deleted file mode 100644 index 6dde5c6..0000000 Binary files a/image/button0.png and /dev/null differ diff --git a/image/button1.png b/image/button1.png deleted file mode 100644 index a60f343..0000000 Binary files a/image/button1.png and /dev/null differ diff --git a/image/check.png b/image/check.png deleted file mode 100644 index 1d905c5..0000000 Binary files a/image/check.png and /dev/null differ diff --git a/image/construction_site.png b/image/construction_site.png deleted file mode 100644 index c6aecc3..0000000 Binary files a/image/construction_site.png and /dev/null differ diff --git a/image/cross.png b/image/cross.png deleted file mode 100644 index 52636ef..0000000 Binary files a/image/cross.png and /dev/null differ diff --git a/image/explosion.png b/image/explosion.png deleted file mode 100644 index 6b71c36..0000000 Binary files a/image/explosion.png and /dev/null differ diff --git a/image/for_a_good_night.png b/image/for_a_good_night.png deleted file mode 100644 index da8e981..0000000 Binary files a/image/for_a_good_night.png and /dev/null differ diff --git a/image/graf.bonus.png b/image/graf.bonus.png deleted file mode 100644 index 6f195b1..0000000 Binary files a/image/graf.bonus.png and /dev/null differ diff --git a/image/icon.bonus.4x.png b/image/icon.bonus.4x.png deleted file mode 100644 index cd08e3f..0000000 Binary files a/image/icon.bonus.4x.png and /dev/null differ diff --git a/image/icon.bonus.ghost.png b/image/icon.bonus.ghost.png deleted file mode 100644 index ff483f3..0000000 Binary files a/image/icon.bonus.ghost.png and /dev/null differ diff --git a/image/icon.bonus.hidden.png b/image/icon.bonus.hidden.png deleted file mode 100644 index dfee367..0000000 Binary files a/image/icon.bonus.hidden.png and /dev/null differ diff --git a/image/icon.bonus.shot.png b/image/icon.bonus.shot.png deleted file mode 100644 index d10c84f..0000000 Binary files a/image/icon.bonus.shot.png and /dev/null differ diff --git a/image/icon.bonus.speed.png b/image/icon.bonus.speed.png deleted file mode 100644 index 1179ad6..0000000 Binary files a/image/icon.bonus.speed.png and /dev/null differ diff --git a/image/icon.bonus.teleport.png b/image/icon.bonus.teleport.png deleted file mode 100644 index 21c1f25..0000000 Binary files a/image/icon.bonus.teleport.png and /dev/null differ diff --git a/image/icon.gun.bombball.png b/image/icon.gun.bombball.png deleted file mode 100755 index 65eb972..0000000 Binary files a/image/icon.gun.bombball.png and /dev/null differ diff --git a/image/icon.gun.dual.simple.png b/image/icon.gun.dual.simple.png deleted file mode 100644 index 257c600..0000000 Binary files a/image/icon.gun.dual.simple.png and /dev/null differ diff --git a/image/icon.gun.lasser.png b/image/icon.gun.lasser.png deleted file mode 100644 index 5942665..0000000 Binary files a/image/icon.gun.lasser.png and /dev/null differ diff --git a/image/icon.gun.mine.png b/image/icon.gun.mine.png deleted file mode 100644 index 6af9154..0000000 Binary files a/image/icon.gun.mine.png and /dev/null differ diff --git a/image/icon.gun.scatter.png b/image/icon.gun.scatter.png deleted file mode 100644 index 30eb363..0000000 Binary files a/image/icon.gun.scatter.png and /dev/null differ diff --git a/image/icon.gun.simple.png b/image/icon.gun.simple.png deleted file mode 100644 index 0b7b491..0000000 Binary files a/image/icon.gun.simple.png and /dev/null differ diff --git a/image/icon.gun.tommy.png b/image/icon.gun.tommy.png deleted file mode 100644 index dafc7a5..0000000 Binary files a/image/icon.gun.tommy.png and /dev/null differ diff --git a/image/in_a_captivity_of_8-bit.png b/image/in_a_captivity_of_8-bit.png deleted file mode 100644 index 922786e..0000000 Binary files a/image/in_a_captivity_of_8-bit.png and /dev/null differ diff --git a/image/item.bombball.png b/image/item.bombball.png deleted file mode 100755 index d310d8f..0000000 Binary files a/image/item.bombball.png and /dev/null differ diff --git a/image/item.bonus.4x.png b/image/item.bonus.4x.png deleted file mode 100644 index a74241e..0000000 Binary files a/image/item.bonus.4x.png and /dev/null differ diff --git a/image/item.bonus.ghost.png b/image/item.bonus.ghost.png deleted file mode 100644 index bee6542..0000000 Binary files a/image/item.bonus.ghost.png and /dev/null differ diff --git a/image/item.bonus.hidden.png b/image/item.bonus.hidden.png deleted file mode 100644 index 3ac96db..0000000 Binary files a/image/item.bonus.hidden.png and /dev/null differ diff --git a/image/item.bonus.shot.png b/image/item.bonus.shot.png deleted file mode 100644 index c899209..0000000 Binary files a/image/item.bonus.shot.png and /dev/null differ diff --git a/image/item.bonus.speed.png b/image/item.bonus.speed.png deleted file mode 100644 index d228128..0000000 Binary files a/image/item.bonus.speed.png and /dev/null differ diff --git a/image/item.bonus.teleport.png b/image/item.bonus.teleport.png deleted file mode 100644 index b2202bf..0000000 Binary files a/image/item.bonus.teleport.png and /dev/null differ diff --git a/image/item.dual.png b/image/item.dual.png deleted file mode 100644 index 7747ca1..0000000 Binary files a/image/item.dual.png and /dev/null differ diff --git a/image/item.lasser.png b/image/item.lasser.png deleted file mode 100644 index d3f7f30..0000000 Binary files a/image/item.lasser.png and /dev/null differ diff --git a/image/item.mine.png b/image/item.mine.png deleted file mode 100644 index b774d44..0000000 Binary files a/image/item.mine.png and /dev/null differ diff --git a/image/item.scatter.png b/image/item.scatter.png deleted file mode 100644 index 7568270..0000000 Binary files a/image/item.scatter.png and /dev/null differ diff --git a/image/item.tommy.png b/image/item.tommy.png deleted file mode 100644 index ca0fd85..0000000 Binary files a/image/item.tommy.png and /dev/null differ diff --git a/image/l1.grow.png b/image/l1.grow.png deleted file mode 100644 index 14a110e..0000000 Binary files a/image/l1.grow.png and /dev/null differ diff --git a/image/l1.hut.png b/image/l1.hut.png deleted file mode 100644 index 7e42da6..0000000 Binary files a/image/l1.hut.png and /dev/null differ diff --git a/image/l1.peduncle.png b/image/l1.peduncle.png deleted file mode 100644 index 258f34c..0000000 Binary files a/image/l1.peduncle.png and /dev/null differ diff --git a/image/l1.tree.png b/image/l1.tree.png deleted file mode 100644 index 5e3995e..0000000 Binary files a/image/l1.tree.png and /dev/null differ diff --git a/image/l1.wood.png b/image/l1.wood.png deleted file mode 100644 index ae1550a..0000000 Binary files a/image/l1.wood.png and /dev/null differ diff --git a/image/l2.barel.png b/image/l2.barel.png deleted file mode 100644 index 8da54ef..0000000 Binary files a/image/l2.barel.png and /dev/null differ diff --git a/image/l2.nadrz.png b/image/l2.nadrz.png deleted file mode 100644 index 4bc0a42..0000000 Binary files a/image/l2.nadrz.png and /dev/null differ diff --git a/image/l2.pitch.png b/image/l2.pitch.png deleted file mode 100644 index 15150ba..0000000 Binary files a/image/l2.pitch.png and /dev/null differ diff --git a/image/l2.potrubi.png b/image/l2.potrubi.png deleted file mode 100644 index 3afa5ff..0000000 Binary files a/image/l2.potrubi.png and /dev/null differ diff --git a/image/l2.retez.png b/image/l2.retez.png deleted file mode 100644 index c97ea24..0000000 Binary files a/image/l2.retez.png and /dev/null differ diff --git a/image/l2.trubka2.png b/image/l2.trubka2.png deleted file mode 100644 index f874ccc..0000000 Binary files a/image/l2.trubka2.png and /dev/null differ diff --git a/image/l2.trubka4.png b/image/l2.trubka4.png deleted file mode 100644 index 7be65d2..0000000 Binary files a/image/l2.trubka4.png and /dev/null differ diff --git a/image/l2.trubka6.png b/image/l2.trubka6.png deleted file mode 100644 index 29755ae..0000000 Binary files a/image/l2.trubka6.png and /dev/null differ diff --git a/image/l2.trubka8.png b/image/l2.trubka8.png deleted file mode 100644 index 6026467..0000000 Binary files a/image/l2.trubka8.png and /dev/null differ diff --git a/image/l2.trubky.png b/image/l2.trubky.png deleted file mode 100644 index 5d405ad..0000000 Binary files a/image/l2.trubky.png and /dev/null differ diff --git a/image/l3.ihlan.png b/image/l3.ihlan.png deleted file mode 100644 index 20cb373..0000000 Binary files a/image/l3.ihlan.png and /dev/null differ diff --git a/image/l3.kvader1.png b/image/l3.kvader1.png deleted file mode 100644 index 67973a9..0000000 Binary files a/image/l3.kvader1.png and /dev/null differ diff --git a/image/l3.kvader2.png b/image/l3.kvader2.png deleted file mode 100644 index d0df146..0000000 Binary files a/image/l3.kvader2.png and /dev/null differ diff --git a/image/l3.nic.png b/image/l3.nic.png deleted file mode 100644 index 3852007..0000000 Binary files a/image/l3.nic.png and /dev/null differ diff --git a/image/l3.teleport.png b/image/l3.teleport.png deleted file mode 100644 index f901589..0000000 Binary files a/image/l3.teleport.png and /dev/null differ diff --git a/image/l4.anim.blikacka.png b/image/l4.anim.blikacka.png deleted file mode 100644 index da353c6..0000000 Binary files a/image/l4.anim.blikacka.png and /dev/null differ diff --git a/image/l4.bagr.png b/image/l4.bagr.png deleted file mode 100644 index a9f6a13..0000000 Binary files a/image/l4.bagr.png and /dev/null differ diff --git a/image/l4.overlay.png b/image/l4.overlay.png deleted file mode 100644 index a8f8507..0000000 Binary files a/image/l4.overlay.png and /dev/null differ diff --git a/image/l4.palety.png b/image/l4.palety.png deleted file mode 100644 index 3a3e797..0000000 Binary files a/image/l4.palety.png and /dev/null differ diff --git a/image/l4.pozadi.png b/image/l4.pozadi.png deleted file mode 100644 index 9d9b214..0000000 Binary files a/image/l4.pozadi.png and /dev/null differ diff --git a/image/l4.pytle.png b/image/l4.pytle.png deleted file mode 100644 index ea6a1f3..0000000 Binary files a/image/l4.pytle.png and /dev/null differ diff --git a/image/l4.tvarnice.png b/image/l4.tvarnice.png deleted file mode 100644 index 0f2d99a..0000000 Binary files a/image/l4.tvarnice.png and /dev/null differ diff --git a/image/lasserX.png b/image/lasserX.png deleted file mode 100644 index 191af4d..0000000 Binary files a/image/lasserX.png and /dev/null differ diff --git a/image/lasserY.png b/image/lasserY.png deleted file mode 100644 index b64a346..0000000 Binary files a/image/lasserY.png and /dev/null differ diff --git a/image/level4.png b/image/level4.png deleted file mode 100644 index 0136b2b..0000000 Binary files a/image/level4.png and /dev/null differ diff --git a/image/mine.png b/image/mine.png deleted file mode 100644 index 6e8b373..0000000 Binary files a/image/mine.png and /dev/null differ diff --git a/image/naboj.png b/image/naboj.png deleted file mode 100644 index 2985273..0000000 Binary files a/image/naboj.png and /dev/null differ diff --git a/image/night_workshift.png b/image/night_workshift.png deleted file mode 100644 index 08f4c42..0000000 Binary files a/image/night_workshift.png and /dev/null differ diff --git a/image/panel.png b/image/panel.png deleted file mode 100644 index 24a8e6c..0000000 Binary files a/image/panel.png and /dev/null differ diff --git a/image/panel_shot.png b/image/panel_shot.png deleted file mode 100644 index 2985273..0000000 Binary files a/image/panel_shot.png and /dev/null differ diff --git a/image/pokus.png b/image/pokus.png deleted file mode 100644 index 9e66d2e..0000000 Binary files a/image/pokus.png and /dev/null differ diff --git a/image/radar.png b/image/radar.png deleted file mode 100644 index f7d6f62..0000000 Binary files a/image/radar.png and /dev/null differ diff --git a/image/screen_main.png b/image/screen_main.png deleted file mode 100644 index 9734d1a..0000000 Binary files a/image/screen_main.png and /dev/null differ diff --git a/image/screen_table.png b/image/screen_table.png deleted file mode 100644 index 769496e..0000000 Binary files a/image/screen_table.png and /dev/null differ diff --git a/image/shot.png b/image/shot.png deleted file mode 100644 index 3d6ebc7..0000000 Binary files a/image/shot.png and /dev/null differ diff --git a/image/textfield0.png b/image/textfield0.png deleted file mode 100644 index f6cc862..0000000 Binary files a/image/textfield0.png and /dev/null differ diff --git a/image/textfield1.png b/image/textfield1.png deleted file mode 100644 index 2b0aad8..0000000 Binary files a/image/textfield1.png and /dev/null differ diff --git a/image/tux2.png b/image/tux2.png deleted file mode 100644 index cae602b..0000000 Binary files a/image/tux2.png and /dev/null differ diff --git a/image/tux4.png b/image/tux4.png deleted file mode 100644 index f5e46fb..0000000 Binary files a/image/tux4.png and /dev/null differ diff --git a/image/tux6.png b/image/tux6.png deleted file mode 100644 index 286b80a..0000000 Binary files a/image/tux6.png and /dev/null differ diff --git a/image/tux8.png b/image/tux8.png deleted file mode 100644 index cfbf80a..0000000 Binary files a/image/tux8.png and /dev/null differ diff --git a/image/tuxanci.png b/image/tuxanci.png deleted file mode 100644 index 34b770b..0000000 Binary files a/image/tuxanci.png and /dev/null differ diff --git a/include/arena.h b/include/arena.h deleted file mode 100644 index 837fade..0000000 --- a/include/arena.h +++ /dev/null @@ -1,43 +0,0 @@ - -#ifndef ARENA_H - -#define ARENA_H - -#include "main.h" - -#ifndef PUBLIC_SERVER -#include "interface.h" -#endif - -#include "list.h" -#include "space.h" - -typedef struct arena_struct -{ -#ifndef PUBLIC_SERVER - char music[STR_SIZE]; - - SDL_Surface *background; -#endif - int w, h; - list_t *listTimer; - //list_t *listTux; - space_t *spaceShot; - space_t *spaceTux; - space_t *spaceItem; -} arena_t; - -extern void setCurrentArena(arena_t *p); -extern arena_t* getCurrentArena(); -extern arena_t* newArena(int w, int h); -extern int conflictSpace(int x1,int y1,int w1,int h1,int x2,int y2,int w2,int h2); -extern int isFreeSpace(arena_t *arena, int x, int y, int w, int h); -extern void findFreeSpace(arena_t *arena, int *x, int *y, int w, int h); -extern void getCenterScreen(int *screen_x, int *screen_y, int x, int y); -#ifndef PUBLIC_SERVER -extern void drawArena(arena_t *arena); -#endif -extern void eventArena(arena_t *arena); -extern void destroyArena(arena_t *p); - -#endif diff --git a/include/arenaFile.h b/include/arenaFile.h deleted file mode 100644 index ae2b203..0000000 --- a/include/arenaFile.h +++ /dev/null @@ -1,21 +0,0 @@ - -#ifndef ARENA_FILE_H - -#define ARENA_FILE_H - -#include "main.h" -#include "arena.h" - -#define PUBLIC_SERVER_PATH_ARENA "./arena/" - -extern bool_t isArenaFileInicialized(); -extern void initArenaFile(); -extern int getArenaCount(); -extern char *getArenaName(int id); -extern char *getArenaNetName(int id); -extern int getArenaIdFormNetName(char *s); -extern char *getArenaImage(int id); -extern arena_t* getArena(int id); -extern void quitArenaFile(); - -#endif diff --git a/include/audio.h b/include/audio.h deleted file mode 100644 index 242bb9a..0000000 --- a/include/audio.h +++ /dev/null @@ -1,12 +0,0 @@ - -#ifndef AUDIO_H - -#define AUDIO_H - -#include "main.h" - -extern bool_t isAudioInicialized(); -extern void initAudio(); -extern void quitAudio(); - -#endif diff --git a/include/bool.h b/include/bool.h deleted file mode 100644 index d122b85..0000000 --- a/include/bool.h +++ /dev/null @@ -1,13 +0,0 @@ - -#ifndef BOOL_H - -#define BOOL_H - -#include "main.h" - -#define bool_t int - -#define TRUE 1 -#define FALSE 0 - -#endif diff --git a/include/buffer.h b/include/buffer.h deleted file mode 100755 index b547e2b..0000000 --- a/include/buffer.h +++ /dev/null @@ -1,24 +0,0 @@ - -#ifndef BUFFER_H - -#define BUFFER_H - -#include "main.h" - -#define BUFFER_LIMIT_ALLOC 1024 - -typedef struct str_buffer -{ - char *data; - unsigned int size; - unsigned int alloc; -} buffer_t; - -extern buffer_t * newBuffer(int n); -extern int addBuffer(buffer_t *p, char *data, int len); -extern int cutBuffer(buffer_t *p, int len); -extern int getBufferLine(buffer_t *p, char *line, int len); -extern int getData(buffer_t *p, char *line, int len); -extern void destroyBuffer(buffer_t *p); - -#endif diff --git a/include/checkFront.h b/include/checkFront.h deleted file mode 100644 index dde30f0..0000000 --- a/include/checkFront.h +++ /dev/null @@ -1,22 +0,0 @@ - -#ifndef CHECK_FRONT_H - -#define CHECK_FRONT_H - -#include "list.h" -#include "server.h" - -#define CHECK_FRONT_SEND_TIME_INTERVAL 100 -#define CHECK_FRONT_MAX_COUNT_SEND 30 - -#define CHECK_FRONT_ID_NONE -1 -#define CHECK_FORNT_TYPE_SIMPLE 1 -#define CHECK_FORNT_TYPE_CHECK 2 - -extern list_t* newCheckFront(); -extern void addMsgInCheckFront(list_t *list, char *msg, int type, int id); -extern void eventMsgInCheckFront(client_t *client); -extern void delMsgInCheckFront(list_t *listCheckFront, int id); -extern void destroyCheckFront(list_t *p); - -#endif diff --git a/include/client.h b/include/client.h deleted file mode 100644 index cd8c4c4..0000000 --- a/include/client.h +++ /dev/null @@ -1,35 +0,0 @@ - -#ifndef MY_CLIENT - -#define MY_CLIENT - -#include "main.h" - -#if defined SUPPORT_NET_UNIX_UDP || defined SUPPORT_NET_SDL_UDP - -#define CLIENT_TIMEOUT 1000 -#define SERVER_TIMEOUT_ALIVE 5000 - -#endif - -#ifdef SUPPORT_NET_UNIX_UDP -extern int initUdpClient(char *ip, int port, int proto); -extern void eventPingServer(); -extern void selectClientUdpSocket(); -extern void refreshPingServerAlive(); -extern void quitUdpClient(); -#endif - -#ifdef SUPPORT_NET_SDL_UDP -extern int initSdlUdpClient(char *ip, int port); -extern void eventPingServer(); -extern void selectClientSdlUdpSocket(); -extern void refreshPingServerAlive(); -extern bool_t isServerAlive(); -extern void quitSdlUdpClient(); -#endif - -extern void sendServer(char *msg); -extern void eventServerBuffer(); - -#endif diff --git a/include/configFile.h b/include/configFile.h deleted file mode 100644 index f68a381..0000000 --- a/include/configFile.h +++ /dev/null @@ -1,20 +0,0 @@ - -#ifndef CONFIGFILE_H - -#define CONFIGFILE_H - -#include "main.h" -#include "textFile.h" - -extern int isYesOrNO(char *s); -extern char* getYesOrNo(int n); - -extern int getValue(char *line, char *env, char *val, int len); -extern char* setValue(char *line, char *env, char *val); - -extern int getValueInConfigFile(textFile_t *textFile, char *env, char *val, int len); -extern int setValueInConfigFile(textFile_t *textFile, char *env, char *val); - -extern void loadValueFromConfigFile(textFile_t *textFile, char *env, char *val, int len, char *butVal); - -#endif diff --git a/include/director.h b/include/director.h deleted file mode 100644 index 8a07ed0..0000000 --- a/include/director.h +++ /dev/null @@ -1,18 +0,0 @@ - -#ifndef DIRECTOR_H - -#define DIRECTOR_H - -#include "main.h" -#include "list.h" - -typedef struct director_struct -{ - char *path; - list_t *list; -} director_t; - -extern director_t* loadDirector(char *s); -extern void destroyDirector(director_t *p); - -#endif diff --git a/include/dynamicInt.h b/include/dynamicInt.h deleted file mode 100644 index 266ff86..0000000 --- a/include/dynamicInt.h +++ /dev/null @@ -1,10 +0,0 @@ - -#ifndef DYNAMIC_INT_H - -#define DYNAMIC_INT_H - -#include "main.h" - -extern int* newInt(int x); - -#endif diff --git a/include/fake_audio.h b/include/fake_audio.h deleted file mode 100644 index d2eac59..0000000 --- a/include/fake_audio.h +++ /dev/null @@ -1,41 +0,0 @@ - -#ifndef FAKE_AUDIO_H - -#define FAKE_AUDIO_H - -#ifdef NO_SOUND - -#include "main.h" - -#define SOUND_GROUP_BASE 0 -#define SOUND_GROUP_USER 1 - -#define MUSIC_GROUP_BASE 0 -#define MUSIC_GROUP_USER 1 - -extern bool_t isAudioInicialized(); -extern void initAudio(); -extern void quitAudio(); - -extern bool_t isSoundInicialized(); -extern void initSound(); -extern void addSound(char *file, char *name, int group); -extern void playSound(char *name, int group); -extern void setSoundActive(bool_t n); -extern bool_t isSoundActive(); -extern void quitSound(); - -extern bool_t isMusicInicialized(); -extern void initMusic(); -extern void addMusic(char *file, char *name, int group); -extern void stopMusic(); -extern void playMusic(char *name, int group); -extern void setMusicActive(bool_t n); -extern bool_t isMusicActive(); -extern char* getCurrentMusic(); -extern void delAllMusicInGroup(int group); -extern void quitMusic(); - -#endif - -#endif diff --git a/include/font.h b/include/font.h deleted file mode 100755 index f938b3b..0000000 --- a/include/font.h +++ /dev/null @@ -1,26 +0,0 @@ - -#ifndef FONT_H - -#define FONT_H - -#include -#include -#include "main.h" - -#define COLOR_WHITE 255, 255, 255 -#define COLOR_BLACK 0, 0, 0 - -#define COLOR_RED 255, 0, 0 -#define COLOR_GREEN 0, 255, 0 -#define COLOR_BLUE 0, 0, 255 - -#define COLOR_YELLOW 255, 255, 0 - -extern bool_t isFontInicialized(); -extern void initFont(char *file,int size); -extern void drawFont(char *s,int x,int y,int r,int g,int b); -extern int getFontSize(); -extern void getTextSize(char *s, int *w, int *h); -extern void quitFont(); - -#endif diff --git a/include/game.h b/include/game.h deleted file mode 100644 index 6ce694d..0000000 --- a/include/game.h +++ /dev/null @@ -1,9 +0,0 @@ - -#ifndef GAME_H - -#define GAME_H - -extern void quitGame(); -extern void startGame(); - -#endif diff --git a/include/gun.h b/include/gun.h deleted file mode 100644 index 4986660..0000000 --- a/include/gun.h +++ /dev/null @@ -1,21 +0,0 @@ - -#ifndef GUN_H - -#define GUN_H - -#include "main.h" - -#define GUN_SHOT_WIDTH 5 -#define GUN_SHOT_HEIGHT 5 - -#define GUN_LASSER_HORIZONTAL 50 -#define GUN_SHOT_VERTICAL 5 - -#define GUN_BOMBBALL_WIDTH 20 -#define GUN_BOMBBALL_HEIGHT 20 - -#include "tux.h" - -extern void shotInGun(tux_t *p); - -#endif diff --git a/include/hashTable.h b/include/hashTable.h deleted file mode 100644 index b872cfb..0000000 --- a/include/hashTable.h +++ /dev/null @@ -1,24 +0,0 @@ - -#ifndef HASHTABLE_H - -#define HASHTABLE_H - -typedef struct hashTable_struct -{ - struct hashTable_struct *table[256]; - void *data; -} hashtable_t; - -extern hashtable_t* newHashTable(); -extern void addHashTable(hashtable_t *p, char *key, void *item); -extern void addHashTableWithIndex(hashtable_t *p, int index, void *item); -extern void* getHashTable(hashtable_t *p, char *key); -extern void* getHashTableWithIndex(hashtable_t *p, int index); -extern void delHashTable(hashtable_t *p, char *key); -extern void delHashTableWithIndex(hashtable_t *p, int index); -extern void delHashTableWithMem(hashtable_t *p, char *key, void *f); -extern void delHashTableWithMemWithIndex(hashtable_t *p, int index); -extern void destroyHashTable(hashtable_t *p); -extern void destroyHashTableWithMem(hashtable_t *p, void *f); - -#endif diff --git a/include/heightScore.h b/include/heightScore.h deleted file mode 100644 index b1bf7e2..0000000 --- a/include/heightScore.h +++ /dev/null @@ -1,13 +0,0 @@ - -#ifndef HEIGHT_SCORE_H - -#define HEIGHT_SCORE_H - -#define HEIGHTSCORE_MAX_PLAYERS 100 - -extern void initHeightScore(char *file); -extern int addPlayerInHighScore(char *name, int score); -extern char* getTableItem(int index); -extern void quitHeightScore(); - -#endif diff --git a/include/homeDirector.h b/include/homeDirector.h deleted file mode 100755 index 85f8172..0000000 --- a/include/homeDirector.h +++ /dev/null @@ -1,13 +0,0 @@ - -#ifndef HOMEDIRECTOR_H - -#define HOMEDIRECTOR_H - -#include "main.h" - -#define HOMEDIRECTOR_NAME ".tuxanci-ng" - -extern void createHomeDirector(); -extern char *getHomeDirector(); - -#endif diff --git a/include/idManager.h b/include/idManager.h deleted file mode 100644 index 62e2651..0000000 --- a/include/idManager.h +++ /dev/null @@ -1,19 +0,0 @@ - - -#ifndef ID_MANAGER_H - -#define ID_MANAGER_H - -#define MAX_ID 1000 -#define ID_UNKNOWN -1 - -#include "list.h" - -extern void initListID(); -extern int getNewID(); -extern int isRegisterID(int id); -extern void delID(int id); -extern void replaceID(int old_id, int new_id); -extern void quitListID(); - -#endif diff --git a/include/image.h b/include/image.h deleted file mode 100755 index be3826d..0000000 --- a/include/image.h +++ /dev/null @@ -1,35 +0,0 @@ - -#ifndef IMAGE_H - -#define IMAGE_H - -#include "image.h" -#include "interface.h" - -#define IMAGE_NO_ALPHA 0 -#define IMAGE_ALPHA 1 - -#define IMAGE_GROUP_BASE "base" -#define IMAGE_GROUP_EXTENDSIO "extension" -#define IMAGE_GROUP_USER "user" -#define IMAGE_GROUP_OTHER "other" - -/* -typedef struct image_struct -{ - char *name; - char *group; - SDL_Surface *image; -} image_data_t; -*/ - -extern bool_t isImageInicialized(); -extern void initImageData(); -extern SDL_Surface* addImageData(char *file, int alpha, char *name, char *group); -extern SDL_Surface* getImage(char *group, char *name); -extern void delImage(char *group, char *name); -extern void delAllImageInGroup(char *group); -extern void drawImage(SDL_Surface *p, int x,int y, int px, int py, int w, int h); -extern void quitImageData(); - -#endif diff --git a/include/interface.h b/include/interface.h deleted file mode 100755 index c0311ee..0000000 --- a/include/interface.h +++ /dev/null @@ -1,40 +0,0 @@ - -#ifndef INTERFACE_H - -#define INTERFACE_H - -#include -#include -#include - -#include -#include -#include -#include "main.h" - -/* -#include -*/ - -#define SDL_SUBSYSTEMS SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_DOUBLEBUF - -//napis na okne -#define WINDOW_TITLE "Tuxanci next generation " TUXANCI_NG_VERSION -#define WIN_BPP 0 -#define USR_EVT_TIMER 0 - -//interval pri ktorom sa spusta akcia(); -#define INTERVAL 50 - -extern bool_t isInterfaceInicialized(); -extern int initSDL(); -extern SDL_Surface* getSDL_Screen(); -extern void getMousePosition(int *x, int *y); -extern int isMouseClicked(); -extern int isPessAnyKey(); -extern void interfaceRefresh(); -extern void eventSDL(); -extern void quitSDL(); - - -#endif diff --git a/include/item.h b/include/item.h deleted file mode 100644 index c23e7d7..0000000 --- a/include/item.h +++ /dev/null @@ -1,79 +0,0 @@ - -#ifndef ITEM_H - -#define ITEM_H - -#include "main.h" - -#define ITEM_SYNC_TIMEOUT 5000 - -#ifndef PUBLIC_SERVER -#include "interface.h" -#endif - -#include "list.h" -#include "tux.h" -#include "myTimer.h" - -typedef struct item_struct -{ - int id; - int type; // typ veci - - int x; // poloha veci - int y; - - int w; // rozmery veci - int h; - - int frame; //poradove cislo animacie - int count; - - int author_id; -#ifndef PUBLIC_SERVER - SDL_Surface *img; //obrazok -#endif -} item_t; - -#define ITEM_MAX_COUNT 1 - -#define ITEM_GUN_MAX_FRAME 8 -#define ITEM_MINE_MAX_FRAME 1 -#define ITEM_EXPLOSION_MAX_FRAME 10 -#define ITEM_BONUS_MAX_FRAME 8 - -#define ITEM_GUN_WIDTH 50 -#define ITEM_GUN_HEIGHT 20 - -#define ITEM_MINE_WIDTH 15 -#define ITEM_MINE_HEIGHT 11 - -#define ITEM_EXPLOSION_WIDTH 40 -#define ITEM_EXPLOSION_HEIGHT 40 - -#define ITEM_BIG_EXPLOSION_WIDTH 100 -#define ITEM_BIG_EXPLOSION_HEIGHT 100 - -#define ITEM_BONUS_WIDTH 20 -#define ITEM_BONUS_HEIGHT 20 - -extern bool_t isItemInicialized(); -extern void initItem(); -extern item_t* newItem(int x, int y, int type, int author_id); -extern void getStatusItem(void *p, int *id, int *x, int *y ,int *w, int *h); -extern void setStatusItem(void *p, int x, int y, int w, int h); -extern void replaceItemID(item_t *item, int id); -extern void addNewItem(space_t *spaceItem, int author_id); -#ifndef PUBLIC_SERVER -extern void drawListItem(list_t *listItem); -#endif -extern void eventListItem(space_t *listSpace); -extern void mineExplosion(space_t *spaceItem, item_t *item); -extern void eventConflictShotWithItem(arena_t *arena); -extern void eventGiveTuxItem(tux_t *tux, item_t *item, space_t *spaceItem); -extern void eventGiveTuxListItem(tux_t *tux, space_t *spaceItem); -extern void destroyItem(item_t *p); -extern void quitItem(); - -#endif - diff --git a/include/keytable.h b/include/keytable.h deleted file mode 100644 index 80ca258..0000000 --- a/include/keytable.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef KEYTABLE_H - -#define KEYTABLE_H - -#define KEY_LENGTH 12 - -#define KEY_TUX_RIGHT_MOVE_UP 0 -#define KEY_TUX_RIGHT_MOVE_RIGHT 1 -#define KEY_TUX_RIGHT_MOVE_LEFT 2 -#define KEY_TUX_RIGHT_MOVE_DOWN 3 -#define KEY_TUX_RIGHT_SHOOT 4 -#define KEY_TUX_RIGHT_SWITCH_WEAPON 5 -#define KEY_TUX_LEFT_MOVE_UP 6 -#define KEY_TUX_LEFT_MOVE_RIGHT 7 -#define KEY_TUX_LEFT_MOVE_LEFT 8 -#define KEY_TUX_LEFT_MOVE_DOWN 9 -#define KEY_TUX_LEFT_SHOOT 10 -#define KEY_TUX_LEFT_SWITCH_WEAPON 11 - -extern void initKeyTable(); -extern int getKey(int n); -extern void quitKeyTable(); - -#endif - - diff --git a/include/language.h b/include/language.h deleted file mode 100644 index 23fc1a4..0000000 --- a/include/language.h +++ /dev/null @@ -1,12 +0,0 @@ - -#ifndef LANGUAGE_H - -#define LANGUAGE_H - -extern int initLanguage(); -extern char* getMyText(char *key); -extern char* getLanguageFont(); -extern int getLanguageSize(); -extern void quitLanguage(); - -#endif diff --git a/include/layer.h b/include/layer.h deleted file mode 100755 index 04a4617..0000000 --- a/include/layer.h +++ /dev/null @@ -1,53 +0,0 @@ - -#ifndef MY_LAYER_H - -#define MY_LAYER_H - -#include "main.h" - -typedef struct layer_str -{ - int x; //suradnice obrazka na obrazovke - int y; - - int w; //rozmery obrazka na obrazovke - int h; - - int px; //suradnice casti surfrace - int py; - - int pw; //rozmeri casti surfrace - int ph; - - int layer; - - SDL_Surface *image; //dane surfrace -} layer_t; - -extern bool_t isLayerInicialized(); -extern void initLayer(); - -/* - * Prida obrazok na vykreslenie do zoznamu - * *img - ponter na urfrace obrazka - * x,y - suradnice kam sa ma obrazok nakreslit - * w,h - rozmeri obrazka - * px,py - suradnice casti *img z ktorej sa bude obrazok vykreslovat - * ph,ph - rozmeri casti obrazka *img z ktorej sa bude obrazok vykreslovat - * layer - layer, na ktorej bude obrazok - * (0 - pod tuxancami | 1 - na tej istej ako tuxanci | 2 - nad tuxancami) - */ - -extern void addLayer(SDL_Surface *img, - int x,int y, int px,int py, - int w,int h, int player); - -/* - * Vykresli zoznam na obrazovku - */ -extern void drawLayer(); -extern void drawLayerCenter(int x, int y); -extern void flushLayer(); -extern void quitLayer(); - -#endif diff --git a/include/list.h b/include/list.h deleted file mode 100755 index 5a15786..0000000 --- a/include/list.h +++ /dev/null @@ -1,33 +0,0 @@ - -#ifndef LIST_H - -#define LIST_H - -#include "main.h" - -#define LIST_ALLOC_LIMIT 16 - -typedef struct list_str -{ - void **list; - int count; - int alloc; -} list_t; - -extern list_t* newList(); -extern list_t* cloneList(list_t *p); -extern list_t* cloneListItem(list_t *p, void *f); - -extern void addList(list_t *p, void *item); -extern void insList(list_t *p, int n, void *item); -extern void *getList(list_t *p,int n); -extern int searchListItem(list_t *p, void *n); - -extern void delList(list_t *p,int n); -extern void delListItem(list_t *p,int n,void *f); -extern void listDoEmpty(list_t *p); - -extern void destroyList(list_t *p); -extern void destroyListItem(list_t *p,void *f); - -#endif diff --git a/include/logFile.h b/include/logFile.h deleted file mode 100644 index 12f5606..0000000 --- a/include/logFile.h +++ /dev/null @@ -1,18 +0,0 @@ - -#ifndef LOGFILE_H - -#define LOGFILE_H - -#include "main.h" - -typedef struct logFile_struct -{ - char *name; - FILE *file; -} logFile_t; - -extern logFile_t* newLogFile(char *s); -extern int writeLog(logFile_t *p, char *s); -extern void destroyLogFile(logFile_t *p); - -#endif diff --git a/include/main.h b/include/main.h deleted file mode 100644 index 942064f..0000000 --- a/include/main.h +++ /dev/null @@ -1,35 +0,0 @@ - -#ifndef MAIN_H - -#define MAIN_H - -#include "../config.h" - -#if defined PUBLIC_SERVER - -#undef DESTDIR -#undef SUPPORT_NET_SDL_UDP -#define SUPPORT_NET_UNIX_UDP - -#endif - -#include "bool.h" -#include "string_length.h" -#include "path.h" - -//rozlisenie obrazovky -#define WINDOW_SIZE_X 800 -#define WINDOW_SIZE_Y 600 - -#include "list.h" - -extern list_t *listHelp; - -extern char* getParam(char *s); -extern char* getParamElse(char *s1, char *s2); -extern bool_t isParamFlag(char *s); -extern char *getString(int n); -extern int* newInt(int x); -extern void accessExistFile(const char *s); - -#endif diff --git a/include/modules.h b/include/modules.h deleted file mode 100644 index 0b31292..0000000 --- a/include/modules.h +++ /dev/null @@ -1,78 +0,0 @@ - -#ifndef MODULE_H - -#define MODULE_H - -#include "tux.h" -#include "shot.h" -#include "arena.h" -#include "proto.h" -#include "myTimer.h" - -#ifndef PUBLIC_SERVER -#include "image.h" -#endif - -typedef struct export_fce_s -{ - int (*fce_getValue)(char *line, char *env, char *val, int len); - -#ifndef PUBLIC_SERVER - SDL_Surface* (*fce_getImage)(char *group, char *name); - - void (*fce_addLayer)(SDL_Surface *img, - int x,int y, int px,int py, - int w,int h, int player); -#endif - - int (*fce_getNetTypeGame)(); - - void (*fce_getTuxProportion)(tux_t *tux, int *x,int *y, int *w, int *h); - void (*fce_setTuxProportion)(tux_t *tux, int x, int y); - tux_t* (*fce_getTuxID)(list_t *listTux, int id); - void (*fce_actionTux)(tux_t *tux, int action); - - arena_t* (*fce_getCurrentArena)(); - int (*fce_conflictSpace)(int x1,int y1,int w1,int h1,int x2,int y2,int w2,int h2); - int (*fce_isFreeSpace)(arena_t *arena, int x, int y, int w, int h); - void (*fce_findFreeSpace)(arena_t *arena, int *x, int *y, int w, int h); - void (*fce_proto_send_newtux_server)(int type, client_t *client, tux_t *tux); - void (*fce_proto_send_shot_server)(int type, client_t *client, shot_t *p); - - my_time_t (*fce_getMyTime)(); - - void (*fce_destroyShot)(shot_t *p); - void (*fce_boundBombBall)(shot_t *shot); - void (*fce_transformOnlyLasser)(shot_t *shot); - - int (*fce_pokus)(char *s); - -} export_fce_t; - -typedef struct module_s -{ - char *file; - void *image; - - int (*fce_init)(export_fce_t *p); -#ifndef PUBLIC_SERVER - int (*fce_draw)(int x, int y,int w, int h); -#endif - int (*fce_event)(); - int (*fce_isConflict)(int x, int y, int w, int h); - void (*fce_cmd)(char *line); - int (*fce_destroy)(); - -} module_t; - -extern void initModule(); -extern int loadModule(char *name); -#ifndef PUBLIC_SERVER -extern void drawModule(int x, int y, int w, int h); -#endif -extern void eventModule(); -extern void cmdModule(char *s); -extern int isConflictModule(int x, int y, int w, int h); -extern void quitModule(); - -#endif diff --git a/include/music.h b/include/music.h deleted file mode 100644 index 0ae83c4..0000000 --- a/include/music.h +++ /dev/null @@ -1,36 +0,0 @@ - -#ifndef MUSIC_H - -#define MUSIC_H - -#ifndef NO_SOUND - -#include -#include "main.h" - -#define MUSIC_GROUP_BASE "base" -#define MUSIC_GROUP_USER "user" - -/* -typedef struct music_struct -{ - char *name; - int group; - Mix_Music *music; -} music_t; -*/ - -extern bool_t isMusicInicialized(); -extern void initMusic(); -extern void addMusic(char *file, char *name, char *group); -extern void stopMusic(); -extern void playMusic(char *name, char *group); -extern void setMusicActive(bool_t n); -extern bool_t isMusicActive(); -extern char* getCurrentMusic(); -extern void delAllMusicInGroup(char *group); -extern void quitMusic(); - -#endif - -#endif diff --git a/include/myTimer.h b/include/myTimer.h deleted file mode 100644 index 97c2f65..0000000 --- a/include/myTimer.h +++ /dev/null @@ -1,32 +0,0 @@ - -#ifndef MY_TIME_H - -#define MY_TIME_H - -#include "main.h" -#include "list.h" - -#define my_time_t unsigned int - -#define TIMER_ONE 0 -#define TIMER_PERIODIC 1 - -typedef struct my_timer_struct -{ - unsigned int id; - void (*fce)(void *p); - void *arg; - int type; - my_time_t createTime; - my_time_t time; -} my_timer_t; - -extern list_t* newTimer(); -extern void restartTimer(); -extern my_time_t getMyTime(); -extern int addTaskToTimer(list_t *listTimer, int type, void (*fce)(void *p), void *arg, my_time_t my_time); -extern void eventTimer(list_t *listTimer); -extern void delTimer(list_t *listTimer, int id); -extern void destroyTimer(list_t *listTimer); - -#endif diff --git a/include/net_multiplayer.h b/include/net_multiplayer.h deleted file mode 100644 index 2da7dea..0000000 --- a/include/net_multiplayer.h +++ /dev/null @@ -1,35 +0,0 @@ - -#ifndef NET_MULTIPLAYER_H - -#define NET_MULTIPLAYER_H - -#include "main.h" -#include "tux.h" -#include "item.h" -#include "buffer.h" -#include "arena.h" -#include "tcp.h" -#include "udp.h" - -#define NET_GAME_TYPE_NONE 0 -#define NET_GAME_TYPE_SERVER 1 -#define NET_GAME_TYPE_CLIENT 2 - -#define NET_STATUS_OK 0 -#define NET_STATUS_ZOMBIE 1 - -#define NET_PROTOCOL_TYPE_TCP 0 -#define NET_PROTOCOL_TYPE_UDP 1 - -#define LIMIT_BUFFER 10240 - -#ifdef PUBLIC_SERVER -extern int initNetMulitplayerPublicServer(char *ip4, int port4, char *ip6, int port6); -#endif - -extern int initNetMuliplayer(int type, char *ip, int port, int proto); -extern int getNetTypeGame(); -extern void eventNetMultiplayer(); -extern void quitNetMultiplayer(); - -#endif diff --git a/include/network.h b/include/network.h deleted file mode 100755 index a7934eb..0000000 --- a/include/network.h +++ /dev/null @@ -1,12 +0,0 @@ - -#ifndef NETWORK_H - -#include "main.h" - -#define NETWORK_H - -extern int newSocket(int port,const char *ip); -extern int getNewClient(int sockfd); -extern int getNewClientIP(int sockfd,char **str_ip); - -#endif diff --git a/include/panel.h b/include/panel.h deleted file mode 100644 index 4935c75..0000000 --- a/include/panel.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef PANEL_H - -#define PANEL_H - -#include "main.h" -#include "list.h" - -#define PANEL_SCORE_LOCATION_X ( WINDOW_SIZE_X / 2 - w / 2 ) -#define PANEL_SCORE_LOCATION_Y ( WINDOW_SIZE_Y - 40 ) - -#define PANEL_SHOT_WIDTH 4 -#define PANEL_SHOT_HEIGHT 8 - -#define PANEL_LOCATION_X 0 -#define PANEL_LOCATION_Y (WINDOW_SIZE_Y-g_panel->h) - -#define PANEL_SHOT_FILL 0 -#define PANEL_SHOT_EMPTY 1 -#define PANEL_SHOT_LINE 2 - -extern bool_t isPanelInicialized(); -extern void initPanel(); -extern void drawPanel(list_t *listTux); -extern void quitPanel(); - -#endif diff --git a/include/path.h b/include/path.h deleted file mode 100644 index d253fe1..0000000 --- a/include/path.h +++ /dev/null @@ -1,33 +0,0 @@ - -#ifndef PATH_H - -#define PATH_H - -#include "main.h" - -#ifdef DESTDIR - -#define PATH_DIR "share/tuxanci-ng/" - -#endif - -#ifndef DESTDIR - -#define PATH_DIR "./" - -#undef DESTDIR -#define DESTDIR "" - -#endif - -#define PATH_IMAGE DESTDIR PATH_DIR "image/" -#define PATH_FONT DESTDIR PATH_DIR "font/" -#define PATH_ARENA DESTDIR PATH_DIR "arena/" -#define PATH_SOUND DESTDIR PATH_DIR "sound/" -#define PATH_MUSIC DESTDIR PATH_DIR "music/" -#define PATH_CONFIG DESTDIR PATH_DIR "conf/" -#define PATH_LANG DESTDIR PATH_DIR "lang/" -#define PATH_DATA DESTDIR PATH_DIR "data/" -#define PATH_MODULES DESTDIR PATH_DIR "modules/" - -#endif diff --git a/include/protect.h b/include/protect.h deleted file mode 100644 index e0553dd..0000000 --- a/include/protect.h +++ /dev/null @@ -1,30 +0,0 @@ - -#ifndef PROTECT_H - -#define PROTECT_H - -#include "main.h" -#include "myTimer.h" - -#define PROTECT_PING_INTERVAL_TIMEOUT 5000 -#define PROTECT_SPEED_INTERVAL_TIMEOUT 40 -#define PROTECT_SPEED_AVARAGE 10 - -typedef struct protect_struct -{ - my_time_t lastPing; - - my_time_t lastMove; - my_time_t avarage; - int count; - - bool_t isDown; -} protect_t; - -extern protect_t* newProtect(); -extern void refreshLastMove(protect_t *p); -extern void rereshLastPing(protect_t *p); -extern bool_t isDown(protect_t *p); -extern void destroyProtect(protect_t *p); - -#endif diff --git a/include/proto.h b/include/proto.h deleted file mode 100644 index 178b387..0000000 --- a/include/proto.h +++ /dev/null @@ -1,89 +0,0 @@ - -#ifndef MY_PROTO - -#define MY_PROTO - -#include "main.h" -#include "tux.h" -#include "server.h" -#include "item.h" -#include "shot.h" - -#include -#include -#include -#include - -#include "main.h" -#include "list.h" -#include "tux.h" -#include "item.h" -#include "shot.h" -#include "arenaFile.h" -#include "myTimer.h" -#include "server.h" -#include "proto.h" -#include "net_multiplayer.h" - -#ifndef PUBLIC_SERVER -#include "network.h" -#include "screen_world.h" -#include "screen_setting.h" -#include "screen_choiceArena.h" -#include "client.h" -#endif - -#ifdef PUBLIC_SERVER -#include "publicServer.h" -#endif - -#define PROTO_SEND_ONE 0 -#define PROTO_SEND_ALL 1 -#define PROTO_SEND_BUT 3 -#define PROTO_SEND_ALL_SEES_TUX 4 - -#define PROTO_ERROR_CODE_UNKNOWN 0 -#define PROTO_ERROR_CODE_BAD_VERSION 1 -#define PROTO_ERROR_CODE_BAD_NAME 2 -#define PROTO_ERROR_CODE_BAD_COMMAND 3 -#define PROTO_ERROR_CODE_TIMEOUT 4 - -extern void proto_send_error_server(int type, client_t *client, int errorcode); -extern void proto_recv_error_client(char *msg); -extern void proto_send_hello_client(char *name); -extern void proto_recv_hello_server(client_t *client, char *msg); -extern void proto_send_status_server(int type, client_t *client); -extern void proto_recv_status_server(client_t *client, char *msg); -extern void proto_send_listscore_server(int type, client_t *client, int max); -extern void proto_recv_listscore_server(client_t *client, char *msg); -extern void proto_send_check_client(int id); -extern void proto_recv_check_server(client_t *client, char *msg); -extern void proto_send_init_server(int type, client_t *client, client_t *client2); -extern void proto_recv_init_client(char *msg); -extern void proto_send_event_server(int type, client_t *client, tux_t *tux, int action); -extern void proto_recv_event_client(char *msg); -extern void proto_send_event_client(int action); -extern void proto_recv_event_server(client_t *client, char *msg); -extern void proto_send_newtux_server(int type, client_t *client, tux_t *tux); -extern void proto_recv_newtux_client(char *msg); -extern void proto_send_kill_server(int type, client_t *client, tux_t *tux); -extern void proto_recv_kill_client(char *msg); -extern void proto_send_score_server(int type, client_t *client, tux_t *tux); -extern void proto_recv_score_client(char *msg); -extern void proto_send_del_server(int type, client_t *client, int id); -extern void proto_recv_del_client(char *msg); -extern void proto_send_additem_server(int type, client_t *client, item_t *p); -extern void proto_recv_additem_client(char *msg); -extern void proto_send_shot_server(int type, client_t *client, shot_t *p); -extern void proto_recv_shot_client(char *msg); -extern void proto_send_ping_client(); -extern void proto_recv_ping_server(client_t *client, char *msg); -extern void proto_send_ping_server(int type, client_t *client); -extern void proto_recv_ping_client(char *msg); -extern void proto_send_end_server(int type, client_t *client); -extern void proto_recv_end_client(char *msg); -extern void proto_send_end_client(); -extern void proto_recv_end_server(client_t *client, char *msg); - -#endif - diff --git a/include/publicServer.h b/include/publicServer.h deleted file mode 100644 index 7fb22da..0000000 --- a/include/publicServer.h +++ /dev/null @@ -1,18 +0,0 @@ - -#ifndef PUBLIC_SERVER_H - -#define PUBLIC_SERVER_H - -#include "arena.h" - -#define WORLD_COUNT_ROUND_UNLIMITED -1 - -extern void countRoundInc(); -extern int initPublicServer(); -extern int getChoiceArenaId(); -extern void eventPublicServer(); -extern void my_handler_quit(int n); -extern void quitPublicServer(); -extern int startPublicServer(); - -#endif diff --git a/include/screen.h b/include/screen.h deleted file mode 100644 index b0d1593..0000000 --- a/include/screen.h +++ /dev/null @@ -1,32 +0,0 @@ - -#ifndef SCREEN_H - -#define SCREEN_H - -#include "main.h" - -typedef struct screen_struct -{ - char *name; - void (*fce_start)(); - void (*fce_event)(); - void (*fce_draw)(); - void (*fce_stop)(); -} screen_t; - -extern bool_t isScreenInicialized(); - -extern screen_t* newScreen(char *name, - void (*fce_start)(), void (*fce_event)(), - void (*fce_draw)(), void (*fce_stop)()); - -extern void destroyScreen(screen_t *p); -extern void registerScreen(screen_t *p); -extern void initScreen(); -extern void setScreen(char *name); -extern char* getScreen(); -extern void drawScreen(); -extern void eventScreen(); -extern void quitScreen(); - -#endif diff --git a/include/screen_analyze.h b/include/screen_analyze.h deleted file mode 100644 index 7404da6..0000000 --- a/include/screen_analyze.h +++ /dev/null @@ -1,25 +0,0 @@ - -#ifndef SCREEN_ANALYZE_H - -#define SCREEN_ANALYZE_H - -#include "main.h" - -typedef struct analyze_struct -{ - char *name; - int score; -} analyze_t; - -extern void startScreenAnalyze(); -extern void drawScreenAnalyze(); -extern void eventScreenAnalyze(); -extern void stopScreenAnalyze(); -extern void restartAnalyze(); -extern void addAnalyze(char *name, int score); -extern void setMsgToAnalyze(char *msg); -extern void endAnalyze(); -extern void initScreenAnalyze(); -extern void quitScreenAnalyze(); - -#endif diff --git a/include/screen_choiceArena.h b/include/screen_choiceArena.h deleted file mode 100644 index e6eebc4..0000000 --- a/include/screen_choiceArena.h +++ /dev/null @@ -1,17 +0,0 @@ - -#ifndef SCREEN_CHOICE_ARENA - -#define SCREEN_GAME_TYPE - -#include "main.h" - -#define SCREENSHOT_ARENA_WIDTH 160 -#define SCREENSHOT_ARENA_HEIGHT 107 - -extern void drawScreenChoiceArena(); -extern void eventScreenChoiceArena(); -extern int getChoiceArenaId(); -extern void initScreenChoiceArena(); -extern void quitScreenChoiceArena(); - -#endif diff --git a/include/screen_credits.h b/include/screen_credits.h deleted file mode 100644 index 2bbce80..0000000 --- a/include/screen_credits.h +++ /dev/null @@ -1,20 +0,0 @@ - -#ifndef SCREEN_CREDITS_H - -#define SCREEN_CREDITS_H - -#define SCREEN_CREDITS_FILE "credits.en" - -#define SCREEN_CREDITS_OFFSET_MIN 130 -#define SCREEN_CREDITS_OFFSET_MAX WINDOW_SIZE_Y-120 -#define SCREEN_CREDITS_OFFSET_RESTART -1000 -#define SCREEN_CREDITS_OFFSET_SPEED 2 - -extern void startScreenCredits(); -extern void drawScreenCredits(); -extern void eventScreenCredits(); -extern void stopScreenCredits(); -extern void initScreenCredits(); -extern void quitScreenCredits(); - -#endif diff --git a/include/screen_gameType.h b/include/screen_gameType.h deleted file mode 100644 index 1780e1c..0000000 --- a/include/screen_gameType.h +++ /dev/null @@ -1,15 +0,0 @@ - -#ifndef SCREEN_GAME_TYPE - -#define SCREEN_GAME_TYPE - -extern void drawScreenGameType(); -extern void eventScreenGameType(); -extern void initScreenGameType(); -extern int getSettingGameType(); -extern char* getSettingIP(); -extern int getSettingPort(); -extern int getSettingProto(); -extern void quitScreenGameType(); - -#endif diff --git a/include/screen_mainMenu.h b/include/screen_mainMenu.h deleted file mode 100644 index fddf85a..0000000 --- a/include/screen_mainMenu.h +++ /dev/null @@ -1,13 +0,0 @@ - -#ifndef SCREEN_MIAN_MENU_H - -#define SCREEN_MIAN_MENU_H - -extern void startScreenMainMenu(); -extern void drawScreenMainMenu(); -extern void eventScreenMainMenu(); -extern void stopScreenMainMenu(); -extern void initScreenMainMenu(); -extern void quitScreenMainMenu(); - -#endif diff --git a/include/screen_setting.h b/include/screen_setting.h deleted file mode 100644 index 1684c0d..0000000 --- a/include/screen_setting.h +++ /dev/null @@ -1,18 +0,0 @@ - -#ifndef SCREEN_SETTING - -#define SCREEN_SETTING - -extern void initScreenSetting(); -extern void drawScreenSetting(); -extern void eventScreenSetting(); -extern void getSettingNameRight(char *s); -extern void getSettingNameLeft(char *s); -extern void getSettingCountRound(int *n); -extern char* getSettingAI(); -extern bool_t isSettingAnyItem(); -extern bool_t isSettingItem(int item); -extern void quitScreenSetting(); - -#endif - diff --git a/include/screen_table.h b/include/screen_table.h deleted file mode 100644 index d16cbbb..0000000 --- a/include/screen_table.h +++ /dev/null @@ -1,17 +0,0 @@ - -#ifndef SCREEN_TABLE_H - -#define SCREEN_TABLE_H - -#define SCREEN_TABLE_MAX_PLAYERS 10 -#define SCREEN_TABLE_FILE_HIGHSCORE_NAME "highscore" - -extern void startScreenTable(); -extern void drawScreenTable(); -extern void eventScreenTable(); -extern void stopScreenTable(); -extern int addPlayerInHighScore(char *name, int score); -extern void initScreenTable(); -extern void quitScreenTable(); - -#endif diff --git a/include/screen_world.h b/include/screen_world.h deleted file mode 100644 index 0ba4b41..0000000 --- a/include/screen_world.h +++ /dev/null @@ -1,31 +0,0 @@ - -#ifndef SCREEN_WORLD_H - -#define SCREEN_WORLD_H - -#include "main.h" -#include "myTimer.h" -#include "tux.h" -#include "arena.h" - -#define TIMER_END_ARENA 5000 -#define WORLD_COUNT_ROUND_UNLIMITED -1 -#define LAG_SERVER_UNKNOWN -1 - -extern bool_t isScreenWorldInicialized(); -extern void initWorld(); -extern void setWorldArena(int id); -extern void setLagServer(my_time_t lag); -extern void countRoundInc(); -extern void setWorldEnd(); -extern void setMaxCountRound(int n); -extern tux_t* getControlTux(int control_type); -extern void setControlTux(tux_t *tux, int control_type); -extern void tuxControl(tux_t *p); -extern void drawWorld(); -extern void eventWorld(); -extern void startArena(); -extern void stopArena(); -extern void quitWorld(); - -#endif diff --git a/include/sdl_udp.h b/include/sdl_udp.h deleted file mode 100644 index 91a3c71..0000000 --- a/include/sdl_udp.h +++ /dev/null @@ -1,28 +0,0 @@ - -#ifndef MY_SDL_UDP - -#include - -#define MY_SDL_UDP - -#define SDL_UDP_SERVER 0 -#define SDL_UDP_CLIENT 1 - -typedef struct struct_sock_sdl_udp_t -{ - int type; - UDPsocket sock; - IPaddress srvadd; - UDPpacket *packet; -} sock_sdl_udp_t; - -sock_sdl_udp_t* newSdlSockUdp(); -void destroySockSdlUdp(sock_sdl_udp_t *p); -sock_sdl_udp_t* bindSdlUdpSocket(int port); -sock_sdl_udp_t* connectSdlUdpSocket(char *address, int port); -int readSdlUdpSocket(sock_sdl_udp_t *src, sock_sdl_udp_t *dst, void *address, int len); -int writeSdlUdpSocket(sock_sdl_udp_t *src, sock_sdl_udp_t *dst, void *address, int len); -int getSockSdlUdpPort(sock_sdl_udp_t *p); -void closeSdlUdpSocket(sock_sdl_udp_t *p); - -#endif diff --git a/include/server.h b/include/server.h deleted file mode 100644 index 24c6e0a..0000000 --- a/include/server.h +++ /dev/null @@ -1,94 +0,0 @@ - -#ifndef MY_SERVER - -#define MY_SERVER - -#include - -#include "list.h" -#include "tux.h" -#include "buffer.h" -#include "myTimer.h" -#include "protect.h" - -#ifndef PUBLIC_SERVER -#include "interface.h" -#endif - - -#ifdef SUPPORT_NET_SDL_UDP - -#include "sdl_udp.h" - -#endif - -#ifdef SUPPORT_NET_UNIX_UDP - -#include "udp.h" - -#endif - -#define SERVER_TIMEOUT 1000 -#define SERVER_TIME_SYNC 1000 -#define SERVER_TIME_PING 1000 -#define SERVER_MAX_CLIENTS 100 - - -#define SERVER_INDEX_ROOT_TUX 0 - -typedef struct client_struct -{ -#ifdef SUPPORT_NET_UNIX_UDP - sock_udp_t *socket_udp; -#endif - -#ifdef SUPPORT_NET_SDL_UDP - sock_sdl_udp_t *socket_sdl_udp; -#endif - int status; - - tux_t *tux; - - protect_t *protect; - - list_t *listSendMsg; - list_t *listRecvMsg; -} client_t; - -#ifdef PUBLIC_SERVER -extern int initUdpPublicServer(char *ip4, int port4, char *ip6, int port6); -#endif - -#ifdef SUPPORT_NET_UNIX_UDP -extern int initUdpServer(char *ip, int port, int proto); -extern int initUdpServerMultiProto(char *ip4, char *ip6, int port4, int port6); -extern client_t* newUdpClient(sock_udp_t *sock_udp); -extern int selectServerUdpSocket(); -extern void quitUdpServer(); -#endif - -#ifdef SUPPORT_NET_SDL_UDP -extern int initSdlUdpServer(int port); -extern client_t* newSdlUdpClient(sock_sdl_udp_t *sock_udp); -extern void selectServerSdlUdpSocket(); -extern void quitSdlUdpServer(); -#endif - -extern void destroyClient(client_t *p); - -extern time_t getUpdateServer(); -extern list_t* getListServerClient(); -extern int getServerMaxClients(); -extern void setServerMaxClients(int n); - -extern void sendClient(client_t *p, char *msg); -extern void protoSendClient(int type, client_t *client, char *msg, int type2, int id); - -extern tux_t *getServerTux(); -extern client_t *getClientFromTux(tux_t *tux); -extern void eventClientListBuffer(); -extern void sendInfoCreateClient(client_t *client); -extern void eventServer(); - -#endif - diff --git a/include/serverConfigFile.h b/include/serverConfigFile.h deleted file mode 100644 index d016807..0000000 --- a/include/serverConfigFile.h +++ /dev/null @@ -1,11 +0,0 @@ - - -#ifndef SERVER_CONFIG_FILE_H - -#define SERVER_CONFIG_FILE_H - -extern void initServerConfigFile(); -extern char* getServerConfigFileValue(char *env, char *s); -extern void quitServerConfigFile(); - -#endif diff --git a/include/shot.h b/include/shot.h deleted file mode 100644 index 7eae9cd..0000000 --- a/include/shot.h +++ /dev/null @@ -1,60 +0,0 @@ - -#ifndef SHOT_H - -#define SHOT_H - -#include "main.h" -#ifndef PUBLIC_SERVER -#include "interface.h" -#endif -#include "list.h" -#include "tux.h" -#include "arena.h" - -typedef struct shot_struct -{ - int id; - - int x; - int y; - - int w; - int h; - - int px; - int py; - - int position; - int gun; - - int author_id; - bool_t isCanKillAuthor; - -#ifndef PUBLIC_SERVER - SDL_Surface *img; -#endif -} shot_t; - -extern bool_t isShotInicialized(); -extern void initShot(); -extern shot_t* newShot(int x,int y, int px, int py, int gun, int author_id); -extern shot_t* getShotID(list_t *listShot, int id); -extern void replaceShotID(shot_t *shot, int id); -extern void getStatusShot(void *p, int *id, int *x,int *y, int *w, int *h); -extern void setStatusShot(void *p, int x, int y, int w, int h); -#ifndef PUBLIC_SERVER -extern void drawShot(shot_t *p); -extern void drawListShot(list_t *listShot); -#endif -extern int isConflictWithListShot(list_t *listShot, int x, int y, int w, int h); -extern void eventMoveListShot(arena_t *arena); -extern void checkShotIsInTuxScreen(arena_t *arena); - -extern void boundBombBall(shot_t *shot); -extern void transformOnlyLasser(shot_t *shot); - -extern void destroyShot(shot_t *p); -extern void quitShot(); - -#endif - diff --git a/include/sound.h b/include/sound.h deleted file mode 100644 index 337ef3b..0000000 --- a/include/sound.h +++ /dev/null @@ -1,33 +0,0 @@ - -#ifndef SOUND_H - -#define SOUND_H - -#ifndef NO_SOUND - -#include -#include "main.h" - -#define SOUND_GROUP_BASE "base" -#define SOUND_GROUP_USER "user" - -/* -typedef struct sound_struct -{ - char *name; - int group; - Mix_Chunk *sound; -} sound_t; -*/ - -extern bool_t isSoundInicialized(); -extern void initSound(); -extern void addSound(char *file, char *name, char *group); -extern void playSound(char *name, char *group); -extern void setSoundActive(bool_t n); -extern bool_t isSoundActive(); -extern void quitSound(); - -#endif - -#endif diff --git a/include/space.h b/include/space.h deleted file mode 100644 index de31768..0000000 --- a/include/space.h +++ /dev/null @@ -1,38 +0,0 @@ - -#ifndef SPACE_H - -#define SPACE_H - -#include "main.h" -#include "list.h" - -typedef struct space_struct -{ - int w; - int h; - int segW; - int segH; - list_t ***area; - list_t *list; - void (*getStatus)(void *p, int *id, int *x, int *y, int *w, int *h); - void (*setStatus)(void *p, int x, int y, int w, int h); -} space_t; - -extern space_t *newSpace(int w, int h, int segW, int segH, - void (*getStatus)(void *p, int *id, int *x, int *y, int *w, int *h), - void (*setStatus)(void *p, int x, int y, int w, int h)); - -extern void addObjectToSpace(space_t *p, void *item); -extern void getObjectFromSpace(space_t *p, int x, int y, int w, int h, list_t *list); -extern void* getObjectFromSpaceWithID(space_t *p, int id); -extern int isConflictWithObjectFromSpace(space_t *p, int x, int y, int w, int h); -extern int isConflictWithObjectFromSpaceBut(space_t *p, int x, int y, int w, int h, void *but); -extern void delObjectFromSpace(space_t *p, void *item); -extern void delObjectFromSpaceWithObject(space_t *p, void *item, void *f); -extern void moveObjectInSpace(space_t *p, void *item, int move_x, int move_y); -extern void printSpace(space_t *p); -extern void destroySpace(space_t *p); -extern void destroySpaceWithObject(space_t *p, void *f); - -#endif - diff --git a/include/storage.h b/include/storage.h deleted file mode 100644 index 81e554e..0000000 --- a/include/storage.h +++ /dev/null @@ -1,16 +0,0 @@ - -#ifndef STORAGE_H - -#define STORAGE_H - -#include "main.h" -#include "list.h" - -extern list_t* newStorage(); -extern void addItemToStorage(list_t *list, char *group, char *name, void *data); -extern void* getItemFromStorage(list_t *list, char *group, char *name); -extern void delItemFromStorage(list_t *list, char *group, char *name, void *f); -extern void delAllItemFromStorage(list_t *list, char *group, void *f); -extern void destroyStorage(list_t *p, void *f); - -#endif diff --git a/include/string_length.h b/include/string_length.h deleted file mode 100644 index b1712ee..0000000 --- a/include/string_length.h +++ /dev/null @@ -1,16 +0,0 @@ - -#ifndef STR_LENGTH_H - -#define STR_LENGTH_H - -#include "main.h" - -#define STR_SIZE 128 -#define STR_PROTO_SIZE 128 -#define STR_NUM_SIZE 8 -#define STR_NAME_SIZE 32 -#define STR_PATH_SIZE 4096 -#define STR_FILE_NAME_SIZE 256 -#define STR_IP_SIZE 64 - -#endif diff --git a/include/tcp.h b/include/tcp.h deleted file mode 100644 index d33f0b0..0000000 --- a/include/tcp.h +++ /dev/null @@ -1,25 +0,0 @@ - -#ifndef MY_TCP_H - -#define MY_TCP_H - -#include - -typedef struct struct_sock_tcp_t -{ - int sock; - struct sockaddr_in sockAddr; -} sock_tcp_t; - -extern sock_tcp_t* newSockTcp(); -extern void destroySockTcp(sock_tcp_t *p); -extern sock_tcp_t* bindTcpSocket(int port); -extern sock_tcp_t* getTcpNewClient(sock_tcp_t *p); -extern void getSockTcpIp(sock_tcp_t *p, char *str_ip); -extern int getSockTcpPort(sock_tcp_t *p); -extern sock_tcp_t* connectTcpSocket(char *ip, int port); -extern int readTcpSocket(sock_tcp_t *p, void *address, int len); -extern int writeTcpSocket(sock_tcp_t *p, void *address, int len); -extern void closeTcpSocket(sock_tcp_t *p); - -#endif diff --git a/include/term.h b/include/term.h deleted file mode 100644 index b48a2b7..0000000 --- a/include/term.h +++ /dev/null @@ -1,17 +0,0 @@ - -#ifndef TERM_H - -#define TERM_H - -#include "main.h" - -#define TERM_MAX_LINES 10 -#define TERM_DEL_TEXT_TIMEOUT 2000 - -extern void initTerm(); -extern void drawTerm(); -extern void eventTerm(); -extern void appendTextInTerm(char *s); -extern void quitTerm(); - -#endif diff --git a/include/textFile.h b/include/textFile.h deleted file mode 100755 index 3917db7..0000000 --- a/include/textFile.h +++ /dev/null @@ -1,21 +0,0 @@ - -#ifndef TEXTFILE_H - -#define TEXTFILE_H - -#include "list.h" - -typedef struct str_textFile_t -{ - char *file; - list_t *text; -} textFile_t; - -extern textFile_t* newTextFile(char *s); -extern textFile_t* loadTextFile(char *s); -extern void printTextFile(textFile_t *p); -extern void saveTextFile(textFile_t *p); -extern void destroyTextFile(textFile_t *p); - - -#endif diff --git a/include/tux.h b/include/tux.h deleted file mode 100644 index 25299a2..0000000 --- a/include/tux.h +++ /dev/null @@ -1,137 +0,0 @@ - -#ifndef TUX_H - -#define TUX_H - -#include "main.h" -#include "list.h" -#include "arena.h" - -#define TUX_STEP 7 -#define TUX_LAYER 0 - -#define TUX_MAX_ANIMATION_FRAME 10 -#define TUX_KEY 1 - -#define TUX_LOCATE_UNKNOWN -100 - -#define TUX_MAX_PICKUP 50 -#define TUX_MAX_BONUS 500 - -#define TUX_TIME_SPAWN 2000 -#define TUX_TIME_CAN_SHOT 500 -#define TUX_TIME_CAN_SWITCH_GUN 100 - -#define TUX_STATUS_ALIVE 0 -#define TUX_STATUS_DEAD 1 -#define TUX_STATUS_PAUZED 2 - -#define TUX_CONTROL_NONE 0 -#define TUX_CONTROL_KEYBOARD_LEFT 1 -#define TUX_CONTROL_KEYBOARD_RIGHT 2 -#define TUX_CONTROL_NET 3 -#define TUX_CONTROL_AI 4 - -#define TUX_WIDTH 30 -#define TUX_HEIGHT 30 - -#define TUX_IMG_WIDTH 40 -#define TUX_IMG_HEIGHT 54 - -#define TUX_UP 8 -#define TUX_LEFT 4 -#define TUX_RIGHT 6 -#define TUX_DOWN 2 -#define POSITION_UNKNOWN -1 - -#define TUX_SHOT 5 -#define TUX_SWITCH_GUN 0 - - -#define GUN_NONE -1 - -#define GUN_COUNT 7 -#define GUN_MAX_SHOT 5 - -#define BONUS_COUNT 6 -#define ITEM_COUNT 16 - - -#define SHOT_CHECK_AREA 25 - -#define GUN_SIMPLE 0 -#define GUN_DUAL_SIMPLE 1 -#define GUN_SCATTER 2 -#define GUN_TOMMY 3 -#define GUN_LASSER 4 -#define GUN_MINE 5 -#define GUN_BOMBBALL 6 - -#define ITEM_MINE 7 -#define ITEM_EXPLOSION 8 -#define ITEM_BIG_EXPLOSION 9 - -#define BONUS_NONE -1 -#define BONUS_SPEED 10 -#define BONUS_SHOT 11 -#define BONUS_TELEPORT 12 -#define BONUS_GHOST 13 -#define BONUS_4X 14 -#define BONUS_HIDDEN 15 - -typedef struct tux_struct -{ - int id; - - int x; - int y; - - char name[STR_NAME_SIZE]; - - int status; - int control; - int position; - int score; - - int gun; - int shot[GUN_COUNT]; - int round; - int bonus; - - int bonus_time; - int pickup_time; - - bool_t isCanShot; - bool_t isCanSwitchGun; - - int frame; - - void *client; -} tux_t; - -extern bool_t isTuxInicialized(); -extern void initTux(); -extern tux_t* newTux(); -extern bool_t isTuxAnyGun(tux_t *tux); -extern void getCourse(int n, int *x, int *y); -extern void drawTux(tux_t *tux); -extern void drawListTux(list_t *listTux); -extern void eventTuxIsDead(tux_t *tux); -extern tux_t* isConflictWithListTux(list_t *listTux, int x, int y, int w, int h); -extern int isConflictTuxWithListTux(tux_t *tux, list_t *listTux); -extern void eventConflictTuxWithShot(arena_t *arena); -extern void eventConflictTuxWithTeleport(list_t *listTux, list_t *listTeleport); -extern void tuxTeleport(tux_t *tux); -extern void actionTux(tux_t *tux, int action); -extern void eventListTux(list_t *listTux); -extern tux_t* getTuxID(list_t *listTux, int id); -extern void getTuxProportion(tux_t *tux, int *x,int *y, int *w, int *h); -extern void replaceTuxID(tux_t *tux, int id); -extern int isTuxSeesTux(tux_t *tux, tux_t *thisTux); -extern void setTuxProportion(tux_t *tux, int x, int y); -extern void getStatusTux(void *p, int *id, int *x,int *y, int *w, int *h); -extern void setStatusTux(void *p, int x, int y, int w, int h); -extern void destroyTux(tux_t *tux); -extern void quitTux(); - -#endif diff --git a/include/udp.h b/include/udp.h deleted file mode 100644 index 2b591c3..0000000 --- a/include/udp.h +++ /dev/null @@ -1,34 +0,0 @@ - -#ifndef MY_UDP - -#include - -#define MY_UDP - -#define SUPPORT_IPv6 - -#define PROTO_UDPv4 0 -#define PROTO_UDPv6 1 - -typedef struct struct_sock_udp_t -{ - int sock; - int proto; - -#ifdef SUPPORT_IPv6 - struct sockaddr_in6 sockAddr6; -#endif - struct sockaddr_in sockAddr; -} sock_udp_t; - -extern sock_udp_t* newSockUdp(int proto); -extern void destroySockUdp(sock_udp_t *p); -extern sock_udp_t* bindUdpSocket(char *address, int port, int proto); -extern sock_udp_t* connectUdpSocket(char *address, int port, int proto); -extern int readUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len); -extern int writeUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len); -extern void getSockUdpIp(sock_udp_t *p, char *str_ip, int len); -extern int getSockUdpPort(sock_udp_t *p); -extern void closeUdpSocket(sock_udp_t *p); - -#endif diff --git a/include/widget_button.h b/include/widget_button.h deleted file mode 100644 index 5090e55..0000000 --- a/include/widget_button.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef WIDGET_BUTTON_H - -#define WIDGET_BUTTON_H - -#include "main.h" - -#define WIDGET_BUTTON_TIME 10 - -#define WIDGET_BUTTON_WIDTH 125 -#define WIDGET_BUTTON_HEIGHT 36 - -typedef struct widget_button -{ - int x, y; - int w, h; - char *text; - void (*fce_event)(void *); -} widget_button_t; - -extern widget_button_t* newWidgetButton(char *text, int x, int y, void (*fce_event)(void *)); -extern void drawWidgetButton(widget_button_t *p); -extern void eventWidgetButton(widget_button_t *p); -extern void destroyWidgetButton(widget_button_t *p); - -#endif - diff --git a/include/widget_buttonimage.h b/include/widget_buttonimage.h deleted file mode 100644 index d03423e..0000000 --- a/include/widget_buttonimage.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef WIDGET_BUTTONIMAGE_H - -#include "main.h" - -#define WIDGET_BUTTONIMAGE_H - -#define WIDGET_BUTTONIMAGE_TIME 10 - -typedef struct widget_buttonimageimage -{ - int x, y; - int w, h; - int active; - SDL_Surface *image; - void (*fce_event)(void *); -} widget_buttonimage_t; - -extern widget_buttonimage_t* newWidgetButtonimage(SDL_Surface *image, int x, int y, - void (*fce_event)(void *)); - -extern void drawWidgetButtonimage(widget_buttonimage_t *p); -extern void eventWidgetButtonimage(widget_buttonimage_t *p); -extern void destroyWidgetButtonimage(widget_buttonimage_t *p); - -#endif - diff --git a/include/widget_check.h b/include/widget_check.h deleted file mode 100644 index 2e3a3a3..0000000 --- a/include/widget_check.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef WIDGET_CHECK_H - -#define WIDGET_CHECK_H - -#include "main.h" - -#define WIDGET_CHECK_TIME_SWITCH_STATUS 5 - -#define WIDGET_CHECK_WIDTH 25 -#define WIDGET_CHECK_HEIGHT 25 - -typedef struct widget_check -{ - int x, y; - bool_t status; - int time; - void (*fce_event)(void *); -} widget_check_t; - -extern widget_check_t* newWidgetCheck(int x, int y, bool_t status, void (*fce_event)(void *)); -extern void drawWidgetCheck(widget_check_t *p); -extern void eventWidgetCheck(widget_check_t *p); -extern void destroyWidgetCheck(widget_check_t *p); - -#endif - diff --git a/include/widget_image.h b/include/widget_image.h deleted file mode 100644 index 6bb316c..0000000 --- a/include/widget_image.h +++ /dev/null @@ -1,21 +0,0 @@ - -#ifndef WIDGET_IMAGE_H - -#define WIDGET_IMAGE_H - -#include "main.h" -#include "interface.h" - -typedef struct widget_image -{ - int x, y; - SDL_Surface *image; -} widget_image_t; - -extern widget_image_t* newWidgetImage(int x, int y, SDL_Surface *image); -extern void drawWidgetImage(widget_image_t *p); -extern void eventWidgetImage(widget_image_t *p); -extern void destroyWidgetImage(widget_image_t *p); - -#endif - diff --git a/include/widget_label.h b/include/widget_label.h deleted file mode 100644 index 7df88c2..0000000 --- a/include/widget_label.h +++ /dev/null @@ -1,24 +0,0 @@ - -#ifndef WIDGET_LABEL_H - -#define WIDGET_LABEL_H - -typedef struct widget_label -{ - int x, y; - int w, h; - char *text; - int bind; -} widget_label_t; - -#define WIDGET_LABEL_RIGHT 1 -#define WIDGET_LABEL_LEFT 2 -#define WIDGET_LABEL_CENTER 3 - -extern widget_label_t* newWidgetLabel(char *text, int x, int y, int bind); -extern void drawWidgetLabel(widget_label_t *p); -extern void eventWidgetLabel(widget_label_t *p); -extern void destroyWidgetLabel(widget_label_t *p); - -#endif - diff --git a/include/widget_select.h b/include/widget_select.h deleted file mode 100644 index 81255a9..0000000 --- a/include/widget_select.h +++ /dev/null @@ -1,26 +0,0 @@ - -#ifndef WIDGET_SELECT_H - -#define WIDGET_SELECT_H - -#include "main.h" -#include "list.h" - - -typedef struct widget_select -{ - int x, y; - int w, h; - list_t *list; - int select; - void (*fce_event)(void *); -} widget_select_t; - -extern widget_select_t* newWidgetSelect(int x, int y, void (*fce_event)(void *)); -extern void addToWidgetSelect(widget_select_t *p, char *s); -extern void drawWidgetSelect(widget_select_t *p); -extern void eventWidgetSelect(widget_select_t *p); -extern void destroyWidgetSelect(widget_select_t *p); - -#endif - diff --git a/include/widget_textfield.h b/include/widget_textfield.h deleted file mode 100644 index e5e7cf3..0000000 --- a/include/widget_textfield.h +++ /dev/null @@ -1,33 +0,0 @@ - -#ifndef WIDGET_TEXTFIELD_H - -#define WIDGET_TEXTFIELD_H - -#include "main.h" - -#define WIDGET_TEXTFIELD_WIDTH 188 -#define WIDGET_TEXTFIELD_HEIGHT 36 - -#define WIDGET_TEXTFIELD_TEXT_OFFSET_X 10 - -#define WIDGET_TEXTFIELD_TIME_READ_KEY 2 -#define WIDGET_TEXTFIELD_TIME_BLICK_CURSOR 20 - -typedef struct widget_textfield -{ - int x, y; - int w, h; - int canWrite; - int timeBlick; - int time; - char text[STR_SIZE]; - bool_t active; -} widget_textfield_t; - -extern widget_textfield_t* newWidgetTextfield(char *text, int x, int y); -extern void drawWidgetTextfield(widget_textfield_t *p); -extern void eventWidgetTextfield(widget_textfield_t *p); -extern void destroyWidgetTextfield(widget_textfield_t *p); - -#endif - diff --git a/lang/cs.lang b/lang/cs.lang deleted file mode 100644 index 9920dfa..0000000 --- a/lang/cs.lang +++ /dev/null @@ -1,46 +0,0 @@ -### -# Czech translation file -# Author: xHire -### - -# about the author of this translation -AUTHOR xHire -AUTHOR_EMAIL xhire@tuxportal.cz -AUTHOR_JABBER Miczek@gmail.com - -# specify font for this language -HEAD fontfile="DejaVuSans.ttf" fontsize="16" - -# general -OK Ok -BACK Zpět -NEXT Další - -# browser -REFRESH Obnovit - -# error message -ERROR_BAD_VERSION Máte verzi klienta, kterou server nepodporuje. -ERROR_SERVER_DONT_ALIVE Server neodpovida. - -# main menu -PLAY Hraj -SETTING Nastavení -TABLE Top Skóre -CREDITS Autoři -END Konec - -# settings - menu -COUNT_ROUND Počet kol: -NAME_PLAYER1 Hráč 1: -NAME_PLAYER2 Hráč 2: -MUSIC Hudba: -SOUND Zvuky: - -# settings - game type -NONE Lokální hra -SERVER Vytvoření serveru -CLIENT Síťová hra -IP_ADDR IP adresa serveru: -NET_PORT Síťový port: -BROWSER Vyhledávač diff --git a/lang/en.lang b/lang/en.lang deleted file mode 100644 index 2fbfaca..0000000 --- a/lang/en.lang +++ /dev/null @@ -1,46 +0,0 @@ -### -# Englis translation file -# Author: Oroborus -### - -# about the author of this translation -AUTHOR Oroborus -AUTHOR_EMAIL dusan.d@centrum.sk -AUTHOR_JABBER oroborus@jabbim.sk - -# specify font for this language -HEAD fontfile="DejaVuSans.ttf" fontsize="16" - -# general -OK Ok -BACK Back -NEXT Next - -# browser -REFRESH Refresh - -# error message -ERROR_BAD_VERSION Version of your client isn't supported by the server. -ERROR_SERVER_DONT_ALIVE Server's not responding, connection was closed. - -# main menu -PLAY Play -SETTING Settings -TABLE Top Score -CREDITS Credits -END End - -# settings - menu -COUNT_ROUND Count Round: -NAME_PLAYER1 Player 1: -NAME_PLAYER2 Player 2: -MUSIC Music: -SOUND Sound: -BROWSER Browser - -# settings - game type -NONE Local game -SERVER Set up a server -CLIENT Network game -IP_ADDR IP address: -NET_PORT Network port: diff --git a/lang/fr.lang b/lang/fr.lang deleted file mode 100644 index 84a1326..0000000 --- a/lang/fr.lang +++ /dev/null @@ -1,39 +0,0 @@ -### -# Englis translation file -# Author: Oroborus -### - -# about the author of this translation -AUTHOR MeV -AUTHOR_EMAIL chrystalyst@free.fr -AUTHOR_JABBER unknown - - -# specify font for this language -HEAD fontfile="DejaVuSans.ttf" fontsize="16" - -# general -OK Ok -BACK Précédent -NEXT Suivant - -# browser -REFRESH Refresh - -# error message -ERROR_BAD_VERSION Version of your client isn't supported by the server. - -# main menu -PLAY Jouer -SETTING Paramètres -TABLE Meilleur Score -CREDITS Auteurs -END Quitter - -# settings - menu -COUNT_ROUND Count Round: -NAME_PLAYER1 Joueur de droite : -NAME_PLAYER2 Joueur de gauche : -MUSIC Musique : -SOUND Son : -BROWSER Browser \ No newline at end of file diff --git a/lang/sk.lang b/lang/sk.lang deleted file mode 100644 index bd710c4..0000000 --- a/lang/sk.lang +++ /dev/null @@ -1,46 +0,0 @@ -### -# Slovak translation file -# Author: Oroborus -### - -# about the author of this translation -AUTHOR Oroborus -AUTHOR_EMAIL dusan.d@centrum.sk -AUTHOR_JABBER oroborus@jabbim.sk - -# specify font for this language -HEAD fontfile="DejaVuSans.ttf" fontsize="16" - -# general -OK Ok -BACK Späť -NEXT Ďalej - -# browser -REFRESH Refresh - -# error message -ERROR_BAD_VERSION Mate verziu clienta, ktoru server nepodporuje. -ERROR_SERVER_DONT_ALIVE Server neodpoveda. - -# main menu -PLAY Hrať -SETTING Nastavenia -TABLE Tabuľka -CREDITS Autori -END Koniec - -# settings - menu -COUNT_ROUND Počet kôl: -NAME_PLAYER1 Meno Hraca 1: -NAME_PLAYER2 Meno Hraca 2: -MUSIC Hudba: -SOUND Zvuk: -BROWSER Browser - -# settings - game type -NONE žiadne -SERVER server -CLIENT client -IP_ADDR IP adresa: -NET_PORT Sieotvy port: \ No newline at end of file diff --git a/modules/Makefile b/modules/Makefile deleted file mode 100755 index e9546c8..0000000 --- a/modules/Makefile +++ /dev/null @@ -1,28 +0,0 @@ - -CFLAGS = -g -O0 -I../include -Wall - -modTeleport: - gcc $(CFLAGS) -fPIC -I../include `sdl-config --cflags` -c list.c -o list.o - gcc $(CFLAGS) -fPIC -I../include `sdl-config --cflags` -c space.c -o space.o - gcc $(CFLAGS) -fPIC -I../include `sdl-config --cflags` -c modTeleport.c -o modTeleport.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modTeleport.so modTeleport.o list.o space.o - -modPipe: - gcc $(CFLAGS) -fPIC -I../include `sdl-config --cflags` -c list.c -o list.o - gcc $(CFLAGS) -fPIC -I../include `sdl-config --cflags` -c space.c -o space.o - gcc $(CFLAGS) -fPIC -I../include `sdl-config --cflags` -c modPipe.c -o modPipe.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modPipe.so modPipe.o list.o space.o - -modWall: - gcc $(CFLAGS) -fPIC -I../include `sdl-config --cflags` -c list.c -o list.o - gcc $(CFLAGS) -fPIC -I../include `sdl-config --cflags` -c space.c -o space.o - gcc $(CFLAGS) -fPIC -I../include `sdl-config --cflags` -c modWall.c -o modWall.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modWall.so modWall.o list.o space.o - -modAI: - gcc $(CFLAGS) -fPIC -I../include `sdl-config --cflags` -c modAI.c -o modAI.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modAI.so modAI.o - -clean: - rm -rf *.o - rm -rf *.so diff --git a/modules/Makefile-publicserver b/modules/Makefile-publicserver deleted file mode 100755 index 030361c..0000000 --- a/modules/Makefile-publicserver +++ /dev/null @@ -1,24 +0,0 @@ - -CFLAGS = -g -O0 -I../include -Wall - -modTeleport: - gcc $(CFLAGS) -fPIC -I../include -c list.c -o list.o - gcc $(CFLAGS) -fPIC -I../include -c space.c -o space.o - gcc $(CFLAGS) -fPIC -I../include -c modTeleport.c -o modTeleport.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modTeleport.so modTeleport.o list.o space.o - -modPipe: - gcc $(CFLAGS) -fPIC -I../include -c list.c -o list.o - gcc $(CFLAGS) -fPIC -I../include -c space.c -o space.o - gcc $(CFLAGS) -fPIC -I../include -c modPipe.c -o modPipe.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modPipe.so modPipe.o list.o space.o - -modWall: - gcc $(CFLAGS) -fPIC -I../include -c list.c -o list.o - gcc $(CFLAGS) -fPIC -I../include -c space.c -o space.o - gcc $(CFLAGS) -fPIC -I../include -c modWall.c -o modWall.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modWall.so modWall.o list.o space.o - -clean: - rm -rf *.o - rm -rf *.so diff --git a/modules/list.c b/modules/list.c deleted file mode 100755 index 27b0ed8..0000000 --- a/modules/list.c +++ /dev/null @@ -1,241 +0,0 @@ - -#include "main.h" -#include "list.h" - -#include -#include -#include -#include - -list_t* newList() -{ - list_t *new; - - new = malloc( sizeof(list_t) ); - memset(new, 0, sizeof(list_t) ); - - return new; -} - -list_t* cloneList(list_t *p) -{ - list_t *new; - - assert( p != NULL ); - - new = malloc( sizeof(list_t) ); - memcpy(new, p, sizeof(list_t) ); - - if( p->list != NULL ) - { - new->list = malloc( p->alloc * sizeof(void *) ); - memcpy(new->list, p->list, p->alloc * sizeof(void *)); - } - - return new; -} - -list_t* cloneListItem(list_t *p, void *f) -{ - list_t *new; - void* (*fce)(void *); - int i; - - assert( p != NULL ); - assert( f != NULL ); - - new = cloneList(p); - fce = f; - - for(i = 0 ; i < p->count ; i++) - new->list[i] = fce(p->list[i]); - - return new; -} - -void addList(list_t *p, void *item) -{ - assert( p != NULL ); - - if( p->alloc == 0 ) - { - p->alloc = LIST_ALLOC_LIMIT; - p->count = 1; - p->list = malloc(p->alloc * sizeof(void *) ); - p->list[0] = item; - - return; - } - - if( p->count + 1 <= p->alloc ) - { - p->list[p->count] = item; - p->count += 1; - - return; - } - - if( p->count + 1 > p->alloc ) - { - void **new; - -#ifdef DEBUG_LIST - printf("realokujem z %d na %d (count=%d)\n", - p->alloc, p->alloc+LIST_ALLOC_LIMIT, p->count); -#endif - - p->alloc += LIST_ALLOC_LIMIT; - new = malloc(p->alloc * sizeof(void *) ); - memcpy(new, p->list, p->count * sizeof(void *) ); - free(p->list); - p->list = new; - p->list[p->count] = item; - p->count++; - - return; - } -} - -void insList(list_t *p, int n, void *item) -{ - assert( p != NULL ); - - addList(p, NULL); // :) - - assert( n >= 0 || n < p->count ); - - memmove(p->list+n+1, p->list+n, ( (p->count-1) - n ) * sizeof(void *)); - - p->list[n] = item; -} - -void *getList(list_t *p, int n) -{ - assert( p != NULL ); - assert( n >= 0 || n < p->count ); - - return p->list[n]; -} - -int searchListItem(list_t *p, void *n) -{ - int i; - - assert( p != NULL ); - - for( i = 0 ; i < p->count ; i++ ) - if( p->list[i] == n )return i; - - return -1; -} - -void delList(list_t *p, int n) -{ - assert( p != NULL ); - assert( n >= 0 || n < p->count ); - - memmove(p->list+n, p->list+n+1, ( (p->count-1) - n ) * sizeof(void *)); - - p->count--; - - if( p->count + LIST_ALLOC_LIMIT < p->alloc ) - { - void **new; - -#ifdef DEBUG_LIST - printf("realokujem z %d na %d (count=%d)\n", - p->alloc, p->alloc-LIST_ALLOC_LIMIT, p->count); -#endif - - p->alloc -= LIST_ALLOC_LIMIT; - new = malloc(p->alloc * sizeof(void *) ); - memcpy(new, p->list, p->count * sizeof(void *) ); - free(p->list); - p->list = new; - } -} - -void delListItem(list_t *p, int n, void *f) -{ - int (*fce)(void *); - - assert( p != NULL ); - assert( n >= 0 || n < p->count ); - - fce = f; - if( fce != NULL )fce(p->list[n]); - - delList(p, n); -} - -void listDoEmpty(list_t *p) -{ - p->count = 0; -} - -void destroyList(list_t *p) -{ - assert( p != NULL ); - - if( p->list != NULL )free(p->list); - free(p); -} - -void destroyListItem(list_t *p, void *f) -{ - void (*fce)(void *); - int i; - - assert( p != NULL ); - assert( f != NULL ); - - fce = f; - - for(i = 0 ; i < p->count ; i++) - fce(p->list[i]); - - destroyList(p); -} - -/* -typedef struct pokus_str -{ - int x; -} pokus; - -pokus* newPokus(int n) -{ - pokus *new; - new = malloc(sizeof(pokus)); - new->x = n; - return new; -} - -pokus *clonePokus(pokus *p) -{ - pokus *new; - new = malloc(sizeof(pokus)); - memcpy(new, p, sizeof(pokus)); - return new; -} - -void destroyPokus(pokus *p) -{ - free(p); -} - -int main() -{ - list_t *my; - int i; - - my = newList(); - - for(i = 0; i < 100; i++) - addList(my, newPokus(i)); - - destroyListItem(my, destroyPokus); - - return 0; -} -*/ diff --git a/modules/list.h b/modules/list.h deleted file mode 100755 index 5a15786..0000000 --- a/modules/list.h +++ /dev/null @@ -1,33 +0,0 @@ - -#ifndef LIST_H - -#define LIST_H - -#include "main.h" - -#define LIST_ALLOC_LIMIT 16 - -typedef struct list_str -{ - void **list; - int count; - int alloc; -} list_t; - -extern list_t* newList(); -extern list_t* cloneList(list_t *p); -extern list_t* cloneListItem(list_t *p, void *f); - -extern void addList(list_t *p, void *item); -extern void insList(list_t *p, int n, void *item); -extern void *getList(list_t *p,int n); -extern int searchListItem(list_t *p, void *n); - -extern void delList(list_t *p,int n); -extern void delListItem(list_t *p,int n,void *f); -extern void listDoEmpty(list_t *p); - -extern void destroyList(list_t *p); -extern void destroyListItem(list_t *p,void *f); - -#endif diff --git a/modules/modAI.c b/modules/modAI.c deleted file mode 100755 index 53f689e..0000000 --- a/modules/modAI.c +++ /dev/null @@ -1,256 +0,0 @@ - -#include -#include -#include -#include - -#include "main.h" -#include "modules.h" -#include "tux.h" -#include "shot.h" -#include "list.h" -#include "gun.h" -#include "space.h" - -#ifndef PUBLIC_SERVER -#include "interface.h" -#include "image.h" -#endif - -#ifdef PUBLIC_SERVER -#include "publicServer.h" -#endif - -static export_fce_t *export_fce; - -static void cmd_ai(char *line) -{ -} - -int init(export_fce_t *p) -{ - export_fce = p; - - return 0; -} - -#ifndef PUBLIC_SERVER - -int draw(int x, int y, int w, int h) -{ - return 0; -} -#endif - -///////////////// - -int colisionAll(tux_t *tux, int px, int py) -{ - arena_t *arena; - int x, y, w, h; - - arena = export_fce->fce_getCurrentArena(); - - export_fce->fce_getTuxProportion(tux, &x, &y, &w, &h); - x += px; - y += py; - - return export_fce->fce_isFreeSpace(arena, x, y, w, h); -} - -void gotoTux(tux_t *tux, int x, int y, int w, int h) -{ - int px = 0,py = 0; - int smer = TUX_DOWN; - - if(tux->x > x+w ) px = -TUX_STEP; - if(tux->x < x ) px = +TUX_STEP; - if(tux->y > y+h ) py = -TUX_STEP; - if(tux->y < y ) py = +TUX_STEP; - - if( px != 0 && py !=0 ) px = 0; - - while( colisionAll(tux, px, 0 ) ) - { - px=0; - if(py==0) py = +TUX_STEP; - goto sem; - } - - while( colisionAll(tux, 0, py ) ) - { - py = 0; - if( px == 0 ) px = +TUX_STEP; - } - - sem: - if( px != 0 && py != 0 ) px = 0; - - if( py== -TUX_STEP )smer = TUX_UP; - if( px== +TUX_STEP )smer = TUX_RIGHT; - if( px== -TUX_STEP )smer = TUX_LEFT; - if( py== +TUX_STEP )smer = TUX_DOWN; - - //printf("smer=%d\n",smer); - export_fce->fce_actionTux(tux, smer); -} - -void gotoTuxShot(tux_t *tux, int x, int y, int w, int h) -{ - if( tux->x > x && tux->x < x+w ) - { - if( tux->y > y+h )tux->position = TUX_UP; - if( tux->y < y )tux->position = TUX_DOWN; - - if( colisionAll(tux, 0, 0) == 0 ) - { - if( tux->shot[GUN_SIMPLE] > 0 )tux->gun = GUN_SIMPLE; - if( tux->shot[GUN_DUAL_SIMPLE] > 0 )tux->gun = GUN_DUAL_SIMPLE; - if( tux->shot[GUN_SCATTER] > 0 )tux->gun = GUN_SCATTER; - if( tux->shot[GUN_TOMMY] > 0 )tux->gun = GUN_TOMMY; - if( tux->shot[GUN_LASSER] > 0 )tux->gun = GUN_LASSER; - if( tux->shot[GUN_BOMBBALL] > 0 )tux->gun = GUN_BOMBBALL; - - export_fce->fce_actionTux(tux, TUX_SHOT); - } - } - - if( tux->y > y && tux->y < y+h ) - { - if( tux->x > x+w )tux->position=TUX_LEFT; - if( tux->x < x )tux->position=TUX_RIGHT; - - if( colisionAll(tux, 0 , 0) == 0 ) - { - if( tux->shot[GUN_SIMPLE] > 0 )tux->gun = GUN_SIMPLE; - if( tux->shot[GUN_DUAL_SIMPLE] > 0 )tux->gun = GUN_DUAL_SIMPLE; - if( tux->shot[GUN_SCATTER] > 0 )tux->gun = GUN_SCATTER; - if( tux->shot[GUN_TOMMY] > 0 )tux->gun = GUN_TOMMY; - if( tux->shot[GUN_LASSER] > 0 )tux->gun = GUN_LASSER; - if( tux->shot[GUN_BOMBBALL] > 0 )tux->gun = GUN_BOMBBALL; - - export_fce->fce_actionTux(tux, TUX_SHOT); - } - } -} - -void killTux(tux_t *tux, int active) -{ - arena_t *arena; - int i; - - arena = export_fce->fce_getCurrentArena(); - - for( i = 0 ; i < arena->spaceTux->list->count ; i++ ) - { - tux_t *thisTux; - - thisTux = arena->spaceTux->list->list[i]; - - if( thisTux->control != TUX_CONTROL_KEYBOARD_LEFT && - thisTux->status == TUX_STATUS_ALIVE ) - { - gotoTuxShot(tux, thisTux->x, thisTux->y, - TUX_WIDTH, TUX_HEIGHT); - - if( active ) - { - gotoTux(tux, thisTux->x, thisTux->y, - TUX_WIDTH, TUX_HEIGHT); - - gotoTuxShot(tux, thisTux->x, thisTux->y, - TUX_WIDTH, TUX_HEIGHT); - - break; - } - } - } -} - -///////////////// - -static void eventTux(tux_t *tux) -{ - arena_t *arena; - item_t *item; - - arena = export_fce->fce_getCurrentArena(); - - killTux(tux, 0); - - item = NULL; - - if( arena->spaceItem->list->count > 0 ) - { - item = (item_t *) arena->spaceItem->list->list[0]; - } - - if( item != NULL && - item->type != GUN_MINE ) - { - gotoTux(tux, item->x, item->y, - item->w, item->h); - } - else - { - killTux(tux, 1); - } -} - -int event() -{ - static my_time_t lastEvent = 0; - my_time_t curentTime; - arena_t *arena; - int countTuxAI; - int i; - - if( lastEvent == 0 ) - { - lastEvent = export_fce->fce_getMyTime(); - } - - curentTime = export_fce->fce_getMyTime(); - - if( curentTime - lastEvent < 25 ) - { - return 0; - } - - lastEvent = export_fce->fce_getMyTime(); - //printf("event AI\n"); - - arena = export_fce->fce_getCurrentArena(); - countTuxAI = 0; - - for( i = 0 ; i < arena->spaceTux->list->count ; i++ ) - { - tux_t *thisTux; - - thisTux = arena->spaceTux->list->list[i]; - - if( thisTux->control == TUX_CONTROL_AI && - thisTux->status == TUX_STATUS_ALIVE ) - { - eventTux(thisTux); - countTuxAI = 0; - } - } - - return 0; -} - -int isConflict(int x, int y, int w, int h) -{ - return 0; -} - -void cmd(char *line) -{ - if( strncmp(line, "ai", 2) == 0 )cmd_ai(line); -} - -int destroy() -{ - return 0; -} diff --git a/modules/modPipe.c b/modules/modPipe.c deleted file mode 100755 index 2c1a6e5..0000000 --- a/modules/modPipe.c +++ /dev/null @@ -1,453 +0,0 @@ - -#include -#include -#include -#include - -#include "main.h" -#include "modules.h" -#include "tux.h" -#include "shot.h" -#include "list.h" -#include "gun.h" -#include "space.h" - -#ifndef PUBLIC_SERVER -#include "interface.h" -#include "image.h" -#endif - -#ifdef PUBLIC_SERVER -#include "publicServer.h" -#endif - -typedef struct pipe_struct -{ - int x; // poloha steny - int y; - - int w; // rozmery steny - int h; - - int id; - int id_out; - int position; - - int layer; // vrstva - -#ifndef PUBLIC_SERVER - SDL_Surface *img; //obrazok -#endif -} pipe_t; - -static export_fce_t *export_fce; - -static list_t *listPipe; -static space_t *spacePipe; - -#ifndef PUBLIC_SERVER -static pipe_t* newPipe(int x, int y, int w, int h, int layer, int id, int id_out, int position, SDL_Surface *img) -#endif - -#ifdef PUBLIC_SERVER -static pipe_t* newPipe(int x, int y, int w, int h, int layer, int id, int id_out, int position) -#endif - -{ - pipe_t *new; - -#ifndef PUBLIC_SERVER - assert( img != NULL ); -#endif - - new = malloc( sizeof(pipe_t) ); - assert( new != NULL ); - - new->x = x; - new->y = y; - new->w = w; - new->h = h; - new->layer = layer; - new->id = id; - new->id_out = id_out; - new->position = position; -#ifndef PUBLIC_SERVER - new->img = img; -#endif - return new; -} - -static void setStatusPipe(void *p, int x, int y, int w, int h) -{ - pipe_t *pipe; - - pipe = p; - - pipe->x = x; - pipe->y = y; - pipe->w = w; - pipe->h = h; -} - -static void getStatusPipe(void *p, int *id, int *x, int *y, int *w, int *h) -{ - pipe_t *pipe; - - pipe = p; - - *id = pipe->id; - *x = pipe->x; - *y = pipe->y; - *w = pipe->w; - *h = pipe->h; -} - -#ifndef PUBLIC_SERVER - -static void drawPipe(pipe_t *p) -{ - assert( p != NULL ); - - export_fce->fce_addLayer(p->img, p->x, p->y, 0, 0, p->img->w, p->img->h, p->layer); -} - -#endif - -static void destroyPipe(pipe_t *p) -{ - assert( p != NULL ); - free(p); -} - - -static void cmd_teleport(char *line) -{ - char str_x[STR_NUM_SIZE]; - char str_y[STR_NUM_SIZE]; - char str_w[STR_NUM_SIZE]; - char str_h[STR_NUM_SIZE]; - char str_id[STR_NUM_SIZE]; - char str_id_out[STR_NUM_SIZE]; - char str_position[STR_NUM_SIZE]; - char str_layer[STR_NUM_SIZE]; - char str_image[STR_SIZE]; - pipe_t *new; - - if( export_fce->fce_getValue(line, "x", str_x, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "y", str_y, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "w", str_w, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "h", str_h, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "id", str_id, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "id_out", str_id_out, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "position", str_position, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "layer", str_layer, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "image", str_image, STR_SIZE) != 0 )return; - -#ifndef PUBLIC_SERVER - new = newPipe(atoi(str_x), atoi(str_y), - atoi(str_w), atoi(str_h), - atoi(str_layer), atoi(str_id), atoi(str_id_out), atoi(str_position), - export_fce->fce_getImage(IMAGE_GROUP_USER, str_image) ); -#endif - -#ifdef PUBLIC_SERVER - new = newPipe(atoi(str_x), atoi(str_y), - atoi(str_w), atoi(str_h), - atoi(str_layer), atoi(str_id), atoi(str_id_out), atoi(str_position) ); -#endif - - if( spacePipe == NULL ) - { - spacePipe = newSpace(export_fce->fce_getCurrentArena()->w, export_fce->fce_getCurrentArena()->h, - 320, 240, getStatusPipe, setStatusPipe); - } - - addObjectToSpace(spacePipe, new); -} - -static int myAbs(int n) -{ - return ( n > 0 ? n : -n ); -} - - -static int getSppedShot(shot_t *shot) -{ - return ( myAbs(shot->px) > myAbs(shot->py) ? myAbs(shot->px) : myAbs(shot->py) ); -} - -static void transformShot(shot_t *shot, int position) -{ - int speed; - - speed = getSppedShot(shot); - - switch( position ) - { - case TUX_UP : - shot->px = 0; - shot->py = -speed; - break; - - case TUX_LEFT : - shot->px = -speed; - shot->py = 0; - break; - - case TUX_RIGHT : - shot->px = speed; - shot->py = 0; - break; - - case TUX_DOWN : - shot->px = 0; - shot->py = +speed; - break; - } - - shot->position = position; - shot->isCanKillAuthor = TRUE; - - if( shot->gun == GUN_LASSER ) - { - export_fce->fce_transformOnlyLasser(shot); - } -} - -static void moveShot(shot_t *shot, int position, int src_x, int src_y, - int dist_x, int dist_y, int dist_w, int dist_h) -{ - int offset = 0; - int new_x, new_y; - - switch( shot->position ) - { - case TUX_UP : - case TUX_DOWN : - offset = shot->x - src_x; - break; - - case TUX_RIGHT : - case TUX_LEFT : - offset = shot->y - src_y; - break; - } - - transformShot(shot, position); - - switch( shot->position ) - { - case TUX_UP : - new_x = dist_x + offset; - new_y = dist_y; - break; - - case TUX_LEFT : - new_x = dist_x; - new_y = dist_y + offset; - break; - - case TUX_RIGHT : - new_x = dist_x + dist_w; - new_y = dist_y + offset; - break; - - case TUX_DOWN : - new_x = dist_x + offset; - new_y = dist_y + dist_h; - break; - } - - new_y += shot->px; - new_y += shot->py; - - moveObjectInSpace(export_fce->fce_getCurrentArena()->spaceShot, shot, new_x, new_y); - - if( export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_SERVER ) - { - export_fce->fce_proto_send_shot_server(PROTO_SEND_ALL, NULL, shot); - } -} - -static void moveShotFromPipe(shot_t *shot, pipe_t *pipe) -{ - pipe_t *distPipe; - - distPipe = getObjectFromSpaceWithID(spacePipe, pipe->id_out); - - if( distPipe == NULL ) - { - fprintf(stderr, "Pipe %d ID not found\n", pipe->id); - return; - } - - moveShot(shot, distPipe->position, pipe->x, pipe->y, - distPipe->x, distPipe->y, distPipe->w, distPipe->h); -} - -int init(export_fce_t *p) -{ - export_fce = p; - - listPipe = newList(); - - return 0; -} - -#ifndef PUBLIC_SERVER - -int draw(int x, int y, int w, int h) -{ - pipe_t *thisPipe; - int i; - - if( spacePipe == NULL ) - { - return 0; - } - - listDoEmpty(listPipe); - getObjectFromSpace(spacePipe, x, y, w, h, listPipe); - //printSpace(spacePipe); - - for( i = 0 ; i < listPipe->count ; i++ ) - { - thisPipe = (pipe_t *)listPipe->list[i]; - assert( thisPipe != NULL ); - drawPipe(thisPipe); - } - - return 0; -} -#endif - -static int negPosition(int n) -{ - switch( n ) - { - case TUX_UP : - return TUX_DOWN; - - case TUX_LEFT : - return TUX_RIGHT; - - case TUX_RIGHT : - return TUX_LEFT; - - case TUX_DOWN : - return TUX_UP; - - default : - assert( ! "premenna n ma zlu hodnotu !" ); - break; - } -} - -int event() -{ - pipe_t *thisPipe; - arena_t *arena; - int i; - - if( spacePipe == NULL ) - { - return 0; - } - -/* - if( export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_CLIENT ) - { - return; - } -*/ - arena = export_fce->fce_getCurrentArena(); - - for( i = 0 ; i < arena->spaceShot->list->count ; i++ ) - { - shot_t *thisShot; - int j; - - thisShot = (shot_t *) arena->spaceShot->list->list[i]; - assert( thisShot != NULL ); - - listDoEmpty(listPipe); - getObjectFromSpace(spacePipe, thisShot->x, thisShot->y, thisShot->w, thisShot->h, listPipe); - - for( j = 0 ; j < listPipe->count ; j++ ) - { - tux_t *author; - - thisPipe = (pipe_t *)listPipe->list[j]; - - author = getObjectFromSpaceWithID(arena->spaceTux, thisShot->author_id); - - if( author != NULL && - author->bonus == BONUS_GHOST && - author->bonus_time > 0 ) - { - continue; - } - - if( negPosition( thisShot->position ) == thisPipe->position ) - { - //moveShotFromPipe(thisShot, thisPipe, listPipe); - - if( export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_CLIENT ) - { - if( thisShot->gun != GUN_BOMBBALL ) - { - delObjectFromSpaceWithObject(export_fce->fce_getCurrentArena()->spaceShot, - thisShot, export_fce->fce_destroyShot); - //delListItem(arena->listShot, i, export_fce->fce_destroyShot); - i--; - } - } - else - { - moveShotFromPipe(thisShot, thisPipe); - } - - } - else - { - if( thisShot->gun == GUN_BOMBBALL && - export_fce->fce_getNetTypeGame() != NET_GAME_TYPE_CLIENT ) - { - export_fce->fce_boundBombBall(thisShot); - continue; - } - else - { - delObjectFromSpaceWithObject(export_fce->fce_getCurrentArena()->spaceShot, - thisShot, export_fce->fce_destroyShot); - i--; - } - } - } - } - - return 0; -} - -int isConflict(int x, int y, int w, int h) -{ - if( spacePipe == NULL ) - { - return 0; - } - - return isConflictWithObjectFromSpace(spacePipe, x, y, w, h); -} - -void cmd(char *line) -{ - if( strncmp(line, "pipe", 4) == 0 )cmd_teleport(line); -} - -int destroy() -{ - destroySpaceWithObject(spacePipe, destroyPipe); - destroyList(listPipe); - - return 0; -} diff --git a/modules/modTeleport.c b/modules/modTeleport.c deleted file mode 100755 index 2b94e2f..0000000 --- a/modules/modTeleport.c +++ /dev/null @@ -1,506 +0,0 @@ - -#include -#include -#include -#include - -#include "main.h" -#include "modules.h" -#include "tux.h" -#include "shot.h" -#include "list.h" -#include "gun.h" -#include "space.h" - -#ifndef PUBLIC_SERVER -#include "interface.h" -#include "image.h" -#endif - -#ifdef PUBLIC_SERVER -#include "publicServer.h" -#endif - -typedef struct teleport_struct -{ - int id; - - int x; // poloha steny - int y; - - int w; // rozmery steny - int h; - - int layer; // vrstva - -#ifndef PUBLIC_SERVER - SDL_Surface *img; //obrazok -#endif -} teleport_t; - -static export_fce_t *export_fce; - -static space_t *spaceTeleport; -static list_t *listTeleport; - -#ifndef PUBLIC_SERVER -teleport_t* newTeleport(int x, int y, int w, int h, int layer, SDL_Surface *img) -#endif - -#ifdef PUBLIC_SERVER -teleport_t* newTeleport(int x, int y, int w, int h, int layer) -#endif -{ - static int last_id = 0; - - teleport_t *new; - -#ifndef PUBLIC_SERVER - assert( img != NULL ); -#endif - - new = malloc( sizeof(teleport_t) ); - assert( new != NULL ); - - new->id = ++last_id; - new->x = x; - new->y = y; - new->w = w; - new->h = h; - new->layer = layer; -#ifndef PUBLIC_SERVER - new->img = img; -#endif - - return new; -} - -static void setStatusTeleport(void *p, int x, int y, int w, int h) -{ - teleport_t *teleport; - - teleport = p; - - teleport->x = x; - teleport->y = y; - teleport->w = w; - teleport->h = h; -} - -static void getStatusTeleport(void *p, int *id, int *x, int *y, int *w, int *h) -{ - teleport_t *teleport; - teleport = p; - - *id = teleport->id; - *x = teleport->x; - *y = teleport->y; - *w = teleport->w; - *h = teleport->h; -} - -#ifndef PUBLIC_SERVER - -static void drawTeleport(teleport_t *p) -{ - assert( p != NULL ); - - export_fce->fce_addLayer(p->img, p->x, p->y, 0, 0, p->img->w, p->img->h, p->layer); -} - -#endif - -static void destroyTeleport(teleport_t *p) -{ - assert( p != NULL ); - free(p); -} - - -static void cmd_teleport(char *line) -{ - char str_x[STR_NUM_SIZE]; - char str_y[STR_NUM_SIZE]; - char str_w[STR_NUM_SIZE]; - char str_h[STR_NUM_SIZE]; - char str_layer[STR_NUM_SIZE]; - char str_image[STR_SIZE]; - teleport_t *new; - - if( export_fce->fce_getValue(line, "x", str_x, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "y", str_y, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "w", str_w, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "h", str_h, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "layer", str_layer, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "image", str_image, STR_SIZE) != 0 )return; - -#ifndef PUBLIC_SERVER - new = newTeleport(atoi(str_x), atoi(str_y), - atoi(str_w), atoi(str_h), - atoi(str_layer), export_fce->fce_getImage(IMAGE_GROUP_USER, str_image) ); -#endif - -#ifdef PUBLIC_SERVER - new = newTeleport(atoi(str_x), atoi(str_y), - atoi(str_w), atoi(str_h), - atoi(str_layer) ); -#endif - - if( spaceTeleport == NULL ) - { - spaceTeleport = newSpace(export_fce->fce_getCurrentArena()->w, export_fce->fce_getCurrentArena()->h, - 320, 240, getStatusTeleport, setStatusTeleport); - } - - addObjectToSpace(spaceTeleport, new); -} - -static teleport_t* getRandomTeleportBut(list_t *list, teleport_t *teleport) -{ - int x; - - do{ - x = random() % list->count; - }while( list->list[x] == teleport ); - - return (teleport_t *) list->list[x]; -} - -static int getRandomPosition() -{ - switch( random() % 4 ) - { - case 0 : - return TUX_UP; - - case 1 : - return TUX_LEFT; - - case 2 : - return TUX_RIGHT; - - case 3 : - return TUX_DOWN; - } - - assert( ! "Stupid error ! " ); -} - -static void teleportTux(tux_t *tux, teleport_t *teleport) -{ - teleport_t *distTeleport; - int dist_x, dist_y; - - if( tux->bonus == BONUS_GHOST || - export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_CLIENT ) - { - return; - } - - distTeleport = getRandomTeleportBut(spaceTeleport->list, teleport); - - //export_fce->fce_getTuxProportion(tux, ¤t_x, ¤t_y, NULL, NULL); - - switch( tux->position ) - { - case TUX_UP : - dist_x = distTeleport->x + distTeleport->w/2; - dist_y = distTeleport->y - ( TUX_HEIGHT + 20 ); - break; - case TUX_LEFT : - dist_x = distTeleport->x - ( TUX_WIDTH + 20 ); - dist_y = distTeleport->y + distTeleport->h/2; - break; - - case TUX_RIGHT : - dist_x = distTeleport->x + distTeleport->w + 20; - dist_y = distTeleport->y + distTeleport->h/2; - break; - - case TUX_DOWN : - dist_x = distTeleport->x + distTeleport->w/2; - dist_y = distTeleport->y + distTeleport->h + 20; - break; - - default : - assert( ! "premenna p->control ma zlu hodnotu !" ); - break; - } - - if( export_fce->fce_isFreeSpace(export_fce->fce_getCurrentArena(), dist_x, dist_y, TUX_WIDTH, TUX_HEIGHT) ) - { - moveObjectInSpace(export_fce->fce_getCurrentArena()->spaceTux, tux, dist_x, dist_y); - //export_fce->fce_setTuxProportion(tux, dist_x, dist_y); -#ifndef PUBLIC_SERVER - //playSound("teleport", SOUND_GROUP_BASE); -#endif - if( export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_SERVER ) - { - export_fce->fce_proto_send_newtux_server(PROTO_SEND_ALL, NULL, tux); - } - } -} - -static int myAbs(int n) -{ - return ( n > 0 ? n : -n ); -} - - -static int getSppedShot(shot_t *shot) -{ - return ( myAbs(shot->px) > myAbs(shot->py) ? myAbs(shot->px) : myAbs(shot->py) ); -} - -/* -static void transformOnlyLasser(shot_t *shot) -{ - switch( shot->position ) - { - case TUX_RIGHT : - case TUX_LEFT : - shot->w = GUN_LASSER_HORIZONTAL; - shot->h = GUN_SHOT_VERTICAL; -#ifndef PUBLIC_SERVER - shot->img = g_shot_lasserX; -#endif - break; - case TUX_UP : - case TUX_DOWN : - shot->w = GUN_SHOT_VERTICAL; - shot->h = GUN_LASSER_HORIZONTAL; -#ifndef PUBLIC_SERVER - shot->img = g_shot_lasserY; -#endif - break; - } -} -*/ - -static void transformShot(shot_t *shot, int position) -{ - int speed; - - speed = getSppedShot(shot); - - switch( position ) - { - case TUX_UP : - shot->px = 0; - shot->py = -speed; - break; - - case TUX_LEFT : - shot->px = -speed; - shot->py = 0; - break; - - case TUX_RIGHT : - shot->px = speed; - shot->py = 0; - break; - - case TUX_DOWN : - shot->px = 0; - shot->py = +speed; - break; - } - - shot->position = position; - shot->isCanKillAuthor = TRUE; - - if( shot->gun == GUN_LASSER ) - { - export_fce->fce_transformOnlyLasser(shot); - } -} - -static void moveShot(shot_t *shot, int position, int src_x, int src_y, - int dist_x, int dist_y, int dist_w, int dist_h) -{ - int offset = 0; - int new_x, new_y; - - switch( shot->position ) - { - case TUX_UP : - case TUX_DOWN : - offset = shot->x - src_x; - break; - - case TUX_RIGHT : - case TUX_LEFT : - offset = shot->y - src_y; - break; - } - - transformShot(shot, position); - - switch( shot->position ) - { - case TUX_UP : - new_x = dist_x + offset; - new_y = dist_y; - break; - - case TUX_LEFT : - new_x = dist_x; - new_y = dist_y + offset; - break; - - case TUX_RIGHT : - new_x = dist_x + dist_w; - new_y = dist_y + offset; - break; - - case TUX_DOWN : - new_x = dist_x + offset; - new_y = dist_y + dist_h; - break; - } - - new_y += shot->px; - new_y += shot->py; - - moveObjectInSpace(export_fce->fce_getCurrentArena()->spaceShot, shot, new_x, new_y); - - if( export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_SERVER ) - { - export_fce->fce_proto_send_shot_server(PROTO_SEND_ALL, NULL, shot); - } -} - -static void moveShotFromTeleport(shot_t *shot, teleport_t *teleport, list_t *list) -{ - teleport_t *distTeleport; - - distTeleport = getRandomTeleportBut(list, teleport); - - moveShot(shot, getRandomPosition(), teleport->x, teleport->y, - distTeleport->x, distTeleport->y, distTeleport->w, distTeleport->h); -} - -int init(export_fce_t *p) -{ - export_fce = p; - - listTeleport = newList(); - - return 0; -} - -#ifndef PUBLIC_SERVER -int draw(int x, int y, int w, int h) -{ - teleport_t *thisTeleport; - int i; - - if( spaceTeleport == NULL ) - { - return 0; - } - - listDoEmpty(listTeleport); - getObjectFromSpace(spaceTeleport, x, y, w, h, listTeleport); - - for( i = 0 ; i < listTeleport->count ; i++ ) - { - thisTeleport = (teleport_t *)listTeleport->list[i]; - assert( thisTeleport != NULL ); - drawTeleport(thisTeleport); - } - - return 0; -} -#endif - -int event() -{ - teleport_t *thisTeleport; - arena_t *arena; - int i; - - if( spaceTeleport == NULL ) - { - return 0; - } - - if( export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_CLIENT ) - { - return 0; - } - - arena = export_fce->fce_getCurrentArena(); - - for( i = 0 ; i < arena->spaceTux->list->count ; i++ ) - { - tux_t *thisTux; - int x, y, w, h; - int j; - - thisTux = (tux_t *)arena->spaceTux->list->list[i]; - export_fce->fce_getTuxProportion(thisTux, &x, &y, &w, &h); - - listDoEmpty(listTeleport); - getObjectFromSpace(spaceTeleport, x, y, w, h, listTeleport); - - for( j = 0 ; j < listTeleport->count ; j++ ) - { - thisTeleport = (teleport_t *)listTeleport->list[j]; - teleportTux(thisTux, thisTeleport); - } - } - - for( i = 0 ; i < arena->spaceShot->list->count ; i++ ) - { - shot_t *thisShot; - int j; - - thisShot = (shot_t *)arena->spaceShot->list->list[i]; - assert( thisShot != NULL ); - - listDoEmpty(listTeleport); - getObjectFromSpace(spaceTeleport, thisShot->x, thisShot->y, thisShot->w, thisShot->h, listTeleport); - - for( j = 0 ; j < listTeleport->count ; j++ ) - { - tux_t *author; - - thisTeleport = (teleport_t *)listTeleport->list[j]; - author = getObjectFromSpaceWithID(arena->spaceTux, thisShot->author_id); - - if( author != NULL && - author->bonus == BONUS_GHOST && - author->bonus_time > 0 ) - { - continue; - } - - moveShotFromTeleport(thisShot, thisTeleport, spaceTeleport->list); - } - } - - return 0; -} - -int isConflict(int x, int y, int w, int h) -{ - if( spaceTeleport == NULL ) - { - return 0; - } - - return 0; -} - -void cmd(char *line) -{ - if( strncmp(line, "teleport", 8) == 0 )cmd_teleport(line); -} - -int destroy() -{ - destroySpaceWithObject(spaceTeleport, destroyTeleport); - destroyList(listTeleport); - return 0; -} diff --git a/modules/modWall.c b/modules/modWall.c deleted file mode 100755 index d917309..0000000 --- a/modules/modWall.c +++ /dev/null @@ -1,343 +0,0 @@ - -#include -#include -#include -#include - -#include "main.h" -#include "modules.h" -#include "tux.h" -#include "shot.h" -#include "list.h" -#include "gun.h" -#include "space.h" - -#ifndef PUBLIC_SERVER -#include "interface.h" -#include "image.h" -#endif - -#ifdef PUBLIC_SERVER -#include "publicServer.h" -#endif - -typedef struct wall_struct -{ - int id; - - int x; // poloha steny - int y; - - int w; // rozmery steny - int h; - - int img_x; // poloha obrazka - int img_y; - - int layer; // vrstva - -#ifndef PUBLIC_SERVER - SDL_Surface *img; //obrazok -#endif -} wall_t; - -static export_fce_t *export_fce; - -static space_t *spaceWall; - -#ifndef PUBLIC_SERVER -static space_t *spaceImgWall; -#endif - -static list_t *listWall; - -#ifndef PUBLIC_SERVER -wall_t* newWall(int x, int y, int w, int h, - int img_x, int img_y, int layer, SDL_Surface *img) -#endif - -#ifdef PUBLIC_SERVER -wall_t* newWall(int x, int y, int w, int h, - int img_x, int img_y, int layer) -#endif -{ - static int last_id = 0; - wall_t *new; - -#ifndef PUBLIC_SERVER - assert( img != NULL ); -#endif - new = malloc( sizeof(wall_t) ); - assert( new != NULL ); - - new->id = ++last_id; - new->x = x; - new->y = y; - new->w = w; - new->h = h; - new->img_x = img_x; - new->img_y = img_y; - new->layer = layer; -#ifndef PUBLIC_SERVER - new->img = img; -#endif - - return new; -} - -#ifndef PUBLIC_SERVER - -void drawWall(wall_t *p) -{ - assert( p != NULL ); - - export_fce->fce_addLayer(p->img, p->img_x, p->img_y, 0, 0, p->img->w, p->img->h, p->layer); -} - -void drawListWall(list_t *list) -{ - wall_t *thisWall; - int i; - - assert( list != NULL ); - - for( i = 0 ; i < list->count ; i++ ) - { - thisWall = (wall_t *)list->list[i]; - assert( thisWall != NULL ); - drawWall(thisWall); - } -} - -#endif - -void eventConflictShotWithWall() -{ - arena_t *arena; - shot_t *thisShot; - tux_t *author; - int i; - - arena = export_fce->fce_getCurrentArena(); - - for( i = 0 ; i < arena->spaceShot->list->count ; i++ ) - { - thisShot = (shot_t *)arena->spaceShot->list->list[i]; - assert( thisShot != NULL ); - - if( isConflictWithObjectFromSpace(spaceWall, thisShot->x, thisShot->y, thisShot->w, thisShot->h) ) - { - author = getObjectFromSpaceWithID( - export_fce->fce_getCurrentArena()->spaceTux, thisShot->author_id ); - - if( author != NULL && - author->bonus == BONUS_GHOST && - author->bonus_time > 0 ) - { - continue; - } - - if( thisShot->gun == GUN_BOMBBALL && export_fce->fce_getNetTypeGame() != NET_GAME_TYPE_CLIENT ) - { - export_fce->fce_boundBombBall(thisShot); - continue; - } - - delObjectFromSpaceWithObject(export_fce->fce_getCurrentArena()->spaceShot, - thisShot, export_fce->fce_destroyShot); - - //delListItem(listShot, i, export_fce->fce_destroyShot); - i--; - } - } -} - -void destroyWall(wall_t *p) -{ - assert( p != NULL ); - free(p); -} - -static void getStatusWall(void *p, int *id, int *x, int *y, int *w, int *h) -{ - wall_t *wall; - - wall = p; - - *id = wall->id; - *x = wall->x; - *y = wall->y; - *w = wall->w; - *h = wall->h; -} - -static void setStatusWall(void *p, int x, int y, int w, int h) -{ - wall_t *wall; - - wall = p; - - wall->x = x; - wall->y = y; - wall->w = w; - wall->h = h; -} - -#ifndef PUBLIC_SERVER - -static void getStatusImgWall(void *p, int *id, int *x, int *y, int *w, int *h) -{ - wall_t *wall; - - wall = p; - - *id = wall->id; - *x = wall->img_x; - *y = wall->img_y; - *w = wall->img->w; - *h = wall->img->h; -} - -static void setStatusImgWall(void *p, int x, int y, int w, int h) -{ -} - -#endif - -static void cmd_wall(char *line) -{ - char str_x[STR_NUM_SIZE]; - char str_y[STR_NUM_SIZE]; - char str_img_x[STR_NUM_SIZE]; - char str_img_y[STR_NUM_SIZE]; - char str_w[STR_NUM_SIZE]; - char str_h[STR_NUM_SIZE]; - char str_layer[STR_NUM_SIZE]; - char str_image[STR_SIZE]; - wall_t *new; - - if( export_fce->fce_getValue(line, "x", str_x, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "y", str_y, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "w", str_w, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "h", str_h, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "img_x", str_img_x, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "img_y", str_img_y, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "layer", str_layer, STR_NUM_SIZE) != 0 )return; - if( export_fce->fce_getValue(line, "image", str_image, STR_SIZE) != 0 )return; - -#ifndef PUBLIC_SERVER - new = newWall(atoi(str_x), atoi(str_y), - atoi(str_w), atoi(str_h), - atoi(str_img_x), atoi(str_img_y), - atoi(str_layer), export_fce->fce_getImage(IMAGE_GROUP_USER, str_image) ); -#endif - -#ifdef PUBLIC_SERVER - new = newWall(atoi(str_x), atoi(str_y), - atoi(str_w), atoi(str_h), - atoi(str_img_x), atoi(str_img_y), - atoi(str_layer) ); -#endif - - if( spaceWall == NULL ) - { - spaceWall = newSpace(export_fce->fce_getCurrentArena()->w, export_fce->fce_getCurrentArena()->h, - 320, 240, getStatusWall, setStatusWall); - -#ifndef PUBLIC_SERVER - spaceImgWall = newSpace(export_fce->fce_getCurrentArena()->w, export_fce->fce_getCurrentArena()->h, - 320, 240, getStatusImgWall, setStatusImgWall); -#endif - } - - addObjectToSpace(spaceWall, new); - -#ifndef PUBLIC_SERVER - addObjectToSpace(spaceImgWall, new); -#endif -} - -int init(export_fce_t *p) -{ - export_fce = p; - listWall = newList(); - - return 0; -} - -#ifndef PUBLIC_SERVER - -int draw(int x, int y, int w, int h) -{ - wall_t *thisWall; - int i; - - if( spaceWall == NULL ) - { - return 0; - } - - listDoEmpty(listWall); - getObjectFromSpace(spaceImgWall, x, y, w, h, listWall); - - for( i = 0 ; i < listWall->count ; i++ ) - { - thisWall = (wall_t *)listWall->list[i]; - assert( thisWall != NULL ); - drawWall(thisWall); - } - - //printSpace(spaceWall); - - return 0; -} -#endif - - -int event() -{ - if( spaceWall == NULL ) - { - return 0; - } - - eventConflictShotWithWall(export_fce->fce_getCurrentArena()->spaceShot->list); - return 0; -} - -int isConflict(int x, int y, int w, int h) -{ - if( spaceWall == NULL ) - { - return 0; - } - - return isConflictWithObjectFromSpace(spaceWall, x, y, w, h); -} - -void cmd(char *line) -{ - if( strncmp(line, "wall", 4) == 0 )cmd_wall(line); -} - -int destroy() -{ - if( spaceWall != NULL ) - { - destroySpaceWithObject(spaceWall, destroyWall); - } - -#ifndef PUBLIC_SERVER - if( spaceImgWall != NULL ) - { - destroySpace(spaceImgWall); - } -#endif - - if( listWall != NULL ) - { - destroyList(listWall); - } - - return 0; -} diff --git a/modules/space.c b/modules/space.c deleted file mode 100644 index 96ac81b..0000000 --- a/modules/space.c +++ /dev/null @@ -1,615 +0,0 @@ - -#include -#include -#include -#include - -#include "main.h" -#include "list.h" -#include "space.h" - -#define DEBUG_SPACE -#define ERROR_SUPPORT - -#ifdef DEBUG_SPACE - - -typedef struct recv_struct -{ - int id; - int x, y; - int w, h; -} recv_t; - -recv_t* newRecv(int id, int x , int y, int w, int h) -{ - recv_t *new; - - new = malloc( sizeof(recv_t) ); - memset(new, 0, sizeof(recv_t)); - - new->id = id; - new->x = x; - new->y = y; - new->w = w; - new->h = h; - - return new; -} - -void getStatus(void *p, int *id, int *x, int *y, int *w, int *h) -{ - recv_t *recv; - - recv = p; - - *id = recv->id; - *x = recv->x; - *y = recv->y; - *w = recv->w; - *h = recv->h; -} - -void setStatus(void *p, int x, int y, int w, int h) -{ - recv_t *recv; - - recv = p; - - recv->x = x; - recv->y = y; - recv->w = w; - recv->h = h; - recv->x = x; -} - -void destroyRecv(recv_t *p) -{ - free(p); -} - -#endif - -static int my_conflictSpace(int x1,int y1,int w1,int h1,int x2,int y2,int w2,int h2) -{ - return (x1w = w / segW + 1; - new->h = h / segH + 1; - new->segW = segW; - new->segH = segH; - new->getStatus = getStatus; - new->setStatus = setStatus; - new->list = newList(); - - new->area = malloc( new->w * sizeof(list_t **) ); - - for( i = 0 ; i < new->w ; i++ ) - { - new->area[i] = malloc( new->h * sizeof(list_t *) ); - } - - for( i = 0 ; i < new->h ; i++ ) - { - for( j = 0 ; j < new->w ; j++ ) - { - new->area[j][i] = newList(); - } - } - - return new; -} - -static void getSegment(space_t *p, int x, int y, int w, int h, - int *segX, int *segY, int *segW, int *segH) -{ - *segX = x / p->segW; - *segY = y / p->segH; - *segW = ( (x+w) / p->segW + 1 ) - *segX; - *segH = ( (y+h) / p->segH + 1 ) - *segY; -} - -#ifdef ERROR_SUPPORT - -void printListID(space_t *space) -{ - int i; - - for( i = 0 ; i < space->list->count ; i++ ) - { - int id, x, y, w, h; - - space->getStatus(space->list->list[i], &id, &x, &y, &w, &h); - printf("%d\n", id); - } - - putchar('\n'); -} - -static void checkList(space_t *space) -{ - int id, x, y, w, h; - int thisId; - int i; - - if( space->list->count == 0 ) - { - printf("nothing\n"); - return; - } - - space->getStatus(space->list->list[0], &thisId, &x, &y, &w, &h); - - for( i = 1 ; i < space->list->count ; i++ ) - { - space->getStatus(space->list->list[i], &id, &x, &y, &w, &h); - - if( id <= thisId ) - { - printListID(space); - assert( ! "error" ); - } - - thisId = id; - } -} - -static void addToListOnTheBaseIndex(space_t *space, void *p) -{ - int id, point_id, inc_point_id; - int x, y, w, h; - int len; - int min, max; - int point; - - - len = space->list->count; - - space->getStatus(p, &id, &x, &y, &w, &h); -/* - printf("addToListOnTheBaseIndex (%d)\n", id); - printListID(space); - assert( id >= 0 ); -*/ - if( len == 0 ) - { - //printf("OK first\n"); - addList(space->list, p); - return; - } - - if( len == 1 ) - { - space->getStatus(space->list->list[0], &point_id, &x, &y, &w, &h); - - if( id > point_id ) - { - addList(space->list, p); - } - - if( id < point_id ) - { - insList(space->list, 0, p); - } - - //printf("OK\n"); - - return; - } - - min = 0; - max = len-1; -/* - if( max < 0 ) - { - max = 0; - } -*/ - for(;;) - { - point = min + ( max - min ) / 2; -/* - space->getStatus(space->list->list[min], &id_min, &x, &y, &w, &h); - space->getStatus(space->list->list[max], &id_max, &x, &y, &w, &h); -*/ - //printf("min = %d max = %d point = %d len = %d id = %d\n", min, max, point, len, id); - - if( max < 0 ) - { - //printf("OK first\n"); - insList(space->list, 0, p); - //checkList(space); - return; - } - - if( point+1 >= len /*|| min >= len*/ ) - { - addList(space->list, p); - //printf("OK height\n"); - //checkList(space); - return; - } - - space->getStatus(space->list->list[point], &point_id, &x, &y, &w, &h); - space->getStatus(space->list->list[point+1], &inc_point_id, &x, &y, &w, &h); -/* - if( min == max ) - { - //printf("OK\n"); - insList(space->list, min, p); - checkList(space); - return; - } -*/ - if( point_id < id && id < inc_point_id ) - { - //printf("OK\n"); - insList(space->list, point+1, p); - //checkList(space); - return; - } - - if( id > inc_point_id ) - { - min = point + 1; - continue; - } - - if( id < point_id ) - { - max = point - 1; - continue; - } - } -} - -#endif - -void addObjectToSpace(space_t *p, void *item) -{ - int segX, segY, segW, segH; - int id, x, y, w, h; - int i, j; - - p->getStatus(item, &id, &x, &y, &w, &h); - getSegment(p, x, y, w, h, &segX, &segY, &segW, &segH); - - for( i = segY ; i < segY + segH ; i++ ) - { - for( j = segX ; j < segX + segW ; j++ ) - { - addList(p->area[j][i], item); - } - } - -#ifdef ERROR_SUPPORT - addToListOnTheBaseIndex(p, item); -#endif - -#ifndef ERROR_SUPPORT - addList(p->list, item); -#endif -} - -void getObjectFromSpace(space_t *p, int x, int y, int w, int h, list_t *list) -{ - int segX, segY, segW, segH; - int id, this_x, this_y, this_w, this_h; - int i, j, k; - - getSegment(p, x, y, w, h, &segX, &segY, &segW, &segH); - - for( i = segY ; i < segY + segH ; i++ ) - { - for( j = segX ; j < segX + segW ; j++ ) - { - void *this; - - for( k = 0 ; k < p->area[j][i]->count ; k++ ) - { - this = p->area[j][i]->list[k]; - p->getStatus(this, &id, &this_x, &this_y, &this_w, &this_h); - - if( my_conflictSpace(x, y, w, h, this_x, this_y, this_w, this_h) && - searchListItem(list, this) == -1 ) - { - addList(list, this); - } - } - } - } -} - -void* getObjectFromSpaceWithID(space_t *space, int id) -{ -#ifdef ERROR_SUPPORT - int point_id; - int x, y, w, h; - int len; - int min, max; - int point; - -/* - printf("getObjectFromSpaceWithID %d\n", id); - printListID(space); -*/ - len = space->list->count; - - min = 0; - max = len-1; - - for(;;) - { - point = min + ( max - min ) / 2; - - //printf("min = %d max = %d point = %d len = %d id = %d\n", min, max, point, len, id); - - if( max < 0 || point >= len || max < min ) - { - return NULL; - } - - space->getStatus(space->list->list[point], &point_id, &x, &y, &w, &h); - - if( min == max ) - { - space->getStatus(space->list->list[min], &point_id, &x, &y, &w, &h); - } - - if( point_id == id ) - { - return space->list->list[point]; - } - - if( id > point_id ) - { - min = point + 1; - continue; - } - - if( id < point_id ) - { - max = point - 1; - continue; - } - } - -#endif - -#ifndef ERROR_SUPPORT - int this_id, x, y, w, h; - void *this; - int i; - - for( i = 0 ; i < space->list->count ; i++ ) - { - this = space->list->list[i]; - assert( this != NULL ); - - space->getStatus(this, &this_id, &x, &y, &w, &h); - - if( this_id == id ) - { - return this; - } - } - - return NULL; -#endif -} - -int isConflictWithObjectFromSpace(space_t *p, int x, int y, int w, int h) -{ - int segX, segY, segW, segH; - int id, this_x, this_y, this_w, this_h; - int i, j, k; - - getSegment(p, x, y, w, h, &segX, &segY, &segW, &segH); - - for( i = segY ; i < segY + segH ; i++ ) - { - for( j = segX ; j < segX + segW ; j++ ) - { - void *this; - - for( k = 0 ; k < p->area[j][i]->count ; k++ ) - { - this = p->area[j][i]->list[k]; - p->getStatus(this, &id, &this_x, &this_y, &this_w, &this_h); - - if( my_conflictSpace(x, y, w, h, this_x, this_y, this_w, this_h) ) - { - return 1; - } - } - } - } - - return 0; -} - -int isConflictWithObjectFromSpaceBut(space_t *p, int x, int y, int w, int h, void *but) -{ - int segX, segY, segW, segH; - int id, this_x, this_y, this_w, this_h; - int i, j, k; - - getSegment(p, x, y, w, h, &segX, &segY, &segW, &segH); - - for( i = segY ; i < segY + segH ; i++ ) - { - for( j = segX ; j < segX + segW ; j++ ) - { - void *this; - - for( k = 0 ; k < p->area[j][i]->count ; k++ ) - { - this = p->area[j][i]->list[k]; - - if( this == but ) - { - continue; - } - - p->getStatus(this, &id, &this_x, &this_y, &this_w, &this_h); - - if( my_conflictSpace(x, y, w, h, this_x, this_y, this_w, this_h) ) - { - return 1; - } - } - } - } - - return 0; -} - -void delObjectFromSpace(space_t *p, void *item) -{ - int segX, segY, segW, segH; - int id, x, y, w, h; - int index; - int i, j; - - p->getStatus(item, &id, &x, &y, &w, &h); - getSegment(p, x, y, w, h, &segX, &segY, &segW, &segH); - - for( i = segY ; i < segY + segH ; i++ ) - { - for( j = segX ; j < segX + segW ; j++ ) - { - index = searchListItem(p->area[j][i], item); - assert( index != -1 ); - delList(p->area[j][i], index); - } - } - - index = searchListItem(p->list, item); - assert( index != -1 ); - delList(p->list, index); -} - -void delObjectFromSpaceWithObject(space_t *p, void *item, void *f) -{ - void (*fce)(void *param); - - fce = f; - - delObjectFromSpace(p, item); - fce(item); -} - -void moveObjectInSpace(space_t *p, void *item, int move_x, int move_y) -{ - int old_segX, old_segY, old_segW, old_segH; - int new_segX, new_segY, new_segW, new_segH; - int id, x, y, w, h; - - p->getStatus(item, &id, &x, &y, &w, &h); - getSegment(p, x, y, w, h, &old_segX, &old_segY, &old_segW, &old_segH); - getSegment(p, move_x, move_y, w, h, &new_segX, &new_segY, &new_segW, &new_segH); -/* - printf("%d %d %d %d -> %d %d %d %d \n", - old_segX, old_segY, old_segW, old_segH, - new_segX, new_segY, new_segW, new_segH); -*/ - if( old_segX != new_segX || old_segY != new_segY || - old_segW != new_segW || old_segH != new_segH ) - { - delObjectFromSpace(p, item); - p->setStatus(item, move_x, move_y, w, h); - addObjectToSpace(p, item); - return; - } - - p->setStatus(item, move_x, move_y, w, h); -} - -void printSpace(space_t *p) -{ - int i, j; - - printf("print space : \n"); - - for( i = 0 ; i < p->h ; i++ ) - { - for( j = 0 ; j < p->w ; j++ ) - { - printf("%3d ", p->area[j][i]->count); - } - - putchar('\n'); - } -} - -void destroySpace(space_t *p) -{ - int j, i; - - destroyList(p->list); - - for( i = 0 ; i < p->h ; i++ ) - { - for( j = 0 ; j < p->w ; j++ ) - { - destroyList(p->area[j][i]); - } - } - - for( i = 0 ; i < p->w ; i++ ) - { - free(p->area[i]); - } - - free(p->area); - free(p); -} - -void destroySpaceWithObject(space_t *p, void *f) -{ - void (*fce)(void *param); - int i; - - fce = f; - - for( i = 0 ; i < p->list->count ; i++ ) - fce(p->list->list[i]); - - destroySpace(p); -} - -#ifdef DEBUG_SPACE - -void test_space() -{/* - space_t *space; - recv_t *recv; - - space = newSpace(5000, 2500, 320, 240, getStatus, setStatus); - - addObjectToSpace(space, newRecv(5, 0, 0, 1, 1) ); - addObjectToSpace(space, newRecv(7, 0, 0, 1, 1) ); - addObjectToSpace(space, newRecv(8, 0, 0, 1, 1) ); - addObjectToSpace(space, newRecv(9, 0, 0, 1, 1) ); - addObjectToSpace(space, newRecv(6, 0, 0, 1, 1) ); -*/ -/* - recv = getObjectFromSpaceWithID(space, 6); - if( recv != NULL )printf("id = %d\n", recv->id); -*/ -// printListID(space); -} - -#endif - diff --git a/modules/space.h b/modules/space.h deleted file mode 100644 index de31768..0000000 --- a/modules/space.h +++ /dev/null @@ -1,38 +0,0 @@ - -#ifndef SPACE_H - -#define SPACE_H - -#include "main.h" -#include "list.h" - -typedef struct space_struct -{ - int w; - int h; - int segW; - int segH; - list_t ***area; - list_t *list; - void (*getStatus)(void *p, int *id, int *x, int *y, int *w, int *h); - void (*setStatus)(void *p, int x, int y, int w, int h); -} space_t; - -extern space_t *newSpace(int w, int h, int segW, int segH, - void (*getStatus)(void *p, int *id, int *x, int *y, int *w, int *h), - void (*setStatus)(void *p, int x, int y, int w, int h)); - -extern void addObjectToSpace(space_t *p, void *item); -extern void getObjectFromSpace(space_t *p, int x, int y, int w, int h, list_t *list); -extern void* getObjectFromSpaceWithID(space_t *p, int id); -extern int isConflictWithObjectFromSpace(space_t *p, int x, int y, int w, int h); -extern int isConflictWithObjectFromSpaceBut(space_t *p, int x, int y, int w, int h, void *but); -extern void delObjectFromSpace(space_t *p, void *item); -extern void delObjectFromSpaceWithObject(space_t *p, void *item, void *f); -extern void moveObjectInSpace(space_t *p, void *item, int move_x, int move_y); -extern void printSpace(space_t *p); -extern void destroySpace(space_t *p); -extern void destroySpaceWithObject(space_t *p, void *f); - -#endif - diff --git a/music/for_a_good_night.ogg b/music/for_a_good_night.ogg deleted file mode 100644 index 3ce2996..0000000 Binary files a/music/for_a_good_night.ogg and /dev/null differ diff --git a/music/in_a_captivity_of_8-bit.ogg b/music/in_a_captivity_of_8-bit.ogg deleted file mode 100644 index db8ee5c..0000000 Binary files a/music/in_a_captivity_of_8-bit.ogg and /dev/null differ diff --git a/music/menu.ogg b/music/menu.ogg deleted file mode 100644 index 0866ccb..0000000 Binary files a/music/menu.ogg and /dev/null differ diff --git a/music/night_workshift.ogg b/music/night_workshift.ogg deleted file mode 100644 index c5ce5fc..0000000 Binary files a/music/night_workshift.ogg and /dev/null differ diff --git a/packaging/deb/control b/packaging/deb/control deleted file mode 100644 index 8d7ddd0..0000000 --- a/packaging/deb/control +++ /dev/null @@ -1,12 +0,0 @@ -Package: tuxanci-ng -Version: svn68 -Section: Game -Priority: optional -Depends: libc6 (>= 2.2.4-4), libsdl1.2debian (>= 1.2), libsdl-image1.2 (>= 1.2), libsdl-mixer1.2 (>= 1.2), libsdl-ttf2.0-0 (>= 2.0) -Architecture: i386 -Installed-Size: 4630 -Maintainer: Dušan Ďurech -Description: Game tuxanci next generation SVN revision 68 - Game tuxanci next generation SVN revision 68 - . - http://www.tuxanci.org diff --git a/packaging/deb/deb-build.sh b/packaging/deb/deb-build.sh deleted file mode 100755 index d471748..0000000 --- a/packaging/deb/deb-build.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -PROJECT="tuxanci-ng" -TMP_DIR="tmp" -DEB_ARCH="i386" -DEB_NAME="tuxanci-ng_svn" - -SRC_DIR="../../.." - -rm -rf $TMP_DIR - - -mkdir $TMP_DIR -mkdir $TMP_DIR/DEBIAN -mkdir $TMP_DIR/usr -mkdir $TMP_DIR/usr/bin -mkdir $TMP_DIR/usr/share -mkdir $TMP_DIR/usr/share/applications - -cp control $TMP_DIR/DEBIAN/ -cp $PROJECT.desktop $TMP_DIR/usr/share/applications - -cd $TMP_DIR - -echo -e "2.0\n" > DEBIAN/debian-binary - -mv $SRC_DIR/config.h $SRC_DIR/zal_config.h -mv $SRC_DIR/deb_config.h $SRC_DIR/config.h - -make -C $SRC_DIR clean -make -C $SRC_DIR -make -C $SRC_DIR DESTDIR="./packaging/deb/$TMP_DIR/usr" install; - -mv $SRC_DIR/config.h $SRC_DIR/deb_config.h -mv $SRC_DIR/zal_config.h $SRC_DIR/config.h - -md5sum `find ./ -type f | awk '/.\// { print substr($0, 3) }'` > DEBIAN/md5sums - -cd .. -rm -rf *.deb -dpkg -b ./$TMP_DIR $DEB_NAME`cat r`_$DEB_ARCH.deb diff --git a/packaging/deb/r b/packaging/deb/r deleted file mode 100644 index 3817d24..0000000 --- a/packaging/deb/r +++ /dev/null @@ -1,2 +0,0 @@ -68 - diff --git a/packaging/deb/tuxanci-ng.desktop b/packaging/deb/tuxanci-ng.desktop deleted file mode 100644 index 45ed4b0..0000000 --- a/packaging/deb/tuxanci-ng.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=tuxanci-ng -Comment=game tuxanci next generation -Exec=/usr/bin/tuxanci-ng -Terminal=false -Type=Application -Icon=/usr/share/tuxanci-ng/image/tuxanci.png -Encoding=UTF-8 -Categories=Game diff --git a/path_config.h b/path_config.h deleted file mode 100644 index 4bce76b..0000000 --- a/path_config.h +++ /dev/null @@ -1,2 +0,0 @@ -#define DESTDIR "/usr/local/" -#define SUPPORT_NET_SDL_UDP diff --git a/publicserver.sh b/publicserver.sh deleted file mode 100755 index de40d0e..0000000 --- a/publicserver.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -#export LD_LIBRARY_PATH="/usr/debug/lib/" -ldd -u ./publicserver -ulimit -c unlimited -nohup ./publicserver & diff --git a/r b/r deleted file mode 100644 index f64f5d8..0000000 --- a/r +++ /dev/null @@ -1 +0,0 @@ -27 diff --git a/readme.txt b/readme.txt deleted file mode 100644 index 7ecf0a8..0000000 --- a/readme.txt +++ /dev/null @@ -1,6 +0,0 @@ -- napisat _prehladnejsi_ kod -- identifikatory su po anglicky -- normalne formatovanie zdrojveho kodu (medzeri, ciatky ) -- slovenske komentare ( ak vam vadi, ze niesu po EN, tak ich ignorujte ) -- paramtre funckii sa budu kontrolovat pomocou assert ( aj vsetko co sa len da ) -- \ No newline at end of file diff --git a/server.conf b/server.conf deleted file mode 100644 index e34a73b..0000000 --- a/server.conf +++ /dev/null @@ -1,7 +0,0 @@ -NAME oroborus gameserver -IP4 0.0.0.0 -#IP6 ::1 -PORTv4 2200 -#PORTv6 2206 -MAX_CLIENTS 32 -ARENA BAIACO8B diff --git a/sound/dead.ogg b/sound/dead.ogg deleted file mode 100644 index a78c53a..0000000 Binary files a/sound/dead.ogg and /dev/null differ diff --git a/sound/end.ogg b/sound/end.ogg deleted file mode 100644 index 613265e..0000000 Binary files a/sound/end.ogg and /dev/null differ diff --git a/sound/explozion.ogg b/sound/explozion.ogg deleted file mode 100644 index 6018394..0000000 Binary files a/sound/explozion.ogg and /dev/null differ diff --git a/sound/gun2.ogg b/sound/gun2.ogg deleted file mode 100644 index 2a360fd..0000000 Binary files a/sound/gun2.ogg and /dev/null differ diff --git a/sound/gun_lasser.ogg b/sound/gun_lasser.ogg deleted file mode 100644 index 56a7257..0000000 Binary files a/sound/gun_lasser.ogg and /dev/null differ diff --git a/sound/gun_revolver.ogg b/sound/gun_revolver.ogg deleted file mode 100644 index 3c2ea41..0000000 Binary files a/sound/gun_revolver.ogg and /dev/null differ diff --git a/sound/gun_scatter.ogg b/sound/gun_scatter.ogg deleted file mode 100644 index 32c267f..0000000 Binary files a/sound/gun_scatter.ogg and /dev/null differ diff --git a/sound/gun_tommy.ogg b/sound/gun_tommy.ogg deleted file mode 100644 index 79dcefd..0000000 Binary files a/sound/gun_tommy.ogg and /dev/null differ diff --git a/sound/item_bonus.ogg b/sound/item_bonus.ogg deleted file mode 100644 index c2b8ba8..0000000 Binary files a/sound/item_bonus.ogg and /dev/null differ diff --git a/sound/item_gun.ogg b/sound/item_gun.ogg deleted file mode 100644 index 1b749da..0000000 Binary files a/sound/item_gun.ogg and /dev/null differ diff --git a/sound/odraz-gun.ogg b/sound/odraz-gun.ogg deleted file mode 100644 index c007ae7..0000000 Binary files a/sound/odraz-gun.ogg and /dev/null differ diff --git a/sound/odraz-l.ogg b/sound/odraz-l.ogg deleted file mode 100644 index 258dbd5..0000000 Binary files a/sound/odraz-l.ogg and /dev/null differ diff --git a/sound/odraz-r.ogg b/sound/odraz-r.ogg deleted file mode 100644 index c885172..0000000 Binary files a/sound/odraz-r.ogg and /dev/null differ diff --git a/sound/put_mine.ogg b/sound/put_mine.ogg deleted file mode 100644 index b5fa822..0000000 Binary files a/sound/put_mine.ogg and /dev/null differ diff --git a/sound/smrt.ogg b/sound/smrt.ogg deleted file mode 100644 index 4981dba..0000000 Binary files a/sound/smrt.ogg and /dev/null differ diff --git a/sound/switch_gun.ogg b/sound/switch_gun.ogg deleted file mode 100644 index e453472..0000000 Binary files a/sound/switch_gun.ogg and /dev/null differ diff --git a/sound/teleport.ogg b/sound/teleport.ogg deleted file mode 100644 index 1d1ead1..0000000 Binary files a/sound/teleport.ogg and /dev/null differ diff --git a/sound/tuxanci-smrt.ogg b/sound/tuxanci-smrt.ogg deleted file mode 100644 index a78c53a..0000000 Binary files a/sound/tuxanci-smrt.ogg and /dev/null differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..065dce7 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,84 @@ +SET ( WORKDIR ${CMAKE_SOURCE_DIR}/src ) +# pro aktualizaci tehle seznamu pouzijte radsi skript nezli to delat rucne +# find ./ -maxdepth 1 -type f -name \*.c |grep "$" |sed -e 's/^\.\//\$\{WORKDIR\}\/DIR\//' -e 's/\.c//' |tr '\n' ' ' > DIRfiles +# nahradte DIR potrebnym adresarem a pak vemte vse co je v DIRfiles a vlozte to sem +SET ( SRC_base +${WORKDIR}/base/main ${WORKDIR}/base/shot ${WORKDIR}/base/space ${WORKDIR}/base/checkFront ${WORKDIR}/base/storage ${WORKDIR}/base/myTimer ${WORKDIR}/base/protect ${WORKDIR}/base/list ${WORKDIR}/base/arena ${WORKDIR}/base/server ${WORKDIR}/base/textFile ${WORKDIR}/base/gun ${WORKDIR}/base/arenaFile ${WORKDIR}/base/modules ${WORKDIR}/base/net_multiplayer ${WORKDIR}/base/index ${WORKDIR}/base/item ${WORKDIR}/base/tux ${WORKDIR}/base/director ${WORKDIR}/base/idManager ${WORKDIR}/base/homeDirector ${WORKDIR}/base/proto + +${WORKDIR}/net/udp ${WORKDIR}/net/dns +) + +SET ( SRC_client + +${WORKDIR}/client/language ${WORKDIR}/client/radar ${WORKDIR}/client/interface ${WORKDIR}/client/game ${WORKDIR}/client/image ${WORKDIR}/client/term ${WORKDIR}/client/layer ${WORKDIR}/client/screen ${WORKDIR}/client/panel ${WORKDIR}/client/client ${WORKDIR}/client/configFile ${WORKDIR}/client/font ${WORKDIR}/client/keytable + +${WORKDIR}/screen/screen_choiceArena ${WORKDIR}/screen/screen_table ${WORKDIR}/screen/screen_setting ${WORKDIR}/screen/screen_credits ${WORKDIR}/screen/screen_world ${WORKDIR}/screen/screen_analyze ${WORKDIR}/screen/screen_mainMenu ${WORKDIR}/screen/screen_browser ${WORKDIR}/screen/screen_gameType + +${WORKDIR}/widget/widget_check ${WORKDIR}/widget/widget_button ${WORKDIR}/widget/widget_textfield ${WORKDIR}/widget/widget_label ${WORKDIR}/widget/widget_buttonimage ${WORKDIR}/widget/widget_image ${WORKDIR}/widget/widget_select +) + +SET ( SRC_audio ${WORKDIR}/audio/audio ${WORKDIR}/audio/music ${WORKDIR}/audio/sound) + +SET ( SRC_server +${WORKDIR}/server/logFile ${WORKDIR}/server/serverConfigFile ${WORKDIR}/server/heightScore ${WORKDIR}/server/publicServer +) +# nechcem sdl +ADD_DEFINITIONS ( -DSUPPORT_NET_UNIX_UDP ) +# server nebo klient +IF ( NOT NO_Server ) + ADD_DEFINITIONS ( -DPUBLIC_SERVER ) + ADD_DEFINITIONS ( -DNO_SOUND ) +ENDIF ( NOT NO_Server ) +#include zdrojaku +INCLUDE_DIRECTORIES ( ${WORKDIR}/base ) +INCLUDE_DIRECTORIES ( ${WORKDIR}/net ) +#vytvoreni knihoven +SET ( CMAKE_INSTALL_BINDIR bin ) +SET ( CMAKE_INSTALL_LIBDIR lib ) +ADD_SUBDIRECTORY ( modules ) +IF ( NO_Server ) # server nebo klient + MESSAGE ( STATUS "" ) + MESSAGE ( STATUS "<******************************>" ) + FIND_PACKAGE ( SDL REQUIRED ) + FIND_PACKAGE ( SDL_image REQUIRED ) + FIND_PACKAGE ( SDL_ttf REQUIRED ) + LINK_LIBRARIES ( ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLTTF_LIBRARY} SDLmain ) + MESSAGE ( STATUS "" ) + MESSAGE ( STATUS "<******************************>" ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/client ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/screen ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/widget ) + INCLUDE_DIRECTORIES ( ${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} ${SDLTTF_INCLUDE_DIR}) + SET ( SRC_compile ${SRC_base} ${SRC_client} ) + IF ( NOT NO_Audio ) + MESSAGE ( STATUS "" ) + MESSAGE ( STATUS "<******************************>" ) + SET ( SRC_compile ${SRC_base} ${SRC_client} ${SRC_audio} ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/audio ) + FIND_PACKAGE ( SDL_mixer REQUIRED ) + INCLUDE_DIRECTORIES ( ${SDLMIXER_INCLUDE_DIR} ) + LINK_LIBRARIES ( ${SDL_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLTTF_LIBRARY} SDLmain ) + ELSE (NOT NO_Audio) + MESSAGE ( STATUS "" ) + ADD_DEFINITIONS ( -DNO_SOUND ) + MESSAGE ( STATUS "<******************************>" ) + ENDIF ( NOT NO_Audio ) + ADD_EXECUTABLE ( tuxanci-ng ${SRC_compile} ) + #TARGET_LINK_LIBRARIES (tuxanci-ng modWall modPipe modTeleport modAI) + SET (TUX_BIN "tuxanci-ng") +ELSE ( NO_Server ) + # kontrola libdl + LINK_LIBRARIES ( ${CMAKE_DL_LIBS} ) + MESSAGE ( STATUS "" ) + MESSAGE ( STATUS "<******************************>" ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/server ) + SET ( SRC_compile ${SRC_base} ${SRC_server} ) + ADD_EXECUTABLE ( tuxanci-ng-server ${SRC_compile} ) + #TARGET_LINK_LIBRARIES (tuxanci-ng-server modWall modPipe modTeleport modAI) + SET (TUX_BIN "tuxanci-ng-server") +ENDIF ( NO_Server ) + +# binarky a knihovny instalace +#MESSAGE ( STATUS "" ) +#MESSAGE ( STATUS "<******************************>" ) +INSTALL ( TARGETS ${TUX_BIN} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${APPNAME} ) \ No newline at end of file diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index a54b508..0000000 --- a/src/Makefile +++ /dev/null @@ -1,29 +0,0 @@ - -CC = gcc -CFLAGS = -g -O0 -std=c99 -I.. -Wall `sdl-config --cflags` -DSUPPORT_NET_UNIX_UDP -LIBS = `sdl-config --libs` -lSDL_image -lSDL_ttf -lSDL_mixer - -all: - make -C ./audio -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./net_unix -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./client -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./screen -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./widget -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./base -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./modules -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - $(CC) $(CFLAGS) $(LIBS) -o tuxanci-ng base/*.o client/*.o widget/*.o screen/*.o net_unix/*.o audio/*.o - cp modules/*.so ../modules/ - cp tuxanci-ng ../ - -clean: - make -C ./base -f Makefile clean - make -C ./client -f Makefile clean - make -C ./screen -f Makefile clean - make -C ./widget -f Makefile clean - make -C ./net_unix -f Makefile clean - make -C ./net_sdl -f Makefile clean - make -C ./audio -f Makefile clean - make -C ./modules -f Makefile clean - rm -rf ../modules/*.so - rm tuxanci-ng - rm ../tuxanci-ng diff --git a/src/Makefile-nosound b/src/Makefile-nosound deleted file mode 100644 index e672fe1..0000000 --- a/src/Makefile-nosound +++ /dev/null @@ -1,28 +0,0 @@ - -CC = gcc -CFLAGS = -g -O0 -std=c99 -I.. -Wall `sdl-config --cflags` -DNO_SOUND -DSUPPORT_NET_UNIX_UDP -LIBS = `sdl-config --libs` -lSDL_image -lSDL_ttf - -all: - make -C ./net_unix -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./client -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./screen -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./widget -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./base -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./modules -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - $(CC) $(CFLAGS) $(LIBS) -o tuxanci-ng base/*.o client/*.o widget/*.o screen/*.o net_unix/*.o - cp modules/*.so ../modules/ - cp tuxanci-ng ../ - -clean: - make -C ./base -f Makefile clean - make -C ./client -f Makefile clean - make -C ./screen -f Makefile clean - make -C ./widget -f Makefile clean - make -C ./net_unix -f Makefile clean - make -C ./net_sdl -f Makefile clean - make -C ./audio -f Makefile clean - make -C ./modules -f Makefile clean - rm -rf ../modules/*.so - rm tuxanci-ng - rm ../tuxanci-ng diff --git a/src/Makefile-sdlnet b/src/Makefile-sdlnet deleted file mode 100644 index d278d52..0000000 --- a/src/Makefile-sdlnet +++ /dev/null @@ -1,29 +0,0 @@ - -CC = gcc -CFLAGS = -g -O0 -std=c99 -I.. -Wall `sdl-config --cflags` -DSUPPORT_NET_SDL_UDP -LIBS = `sdl-config --libs` -lSDL_image -lSDL_ttf -lSDL_mixer -lSDL_net - -all: - make -C ./audio -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./net_sdl -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./client -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./screen -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./widget -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./base -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./modules -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - $(CC) $(CFLAGS) $(LIBS) -o tuxanci-ng base/*.o client/*.o widget/*.o screen/*.o net_sdl/*.o audio/*.o - cp modules/*.so ../modules/ - cp tuxanci-ng ../ - -clean: - make -C ./base -f Makefile clean - make -C ./client -f Makefile clean - make -C ./screen -f Makefile clean - make -C ./widget -f Makefile clean - make -C ./net_unix -f Makefile clean - make -C ./net_sdl -f Makefile clean - make -C ./audio -f Makefile clean - make -C ./modules -f Makefile clean - rm -rf ../modules/*.so - rm tuxanci-ng - rm ../tuxanci-ng diff --git a/src/Makefile-server b/src/Makefile-server deleted file mode 100644 index 23ec740..0000000 --- a/src/Makefile-server +++ /dev/null @@ -1,26 +0,0 @@ - -CC = gcc -CFLAGS = -g -O0 -std=c99 -I.. -Wall -D_GNU_SOURCE=1 -DSUPPORT_NET_UNIX_UDP -DPUBLIC_SERVER -DNO_SOUND -LIBS = -ldl - -all: - make -C ./base -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./server -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./net_unix -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - make -C ./modules -f Makefile CC="$(CC)" CFLAGS="$(CFLAGS)" - $(CC) $(CFLAGS) $(LIBS) -o publicserver base/*.o server/*.o net_unix/*.o - cp modules/*.so ../modules/ - cp publicserver ../ - -clean: - make -C ./base -f Makefile clean - make -C ./client -f Makefile clean - make -C ./screen -f Makefile clean - make -C ./widget -f Makefile clean - make -C ./net_unix -f Makefile clean - make -C ./net_sdl -f Makefile clean - make -C ./audio -f Makefile clean - make -C ./modules -f Makefile clean - rm -rf ../modules/*.so - rm publicserver - rm ../publicserver diff --git a/src/audio/Makefile b/src/audio/Makefile deleted file mode 100644 index a5dff01..0000000 --- a/src/audio/Makefile +++ /dev/null @@ -1,17 +0,0 @@ - - -all: audio.o music.o sound.o - -audio.o: audio.c audio.h - $(CC) $(CFLAGS) -o audio.o -c audio.c - -music.o: music.c music.h - $(CC) $(CFLAGS) -o music.o -c music.c - -sound.o: sound.c sound.h - $(CC) $(CFLAGS) -o sound.o -c sound.c - - - -clean: - rm -rf *.o diff --git a/src/audio/audio.c b/src/audio/audio.c index d7f4a9b..8397788 100644 --- a/src/audio/audio.c +++ b/src/audio/audio.c @@ -3,9 +3,9 @@ #include #include -#include "base/main.h" -#include "audio/audio.h" -#include "client/interface.h" +#include "main.h" +#include "audio.h" +#include "interface.h" static bool_t isAudioInit = FALSE; diff --git a/src/audio/audio.h b/src/audio/audio.h index 04c58e7..242bb9a 100644 --- a/src/audio/audio.h +++ b/src/audio/audio.h @@ -3,7 +3,7 @@ #define AUDIO_H -#include "base/main.h" +#include "main.h" extern bool_t isAudioInicialized(); extern void initAudio(); diff --git a/src/audio/music.c b/src/audio/music.c index b449950..cf3db24 100644 --- a/src/audio/music.c +++ b/src/audio/music.c @@ -3,14 +3,14 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/storage.h" +#include "main.h" +#include "list.h" +#include "storage.h" -#include "client/interface.h" +#include "interface.h" -#include "audio/audio.h" -#include "audio/music.h" +#include "audio.h" +#include "music.h" static list_t *listStorage; diff --git a/src/audio/music.h b/src/audio/music.h index d87f382..0ae83c4 100644 --- a/src/audio/music.h +++ b/src/audio/music.h @@ -6,7 +6,7 @@ #ifndef NO_SOUND #include -#include "base/main.h" +#include "main.h" #define MUSIC_GROUP_BASE "base" #define MUSIC_GROUP_USER "user" diff --git a/src/audio/sound.c b/src/audio/sound.c index 37803c4..652de67 100644 --- a/src/audio/sound.c +++ b/src/audio/sound.c @@ -3,14 +3,14 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/storage.h" +#include "main.h" +#include "list.h" +#include "storage.h" -#include "client/interface.h" +#include "interface.h" -#include "audio/audio.h" -#include "audio/sound.h" +#include "audio.h" +#include "sound.h" static list_t *listStorage; diff --git a/src/audio/sound.h b/src/audio/sound.h index ec1beb1..337ef3b 100644 --- a/src/audio/sound.h +++ b/src/audio/sound.h @@ -6,7 +6,7 @@ #ifndef NO_SOUND #include -#include "base/main.h" +#include "main.h" #define SOUND_GROUP_BASE "base" #define SOUND_GROUP_USER "user" diff --git a/src/base/Makefile b/src/base/Makefile deleted file mode 100644 index d9998a6..0000000 --- a/src/base/Makefile +++ /dev/null @@ -1,70 +0,0 @@ - -all: arena.o arenaFile.o director.o gun.o homeDirector.o checkFront.o idManager.o item.o index.o list.o main.o modules.o myTimer.o net_multiplayer.o protect.o proto.o server.o shot.o space.o storage.o textFile.o tux.o - -arena.o: arena.c arena.h - $(CC) $(CFLAGS) -o arena.o -c arena.c - -arenaFile.o: arenaFile.c arenaFile.h - $(CC) $(CFLAGS) -o arenaFile.o -c arenaFile.c - -director.o: director.c director.h - $(CC) $(CFLAGS) -o director.o -c director.c - -gun.o: gun.c gun.h - $(CC) $(CFLAGS) -o gun.o -c gun.c - -homeDirector.o: homeDirector.c homeDirector.h - $(CC) $(CFLAGS) -o homeDirector.o -c homeDirector.c - -checkFront.o: checkFront.c checkFront.h - $(CC) $(CFLAGS) -o checkFront.o -c checkFront.c - -idManager.o: idManager.c idManager.h - $(CC) $(CFLAGS) -o idManager.o -c idManager.c - -item.o: item.c item.h - $(CC) $(CFLAGS) -o item.o -c item.c - -index.o: index.c index.h - $(CC) $(CFLAGS) -o index.o -c index.c - -list.o: list.c list.h - $(CC) $(CFLAGS) -o list.o -c list.c - -main.o: main.c main.h - $(CC) $(CFLAGS) -o main.o -c main.c - -modules.o: modules.c modules.h - $(CC) $(CFLAGS) -o modules.o -c modules.c - -myTimer.o: myTimer.c myTimer.h - $(CC) $(CFLAGS) -o myTimer.o -c myTimer.c - -net_multiplayer.o: net_multiplayer.c net_multiplayer.h - $(CC) $(CFLAGS) -o net_multiplayer.o -c net_multiplayer.c - -protect.o: protect.c protect.h - $(CC) $(CFLAGS) -o protect.o -c protect.c - -server.o: server.c server.h - $(CC) $(CFLAGS) -o server.o -c server.c - -shot.o: shot.c shot.h - $(CC) $(CFLAGS) -o shot.o -c shot.c - -space.o: space.c space.h - $(CC) $(CFLAGS) -o space.o -c space.c - -storage.o: storage.c storage.h - $(CC) $(CFLAGS) -o storage.o -c storage.c - -textFile.o: textFile.c textFile.h - $(CC) $(CFLAGS) -o textFile.o -c textFile.c - -tux.o: tux.c tux.h - $(CC) $(CFLAGS) -o tux.o -c tux.c - -clean: - rm -rf *.o - - diff --git a/src/base/arena.c b/src/base/arena.c index 9de1dce..7358e41 100644 --- a/src/base/arena.c +++ b/src/base/arena.c @@ -3,18 +3,18 @@ #include #include -#include "base/main.h" -#include "base/arena.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/item.h" -#include "base/myTimer.h" -#include "base/modules.h" +#include "main.h" +#include "arena.h" +#include "list.h" +#include "tux.h" +#include "shot.h" +#include "item.h" +#include "myTimer.h" +#include "modules.h" #ifndef PUBLIC_SERVER -#include "screen/screen_world.h" -#include "client/layer.h" +#include "screen_world.h" +#include "layer.h" #endif static arena_t *currentArena; diff --git a/src/base/arena.h b/src/base/arena.h index 57792c5..837fade 100644 --- a/src/base/arena.h +++ b/src/base/arena.h @@ -3,14 +3,14 @@ #define ARENA_H -#include "base/main.h" +#include "main.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" +#include "interface.h" #endif -#include "base/list.h" -#include "base/space.h" +#include "list.h" +#include "space.h" typedef struct arena_struct { diff --git a/src/base/arenaFile.c b/src/base/arenaFile.c index 9fe683e..f0de21f 100644 --- a/src/base/arenaFile.c +++ b/src/base/arenaFile.c @@ -4,21 +4,21 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/textFile.h" -#include "base/arenaFile.h" -#include "base/arena.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/item.h" -#include "base/director.h" -#include "base/modules.h" +#include "main.h" +#include "list.h" +#include "textFile.h" +#include "arenaFile.h" +#include "arena.h" +#include "tux.h" +#include "shot.h" +#include "item.h" +#include "director.h" +#include "modules.h" #ifndef PUBLIC_SERVER -#include "client/configFile.h" -#include "client/image.h" -#include "audio/music.h" +#include "configFile.h" +#include "image.h" +#include "music.h" #endif static list_t *listArenaFile; diff --git a/src/base/arenaFile.h b/src/base/arenaFile.h index e2e8108..5f71f5b 100644 --- a/src/base/arenaFile.h +++ b/src/base/arenaFile.h @@ -3,8 +3,8 @@ #define ARENA_FILE_H -#include "base/main.h" -#include "base/arena.h" +#include "main.h" +#include "arena.h" #define PUBLIC_SERVER_PATH_ARENA "./arena/" diff --git a/src/base/checkFront.c b/src/base/checkFront.c index 37b0ace..f6164f3 100644 --- a/src/base/checkFront.c +++ b/src/base/checkFront.c @@ -4,12 +4,12 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/myTimer.h" -#include "base/checkFront.h" -#include "base/idManager.h" -#include "base/server.h" +#include "main.h" +#include "list.h" +#include "myTimer.h" +#include "checkFront.h" +#include "idManager.h" +#include "server.h" typedef struct struct_checkfront_t { diff --git a/src/base/checkFront.h b/src/base/checkFront.h index 3beb370..dde30f0 100644 --- a/src/base/checkFront.h +++ b/src/base/checkFront.h @@ -3,8 +3,8 @@ #define CHECK_FRONT_H -#include "base/list.h" -#include "base/server.h" +#include "list.h" +#include "server.h" #define CHECK_FRONT_SEND_TIME_INTERVAL 100 #define CHECK_FRONT_MAX_COUNT_SEND 30 diff --git a/src/base/director.c b/src/base/director.c index fede2c3..0cece6b 100755 --- a/src/base/director.c +++ b/src/base/director.c @@ -7,8 +7,8 @@ #include #include -#include "base/main.h" -#include "base/list.h" +#include "main.h" +#include "list.h" typedef struct director_struct { diff --git a/src/base/director.h b/src/base/director.h index 20e577c..8a07ed0 100644 --- a/src/base/director.h +++ b/src/base/director.h @@ -3,8 +3,8 @@ #define DIRECTOR_H -#include "base/main.h" -#include "base/list.h" +#include "main.h" +#include "list.h" typedef struct director_struct { diff --git a/src/base/gun.c b/src/base/gun.c index c59bd98..f905efd 100644 --- a/src/base/gun.c +++ b/src/base/gun.c @@ -3,29 +3,29 @@ #include #include -#include "base/main.h" -#include "base/arena.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/myTimer.h" -#include "base/item.h" -#include "base/gun.h" -#include "base/proto.h" -#include "base/net_multiplayer.h" +#include "main.h" +#include "arena.h" +#include "tux.h" +#include "shot.h" +#include "myTimer.h" +#include "item.h" +#include "gun.h" +#include "proto.h" +#include "net_multiplayer.h" #ifndef NO_SOUND -#include "audio/sound.h" +#include "sound.h" #endif #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/term.h" +#include "interface.h" +#include "term.h" -#include "screen/screen_world.h" +#include "screen_world.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif static void modificiationCopuse(int courser, int right_x, int right_y, int *dest_x, int *dest_y) diff --git a/src/base/homeDirector.c b/src/base/homeDirector.c index 0533d2e..e78ffa4 100755 --- a/src/base/homeDirector.c +++ b/src/base/homeDirector.c @@ -5,8 +5,8 @@ #include #include -#include "base/main.h" -#include "base/homeDirector.h" +#include "main.h" +#include "homeDirector.h" static char homeDirector[STR_PATH_SIZE]; diff --git a/src/base/homeDirector.h b/src/base/homeDirector.h index a5c5e0c..85f8172 100755 --- a/src/base/homeDirector.h +++ b/src/base/homeDirector.h @@ -3,7 +3,7 @@ #define HOMEDIRECTOR_H -#include "base/main.h" +#include "main.h" #define HOMEDIRECTOR_NAME ".tuxanci-ng" diff --git a/src/base/idManager.c b/src/base/idManager.c index fb4a928..ea7e679 100644 --- a/src/base/idManager.c +++ b/src/base/idManager.c @@ -3,9 +3,9 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/idManager.h" +#include "main.h" +#include "list.h" +#include "idManager.h" static list_t *listID; static int lastID; diff --git a/src/base/idManager.h b/src/base/idManager.h index 2b33ac5..62e2651 100644 --- a/src/base/idManager.h +++ b/src/base/idManager.h @@ -7,7 +7,7 @@ #define MAX_ID 1000 #define ID_UNKNOWN -1 -#include "base/list.h" +#include "list.h" extern void initListID(); extern int getNewID(); diff --git a/src/base/item.c b/src/base/item.c index 73bfeaa..7f12ce7 100644 --- a/src/base/item.c +++ b/src/base/item.c @@ -2,33 +2,33 @@ #include #include -#include "base/main.h" -#include "base/arena.h" -#include "base/tux.h" -#include "base/item.h" -#include "base/shot.h" -#include "base/proto.h" -#include "base/idManager.h" -#include "base/net_multiplayer.h" +#include "main.h" +#include "arena.h" +#include "tux.h" +#include "item.h" +#include "shot.h" +#include "proto.h" +#include "idManager.h" +#include "net_multiplayer.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/image.h" -#include "client/layer.h" -#include "client/term.h" +#include "interface.h" +#include "image.h" +#include "layer.h" +#include "term.h" -#include "screen/screen_world.h" -#include "screen/screen_setting.h" +#include "screen_world.h" +#include "screen_setting.h" #ifndef NO_SOUND -#include "audio/sound.h" +#include "sound.h" #endif #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif #ifndef PUBLIC_SERVER diff --git a/src/base/item.h b/src/base/item.h index ec11654..c23e7d7 100644 --- a/src/base/item.h +++ b/src/base/item.h @@ -3,17 +3,17 @@ #define ITEM_H -#include "base/main.h" +#include "main.h" #define ITEM_SYNC_TIMEOUT 5000 #ifndef PUBLIC_SERVER -#include "client/interface.h" +#include "interface.h" #endif -#include "base/list.h" -#include "base/tux.h" -#include "base/myTimer.h" +#include "list.h" +#include "tux.h" +#include "myTimer.h" typedef struct item_struct { diff --git a/src/base/list.c b/src/base/list.c index d182210..27b0ed8 100755 --- a/src/base/list.c +++ b/src/base/list.c @@ -1,6 +1,6 @@ -#include "base/main.h" -#include "base/list.h" +#include "main.h" +#include "list.h" #include #include diff --git a/src/base/list.h b/src/base/list.h index 17a8e2d..5a15786 100755 --- a/src/base/list.h +++ b/src/base/list.h @@ -3,7 +3,7 @@ #define LIST_H -#include "base/main.h" +#include "main.h" #define LIST_ALLOC_LIMIT 16 diff --git a/src/base/main.c b/src/base/main.c index ffebbe0..5fb3d4e 100644 --- a/src/base/main.c +++ b/src/base/main.c @@ -8,15 +8,15 @@ #include #include -#include "base/main.h" -#include "base/tux.h" +#include "main.h" +#include "tux.h" #ifndef PUBLIC_SERVER -#include "client/game.h" +#include "game.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif static int my_argc; diff --git a/src/base/main.h b/src/base/main.h index b38a1d7..fcf1f4d 100644 --- a/src/base/main.h +++ b/src/base/main.h @@ -11,15 +11,15 @@ #endif -#include "base/bool.h" -#include "base/string_length.h" -#include "base/path.h" +#include "bool.h" +#include "string_length.h" +#include "path.h" //rozlisenie obrazovky #define WINDOW_SIZE_X 800 #define WINDOW_SIZE_Y 600 -#include "base/list.h" +#include "list.h" extern list_t *listHelp; diff --git a/src/base/modules.c b/src/base/modules.c index aa881d5..108990f 100755 --- a/src/base/modules.c +++ b/src/base/modules.c @@ -5,20 +5,20 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/modules.h" -#include "base/arena.h" -#include "base/arenaFile.h" -#include "base/proto.h" +#include "main.h" +#include "list.h" +#include "tux.h" +#include "shot.h" +#include "modules.h" +#include "arena.h" +#include "arenaFile.h" +#include "proto.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/image.h" -#include "client/layer.h" -#include "client/configFile.h" +#include "interface.h" +#include "image.h" +#include "layer.h" +#include "configFile.h" #endif int pokus(char *s) diff --git a/src/base/modules.h b/src/base/modules.h index 3b50ade..0b31292 100644 --- a/src/base/modules.h +++ b/src/base/modules.h @@ -3,14 +3,14 @@ #define MODULE_H -#include "base/tux.h" -#include "base/shot.h" -#include "base/arena.h" -#include "base/proto.h" -#include "base/myTimer.h" +#include "tux.h" +#include "shot.h" +#include "arena.h" +#include "proto.h" +#include "myTimer.h" #ifndef PUBLIC_SERVER -#include "client/image.h" +#include "image.h" #endif typedef struct export_fce_s diff --git a/src/base/myTimer.c b/src/base/myTimer.c index 7913f8b..5e74207 100644 --- a/src/base/myTimer.c +++ b/src/base/myTimer.c @@ -6,12 +6,12 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/myTimer.h" +#include "main.h" +#include "list.h" +#include "myTimer.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" +#include "interface.h" #endif static struct timeval start = { .tv_sec = 0, .tv_usec = 0 }; diff --git a/src/base/myTimer.h b/src/base/myTimer.h index 2f038da..97c2f65 100644 --- a/src/base/myTimer.h +++ b/src/base/myTimer.h @@ -3,8 +3,8 @@ #define MY_TIME_H -#include "base/main.h" -#include "base/list.h" +#include "main.h" +#include "list.h" #define my_time_t unsigned int diff --git a/src/base/net_multiplayer.c b/src/base/net_multiplayer.c index bc8ecab..b028e0f 100644 --- a/src/base/net_multiplayer.c +++ b/src/base/net_multiplayer.c @@ -4,28 +4,28 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/item.h" -#include "base/arenaFile.h" -#include "base/net_multiplayer.h" -#include "base/server.h" +#include "main.h" +#include "list.h" +#include "tux.h" +#include "item.h" +#include "arenaFile.h" +#include "net_multiplayer.h" +#include "server.h" #ifdef SUPPORT_NET_UNIX_UDP -#include "net_unix/udp.h" +#include "udp.h" #endif #ifdef SUPPORT_NET_SDL_UDP -#include "net_sdl/sdl_udp.h" +#include "sdl_udp.h" #endif #ifndef PUBLIC_SERVER -#include "screen/screen_setting.h" -#include "screen/screen_choiceArena.h" +#include "screen_setting.h" +#include "screen_choiceArena.h" -#include "client/screen.h" -#include "client/client.h" +#include "screen.h" +#include "client.h" #endif static int netGameType; diff --git a/src/base/net_multiplayer.h b/src/base/net_multiplayer.h index a37df6f..3137385 100644 --- a/src/base/net_multiplayer.h +++ b/src/base/net_multiplayer.h @@ -3,10 +3,10 @@ #define NET_MULTIPLAYER_H -#include "base/main.h" -#include "base/tux.h" -#include "base/item.h" -#include "base/arena.h" +#include "main.h" +#include "tux.h" +#include "item.h" +#include "arena.h" #define PROTO_UDPv4 0 #define PROTO_UDPv6 1 diff --git a/src/base/path.h b/src/base/path.h index 9c26ea4..a99bf83 100644 --- a/src/base/path.h +++ b/src/base/path.h @@ -3,7 +3,7 @@ #define PATH_H -#include "base/main.h" +#include "main.h" #ifdef DESTDIR @@ -27,7 +27,7 @@ #define PATH_MUSIC DESTDIR PATH_DIR "music/" #define PATH_CONFIG DESTDIR PATH_DIR "conf/" #define PATH_LANG DESTDIR PATH_DIR "lang/" -#define PATH_DATA DESTDIR PATH_DIR "data/" -#define PATH_MODULES DESTDIR PATH_DIR "modules/" +#define PATH_DATA DESTDIR PATH_DIR "doc/" +#define PATH_MODULES DESTDIR "lib/tuxanci-ng/" #endif diff --git a/src/base/protect.c b/src/base/protect.c index 7da70bb..cf567b8 100644 --- a/src/base/protect.c +++ b/src/base/protect.c @@ -4,9 +4,9 @@ #include #include -#include "base/main.h" -#include "base/myTimer.h" -#include "base/protect.h" +#include "main.h" +#include "myTimer.h" +#include "protect.h" protect_t* newProtect() { diff --git a/src/base/protect.h b/src/base/protect.h index b0db5a9..e0553dd 100644 --- a/src/base/protect.h +++ b/src/base/protect.h @@ -3,8 +3,8 @@ #define PROTECT_H -#include "base/main.h" -#include "base/myTimer.h" +#include "main.h" +#include "myTimer.h" #define PROTECT_PING_INTERVAL_TIMEOUT 5000 #define PROTECT_SPEED_INTERVAL_TIMEOUT 40 diff --git a/src/base/proto.c b/src/base/proto.c index cc33149..722d443 100644 --- a/src/base/proto.c +++ b/src/base/proto.c @@ -4,35 +4,35 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/item.h" -#include "base/shot.h" -#include "base/arenaFile.h" -#include "base/myTimer.h" -#include "base/server.h" -#include "base/proto.h" -#include "base/net_multiplayer.h" -#include "base/checkFront.h" -#include "base/idManager.h" -#include "base/protect.h" +#include "main.h" +#include "list.h" +#include "tux.h" +#include "item.h" +#include "shot.h" +#include "arenaFile.h" +#include "myTimer.h" +#include "server.h" +#include "proto.h" +#include "net_multiplayer.h" +#include "checkFront.h" +#include "idManager.h" +#include "protect.h" #ifndef PUBLIC_SERVER -#include "client/language.h" -#include "screen/screen_world.h" -#include "screen/screen_setting.h" -#include "screen/screen_choiceArena.h" -#include "screen/screen_analyze.h" -#include "client/client.h" -#include "client/term.h" -#include "client/radar.h" +#include "language.h" +#include "screen_world.h" +#include "screen_setting.h" +#include "screen_choiceArena.h" +#include "screen_analyze.h" +#include "client.h" +#include "term.h" +#include "radar.h" #endif #ifdef PUBLIC_SERVER -#include "server/heightScore.h" -#include "server/publicServer.h" -#include "server/serverConfigFile.h" +#include "heightScore.h" +#include "publicServer.h" +#include "serverConfigFile.h" #endif void proto_send_error_server(int type, client_t *client, int errorcode) diff --git a/src/base/proto.h b/src/base/proto.h index 9fe9303..116562b 100644 --- a/src/base/proto.h +++ b/src/base/proto.h @@ -8,25 +8,25 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/item.h" -#include "base/shot.h" -#include "base/arenaFile.h" -#include "base/myTimer.h" -#include "base/server.h" -#include "base/proto.h" -#include "base/net_multiplayer.h" +#include "main.h" +#include "list.h" +#include "item.h" +#include "shot.h" +#include "arenaFile.h" +#include "myTimer.h" +#include "server.h" +#include "proto.h" +#include "net_multiplayer.h" #ifndef PUBLIC_SERVER -#include "screen/screen_world.h" -#include "screen/screen_setting.h" -#include "screen/screen_choiceArena.h" -#include "client/client.h" +#include "screen_world.h" +#include "screen_setting.h" +#include "screen_choiceArena.h" +#include "client.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif #define PROTO_SEND_ONE 0 diff --git a/src/base/server.c b/src/base/server.c index 941b62e..9132a46 100644 --- a/src/base/server.c +++ b/src/base/server.c @@ -12,28 +12,28 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/proto.h" -#include "base/server.h" -#include "base/myTimer.h" -#include "base/arena.h" -#include "base/net_multiplayer.h" -#include "base/checkFront.h" -#include "base/protect.h" -#include "base/index.h" +#include "main.h" +#include "list.h" +#include "tux.h" +#include "proto.h" +#include "server.h" +#include "myTimer.h" +#include "arena.h" +#include "net_multiplayer.h" +#include "checkFront.h" +#include "protect.h" +#include "index.h" #ifndef PUBLIC_SERVER -#include "screen/screen_world.h" +#include "screen_world.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" -#include "server/heightScore.h" +#include "publicServer.h" +#include "heightScore.h" #endif -#include "net_unix/udp.h" +#include "udp.h" static sock_udp_t *sock_server_udp; static sock_udp_t *sock_server_udp_second; diff --git a/src/base/server.h b/src/base/server.h index 670258c..e6f0b93 100644 --- a/src/base/server.h +++ b/src/base/server.h @@ -5,25 +5,25 @@ #include -#include "base/list.h" -#include "base/tux.h" -#include "base/myTimer.h" -#include "base/protect.h" +#include "list.h" +#include "tux.h" +#include "myTimer.h" +#include "protect.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" +#include "interface.h" #endif #ifdef SUPPORT_NET_SDL_UDP -#include "net_sdl/sdl_udp.h" +#include "sdl_udp.h" #endif #ifdef SUPPORT_NET_UNIX_UDP -#include "net_unix/udp.h" +#include "udp.h" #endif diff --git a/src/base/shot.c b/src/base/shot.c index 96f5692..826bad4 100644 --- a/src/base/shot.c +++ b/src/base/shot.c @@ -3,21 +3,21 @@ #include #include -#include "base/main.h" -#include "base/shot.h" -#include "base/gun.h" -#include "base/net_multiplayer.h" -#include "base/proto.h" -#include "base/idManager.h" +#include "main.h" +#include "shot.h" +#include "gun.h" +#include "net_multiplayer.h" +#include "proto.h" +#include "idManager.h" #ifndef PUBLIC_SERVER -#include "client/image.h" -#include "client/layer.h" -#include "screen/screen_world.h" +#include "image.h" +#include "layer.h" +#include "screen_world.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif #ifndef PUBLIC_SERVER diff --git a/src/base/shot.h b/src/base/shot.h index db157cb..06e1bba 100644 --- a/src/base/shot.h +++ b/src/base/shot.h @@ -3,13 +3,13 @@ #define SHOT_H -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/arena.h" +#include "main.h" +#include "list.h" +#include "tux.h" +#include "arena.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" +#include "interface.h" #endif typedef struct shot_struct diff --git a/src/base/storage.h b/src/base/storage.h index af72ba2..81e554e 100644 --- a/src/base/storage.h +++ b/src/base/storage.h @@ -3,8 +3,8 @@ #define STORAGE_H -#include "base/main.h" -#include "base/list.h" +#include "main.h" +#include "list.h" extern list_t* newStorage(); extern void addItemToStorage(list_t *list, char *group, char *name, void *data); diff --git a/src/base/string_length.h b/src/base/string_length.h index c453e60..b1712ee 100644 --- a/src/base/string_length.h +++ b/src/base/string_length.h @@ -3,7 +3,7 @@ #define STR_LENGTH_H -#include "base/main.h" +#include "main.h" #define STR_SIZE 128 #define STR_PROTO_SIZE 128 diff --git a/src/base/textFile.c b/src/base/textFile.c index 5c8c95d..d143601 100755 --- a/src/base/textFile.c +++ b/src/base/textFile.c @@ -6,8 +6,8 @@ #include #include -#include "base/main.h" -#include "base/textFile.h" +#include "main.h" +#include "textFile.h" textFile_t* newTextFile(char *s) { diff --git a/src/base/textFile.h b/src/base/textFile.h index ea15b4d..3917db7 100755 --- a/src/base/textFile.h +++ b/src/base/textFile.h @@ -3,7 +3,7 @@ #define TEXTFILE_H -#include "base/list.h" +#include "list.h" typedef struct str_textFile_t { diff --git a/src/base/tux.c b/src/base/tux.c index 7992bd9..84bc87d 100644 --- a/src/base/tux.c +++ b/src/base/tux.c @@ -4,32 +4,32 @@ #include #include -#include "base/main.h" -#include "base/tux.h" -#include "base/arena.h" -#include "base/shot.h" -#include "base/gun.h" -#include "base/item.h" -#include "base/arena.h" -#include "base/myTimer.h" -#include "base/net_multiplayer.h" -#include "base/proto.h" -#include "base/modules.h" -#include "base/idManager.h" +#include "main.h" +#include "tux.h" +#include "arena.h" +#include "shot.h" +#include "gun.h" +#include "item.h" +#include "arena.h" +#include "myTimer.h" +#include "net_multiplayer.h" +#include "proto.h" +#include "modules.h" +#include "idManager.h" #ifndef PUBLIC_SERVER -#include "client/image.h" -#include "client/layer.h" -#include "client/term.h" -#include "client/radar.h" +#include "image.h" +#include "layer.h" +#include "term.h" +#include "radar.h" -#include "audio/sound.h" +#include "sound.h" -#include "screen/screen_world.h" +#include "screen_world.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif #ifndef PUBLIC_SERVER diff --git a/src/base/tux.h b/src/base/tux.h index c8f6e51..4908af7 100644 --- a/src/base/tux.h +++ b/src/base/tux.h @@ -3,9 +3,9 @@ #define TUX_H -#include "base/main.h" -#include "base/list.h" -#include "base/arena.h" +#include "main.h" +#include "list.h" +#include "arena.h" #define TUX_STEP 7 #define TUX_LAYER 0 diff --git a/src/client/Makefile b/src/client/Makefile deleted file mode 100644 index f8fee47..0000000 --- a/src/client/Makefile +++ /dev/null @@ -1,38 +0,0 @@ - - -all: client.o configFile.o font.o game.o image.o interface.o keytable.o language.o layer.o panel.o radar.o screen.o term.o - -client.o: client.c client.h - $(CC) $(CFLAGS) -o client.o -c client.c - -configFile.o: configFile.c configFile.h - $(CC) $(CFLAGS) -o configFile.o -c configFile.c - -font.o: font.c font.h - $(CC) $(CFLAGS) -o font.o -c font.c - -game.o: game.c game.h - $(CC) $(CFLAGS) -o game.o -c game.c - -image.o: image.c image.h - $(CC) $(CFLAGS) -o image.o -c image.c - -interface.o: interface.c interface.h - $(CC) $(CFLAGS) -o interface.o -c interface.c - -layer.o: layer.c layer.h - $(CC) $(CFLAGS) -o layer.o -c layer.c - -panel.o: panel.c panel.h - $(CC) $(CFLAGS) -o panel.o -c panel.c - -radar.o: radar.c radar.h - $(CC) $(CFLAGS) -o radar.o -c radar.c -screen.o: screen.c screen.h - $(CC) $(CFLAGS) -o screen.o -c screen.c - -term.o: term.c term.h - $(CC) $(CFLAGS) -o term.o -c term.c - -clean: - rm -rf *.o diff --git a/src/client/client.c b/src/client/client.c index 2ed5e0a..26df8dc 100644 --- a/src/client/client.c +++ b/src/client/client.c @@ -10,26 +10,26 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/proto.h" +#include "main.h" +#include "list.h" +#include "tux.h" +#include "proto.h" -#include "client/client.h" -#include "client/language.h" +#include "client.h" +#include "language.h" -#include "screen/screen_analyze.h" -#include "screen/screen_world.h" +#include "screen_analyze.h" +#include "screen_world.h" static int protocolType; #ifdef SUPPORT_NET_UNIX_UDP -#include "net_unix/udp.h" +#include "udp.h" static sock_udp_t *sock_server_udp; #endif #ifdef SUPPORT_NET_SDL_UDP -#include "net_sdl/sdl_udp.h" +#include "sdl_udp.h" static sock_sdl_udp_t *sock_server_sdl_udp; #endif diff --git a/src/client/client.h b/src/client/client.h index 639f924..cd8c4c4 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -3,7 +3,7 @@ #define MY_CLIENT -#include "base/main.h" +#include "main.h" #if defined SUPPORT_NET_UNIX_UDP || defined SUPPORT_NET_SDL_UDP diff --git a/src/client/configFile.c b/src/client/configFile.c index acf7a1f..1c19e3f 100644 --- a/src/client/configFile.c +++ b/src/client/configFile.c @@ -4,8 +4,8 @@ #include #include -#include "base/main.h" -#include "client/configFile.h" +#include "main.h" +#include "configFile.h" int isYesOrNO(char *s) { diff --git a/src/client/configFile.h b/src/client/configFile.h index 67898e9..f68a381 100644 --- a/src/client/configFile.h +++ b/src/client/configFile.h @@ -3,8 +3,8 @@ #define CONFIGFILE_H -#include "base/main.h" -#include "base/textFile.h" +#include "main.h" +#include "textFile.h" extern int isYesOrNO(char *s); extern char* getYesOrNo(int n); diff --git a/src/client/font.c b/src/client/font.c index 91d15bb..3b1267a 100755 --- a/src/client/font.c +++ b/src/client/font.c @@ -1,7 +1,7 @@ -#include "base/main.h" -#include "client/interface.h" -#include "client/font.h" +#include "main.h" +#include "interface.h" +#include "font.h" static TTF_Font *g_font; static int fontSize; diff --git a/src/client/font.h b/src/client/font.h index 50b1494..f938b3b 100755 --- a/src/client/font.h +++ b/src/client/font.h @@ -5,7 +5,7 @@ #include #include -#include "base/main.h" +#include "main.h" #define COLOR_WHITE 255, 255, 255 #define COLOR_BLACK 0, 0, 0 diff --git a/src/client/game.c b/src/client/game.c index 66da14e..e70fdae 100644 --- a/src/client/game.c +++ b/src/client/game.c @@ -8,36 +8,36 @@ #include #include -#include "base/main.h" -#include "base/tux.h" -#include "base/homeDirector.h" -#include "base/item.h" -#include "base/shot.h" -#include "base/arenaFile.h" - -#include "client/image.h" -#include "client/layer.h" -#include "client/interface.h" -#include "client/screen.h" -#include "client/font.h" -#include "client/keytable.h" -#include "client/language.h" -#include "client/panel.h" -#include "client/radar.h" - -#include "audio/audio.h" -#include "audio/sound.h" -#include "audio/music.h" - -#include "screen/screen_world.h" -#include "screen/screen_mainMenu.h" -#include "screen/screen_analyze.h" -#include "screen/screen_setting.h" -#include "screen/screen_gameType.h" -#include "screen/screen_choiceArena.h" -#include "screen/screen_table.h" -#include "screen/screen_credits.h" -#include "screen/screen_browser.h" +#include "main.h" +#include "tux.h" +#include "homeDirector.h" +#include "item.h" +#include "shot.h" +#include "arenaFile.h" + +#include "image.h" +#include "layer.h" +#include "interface.h" +#include "screen.h" +#include "font.h" +#include "keytable.h" +#include "language.h" +#include "panel.h" +#include "radar.h" + +#include "audio.h" +#include "sound.h" +#include "music.h" + +#include "screen_world.h" +#include "screen_mainMenu.h" +#include "screen_analyze.h" +#include "screen_setting.h" +#include "screen_gameType.h" +#include "screen_choiceArena.h" +#include "screen_table.h" +#include "screen_credits.h" +#include "screen_browser.h" static void initGame() { diff --git a/src/client/image.c b/src/client/image.c index 98b2b8b..d582193 100755 --- a/src/client/image.c +++ b/src/client/image.c @@ -3,12 +3,12 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/storage.h" +#include "main.h" +#include "list.h" +#include "storage.h" -#include "client/interface.h" -#include "client/image.h" +#include "interface.h" +#include "image.h" static list_t *listStorage; diff --git a/src/client/image.h b/src/client/image.h index 5de6345..be3826d 100755 --- a/src/client/image.h +++ b/src/client/image.h @@ -3,8 +3,8 @@ #define IMAGE_H -#include "client/image.h" -#include "client/interface.h" +#include "image.h" +#include "interface.h" #define IMAGE_NO_ALPHA 0 #define IMAGE_ALPHA 1 diff --git a/src/client/interface.c b/src/client/interface.c index 570e3fd..5b4b6b4 100755 --- a/src/client/interface.c +++ b/src/client/interface.c @@ -1,11 +1,11 @@ #include -#include "base/main.h" -#include "base/myTimer.h" +#include "main.h" +#include "myTimer.h" -#include "client/interface.h" -#include "client/screen.h" +#include "interface.h" +#include "screen.h" //povrch okna static SDL_Surface *screen; diff --git a/src/client/interface.h b/src/client/interface.h index 5804676..c0311ee 100755 --- a/src/client/interface.h +++ b/src/client/interface.h @@ -10,7 +10,7 @@ #include #include #include -#include "base/main.h" +#include "main.h" /* #include diff --git a/src/client/keytable.c b/src/client/keytable.c index 67811a7..8eaee59 100644 --- a/src/client/keytable.c +++ b/src/client/keytable.c @@ -4,13 +4,13 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/homeDirector.h" -#include "base/textFile.h" +#include "main.h" +#include "list.h" +#include "homeDirector.h" +#include "textFile.h" -#include "client/keytable.h" -#include "client/configFile.h" +#include "keytable.h" +#include "configFile.h" static textFile_t *keytableFile; static textFile_t *keycontrolFile; diff --git a/src/client/language.c b/src/client/language.c index 5444253..6200e92 100644 --- a/src/client/language.c +++ b/src/client/language.c @@ -4,13 +4,13 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/homeDirector.h" -#include "base/textFile.h" +#include "main.h" +#include "list.h" +#include "homeDirector.h" +#include "textFile.h" -#include "client/configFile.h" -#include "client/language.h" +#include "configFile.h" +#include "language.h" static textFile_t *languageFile; static char fontFile[STR_FILE_NAME_SIZE]; diff --git a/src/client/layer.c b/src/client/layer.c index 707184b..d4fcb7b 100755 --- a/src/client/layer.c +++ b/src/client/layer.c @@ -2,15 +2,15 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" +#include "main.h" +#include "list.h" +#include "tux.h" -#include "client/interface.h" -#include "client/layer.h" -#include "client/image.h" +#include "interface.h" +#include "layer.h" +#include "image.h" -#include "screen/screen_world.h" +#include "screen_world.h" static list_t *listLayer; diff --git a/src/client/layer.h b/src/client/layer.h index 3564ef8..04a4617 100755 --- a/src/client/layer.h +++ b/src/client/layer.h @@ -3,7 +3,7 @@ #define MY_LAYER_H -#include "base/main.h" +#include "main.h" typedef struct layer_str { diff --git a/src/client/panel.c b/src/client/panel.c index af9cccb..3338544 100644 --- a/src/client/panel.c +++ b/src/client/panel.c @@ -2,14 +2,14 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" - -#include "client/interface.h" -#include "client/image.h" -#include "client/panel.h" -#include "client/font.h" +#include "main.h" +#include "list.h" +#include "tux.h" + +#include "interface.h" +#include "image.h" +#include "panel.h" +#include "font.h" static SDL_Surface *g_panel; static SDL_Surface *g_shot; diff --git a/src/client/panel.h b/src/client/panel.h index 144ea02..4935c75 100644 --- a/src/client/panel.h +++ b/src/client/panel.h @@ -3,8 +3,8 @@ #define PANEL_H -#include "base/main.h" -#include "base/list.h" +#include "main.h" +#include "list.h" #define PANEL_SCORE_LOCATION_X ( WINDOW_SIZE_X / 2 - w / 2 ) #define PANEL_SCORE_LOCATION_Y ( WINDOW_SIZE_Y - 40 ) diff --git a/src/client/radar.c b/src/client/radar.c index 45f80a4..789fb45 100644 --- a/src/client/radar.c +++ b/src/client/radar.c @@ -2,14 +2,14 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/arena.h" - -#include "client/interface.h" -#include "client/image.h" -#include "client/radar.h" +#include "main.h" +#include "list.h" +#include "tux.h" +#include "arena.h" + +#include "interface.h" +#include "image.h" +#include "radar.h" static SDL_Surface *g_radar; static list_t *listRadar; diff --git a/src/client/radar.h b/src/client/radar.h index 989856a..8dd9d88 100644 --- a/src/client/radar.h +++ b/src/client/radar.h @@ -3,7 +3,7 @@ #define RADAR_H -#include "base/arena.h" +#include "arena.h" #define RADAR_LOCATION_X (WINDOW_SIZE_X-110) #define RADAR_LOCATION_Y (10) diff --git a/src/client/screen.c b/src/client/screen.c index 730476e..8a3c29c 100644 --- a/src/client/screen.c +++ b/src/client/screen.c @@ -2,12 +2,12 @@ #include #include -#include "base/main.h" -#include "base/list.h" +#include "main.h" +#include "list.h" -#include "client/interface.h" -#include "client/screen.h" -#include "client/layer.h" +#include "interface.h" +#include "screen.h" +#include "layer.h" static screen_t *currentScreen; static list_t *listScreen; diff --git a/src/client/screen.h b/src/client/screen.h index 8049147..b0d1593 100644 --- a/src/client/screen.h +++ b/src/client/screen.h @@ -3,7 +3,7 @@ #define SCREEN_H -#include "base/main.h" +#include "main.h" typedef struct screen_struct { diff --git a/src/client/term.c b/src/client/term.c index 3357f0b..fc1824d 100644 --- a/src/client/term.c +++ b/src/client/term.c @@ -2,13 +2,13 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/myTimer.h" +#include "main.h" +#include "list.h" +#include "myTimer.h" -#include "client/interface.h" -#include "client/term.h" -#include "client/font.h" +#include "interface.h" +#include "term.h" +#include "font.h" typedef struct struct_term_t { diff --git a/src/client/term.h b/src/client/term.h index 548fda6..b48a2b7 100644 --- a/src/client/term.h +++ b/src/client/term.h @@ -3,7 +3,7 @@ #define TERM_H -#include "base/main.h" +#include "main.h" #define TERM_MAX_LINES 10 #define TERM_DEL_TEXT_TIMEOUT 2000 diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt new file mode 100644 index 0000000..f24230e --- /dev/null +++ b/src/modules/CMakeLists.txt @@ -0,0 +1,52 @@ +#SET ( WORKDIR ${CMAKE_SOURCE_DIR}/src ) +INCLUDE_DIRECTORIES ( ${WORKDIR}/base ) +IF ( NO_Server ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/client ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/screen ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/widget ) + FIND_PACKAGE ( SDL REQUIRED ) + FIND_PACKAGE ( SDL_image REQUIRED ) + FIND_PACKAGE ( SDL_ttf REQUIRED ) + INCLUDE_DIRECTORIES ( ${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} ${SDLTTF_INCLUDE_DIR} ) + IF ( NOT NO_Audio ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/audio ) + FIND_PACKAGE ( SDL_mixer REQUIRED ) + INCLUDE_DIRECTORIES ( ${SDLMIXER_INCLUDE_DIR} ) + LINK_LIBRARIES ( ${CMAKE_DL_LIBS} ${SDL_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLTTF_LIBRARY} SDLmain ) + ELSE (NOT NO_Audio) + ADD_DEFINITIONS ( -DNO_SOUND ) + LINK_LIBRARIES ( ${CMAKE_DL_LIBS} ${SDL_LIBRARY} SDLmain ) + ENDIF ( NOT NO_Audio ) +ELSE ( NO_Server ) + INCLUDE_DIRECTORIES ( ${WORKDIR}/server ) + ADD_DEFINITIONS ( -DPUBLIC_SERVER ) + ADD_DEFINITIONS ( -DNO_SOUND ) +ENDIF ( NO_Server ) +SET ( SRC_base_modules +${WORKDIR}/base/index.c ${WORKDIR}/base/space.c ${WORKDIR}/base/list.c +) +SET ( SRC_modWall +${SRC_base_modules} +modWall.c +) +SET ( SRC_modPipe +${SRC_base_modules} +modPipe.c +) +SET ( SRC_modTeleport +${SRC_base_modules} +modTeleport.c +) +SET ( SRC_modAI +${SRC_base_modules} +modAI.c +) + +ADD_LIBRARY ( modWall SHARED ${SRC_modWall} ) +ADD_LIBRARY ( modPipe SHARED ${SRC_modPipe} ) +ADD_LIBRARY ( modTeleport SHARED ${SRC_modTeleport} ) +ADD_LIBRARY ( modAI SHARED ${SRC_modAI} ) +INSTALL ( TARGETS modWall LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${APPNAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) +INSTALL ( TARGETS modPipe LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${APPNAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) +INSTALL ( TARGETS modTeleport LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${APPNAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) +INSTALL ( TARGETS modAI LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${APPNAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) \ No newline at end of file diff --git a/src/modules/Makefile b/src/modules/Makefile deleted file mode 100755 index 81f6c54..0000000 --- a/src/modules/Makefile +++ /dev/null @@ -1,31 +0,0 @@ - -all: modWall.so modPipe.so modTeleport.so modAI.so - -list.o: ../base/list.c ../base/list.h - $(CC) $(CFLAGS) -fPIC -o list.o -c ../base/list.c - -space.o: ../base/space.c ../base/space.h - $(CC) $(CFLAGS) -fPIC -o space.o -c ../base/space.c - -index.o: ../base/index.c ../base/index.h - $(CC) $(CFLAGS) -fPIC -o index.o -c ../base/index.c - -modWall.so: list.o space.o index.o - gcc $(CFLAGS) -fPIC -c modWall.c -o modWall.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modWall.so modWall.o list.o space.o index.o - -modPipe.so: list.o space.o index.o - gcc $(CFLAGS) -fPIC -c modPipe.c -o modPipe.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modPipe.so modPipe.o list.o space.o index.o - -modTeleport.so: list.o space.o index.o - gcc $(CFLAGS) -fPIC -c modTeleport.c -o modTeleport.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modTeleport.so modTeleport.o list.o space.o index.o - -modAI.so: list.o space.o index.o - gcc $(CFLAGS) -fPIC -c modAI.c -o modAI.o - gcc $(CFLAGS) -I../include -shared -fPIC -o modAI.so modAI.o list.o space.o index.o - -clean: - rm -rf *.o - rm -rf *.so diff --git a/src/modules/modAI.c b/src/modules/modAI.c index d3a9f78..53f689e 100755 --- a/src/modules/modAI.c +++ b/src/modules/modAI.c @@ -4,21 +4,21 @@ #include #include -#include "base/main.h" -#include "base/modules.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/list.h" -#include "base/gun.h" -#include "base/space.h" +#include "main.h" +#include "modules.h" +#include "tux.h" +#include "shot.h" +#include "list.h" +#include "gun.h" +#include "space.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/image.h" +#include "interface.h" +#include "image.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif static export_fce_t *export_fce; diff --git a/src/modules/modPipe.c b/src/modules/modPipe.c index 77f2c05..2c1a6e5 100755 --- a/src/modules/modPipe.c +++ b/src/modules/modPipe.c @@ -4,21 +4,21 @@ #include #include -#include "base/main.h" -#include "base/modules.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/list.h" -#include "base/gun.h" -#include "base/space.h" +#include "main.h" +#include "modules.h" +#include "tux.h" +#include "shot.h" +#include "list.h" +#include "gun.h" +#include "space.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/image.h" +#include "interface.h" +#include "image.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif typedef struct pipe_struct diff --git a/src/modules/modTeleport.c b/src/modules/modTeleport.c index 724e371..2b94e2f 100755 --- a/src/modules/modTeleport.c +++ b/src/modules/modTeleport.c @@ -4,21 +4,21 @@ #include #include -#include "base/main.h" -#include "base/modules.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/list.h" -#include "base/gun.h" -#include "base/space.h" +#include "main.h" +#include "modules.h" +#include "tux.h" +#include "shot.h" +#include "list.h" +#include "gun.h" +#include "space.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/image.h" +#include "interface.h" +#include "image.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif typedef struct teleport_struct diff --git a/src/modules/modWall.c b/src/modules/modWall.c index 35d84e6..7d36957 100755 --- a/src/modules/modWall.c +++ b/src/modules/modWall.c @@ -3,21 +3,21 @@ #include #include -#include "base/main.h" -#include "base/modules.h" -#include "base/tux.h" -#include "base/shot.h" -#include "base/list.h" -#include "base/gun.h" -#include "base/space.h" +#include "main.h" +#include "modules.h" +#include "tux.h" +#include "shot.h" +#include "list.h" +#include "gun.h" +#include "space.h" #ifndef PUBLIC_SERVER -#include "client/interface.h" -#include "client/image.h" +#include "interface.h" +#include "image.h" #endif #ifdef PUBLIC_SERVER -#include "server/publicServer.h" +#include "publicServer.h" #endif typedef struct wall_struct diff --git a/src/net/dns.c b/src/net/dns.c new file mode 100644 index 0000000..a8e5030 --- /dev/null +++ b/src/net/dns.c @@ -0,0 +1,19 @@ + +#include +#include + +#include "main.h" + +char* getIPFormDNS(char *domain) +{ + struct hostent *host; + + host = gethostbyname(domain); + + if( host == NULL || host->h_addr_list[0] == NULL ) + { + return NULL; + } + + return strdup( inet_ntoa( * ( (struct in_addr *) host->h_addr_list[0] ) ) ); +} diff --git a/src/net/dns.h b/src/net/dns.h new file mode 100644 index 0000000..ae92c35 --- /dev/null +++ b/src/net/dns.h @@ -0,0 +1,8 @@ + +#ifndef DNS_H + +#define DNS_H + +extern char* getIPFormDNS(char *domain); + +#endif diff --git a/src/net/udp.c b/src/net/udp.c new file mode 100644 index 0000000..8a0623e --- /dev/null +++ b/src/net/udp.c @@ -0,0 +1,374 @@ + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define BUFSIZE 1000 + +#include "main.h" +#include "net_multiplayer.h" + +#include "udp.h" + +sock_udp_t* newSockUdp(int proto) +{ + sock_udp_t *new; + + new = malloc( sizeof(sock_udp_t) ); + memset(new, 0, sizeof(sock_udp_t)); + new->proto = proto; + + return new; +} + +void destroySockUdp(sock_udp_t *p) +{ + assert( p != NULL ); + free(p); +} + +sock_udp_t* bindUdpSocket(char *address, int port, int proto) +{ + sock_udp_t *new; + int res; + + assert( port > 0 && port < 65535 ); + + new = newSockUdp(proto); + + assert( new != NULL ); + + if( new->proto == PROTO_UDPv4 ) + { + new->sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + } + +#ifdef SUPPORT_IPv6 + if( new->proto == PROTO_UDPv6 ) + { + new->sock = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); + } +#endif + + if( new->sock < 0 ) + { + fprintf(stderr, "nemozem vytvorit socket !\n"); + destroySockUdp(new); + return NULL; + } + + memset(&(new->sockAddr), 0, sizeof(new->sockAddr)); + + if( new->proto == PROTO_UDPv4 ) + { + new->sockAddr.sin_family = AF_INET; + new->sockAddr.sin_port = htons(port); + new->sockAddr.sin_addr.s_addr = inet_addr(address); + + res = bind(new->sock, (struct sockaddr *)&(new->sockAddr), sizeof(new->sockAddr)); + } + +#ifdef SUPPORT_IPv6 + if( new->proto == PROTO_UDPv6 ) + { + new->sockAddr6.sin6_family = AF_INET6; + new->sockAddr6.sin6_port = htons(port); + inet_pton(AF_INET6, address, &(new->sockAddr6.sin6_addr)); + + res = bind(new->sock, (struct sockaddr *)&(new->sockAddr6), sizeof(new->sockAddr6)); + } +#endif + + if( res < 0 ) + { + fprintf(stderr, "nemozem nastavit sokcet %s %d !\n", address, port); + destroySockUdp(new); + return NULL; + } + + return new; +} + +sock_udp_t* connectUdpSocket(char *address, int port, int proto) +{ + sock_udp_t *new; + + assert( address != NULL ); + assert( port > 0 && port < 65536 ); + + new = newSockUdp(proto); + + assert( new != NULL ); + + if( new->proto == PROTO_UDPv4 ) + { + new->sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + } + +#ifdef SUPPORT_IPv6 + if( new->proto == PROTO_UDPv6 ) + { + new->sock = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); + } +#endif + + if( new->sock < 0 ) + { + fprintf(stderr, "nemozem vytvorit socket !\n"); + destroySockUdp(new); + return NULL; + } + + memset(&(new->sockAddr), 0, sizeof(new->sockAddr)); + + if( new->proto == PROTO_UDPv4 ) + { + new->sockAddr.sin_family = AF_INET; + new->sockAddr.sin_port = htons(port); + new->sockAddr.sin_addr.s_addr = inet_addr(address); + } + +#ifdef SUPPORT_IPv6 + if( new->proto == PROTO_UDPv6 ) + { + new->sockAddr6.sin6_family = AF_INET6; + new->sockAddr6.sin6_port = htons(port); + inet_pton(AF_INET6, address, &(new->sockAddr6.sin6_addr)); + } +#endif + return new; +} + +int setUdpSockNonBlock(sock_udp_t *p) +{ + int oldFlag; + + oldFlag = fcntl (p->sock, F_GETFL, 0); + + if( fcntl(p->sock, F_SETFL, oldFlag|O_NONBLOCK ) == -1 ) + { + return -1; + } + + return 0; +} + +int readUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len) +{ + int addrlen; + int size; + + assert( src != NULL ); + assert( dst != NULL ); + assert( address != NULL ); + + if( dst->proto == PROTO_UDPv4 ) + { + addrlen = sizeof(src->sockAddr); + + size = recvfrom(src->sock, address, len, 0, + (struct sockaddr *)&dst->sockAddr, (socklen_t *)&addrlen); + } + +#ifdef SUPPORT_IPv6 + if( dst->proto == PROTO_UDPv6 ) + { + addrlen = sizeof(src->sockAddr6); + + size = recvfrom(src->sock, address, len, 0, + (struct sockaddr *)&dst->sockAddr6, (socklen_t *)&addrlen); + } +#endif + + if( size < 0 ) + { + char str_ip[STR_IP_SIZE]; + + getSockUdpIp(dst, str_ip, STR_IP_SIZE); + + fprintf(stderr, "nemozem zapisat zo socketu %d %s %d!\n", size, str_ip, getSockUdpPort(dst)); + return -1; + } + + return size; +} + +int writeUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len) +{ + int addrlen; + int size; + + assert( src != NULL ); + assert( dst != NULL ); + assert( address != NULL ); + + if( dst->proto == PROTO_UDPv4 ) + { + addrlen = sizeof(src->sockAddr); + + size = sendto(src->sock, address, len, 0, + (struct sockaddr *)&dst->sockAddr, (socklen_t)addrlen); + } + +#ifdef SUPPORT_IPv6 + if( dst->proto == PROTO_UDPv6 ) + { + addrlen = sizeof(src->sockAddr6); + + size = sendto(src->sock, address, len, 0, + (struct sockaddr *)&dst->sockAddr6, (socklen_t)addrlen); + } +#endif + + if( size < 0 ) + { + char str_ip[STR_IP_SIZE]; + + getSockUdpIp(dst, str_ip, STR_IP_SIZE); + + fprintf(stderr, "nemozem zapisat na socket %d %s %d!\n", size, str_ip, getSockUdpPort(dst)); + return -1; + } + + return size; +} + +void getSockUdpIp(sock_udp_t *p, char *str_ip, int len) +{ + assert( p != NULL ); + assert( str_ip != NULL ); + + + if( p->proto == PROTO_UDPv4 ) + { + //strcpy(str_ip, inet_ntoa(p->sockAddr.sin_addr)); + //printf("strcpy(str_ip, inet_ntoa(p->sockAddr.sin_addr));\n"); + inet_ntop(AF_INET, &(p->sockAddr.sin_addr), str_ip, len); + } + +#ifdef SUPPORT_IPv6 + if( p->proto == PROTO_UDPv6 ) + { + inet_ntop(AF_INET6, &(p->sockAddr6.sin6_addr), str_ip, len); + } +#endif +} + +int getSockUdpPort(sock_udp_t *p) +{ + assert( p != NULL ); + + if( p->proto == PROTO_UDPv4 ) + { + return htons(p->sockAddr.sin_port); + } + +#ifdef SUPPORT_IPv6 + if( p->proto == PROTO_UDPv6 ) + { + return htons(p->sockAddr6.sin6_port); + } +#endif + + assert( ! "bad proto !" ); + + return -1; +} + + +void closeUdpSocket(sock_udp_t *p) +{ + assert( p != NULL ); + + close(p->sock); + destroySockUdp(p); +} + +#if 0 + +static int myWait(sock_udp_t *p) +{ + fd_set readfds; + fd_set errorfds; + struct timeval tv; + int max_fd; + + tv.tv_sec = 1; + tv.tv_usec = 0; + + FD_ZERO(&readfds); + FD_ZERO(&errorfds); + max_fd = p->sock; + + FD_SET(p->sock, &readfds); + FD_SET(p->sock, &errorfds); + + select(max_fd+1, &readfds, (fd_set *)0, &errorfds, &tv); + + if( FD_ISSET(p->sock, &readfds) ) + { + FD_CLR(p->sock, &readfds); + return 1; + } + + return 0; +} + +int main(int argc, char *argv[]) +{ + sock_udp_t *sock; + char buf[BUFSIZE]; + int ret; + + if( strcmp(argv[1], "s") == 0 ) + { + sock_udp_t *cli; + + //sock = bindUdpSocket("::1", atoi(argv[2]), PROTO_UDPv6 ); + sock = bindUdpSocket("127.0.0.1", atoi(argv[2]), PROTO_UDPv4 ); + + //cli = newSockUdp(PROTO_UDPv6); + cli = newSockUdp(PROTO_UDPv4); + + while(1) + { + while( myWait(sock) == 0 ) + ; + + memset(buf, 0, BUFSIZE); + ret = readUdpSocket(sock, cli, buf, BUFSIZE); + writeUdpSocket(sock, cli, buf, ret); + } + } + + if( strcmp(argv[1], "c") == 0 ) + { + //sock = connectUdpSocket("::1", atoi(argv[2]), PROTO_UDPv6); + sock = connectUdpSocket("127.0.0.1", atoi(argv[2]), PROTO_UDPv4); + + strcpy(buf, "Hello world !\n"); + writeUdpSocket(sock, sock, buf, strlen(buf)); + + memset(buf, 0, BUFSIZE); + readUdpSocket(sock, sock, buf, BUFSIZE); + + printf("buf = %s", buf); + //while(1)sleep(1); + closeUdpSocket(sock); + } + + return 0; +} +#endif + diff --git a/src/net/udp.h b/src/net/udp.h new file mode 100644 index 0000000..a9a38f6 --- /dev/null +++ b/src/net/udp.h @@ -0,0 +1,31 @@ + +#ifndef MY_UDP + +#include + +#define MY_UDP + +#define SUPPORT_IPv6 + +typedef struct struct_sock_udp_t +{ + int sock; + int proto; + +#ifdef SUPPORT_IPv6 + struct sockaddr_in6 sockAddr6; +#endif + struct sockaddr_in sockAddr; +} sock_udp_t; + +extern sock_udp_t* newSockUdp(int proto); +extern void destroySockUdp(sock_udp_t *p); +extern sock_udp_t* bindUdpSocket(char *address, int port, int proto); +extern sock_udp_t* connectUdpSocket(char *address, int port, int proto); +extern int setUdpSockNonBlock(sock_udp_t *p); +extern int readUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len); +extern int writeUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len); +extern void getSockUdpIp(sock_udp_t *p, char *str_ip, int len); +extern int getSockUdpPort(sock_udp_t *p); +extern void closeUdpSocket(sock_udp_t *p); +#endif diff --git a/src/net_sdl/Makefile b/src/net_sdl/Makefile deleted file mode 100644 index f0ffb5b..0000000 --- a/src/net_sdl/Makefile +++ /dev/null @@ -1,9 +0,0 @@ - - -all: sdl_udp.o - -sdl_udp.o: sdl_udp.c sdl_udp.h - $(CC) $(CFLAGS) -o sdl_udp.o -c sdl_udp.c - -clean: - rm -rf *.o diff --git a/src/net_sdl/sdl_udp.c b/src/net_sdl/sdl_udp.c deleted file mode 100644 index f30ba75..0000000 --- a/src/net_sdl/sdl_udp.c +++ /dev/null @@ -1,219 +0,0 @@ - - -#include -#include -#include -#include -#include - -#include "base/main.h" -#include "net_sdl/sdl_udp.h" - -#define BUFSIZE 1000 - - -sock_sdl_udp_t* newSdlSockUdp() -{ - sock_sdl_udp_t *new; - - new = malloc( sizeof(sock_sdl_udp_t) ); - memset(new, 0, sizeof(sock_sdl_udp_t)); - - if( !( new->packet = SDLNet_AllocPacket(512) ) ) - { - fprintf(stderr, "nemozem alokovat pamat pre packet !\n"); - destroySockSdlUdp(new); - } - - return new; -} - -void destroySockSdlUdp(sock_sdl_udp_t *p) -{ - assert( p != NULL ); - - SDLNet_FreePacket(p->packet); - free(p); -} - -sock_sdl_udp_t* bindSdlUdpSocket(int port) -{ - sock_sdl_udp_t *new; - - assert( port > 0 && port < 65535 ); - - new = newSdlSockUdp(); - - assert( new != NULL ); - - if( SDLNet_Init() < 0 ) - { - fprintf(stderr, "nemozem initcializovat SDLnet !\n"); - destroySockSdlUdp(new); - return NULL; - } - - if( !( new->sock = SDLNet_UDP_Open(port) ) ) - { - fprintf(stderr, "nemozem otovrit socket !\n"); - destroySockSdlUdp(new); - return NULL; - } - - new->type = SDL_UDP_SERVER; - - return new; -} - -sock_sdl_udp_t* connectSdlUdpSocket(char *address, int port) -{ - sock_sdl_udp_t *new; - - assert( address != NULL ); - assert( port > 0 && port < 65536 ); - - new = newSdlSockUdp(); - - assert( new != NULL ); - - /* Initialize SDL_net */ - if( SDLNet_Init() < 0 ) - { - fprintf(stderr, "nemozem initcializovat SDLnet !\n"); - destroySockSdlUdp(new); - return NULL; - } - - /* Open a socket on random port */ - if( !( new->sock = SDLNet_UDP_Open(0) ) ) - { - fprintf(stderr, "nemozem otovrit socket !\n"); - destroySockSdlUdp(new); - return NULL; - } - - /* Resolve server name */ - if( SDLNet_ResolveHost(&(new->srvadd), address, port) ) - { - fprintf(stderr, "nemozem sa pripojit na sokcet !\n"); - destroySockSdlUdp(new); - return NULL; - } - - new->type = SDL_UDP_CLIENT; - - return new; -} - -int readSdlUdpSocket(sock_sdl_udp_t *src, sock_sdl_udp_t *dst, void *address, int len) -{ - int x; - - if( SDLNet_UDP_Recv(src->sock, dst->packet) ) - { - x = (dst->packet->len > len ? len : dst->packet->len); - memcpy(address, dst->packet->data, x); - return x; - } - - return -1; -} - -int writeSdlUdpSocket(sock_sdl_udp_t *src, sock_sdl_udp_t *dst, void *address, int len) -{ - assert( src != NULL ); - assert( address != NULL ); - -#ifdef DEBUG_LOST_PACKET - if( rand() % DEBUG_LOST_PACKET == 0 ) - { - printf("debug lost packet %s\n", address); - return size; - } -#endif - - memcpy(dst->packet->data, address, len); - dst->packet->len = len; - - if( src->type == SDL_UDP_CLIENT ) - { - dst->packet->address.host = src->srvadd.host; - dst->packet->address.port = src->srvadd.port; - } - - SDLNet_UDP_Send(src->sock, -1, dst->packet); - - return len; -} - -int getSockSdlUdpPort(sock_sdl_udp_t *p) -{ - assert( p != NULL ); - - return p->packet->address.port; -} - - -void closeSdlUdpSocket(sock_sdl_udp_t *p) -{ - assert( p != NULL ); - - SDLNet_UDP_Close(p->sock); - - printf("close connect\n"); - - destroySockSdlUdp(p); -} - -#if 0 -int main(int argc, char *argv[]) -{ - sock_sdl_udp_t *sock; - char buf[BUFSIZE]; - int ret; - - if( strcmp(argv[1], "s") == 0 ) - { - sock_sdl_udp_t *cli; - - sock = bindSdlUdpSocket( atoi(argv[2]) ); - cli = newSdlSockUdp(); - - while(1) - { - memset(buf, 0, BUFSIZE); - - ret = readSdlUdpSocket(sock, cli, buf, BUFSIZE); - - if( ret > 0 ) - { - writeSdlUdpSocket(sock, cli, buf, ret); - } - } - } - - if( strcmp(argv[1], "c") == 0 ) - { - sock = connectSdlUdpSocket("127.0.0.1", atoi(argv[2])); - - strcpy(buf, "Hello world !\n"); - writeSdlUdpSocket(sock, sock, buf, strlen(buf)); - - while(1) - { - memset(buf, 0, BUFSIZE); - ret = readSdlUdpSocket(sock, sock, buf, BUFSIZE); - - if( ret > 0 ) - { - printf("buf = %s", buf); - } - } - - closeSdlUdpSocket(sock); - } - - return 0; -} - -#endif diff --git a/src/net_sdl/sdl_udp.h b/src/net_sdl/sdl_udp.h deleted file mode 100644 index 91a3c71..0000000 --- a/src/net_sdl/sdl_udp.h +++ /dev/null @@ -1,28 +0,0 @@ - -#ifndef MY_SDL_UDP - -#include - -#define MY_SDL_UDP - -#define SDL_UDP_SERVER 0 -#define SDL_UDP_CLIENT 1 - -typedef struct struct_sock_sdl_udp_t -{ - int type; - UDPsocket sock; - IPaddress srvadd; - UDPpacket *packet; -} sock_sdl_udp_t; - -sock_sdl_udp_t* newSdlSockUdp(); -void destroySockSdlUdp(sock_sdl_udp_t *p); -sock_sdl_udp_t* bindSdlUdpSocket(int port); -sock_sdl_udp_t* connectSdlUdpSocket(char *address, int port); -int readSdlUdpSocket(sock_sdl_udp_t *src, sock_sdl_udp_t *dst, void *address, int len); -int writeSdlUdpSocket(sock_sdl_udp_t *src, sock_sdl_udp_t *dst, void *address, int len); -int getSockSdlUdpPort(sock_sdl_udp_t *p); -void closeSdlUdpSocket(sock_sdl_udp_t *p); - -#endif diff --git a/src/net_unix/Makefile b/src/net_unix/Makefile deleted file mode 100644 index d13af8e..0000000 --- a/src/net_unix/Makefile +++ /dev/null @@ -1,12 +0,0 @@ - - -all: udp.o dns.o - -dns.o: dns.c dns.h - $(CC) $(CFLAGS) -o dns.o -c dns.c - -udp.o: udp.c udp.h - $(CC) $(CFLAGS) -o udp.o -c udp.c - -clean: - rm -rf *.o diff --git a/src/net_unix/dns.c b/src/net_unix/dns.c deleted file mode 100644 index f4036a2..0000000 --- a/src/net_unix/dns.c +++ /dev/null @@ -1,19 +0,0 @@ - -#include -#include - -#include "base/main.h" - -char* getIPFormDNS(char *domain) -{ - struct hostent *host; - - host = gethostbyname(domain); - - if( host == NULL || host->h_addr_list[0] == NULL ) - { - return NULL; - } - - return strdup( inet_ntoa( * ( (struct in_addr *) host->h_addr_list[0] ) ) ); -} diff --git a/src/net_unix/dns.h b/src/net_unix/dns.h deleted file mode 100644 index ae92c35..0000000 --- a/src/net_unix/dns.h +++ /dev/null @@ -1,8 +0,0 @@ - -#ifndef DNS_H - -#define DNS_H - -extern char* getIPFormDNS(char *domain); - -#endif diff --git a/src/net_unix/udp.c b/src/net_unix/udp.c deleted file mode 100644 index 13cb916..0000000 --- a/src/net_unix/udp.c +++ /dev/null @@ -1,374 +0,0 @@ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define BUFSIZE 1000 - -#include "base/main.h" -#include "base/net_multiplayer.h" - -#include "net_unix/udp.h" - -sock_udp_t* newSockUdp(int proto) -{ - sock_udp_t *new; - - new = malloc( sizeof(sock_udp_t) ); - memset(new, 0, sizeof(sock_udp_t)); - new->proto = proto; - - return new; -} - -void destroySockUdp(sock_udp_t *p) -{ - assert( p != NULL ); - free(p); -} - -sock_udp_t* bindUdpSocket(char *address, int port, int proto) -{ - sock_udp_t *new; - int res; - - assert( port > 0 && port < 65535 ); - - new = newSockUdp(proto); - - assert( new != NULL ); - - if( new->proto == PROTO_UDPv4 ) - { - new->sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - } - -#ifdef SUPPORT_IPv6 - if( new->proto == PROTO_UDPv6 ) - { - new->sock = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); - } -#endif - - if( new->sock < 0 ) - { - fprintf(stderr, "nemozem vytvorit socket !\n"); - destroySockUdp(new); - return NULL; - } - - memset(&(new->sockAddr), 0, sizeof(new->sockAddr)); - - if( new->proto == PROTO_UDPv4 ) - { - new->sockAddr.sin_family = AF_INET; - new->sockAddr.sin_port = htons(port); - new->sockAddr.sin_addr.s_addr = inet_addr(address); - - res = bind(new->sock, (struct sockaddr *)&(new->sockAddr), sizeof(new->sockAddr)); - } - -#ifdef SUPPORT_IPv6 - if( new->proto == PROTO_UDPv6 ) - { - new->sockAddr6.sin6_family = AF_INET6; - new->sockAddr6.sin6_port = htons(port); - inet_pton(AF_INET6, address, &(new->sockAddr6.sin6_addr)); - - res = bind(new->sock, (struct sockaddr *)&(new->sockAddr6), sizeof(new->sockAddr6)); - } -#endif - - if( res < 0 ) - { - fprintf(stderr, "nemozem nastavit sokcet %s %d !\n", address, port); - destroySockUdp(new); - return NULL; - } - - return new; -} - -sock_udp_t* connectUdpSocket(char *address, int port, int proto) -{ - sock_udp_t *new; - - assert( address != NULL ); - assert( port > 0 && port < 65536 ); - - new = newSockUdp(proto); - - assert( new != NULL ); - - if( new->proto == PROTO_UDPv4 ) - { - new->sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - } - -#ifdef SUPPORT_IPv6 - if( new->proto == PROTO_UDPv6 ) - { - new->sock = socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); - } -#endif - - if( new->sock < 0 ) - { - fprintf(stderr, "nemozem vytvorit socket !\n"); - destroySockUdp(new); - return NULL; - } - - memset(&(new->sockAddr), 0, sizeof(new->sockAddr)); - - if( new->proto == PROTO_UDPv4 ) - { - new->sockAddr.sin_family = AF_INET; - new->sockAddr.sin_port = htons(port); - new->sockAddr.sin_addr.s_addr = inet_addr(address); - } - -#ifdef SUPPORT_IPv6 - if( new->proto == PROTO_UDPv6 ) - { - new->sockAddr6.sin6_family = AF_INET6; - new->sockAddr6.sin6_port = htons(port); - inet_pton(AF_INET6, address, &(new->sockAddr6.sin6_addr)); - } -#endif - return new; -} - -int setUdpSockNonBlock(sock_udp_t *p) -{ - int oldFlag; - - oldFlag = fcntl (p->sock, F_GETFL, 0); - - if( fcntl(p->sock, F_SETFL, oldFlag|O_NONBLOCK ) == -1 ) - { - return -1; - } - - return 0; -} - -int readUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len) -{ - int addrlen; - int size; - - assert( src != NULL ); - assert( dst != NULL ); - assert( address != NULL ); - - if( dst->proto == PROTO_UDPv4 ) - { - addrlen = sizeof(src->sockAddr); - - size = recvfrom(src->sock, address, len, 0, - (struct sockaddr *)&dst->sockAddr, (socklen_t *)&addrlen); - } - -#ifdef SUPPORT_IPv6 - if( dst->proto == PROTO_UDPv6 ) - { - addrlen = sizeof(src->sockAddr6); - - size = recvfrom(src->sock, address, len, 0, - (struct sockaddr *)&dst->sockAddr6, (socklen_t *)&addrlen); - } -#endif - - if( size < 0 ) - { - char str_ip[STR_IP_SIZE]; - - getSockUdpIp(dst, str_ip, STR_IP_SIZE); - - fprintf(stderr, "nemozem zapisat zo socketu %d %s %d!\n", size, str_ip, getSockUdpPort(dst)); - return -1; - } - - return size; -} - -int writeUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len) -{ - int addrlen; - int size; - - assert( src != NULL ); - assert( dst != NULL ); - assert( address != NULL ); - - if( dst->proto == PROTO_UDPv4 ) - { - addrlen = sizeof(src->sockAddr); - - size = sendto(src->sock, address, len, 0, - (struct sockaddr *)&dst->sockAddr, (socklen_t)addrlen); - } - -#ifdef SUPPORT_IPv6 - if( dst->proto == PROTO_UDPv6 ) - { - addrlen = sizeof(src->sockAddr6); - - size = sendto(src->sock, address, len, 0, - (struct sockaddr *)&dst->sockAddr6, (socklen_t)addrlen); - } -#endif - - if( size < 0 ) - { - char str_ip[STR_IP_SIZE]; - - getSockUdpIp(dst, str_ip, STR_IP_SIZE); - - fprintf(stderr, "nemozem zapisat na socket %d %s %d!\n", size, str_ip, getSockUdpPort(dst)); - return -1; - } - - return size; -} - -void getSockUdpIp(sock_udp_t *p, char *str_ip, int len) -{ - assert( p != NULL ); - assert( str_ip != NULL ); - - - if( p->proto == PROTO_UDPv4 ) - { - //strcpy(str_ip, inet_ntoa(p->sockAddr.sin_addr)); - //printf("strcpy(str_ip, inet_ntoa(p->sockAddr.sin_addr));\n"); - inet_ntop(AF_INET, &(p->sockAddr.sin_addr), str_ip, len); - } - -#ifdef SUPPORT_IPv6 - if( p->proto == PROTO_UDPv6 ) - { - inet_ntop(AF_INET6, &(p->sockAddr6.sin6_addr), str_ip, len); - } -#endif -} - -int getSockUdpPort(sock_udp_t *p) -{ - assert( p != NULL ); - - if( p->proto == PROTO_UDPv4 ) - { - return htons(p->sockAddr.sin_port); - } - -#ifdef SUPPORT_IPv6 - if( p->proto == PROTO_UDPv6 ) - { - return htons(p->sockAddr6.sin6_port); - } -#endif - - assert( ! "bad proto !" ); - - return -1; -} - - -void closeUdpSocket(sock_udp_t *p) -{ - assert( p != NULL ); - - close(p->sock); - destroySockUdp(p); -} - -#if 0 - -static int myWait(sock_udp_t *p) -{ - fd_set readfds; - fd_set errorfds; - struct timeval tv; - int max_fd; - - tv.tv_sec = 1; - tv.tv_usec = 0; - - FD_ZERO(&readfds); - FD_ZERO(&errorfds); - max_fd = p->sock; - - FD_SET(p->sock, &readfds); - FD_SET(p->sock, &errorfds); - - select(max_fd+1, &readfds, (fd_set *)0, &errorfds, &tv); - - if( FD_ISSET(p->sock, &readfds) ) - { - FD_CLR(p->sock, &readfds); - return 1; - } - - return 0; -} - -int main(int argc, char *argv[]) -{ - sock_udp_t *sock; - char buf[BUFSIZE]; - int ret; - - if( strcmp(argv[1], "s") == 0 ) - { - sock_udp_t *cli; - - //sock = bindUdpSocket("::1", atoi(argv[2]), PROTO_UDPv6 ); - sock = bindUdpSocket("127.0.0.1", atoi(argv[2]), PROTO_UDPv4 ); - - //cli = newSockUdp(PROTO_UDPv6); - cli = newSockUdp(PROTO_UDPv4); - - while(1) - { - while( myWait(sock) == 0 ) - ; - - memset(buf, 0, BUFSIZE); - ret = readUdpSocket(sock, cli, buf, BUFSIZE); - writeUdpSocket(sock, cli, buf, ret); - } - } - - if( strcmp(argv[1], "c") == 0 ) - { - //sock = connectUdpSocket("::1", atoi(argv[2]), PROTO_UDPv6); - sock = connectUdpSocket("127.0.0.1", atoi(argv[2]), PROTO_UDPv4); - - strcpy(buf, "Hello world !\n"); - writeUdpSocket(sock, sock, buf, strlen(buf)); - - memset(buf, 0, BUFSIZE); - readUdpSocket(sock, sock, buf, BUFSIZE); - - printf("buf = %s", buf); - //while(1)sleep(1); - closeUdpSocket(sock); - } - - return 0; -} -#endif - diff --git a/src/net_unix/udp.h b/src/net_unix/udp.h deleted file mode 100644 index a9a38f6..0000000 --- a/src/net_unix/udp.h +++ /dev/null @@ -1,31 +0,0 @@ - -#ifndef MY_UDP - -#include - -#define MY_UDP - -#define SUPPORT_IPv6 - -typedef struct struct_sock_udp_t -{ - int sock; - int proto; - -#ifdef SUPPORT_IPv6 - struct sockaddr_in6 sockAddr6; -#endif - struct sockaddr_in sockAddr; -} sock_udp_t; - -extern sock_udp_t* newSockUdp(int proto); -extern void destroySockUdp(sock_udp_t *p); -extern sock_udp_t* bindUdpSocket(char *address, int port, int proto); -extern sock_udp_t* connectUdpSocket(char *address, int port, int proto); -extern int setUdpSockNonBlock(sock_udp_t *p); -extern int readUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len); -extern int writeUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len); -extern void getSockUdpIp(sock_udp_t *p, char *str_ip, int len); -extern int getSockUdpPort(sock_udp_t *p); -extern void closeUdpSocket(sock_udp_t *p); -#endif diff --git a/src/screen/Makefile b/src/screen/Makefile deleted file mode 100644 index 32fb758..0000000 --- a/src/screen/Makefile +++ /dev/null @@ -1,31 +0,0 @@ - -all: screen_analyze.o screen_browser.o screen_credits.o screen_gameType.o screen_choiceArena.o screen_mainMenu.o screen_setting.o screen_table.o screen_world.o - -screen_analyze.o: screen_analyze.c screen_analyze.h - $(CC) $(CFLAGS) -o screen_analyze.o -c screen_analyze.c - -screen_browser.o: screen_browser.c screen_browser.h - $(CC) $(CFLAGS) -o screen_browser.o -c screen_browser.c - -screen_credits.o: screen_credits.c screen_credits.h - $(CC) $(CFLAGS) -o screen_credits.o -c screen_credits.c - -screen_gameType.o: screen_gameType.c screen_gameType.h - $(CC) $(CFLAGS) -o screen_gameType.o -c screen_gameType.c - -screen_mainMenu.o: screen_mainMenu.c screen_mainMenu.h - $(CC) $(CFLAGS) -o screen_mainMenu.o -c screen_mainMenu.c - -screen_setting.o: screen_setting.c screen_setting.h - $(CC) $(CFLAGS) -o screen_setting.o -c screen_setting.c - -screen_table.o: screen_table.c screen_table.h - $(CC) $(CFLAGS) -o screen_table.o -c screen_table.c - -screen_world.o: screen_world.c screen_world.h - $(CC) $(CFLAGS) -o screen_world.o -c screen_world.c - -clean: - rm -rf *.o - - diff --git a/src/screen/screen_analyze.c b/src/screen/screen_analyze.c index c1b8258..9299c7b 100644 --- a/src/screen/screen_analyze.c +++ b/src/screen/screen_analyze.c @@ -3,23 +3,23 @@ #include #include -#include "base/main.h" -#include "base/list.h" +#include "main.h" +#include "list.h" -#include "client/interface.h" -#include "client/screen.h" -#include "client/image.h" +#include "interface.h" +#include "screen.h" +#include "image.h" #ifndef NO_SOUND -#include "audio/music.h" +#include "music.h" #endif -#include "screen/screen_mainMenu.h" -#include "screen/screen_analyze.h" +#include "screen_mainMenu.h" +#include "screen_analyze.h" -#include "widget/widget_label.h" -#include "widget/widget_button.h" -#include "widget/widget_image.h" +#include "widget_label.h" +#include "widget_button.h" +#include "widget_image.h" static widget_image_t *image_backgorund; diff --git a/src/screen/screen_analyze.h b/src/screen/screen_analyze.h index b6a9875..7404da6 100644 --- a/src/screen/screen_analyze.h +++ b/src/screen/screen_analyze.h @@ -3,7 +3,7 @@ #define SCREEN_ANALYZE_H -#include "base/main.h" +#include "main.h" typedef struct analyze_struct { diff --git a/src/screen/screen_browser.c b/src/screen/screen_browser.c index 5d99cf7..531047c 100644 --- a/src/screen/screen_browser.c +++ b/src/screen/screen_browser.c @@ -3,16 +3,16 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/textFile.h" -#include "base/homeDirector.h" -#include "base/net_multiplayer.h" +#include "main.h" +#include "list.h" +#include "textFile.h" +#include "homeDirector.h" +#include "net_multiplayer.h" -#include "client/language.h" -#include "client/interface.h" -#include "client/screen.h" -#include "client/image.h" +#include "language.h" +#include "interface.h" +#include "screen.h" +#include "image.h" #ifdef SUPPORT_NET_UNIX_UDP #include @@ -25,23 +25,23 @@ #include #include -#include "net_unix/udp.h" -#include "net_unix/dns.h" +#include "udp.h" +#include "dns.h" extern int errno; #endif #ifndef NO_SOUND -#include "audio/music.h" +#include "music.h" #endif -#include "screen/screen_gameType.h" -#include "screen/screen_browser.h" +#include "screen_gameType.h" +#include "screen_browser.h" -#include "widget/widget_image.h" -#include "widget/widget_label.h" -#include "widget/widget_button.h" -#include "widget/widget_select.h" +#include "widget_image.h" +#include "widget_label.h" +#include "widget_button.h" +#include "widget_select.h" #define SERVER_TIMEOUT 200 diff --git a/src/screen/screen_choiceArena.c b/src/screen/screen_choiceArena.c index 629f1ba..cd61c9c 100644 --- a/src/screen/screen_choiceArena.c +++ b/src/screen/screen_choiceArena.c @@ -2,26 +2,26 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/arenaFile.h" +#include "main.h" +#include "list.h" +#include "arenaFile.h" -#include "client/language.h" -#include "client/interface.h" -#include "client/screen.h" -#include "client/image.h" +#include "language.h" +#include "interface.h" +#include "screen.h" +#include "image.h" #ifndef NO_SOUND -#include "audio/music.h" +#include "music.h" #endif -#include "screen/screen_mainMenu.h" -#include "screen/screen_choiceArena.h" +#include "screen_mainMenu.h" +#include "screen_choiceArena.h" -#include "widget/widget_label.h" -#include "widget/widget_button.h" -#include "widget/widget_image.h" -#include "widget/widget_buttonimage.h" +#include "widget_label.h" +#include "widget_button.h" +#include "widget_image.h" +#include "widget_buttonimage.h" static widget_image_t *image_backgorund; diff --git a/src/screen/screen_choiceArena.h b/src/screen/screen_choiceArena.h index 0437aa1..73a8197 100644 --- a/src/screen/screen_choiceArena.h +++ b/src/screen/screen_choiceArena.h @@ -3,7 +3,7 @@ #define SCREEN_CHOICE_ARENA -#include "base/main.h" +#include "main.h" #define SCREENSHOT_ARENA_WIDTH 160 #define SCREENSHOT_ARENA_HEIGHT 107 diff --git a/src/screen/screen_credits.c b/src/screen/screen_credits.c index 3f6cf84..6104efb 100644 --- a/src/screen/screen_credits.c +++ b/src/screen/screen_credits.c @@ -2,24 +2,24 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/textFile.h" +#include "main.h" +#include "list.h" +#include "textFile.h" -#include "client/language.h" -#include "client/interface.h" -#include "client/screen.h" -#include "client/image.h" +#include "language.h" +#include "interface.h" +#include "screen.h" +#include "image.h" #ifndef NO_SOUND -#include "audio/music.h" +#include "music.h" #endif -#include "screen/screen_credits.h" +#include "screen_credits.h" -#include "widget/widget_image.h" -#include "widget/widget_label.h" -#include "widget/widget_button.h" +#include "widget_image.h" +#include "widget_label.h" +#include "widget_button.h" static widget_image_t *image_backgorund; static widget_button_t *button_back; diff --git a/src/screen/screen_gameType.c b/src/screen/screen_gameType.c index d54d63a..e512b28 100644 --- a/src/screen/screen_gameType.c +++ b/src/screen/screen_gameType.c @@ -3,28 +3,28 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/net_multiplayer.h" -#include "base/tux.h" +#include "main.h" +#include "list.h" +#include "net_multiplayer.h" +#include "tux.h" -#include "client/language.h" -#include "client/interface.h" -#include "client/screen.h" -#include "client/image.h" +#include "language.h" +#include "interface.h" +#include "screen.h" +#include "image.h" #ifndef NO_SOUND -#include "audio/music.h" +#include "music.h" #endif -#include "screen/screen_gameType.h" -#include "screen/screen_setting.h" +#include "screen_gameType.h" +#include "screen_setting.h" -#include "widget/widget_label.h" -#include "widget/widget_button.h" -#include "widget/widget_image.h" -#include "widget/widget_textfield.h" -#include "widget/widget_check.h" +#include "widget_label.h" +#include "widget_button.h" +#include "widget_image.h" +#include "widget_textfield.h" +#include "widget_check.h" static widget_image_t *image_backgorund; diff --git a/src/screen/screen_gameType.h b/src/screen/screen_gameType.h index 02e2338..1d9b734 100644 --- a/src/screen/screen_gameType.h +++ b/src/screen/screen_gameType.h @@ -3,7 +3,7 @@ #define SCREEN_GAME_TYPE -#include "base/main.h" +#include "main.h" extern void drawScreenGameType(); extern void eventScreenGameType(); diff --git a/src/screen/screen_mainMenu.c b/src/screen/screen_mainMenu.c index bd3886f..024d3bd 100644 --- a/src/screen/screen_mainMenu.c +++ b/src/screen/screen_mainMenu.c @@ -2,26 +2,26 @@ #include #include -#include "base/main.h" +#include "main.h" -#include "client/game.h" -#include "client/interface.h" -#include "client/language.h" -#include "client/screen.h" -#include "client/image.h" +#include "game.h" +#include "interface.h" +#include "language.h" +#include "screen.h" +#include "image.h" #ifndef NO_SOUND -#include "audio/music.h" +#include "music.h" #endif -#include "screen/screen_mainMenu.h" -#include "screen/screen_setting.h" +#include "screen_mainMenu.h" +#include "screen_setting.h" -#include "widget/widget_label.h" -#include "widget/widget_button.h" -#include "widget/widget_textfield.h" -#include "widget/widget_check.h" -#include "widget/widget_image.h" +#include "widget_label.h" +#include "widget_button.h" +#include "widget_textfield.h" +#include "widget_check.h" +#include "widget_image.h" static widget_image_t *image_backgorund; diff --git a/src/screen/screen_mainMenu.h b/src/screen/screen_mainMenu.h index c04e65f..909e541 100644 --- a/src/screen/screen_mainMenu.h +++ b/src/screen/screen_mainMenu.h @@ -3,7 +3,7 @@ #define SCREEN_MIAN_MENU_H -#include "base/main.h" +#include "main.h" extern void startScreenMainMenu(); extern void drawScreenMainMenu(); diff --git a/src/screen/screen_setting.c b/src/screen/screen_setting.c index 5a7fb29..5dd7fc1 100644 --- a/src/screen/screen_setting.c +++ b/src/screen/screen_setting.c @@ -3,33 +3,33 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/textFile.h" -#include "base/director.h" -#include "base/homeDirector.h" - -#include "client/configFile.h" -#include "client/language.h" -#include "client/interface.h" -#include "client/screen.h" -#include "client/image.h" +#include "main.h" +#include "list.h" +#include "tux.h" +#include "textFile.h" +#include "director.h" +#include "homeDirector.h" + +#include "configFile.h" +#include "language.h" +#include "interface.h" +#include "screen.h" +#include "image.h" #ifndef NO_SOUND -#include "audio/music.h" -#include "audio/sound.h" +#include "music.h" +#include "sound.h" #endif -#include "screen/screen_mainMenu.h" -#include "screen/screen_setting.h" +#include "screen_mainMenu.h" +#include "screen_setting.h" -#include "widget/widget_label.h" -#include "widget/widget_button.h" -#include "widget/widget_image.h" -#include "widget/widget_textfield.h" -#include "widget/widget_check.h" -#include "widget/widget_select.h" +#include "widget_label.h" +#include "widget_button.h" +#include "widget_image.h" +#include "widget_textfield.h" +#include "widget_check.h" +#include "widget_select.h" static widget_image_t *image_backgorund; diff --git a/src/screen/screen_setting.h b/src/screen/screen_setting.h index b9631f8..744e768 100644 --- a/src/screen/screen_setting.h +++ b/src/screen/screen_setting.h @@ -3,7 +3,7 @@ #define SCREEN_SETTING -#include "base/main.h" +#include "main.h" extern void initScreenSetting(); extern void drawScreenSetting(); diff --git a/src/screen/screen_table.c b/src/screen/screen_table.c index df1b7d5..498dc7a 100644 --- a/src/screen/screen_table.c +++ b/src/screen/screen_table.c @@ -3,25 +3,25 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/textFile.h" -#include "base/homeDirector.h" +#include "main.h" +#include "list.h" +#include "textFile.h" +#include "homeDirector.h" -#include "client/language.h" -#include "client/interface.h" -#include "client/screen.h" -#include "client/image.h" +#include "language.h" +#include "interface.h" +#include "screen.h" +#include "image.h" #ifndef NO_SOUND -#include "audio/music.h" +#include "music.h" #endif -#include "screen/screen_table.h" +#include "screen_table.h" -#include "widget/widget_image.h" -#include "widget/widget_label.h" -#include "widget/widget_button.h" +#include "widget_image.h" +#include "widget_label.h" +#include "widget_button.h" static widget_image_t *image_backgorund; static widget_button_t *button_back; diff --git a/src/screen/screen_world.c b/src/screen/screen_world.c index 91820ff..10e9623 100644 --- a/src/screen/screen_world.c +++ b/src/screen/screen_world.c @@ -2,42 +2,42 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/item.h" -#include "base/shot.h" -#include "base/gun.h" -#include "base/myTimer.h" -#include "base/net_multiplayer.h" -#include "base/arena.h" -#include "base/arenaFile.h" -#include "base/proto.h" -#include "base/modules.h" -#include "base/idManager.h" - -#include "client/interface.h" -#include "client/keytable.h" -#include "client/layer.h" -#include "client/image.h" -//#include "client/heightScore.h" -#include "client/term.h" -#include "client/font.h" -#include "client/panel.h" -#include "client/radar.h" +#include "main.h" +#include "list.h" +#include "tux.h" +#include "item.h" +#include "shot.h" +#include "gun.h" +#include "myTimer.h" +#include "net_multiplayer.h" +#include "arena.h" +#include "arenaFile.h" +#include "proto.h" +#include "modules.h" +#include "idManager.h" + +#include "interface.h" +#include "keytable.h" +#include "layer.h" +#include "image.h" +//#include "heightScore.h" +#include "term.h" +#include "font.h" +#include "panel.h" +#include "radar.h" #ifndef NO_SOUND -#include "audio/music.h" -#include "audio/sound.h" +#include "music.h" +#include "sound.h" #endif -#include "client/screen.h" -#include "screen/screen_world.h" -#include "screen/screen_analyze.h" -#include "screen/screen_setting.h" -#include "screen/screen_gameType.h" -#include "screen/screen_choiceArena.h" -#include "screen/screen_table.h" +#include "screen.h" +#include "screen_world.h" +#include "screen_analyze.h" +#include "screen_setting.h" +#include "screen_gameType.h" +#include "screen_choiceArena.h" +#include "screen_table.h" static arena_t *arena; diff --git a/src/screen/screen_world.h b/src/screen/screen_world.h index 270d144..0ba4b41 100644 --- a/src/screen/screen_world.h +++ b/src/screen/screen_world.h @@ -3,10 +3,10 @@ #define SCREEN_WORLD_H -#include "base/main.h" -#include "base/myTimer.h" -#include "base/tux.h" -#include "base/arena.h" +#include "main.h" +#include "myTimer.h" +#include "tux.h" +#include "arena.h" #define TIMER_END_ARENA 5000 #define WORLD_COUNT_ROUND_UNLIMITED -1 diff --git a/src/server/Makefile b/src/server/Makefile deleted file mode 100644 index 41e140e..0000000 --- a/src/server/Makefile +++ /dev/null @@ -1,15 +0,0 @@ - - -all: heightScore.o publicServer.o serverConfigFile.o - -heightScore.o: heightScore.c heightScore.h - $(CC) $(CFLAGS) -o heightScore.o -c heightScore.c - -publicServer.o: publicServer.c publicServer.h - $(CC) $(CFLAGS) -o publicServer.o -c publicServer.c - -serverConfigFile.o: serverConfigFile.c serverConfigFile.h - $(CC) $(CFLAGS) -o serverConfigFile.o -c serverConfigFile.c - -clean: - rm -rf *.o diff --git a/src/server/heightScore.c b/src/server/heightScore.c index f36dcf7..fa7402e 100644 --- a/src/server/heightScore.c +++ b/src/server/heightScore.c @@ -4,10 +4,10 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/textFile.h" -#include "server/heightScore.h" +#include "main.h" +#include "list.h" +#include "textFile.h" +#include "heightScore.h" static textFile_t *textFile; diff --git a/src/server/publicServer.c b/src/server/publicServer.c index d7246a0..b92056c 100644 --- a/src/server/publicServer.c +++ b/src/server/publicServer.c @@ -15,24 +15,24 @@ #include #endif -#include "base/main.h" -#include "base/list.h" -#include "base/tux.h" -#include "base/idManager.h" -#include "base/myTimer.h" -#include "base/arena.h" -#include "base/item.h" -#include "base/shot.h" -#include "base/arenaFile.h" -#include "base/proto.h" -#include "base/modules.h" -#include "base/net_multiplayer.h" - -#include "server/publicServer.h" -#include "server/serverConfigFile.h" -#include "server/heightScore.h" - -#include "net_unix/dns.h" +#include "main.h" +#include "list.h" +#include "tux.h" +#include "idManager.h" +#include "myTimer.h" +#include "arena.h" +#include "item.h" +#include "shot.h" +#include "arenaFile.h" +#include "proto.h" +#include "modules.h" +#include "net_multiplayer.h" + +#include "publicServer.h" +#include "serverConfigFile.h" +#include "heightScore.h" + +#include "dns.h" static int arenaId; static arena_t *arena; diff --git a/src/server/publicServer.h b/src/server/publicServer.h index 111ff9c..7fb22da 100644 --- a/src/server/publicServer.h +++ b/src/server/publicServer.h @@ -3,7 +3,7 @@ #define PUBLIC_SERVER_H -#include "base/arena.h" +#include "arena.h" #define WORLD_COUNT_ROUND_UNLIMITED -1 diff --git a/src/server/serverConfigFile.c b/src/server/serverConfigFile.c index 48d57eb..749bb2d 100644 --- a/src/server/serverConfigFile.c +++ b/src/server/serverConfigFile.c @@ -4,10 +4,10 @@ #include #include -#include "base/main.h" -#include "base/list.h" -#include "base/textFile.h" -#include "server/serverConfigFile.h" +#include "main.h" +#include "list.h" +#include "textFile.h" +#include "serverConfigFile.h" static textFile_t *serverTextFile; diff --git a/src/widget/Makefile b/src/widget/Makefile deleted file mode 100644 index cdb504b..0000000 --- a/src/widget/Makefile +++ /dev/null @@ -1,28 +0,0 @@ - -all: widget_button.o widget_buttonimage.o widget_check.o widget_label.o widget_select.o widget_textfield.o widget_image.o - -widget_button.o: widget_button.c widget_button.h - $(CC) $(CFLAGS) -o widget_button.o -c widget_button.c - -widget_buttonimage.o: widget_buttonimage.c widget_buttonimage.h - $(CC) $(CFLAGS) -o widget_buttonimage.o -c widget_buttonimage.c - -widget_check.o: widget_check.c widget_check.h - $(CC) $(CFLAGS) -o widget_check.o -c widget_check.c - -widget_image.o: widget_image.c widget_image.h - $(CC) $(CFLAGS) -o widget_image.o -c widget_image.c - -widget_label.o: widget_label.c widget_label.h - $(CC) $(CFLAGS) -o widget_label.o -c widget_label.c - -widget_select.o: widget_select.c widget_select.h - $(CC) $(CFLAGS) -o widget_select.o -c widget_select.c - -widget_textfield.o: widget_textfield.c widget_textfield.h - $(CC) $(CFLAGS) -o widget_textfield.o -c widget_textfield.c - -clean: - rm -rf *.o - - diff --git a/src/widget/widget_button.c b/src/widget/widget_button.c index 7f0957b..0bdab86 100644 --- a/src/widget/widget_button.c +++ b/src/widget/widget_button.c @@ -1,11 +1,11 @@ #include -#include "base/main.h" +#include "main.h" -#include "client/interface.h" -#include "client/image.h" -#include "client/font.h" +#include "interface.h" +#include "image.h" +#include "font.h" #include "widget_button.h" diff --git a/src/widget/widget_button.h b/src/widget/widget_button.h index 1662407..5090e55 100644 --- a/src/widget/widget_button.h +++ b/src/widget/widget_button.h @@ -3,7 +3,7 @@ #define WIDGET_BUTTON_H -#include "base/main.h" +#include "main.h" #define WIDGET_BUTTON_TIME 10 diff --git a/src/widget/widget_buttonimage.c b/src/widget/widget_buttonimage.c index 7c59f3b..0b6e961 100644 --- a/src/widget/widget_buttonimage.c +++ b/src/widget/widget_buttonimage.c @@ -1,9 +1,9 @@ #include -#include "base/main.h" -#include "client/interface.h" -#include "client/font.h" -#include "client/image.h" +#include "main.h" +#include "interface.h" +#include "font.h" +#include "image.h" #include "widget_buttonimage.h" widget_buttonimage_t* newWidgetButtonimage(SDL_Surface *image, int x, int y, void (*fce_event)(void *)) diff --git a/src/widget/widget_buttonimage.h b/src/widget/widget_buttonimage.h index d30e5bf..d03423e 100644 --- a/src/widget/widget_buttonimage.h +++ b/src/widget/widget_buttonimage.h @@ -1,7 +1,7 @@ #ifndef WIDGET_BUTTONIMAGE_H -#include "base/main.h" +#include "main.h" #define WIDGET_BUTTONIMAGE_H diff --git a/src/widget/widget_check.c b/src/widget/widget_check.c index feb2414..192ae9b 100644 --- a/src/widget/widget_check.c +++ b/src/widget/widget_check.c @@ -1,8 +1,8 @@ #include -#include "base/main.h" -#include "client/interface.h" -#include "client/image.h" +#include "main.h" +#include "interface.h" +#include "image.h" #include "widget_check.h" widget_check_t* newWidgetCheck(int x, int y, bool_t status, void (*fce_event)(void *)) diff --git a/src/widget/widget_check.h b/src/widget/widget_check.h index 68aecd9..2e3a3a3 100644 --- a/src/widget/widget_check.h +++ b/src/widget/widget_check.h @@ -3,7 +3,7 @@ #define WIDGET_CHECK_H -#include "base/main.h" +#include "main.h" #define WIDGET_CHECK_TIME_SWITCH_STATUS 5 diff --git a/src/widget/widget_image.c b/src/widget/widget_image.c index 5e1b743..6437451 100644 --- a/src/widget/widget_image.c +++ b/src/widget/widget_image.c @@ -2,10 +2,10 @@ #include #include -#include "base/main.h" -#include "client/image.h" -#include "client/interface.h" -#include "client/font.h" +#include "main.h" +#include "image.h" +#include "interface.h" +#include "font.h" #include "widget_image.h" widget_image_t* newWidgetImage(int x, int y, SDL_Surface *image) diff --git a/src/widget/widget_image.h b/src/widget/widget_image.h index 85c98d7..6bb316c 100644 --- a/src/widget/widget_image.h +++ b/src/widget/widget_image.h @@ -3,8 +3,8 @@ #define WIDGET_IMAGE_H -#include "base/main.h" -#include "client/interface.h" +#include "main.h" +#include "interface.h" typedef struct widget_image { diff --git a/src/widget/widget_label.c b/src/widget/widget_label.c index a472784..15dea4d 100644 --- a/src/widget/widget_label.c +++ b/src/widget/widget_label.c @@ -1,9 +1,9 @@ #include -#include "base/main.h" -#include "client/interface.h" -#include "client/font.h" +#include "main.h" +#include "interface.h" +#include "font.h" #include "widget_label.h" widget_label_t* newWidgetLabel(char *text, int x, int y, int bind) diff --git a/src/widget/widget_label.h b/src/widget/widget_label.h index a3bb060..f976bbc 100644 --- a/src/widget/widget_label.h +++ b/src/widget/widget_label.h @@ -3,7 +3,7 @@ #define WIDGET_LABEL_H -#include "base/main.h" +#include "main.h" typedef struct widget_label { diff --git a/src/widget/widget_select.c b/src/widget/widget_select.c index 4d10bc4..35a462b 100644 --- a/src/widget/widget_select.c +++ b/src/widget/widget_select.c @@ -1,8 +1,8 @@ #include -#include "base/main.h" -#include "client/interface.h" -#include "client/font.h" +#include "main.h" +#include "interface.h" +#include "font.h" #include "widget_select.h" /* diff --git a/src/widget/widget_select.h b/src/widget/widget_select.h index 7bbe5c0..a0bb795 100644 --- a/src/widget/widget_select.h +++ b/src/widget/widget_select.h @@ -3,8 +3,8 @@ #define WIDGET_SELECT_H -#include "base/main.h" -#include "base/list.h" +#include "main.h" +#include "list.h" typedef struct widget_select diff --git a/src/widget/widget_textfield.c b/src/widget/widget_textfield.c index f93f298..6b9a6c0 100644 --- a/src/widget/widget_textfield.c +++ b/src/widget/widget_textfield.c @@ -1,9 +1,9 @@ #include -#include "base/main.h" -#include "client/interface.h" -#include "client/font.h" -#include "client/image.h" +#include "main.h" +#include "interface.h" +#include "font.h" +#include "image.h" #include "widget_textfield.h" widget_textfield_t* newWidgetTextfield(char *text, int x, int y) diff --git a/src/widget/widget_textfield.h b/src/widget/widget_textfield.h index 9300bce..1e9517e 100644 --- a/src/widget/widget_textfield.h +++ b/src/widget/widget_textfield.h @@ -3,7 +3,7 @@ #define WIDGET_TEXTFIELD_H -#include "base/main.h" +#include "main.h" #define WIDGET_TEXTFIELD_WIDTH 188 #define WIDGET_TEXTFIELD_HEIGHT 36 diff --git a/tarball-build.sh b/tarball-build.sh deleted file mode 100755 index 102b439..0000000 --- a/tarball-build.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -PROJECT="tuxanci-ng" -DIST_DIR="$PROJECT-svn`cat r`" - -rm -rf $DIST_DIR $DIST_DIR.tar $DIST_DIR.tar.bz2 - -mkdir $DIST_DIR -mkdir $DIST_DIR/image -mkdir $DIST_DIR/font -mkdir $DIST_DIR/arena -mkdir $DIST_DIR/data -mkdir $DIST_DIR/lang -mkdir $DIST_DIR/sound -mkdir $DIST_DIR/music -mkdir $DIST_DIR/include -mkdir $DIST_DIR/src - - -cp image/*.* $DIST_DIR/image -cp font/*.* $DIST_DIR/font -cp arena/*.* $DIST_DIR/arena -cp data/*.* $DIST_DIR/data -cp lang/*.* $DIST_DIR/lang -cp sound/*.* $DIST_DIR/sound -cp music/*.* $DIST_DIR/music -cp include/*.* $DIST_DIR/include -cp src/* $DIST_DIR/src -cp Makefile $DIST_DIR -cp $PROJECT.desktop $DIST_DIR - -tar -cvf $DIST_DIR.tar $DIST_DIR -bzip2 $DIST_DIR.tar diff --git a/tarballbin-build.sh b/tarballbin-build.sh deleted file mode 100755 index c00247f..0000000 --- a/tarballbin-build.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -PROJECT="tuxanci-ng" -DIR="deb" -ARCH="i386" -DIST_DIR="$PROJECT-svn`cat r`-$ARCH-bin" - -rm -rf $DIST_DIR $DIST_DIR.tar $DIST_DIR.tar.bz2 - -mkdir $DIST_DIR - -mkdir $DIST_DIR/image -mkdir $DIST_DIR/font -mkdir $DIST_DIR/arena -mkdir $DIST_DIR/data -mkdir $DIST_DIR/lang -mkdir $DIST_DIR/sound -mkdir $DIST_DIR/music - - -cp image/*.* $DIST_DIR/image -cp font/*.* $DIST_DIR/font -cp arena/*.* $DIST_DIR/arena -cp data/*.* $DIST_DIR/data -cp lang/*.* $DIST_DIR/lang -cp sound/*.* $DIST_DIR/sound -cp music/*.* $DIST_DIR/music -cp src/$PROJECT $DIST_DIR - -tar -cvf $DIST_DIR.tar $DIST_DIR -bzip2 $DIST_DIR.tar diff --git a/tuxanci-ng.desktop b/tuxanci-ng.desktop deleted file mode 100644 index 45ed4b0..0000000 --- a/tuxanci-ng.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=tuxanci-ng -Comment=game tuxanci next generation -Exec=/usr/bin/tuxanci-ng -Terminal=false -Type=Application -Icon=/usr/share/tuxanci-ng/image/tuxanci.png -Encoding=UTF-8 -Categories=Game diff --git a/tuxanci-ng.sh b/tuxanci-ng.sh deleted file mode 100755 index dc8f643..0000000 --- a/tuxanci-ng.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -export LD_LIBRARY_PATH="/usr/debug/lib/" -ldd -u build/tuxanci-ng -ulimit -c unlimited -build/tuxanci-ng -- cgit v1.2.3