diff options
| -rw-r--r-- | CMakeLists.txt | 92 | ||||
| -rw-r--r-- | Makefile | 75 | ||||
| -rwxr-xr-x | build.sh | 31 | ||||
| -rw-r--r-- | cmake/Po.cmake | 54 | ||||
| -rw-r--r-- | cmake_uninstall.cmake.in | 21 | ||||
| -rw-r--r-- | control | 12 | ||||
| -rw-r--r-- | current_config.h | 1 | ||||
| -rw-r--r-- | data/AUTHORS | 0 | ||||
| -rw-r--r-- | data/LICENCE | 345 | ||||
| -rw-r--r-- | data/README.sk (renamed from README.sk) | 0 | ||||
| -rw-r--r-- | data/arena/ba_in_a_captivity_of_8-bit.map (renamed from arena/ba_in_a_captivity_of_8-bit.map) | 4 | ||||
| -rw-r--r-- | data/arena/construction_site.map (renamed from arena/construction_site.map) | 2 | ||||
| -rw-r--r-- | data/arena/for_a_good_night.map (renamed from arena/for_a_good_night.map) | 2 | ||||
| -rw-r--r-- | data/arena/in_a_captivity_of_8-bit.map (renamed from arena/in_a_captivity_of_8-bit.map) | 4 | ||||
| -rw-r--r-- | data/arena/night_workshift.map (renamed from arena/night_workshift.map) | 4 | ||||
| -rwxr-xr-x | data/conf/keytable.conf (renamed from conf/keytable.conf) | 0 | ||||
| -rw-r--r-- | data/conf/server.conf (renamed from server.conf) | 0 | ||||
| -rwxr-xr-x | data/font/DejaVuSans.ttf (renamed from font/DejaVuSans.ttf) | bin | 124884 -> 124884 bytes | |||
| -rw-r--r-- | data/image/ba_in_a_captivity_of_8-bit.png (renamed from image/ba_in_a_captivity_of_8-bit.png) | bin | 9847 -> 9847 bytes | |||
| -rw-r--r-- | data/image/big-explosion.png (renamed from image/big-explosion.png) | bin | 68479 -> 68479 bytes | |||
| -rwxr-xr-x | data/image/bombball.png (renamed from image/bombball.png) | bin | 510 -> 510 bytes | |||
| -rw-r--r-- | data/image/button0.png (renamed from image/button0.png) | bin | 2592 -> 2592 bytes | |||
| -rw-r--r-- | data/image/button1.png (renamed from image/button1.png) | bin | 2956 -> 2956 bytes | |||
| -rw-r--r-- | data/image/check.png (renamed from image/check.png) | bin | 2737 -> 2737 bytes | |||
| -rw-r--r-- | data/image/construction_site.png (renamed from image/construction_site.png) | bin | 69255 -> 69255 bytes | |||
| -rw-r--r-- | data/image/cross.png (renamed from image/cross.png) | bin | 2204 -> 2204 bytes | |||
| -rw-r--r-- | data/image/explosion.png (renamed from image/explosion.png) | bin | 17959 -> 17959 bytes | |||
| -rw-r--r-- | data/image/for_a_good_night.png (renamed from image/for_a_good_night.png) | bin | 69784 -> 69784 bytes | |||
| -rw-r--r-- | data/image/graf.bonus.png (renamed from image/graf.bonus.png) | bin | 1202 -> 1202 bytes | |||
| -rw-r--r-- | data/image/icon.bonus.4x.png (renamed from image/icon.bonus.4x.png) | bin | 590 -> 590 bytes | |||
| -rw-r--r-- | data/image/icon.bonus.ghost.png (renamed from image/icon.bonus.ghost.png) | bin | 502 -> 502 bytes | |||
| -rw-r--r-- | data/image/icon.bonus.hidden.png (renamed from image/icon.bonus.hidden.png) | bin | 940 -> 940 bytes | |||
| -rw-r--r-- | data/image/icon.bonus.shot.png (renamed from image/icon.bonus.shot.png) | bin | 1019 -> 1019 bytes | |||
| -rw-r--r-- | data/image/icon.bonus.speed.png (renamed from image/icon.bonus.speed.png) | bin | 928 -> 928 bytes | |||
| -rw-r--r-- | data/image/icon.bonus.teleport.png (renamed from image/icon.bonus.teleport.png) | bin | 891 -> 891 bytes | |||
| -rwxr-xr-x | data/image/icon.gun.bombball.png (renamed from image/icon.gun.bombball.png) | bin | 1528 -> 1528 bytes | |||
| -rw-r--r-- | data/image/icon.gun.dual.simple.png (renamed from image/icon.gun.dual.simple.png) | bin | 1314 -> 1314 bytes | |||
| -rw-r--r-- | data/image/icon.gun.lasser.png (renamed from image/icon.gun.lasser.png) | bin | 727 -> 727 bytes | |||
| -rw-r--r-- | data/image/icon.gun.mine.png (renamed from image/icon.gun.mine.png) | bin | 1116 -> 1116 bytes | |||
| -rw-r--r-- | data/image/icon.gun.scatter.png (renamed from image/icon.gun.scatter.png) | bin | 869 -> 869 bytes | |||
| -rw-r--r-- | data/image/icon.gun.simple.png (renamed from image/icon.gun.simple.png) | bin | 761 -> 761 bytes | |||
| -rw-r--r-- | data/image/icon.gun.tommy.png (renamed from image/icon.gun.tommy.png) | bin | 1298 -> 1298 bytes | |||
| -rw-r--r-- | data/image/in_a_captivity_of_8-bit.png (renamed from image/in_a_captivity_of_8-bit.png) | bin | 10085 -> 10085 bytes | |||
| -rwxr-xr-x | data/image/item.bombball.png (renamed from image/item.bombball.png) | bin | 3788 -> 3788 bytes | |||
| -rw-r--r-- | data/image/item.bonus.4x.png (renamed from image/item.bonus.4x.png) | bin | 1045 -> 1045 bytes | |||
| -rw-r--r-- | data/image/item.bonus.ghost.png (renamed from image/item.bonus.ghost.png) | bin | 1078 -> 1078 bytes | |||
| -rw-r--r-- | data/image/item.bonus.hidden.png (renamed from image/item.bonus.hidden.png) | bin | 1812 -> 1812 bytes | |||
| -rw-r--r-- | data/image/item.bonus.shot.png (renamed from image/item.bonus.shot.png) | bin | 1687 -> 1687 bytes | |||
| -rw-r--r-- | data/image/item.bonus.speed.png (renamed from image/item.bonus.speed.png) | bin | 1486 -> 1486 bytes | |||
| -rw-r--r-- | data/image/item.bonus.teleport.png (renamed from image/item.bonus.teleport.png) | bin | 1363 -> 1363 bytes | |||
| -rw-r--r-- | data/image/item.dual.png (renamed from image/item.dual.png) | bin | 1944 -> 1944 bytes | |||
| -rw-r--r-- | data/image/item.lasser.png (renamed from image/item.lasser.png) | bin | 1200 -> 1200 bytes | |||
| -rw-r--r-- | data/image/item.mine.png (renamed from image/item.mine.png) | bin | 1612 -> 1612 bytes | |||
| -rw-r--r-- | data/image/item.scatter.png (renamed from image/item.scatter.png) | bin | 1237 -> 1237 bytes | |||
| -rw-r--r-- | data/image/item.tommy.png (renamed from image/item.tommy.png) | bin | 2486 -> 2486 bytes | |||
| -rw-r--r-- | data/image/l1.grow.png (renamed from image/l1.grow.png) | bin | 170671 -> 170671 bytes | |||
| -rw-r--r-- | data/image/l1.hut.png (renamed from image/l1.hut.png) | bin | 65499 -> 65499 bytes | |||
| -rw-r--r-- | data/image/l1.peduncle.png (renamed from image/l1.peduncle.png) | bin | 15239 -> 15239 bytes | |||
| -rw-r--r-- | data/image/l1.tree.png (renamed from image/l1.tree.png) | bin | 66388 -> 66388 bytes | |||
| -rw-r--r-- | data/image/l1.wood.png (renamed from image/l1.wood.png) | bin | 14764 -> 14764 bytes | |||
| -rw-r--r-- | data/image/l2.barel.png (renamed from image/l2.barel.png) | bin | 23817 -> 23817 bytes | |||
| -rw-r--r-- | data/image/l2.nadrz.png (renamed from image/l2.nadrz.png) | bin | 49503 -> 49503 bytes | |||
| -rw-r--r-- | data/image/l2.pitch.png (renamed from image/l2.pitch.png) | bin | 789030 -> 789030 bytes | |||
| -rw-r--r-- | data/image/l2.potrubi.png (renamed from image/l2.potrubi.png) | bin | 47152 -> 47152 bytes | |||
| -rw-r--r-- | data/image/l2.retez.png (renamed from image/l2.retez.png) | bin | 41687 -> 41687 bytes | |||
| -rw-r--r-- | data/image/l2.trubka2.png (renamed from image/l2.trubka2.png) | bin | 4658 -> 4658 bytes | |||
| -rw-r--r-- | data/image/l2.trubka4.png (renamed from image/l2.trubka4.png) | bin | 3892 -> 3892 bytes | |||
| -rw-r--r-- | data/image/l2.trubka6.png (renamed from image/l2.trubka6.png) | bin | 5778 -> 5778 bytes | |||
| -rw-r--r-- | data/image/l2.trubka8.png (renamed from image/l2.trubka8.png) | bin | 5906 -> 5906 bytes | |||
| -rw-r--r-- | data/image/l2.trubky.png (renamed from image/l2.trubky.png) | bin | 15349 -> 15349 bytes | |||
| -rw-r--r-- | data/image/l3.ihlan.png (renamed from image/l3.ihlan.png) | bin | 24543 -> 24543 bytes | |||
| -rw-r--r-- | data/image/l3.kvader1.png (renamed from image/l3.kvader1.png) | bin | 5458 -> 5458 bytes | |||
| -rw-r--r-- | data/image/l3.kvader2.png (renamed from image/l3.kvader2.png) | bin | 18573 -> 18573 bytes | |||
| -rw-r--r-- | data/image/l3.nic.png (renamed from image/l3.nic.png) | bin | 44575 -> 44575 bytes | |||
| -rw-r--r-- | data/image/l3.teleport.png (renamed from image/l3.teleport.png) | bin | 1043 -> 1043 bytes | |||
| -rw-r--r-- | data/image/l4.anim.blikacka.png (renamed from image/l4.anim.blikacka.png) | bin | 4499 -> 4499 bytes | |||
| -rw-r--r-- | data/image/l4.bagr.png (renamed from image/l4.bagr.png) | bin | 38796 -> 38796 bytes | |||
| -rw-r--r-- | data/image/l4.overlay.png (renamed from image/l4.overlay.png) | bin | 69708 -> 69708 bytes | |||
| -rw-r--r-- | data/image/l4.palety.png (renamed from image/l4.palety.png) | bin | 30513 -> 30513 bytes | |||
| -rw-r--r-- | data/image/l4.pozadi.png (renamed from image/l4.pozadi.png) | bin | 773685 -> 773685 bytes | |||
| -rw-r--r-- | data/image/l4.pytle.png (renamed from image/l4.pytle.png) | bin | 15128 -> 15128 bytes | |||
| -rw-r--r-- | data/image/l4.tvarnice.png (renamed from image/l4.tvarnice.png) | bin | 8289 -> 8289 bytes | |||
| -rw-r--r-- | data/image/lasserX.png (renamed from image/lasserX.png) | bin | 167 -> 167 bytes | |||
| -rw-r--r-- | data/image/lasserY.png (renamed from image/lasserY.png) | bin | 163 -> 163 bytes | |||
| -rw-r--r-- | data/image/level4.png (renamed from image/level4.png) | bin | 41126 -> 41126 bytes | |||
| -rw-r--r-- | data/image/mine.png (renamed from image/mine.png) | bin | 697 -> 697 bytes | |||
| -rw-r--r-- | data/image/naboj.png (renamed from image/naboj.png) | bin | 139 -> 139 bytes | |||
| -rw-r--r-- | data/image/night_workshift.png (renamed from image/night_workshift.png) | bin | 42982 -> 42982 bytes | |||
| -rw-r--r-- | data/image/panel.png (renamed from image/panel.png) | bin | 11260 -> 11260 bytes | |||
| -rw-r--r-- | data/image/panel_shot.png (renamed from image/panel_shot.png) | bin | 139 -> 139 bytes | |||
| -rw-r--r-- | data/image/pokus.png (renamed from image/pokus.png) | bin | 223 -> 223 bytes | |||
| -rw-r--r-- | data/image/radar.png (renamed from image/radar.png) | bin | 314 -> 314 bytes | |||
| -rw-r--r-- | data/image/screen_main.png (renamed from image/screen_main.png) | bin | 129909 -> 129909 bytes | |||
| -rw-r--r-- | data/image/screen_table.png (renamed from image/screen_table.png) | bin | 170783 -> 170783 bytes | |||
| -rw-r--r-- | data/image/shot.png (renamed from image/shot.png) | bin | 123 -> 123 bytes | |||
| -rw-r--r-- | data/image/textfield0.png (renamed from image/textfield0.png) | bin | 2661 -> 2661 bytes | |||
| -rw-r--r-- | data/image/textfield1.png (renamed from image/textfield1.png) | bin | 3594 -> 3594 bytes | |||
| -rw-r--r-- | data/image/tux2.png (renamed from image/tux2.png) | bin | 28339 -> 28339 bytes | |||
| -rw-r--r-- | data/image/tux4.png (renamed from image/tux4.png) | bin | 12596 -> 12596 bytes | |||
| -rw-r--r-- | data/image/tux6.png (renamed from image/tux6.png) | bin | 22249 -> 22249 bytes | |||
| -rw-r--r-- | data/image/tux8.png (renamed from image/tux8.png) | bin | 16558 -> 16558 bytes | |||
| -rw-r--r-- | data/image/tuxanci.png (renamed from image/tuxanci.png) | bin | 1697 -> 1697 bytes | |||
| -rw-r--r-- | data/lang/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | data/lang/cs.lang (renamed from lang/cs.lang) | 0 | ||||
| -rw-r--r-- | data/lang/en.lang (renamed from lang/en.lang) | 0 | ||||
| -rw-r--r-- | data/lang/fr.lang (renamed from lang/fr.lang) | 0 | ||||
| -rw-r--r-- | data/lang/sk.lang (renamed from lang/sk.lang) | 0 | ||||
| -rw-r--r-- | data/music/for_a_good_night.ogg (renamed from music/for_a_good_night.ogg) | bin | 319720 -> 319720 bytes | |||
| -rw-r--r-- | data/music/in_a_captivity_of_8-bit.ogg (renamed from music/in_a_captivity_of_8-bit.ogg) | bin | 129990 -> 129990 bytes | |||
| -rw-r--r-- | data/music/menu.ogg (renamed from music/menu.ogg) | bin | 140527 -> 140527 bytes | |||
| -rw-r--r-- | data/music/night_workshift.ogg (renamed from music/night_workshift.ogg) | bin | 119222 -> 119222 bytes | |||
| -rw-r--r-- | data/sound/dead.ogg (renamed from sound/dead.ogg) | bin | 17112 -> 17112 bytes | |||
| -rw-r--r-- | data/sound/end.ogg (renamed from sound/end.ogg) | bin | 153633 -> 153633 bytes | |||
| -rw-r--r-- | data/sound/explozion.ogg (renamed from sound/explozion.ogg) | bin | 15987 -> 15987 bytes | |||
| -rw-r--r-- | data/sound/gun2.ogg (renamed from sound/gun2.ogg) | bin | 4789 -> 4789 bytes | |||
| -rw-r--r-- | data/sound/gun_lasser.ogg (renamed from sound/gun_lasser.ogg) | bin | 8348 -> 8348 bytes | |||
| -rw-r--r-- | data/sound/gun_revolver.ogg (renamed from sound/gun_revolver.ogg) | bin | 9460 -> 9460 bytes | |||
| -rw-r--r-- | data/sound/gun_scatter.ogg (renamed from sound/gun_scatter.ogg) | bin | 10303 -> 10303 bytes | |||
| -rw-r--r-- | data/sound/gun_tommy.ogg (renamed from sound/gun_tommy.ogg) | bin | 7441 -> 7441 bytes | |||
| -rw-r--r-- | data/sound/item_bonus.ogg (renamed from sound/item_bonus.ogg) | bin | 7339 -> 7339 bytes | |||
| -rw-r--r-- | data/sound/item_gun.ogg (renamed from sound/item_gun.ogg) | bin | 4604 -> 4604 bytes | |||
| -rw-r--r-- | data/sound/odraz-gun.ogg (renamed from sound/odraz-gun.ogg) | bin | 14901 -> 14901 bytes | |||
| -rw-r--r-- | data/sound/odraz-l.ogg (renamed from sound/odraz-l.ogg) | bin | 13561 -> 13561 bytes | |||
| -rw-r--r-- | data/sound/odraz-r.ogg (renamed from sound/odraz-r.ogg) | bin | 13581 -> 13581 bytes | |||
| -rw-r--r-- | data/sound/put_mine.ogg (renamed from sound/put_mine.ogg) | bin | 5463 -> 5463 bytes | |||
| -rw-r--r-- | data/sound/smrt.ogg (renamed from sound/smrt.ogg) | bin | 8545 -> 8545 bytes | |||
| -rw-r--r-- | data/sound/switch_gun.ogg (renamed from sound/switch_gun.ogg) | bin | 6401 -> 6401 bytes | |||
| -rw-r--r-- | data/sound/teleport.ogg (renamed from sound/teleport.ogg) | bin | 20232 -> 20232 bytes | |||
| -rw-r--r-- | data/sound/tuxanci-smrt.ogg (renamed from sound/tuxanci-smrt.ogg) | bin | 17112 -> 17112 bytes | |||
| -rw-r--r-- | data/tuxanci-ng.desktop (renamed from packaging/deb/tuxanci-ng.desktop) | 0 | ||||
| -rwxr-xr-x | deb-build.sh | 33 | ||||
| -rw-r--r-- | deb_config.h | 3 | ||||
| -rw-r--r-- | include/arena.h | 43 | ||||
| -rw-r--r-- | include/arenaFile.h | 21 | ||||
| -rw-r--r-- | include/audio.h | 12 | ||||
| -rw-r--r-- | include/bool.h | 13 | ||||
| -rwxr-xr-x | include/buffer.h | 24 | ||||
| -rw-r--r-- | include/checkFront.h | 22 | ||||
| -rw-r--r-- | include/client.h | 35 | ||||
| -rw-r--r-- | include/configFile.h | 20 | ||||
| -rw-r--r-- | include/director.h | 18 | ||||
| -rw-r--r-- | include/dynamicInt.h | 10 | ||||
| -rw-r--r-- | include/fake_audio.h | 41 | ||||
| -rwxr-xr-x | include/font.h | 26 | ||||
| -rw-r--r-- | include/game.h | 9 | ||||
| -rw-r--r-- | include/gun.h | 21 | ||||
| -rw-r--r-- | include/hashTable.h | 24 | ||||
| -rw-r--r-- | include/heightScore.h | 13 | ||||
| -rwxr-xr-x | include/homeDirector.h | 13 | ||||
| -rw-r--r-- | include/idManager.h | 19 | ||||
| -rwxr-xr-x | include/image.h | 35 | ||||
| -rwxr-xr-x | include/interface.h | 40 | ||||
| -rw-r--r-- | include/item.h | 79 | ||||
| -rw-r--r-- | include/keytable.h | 27 | ||||
| -rw-r--r-- | include/language.h | 12 | ||||
| -rwxr-xr-x | include/layer.h | 53 | ||||
| -rwxr-xr-x | include/list.h | 33 | ||||
| -rw-r--r-- | include/logFile.h | 18 | ||||
| -rw-r--r-- | include/main.h | 35 | ||||
| -rw-r--r-- | include/modules.h | 78 | ||||
| -rw-r--r-- | include/music.h | 36 | ||||
| -rw-r--r-- | include/myTimer.h | 32 | ||||
| -rw-r--r-- | include/net_multiplayer.h | 35 | ||||
| -rwxr-xr-x | include/network.h | 12 | ||||
| -rw-r--r-- | include/panel.h | 27 | ||||
| -rw-r--r-- | include/path.h | 33 | ||||
| -rw-r--r-- | include/protect.h | 30 | ||||
| -rw-r--r-- | include/proto.h | 89 | ||||
| -rw-r--r-- | include/publicServer.h | 18 | ||||
| -rw-r--r-- | include/screen.h | 32 | ||||
| -rw-r--r-- | include/screen_analyze.h | 25 | ||||
| -rw-r--r-- | include/screen_choiceArena.h | 17 | ||||
| -rw-r--r-- | include/screen_credits.h | 20 | ||||
| -rw-r--r-- | include/screen_gameType.h | 15 | ||||
| -rw-r--r-- | include/screen_mainMenu.h | 13 | ||||
| -rw-r--r-- | include/screen_setting.h | 18 | ||||
| -rw-r--r-- | include/screen_table.h | 17 | ||||
| -rw-r--r-- | include/screen_world.h | 31 | ||||
| -rw-r--r-- | include/sdl_udp.h | 28 | ||||
| -rw-r--r-- | include/server.h | 94 | ||||
| -rw-r--r-- | include/serverConfigFile.h | 11 | ||||
| -rw-r--r-- | include/shot.h | 60 | ||||
| -rw-r--r-- | include/sound.h | 33 | ||||
| -rw-r--r-- | include/space.h | 38 | ||||
| -rw-r--r-- | include/storage.h | 16 | ||||
| -rw-r--r-- | include/string_length.h | 16 | ||||
| -rw-r--r-- | include/tcp.h | 25 | ||||
| -rw-r--r-- | include/term.h | 17 | ||||
| -rwxr-xr-x | include/textFile.h | 21 | ||||
| -rw-r--r-- | include/tux.h | 137 | ||||
| -rw-r--r-- | include/udp.h | 34 | ||||
| -rw-r--r-- | include/widget_button.h | 27 | ||||
| -rw-r--r-- | include/widget_buttonimage.h | 27 | ||||
| -rw-r--r-- | include/widget_check.h | 27 | ||||
| -rw-r--r-- | include/widget_image.h | 21 | ||||
| -rw-r--r-- | include/widget_label.h | 24 | ||||
| -rw-r--r-- | include/widget_select.h | 26 | ||||
| -rw-r--r-- | include/widget_textfield.h | 33 | ||||
| -rwxr-xr-x | modules/Makefile | 28 | ||||
| -rwxr-xr-x | modules/Makefile-publicserver | 24 | ||||
| -rwxr-xr-x | modules/list.c | 241 | ||||
| -rwxr-xr-x | modules/list.h | 33 | ||||
| -rwxr-xr-x | modules/modAI.c | 256 | ||||
| -rwxr-xr-x | modules/modPipe.c | 453 | ||||
| -rwxr-xr-x | modules/modTeleport.c | 506 | ||||
| -rwxr-xr-x | modules/modWall.c | 343 | ||||
| -rw-r--r-- | modules/space.c | 615 | ||||
| -rw-r--r-- | modules/space.h | 38 | ||||
| -rw-r--r-- | packaging/deb/control | 12 | ||||
| -rwxr-xr-x | packaging/deb/deb-build.sh | 41 | ||||
| -rw-r--r-- | packaging/deb/r | 2 | ||||
| -rw-r--r-- | path_config.h | 2 | ||||
| -rwxr-xr-x | publicserver.sh | 5 | ||||
| -rw-r--r-- | r | 1 | ||||
| -rw-r--r-- | readme.txt | 6 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 84 | ||||
| -rw-r--r-- | src/Makefile | 29 | ||||
| -rw-r--r-- | src/Makefile-nosound | 28 | ||||
| -rw-r--r-- | src/Makefile-sdlnet | 29 | ||||
| -rw-r--r-- | src/Makefile-server | 26 | ||||
| -rw-r--r-- | src/audio/Makefile | 17 | ||||
| -rw-r--r-- | src/audio/audio.c | 6 | ||||
| -rw-r--r-- | src/audio/audio.h | 2 | ||||
| -rw-r--r-- | src/audio/music.c | 12 | ||||
| -rw-r--r-- | src/audio/music.h | 2 | ||||
| -rw-r--r-- | src/audio/sound.c | 12 | ||||
| -rw-r--r-- | src/audio/sound.h | 2 | ||||
| -rw-r--r-- | src/base/Makefile | 70 | ||||
| -rw-r--r-- | src/base/arena.c | 20 | ||||
| -rw-r--r-- | src/base/arena.h | 8 | ||||
| -rw-r--r-- | src/base/arenaFile.c | 26 | ||||
| -rw-r--r-- | src/base/arenaFile.h | 4 | ||||
| -rw-r--r-- | src/base/checkFront.c | 12 | ||||
| -rw-r--r-- | src/base/checkFront.h | 4 | ||||
| -rwxr-xr-x | src/base/director.c | 4 | ||||
| -rw-r--r-- | src/base/director.h | 4 | ||||
| -rw-r--r-- | src/base/gun.c | 28 | ||||
| -rwxr-xr-x | src/base/homeDirector.c | 4 | ||||
| -rwxr-xr-x | src/base/homeDirector.h | 2 | ||||
| -rw-r--r-- | src/base/idManager.c | 6 | ||||
| -rw-r--r-- | src/base/idManager.h | 2 | ||||
| -rw-r--r-- | src/base/item.c | 32 | ||||
| -rw-r--r-- | src/base/item.h | 10 | ||||
| -rwxr-xr-x | src/base/list.c | 4 | ||||
| -rwxr-xr-x | src/base/list.h | 2 | ||||
| -rw-r--r-- | src/base/main.c | 8 | ||||
| -rw-r--r-- | src/base/main.h | 8 | ||||
| -rwxr-xr-x | src/base/modules.c | 24 | ||||
| -rw-r--r-- | src/base/modules.h | 12 | ||||
| -rw-r--r-- | src/base/myTimer.c | 8 | ||||
| -rw-r--r-- | src/base/myTimer.h | 4 | ||||
| -rw-r--r-- | src/base/net_multiplayer.c | 26 | ||||
| -rw-r--r-- | src/base/net_multiplayer.h | 8 | ||||
| -rw-r--r-- | src/base/path.h | 6 | ||||
| -rw-r--r-- | src/base/protect.c | 6 | ||||
| -rw-r--r-- | src/base/protect.h | 4 | ||||
| -rw-r--r-- | src/base/proto.c | 48 | ||||
| -rw-r--r-- | src/base/proto.h | 28 | ||||
| -rw-r--r-- | src/base/server.c | 30 | ||||
| -rw-r--r-- | src/base/server.h | 14 | ||||
| -rw-r--r-- | src/base/shot.c | 20 | ||||
| -rw-r--r-- | src/base/shot.h | 10 | ||||
| -rw-r--r-- | src/base/storage.h | 4 | ||||
| -rw-r--r-- | src/base/string_length.h | 2 | ||||
| -rwxr-xr-x | src/base/textFile.c | 4 | ||||
| -rwxr-xr-x | src/base/textFile.h | 2 | ||||
| -rw-r--r-- | src/base/tux.c | 38 | ||||
| -rw-r--r-- | src/base/tux.h | 6 | ||||
| -rw-r--r-- | src/client/Makefile | 38 | ||||
| -rw-r--r-- | src/client/client.c | 20 | ||||
| -rw-r--r-- | src/client/client.h | 2 | ||||
| -rw-r--r-- | src/client/configFile.c | 4 | ||||
| -rw-r--r-- | src/client/configFile.h | 4 | ||||
| -rwxr-xr-x | src/client/font.c | 6 | ||||
| -rwxr-xr-x | src/client/font.h | 2 | ||||
| -rw-r--r-- | src/client/game.c | 60 | ||||
| -rwxr-xr-x | src/client/image.c | 10 | ||||
| -rwxr-xr-x | src/client/image.h | 4 | ||||
| -rwxr-xr-x | src/client/interface.c | 8 | ||||
| -rwxr-xr-x | src/client/interface.h | 2 | ||||
| -rw-r--r-- | src/client/keytable.c | 12 | ||||
| -rw-r--r-- | src/client/language.c | 12 | ||||
| -rwxr-xr-x | src/client/layer.c | 14 | ||||
| -rwxr-xr-x | src/client/layer.h | 2 | ||||
| -rw-r--r-- | src/client/panel.c | 16 | ||||
| -rw-r--r-- | src/client/panel.h | 4 | ||||
| -rw-r--r-- | src/client/radar.c | 16 | ||||
| -rw-r--r-- | src/client/radar.h | 2 | ||||
| -rw-r--r-- | src/client/screen.c | 10 | ||||
| -rw-r--r-- | src/client/screen.h | 2 | ||||
| -rw-r--r-- | src/client/term.c | 12 | ||||
| -rw-r--r-- | src/client/term.h | 2 | ||||
| -rw-r--r-- | src/modules/CMakeLists.txt | 52 | ||||
| -rwxr-xr-x | src/modules/Makefile | 31 | ||||
| -rwxr-xr-x | src/modules/modAI.c | 20 | ||||
| -rwxr-xr-x | src/modules/modPipe.c | 20 | ||||
| -rwxr-xr-x | src/modules/modTeleport.c | 20 | ||||
| -rwxr-xr-x | src/modules/modWall.c | 20 | ||||
| -rw-r--r-- | src/net/dns.c (renamed from src/net_unix/dns.c) | 2 | ||||
| -rw-r--r-- | src/net/dns.h (renamed from src/net_unix/dns.h) | 0 | ||||
| -rw-r--r-- | src/net/udp.c (renamed from src/net_unix/udp.c) | 6 | ||||
| -rw-r--r-- | src/net/udp.h (renamed from src/net_unix/udp.h) | 0 | ||||
| -rw-r--r-- | src/net_sdl/Makefile | 9 | ||||
| -rw-r--r-- | src/net_sdl/sdl_udp.c | 219 | ||||
| -rw-r--r-- | src/net_sdl/sdl_udp.h | 28 | ||||
| -rw-r--r-- | src/net_unix/Makefile | 12 | ||||
| -rw-r--r-- | src/screen/Makefile | 31 | ||||
| -rw-r--r-- | src/screen/screen_analyze.c | 22 | ||||
| -rw-r--r-- | src/screen/screen_analyze.h | 2 | ||||
| -rw-r--r-- | src/screen/screen_browser.c | 36 | ||||
| -rw-r--r-- | src/screen/screen_choiceArena.c | 28 | ||||
| -rw-r--r-- | src/screen/screen_choiceArena.h | 2 | ||||
| -rw-r--r-- | src/screen/screen_credits.c | 24 | ||||
| -rw-r--r-- | src/screen/screen_gameType.c | 32 | ||||
| -rw-r--r-- | src/screen/screen_gameType.h | 2 | ||||
| -rw-r--r-- | src/screen/screen_mainMenu.c | 28 | ||||
| -rw-r--r-- | src/screen/screen_mainMenu.h | 2 | ||||
| -rw-r--r-- | src/screen/screen_setting.c | 44 | ||||
| -rw-r--r-- | src/screen/screen_setting.h | 2 | ||||
| -rw-r--r-- | src/screen/screen_table.c | 26 | ||||
| -rw-r--r-- | src/screen/screen_world.c | 64 | ||||
| -rw-r--r-- | src/screen/screen_world.h | 8 | ||||
| -rw-r--r-- | src/server/Makefile | 15 | ||||
| -rw-r--r-- | src/server/heightScore.c | 8 | ||||
| -rw-r--r-- | src/server/publicServer.c | 36 | ||||
| -rw-r--r-- | src/server/publicServer.h | 2 | ||||
| -rw-r--r-- | src/server/serverConfigFile.c | 8 | ||||
| -rw-r--r-- | src/widget/Makefile | 28 | ||||
| -rw-r--r-- | src/widget/widget_button.c | 8 | ||||
| -rw-r--r-- | src/widget/widget_button.h | 2 | ||||
| -rw-r--r-- | src/widget/widget_buttonimage.c | 8 | ||||
| -rw-r--r-- | src/widget/widget_buttonimage.h | 2 | ||||
| -rw-r--r-- | src/widget/widget_check.c | 6 | ||||
| -rw-r--r-- | src/widget/widget_check.h | 2 | ||||
| -rw-r--r-- | src/widget/widget_image.c | 8 | ||||
| -rw-r--r-- | src/widget/widget_image.h | 4 | ||||
| -rw-r--r-- | src/widget/widget_label.c | 6 | ||||
| -rw-r--r-- | src/widget/widget_label.h | 2 | ||||
| -rw-r--r-- | src/widget/widget_select.c | 6 | ||||
| -rw-r--r-- | src/widget/widget_select.h | 4 | ||||
| -rw-r--r-- | src/widget/widget_textfield.c | 8 | ||||
| -rw-r--r-- | src/widget/widget_textfield.h | 2 | ||||
| -rwxr-xr-x | tarball-build.sh | 33 | ||||
| -rwxr-xr-x | tarballbin-build.sh | 31 | ||||
| -rw-r--r-- | tuxanci-ng.desktop | 9 | ||||
| -rwxr-xr-x | tuxanci-ng.sh | 5 |
346 files changed, 1305 insertions, 6109 deletions
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 "<Compiling SRC>" ) +MESSAGE ( STATUS "<******************************>" ) +ADD_SUBDIRECTORY ( src ) + +#MESSAGE(STATUS "<Compiling Lang>") +#MESSAGE(STATUS "<******************************>") +#ADD_SUBDIRECTORY ( lang ) + +# instalace +# data !TODO +#MESSAGE ( STATUS "<Installing datafiles>" ) +#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/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/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 <dusan.d@centrum.sk> -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 --- /dev/null +++ b/data/AUTHORS 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. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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. + + <signature of Ty Coon>, 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/README.sk b/data/README.sk index c8b65e2..c8b65e2 100644 --- a/README.sk +++ b/data/README.sk diff --git a/arena/ba_in_a_captivity_of_8-bit.map b/data/arena/ba_in_a_captivity_of_8-bit.map index 049fa0b..345916e 100644 --- a/arena/ba_in_a_captivity_of_8-bit.map +++ b/data/arena/ba_in_a_captivity_of_8-bit.map @@ -3,8 +3,8 @@ 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" +loadModule file="libmodWall.so" +loadModule file="libmodTeleport.so" loadMusic file="in_a_captivity_of_8-bit.ogg" name="in_a_captivity_of_8-bit" diff --git a/arena/construction_site.map b/data/arena/construction_site.map index 3422b85..baed284 100644 --- a/arena/construction_site.map +++ b/data/arena/construction_site.map @@ -3,7 +3,7 @@ name construction site netName CS screen construction_site.png -loadModule file="modWall.so" +loadModule file="libmodWall.so" loadMusic file="night_workshift.ogg" name="night_workshift" diff --git a/arena/for_a_good_night.map b/data/arena/for_a_good_night.map index a4f8969..da33cac 100644 --- a/arena/for_a_good_night.map +++ b/data/arena/for_a_good_night.map @@ -3,7 +3,7 @@ name For a good night netName FAGN screen for_a_good_night.png -loadModule file="modWall.so" +loadModule file="libmodWall.so" loadMusic file="for_a_good_night.ogg" name="for_a_good_night" diff --git a/arena/in_a_captivity_of_8-bit.map b/data/arena/in_a_captivity_of_8-bit.map index 3316aef..ca0eca2 100644 --- a/arena/in_a_captivity_of_8-bit.map +++ b/data/arena/in_a_captivity_of_8-bit.map @@ -3,8 +3,8 @@ 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" +loadModule file="libmodWall.so" +loadModule file="libmodTeleport.so" loadMusic file="in_a_captivity_of_8-bit.ogg" name="in_a_captivity_of_8-bit" diff --git a/arena/night_workshift.map b/data/arena/night_workshift.map index 2211665..24282bc 100644 --- a/arena/night_workshift.map +++ b/data/arena/night_workshift.map @@ -3,8 +3,8 @@ name night workshift netName NW screen night_workshift.png -loadModule file="modWall.so" -loadModule file="modPipe.so" +loadModule file="libmodWall.so" +loadModule file="libmodPipe.so" loadMusic file="night_workshift.ogg" name="night_workshift" diff --git a/conf/keytable.conf b/data/conf/keytable.conf index 236b72c..236b72c 100755 --- a/conf/keytable.conf +++ b/data/conf/keytable.conf diff --git a/server.conf b/data/conf/server.conf index e34a73b..e34a73b 100644 --- a/server.conf +++ b/data/conf/server.conf diff --git a/font/DejaVuSans.ttf b/data/font/DejaVuSans.ttf Binary files differindex cc767e6..cc767e6 100755 --- a/font/DejaVuSans.ttf +++ b/data/font/DejaVuSans.ttf diff --git a/image/ba_in_a_captivity_of_8-bit.png b/data/image/ba_in_a_captivity_of_8-bit.png Binary files differindex 4d2158c..4d2158c 100644 --- a/image/ba_in_a_captivity_of_8-bit.png +++ b/data/image/ba_in_a_captivity_of_8-bit.png diff --git a/image/big-explosion.png b/data/image/big-explosion.png Binary files differindex a8d0586..a8d0586 100644 --- a/image/big-explosion.png +++ b/data/image/big-explosion.png diff --git a/image/bombball.png b/data/image/bombball.png Binary files differindex bb3cda7..bb3cda7 100755 --- a/image/bombball.png +++ b/data/image/bombball.png diff --git a/image/button0.png b/data/image/button0.png Binary files differindex 6dde5c6..6dde5c6 100644 --- a/image/button0.png +++ b/data/image/button0.png diff --git a/image/button1.png b/data/image/button1.png Binary files differindex a60f343..a60f343 100644 --- a/image/button1.png +++ b/data/image/button1.png diff --git a/image/check.png b/data/image/check.png Binary files differindex 1d905c5..1d905c5 100644 --- a/image/check.png +++ b/data/image/check.png diff --git a/image/construction_site.png b/data/image/construction_site.png Binary files differindex c6aecc3..c6aecc3 100644 --- a/image/construction_site.png +++ b/data/image/construction_site.png diff --git a/image/cross.png b/data/image/cross.png Binary files differindex 52636ef..52636ef 100644 --- a/image/cross.png +++ b/data/image/cross.png diff --git a/image/explosion.png b/data/image/explosion.png Binary files differindex 6b71c36..6b71c36 100644 --- a/image/explosion.png +++ b/data/image/explosion.png diff --git a/image/for_a_good_night.png b/data/image/for_a_good_night.png Binary files differindex da8e981..da8e981 100644 --- a/image/for_a_good_night.png +++ b/data/image/for_a_good_night.png diff --git a/image/graf.bonus.png b/data/image/graf.bonus.png Binary files differindex 6f195b1..6f195b1 100644 --- a/image/graf.bonus.png +++ b/data/image/graf.bonus.png diff --git a/image/icon.bonus.4x.png b/data/image/icon.bonus.4x.png Binary files differindex cd08e3f..cd08e3f 100644 --- a/image/icon.bonus.4x.png +++ b/data/image/icon.bonus.4x.png diff --git a/image/icon.bonus.ghost.png b/data/image/icon.bonus.ghost.png Binary files differindex ff483f3..ff483f3 100644 --- a/image/icon.bonus.ghost.png +++ b/data/image/icon.bonus.ghost.png diff --git a/image/icon.bonus.hidden.png b/data/image/icon.bonus.hidden.png Binary files differindex dfee367..dfee367 100644 --- a/image/icon.bonus.hidden.png +++ b/data/image/icon.bonus.hidden.png diff --git a/image/icon.bonus.shot.png b/data/image/icon.bonus.shot.png Binary files differindex d10c84f..d10c84f 100644 --- a/image/icon.bonus.shot.png +++ b/data/image/icon.bonus.shot.png diff --git a/image/icon.bonus.speed.png b/data/image/icon.bonus.speed.png Binary files differindex 1179ad6..1179ad6 100644 --- a/image/icon.bonus.speed.png +++ b/data/image/icon.bonus.speed.png diff --git a/image/icon.bonus.teleport.png b/data/image/icon.bonus.teleport.png Binary files differindex 21c1f25..21c1f25 100644 --- a/image/icon.bonus.teleport.png +++ b/data/image/icon.bonus.teleport.png diff --git a/image/icon.gun.bombball.png b/data/image/icon.gun.bombball.png Binary files differindex 65eb972..65eb972 100755 --- a/image/icon.gun.bombball.png +++ b/data/image/icon.gun.bombball.png diff --git a/image/icon.gun.dual.simple.png b/data/image/icon.gun.dual.simple.png Binary files differindex 257c600..257c600 100644 --- a/image/icon.gun.dual.simple.png +++ b/data/image/icon.gun.dual.simple.png diff --git a/image/icon.gun.lasser.png b/data/image/icon.gun.lasser.png Binary files differindex 5942665..5942665 100644 --- a/image/icon.gun.lasser.png +++ b/data/image/icon.gun.lasser.png diff --git a/image/icon.gun.mine.png b/data/image/icon.gun.mine.png Binary files differindex 6af9154..6af9154 100644 --- a/image/icon.gun.mine.png +++ b/data/image/icon.gun.mine.png diff --git a/image/icon.gun.scatter.png b/data/image/icon.gun.scatter.png Binary files differindex 30eb363..30eb363 100644 --- a/image/icon.gun.scatter.png +++ b/data/image/icon.gun.scatter.png diff --git a/image/icon.gun.simple.png b/data/image/icon.gun.simple.png Binary files differindex 0b7b491..0b7b491 100644 --- a/image/icon.gun.simple.png +++ b/data/image/icon.gun.simple.png diff --git a/image/icon.gun.tommy.png b/data/image/icon.gun.tommy.png Binary files differindex dafc7a5..dafc7a5 100644 --- a/image/icon.gun.tommy.png +++ b/data/image/icon.gun.tommy.png diff --git a/image/in_a_captivity_of_8-bit.png b/data/image/in_a_captivity_of_8-bit.png Binary files differindex 922786e..922786e 100644 --- a/image/in_a_captivity_of_8-bit.png +++ b/data/image/in_a_captivity_of_8-bit.png diff --git a/image/item.bombball.png b/data/image/item.bombball.png Binary files differindex d310d8f..d310d8f 100755 --- a/image/item.bombball.png +++ b/data/image/item.bombball.png diff --git a/image/item.bonus.4x.png b/data/image/item.bonus.4x.png Binary files differindex a74241e..a74241e 100644 --- a/image/item.bonus.4x.png +++ b/data/image/item.bonus.4x.png diff --git a/image/item.bonus.ghost.png b/data/image/item.bonus.ghost.png Binary files differindex bee6542..bee6542 100644 --- a/image/item.bonus.ghost.png +++ b/data/image/item.bonus.ghost.png diff --git a/image/item.bonus.hidden.png b/data/image/item.bonus.hidden.png Binary files differindex 3ac96db..3ac96db 100644 --- a/image/item.bonus.hidden.png +++ b/data/image/item.bonus.hidden.png diff --git a/image/item.bonus.shot.png b/data/image/item.bonus.shot.png Binary files differindex c899209..c899209 100644 --- a/image/item.bonus.shot.png +++ b/data/image/item.bonus.shot.png diff --git a/image/item.bonus.speed.png b/data/image/item.bonus.speed.png Binary files differindex d228128..d228128 100644 --- a/image/item.bonus.speed.png +++ b/data/image/item.bonus.speed.png diff --git a/image/item.bonus.teleport.png b/data/image/item.bonus.teleport.png Binary files differindex b2202bf..b2202bf 100644 --- a/image/item.bonus.teleport.png +++ b/data/image/item.bonus.teleport.png diff --git a/image/item.dual.png b/data/image/item.dual.png Binary files differindex 7747ca1..7747ca1 100644 --- a/image/item.dual.png +++ b/data/image/item.dual.png diff --git a/image/item.lasser.png b/data/image/item.lasser.png Binary files differindex d3f7f30..d3f7f30 100644 --- a/image/item.lasser.png +++ b/data/image/item.lasser.png diff --git a/image/item.mine.png b/data/image/item.mine.png Binary files differindex b774d44..b774d44 100644 --- a/image/item.mine.png +++ b/data/image/item.mine.png diff --git a/image/item.scatter.png b/data/image/item.scatter.png Binary files differindex 7568270..7568270 100644 --- a/image/item.scatter.png +++ b/data/image/item.scatter.png diff --git a/image/item.tommy.png b/data/image/item.tommy.png Binary files differindex ca0fd85..ca0fd85 100644 --- a/image/item.tommy.png +++ b/data/image/item.tommy.png diff --git a/image/l1.grow.png b/data/image/l1.grow.png Binary files differindex 14a110e..14a110e 100644 --- a/image/l1.grow.png +++ b/data/image/l1.grow.png diff --git a/image/l1.hut.png b/data/image/l1.hut.png Binary files differindex 7e42da6..7e42da6 100644 --- a/image/l1.hut.png +++ b/data/image/l1.hut.png diff --git a/image/l1.peduncle.png b/data/image/l1.peduncle.png Binary files differindex 258f34c..258f34c 100644 --- a/image/l1.peduncle.png +++ b/data/image/l1.peduncle.png diff --git a/image/l1.tree.png b/data/image/l1.tree.png Binary files differindex 5e3995e..5e3995e 100644 --- a/image/l1.tree.png +++ b/data/image/l1.tree.png diff --git a/image/l1.wood.png b/data/image/l1.wood.png Binary files differindex ae1550a..ae1550a 100644 --- a/image/l1.wood.png +++ b/data/image/l1.wood.png diff --git a/image/l2.barel.png b/data/image/l2.barel.png Binary files differindex 8da54ef..8da54ef 100644 --- a/image/l2.barel.png +++ b/data/image/l2.barel.png diff --git a/image/l2.nadrz.png b/data/image/l2.nadrz.png Binary files differindex 4bc0a42..4bc0a42 100644 --- a/image/l2.nadrz.png +++ b/data/image/l2.nadrz.png diff --git a/image/l2.pitch.png b/data/image/l2.pitch.png Binary files differindex 15150ba..15150ba 100644 --- a/image/l2.pitch.png +++ b/data/image/l2.pitch.png diff --git a/image/l2.potrubi.png b/data/image/l2.potrubi.png Binary files differindex 3afa5ff..3afa5ff 100644 --- a/image/l2.potrubi.png +++ b/data/image/l2.potrubi.png diff --git a/image/l2.retez.png b/data/image/l2.retez.png Binary files differindex c97ea24..c97ea24 100644 --- a/image/l2.retez.png +++ b/data/image/l2.retez.png diff --git a/image/l2.trubka2.png b/data/image/l2.trubka2.png Binary files differindex f874ccc..f874ccc 100644 --- a/image/l2.trubka2.png +++ b/data/image/l2.trubka2.png diff --git a/image/l2.trubka4.png b/data/image/l2.trubka4.png Binary files differindex 7be65d2..7be65d2 100644 --- a/image/l2.trubka4.png +++ b/data/image/l2.trubka4.png diff --git a/image/l2.trubka6.png b/data/image/l2.trubka6.png Binary files differindex 29755ae..29755ae 100644 --- a/image/l2.trubka6.png +++ b/data/image/l2.trubka6.png diff --git a/image/l2.trubka8.png b/data/image/l2.trubka8.png Binary files differindex 6026467..6026467 100644 --- a/image/l2.trubka8.png +++ b/data/image/l2.trubka8.png diff --git a/image/l2.trubky.png b/data/image/l2.trubky.png Binary files differindex 5d405ad..5d405ad 100644 --- a/image/l2.trubky.png +++ b/data/image/l2.trubky.png diff --git a/image/l3.ihlan.png b/data/image/l3.ihlan.png Binary files differindex 20cb373..20cb373 100644 --- a/image/l3.ihlan.png +++ b/data/image/l3.ihlan.png diff --git a/image/l3.kvader1.png b/data/image/l3.kvader1.png Binary files differindex 67973a9..67973a9 100644 --- a/image/l3.kvader1.png +++ b/data/image/l3.kvader1.png diff --git a/image/l3.kvader2.png b/data/image/l3.kvader2.png Binary files differindex d0df146..d0df146 100644 --- a/image/l3.kvader2.png +++ b/data/image/l3.kvader2.png diff --git a/image/l3.nic.png b/data/image/l3.nic.png Binary files differindex 3852007..3852007 100644 --- a/image/l3.nic.png +++ b/data/image/l3.nic.png diff --git a/image/l3.teleport.png b/data/image/l3.teleport.png Binary files differindex f901589..f901589 100644 --- a/image/l3.teleport.png +++ b/data/image/l3.teleport.png diff --git a/image/l4.anim.blikacka.png b/data/image/l4.anim.blikacka.png Binary files differindex da353c6..da353c6 100644 --- a/image/l4.anim.blikacka.png +++ b/data/image/l4.anim.blikacka.png diff --git a/image/l4.bagr.png b/data/image/l4.bagr.png Binary files differindex a9f6a13..a9f6a13 100644 --- a/image/l4.bagr.png +++ b/data/image/l4.bagr.png diff --git a/image/l4.overlay.png b/data/image/l4.overlay.png Binary files differindex a8f8507..a8f8507 100644 --- a/image/l4.overlay.png +++ b/data/image/l4.overlay.png diff --git a/image/l4.palety.png b/data/image/l4.palety.png Binary files differindex 3a3e797..3a3e797 100644 --- a/image/l4.palety.png +++ b/data/image/l4.palety.png diff --git a/image/l4.pozadi.png b/data/image/l4.pozadi.png Binary files differindex 9d9b214..9d9b214 100644 --- a/image/l4.pozadi.png +++ b/data/image/l4.pozadi.png diff --git a/image/l4.pytle.png b/data/image/l4.pytle.png Binary files differindex ea6a1f3..ea6a1f3 100644 --- a/image/l4.pytle.png +++ b/data/image/l4.pytle.png diff --git a/image/l4.tvarnice.png b/data/image/l4.tvarnice.png Binary files differindex 0f2d99a..0f2d99a 100644 --- a/image/l4.tvarnice.png +++ b/data/image/l4.tvarnice.png diff --git a/image/lasserX.png b/data/image/lasserX.png Binary files differindex 191af4d..191af4d 100644 --- a/image/lasserX.png +++ b/data/image/lasserX.png diff --git a/image/lasserY.png b/data/image/lasserY.png Binary files differindex b64a346..b64a346 100644 --- a/image/lasserY.png +++ b/data/image/lasserY.png diff --git a/image/level4.png b/data/image/level4.png Binary files differindex 0136b2b..0136b2b 100644 --- a/image/level4.png +++ b/data/image/level4.png diff --git a/image/mine.png b/data/image/mine.png Binary files differindex 6e8b373..6e8b373 100644 --- a/image/mine.png +++ b/data/image/mine.png diff --git a/image/naboj.png b/data/image/naboj.png Binary files differindex 2985273..2985273 100644 --- a/image/naboj.png +++ b/data/image/naboj.png diff --git a/image/night_workshift.png b/data/image/night_workshift.png Binary files differindex 08f4c42..08f4c42 100644 --- a/image/night_workshift.png +++ b/data/image/night_workshift.png diff --git a/image/panel.png b/data/image/panel.png Binary files differindex 24a8e6c..24a8e6c 100644 --- a/image/panel.png +++ b/data/image/panel.png diff --git a/image/panel_shot.png b/data/image/panel_shot.png Binary files differindex 2985273..2985273 100644 --- a/image/panel_shot.png +++ b/data/image/panel_shot.png diff --git a/image/pokus.png b/data/image/pokus.png Binary files differindex 9e66d2e..9e66d2e 100644 --- a/image/pokus.png +++ b/data/image/pokus.png diff --git a/image/radar.png b/data/image/radar.png Binary files differindex f7d6f62..f7d6f62 100644 --- a/image/radar.png +++ b/data/image/radar.png diff --git a/image/screen_main.png b/data/image/screen_main.png Binary files differindex 9734d1a..9734d1a 100644 --- a/image/screen_main.png +++ b/data/image/screen_main.png diff --git a/image/screen_table.png b/data/image/screen_table.png Binary files differindex 769496e..769496e 100644 --- a/image/screen_table.png +++ b/data/image/screen_table.png diff --git a/image/shot.png b/data/image/shot.png Binary files differindex 3d6ebc7..3d6ebc7 100644 --- a/image/shot.png +++ b/data/image/shot.png diff --git a/image/textfield0.png b/data/image/textfield0.png Binary files differindex f6cc862..f6cc862 100644 --- a/image/textfield0.png +++ b/data/image/textfield0.png diff --git a/image/textfield1.png b/data/image/textfield1.png Binary files differindex 2b0aad8..2b0aad8 100644 --- a/image/textfield1.png +++ b/data/image/textfield1.png diff --git a/image/tux2.png b/data/image/tux2.png Binary files differindex cae602b..cae602b 100644 --- a/image/tux2.png +++ b/data/image/tux2.png diff --git a/image/tux4.png b/data/image/tux4.png Binary files differindex f5e46fb..f5e46fb 100644 --- a/image/tux4.png +++ b/data/image/tux4.png diff --git a/image/tux6.png b/data/image/tux6.png Binary files differindex 286b80a..286b80a 100644 --- a/image/tux6.png +++ b/data/image/tux6.png diff --git a/image/tux8.png b/data/image/tux8.png Binary files differindex cfbf80a..cfbf80a 100644 --- a/image/tux8.png +++ b/data/image/tux8.png diff --git a/image/tuxanci.png b/data/image/tuxanci.png Binary files differindex 34b770b..34b770b 100644 --- a/image/tuxanci.png +++ b/data/image/tuxanci.png 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/lang/cs.lang b/data/lang/cs.lang index 9920dfa..9920dfa 100644 --- a/lang/cs.lang +++ b/data/lang/cs.lang diff --git a/lang/en.lang b/data/lang/en.lang index 2fbfaca..2fbfaca 100644 --- a/lang/en.lang +++ b/data/lang/en.lang diff --git a/lang/fr.lang b/data/lang/fr.lang index 84a1326..84a1326 100644 --- a/lang/fr.lang +++ b/data/lang/fr.lang diff --git a/lang/sk.lang b/data/lang/sk.lang index bd710c4..bd710c4 100644 --- a/lang/sk.lang +++ b/data/lang/sk.lang diff --git a/music/for_a_good_night.ogg b/data/music/for_a_good_night.ogg Binary files differindex 3ce2996..3ce2996 100644 --- a/music/for_a_good_night.ogg +++ b/data/music/for_a_good_night.ogg diff --git a/music/in_a_captivity_of_8-bit.ogg b/data/music/in_a_captivity_of_8-bit.ogg Binary files differindex db8ee5c..db8ee5c 100644 --- a/music/in_a_captivity_of_8-bit.ogg +++ b/data/music/in_a_captivity_of_8-bit.ogg diff --git a/music/menu.ogg b/data/music/menu.ogg Binary files differindex 0866ccb..0866ccb 100644 --- a/music/menu.ogg +++ b/data/music/menu.ogg diff --git a/music/night_workshift.ogg b/data/music/night_workshift.ogg Binary files differindex c5ce5fc..c5ce5fc 100644 --- a/music/night_workshift.ogg +++ b/data/music/night_workshift.ogg diff --git a/sound/dead.ogg b/data/sound/dead.ogg Binary files differindex a78c53a..a78c53a 100644 --- a/sound/dead.ogg +++ b/data/sound/dead.ogg diff --git a/sound/end.ogg b/data/sound/end.ogg Binary files differindex 613265e..613265e 100644 --- a/sound/end.ogg +++ b/data/sound/end.ogg diff --git a/sound/explozion.ogg b/data/sound/explozion.ogg Binary files differindex 6018394..6018394 100644 --- a/sound/explozion.ogg +++ b/data/sound/explozion.ogg diff --git a/sound/gun2.ogg b/data/sound/gun2.ogg Binary files differindex 2a360fd..2a360fd 100644 --- a/sound/gun2.ogg +++ b/data/sound/gun2.ogg diff --git a/sound/gun_lasser.ogg b/data/sound/gun_lasser.ogg Binary files differindex 56a7257..56a7257 100644 --- a/sound/gun_lasser.ogg +++ b/data/sound/gun_lasser.ogg diff --git a/sound/gun_revolver.ogg b/data/sound/gun_revolver.ogg Binary files differindex 3c2ea41..3c2ea41 100644 --- a/sound/gun_revolver.ogg +++ b/data/sound/gun_revolver.ogg diff --git a/sound/gun_scatter.ogg b/data/sound/gun_scatter.ogg Binary files differindex 32c267f..32c267f 100644 --- a/sound/gun_scatter.ogg +++ b/data/sound/gun_scatter.ogg diff --git a/sound/gun_tommy.ogg b/data/sound/gun_tommy.ogg Binary files differindex 79dcefd..79dcefd 100644 --- a/sound/gun_tommy.ogg +++ b/data/sound/gun_tommy.ogg diff --git a/sound/item_bonus.ogg b/data/sound/item_bonus.ogg Binary files differindex c2b8ba8..c2b8ba8 100644 --- a/sound/item_bonus.ogg +++ b/data/sound/item_bonus.ogg diff --git a/sound/item_gun.ogg b/data/sound/item_gun.ogg Binary files differindex 1b749da..1b749da 100644 --- a/sound/item_gun.ogg +++ b/data/sound/item_gun.ogg diff --git a/sound/odraz-gun.ogg b/data/sound/odraz-gun.ogg Binary files differindex c007ae7..c007ae7 100644 --- a/sound/odraz-gun.ogg +++ b/data/sound/odraz-gun.ogg diff --git a/sound/odraz-l.ogg b/data/sound/odraz-l.ogg Binary files differindex 258dbd5..258dbd5 100644 --- a/sound/odraz-l.ogg +++ b/data/sound/odraz-l.ogg diff --git a/sound/odraz-r.ogg b/data/sound/odraz-r.ogg Binary files differindex c885172..c885172 100644 --- a/sound/odraz-r.ogg +++ b/data/sound/odraz-r.ogg diff --git a/sound/put_mine.ogg b/data/sound/put_mine.ogg Binary files differindex b5fa822..b5fa822 100644 --- a/sound/put_mine.ogg +++ b/data/sound/put_mine.ogg diff --git a/sound/smrt.ogg b/data/sound/smrt.ogg Binary files differindex 4981dba..4981dba 100644 --- a/sound/smrt.ogg +++ b/data/sound/smrt.ogg diff --git a/sound/switch_gun.ogg b/data/sound/switch_gun.ogg Binary files differindex e453472..e453472 100644 --- a/sound/switch_gun.ogg +++ b/data/sound/switch_gun.ogg diff --git a/sound/teleport.ogg b/data/sound/teleport.ogg Binary files differindex 1d1ead1..1d1ead1 100644 --- a/sound/teleport.ogg +++ b/data/sound/teleport.ogg diff --git a/sound/tuxanci-smrt.ogg b/data/sound/tuxanci-smrt.ogg Binary files differindex a78c53a..a78c53a 100644 --- a/sound/tuxanci-smrt.ogg +++ b/data/sound/tuxanci-smrt.ogg diff --git a/packaging/deb/tuxanci-ng.desktop b/data/tuxanci-ng.desktop index 45ed4b0..45ed4b0 100644 --- a/packaging/deb/tuxanci-ng.desktop +++ b/data/tuxanci-ng.desktop 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/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 <SDL_ttf.h> -#include <assert.h> -#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 <stdio.h> -#include <string.h> -#include <time.h> - -#include <SDL.h> -#include <SDL_image.h> -#include <SDL_thread.h> -#include "main.h" - -/* -#include <SDL_net.h> -*/ - -#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 <SDL_mixer.h> -#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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.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" - -#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 <SDL_net.h> - -#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 <time.h> - -#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 <SDL_mixer.h> -#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 <netinet/in.h> - -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 <netinet/in.h> - -#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/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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> - -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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.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 "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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.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 "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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.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 "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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.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 "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 <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> - -#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 (x1<x2+w2 && x2<x1+w1 && y1<y2+h2 && y2<y1+h1); -} - -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)) -{ - space_t *new; - int i, j; - - new = malloc( sizeof(space_t) ); - memset(new, 0, sizeof(space_t)); - - new->w = 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/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 <dusan.d@centrum.sk> -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/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 & @@ -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/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 "<Checking for SDL>" ) + 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 "<Building client as requested>" ) + 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 "<Building with audio as requested>" ) + 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 "<Building without audio as requested>" ) + 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 "<Building server as requested>" ) + 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 "<Installing binaries and libraries>" ) +#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 <assert.h> #include <SDL_mixer.h> -#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 <stdlib.h> #include <assert.h> -#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 <SDL_mixer.h> -#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 <stdlib.h> #include <assert.h> -#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 <SDL_mixer.h> -#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 <assert.h> #include <string.h> -#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 <string.h> #include <assert.h> -#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 <string.h> #include <assert.h> -#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 <unistd.h> #include <assert.h> -#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 <stdlib.h> #include <assert.h> -#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 <assert.h> #include <sys/stat.h> -#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 <stdio.h> #include <assert.h> -#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 <stdlib.h> #include <assert.h> -#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 <stdio.h> #include <stdlib.h> 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 <assert.h> #include <sys/stat.h> -#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 <dlfcn.h> #include <assert.h> -#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 <sys/time.h> #include <signal.h> -#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 <assert.h> #include <unistd.h> -#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 <string.h> #include <assert.h> -#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 <string.h> #include <assert.h> -#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 <string.h> #include <assert.h> -#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 <sys/ioctl.h> #include <sys/time.h> -#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 <time.h> -#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 <string.h> #include <assert.h> -#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 <assert.h> #include <unistd.h> -#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 <string.h> #include <assert.h> -#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 <sys/socket.h> #include <sys/select.h> -#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 <string.h> #include <assert.h> -#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 <SDL_ttf.h> #include <assert.h> -#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 <assert.h> #include <sys/stat.h> -#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 <stdlib.h> #include <assert.h> -#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 <stdlib.h> -#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 <SDL.h> #include <SDL_image.h> #include <SDL_thread.h> -#include "base/main.h" +#include "main.h" /* #include <SDL_net.h> 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 <string.h> #include <assert.h> -#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 <string.h> #include <assert.h> -#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 <stdlib.h> #include <assert.h> -#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 <stdio.h> #include <assert.h> -#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 <stdio.h> #include <assert.h> -#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 <stdlib.h> #include <assert.h> -#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 <stdlib.h> #include <assert.h> -#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 <string.h> #include <assert.h> -#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 <string.h> #include <assert.h> -#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 <string.h> #include <assert.h> -#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 <string.h> #include <assert.h> -#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_unix/dns.c b/src/net/dns.c index f4036a2..a8e5030 100644 --- a/src/net_unix/dns.c +++ b/src/net/dns.c @@ -2,7 +2,7 @@ #include <netdb.h> #include <string.h> -#include "base/main.h" +#include "main.h" char* getIPFormDNS(char *domain) { diff --git a/src/net_unix/dns.h b/src/net/dns.h index ae92c35..ae92c35 100644 --- a/src/net_unix/dns.h +++ b/src/net/dns.h diff --git a/src/net_unix/udp.c b/src/net/udp.c index 13cb916..8a0623e 100644 --- a/src/net_unix/udp.c +++ b/src/net/udp.c @@ -16,10 +16,10 @@ #define BUFSIZE 1000 -#include "base/main.h" -#include "base/net_multiplayer.h" +#include "main.h" +#include "net_multiplayer.h" -#include "net_unix/udp.h" +#include "udp.h" sock_udp_t* newSockUdp(int proto) { diff --git a/src/net_unix/udp.h b/src/net/udp.h index a9a38f6..a9a38f6 100644 --- a/src/net_unix/udp.h +++ b/src/net/udp.h 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 <unistd.h> -#include <stdlib.h> -#include <string.h> -#include <stdio.h> -#include <assert.h> - -#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 <SDL_net.h> - -#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/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 <stdlib.h> #include <assert.h> -#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 <stdlib.h> #include <assert.h> -#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 <sys/socket.h> @@ -25,23 +25,23 @@ #include <fcntl.h> #include <errno.h> -#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 <stdio.h> #include <assert.h> -#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 <stdio.h> #include <assert.h> -#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 <stdlib.h> #include <assert.h> -#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 <stdio.h> #include <assert.h> -#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 <stdlib.h> #include <assert.h> -#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 <stdlib.h> #include <assert.h> -#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 <stdio.h> #include <assert.h> -#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 <string.h> #include <assert.h> -#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 <errno.h> #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 <string.h> #include <assert.h> -#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 <stdlib.h> -#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 <stdlib.h> -#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 <stdlib.h> -#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 <stdlib.h> #include <stdlib.h> -#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 <stdlib.h> -#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 <stdlib.h> -#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 <stdlib.h> -#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 |