├── obj ├── BOFH.o ├── Cave.o ├── Door.o ├── Game.o ├── Help.o ├── Hero.o ├── Droid.o ├── Effect.o ├── Fight.o ├── lex.yy.o ├── Ability.o ├── Canister.o ├── Creature.o ├── DressCode.o ├── Equipment.o ├── Implant.o ├── AttackList.o ├── AttackType.o ├── BunkerRooms.o ├── FlavorList.o ├── FloppyDisk.o ├── tablemaker.o └── tablemaker.tab.o ├── bin └── tablemk ├── gfx ├── SDS_6x6.png ├── SDS_8x8.png ├── cp437-8.png ├── prime.ico ├── rltiles.png ├── vapors.png ├── walls.png ├── cp437-14.png ├── cp437-16.png ├── cp437-24.png ├── dejavu-16.png ├── dejavu-20.png ├── dejavu-8.png ├── square-14.png ├── square-16.png ├── square-26.png ├── square-8.png ├── tinyfont.png ├── BrogueFont1.png ├── BrogueFont2.png ├── BrogueFont3.png ├── BrogueFont4.png ├── BrogueFont5.png ├── courier-16.png ├── cp437-wide.png ├── fantasy-16.png ├── fantasy-16s.png ├── fantasy-32.png ├── primetiles.png ├── noteye-logo-dark.png └── license.txt ├── src ├── FloppyDisk.h ├── noteye │ ├── libnoteye.o │ ├── noteye.ico │ ├── noteye-jni.o │ ├── calleri.sh │ ├── noteye.sh │ ├── hydraslayer.sh │ ├── rogue.sh │ ├── noteye.rc │ ├── font.cpp │ ├── process.cpp │ ├── noteye.cpp │ ├── jni_md.h │ ├── libnoteye.cpp │ ├── Makefile.mgw │ ├── Makefile.mgws │ ├── Makefile │ ├── Makefiles │ └── noteye-main.cpp ├── FlavorList.cpp ├── AttackList.cpp ├── ObjectList.cpp ├── lua │ ├── noetolua.sh │ ├── walls-png.lua │ ├── generic.lua │ ├── backward.lua │ ├── game.lua │ ├── crashmenu.lua │ └── tiletest.lua ├── pio │ ├── Makefile │ └── pio.pas ├── MonsterList.cpp ├── Portability.h ├── Implant.h ├── gen │ ├── config.h │ ├── MonsterIlk.h │ └── Flavor.h ├── Weapon.h ├── DressCode.h ├── support │ ├── monstile.pl │ ├── itemtile.pl │ ├── listgen.sh │ └── nevergen.pl ├── Wreck.cpp ├── Equipment.h ├── Scenario.h ├── Game.h ├── Body.h ├── Portability.cpp ├── osx │ ├── macsupport.h │ ├── Info.plist │ └── macsupport.m ├── PointerStore.h ├── MapBuilder.h ├── Menu.h ├── FeatureToggle.h ├── Property.h ├── Services.h ├── CrType.h ├── Scenario.cpp ├── tablemk │ └── tablemaker.l ├── Ability.h ├── Monster.h ├── win32 │ └── pdcurses │ │ └── panel.h ├── Mutant.h ├── Intrinsic.h ├── DressCode.cpp ├── Intrinsic.cpp ├── Distribution.h ├── NCUI.h ├── CrtUI.h ├── NEUI.h ├── Profession.h ├── Implant.cpp ├── Transport.h └── Hero.h ├── lib └── win32 │ ├── noteye │ ├── SDL.dll │ ├── lua51.dll │ ├── noteye.dll │ ├── zlib1.dll │ ├── SDL_image.dll │ ├── SDL_mixer.dll │ ├── SDL_net.dll │ ├── libogg-0.dll │ ├── libvorbis-0.dll │ └── libvorbisfile-3.dll │ ├── sigsegv │ └── libsigsegv.a │ └── pdcurses │ ├── pdcurses.dll │ └── pdcurses.lib ├── data ├── help │ ├── basicmeleeweapons.txt │ ├── haste.txt │ ├── swords.txt │ ├── x-rayvision.txt │ ├── lightguns.txt │ ├── unarmedcombat.txt │ ├── picklocks.txt │ ├── handguns.txt │ ├── illumination.txt │ ├── restoration.txt │ ├── regeneration.txt │ ├── warflow.txt │ ├── causefear.txt │ ├── tremorsense.txt │ ├── understanding.txt │ ├── telepathy.txt │ ├── flight.txt │ ├── hypnosis.txt │ ├── opticblast.txt │ ├── repair.txt │ ├── magneticmayhem.txt │ ├── deepsight.txt │ ├── adrenalinecontrol.txt │ ├── translation.txt │ ├── coercion.txt │ ├── mutpowers.txt │ ├── telekinesis.txt │ ├── heavyguns.txt │ ├── mentalblast.txt │ ├── creativity.txt │ ├── search.txt │ ├── farsenses.txt │ ├── redaction.txt │ ├── psivomit.txt │ ├── concentration.txt │ ├── autolysis.txt │ ├── teleport.txt │ ├── thrownweapons.txt │ ├── gammasensitivity.txt │ ├── web.txt │ ├── spot.txt │ ├── benegesseritawareness.txt │ ├── programming.txt │ ├── imbue.txt │ ├── psionicstorm.txt │ ├── thevoice.txt │ ├── digestion.txt │ ├── hellbentcharge.txt │ ├── attribute.txt │ ├── shockwave.txt │ ├── writing.txt │ ├── psychokineticshove.txt │ └── skills.txt └── intro │ ├── janitor.txt │ ├── astronaut.txt │ ├── marine.txt │ ├── quarterback.txt │ └── ninja.txt ├── README.md ├── docs ├── licenses │ ├── README-SDL.txt │ ├── fonts.txt │ ├── MIT_license.txt │ ├── README-SDL_image.txt │ ├── README-SDL_mixer.txt │ ├── README-SDL_net.txt │ ├── MIT_license_LUA.txt │ ├── LICENSE.tiff.txt │ ├── LICENSE.zlib.txt │ ├── LICENSE.ogg-vorbis.txt │ ├── LICENSE.FLAC.txt │ ├── LICENSE.webp.txt │ └── LICENSE.jpeg.txt ├── wiki │ ├── PsykerStart.txt │ ├── LackRef.txt │ ├── ProfessionTitles.txt │ ├── CharacterAttributes.txt │ └── SuppressedPowers.txt ├── zapm │ ├── SKILLZ │ ├── notes.txt │ ├── town.txt │ └── Character.txt ├── license.txt ├── design │ └── directory_structure.txt └── whats_here.txt ├── Makefile ├── user └── keymap │ ├── prime.cfg │ ├── adom.cfg │ ├── drl.cfg │ ├── band_orig.cfg │ ├── nh_novi.cfg │ ├── band_rogue.cfg │ ├── nh_vi.cfg │ ├── crawl.cfg │ └── prime_laptop.cfg ├── makefile.base ├── makefile.bases ├── makefile.std └── makefile.core /obj/BOFH.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/BOFH.o -------------------------------------------------------------------------------- /obj/Cave.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Cave.o -------------------------------------------------------------------------------- /obj/Door.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Door.o -------------------------------------------------------------------------------- /obj/Game.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Game.o -------------------------------------------------------------------------------- /obj/Help.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Help.o -------------------------------------------------------------------------------- /obj/Hero.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Hero.o -------------------------------------------------------------------------------- /bin/tablemk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/bin/tablemk -------------------------------------------------------------------------------- /obj/Droid.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Droid.o -------------------------------------------------------------------------------- /obj/Effect.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Effect.o -------------------------------------------------------------------------------- /obj/Fight.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Fight.o -------------------------------------------------------------------------------- /obj/lex.yy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/lex.yy.o -------------------------------------------------------------------------------- /gfx/SDS_6x6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/SDS_6x6.png -------------------------------------------------------------------------------- /gfx/SDS_8x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/SDS_8x8.png -------------------------------------------------------------------------------- /gfx/cp437-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/cp437-8.png -------------------------------------------------------------------------------- /gfx/prime.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/prime.ico -------------------------------------------------------------------------------- /gfx/rltiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/rltiles.png -------------------------------------------------------------------------------- /gfx/vapors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/vapors.png -------------------------------------------------------------------------------- /gfx/walls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/walls.png -------------------------------------------------------------------------------- /obj/Ability.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Ability.o -------------------------------------------------------------------------------- /obj/Canister.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Canister.o -------------------------------------------------------------------------------- /obj/Creature.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Creature.o -------------------------------------------------------------------------------- /obj/DressCode.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/DressCode.o -------------------------------------------------------------------------------- /obj/Equipment.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Equipment.o -------------------------------------------------------------------------------- /obj/Implant.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/Implant.o -------------------------------------------------------------------------------- /gfx/cp437-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/cp437-14.png -------------------------------------------------------------------------------- /gfx/cp437-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/cp437-16.png -------------------------------------------------------------------------------- /gfx/cp437-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/cp437-24.png -------------------------------------------------------------------------------- /gfx/dejavu-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/dejavu-16.png -------------------------------------------------------------------------------- /gfx/dejavu-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/dejavu-20.png -------------------------------------------------------------------------------- /gfx/dejavu-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/dejavu-8.png -------------------------------------------------------------------------------- /gfx/square-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/square-14.png -------------------------------------------------------------------------------- /gfx/square-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/square-16.png -------------------------------------------------------------------------------- /gfx/square-26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/square-26.png -------------------------------------------------------------------------------- /gfx/square-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/square-8.png -------------------------------------------------------------------------------- /gfx/tinyfont.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/tinyfont.png -------------------------------------------------------------------------------- /obj/AttackList.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/AttackList.o -------------------------------------------------------------------------------- /obj/AttackType.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/AttackType.o -------------------------------------------------------------------------------- /obj/BunkerRooms.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/BunkerRooms.o -------------------------------------------------------------------------------- /obj/FlavorList.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/FlavorList.o -------------------------------------------------------------------------------- /obj/FloppyDisk.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/FloppyDisk.o -------------------------------------------------------------------------------- /obj/tablemaker.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/tablemaker.o -------------------------------------------------------------------------------- /src/FloppyDisk.h: -------------------------------------------------------------------------------- 1 | #ifndef FLOPPY_DISK_H 2 | #define FLOPPY_DISK_H 3 | #endif 4 | -------------------------------------------------------------------------------- /gfx/BrogueFont1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/BrogueFont1.png -------------------------------------------------------------------------------- /gfx/BrogueFont2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/BrogueFont2.png -------------------------------------------------------------------------------- /gfx/BrogueFont3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/BrogueFont3.png -------------------------------------------------------------------------------- /gfx/BrogueFont4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/BrogueFont4.png -------------------------------------------------------------------------------- /gfx/BrogueFont5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/BrogueFont5.png -------------------------------------------------------------------------------- /gfx/courier-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/courier-16.png -------------------------------------------------------------------------------- /gfx/cp437-wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/cp437-wide.png -------------------------------------------------------------------------------- /gfx/fantasy-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/fantasy-16.png -------------------------------------------------------------------------------- /gfx/fantasy-16s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/fantasy-16s.png -------------------------------------------------------------------------------- /gfx/fantasy-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/fantasy-32.png -------------------------------------------------------------------------------- /gfx/primetiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/primetiles.png -------------------------------------------------------------------------------- /obj/tablemaker.tab.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/obj/tablemaker.tab.o -------------------------------------------------------------------------------- /src/noteye/libnoteye.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/src/noteye/libnoteye.o -------------------------------------------------------------------------------- /src/noteye/noteye.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/src/noteye/noteye.ico -------------------------------------------------------------------------------- /gfx/noteye-logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/gfx/noteye-logo-dark.png -------------------------------------------------------------------------------- /lib/win32/noteye/SDL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/noteye/SDL.dll -------------------------------------------------------------------------------- /src/noteye/noteye-jni.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/src/noteye/noteye-jni.o -------------------------------------------------------------------------------- /lib/win32/noteye/lua51.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/noteye/lua51.dll -------------------------------------------------------------------------------- /lib/win32/noteye/noteye.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/noteye/noteye.dll -------------------------------------------------------------------------------- /lib/win32/noteye/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/noteye/zlib1.dll -------------------------------------------------------------------------------- /src/FlavorList.cpp: -------------------------------------------------------------------------------- 1 | #include "Global.h" 2 | #include "Object.h" 3 | 4 | #include "gen/Flavor.cpp" 5 | -------------------------------------------------------------------------------- /lib/win32/noteye/SDL_image.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/noteye/SDL_image.dll -------------------------------------------------------------------------------- /lib/win32/noteye/SDL_mixer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/noteye/SDL_mixer.dll -------------------------------------------------------------------------------- /lib/win32/noteye/SDL_net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/noteye/SDL_net.dll -------------------------------------------------------------------------------- /lib/win32/noteye/libogg-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/noteye/libogg-0.dll -------------------------------------------------------------------------------- /lib/win32/sigsegv/libsigsegv.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/sigsegv/libsigsegv.a -------------------------------------------------------------------------------- /lib/win32/noteye/libvorbis-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/noteye/libvorbis-0.dll -------------------------------------------------------------------------------- /lib/win32/pdcurses/pdcurses.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/pdcurses/pdcurses.dll -------------------------------------------------------------------------------- /lib/win32/pdcurses/pdcurses.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/pdcurses/pdcurses.lib -------------------------------------------------------------------------------- /lib/win32/noteye/libvorbisfile-3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larzid/PRIME/HEAD/lib/win32/noteye/libvorbisfile-3.dll -------------------------------------------------------------------------------- /src/AttackList.cpp: -------------------------------------------------------------------------------- 1 | #include "AttackType.h" 2 | #include "Global.h" 3 | 4 | #include "gen/Attack.h" 5 | #include "gen/Attack.cpp" 6 | -------------------------------------------------------------------------------- /src/ObjectList.cpp: -------------------------------------------------------------------------------- 1 | #include "Global.h" 2 | #include "Object.h" 3 | #include "ObjectType.h" 4 | 5 | #include "gen/ObjectIlk.cpp" 6 | -------------------------------------------------------------------------------- /src/lua/noetolua.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for i in *.noe; do 3 | sed 's/\.noe/\.lua/' $i > ${i%.noe}.lua 4 | rm $i 5 | done 6 | -------------------------------------------------------------------------------- /src/pio/Makefile: -------------------------------------------------------------------------------- 1 | libpio.so: pio.pas 2 | fpc pio.pas -gl 3 | cp libpio.so ../.. 4 | clean: 5 | rm -vf pio.o libpio.so ../../libpio.so 6 | -------------------------------------------------------------------------------- /data/help/basicmeleeweapons.txt: -------------------------------------------------------------------------------- 1 | @FBasic Melee Weapons @E(Agility)@H 2 | 3 | Covers all melee weapons that are not swords, from mop to chainsaw. 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PRIME is a variant of Zap'M started in March 2011 by Psiweapon. Michał joined in late October 2011. Development continued until the end of 2014. 2 | -------------------------------------------------------------------------------- /data/help/haste.txt: -------------------------------------------------------------------------------- 1 | @LHaste @E(Psionics) @J(Redaction)@H 2 | 3 | While maintained you speed up considerably. 4 | 5 | Speed change: 20 + 2 * MIN(skill, 10) 6 | -------------------------------------------------------------------------------- /src/MonsterList.cpp: -------------------------------------------------------------------------------- 1 | #include "Global.h" 2 | #include "Monster.h" 3 | #include "Creature.h" 4 | 5 | #include "gen/MonsterIlk.h" 6 | #include "gen/MonsterIlk.cpp" 7 | -------------------------------------------------------------------------------- /data/help/swords.txt: -------------------------------------------------------------------------------- 1 | @FSwords @E(Agility)@H 2 | 3 | Covers all types of swords, including the bat'leth. Swords are uncommon melee 4 | weapons but they are quite effective. 5 | -------------------------------------------------------------------------------- /data/help/x-rayvision.txt: -------------------------------------------------------------------------------- 1 | @LX-Ray Vision @E(Constitution) @J(Farsenses)@H 2 | 3 | You can see through walls and other opaque obstacles. 4 | 5 | Range: 3 + @Cskill@H / 3 6 | -------------------------------------------------------------------------------- /src/Portability.h: -------------------------------------------------------------------------------- 1 | #ifndef PORTABILITY_H 2 | #define PORTABILITY_H 3 | 4 | namespace sys { 5 | 6 | void wait_msec (unsigned int ms); 7 | 8 | } 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /data/help/lightguns.txt: -------------------------------------------------------------------------------- 1 | @FLight guns @E(Dexterity)@H 2 | 3 | Two handed rifles belong to this category. Examples: 4 | * shotgun 5 | * sniper rifle 6 | * laser rifle 7 | * speargun 8 | -------------------------------------------------------------------------------- /data/help/unarmedcombat.txt: -------------------------------------------------------------------------------- 1 | @FUnarmed combat @E(Strength)@H 2 | 3 | Helps you hit with your bare fists, claws, feet or so called "unarmed" weapons 4 | like power fists and power claws. 5 | -------------------------------------------------------------------------------- /src/Implant.h: -------------------------------------------------------------------------------- 1 | #ifndef IMPLANT_H 2 | #define IMPLANT_H 3 | 4 | struct shObject; 5 | 6 | namespace imp { 7 | 8 | bool is_abil_booster (shObject *imp); 9 | 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /data/help/picklocks.txt: -------------------------------------------------------------------------------- 1 | @FPick Locks @E(Dexterity)@H 2 | 3 | Affects how likely you are to open a door using a @Clock pick@H. Status of the 4 | pick also modifies your chance by -%5 to +5% accordingly. 5 | -------------------------------------------------------------------------------- /data/help/handguns.txt: -------------------------------------------------------------------------------- 1 | @FHandguns @E(Dexterity)@H 2 | 3 | Into this category fall all guns you hold in one hand. Examples: 4 | * pea shooter 5 | * assault pistol 6 | * laser pistol 7 | * net launcher 8 | -------------------------------------------------------------------------------- /data/help/illumination.txt: -------------------------------------------------------------------------------- 1 | @LIllumination @E(Constitution) @J(Creativity)@H 2 | 3 | Permanently lights up some area around you. For every @Cskill point@H invested 4 | @Cradius@H increases by @Cone square@H. 5 | -------------------------------------------------------------------------------- /data/help/restoration.txt: -------------------------------------------------------------------------------- 1 | @LRestoration @E(Constitution) @J(Redaction)@H 2 | 3 | This mutant power repairs long term damage of body. 4 | 5 | Ability restored: (1 + skill / 5) to (2 + skill / 3) 6 | Minimum is 1 to 2 points 7 | -------------------------------------------------------------------------------- /data/help/regeneration.txt: -------------------------------------------------------------------------------- 1 | @LRegeneration @E(Constitution) @J(Redaction)@H 2 | 3 | You can focus your body to quickly mend wounds. 4 | When at full health you could regrow lost body limbs. 5 | 6 | Hit points restored: skill to skill * 2 7 | -------------------------------------------------------------------------------- /data/help/warflow.txt: -------------------------------------------------------------------------------- 1 | @LWar Flow @E(Psionics) @J(Telekinesis)@H 2 | 3 | You can psychokinetically adjust your attack motions at the speed of thought. 4 | 5 | Your to hit modifier is increased by: 2 + skill / 4, but never less than 2. 6 | -------------------------------------------------------------------------------- /src/gen/config.h: -------------------------------------------------------------------------------- 1 | /* File generated by Make. */ 2 | #ifndef CONFIG_H 3 | #define CONFIG_H 4 | #define DATADIR "/usr/games/share/prime" 5 | #define USERDIR "~/.config/prime" 6 | #define SCOREDIR "/var/games/prime" 7 | #endif 8 | #define NOGUI 9 | -------------------------------------------------------------------------------- /data/help/causefear.txt: -------------------------------------------------------------------------------- 1 | @LCause fear @E(Psionics) @J(Coercion)@H 2 | 3 | You instill panic by breaking morale, weakening one's courage and resolve. 4 | 5 | Duration: 2 to 2 * (4 + skill / 4) 6 | Defend chance: victim's_concentration_skill * 4% 7 | -------------------------------------------------------------------------------- /data/help/tremorsense.txt: -------------------------------------------------------------------------------- 1 | @LTremorsense @E(Constitution) @J(Farsenses)@H 2 | 3 | You are able to perceive vibrations created by creatures making their steps 4 | on solid ground. 5 | 6 | Your @Cskill@H in this power increases detection @Crange@H. 7 | -------------------------------------------------------------------------------- /data/help/understanding.txt: -------------------------------------------------------------------------------- 1 | @LUnderstanding @E(Intelligence) @J(Redaction)@H 2 | 3 | Allows you to converse with species using alien languages. 4 | 5 | Your @Cskill@H in this power is @EUSELESS@H! This will be corrected in 6 | upcoming versions. 7 | -------------------------------------------------------------------------------- /src/Weapon.h: -------------------------------------------------------------------------------- 1 | #ifndef WEAPON_H 2 | #define WEAPON_H 3 | 4 | #include "Global.h" 5 | 6 | namespace wpn { 7 | 8 | shAttack *get_gun_attack (shCreature *c, shObject **weapon, int &hit_mod, int &rounds); 9 | 10 | } 11 | 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /data/help/telepathy.txt: -------------------------------------------------------------------------------- 1 | @LTelepathy @E(Intelligence) @J(Farsenses)@H 2 | 3 | Telepathy allows you to hear other's thoughts and know of their 4 | presence before actually meeting them. 5 | 6 | Your @Cskill@H in this power increases detection @Crange@H. 7 | -------------------------------------------------------------------------------- /data/help/flight.txt: -------------------------------------------------------------------------------- 1 | @LFlight @E(Psionics) @J(Telekinesis)@H 2 | 3 | While flying you @Cavoid ground traps@H and receive minor @Celectricity resistance@H. 4 | 5 | Your @Cskill@H in this power is @EUSELESS@H! This will be corrected in upcoming 6 | versions. 7 | -------------------------------------------------------------------------------- /data/help/hypnosis.txt: -------------------------------------------------------------------------------- 1 | @LHypnosis @E(Psionics) @J(Coercion)@H 2 | 3 | With a gaze in the eye you can make others fall fast asleep. 4 | There is @C10%@H chance your target will blink negating the effect. 5 | 6 | Duration: (2 + skill / 4) to (10 + skill / 2) turns 7 | -------------------------------------------------------------------------------- /data/help/opticblast.txt: -------------------------------------------------------------------------------- 1 | @LOptic Blast @E(Psionics) @J(Creativity)@H 2 | 3 | You focus your eyes and send forth a deadly red laser beam. You must not be 4 | blind except by external means. 5 | 6 | Damage: (1 + skill + your_XP_level) to (6 + skill * 4 + your_XP_level) 7 | Range: unlimited 8 | -------------------------------------------------------------------------------- /data/help/repair.txt: -------------------------------------------------------------------------------- 1 | @FRepair @E(Dexterity)@H 2 | 3 | You can repair damaged or disabled droids and robots. You can also fix 4 | malfunctioning doors and dismantle radiation traps. 5 | 6 | You need a @Cmonkey wrench@H, a @Croll of duct tape@H or installed set of 7 | @Cmecha-dendrites@H. 8 | -------------------------------------------------------------------------------- /data/help/magneticmayhem.txt: -------------------------------------------------------------------------------- 1 | @LMagnetic Mayhem @E(Psionics) @J(Creativity)@H 2 | 3 | Short ranged power allowing to create short-lived outburst of strong 4 | electromagnetic wave. Living organisms are mostly unharmed by it but 5 | robots suffer damage to their electronic systems. 6 | 7 | Damage: @Cskill@H / 2 to @Cskill@H 8 | -------------------------------------------------------------------------------- /data/help/deepsight.txt: -------------------------------------------------------------------------------- 1 | @LDeepsight @E(Constitution) @J(Farsenses)@H 2 | 3 | Somehow you can see into internal details of technological equipment 4 | and understand the workings intuitively. You get @Cskill bonus@H to 5 | @Crepair@H, @Clock picking@H and @Cprogramming@H. 6 | 7 | Skill increase: 1 + skill / 4 but no less than 1 8 | -------------------------------------------------------------------------------- /data/help/adrenalinecontrol.txt: -------------------------------------------------------------------------------- 1 | @LAdrenaline control @E(Constitution) @J(Redaction)@H 2 | 3 | Adjust adrenaline levels in your body to become stronger. Grants 4 | @Cfour@H points of @Estrength@H in exchange for @Cfour@H points of @Epsionics@H. 5 | 6 | Your @Cskill@H in this power is @EUSELESS@H! This will be corrected in 7 | upcoming versions. 8 | -------------------------------------------------------------------------------- /data/help/translation.txt: -------------------------------------------------------------------------------- 1 | @FTranslation @E(Psionics)@H 2 | 3 | Translation encompasses dimensional, phase and teleportation effects. 4 | 5 | Each @Cskill point@H put in this category makes all @Fmutant powers@H based on 6 | @Ftranslation@H be @C5%@H easier to use. 7 | 8 | Powers belonging to this Metapsychic Faculty: 9 | - Digestion 10 | - Teleport 11 | -------------------------------------------------------------------------------- /src/DressCode.h: -------------------------------------------------------------------------------- 1 | #ifndef DRESSCODE_H 2 | #define DRESSCODE_H 3 | 4 | #include "Global.h" 5 | 6 | namespace dress { 7 | 8 | enum DressCode 9 | { 10 | Janitor, 11 | Ninja, 12 | Stormtrooper, 13 | Troubleshooter, 14 | Num_DressCode 15 | }; 16 | 17 | } 18 | 19 | bool looks_like (shCreature *, dress::DressCode); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /data/help/coercion.txt: -------------------------------------------------------------------------------- 1 | @FCoercion @E(Psionics)@H 2 | 3 | Coercion involves mind control and other forms of messing with minds. 4 | 5 | Each @Cskill point@H put in this category makes all @Fmutant powers@H based on 6 | @Fcoercion@H be @C5%@H easier to use. 7 | 8 | Powers belonging to this Metapsychic Faculty: 9 | - Hypnosis 10 | - Mental Blast 11 | - Cause Fear 12 | - The Voice 13 | -------------------------------------------------------------------------------- /data/help/mutpowers.txt: -------------------------------------------------------------------------------- 1 | @CMUTANT POWERS@H 2 | 3 | 4 | Mutant powers are somewhat weird abilities. They are sensitive 5 | to your psionic aura which may be augmented or disrupted by 6 | some items you can wear. 7 | 8 | Every skill power invested in mutant power increases chance 9 | to use it by five percent points in addition to other effects 10 | gaining a skill in it might give. 11 | -------------------------------------------------------------------------------- /data/help/telekinesis.txt: -------------------------------------------------------------------------------- 1 | @FTelekinesis @E(Psionics)@H 2 | 3 | Telekinesis means imparting movement with the mind. 4 | 5 | Each @Cskill point@H put in this category makes all @Fmutant powers@H based on 6 | @Ftelekinesis@H be @C5%@H easier to use. 7 | 8 | Powers belonging to this Metapsychic Faculty: 9 | - Hellbent Charge 10 | - War Flow 11 | - Psychokinetic Shove 12 | - Shockwave 13 | - Flying 14 | -------------------------------------------------------------------------------- /src/support/monstile.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | my ( @monsters, $file ); 3 | open $file, "<", "Monsters.txt" or die "problem - monsters"; 4 | @monsters = <$file>; 5 | close $file; 6 | my $last; 7 | foreach ( @monsters ) { 8 | if ( /MonsterIlk (\w+)/ ) { 9 | $last = $1; 10 | } 11 | if ( /\s*tile_col \s* (\d+)/ ) { 12 | print " * " . $last . "\n" if ($1 == 0); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /data/help/heavyguns.txt: -------------------------------------------------------------------------------- 1 | @FHeavy guns @E(Strength)@H 2 | 3 | Big and heavy cannons are different from most guns you aim with both hands. 4 | These have great recoil and often are very cumbersome. This makes your 5 | @EStrength@H help with aiming them instead of @EDexterity@H as one might assume. 6 | 7 | Examples of such guns: 8 | * pulse rifle 9 | * mining laser 10 | * railgun 11 | * plasma cannon 12 | * auto-cannon 13 | -------------------------------------------------------------------------------- /src/Wreck.cpp: -------------------------------------------------------------------------------- 1 | #include "Global.h" 2 | #include "Object.h" 3 | #include "ObjectType.h" 4 | #include "Monster.h" 5 | 6 | shObject * 7 | createWreck (shCreature *m) 8 | { 9 | if (m->isRobot ()) { 10 | shObject *wreck = new shObject (); 11 | 12 | wreck->mIlkId = kObjWreck; 13 | wreck->mCount = 1; 14 | wreck->mWreckIlk = m->mIlkId; 15 | return wreck; 16 | } 17 | return NULL; 18 | } 19 | -------------------------------------------------------------------------------- /data/help/mentalblast.txt: -------------------------------------------------------------------------------- 1 | @LMental Blast @E(Psionics) @J(Coercion)@H 2 | 3 | You assault someone's mind directly. Very successful attack might temporarily 4 | confuse the recipient. 5 | 6 | @IPsychic harm@H: 7 | Min damage: 2 + skill / 3, but no less than 2 8 | Max damage: skill * 3 / 2, but no less than 8 9 | @IConfusion@H: 10 | Chance: 60 + skill - 5 * victim's_concentration_skill 11 | Min duration: 2 + skill / 4 12 | Max duration: 6 + skill / 4 13 | -------------------------------------------------------------------------------- /src/Equipment.h: -------------------------------------------------------------------------------- 1 | #ifndef EQUIP_H 2 | #define EQUIP_H 3 | 4 | #include "Distribution.h" 5 | #include 6 | #include "Global.h" 7 | 8 | struct EquipmentLine { 9 | union { 10 | uintptr_t dummy; 11 | shObjId id; 12 | prob::Table *set; 13 | } ref; 14 | const char *mod; 15 | }; 16 | 17 | void equip_by_list (shCreature *c, const EquipmentLine *table); 18 | 19 | void equip_monster (shCreature *c); 20 | #endif 21 | -------------------------------------------------------------------------------- /src/Scenario.h: -------------------------------------------------------------------------------- 1 | #ifndef SCENARIO_H 2 | #define SCENARIO_H 3 | 4 | #include 5 | #include "gen/ObjectIlk.h" 6 | 7 | struct _scen_internal; 8 | 9 | struct Scenario 10 | { 11 | void generate (); 12 | void clear (); 13 | void save_state (FILE *); 14 | bool load_state (FILE *); 15 | 16 | shObjId bubbly_beverage (); 17 | 18 | private: 19 | _scen_internal *m; 20 | }; 21 | 22 | extern Scenario Scen; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /src/lua/walls-png.lua: -------------------------------------------------------------------------------- 1 | -- Necklace of the Eye v7.6 roguelike frontend 2 | -- Copyright (C) 2010-2014 Zeno Rogue, see noteye.lua for details 3 | 4 | if WallsPNG == nil then 5 | 6 | WallsPNG = loadimage(gfxdir.."walls.png") 7 | 8 | WT = {} 9 | 10 | for y=0,12 do WT[y] = {} end 11 | 12 | for y=0,12 do 13 | for x = 0,4 do 14 | WT[y][x] = addtile(WallsPNG, x*32, y*32, 32, 32, -1) 15 | end 16 | end 17 | end 18 | 19 | -------------------------------------------------------------------------------- /data/help/creativity.txt: -------------------------------------------------------------------------------- 1 | @FCreativity @E(Psionics)@H 2 | 3 | Creativity is conjuration of matter and energy ex nihilo and harnessing 4 | energy forms. 5 | 6 | Each @Cskill point@H put in this category makes all @Fmutant powers@H based on 7 | @Fcreativity@H be @C5%@H easier to use. 8 | 9 | Powers belonging to this Metapsychic Faculty: 10 | - Illumination 11 | - Psi Vomit 12 | - Optic Blast 13 | - Web 14 | - Imbue 15 | - Electromagnetic Mayhem 16 | - Psionic Storm 17 | -------------------------------------------------------------------------------- /data/help/search.txt: -------------------------------------------------------------------------------- 1 | @FSearch @E(Intelligence)@H 2 | 3 | Gives you a better chance to find secrets when you are actively searching for 4 | them. To make an attempt stand still in an area where you think hidden things 5 | are located. All adjacent spaces will be checked. You may need to do this 6 | a few times to see some results. 7 | 8 | In general this is a non-crucial skill. It is recommended to spend only a few 9 | of your precious skill points on this. 10 | -------------------------------------------------------------------------------- /data/help/farsenses.txt: -------------------------------------------------------------------------------- 1 | @FFarsenses @E(Psionics)@H 2 | 3 | Some mutant powers bestow additional senses the body alone could neither 4 | sustain nor take advantage of. 5 | 6 | Each @Cskill point@H put in this category makes all @Fmutant powers@H based on 7 | @Ffarsenses@H be @C5%@H easier to use. 8 | 9 | Powers belonging to this Metapsychic Faculty: 10 | - Deepsight 11 | - Gammasensitivity 12 | - Telepathy 13 | - Tremorsense 14 | - Understanding 15 | - X-Ray Vision 16 | -------------------------------------------------------------------------------- /src/Game.h: -------------------------------------------------------------------------------- 1 | #ifndef GAME_H 2 | #define GAME_H 3 | 4 | int nameOK (const char *name); 5 | 6 | int newGame (const char *name); 7 | 8 | int loadGame (const char *name); 9 | 10 | int saveGame (); 11 | 12 | void gameLoop (); 13 | 14 | /* exitPRIME(const code) declared in Global.h */ 15 | 16 | struct HighScoreEntry 17 | { 18 | int mScore; 19 | int mUid; 20 | char mName[30]; 21 | char mMessage[200]; 22 | }; 23 | #define NUMHIGHSCORES 100 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /data/help/redaction.txt: -------------------------------------------------------------------------------- 1 | @FRedaction @E(Psionics)@H 2 | 3 | Powers belonging to Redaction are focused inwards. Healing and control 4 | of bodily functions fall under this Faculty. 5 | 6 | Each @Cskill point@H put in this category makes all @Fmutant powers@H based on 7 | @Fredaction@H be @C5%@H easier to use. 8 | 9 | Powers belonging to this Metapsychic Faculty: 10 | - Regeneration 11 | - Haste 12 | - Restoration 13 | - Adrenaline Control 14 | - Bene Gesserit Awareness 15 | - Autolysis 16 | -------------------------------------------------------------------------------- /src/Body.h: -------------------------------------------------------------------------------- 1 | #ifndef BODY_H 2 | #define BODY_H 3 | 4 | namespace body 5 | { 6 | 7 | enum shEquipSlot 8 | { 9 | helm, 10 | goggles, 11 | jumpsuit, 12 | armor, 13 | belt, 14 | cloak, 15 | backpack, 16 | boots, 17 | computer, 18 | lobe_frontal, 19 | lobe_parietal, 20 | lobe_occipital, 21 | lobe_temporal, 22 | lobe_tricipital, 23 | cerebellum, 24 | left_ear, 25 | right_eyeball, 26 | torc 27 | }; 28 | 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /data/help/psivomit.txt: -------------------------------------------------------------------------------- 1 | @LPsi Vomit @E(Constitution) @J(Creativity)@H 2 | 3 | You open your mouth and let all built up psionic energy out in chosen 4 | direction. Quite devastating but requires that you be at your full 5 | psionic capacity (or overcharged) and @Ctemporarily drains@H your @EPsionics@H 6 | down @Cto nothing@H. Can hit several creatures in a row. 7 | 8 | Bonus: @EPsionics@H / 2 9 | Damage: (1 + bonus + skill / 2) to (10 + bonus + skill) 10 | Range: (2 to 4) + (skill / 5) 11 | -------------------------------------------------------------------------------- /data/help/concentration.txt: -------------------------------------------------------------------------------- 1 | @FConcentration @E(Constitution)@H 2 | 3 | Helps you sustain any continuous mutant powers you are using when you might 4 | otherwise get distracted. 5 | 6 | Chance to fail to maintain an active power when you are being distracted is: 7 | @Fx@H = @C25%@H + @Ctotal skill@H * @C5%@H 8 | 9 | The above nubmer is tested against all your continuous powers in use. 10 | 11 | A non-exhaustive list of distractions follows: 12 | - getting probed in the anus 13 | - getting stunned 14 | -------------------------------------------------------------------------------- /docs/licenses/README-SDL.txt: -------------------------------------------------------------------------------- 1 | 2 | Please distribute this file with the SDL runtime environment: 3 | 4 | The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library 5 | designed to make it easy to write multi-media software, such as games and 6 | emulators. 7 | 8 | The Simple DirectMedia Layer library source code is available from: 9 | http://www.libsdl.org/ 10 | 11 | This library is distributed under the terms of the GNU LGPL license: 12 | http://www.gnu.org/copyleft/lesser.html 13 | 14 | -------------------------------------------------------------------------------- /data/help/autolysis.txt: -------------------------------------------------------------------------------- 1 | @LAutolysis @E(Constitution) @J(Redaction)@H 2 | 3 | You are able to @Csupply@H some of @CPsionic @Ccost@H of using non-continuous 4 | @Fmutant powers@H. However, the @Cprice@H is paid in your @Chit points@H. 5 | 6 | Psionic cost decrease: power_level / 2 + power_level mod 2 7 | Hit point cost: psi_decrease * power_level * power_level 8 | 9 | Your @Cskill decreases hit point cost@H to no less than half original value 10 | rounding down. Ratio is one skill point prevents loss of one hit point. 11 | -------------------------------------------------------------------------------- /src/noteye/calleri.sh: -------------------------------------------------------------------------------- 1 | # installed version of caller.sh 2 | 3 | echo 4 | echo Looking for: \'$NOTEYEDIR/$2\', \'./$2\', \'$2\' 5 | 6 | if [ -e $NOTEYEDIR/$2 ] 7 | then 8 | $NOTEYEDIR/$2 9 | elif [ -e ./$2 ] 10 | then 11 | ./$2 12 | elif [ -n "`which $2`" ] 13 | then 14 | $2 15 | else 16 | echo 17 | echo $3 not found on your system. 18 | echo 19 | echo Make sure that it can be run as \'$2\' or \'./$2\'. 20 | echo 21 | echo Alternatively, you can start it manually from the prompt below. 22 | echo 23 | sh -l 24 | fi 25 | -------------------------------------------------------------------------------- /src/noteye/noteye.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # based on the ArchLinux script for Hydra Slayer, by Joao Cordeiro 3 | 4 | pwd="`pwd`" 5 | export NOTEYEDIR="/usr/share/noteye" 6 | 7 | if [ -z "$XDG_CONFIG_HOME" ]; then 8 | export NOTEYECONFIG="$HOME/.config/noteye/" 9 | else 10 | export NOTEYECONFIG="$XDG_CONFIG_HOME/noteye/" 11 | fi 12 | 13 | mkdir -p "$NOTEYECONFIG" || return 1 14 | 15 | $NOTEYEDIR/noteye -f $NOTEYECONFIG/hydra.sav -t $NOTEYECONFIG/hydralog.txt $* -N -U $NOTEYECONFIG -P "$pwd" 16 | -------------------------------------------------------------------------------- /data/help/teleport.txt: -------------------------------------------------------------------------------- 1 | @LTeleport @E(Psionics) @J(Translation)@H 2 | 3 | Fold space to transport yourself far away. Warpish creatures may intercept 4 | your travel and follow you. 5 | 6 | Each @Cskill point over five@H grants you @C10% chance@H to @Ccontrol@H destination 7 | of the teleport. 8 | 9 | After each teleport you may get disoriented for two to four turns. With no 10 | skill it is guaranteed, at @Cskill 3@H chance is @C70%@H, at @Cskill 7@H 11 | chance is @C30%@H and at skill 10 or more you are immune to this effect. 12 | -------------------------------------------------------------------------------- /src/noteye/hydraslayer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # based on the ArchLinux script for Hydra Slayer, by Joao Cordeiro 3 | 4 | pwd="`pwd`" 5 | export NOTEYEDIR="/usr/share/noteye" 6 | 7 | if [ -z "$XDG_CONFIG_HOME" ]; then 8 | export NOTEYECONFIG="$HOME/.config/hydraslayer" 9 | else 10 | export NOTEYECONFIG="$XDG_CONFIG_HOME/noteye" 11 | fi 12 | 13 | mkdir -p "$NOTEYECONFIG" || return 1 14 | 15 | $NOTEYEDIR/noteye -f $NOTEYECONFIG/hydra.sav -t $NOTEYECONFIG/hydralog.txt $* -N -X hydra -U $NOTEYECONFIG 16 | -------------------------------------------------------------------------------- /data/help/thrownweapons.txt: -------------------------------------------------------------------------------- 1 | @FThrown Weapons @E(Dexterity)@H 2 | 3 | This skill helps you hit with all thrown weapons but is especially useful 4 | for grenades. Your throw range depends on your @EStrength@H and item weight 5 | in most cases. 6 | 7 | You can wield @CPulse Rifle@H to use its built-in @Cgrenade launcher@H. This 8 | will provide you with excellent range and additional two points to hit 9 | chance. Weapon bugginess also impacts the hit chance. Firing grenades 10 | with the launcher does not interfere with @LImbue@H mutant power in any way. 11 | -------------------------------------------------------------------------------- /src/Portability.cpp: -------------------------------------------------------------------------------- 1 | #ifdef _WIN32 2 | #include 3 | #endif 4 | 5 | #ifdef __unix__ 6 | #include 7 | #include // nanosleep 8 | #endif 9 | 10 | #ifdef __MACH__ 11 | #include 12 | #include // nanosleep 13 | #endif 14 | 15 | namespace sys { 16 | 17 | void 18 | wait_msec (unsigned int ms) 19 | { 20 | #ifdef _WIN32 21 | Sleep (ms); 22 | #else 23 | struct timespec wait; 24 | wait.tv_sec = ms / 1000; 25 | wait.tv_nsec = (ms % 1000) * 1000000; 26 | nanosleep (&wait, NULL); 27 | #endif 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/osx/macsupport.h: -------------------------------------------------------------------------------- 1 | /* SDLMain.m - main entry point for our Cocoa-ized SDL app 2 | Initial Version: Darrell Walisser 3 | Non-NIB-Code & other changes: Max Horn 4 | 5 | Feel free to customize this file to suit your needs 6 | */ 7 | 8 | #ifndef _macsupport_h_ 9 | #define _macsupport_h_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | void OSXMain(); 16 | const char *initSaveLocation(); 17 | const char* initResourcesLocation(); 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* _macsupport_h_ */ 23 | -------------------------------------------------------------------------------- /data/help/gammasensitivity.txt: -------------------------------------------------------------------------------- 1 | @LGammasensitivity @E(Constitution) @J(Farsenses)@H 2 | 3 | You can actually see radiation! Items that give off radiation in your 4 | inventory will be marked green. Area that is irradiated will be highlighted. 5 | 6 | Unless your skill in this power is @C5 points@H or more you will be @Eblinded@H 7 | whenever you are exposed to concentrated radiation. Walking through 8 | contaminated room is not enough to trigger this but getting hit with gamma 9 | ray gun or rad grenade is. In Gamma Caves no amount of skill is going to 10 | prevent blindness. 11 | -------------------------------------------------------------------------------- /docs/wiki/PsykerStart.txt: -------------------------------------------------------------------------------- 1 | | *Faculty* | *Psion* | *Mastermind* | *Empath* | *Weirdboy* | 2 | | Coercion | Mental blast | Cause fear | random | random | 3 | | Creativity | Optic blast | Imbue | random | _Psi vomit_ | 4 | | Farsensing | X-ray vision | _Telepathy_ | Tremorsense | random | 5 | | Redaction | Restoration | random | Haste | Adrenaline control | 6 | | Telekinesis | Psychokinetic Shove | random | _War flow_ | Hellbent Charge | 7 | | Translation | random | random | random | random | 8 | 9 | Marked guaranteed powers with italic font. Telepathy and war flow are on at game start. 10 | -------------------------------------------------------------------------------- /docs/licenses/fonts.txt: -------------------------------------------------------------------------------- 1 | Square is a TTF font intended for roguelike games, by Wouter van Oortmerssen, 2 | under the Creative Commons Attribution 3.0 Unported license 3 | ( http://creativecommons.org/licenses/by/3.0/deed.en_US ) 4 | 5 | Downloaded from http://strlen.com/square 6 | 7 | *** 8 | 9 | SDS fonts come from the DawnLike tileset. 10 | It was created by DragonDePlatino under the CC BY-SA 3.0 license 11 | http://opengameart.org/content/dawnlike-16x16-universal-rogue-like-tileset-v10 12 | 13 | *** 14 | 15 | Thanks to Asmerillon on Polish roguelike forums for tinyfont66 and tinyfont68 16 | -------------------------------------------------------------------------------- /data/help/web.txt: -------------------------------------------------------------------------------- 1 | @LWeb @E(Constitution) @J(Creativity)@H 2 | 3 | You can do what Spiderman did! By bending two of your middle fingers you 4 | release a strand of web at chosen target. Watch them struggle to get free! 5 | Or better yet waste no time and beat them up while they try to rip the webs 6 | to pieces. 7 | 8 | If @Cin a pit@H you may shot the strand @Cupwards@H to lift yourself in a hurry. 9 | This costs @Cone @EPsionics@C point less@H to do. 10 | 11 | Min duration: 1 + your_XP_level / 2 + skill / 2 12 | Max duration: 6 + your_XP_level / 2 + skill 13 | Range: 5 + your_XP_level / 4 14 | -------------------------------------------------------------------------------- /data/help/spot.txt: -------------------------------------------------------------------------------- 1 | @FSpot @E(Intelligence)@H 2 | 3 | Helps you notice secrets when you are not actively searching for them, often 4 | from a distance. Unlike @Isearch@H skill you need to be able to see. 5 | 6 | How does this work? 7 | 8 | You enter a room, lay your eyes on something that is door in disguise, hidden 9 | trap or a monster hiding underneath an item. Then you may either notice 10 | something is off and the secret is no longer so secret for you or you may 11 | overlook it. You do get second chances at this but only ater long time passes 12 | so putting quite a bunch skill points here may be a life-saver at times. 13 | -------------------------------------------------------------------------------- /src/support/itemtile.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | my ( @items, $file, $last ); 3 | open $file, "<", "Items.txt" or die "problem - items"; 4 | @items = <$file>; 5 | close $file; 6 | $last = ""; 7 | $flav = ""; 8 | foreach ( @items ) { 9 | if ( /^\w+ (\w+)$/ ) { 10 | if ( $last ) { 11 | if ( $flav ) { 12 | print " * $last ($flav)\n"; 13 | } else { 14 | print " * $last\n"; 15 | } 16 | } 17 | $last = $1; 18 | $flav = ""; 19 | } 20 | $flav = $1 if ( /flavor\s*kF(\w+)/ ); 21 | if ( /tile_col\s*(\d+)/ ) { 22 | $last = "" if ( $1 ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /data/help/benegesseritawareness.txt: -------------------------------------------------------------------------------- 1 | @LBene Gesserit Awareness @E(Psionics) @J(Redaction)@H 2 | 3 | You have full control over every cell of your organism. This grants you 4 | @Cknowledge@H your brain always possessed but never made available for conscious 5 | mind. Also, you are able to @Cexpend @EPsionics@H to @Cprotect@H your body from 6 | @Cpoison@H and @Csickness@H. Additionally, your @Cradiation tolerance@H becomes 7 | @Cgreater@H while you maintain this power. If you were to suffer effects of 8 | radiation sickness your body will @Cdeteriorate slower@H. 9 | 10 | Your @Cskill@H in this power is @EUSELESS@H! This will be corrected in 11 | upcoming versions. 12 | -------------------------------------------------------------------------------- /src/PointerStore.h: -------------------------------------------------------------------------------- 1 | #ifndef POINTERSTORE_H 2 | #define POINTERSTORE_H 3 | 4 | #include 5 | 6 | namespace sav { 7 | 8 | struct _ptrstore_internal; 9 | 10 | struct PointerStore 11 | { 12 | PointerStore (); 13 | ~PointerStore (); 14 | void set_file (FILE *); 15 | void save_pointer (void *); 16 | bool load_pointer (void **); 17 | void save_target (void *); 18 | bool load_target (void *); 19 | 20 | private: 21 | _ptrstore_internal *m; 22 | }; 23 | 24 | enum SaveFileMagicNumber 25 | { 26 | MAGIC_PTR = 1, 27 | MAGIC_WARP = 11 28 | }; 29 | 30 | void save_magic (FILE *, long); 31 | bool load_magic (FILE *, long); 32 | 33 | } 34 | #endif 35 | -------------------------------------------------------------------------------- /data/help/programming.txt: -------------------------------------------------------------------------------- 1 | @FProgramming @E(Intelligence)@H 2 | 3 | This skill decides how successful are you at different tasks requiring not 4 | merely the use of a computer but issuing complex commands to the electronic 5 | (or not!) "brain" inside. 6 | 7 | Activites that make use of @Iprogramming@H: 8 | - writing new program on @Cblank disk@H (hit help there for more information) 9 | - controlling output of @Cmatter compiler@H 10 | - using @Cfloppy disk of hacking@H for any task 11 | 12 | What affects @Iprogramming@H skill: 13 | - Quality of used computer's @Foperating system@H. 14 | - Drinking @Dcoffee@H temporarily helps for @C+2@H points. 15 | - Being @Econfused@H is a bad idea (@E-5@H points). 16 | -------------------------------------------------------------------------------- /src/MapBuilder.h: -------------------------------------------------------------------------------- 1 | #define SETSQ(_x, _y, _w) mSquares[_x][_y].mTerr = _w 2 | #define GETSQ(_x, _y) mSquares[_x][_y].mTerr 3 | #define SETSQFLAG(_x, _y, _f) mSquares[_x][_y].mFlags |= shSquare:: _f 4 | #define GETSQFLAG(_x, _y, _f) (mSquares[_x][_y].mFlags & shSquare:: _f) 5 | #define SETROOM(_x, _y, _r) (mSquares[_x][_y].mRoomId = _r) 6 | #define SETSQROOM(_x, _y, _w, _r) \ 7 | (mSquares[_x][_y].mTerr = _w); \ 8 | (mSquares[_x][_y].mRoomId = _r) 9 | 10 | #define TESTSQ(_x, _y, _t) \ 11 | (_x >= 0 and _x < mColumns and _y >= 0 and _y < mRows and (_t == GETSQ (_x, _y))) 12 | 13 | #define TESTSQFLAG(_x, _y, _t) \ 14 | (_x >= 0 and _x < mColumns and _y >= 0 and _y < mRows \ 15 | and (GETSQFLAG (_x, _y, _t))) 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Menu.h: -------------------------------------------------------------------------------- 1 | #ifndef MENU_H 2 | #define MENU_H 3 | 4 | struct shMenuChoice 5 | { 6 | char mLetter, mAltLetter; 7 | int mCount; /* count available. -1 indicates this is a header */ 8 | int mSelected; /* count currently selected */ 9 | char mText[256]; 10 | union { 11 | const void *mPtr; /* value of the object returned later if this */ 12 | int mInt; /* choice is selected. */ 13 | } mValue; 14 | 15 | shMenuChoice (char letter, char alt, const char *text, const void *value, 16 | int count, int selected = 0); 17 | shMenuChoice (char letter, char alt, const char *text, int value, 18 | int count, int selected = 0); 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /src/noteye/rogue.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -e rogue ] 4 | then 5 | 6 | if test -e rogue.save 7 | then 8 | rogue rogue.save 9 | else 10 | rogue 11 | fi 12 | 13 | elif [ -n "`which rogue`" ] 14 | then 15 | 16 | cd $NOTEYECONFIG 17 | if test -e rogue.save 18 | then 19 | rogue rogue.save 20 | else 21 | rogue 22 | fi 23 | 24 | else 25 | 26 | echo Rogue not found on your system. 27 | echo 28 | echo Make sure that it can be run as \'$2\' or \'./$2\'. 29 | echo 30 | echo For example, in Ubuntu you can install Rogue with: 31 | echo 32 | echo sudo apt-get install bsdgames-nonfree 33 | echo 34 | echo Otherwise, you can also run it manually from the prompt below. 35 | echo 36 | sh -l 37 | 38 | fi 39 | -------------------------------------------------------------------------------- /src/noteye/noteye.rc: -------------------------------------------------------------------------------- 1 | id ICON "noteye.ico" 2 | 3 | 1 VERSIONINFO 4 | FILEVERSION 7,6,0,0 5 | PRODUCTVERSION 7,6,0,0 6 | BEGIN 7 | BLOCK "StringFileInfo" 8 | BEGIN 9 | BLOCK "040904E4" 10 | BEGIN 11 | VALUE "CompanyName", "Zeno Rogue" 12 | VALUE "FileDescription", "A roguelike frontend" 13 | VALUE "FileVersion", "7.6" 14 | VALUE "InternalName", "noteye" 15 | VALUE "LegalCopyright", "Zeno Rogue" 16 | VALUE "OriginalFilename", "noteye.exe" 17 | VALUE "ProductName", "Necklace of the Eye" 18 | VALUE "ProductVersion", "7.6" 19 | END 20 | END 21 | 22 | BLOCK "VarFileInfo" 23 | BEGIN 24 | VALUE "Translation", 0x409, 1252 25 | END 26 | END 27 | -------------------------------------------------------------------------------- /src/lua/generic.lua: -------------------------------------------------------------------------------- 1 | -- Necklace of the Eye v7.6 roguelike frontend 2 | -- Copyright (C) 2010-2014 Zeno Rogue, see noteye.lua for details 3 | 4 | -- this file simply includes all the generic NotEye scripts 5 | 6 | print("") 7 | dofile(commondir.."vectors.lua") 8 | dofile(commondir.."util.lua") 9 | dofile(commondir.."menu.lua") 10 | dofile(commondir.."viewmodes.lua") 11 | dofile(commondir.."fonts.lua") 12 | dofile(commondir.."graphopt.lua") 13 | dofile(commondir.."palettes.lua") 14 | dofile(commondir.."keymap.lua") 15 | dofile(commondir.."sounds.lua") 16 | dofile(commondir.."streams.lua") 17 | dofile(commondir.."running.lua") 18 | dofile(commondir.."readmap.lua") 19 | dofile(commondir.."backward.lua") 20 | 21 | moremenus() 22 | -------------------------------------------------------------------------------- /data/help/imbue.txt: -------------------------------------------------------------------------------- 1 | @LImbue @E(Psionics) @J(Creativity)@H 2 | 3 | Imbue differs from most other continuous powers. While it takes @Cno points 4 | for activation@H they are @Cexpended each attack@H instead. If you run out of 5 | Psionics in combat while Imbue is working it will be silently deactivated. 6 | 7 | While this power is active you channel some Psionic energy through wielded 8 | or thrown weapon increasing damage output and for thrown items hit chance. 9 | Fighting unarmed also triggers this effect. 10 | 11 | In @Cmelee@H this costs @Cone point@H while at @Crange@H it requires @Ctwo points@H. 12 | 13 | Damage bonus: skill / 2, but no less than 1 and no more than 8 14 | To hit bonus (thrown): equal to skill, but no less than 1 and no more than 10 15 | -------------------------------------------------------------------------------- /data/help/psionicstorm.txt: -------------------------------------------------------------------------------- 1 | @LPsionic Storm @E(Psionics) @J(Creativity)@H 2 | 3 | This extremely devastating psionic ability is trademark technique of Protoss 4 | High Templar. No one has the skill to wield it like they do but nonetheless 5 | other users are still very dangerous when invoking it. 6 | 7 | The Psionic Storm requires only eight points to use it but will @Cdrain whole 8 | Psionic reserve@H upon successful use. 9 | 10 | Moreover every invocation of the power accumulates a penalty of @C-10%@H for 11 | further attempts of summonig the storm. The damage can be @Clessened@H by 12 | application of @CKhaydarin crystal shard@H by @C%5@H for each @Ccharge@H. 13 | 14 | Range: unlimited 15 | Damage: 5 to 25 psychic, 3 to 9 stunning, 3 to 9 confusing 16 | -------------------------------------------------------------------------------- /src/support/listgen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This is for creating list of monsters and items 3 | # for checking which entries have lore. 4 | for (( i=0; i<2; ++i )); do 5 | if [ $i -eq 0 ]; then 6 | list=`grep kObj gen/ObjectIlk.h | grep -v \=` 7 | else 8 | list=`grep kMon gen/MonsterIlk.h | grep -v \=` 9 | fi 10 | sum=0; 11 | numlore=0; 12 | for entry in $list; do 13 | sum=$((sum+1)); 14 | lore=`grep $entry gen/Lore.cpp | grep -v glb_` 15 | if [ -z "$lore" ]; then 16 | lore=' (no lore)'; 17 | else 18 | numlore=$((numlore+1)); 19 | fi 20 | printf "%-30s %s\n" $entry "$lore" 21 | done 22 | echo 23 | printf "%d/%d\n" $numlore $sum 24 | echo 25 | done 26 | -------------------------------------------------------------------------------- /src/FeatureToggle.h: -------------------------------------------------------------------------------- 1 | /* Save on crash feature. May need to be turned off if PRIME crashes 2 | right after running the executable. */ 3 | #define CATCH_SIGSEGV 4 | /* When recompiling delete: main.o */ 5 | 6 | /* Playing through PuTTY or from some terminals causes number pad to behave 7 | in very bad manner. Defining this prevents using NCurses keypad translation 8 | and allows using number pad in most cases. */ 9 | //#define NO_CURSES_KEYPAD 10 | /* When recompiling delete: NCUI.o */ 11 | 12 | /* The NO_CURSES_KEYPAD define is planned to become an option from 2.3. (well, it did not make there) */ 13 | 14 | /* Default to I/O handled by Free Pascal libs. NCurses proved to be unreliable on newest Mac OS X for unknwon reason. */ 15 | //#define USE_FPC 16 | /* When recompiling delete: main.o */ 17 | -------------------------------------------------------------------------------- /src/Property.h: -------------------------------------------------------------------------------- 1 | #ifndef PROPERTY_H 2 | #define PROPERTY_H 3 | #include "Intrinsic.h" 4 | 5 | namespace cond { 6 | enum shTrigger { 7 | carry = 0x0000, 8 | buggy = 0x0001, 9 | debugged = 0x0002, 10 | optimized = 0x0004, 11 | nonbuggy = 0x0008, 12 | toggled = 0x0010, 13 | not_toggled = 0x0020, 14 | active = 0x0040, 15 | inactive = 0x0080, 16 | wielded = 0x0100, 17 | worn = 0x0200, 18 | has_charges = 0x0400, 19 | uncovered = 0x0800, 20 | on_bare_skin = 0x1000, 21 | mult_chg = 0x2000, 22 | mult_enhc = 0x4000, 23 | sword_skill = 0x8000 24 | }; 25 | } 26 | 27 | struct shProperties 28 | { 29 | int cond; 30 | shIntrinsic intr; 31 | int value; 32 | }; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /docs/wiki/LackRef.txt: -------------------------------------------------------------------------------- 1 | Material we could use for references and yet haven't: 2 | 3 | Solaris - This is classic, but oscillates between academic, down-to-earth and psychedelic, so might be hard to nail. 4 | 5 | Stalker - Even weirder than the above but could justify a Major Wishing mechanic / artifact 6 | 7 | Lord of Light ? It's rather obscure but we both have read it. (I vaguely remember stuff about godlike psychic powers, rejuvenation, soul transplant and hindu pantheon impersonation. 8 | 9 | Ringworld - From here can be pulled several monsters (Kzinti could very well be more 'k's, their hat is proud warrior race just as the klingons, Pak Protectors could extend the P category) and some friendly aliens and devices too. 10 | 11 | I can't believe we don't have any martians. 12 | 13 | Batman - batarang and other bat-stuff. 14 | -------------------------------------------------------------------------------- /src/osx/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | PRIME 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | prime 11 | CFBundleIconFile 12 | iconfile.icns 13 | CFBundleIdentifier 14 | pl.republika.arcywidmo 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | 24 | 25 | -------------------------------------------------------------------------------- /data/help/thevoice.txt: -------------------------------------------------------------------------------- 1 | @LThe Voice @E(Intelligence) @J(Coercion)@H 2 | 3 | Discipline of manipulating speech to implant a message or order in individual's 4 | subconscous. The resulting compulsion to obey is strong enough to overpower 5 | one's free will. 6 | 7 | Using the power on enemy you will issue a command. Possible orders: 8 | - You will not read the Nam-Shub! (forbids computer usage) 9 | - You will not indulge your mutant nature! (forbids mutant power use) 10 | - You will not show belligerence! (forbids combat) 11 | - You will not feast upon the poor! (forces generosity) 12 | - You will not bear petty grudges! (pacifies offended friendly) 13 | 14 | Command chosen is random from the list of those than make sense. 15 | 16 | Duration: from 3 up to skill, but never less than 3 turns 17 | -------------------------------------------------------------------------------- /data/help/digestion.txt: -------------------------------------------------------------------------------- 1 | @LDigestion @E(Constitution) @J(Translation)@H 2 | 3 | You can eat and digest virtually anything without incurring any side 4 | effects bad or good. This power comes with super flexibility to eat 5 | items that you have equipped but consuming worn eyewear, worn helmets 6 | and installed cranial bionic implants is going to be difficult until 7 | they are removed. Mainly useful to get rid of some buggy stuff. 8 | 9 | However, it has been observed you can get @Esick@H from eating floppy 10 | @Cdisks containing viruses@H for some bizarre reason. 11 | 12 | If you have at least @C3 skill points@H in this power your tongue can 13 | become briefly long enough to @Csnatch worn eyewear@H with ease. 14 | 15 | To make your tongue have enough force to @Ctake off worn helmet@H you 16 | need to have at least @C6 skill points@H in digestion. 17 | -------------------------------------------------------------------------------- /data/help/hellbentcharge.txt: -------------------------------------------------------------------------------- 1 | @LHellbent Charge @E(Constitution) @J(Telekinesis)@H 2 | 3 | You rush a short distance and make stronger melee attack. This does not 4 | guarantee hitting. 5 | 6 | If @Cin a pit@H you may charge @Cupwards@H to quickly get out. 7 | 8 | You are @Eunable@H to perform this feat when @Eslowed@H, @Esore@H, @Efrightened@H or @Estrained@H 9 | and worse. 10 | 11 | To hit modifier: skill / 2 + bonus / 2 12 | To damage modifier: skill / 4 + bonus 13 | 14 | Bonus starts from zero (or 3 if you are @Cspeedy@H) and increases by two points 15 | for each square you run. 16 | 17 | Range increase is non-linear. It starts at two: 18 | 19 | | range | skill | 20 | +---------+---------+ 21 | | 2 | 0 | 22 | | 3 | 2 | 23 | | 4 | 5 | 24 | | 5 | 9 | 25 | | 6 | 14 | 26 | | 7 | 20 | 27 | -------------------------------------------------------------------------------- /data/help/attribute.txt: -------------------------------------------------------------------------------- 1 | @CABILITIES@H 2 | 3 | 4 | You can increase an ability every fourth character level. 5 | 6 | 7 | @FStrength:@H Affects your carrying capacity and the damage you do in 8 | combat with melee weapons or your bare hands. 9 | 10 | @FConstitution@H: Figures in to your hit point total. 11 | 12 | 13 | @FDexterity@H: Helps (or hurts) your shooting ability. Important for 14 | many manual skills like repairing and picking locks. 15 | 16 | @FAgility@H: Improves your armor class and your chances of landing a 17 | blow in melee combat. Helps you dodge certain attacks. 18 | 19 | @FIntelligence@H: Important to your computer hacking skills and certain 20 | other intellectual pursuits. 21 | 22 | @FPsionics@H: Represents your psionic ability. Also a measure of how 23 | charming you are. 24 | -------------------------------------------------------------------------------- /src/support/nevergen.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | my ( @tmp, @items, @ilks, @missing, $file ); 3 | open $file, "<", "ItemSet.cpp" or die "problem - ItemSet.cpp"; 4 | @tmp = <$file>; 5 | close $file; 6 | 7 | foreach ( @tmp ) { 8 | if ( /kObj/ ) { 9 | /(kObj\w*)/; 10 | chomp $_; 11 | push (@items, $1); 12 | } 13 | } 14 | 15 | open $file, "<", "gen/ObjectIlk.h" or die "problem - ObjectIlk.h"; 16 | @tmp = <$file>; 17 | close $file; 18 | 19 | foreach ( @tmp ) { 20 | if ( /kObj/ and not /\=/ ) { 21 | /(kObj\w*)/; 22 | chomp $_; 23 | push (@ilks, $1); 24 | } 25 | } 26 | 27 | foreach my $ilk ( @ilks ) { 28 | my $flag = 1; 29 | foreach $item ( @items ) { 30 | if ( $item eq $ilk ) { 31 | $flag = 0; 32 | last; 33 | } 34 | } 35 | push (@missing, $ilk) if $flag == 1; 36 | } 37 | 38 | foreach ( @missing ) { 39 | print "$_\n"; 40 | } 41 | -------------------------------------------------------------------------------- /src/Services.h: -------------------------------------------------------------------------------- 1 | #ifndef SERVICES_H 2 | #define SERVICES_H 3 | 4 | struct shServiceDescData { 5 | char mDesc[40]; 6 | int mNameKnown; 7 | }; 8 | enum MedicalProcedures { 9 | kMedHealing = 0, 10 | kMedRestoration, 11 | kMedRectalExam, 12 | kMedDiagnostics, 13 | kMedRadPurification, 14 | kMedCaesareanSection, 15 | kMedCanisterAmputation, 16 | kMedTeefExtraction, 17 | kMedTailAmputation, 18 | kMedImplantExtraction, 19 | kMedMaxService 20 | }; 21 | extern struct shServiceDescData MedicalProcedureData[kMedMaxService]; 22 | 23 | enum MelnormeServices { 24 | kMelnRevealBugginess, 25 | kMelnRevealCharges, 26 | kMelnRevealEnhancement, 27 | kMelnRevealAppearance, 28 | kMelnRandomIdentify, 29 | kMelnMaxService 30 | }; 31 | /* Space reserved for six descriptions to have one more name to shuffle. */ 32 | extern struct shServiceDescData MelnormeServiceData[6 /* kMelnMaxService */ ]; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /docs/zapm/SKILLZ: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | skill system ideas... 5 | 6 | rename 'unarmed' to 'hand-to-hand' (maybe 'Kung Fu') 7 | 8 | levels: 9 | +Hit +Damage Ranks Special 10 | Untrained Offhand -8 -4 - 11 | Untrained -4 -1 0 12 | Basic 0 0 4 13 | Skilled +2 +1 8 pistol whip, throw to square 14 | Expert +4 +2 12 wield two-handed weap in 15 | main hand (but not in off hand) 16 | 17 | 18 | 19 | rename hacking to "computer programming" 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | OFFHAND Weapons 30 | 31 | new 'e'quip command for wielding 2nd weapon? 32 | 33 | TWO-HANDED GUN: 34 | 'F' will use butt of rifle 35 | 36 | 37 | TWO GUNS: 38 | 'f' will fire both, but take only elapse max (weapon1 time, weapon2 time) 39 | 'F' will pistol whip with both 40 | 41 | -------------------------------------------------------------------------------- /src/CrType.h: -------------------------------------------------------------------------------- 1 | #ifndef CRTYPE_H 2 | #define CRTYPE_H 3 | 4 | enum shCreatureType { 5 | /* non-living: */ 6 | kBot, 7 | kDroid, 8 | kProgram, 9 | kConstruct, 10 | /* living: */ 11 | kEgg, 12 | kOoze, 13 | /* living, and has mind: */ 14 | kCyborg, 15 | kAberration, 16 | kAnimal, 17 | kAlien, 18 | kBeast, 19 | kHumanoid, 20 | kMutant, /* mutant humanoid */ 21 | kInsect, 22 | kOutsider, 23 | kVermin, 24 | kZerg, 25 | kMaxCreatureType 26 | }; 27 | #define HAS_MIND(_crtype) (_crtype > kOoze) 28 | #define IS_ROBOT(_crtype) (_crtype <= kDroid) 29 | #define IS_ALIVE(_crtype) (_crtype > kConstruct) 30 | 31 | enum shCreatureSymbols { 32 | kSymBot = 'x', 33 | kSymCritter = 'c', 34 | kSymDroid = 'X', 35 | kSymGray = 'g', 36 | kSymHero = '@', 37 | kSymHumanoid = 'h', 38 | kSymInsect = 'i', 39 | kSymSlime = 's', 40 | kSymWorm = 'w', 41 | kSymZerg = 'Z' 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo For Mac OS X use \"$(MAKE) -f makefile.osx\" 3 | @echo For Linux use \"$(MAKE) -f makefile.std\" 4 | @echo Optionally append target argument 5 | @echo 6 | @echo Valid targets: 7 | @echo ' (nothing) - default' 8 | @echo ' all - default' 9 | @echo ' single - creates binary for single user' 10 | @echo ' multi - creatres distribution with shared high score' 11 | @echo ' table; suitable for placing on servers' 12 | @echo ' install - places files in system locations' 13 | @echo ' (needed for 'multi' target)' 14 | @echo ' app-osx - on Mac OS X only this builds an application' 15 | @echo ' console - creates binary for single user without support for' 16 | @echo ' Necklace of the Eye graphical frontend compiled in' 17 | @echo ' multiconsole- for Linux only this creates binary suitable for use' 18 | @echo ' by many users but without graphical frontend support' 19 | @echo 20 | -------------------------------------------------------------------------------- /data/intro/janitor.txt: -------------------------------------------------------------------------------- 1 | Oi kusin Noshkop! 2 | 3 | Ya recall dat blabbing bout putting ol' Skragashuv back in biznes? 4 | 5 | Well me found one of dem Ur Magnetrons ya need for the warp 6 | gubbinz to rev up. 7 | 8 | I gab it all cleverly thott. 9 | 10 | Dere's dis Space Base, wiv all sorta loot, an a Ur Mangegubbin 11 | sittin' all alone in da bottom. An dey lookin' fer a jenitar! 12 | 13 | Dis 'janiter' is s'posed to go into dis 'ulk an get rid of any 14 | panzees, beekees, roaches sittin' dere an clean up all da mess 15 | dem making in the 'ulk. 16 | 17 | Sum one to "clean da mess up"! Got it!? 18 | 19 | Im sure gonna lick da place clean. I Can go anywhere I like cos 20 | I'm some sorta junitor, anything dats not bolted to da floor is 21 | mine, an nobody's messin wiv meh cos I'm a ork. 22 | 23 | So you start savin' dem teef cus Im a bringin dat magnefing. 24 | 25 | Oh if you'z not up fer it, dun worry, I'll just clobber you up da 26 | head so bad you'll be seein stars by day but no bad feelins kusin. 27 | 28 | ~*heroname* 29 | -------------------------------------------------------------------------------- /src/lua/backward.lua: -------------------------------------------------------------------------------- 1 | -- Necklace of the Eye v7.6 roguelike frontend 2 | -- Copyright (C) 2010-2014 Zeno Rogue, see noteye.lua for details 3 | 4 | -- this file is supposed to ensure backward compatibility. 5 | -- The function backwardcompatible() tries to fix some outdated things about 6 | -- old NOE files, or at least emit a warning about what should be done. 7 | -- (Currently it does not do much, unfortunately.) 8 | -- Look at the comments at the bottom to read about other changes that might 9 | -- affect your old NOE file. 10 | 11 | mapregion = nil 12 | 13 | function backwardcompatible() 14 | if D.minipos then V.be(D.minipos) end 15 | if mapregion then 16 | D.map = rectXY(mapregion.x0, mapregion.y0, mapregion.x1, mapregion.y1) 17 | end 18 | V.be(D.tilesize) 19 | end 20 | 21 | 22 | -- Other changes: 23 | 24 | -- NotEye uses vectors (see vectors.lua) instead of {x=..., y=...} tables. 25 | -- If you have {x=XX, y=YY} somewhere, you should probably use V(XX,YY) 26 | -- instead. 27 | 28 | -- There are also major changes in the display-related functions. 29 | -------------------------------------------------------------------------------- /src/Scenario.cpp: -------------------------------------------------------------------------------- 1 | #include "Scenario.h" 2 | #include "Util.h" 3 | 4 | Scenario Scen; 5 | 6 | struct _scen_internal 7 | { 8 | shObjId vat_bubbly_beverage; 9 | }; 10 | 11 | void 12 | Scenario::save_state (FILE *f) 13 | { 14 | fprintf (f, "%u\n", m->vat_bubbly_beverage); 15 | } 16 | 17 | bool 18 | Scenario::load_state (FILE *f) 19 | { 20 | int n_read; 21 | n_read = fscanf (f, "%u", (unsigned int *) &m->vat_bubbly_beverage); 22 | return n_read == 1; 23 | } 24 | 25 | void 26 | Scenario::generate () 27 | { 28 | m = new _scen_internal; 29 | 30 | shObjId beverage_candidate[] = 31 | { 32 | kObjBeer, 33 | kObjNanoCola, 34 | kObjNukaCola, 35 | kObjB3, 36 | kObjCoffee 37 | }; 38 | const int beverages = sizeof (beverage_candidate) / sizeof (shObjId); 39 | 40 | m->vat_bubbly_beverage = beverage_candidate[RNG (beverages)]; 41 | } 42 | 43 | void 44 | Scenario::clear () 45 | { 46 | delete m; 47 | } 48 | 49 | shObjId 50 | Scenario::bubbly_beverage () 51 | { 52 | return m->vat_bubbly_beverage; 53 | } 54 | -------------------------------------------------------------------------------- /docs/licenses/MIT_license.txt: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), to deal 3 | in the Software without restriction, including without limitation the rights 4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 5 | copies of the Software, and to permit persons to whom the Software is 6 | furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in 9 | all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 17 | THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /docs/licenses/README-SDL_image.txt: -------------------------------------------------------------------------------- 1 | This library is distributed under the terms of the zlib license: 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | 19 | The source is available from the libraries page at the SDL website: 20 | http://www.libsdl.org/ 21 | -------------------------------------------------------------------------------- /docs/licenses/README-SDL_mixer.txt: -------------------------------------------------------------------------------- 1 | This library is distributed under the terms of the zlib license: 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | 19 | The source is available from the libraries page at the SDL website: 20 | http://www.libsdl.org/ 21 | -------------------------------------------------------------------------------- /docs/licenses/README-SDL_net.txt: -------------------------------------------------------------------------------- 1 | This library is distributed under the terms of the zlib license: 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | 19 | The source is available from the libraries page at the SDL website: 20 | http://www.libsdl.org/ 21 | -------------------------------------------------------------------------------- /data/intro/astronaut.txt: -------------------------------------------------------------------------------- 1 | You had been tasked with the first test flight of the Quantum IV 2 | hyperspace engine. Just as you flew clear of any gravity wells, you 3 | deccelerated and began recording the experiment logs. Main power 4 | diverted to the prototype engine, all systems green. All systems? No! 5 | The flux capacitor displays in red! Without a second thought, you fasten 6 | your space helmet on, and with an adept kick you deftly propel yourself 7 | to an emergency pod, all the while screaming OH SHIT OH SHIT OH SHIT 8 | at the top of your lungs. 9 | 10 | From a couple miles away, you see the spaceship liquefy and fold into 11 | itself as it's sucked away from within by some sort of warp-hole. 12 | You broadcast what you think are your last words, full with excrement 13 | slang and considerations about the dubious parentage and upbringing 14 | of the shipyard CEO, among other colorful expletives. 15 | 16 | After passing out from a panic attack, and through the warp rift, you find 17 | yourself orbiting a derelict asteroid turned space station. With nothing 18 | to lose except your life, you dock and set out to explore its bowels. 19 | -------------------------------------------------------------------------------- /src/tablemk/tablemaker.l: -------------------------------------------------------------------------------- 1 | %{ 2 | #include "tablemaker.tab.h" 3 | 4 | char *names[4] = 5 | { 6 | "DEFINE", 7 | "DECLARE", 8 | "TEMPLATE", 9 | "" 10 | }; 11 | 12 | %} 13 | 14 | QUOTED \"[^\"]+\" 15 | LIST \([^\)]+\) 16 | IDENTIFIER [[:graph:]]+ 17 | 18 | %option noyywrap 19 | 20 | %% 21 | "COMMENT"[\t\n ]*"{"[^}]*"}" { yylval.ival = yyleng; return COMMENT; } 22 | "DEFINE" { strcpy(yylval.token, names[0]); return DEFINE; } 23 | "DECLARE" { strcpy(yylval.token, names[1]); return DECLARE; } 24 | "TEMPLATE" { strcpy(yylval.token, names[2]); return TEMPLATE; } 25 | "\{" { return LP; } 26 | "\}" { return RP; } 27 | ";" { return ';'; } 28 | {QUOTED} { strncpy(yylval.token, yytext, 70); yylval.token[69] = 0; return WORD; } 29 | {LIST} { strncpy(yylval.token, yytext, 70); yylval.token[69] = 0; return WORD; } 30 | {IDENTIFIER} { strncpy(yylval.token, yytext, 70); yylval.token[69] = 0; return WORD; } 31 | [\t\n ]+ { } 32 | . { printf("problem with: '%s'", yytext); exit(1); } 33 | %% 34 | -------------------------------------------------------------------------------- /user/keymap/prime.cfg: -------------------------------------------------------------------------------- 1 | # PRIME 2 | # movement 3 | move SW = 1 4 | move S = 2 5 | move SE = 3 6 | move W = 4 7 | move E = 6 8 | move NW = 7 9 | move N = 8 10 | move NE = 9 11 | move SW = end 12 | move SE = page down 13 | move NW = home 14 | move NE = page up 15 | move N = up arrow 16 | move S = down arrow 17 | move W = left arrow 18 | move E = right arrow 19 | rest = keypad 5 20 | rest = 5 21 | move up = < 22 | move down = > 23 | run = v 24 | # meta actions 25 | help = ? 26 | help = fn 1 27 | main menu = escape 28 | toggle autopickup = # 29 | show message history = y 30 | # with items 31 | adjust inventory = j 32 | show inventory = i 33 | show inventory = space 34 | pick up = g 35 | pick up all = tab 36 | drop = d 37 | multi drop = m 38 | throw = t 39 | shoot = f 40 | wield = h 41 | wear = w 42 | take off = r 43 | apply = a 44 | quaff = q 45 | examine = e 46 | execute = x 47 | zap ray gun = z 48 | name = n 49 | pay = p 50 | swap = ' 51 | # other 52 | character screen = @ 53 | discoveries = \ 54 | look around = l 55 | open = o 56 | close = c 57 | kick = k 58 | skills = s 59 | use mutant power = u 60 | # debug 61 | debug command = ` 62 | -------------------------------------------------------------------------------- /docs/licenses/MIT_license_LUA.txt: -------------------------------------------------------------------------------- 1 | Copyright © 1994–2013 Lua.org, PUC-Rio. 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to deal 4 | in the Software without restriction, including without limitation the rights 5 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 6 | copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in 10 | all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 18 | THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /user/keymap/adom.cfg: -------------------------------------------------------------------------------- 1 | # ADOM 2 | # movement 3 | move SW = 1 4 | move S = 2 5 | move SE = 3 6 | move W = 4 7 | rest = 5 8 | move E = 6 9 | move NW = 7 10 | move N = 8 11 | move NE = 9 12 | move SW = end 13 | move SE = page down 14 | move NW = home 15 | move NE = page up 16 | move N = up arrow 17 | move S = down arrow 18 | move W = left arrow 19 | move E = right arrow 20 | rest = keypad 5 21 | rest = . 22 | move up = < 23 | move down = > 24 | # semi-automated movement 25 | run = w 26 | # meta actions 27 | help = ? 28 | help = fn 1 29 | main menu = escape 30 | toggle autopickup = ! 31 | show message history = ^m 32 | # with items 33 | adjust inventory = A 34 | show inventory = i 35 | pick up = , 36 | pick up all = tab 37 | drop = d 38 | multi drop = ^d 39 | throw = t 40 | shoot = f 41 | wield = e 42 | wear = W 43 | take off = T 44 | apply = u 45 | quaff = D 46 | examine = v 47 | execute = x 48 | zap ray gun = z 49 | name = N 50 | pay = p 51 | swap = ' 52 | # other 53 | character screen = @ 54 | discoveries = \ 55 | look around = l 56 | open = o 57 | close = c 58 | kick = k 59 | skills = ^w 60 | use mutant power = m 61 | # debug 62 | debug command = ` 63 | -------------------------------------------------------------------------------- /user/keymap/drl.cfg: -------------------------------------------------------------------------------- 1 | # DoomRL/ADOM 2 | # movement 3 | move SW = 1 4 | move S = 2 5 | move SE = 3 6 | move W = 4 7 | rest = 5 8 | move E = 6 9 | move NW = 7 10 | move N = 8 11 | move NE = 9 12 | move SW = end 13 | move SE = page down 14 | move NW = home 15 | move NE = page up 16 | move N = up arrow 17 | move S = down arrow 18 | move W = left arrow 19 | move E = right arrow 20 | rest = . 21 | rest = keypad 5 22 | move up = < 23 | move down = > 24 | # semi-automated movement 25 | run = , 26 | # meta actions 27 | help = ? 28 | help = fn 1 29 | main menu = escape 30 | toggle autopickup = # 31 | show message history = P 32 | # with items 33 | adjust inventory = A 34 | show inventory = i 35 | pick up = g 36 | pick up all = tab 37 | drop = d 38 | multi drop = ^d 39 | throw = t 40 | shoot = f 41 | wield = w 42 | wear = W 43 | take off = ^w 44 | apply = u 45 | quaff = D 46 | examine = v 47 | execute = x 48 | zap ray gun = z 49 | name = N 50 | pay = p 51 | swap = ' 52 | # other 53 | character screen = @ 54 | look around = l 55 | discoveries = \ 56 | open = o 57 | close = c 58 | kick = k 59 | skills = T 60 | use mutant power = m 61 | # debug 62 | debug command = ` 63 | -------------------------------------------------------------------------------- /user/keymap/band_orig.cfg: -------------------------------------------------------------------------------- 1 | # Angband (original keys) 2 | # movement 3 | move SW = 1 4 | move S = 2 5 | move SE = 3 6 | move W = 4 7 | rest = 5 8 | rest = g 9 | move E = 6 10 | move NW = 7 11 | move N = 8 12 | move NE = 9 13 | move SW = end 14 | move SE = page down 15 | move NW = home 16 | move NE = page up 17 | move N = up arrow 18 | move S = down arrow 19 | move W = left arrow 20 | move E = right arrow 21 | rest = keypad 5 22 | move up = < 23 | move down = > 24 | # semi-automated movement 25 | run = . 26 | # meta actions 27 | help = ? 28 | help = fn 1 29 | main menu = escape 30 | toggle autopickup = # 31 | show message history = ^p 32 | # with items 33 | adjust inventory = A 34 | show inventory = i 35 | pick up = , 36 | pick up all = tab 37 | drop = d 38 | multi drop = D 39 | throw = v 40 | shoot = f 41 | wield = w 42 | wear = W 43 | take off = t 44 | apply = a 45 | quaff = q 46 | examine = I 47 | execute = x 48 | zap ray gun = z 49 | name = { 50 | pay = p 51 | swap = ' 52 | # other 53 | character screen = @ 54 | look around = l 55 | discoveries = ` 56 | open = o 57 | close = c 58 | kick = B 59 | skills = E 60 | use mutant power = m 61 | # debug 62 | debug command = ! 63 | -------------------------------------------------------------------------------- /user/keymap/nh_novi.cfg: -------------------------------------------------------------------------------- 1 | # NetHack without vi keys 2 | # movement 3 | move SW = 1 4 | move S = 2 5 | move SE = 3 6 | move W = 4 7 | move E = 6 8 | move NW = 7 9 | move N = 8 10 | move NE = 9 11 | move SW = end 12 | move SE = page down 13 | move NW = home 14 | move NE = page up 15 | move N = up arrow 16 | move S = down arrow 17 | move W = left arrow 18 | move E = right arrow 19 | rest = keypad 5 20 | rest = 5 21 | rest = . 22 | move up = < 23 | move down = > 24 | # semi-automated movement 25 | run = g 26 | # meta actions 27 | help = ? 28 | help = fn 1 29 | main menu = escape 30 | toggle autopickup = # 31 | show message history = ^p 32 | # with items 33 | adjust inventory = A 34 | show inventory = i 35 | pick up = , 36 | pick up all = tab 37 | drop = d 38 | multi drop = D 39 | throw = t 40 | shoot = f 41 | wield = w 42 | wear = W 43 | take off = T 44 | apply = a 45 | quaff = q 46 | examine = v 47 | execute = r 48 | zap ray gun = z 49 | name = N 50 | pay = p 51 | swap = x 52 | # other 53 | character screen = @ 54 | discoveries = \ 55 | look around = / 56 | open = o 57 | close = c 58 | kick = k 59 | skills = E 60 | use mutant power = m 61 | # debug 62 | debug command = ` 63 | -------------------------------------------------------------------------------- /docs/zapm/notes.txt: -------------------------------------------------------------------------------- 1 | nifty weapon ideas: 2 | 3 | rail gun 4 | 5 | comestibles: 6 | 7 | spice 8 | 9 | 10 | 11 | CHARACTER CLASSES 12 | 13 | 14 | 15 | multicoder software 16 | 17 | 18 | 19 | antigravity 20 | 21 | 22 | 23 | space colony: 24 | 25 | orbiting a remote star, the abandoned spaceship of doom is 26 | 27 | 28 | BAD GUYS: 29 | 30 | WH40K 31 | tyranid warrior 32 | genestealer 33 | space ork 34 | wierdboy 35 | squat 36 | 37 | ALIENS 38 | alien egg 39 | facehugger implant attack 40 | chest burster 41 | alien warrior 42 | queen alien 43 | 44 | PREDATOR 45 | predator 46 | 47 | TERMINATOR 48 | Terminator 49 | T-1000 50 | 51 | 52 | DUNE 53 | sand worm 54 | 55 | 56 | STAR WARS 57 | rancor 58 | tom-tom 59 | stormtrooper 60 | protocol droid 61 | astromech droid 62 | Darth Vader 63 | 64 | METROID 65 | metroid 66 | Kraid 67 | Ridley 68 | 69 | STAR TREK 70 | Borg 71 | Ferengi 72 | Klingon Warrior 73 | Vulcan 74 | 75 | TRON 76 | grid bug 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | asphyxiation - con check every round -> confusion -> death 87 | 88 | vacuum exposure - causes asphyxia, 6d6 damage per round 89 | 90 | radiation sickness - 91 | -------------------------------------------------------------------------------- /docs/wiki/ProfessionTitles.txt: -------------------------------------------------------------------------------- 1 | ---++ Titles 2 | 3 | ---+++ Psyker 4 | 5 | | *Psion* | *Mastermind* | *Empath* | *Warphead* | 6 | | Odd Ball | Far Herald | Seeker | Crazy One | 7 | | Weirdo | Space Brother | Enlightened One | Mad Orc | 8 | | Mind Reader | Cult Idol | Mind Mirror | Very Mad Orc | 9 | | Spoon Bender | First Contact | Thought Catcher | Frazzler | 10 | | Freakazoid | Federation Envoy | Subconscious Link | Humming Head | 11 | | Mutant | Galactic Senator | Psionic Vein | Head Asploder | 12 | | Empath | Coadunator | Brainwave Warper | Walking Psi Bomb | 13 | | Psion | Uplifter | Neuroconductor | One Orc Storm | 14 | | Psyker | Terraformer | Mind Overlord | Warptide | 15 | | Farseer | Astronaut God | Fate Weaver | Warp Unleasher | 16 | 17 | ---+++ Soldier 18 | 19 | | *Space Marine* | *Stormboy* | *Hunter* | 20 | | Private | Yoof | Unblooded | 21 | | Corporal | Cannon Fodder | Blooded | 22 | | Sergeant | Meatshield | Hunter | 23 | | Cadet | Warbuddy | Honored One | 24 | | Lieutentant | Skarboy | Master Hunter | 25 | | Captain | Mob Kaptain | Vanguard | 26 | | Major | Nob | Elite | 27 | | Lt. Colonel | Meganob | Clan Leader | 28 | | Colonel | Warboss | Elder | 29 | | General | Waagh Lord | Adjudicator | 30 | -------------------------------------------------------------------------------- /data/intro/marine.txt: -------------------------------------------------------------------------------- 1 | Two weeks. Two weeks trapped inside that damned cargo pod with only 2 | the requisition clerkbot to keep company. And the terrors outside. You 3 | told him. YOU TOLD HIM. Don't buy those damn "krab patties", Johnny. 4 | You don't know what that "krab" is, you never know with these backwater 5 | agriworlds! He laughed on you. You told them. I wouldn't eat those 6 | damn "krab patties" guys, Johnny bought'em off a weird looking yellow guy 7 | in a fishbowl! They scorned you, and their laughter echoed through the 8 | mess hall. Go eat your frozen earth shitburgers, they said. You're being 9 | hypochondriac, these krab patties are awesome - but don't worry, I'll 10 | take yours. And they laughed. 11 | 12 | WELL WHO'S LAUGHING NOW WITH HIS GUTS SPRAYED ALL OVER THE DINNER TABLE, 13 | JOHNNY?! WHO'S LAUGHING WITH HIS LUNGS OOZING OUT OF HIS EXPLODED CHEST?!! 14 | 15 | Not me! I'm getting out of this graveyard ship, and calling back to command, 16 | however long it takes. I'm going to be the most frickin' condecorated marine 17 | this side of the Perdus rift. And your sorry asses will rot in that 18 | MOTHERFUCKING DEATH TRAP FOREVER!!! 19 | 20 | So long, bastards. 21 | 22 | ~*heroname* 23 | -------------------------------------------------------------------------------- /data/help/shockwave.txt: -------------------------------------------------------------------------------- 1 | @LShockwave @E(Psionics) @J(Telekinesis)@H 2 | 3 | You create a outburst of energy centered at you that damages all adjacent 4 | creatures and hurls them back. 5 | 6 | Blast damage: 7 | Minimum: skill - 10, but no less than 1 8 | Maximum: skill + 7, but no less than 7 9 | 10 | Anything that survives that is pushed away. Range starts at one or two randomly 11 | and is modified according to your skill: 12 | 13 | | range | skill | | range | skill | 14 | +---------+---------+ +---------+---------+ 15 | | 1 | 0 | | 2 | 0 | 16 | | 2 | 1 | | 3 | 2 | 17 | | 3 | 3 | | 4 | 5 | 18 | | 4 | 6 | | 5 | 9 | 19 | | 5 | 10 | | 6 | 14 | 20 | | 6 | 15 | | 7 | 20 | 21 | | 7 | 21 | | 8 | 27 | 22 | | 8 | 28 | | ... | ... | 23 | | ... | ... | | ... | ... | 24 | 25 | If creature collides with something it takes damage on impact: 26 | 27 | Collision damage: 1 + bonus to 10 + bonus * 2 28 | Collision stun: 1 + bonus / 4 to 2 + bonus / 3 29 | 30 | Bonus starts at zero and increases by two point per each square flown through. 31 | -------------------------------------------------------------------------------- /src/lua/game.lua: -------------------------------------------------------------------------------- 1 | -- which version of NotEye is this noe-file compatible with 2 | gamenoteyever = 0x750 3 | 4 | minipos = {x=1, y=0.1} 5 | mapregion = {x0=0, y0=2, x1=80, y1=22} 6 | 7 | if not noteyedir then 8 | noteyedir = (os.getenv ("NOTEYEDIR") or ".").."/" 9 | end 10 | 11 | if not noteyeloaded then 12 | --game_to_launch = "prime" 13 | dofile (noteyedir.."lua/noteye.lua") 14 | end 15 | 16 | dofile(commondir.."generic-tile.lua") 17 | 18 | function xtileaux2(ch, co, av, ba) 19 | 20 | if ch == "/" and (co == vgaget(6) or co == vgaget(4)) then 21 | return tspatc(rb, spFlat + spFloor + spCeil + spIFloor, ch) 22 | elseif ch == "+" and (co == vgaget(6) or co == vgaget(4)) then 23 | return tspatm(wallcol(co), rb, ssWall, ch) 24 | elseif ch == "=" then 25 | return lavacol(co) 26 | elseif ch == "%" then 27 | return tspatc(rb, spFloor + spIItem, ch) 28 | elseif ch == "0" or ch == "!" then 29 | return tspat(rb, ssMon, ch) 30 | end 31 | end 32 | 33 | disablemusic() 34 | 35 | dirkeys = keytabs.arrow 36 | 37 | defaultmodep(modeASCII, 6) 38 | setwindowtitle("Doom: the Roguelike") 39 | --rungame(caller3("DoomRL", "doomrl")) 40 | rungame("whatever") 41 | -------------------------------------------------------------------------------- /src/noteye/font.cpp: -------------------------------------------------------------------------------- 1 | // Necklace of the Eye v6.2 2 | // roguelike frontend 3 | // Copyright (C) 2010-2011 Zeno Rogue, see 'noteye.h' for details 4 | 5 | namespace noteye { 6 | 7 | Font *newFont(Image *base, int inx, int iny, int trans) { 8 | Font *F = new Font; 9 | int sx = base->s ? base->s->w : 0; 10 | int sy = base->s ? base->s->h : 0; 11 | int dx = sx / inx; 12 | int dy = sy / iny; 13 | F->cnt = inx * iny; 14 | F->ti = new int[F->cnt]; 15 | for(int i=0; iti[i] = 17 | addTile(base, dx * (i % inx), dy * (i / inx), dx, dy, trans); 18 | (byId (F->ti[i], NULL))->chid = i; 19 | } 20 | return F; 21 | } 22 | 23 | #ifdef USELUA 24 | int lh_newfont(lua_State *L) { 25 | checkArg(L, 4, "newfont"); 26 | return noteye_retObject(L, newFont(luaO(1, Image), luaInt(2), luaInt(3), luaInt(4))); 27 | } 28 | 29 | int lh_getchar(lua_State *L) { 30 | checkArg(L, 2, "getchar"); 31 | return noteye_retInt(L, luaO(1, Font)->ti[(unsigned char) (luaStr(2)[0])]); 32 | } 33 | 34 | int lh_getcharav(lua_State *L) { 35 | checkArg(L, 2, "getchar"); 36 | int i = luaInt(2); 37 | Font *f = luaO(1, Font); 38 | if(i < 0 || i >= f->cnt) return 0; 39 | return noteye_retInt(L, f->ti[i]); 40 | } 41 | #endif 42 | 43 | } 44 | -------------------------------------------------------------------------------- /data/help/writing.txt: -------------------------------------------------------------------------------- 1 | @CPROGRAMMING@H 2 | 3 | Programming is a difficult activity. You set out to write a new program 4 | and hope it does not have bugs after you are done. There are a few things 5 | that affect your success rate: 6 | 7 | 8 | @FCondition@H @Fchance@H @Fnotes@H 9 | Base chance for success ........ 30% 10 | Program complexity ............. -5% for each full @C20 BZ@H of base cost 11 | Program type is identified ..... +20% 12 | Program type is unidentified ... -20% (does not affect software engineers) 13 | Blank disk used is @Ebuggy@H ....... -20% 14 | Blank disk used is @Doptimized@H ... +10% 15 | Your programming skill ......... +5% for each skill point 16 | 17 | 18 | Note that the chances for success will not include blank disk quality 19 | modifiers unless you know its state. It is assumed to be debugged 20 | in that case. Keep in mind this may result in inaccurate prediction. 21 | 22 | 23 | Your programming skill is influenced by several other factors. To know 24 | what they are read its information in skill screen help. 25 | 26 | 27 | Note: You can cancel writing a program at any time and the blank floppy 28 | disk will stay unused. However, if you try to specify a program and 29 | fail (due to typo or bad guess) there is 25% chance for the disk to self 30 | destruct. 31 | -------------------------------------------------------------------------------- /docs/licenses/LICENSE.tiff.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright (c) 1988-1997 Sam Leffler 6 | Copyright (c) 1991-1997 Silicon Graphics, Inc. 7 | 8 | Permission to use, copy, modify, distribute, and sell this software and 9 | its documentation for any purpose is hereby granted without fee, provided 10 | that (i) the above copyright notices and this permission notice appear in 11 | all copies of the software and related documentation, and (ii) the names of 12 | Sam Leffler and Silicon Graphics may not be used in any advertising or 13 | publicity relating to the software without the specific, prior written 14 | permission of Sam Leffler and Silicon Graphics. 15 | 16 | THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 18 | WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 19 | 20 | IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 21 | ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 22 | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 23 | WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 24 | LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 25 | OF THIS SOFTWARE. 26 | -------------------------------------------------------------------------------- /docs/wiki/CharacterAttributes.txt: -------------------------------------------------------------------------------- 1 | ---++ Strength 2 | * Modifies almost all melee damage 3 | * Determines half carrying capacity 4 | * Determines thrown/kicked object range 5 | * Is key skill for unarmed combat and heavy guns 6 | * Is drained by poison attacks 7 | 8 | ---++ Constitution 9 | * Determines half carrying capacity 10 | * Modifies maximum hit points 11 | * Determines how likely is character to succumb to radiation sickness 12 | * Is key skill for concentration and in future for power armor training 13 | * Is key skill for metabolic MutantPowers 14 | * Is drained by radiation sickness 15 | 16 | ---++ Agility 17 | * Grants +5 to speed for every 2 points over 10 18 | * Modifies armor class by (AGI - 10) / 2 19 | * Affects reflex checks 20 | * Is key skill for melee weapons and swords 21 | 22 | ---++ Dexterity 23 | * Is key skill for thrown weapons, handguns, light guns, pick lock and repair 24 | 25 | ---++ Intelligence 26 | * Is key skill for search, programming and spot 27 | * Is key skill for mental powers (very few such powers) 28 | 29 | ---++ Psionics 30 | * Is fuel for most MutantPowers 31 | * Is key skill for all MetapsychicFaculties and psionic powers 32 | 33 | Imbalance for above is easily seen. Problems: 34 | * Dexterity sucks! 35 | * Strength is still too important. 36 | * Intelligence somewhat sucks. 37 | -------------------------------------------------------------------------------- /gfx/license.txt: -------------------------------------------------------------------------------- 1 | Square is a TTF font intended for roguelike games, by Wouter van Oortmerssen, 2 | under the Creative Commons Attribution 3.0 Unported license 3 | ( http://creativecommons.org/licenses/by/3.0/deed.en_US ) 4 | 5 | Downloaded from http://strlen.com/square 6 | 7 | *** 8 | 9 | NotEye includes the DawnLike tileset (see the "dawnlike" subdirectory). 10 | It was created by DragonDePlatino under the CC BY-SA 3.0 license 11 | http://opengameart.org/content/dawnlike-16x16-universal-rogue-like-tileset-v10 12 | It is used by the samples. 13 | 14 | Examples were removed from the original package, and fonts (SDS6x6 and SDS8x8) were 15 | converted from TTF tothe NotEye PNG format. 16 | 17 | *** 18 | 19 | Part of the graphic tiles used in NotEye is the public domain roguelike tileset 20 | "RLTiles". You can find the original tileset at: http://rltiles.sf.net 21 | 22 | (These tiles are in the file rltiles.png, and they are used by nLarn and Rogue) 23 | 24 | *** 25 | 26 | The Brogue fonts come from Brogue. 27 | 28 | *** 29 | 30 | The Fantasy Font, Hydra graphics, VOI graphics (vapors.png), and NotEye and 31 | Hydra Slayer splash screens are made by Zeno Rogue , 32 | under the Creative Commons BY-SA 3.0 license. 33 | 34 | 35 | *** 36 | 37 | DejaVu fonts are in Public Domain: http://dejavu-fonts.org/wiki/index.php?title=License 38 | 39 | *** 40 | 41 | DOS fonts and Courier are standard. 42 | -------------------------------------------------------------------------------- /docs/license.txt: -------------------------------------------------------------------------------- 1 | This document explains which license covers which files. 2 | 3 | The license for PRIME is Aladdin Free Public License. All files except where otherwise noted fall under it. Full text is placed in docs/licenses/ALADDIN.PRIME.txt. At your option you may disregard point 2.c.(i). For this purpose external changelog or source version control is much better choice. Exceptions to this license are enumerated below: 4 | 5 | * Files in directory lib/win32/noteye are provided by Necklace of the Eye frontend. Each has respective license in 'licenses' directory. 6 | 7 | * Necklace of the Eye frontend consists of src/noteye.h, src/noteye-curses.h, every file in src/noteye directory, every file in src/lua directory except for prime.lua and noetolua.sh. These files are licensed under GPL-3.0. However, PRIME has received licensing exception which waives every requirement and restriction this license would have on PRIME. This exception is granted for PRIME only and if you wish to use Necklace of the Eye sources in another work you have to either obey restrictions of GPL-3.0 or obtain such exception from copyright holder for your work yourself. 8 | 9 | * Files in directory gfx except prime.ico and primetiles.png are provided by Necklace of the Eye frontend and fall under its license or the license.txt file present in gfx directory. 10 | 11 | * Files in subdirectories of src/win32 directory each have their own licenses mentioned inside the appropriate files. 12 | -------------------------------------------------------------------------------- /src/noteye/process.cpp: -------------------------------------------------------------------------------- 1 | // Necklace of the Eye v3.0 2 | // roguelike frontend 3 | // Copyright (C) 2010-2011 Zeno Rogue, see 'noteye.h' for details 4 | 5 | #include "internal.cpp" 6 | 7 | #if INTERNALONLY 8 | #else 9 | #ifdef LINUX 10 | #include "linux.cpp" 11 | #else 12 | #include "windows.cpp" 13 | #endif 14 | #endif 15 | 16 | namespace noteye { 17 | 18 | #ifdef USELUA 19 | 20 | #ifndef INTERNALONLY 21 | int lh_newProcess(lua_State *L) { 22 | checkArg(L, 3, "newprocess"); 23 | Process *p = startProcess(luaO(1, Screen), luaO(2, Font), luaStr(3)); 24 | return retObjectEv(L, p); 25 | } 26 | #endif 27 | 28 | int lh_proccur(lua_State *L) { 29 | checkArg(L, 1, "proccur"); 30 | Process *P = luaO(1, Process); 31 | lua_newtable(L); 32 | noteye_table_setInt(L, "x", P->curx); 33 | noteye_table_setInt(L, "y", P->cury); 34 | noteye_table_setInt(L, "size", P->getCursorSize()); 35 | return 1; 36 | } 37 | 38 | int lh_sendkey(lua_State *L) { 39 | checkArg(L, 2, "sendkey"); 40 | Process *P = luaO(1, Process); 41 | int symbol = getfieldInt(L, "symbol"); 42 | int mod = getfieldInt(L, "mod"); 43 | int type = getfieldInt(L, "type"); 44 | int chr = getfieldInt(L, "chr"); 45 | 46 | P->sendKey(symbol, mod, type == evKeyDown, chr); 47 | return 0; 48 | } 49 | 50 | int lh_processActive(lua_State *L) { 51 | checkArg(L, 1, "processactive"); 52 | return noteye_retInt(L, luaO(1, Process)->active()); 53 | } 54 | 55 | #endif 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/lua/crashmenu.lua: -------------------------------------------------------------------------------- 1 | -- Necklace of the Eye v7.6 roguelike frontend 2 | -- Copyright (C) 2010-2014 Zeno Rogue, see noteye.lua for details 3 | 4 | -- what to do on NotEye crash in NotEye-integrated roguelikes 5 | -- such as "sample" and ADOM 6 | 7 | crashmenu = {} 8 | 9 | crashoff = true 10 | 11 | addtomenu(crashmenu, "p", writechoice("continue playing"), 12 | function() 13 | havemain = false 14 | startbyname(game_to_launch) 15 | crashoff = false 16 | end 17 | ) 18 | 19 | addtomenu(crashmenu, "s", writechoice("continue playing in the safe mode"), 20 | function() 21 | havemain = false 22 | crashsafe = true 23 | startbyname(game_to_launch) 24 | crashoff = false 25 | end 26 | ) 27 | 28 | addtomenu(crashmenu, "r", writechoice("reload NotEye scripts"), 29 | function() 30 | -- reset the engine's "crashed" flag... 31 | setcrashval(0) 32 | -- and cause the error to reload it 33 | error("reloading the scripts") 34 | end 35 | ) 36 | 37 | addtomenu(crashmenu, "w", writechoice("copy error message to a file"), 38 | function() 39 | fname = askstr(userdir.."error.txt", "Enter the filename", {}) 40 | if fname then 41 | local file = io.open(fname, "w") 42 | file:write(geterrormsg()) 43 | file:close() 44 | end 45 | end 46 | ) 47 | 48 | prepareconsole() 49 | 50 | while crashoff do 51 | menuexecute(crashmenu, 52 | dfthdr("The NotEye script has crashed... what do you want to do?\n"..geterrormsg()) 53 | ) 54 | end 55 | -------------------------------------------------------------------------------- /docs/design/directory_structure.txt: -------------------------------------------------------------------------------- 1 | on-disk-layout suggestions. 2 | 3 | * move sources/ into src/ 4 | * move gen/ into src/gen/ 5 | * move noteye/ into src/noteye/ 6 | * move osx/ into src/osx/ 7 | * move win32/ into src/w32/ 8 | 9 | * move support/pio into src/pio/ 10 | * move support/tablemaker into src/tblm/ 11 | * move support/ into src/ency/ 12 | * move keymaps into user/keymaps/ 13 | * move save-files into user/saves/ 14 | * move shot/ into user/shot/ </lua are looked up and read from /lua 30 | == instant acclaim for an easy to use modding system :) 31 | 32 | 33 | ** add docs/licenses/ and populate at will. 34 | ** add docs/license.txt .. you might as well 35 | ** add docs/building.txt .. some info on dependencies wouldnt hurt 36 | ** add stuff like 37 | https://github.com/CleverRaven/Cataclysm-DDA 38 | https://github.com/CleverRaven/Cataclysm-DDA/blob/master/CONTRIBUTING.md and put the thing up there ;) 39 | 40 | -------------------------------------------------------------------------------- /docs/licenses/LICENSE.zlib.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright notice: 6 | 7 | (C) 1995-2010 Jean-loup Gailly and Mark Adler 8 | 9 | This software is provided 'as-is', without any express or implied 10 | warranty. In no event will the authors be held liable for any damages 11 | arising from the use of this software. 12 | 13 | Permission is granted to anyone to use this software for any purpose, 14 | including commercial applications, and to alter it and redistribute it 15 | freely, subject to the following restrictions: 16 | 17 | 1. The origin of this software must not be misrepresented; you must not 18 | claim that you wrote the original software. If you use this software 19 | in a product, an acknowledgment in the product documentation would be 20 | appreciated but is not required. 21 | 2. Altered source versions must be plainly marked as such, and must not be 22 | misrepresented as being the original software. 23 | 3. This notice may not be removed or altered from any source distribution. 24 | 25 | Jean-loup Gailly Mark Adler 26 | jloup@gzip.org madler@alumni.caltech.edu 27 | 28 | If you use the zlib library in a product, we would appreciate *not* receiving 29 | lengthy legal documents to sign. The sources are provided for free but without 30 | warranty of any kind. The library has been entirely written by Jean-loup 31 | Gailly and Mark Adler; it does not include third-party code. 32 | -------------------------------------------------------------------------------- /src/Ability.h: -------------------------------------------------------------------------------- 1 | #ifndef ABILITY_H 2 | #define ABILITY_H 3 | 4 | #include "CrType.h" 5 | 6 | namespace abil { 7 | 8 | enum Index { 9 | No = -1, 10 | Str = 1, 11 | Con = 2, 12 | Agi = 3, 13 | Dex = 4, 14 | Int = 5, 15 | Psi = 6 16 | }; 17 | #define NUM_ABIL abil::Psi 18 | 19 | struct Set { 20 | int _str, _con, _agi, _dex, _int, _psi; 21 | 22 | int get (Index idx) const; 23 | void set (Index idx, int val); 24 | void mod (Index idx, int delta); 25 | void zero (); 26 | }; 27 | 28 | #define FOR_ALL_ABILITIES(x) \ 29 | for (abil::Index x = abil::Str; \ 30 | x <= abil::Psi; \ 31 | x = (abil::Index) ((int)(x)+1)) 32 | 33 | struct Tracker { 34 | int Str () const; 35 | int Con () const; 36 | int Agi () const; 37 | int Dex () const; 38 | int Int () const; 39 | int Psi () const; 40 | 41 | int totl (Index idx) const; 42 | int curr (Index idx) const; 43 | int base (Index idx) const; 44 | int harm (Index idx) const; 45 | int temp (Index idx) const; 46 | int gear (Index idx) const; 47 | void restore (Index idx, unsigned int heal); 48 | void perm_mod (Index idx, int delta); 49 | void hurt_mod (Index idx, int delta); 50 | void temp_mod (Index idx, int delta); 51 | void init (unsigned int abil[6]); 52 | 53 | struct Set _totl, _max, _gear, _temp; 54 | }; 55 | 56 | bool applies (shCreatureType, Index); 57 | const char *name (shCreatureType, Index); 58 | const char *shortn (shCreatureType, Index); 59 | Index random_index (); 60 | 61 | } 62 | #endif 63 | -------------------------------------------------------------------------------- /user/keymap/band_rogue.cfg: -------------------------------------------------------------------------------- 1 | # Angband (rogue keys) 2 | # movement 3 | move SW = 1 4 | move S = 2 5 | move SE = 3 6 | move W = 4 7 | rest = . 8 | move E = 6 9 | move NW = 7 10 | move N = 8 11 | move NE = 9 12 | move SW = end 13 | move SE = page down 14 | move NW = home 15 | move NE = page up 16 | move N = up arrow 17 | move S = down arrow 18 | move W = left arrow 19 | move E = right arrow 20 | move up = < 21 | move down = > 22 | # vi keys 23 | move W = h 24 | move S = j 25 | move N = k 26 | move E = l 27 | move NW = y 28 | move NE = u 29 | move SW = b 30 | move SE = n 31 | # semi-automated movement 32 | run = 5 33 | run = keypad 5 34 | run W = H 35 | run S = J 36 | run N = K 37 | run E = L 38 | run NW = Y 39 | run NE = U 40 | run SW = B 41 | run SE = N 42 | # quick shooting 43 | shoot W = ^h 44 | shoot S = ^j 45 | shoot N = ^k 46 | shoot E = ^l 47 | shoot NW = ^y 48 | shoot NE = ^u 49 | shoot SW = ^b 50 | shoot SE = ^n 51 | # meta actions 52 | help = ? 53 | help = fn 1 54 | main menu = escape 55 | toggle autopickup = # 56 | show message history = ^p 57 | # with items 58 | adjust inventory = A 59 | show inventory = i 60 | pick up = g 61 | pick up all = tab 62 | drop = d 63 | multi drop = D 64 | throw = t 65 | shoot = v 66 | wield = w 67 | wear = W 68 | take off = T 69 | apply = a 70 | quaff = q 71 | examine = I 72 | execute = r 73 | zap ray gun = z 74 | name = { 75 | pay = p 76 | swap = ' 77 | # other 78 | character screen = @ 79 | look around = x 80 | discoveries = ` 81 | open = o 82 | close = c 83 | kick = f 84 | skills = E 85 | use mutant power = m 86 | # debug 87 | debug command = ! 88 | -------------------------------------------------------------------------------- /user/keymap/nh_vi.cfg: -------------------------------------------------------------------------------- 1 | # NetHack + vi keys 2 | # movement 3 | move SW = 1 4 | move S = 2 5 | move SE = 3 6 | move W = 4 7 | move E = 6 8 | move NW = 7 9 | move N = 8 10 | move NE = 9 11 | move SW = end 12 | move SE = page down 13 | move NW = home 14 | move NE = page up 15 | move N = up arrow 16 | move S = down arrow 17 | move W = left arrow 18 | move E = right arrow 19 | rest = keypad 5 20 | rest = 5 21 | move up = < 22 | move down = > 23 | # vi keys 24 | rest = . 25 | move W = h 26 | move S = j 27 | move N = k 28 | move E = l 29 | move NW = y 30 | move NE = u 31 | move SW = b 32 | move SE = n 33 | # semi-automated movement 34 | run = g 35 | run W = H 36 | run S = J 37 | run N = K 38 | run E = L 39 | run NW = Y 40 | run NE = U 41 | run SW = B 42 | run SE = N 43 | # quick shooting 44 | shoot W = ^h 45 | shoot S = ^j 46 | shoot N = ^k 47 | shoot E = ^l 48 | shoot NW = ^y 49 | shoot NE = ^u 50 | shoot SW = ^b 51 | shoot SE = ^n 52 | # meta actions 53 | help = ? 54 | help = fn 1 55 | main menu = escape 56 | toggle autopickup = # 57 | show message history = ^p 58 | # with items 59 | adjust inventory = A 60 | show inventory = i 61 | pick up = , 62 | pick up all = tab 63 | drop = d 64 | multi drop = D 65 | throw = t 66 | shoot = f 67 | wield = w 68 | wear = W 69 | take off = T 70 | apply = a 71 | quaff = q 72 | examine = v 73 | execute = r 74 | zap ray gun = z 75 | name = M 76 | pay = p 77 | swap = x 78 | # other 79 | character screen = @ 80 | discoveries = \ 81 | look around = / 82 | open = o 83 | close = c 84 | kick = ^d 85 | skills = E 86 | use mutant power = m 87 | # debug 88 | debug command = ` 89 | -------------------------------------------------------------------------------- /src/Monster.h: -------------------------------------------------------------------------------- 1 | #ifndef MONSTER_H 2 | #define MONSTER_H 3 | 4 | #include "Util.h" 5 | #include "Creature.h" 6 | #include "AttackType.h" 7 | #include "Interface.h" 8 | 9 | struct shMonsterIlk 10 | { 11 | shMonId mId; 12 | // TODO: This does not belong in monsterIlk. Move to Hero. 13 | int mKills; // how many died during game 14 | shCreatureType mType; 15 | 16 | const char *mName; 17 | 18 | shThingSize mSize; 19 | int mHitDice; 20 | int mBaseLevel; 21 | 22 | int mStr; 23 | int mCon; 24 | int mAgi; 25 | int mDex; 26 | int mInt; 27 | int mPsi; 28 | 29 | int mSpeed; 30 | 31 | int mGender; 32 | int mNumHands; // number of hands that can wield weapons 33 | 34 | int mNaturalArmorBonus; 35 | int mFeats; 36 | int mInnateResistances[kMaxEnergyType]; 37 | #define MAXINTR 2 38 | struct { 39 | shIntrinsic mIntrinsic; 40 | int mGrade; 41 | } mIntrinsics[MAXINTR]; 42 | #define MAXPOWERS 5 43 | shMutantPower mPowers[MAXPOWERS]; 44 | int mNumPowers; 45 | #define MAXATTACKS 5 46 | struct shAttackData { 47 | shAttackId mAttId; 48 | int mProb; 49 | } mAttacks[MAXATTACKS], mRangedAttacks[MAXATTACKS]; 50 | int mAttackSum; 51 | 52 | shGlyph mGlyph; 53 | 54 | shCreature::Strategy mDefaultStrategy; 55 | shCreature::Disposition mDefaultDisposition; 56 | int mPeacefulChance; 57 | }; 58 | 59 | void initializeMonsters (); 60 | 61 | shMonId pickAMonsterIlk (int level); 62 | 63 | #define NUMLIZARDS 3 64 | extern shAttackId lizard[NUMLIZARDS]; 65 | extern void addLizardBreaths (); 66 | #endif 67 | -------------------------------------------------------------------------------- /user/keymap/crawl.cfg: -------------------------------------------------------------------------------- 1 | # Dungeon Crawl 2 | # movement 3 | move SW = 1 4 | move S = 2 5 | move SE = 3 6 | move W = 4 7 | rest = 5 8 | move E = 6 9 | move NW = 7 10 | move N = 8 11 | move NE = 9 12 | move SW = end 13 | move SE = page down 14 | move NW = home 15 | move NE = page up 16 | move N = up arrow 17 | move S = down arrow 18 | move W = left arrow 19 | move E = right arrow 20 | rest = keypad 5 21 | rest = . 22 | move up = < 23 | move down = > 24 | run = / 25 | # vi keys 26 | move W = h 27 | move S = j 28 | move N = k 29 | move E = l 30 | move NW = y 31 | move NE = u 32 | move SW = b 33 | move SE = n 34 | # semi-automated movement 35 | run W = H 36 | run S = J 37 | run N = K 38 | run E = L 39 | run NW = Y 40 | run NE = U 41 | run SW = B 42 | run SE = N 43 | # quick shooting 44 | shoot W = ^h 45 | shoot S = ^j 46 | shoot N = ^k 47 | shoot E = ^l 48 | shoot NW = ^y 49 | shoot NE = ^u 50 | shoot SW = ^b 51 | shoot SE = ^n 52 | # meta actions 53 | help = ? 54 | help = fn 1 55 | main menu = escape 56 | toggle autopickup = # 57 | show message history = ^p 58 | # with items 59 | adjust inventory = = 60 | show inventory = i 61 | pick up = , 62 | pick up = g 63 | pick up all = tab 64 | drop = d 65 | multi drop = D 66 | throw = F 67 | shoot = f 68 | wield = w 69 | wear = W 70 | take off = T 71 | apply = V 72 | quaff = q 73 | examine = e 74 | execute = r 75 | zap ray gun = v 76 | name = { 77 | pay = p 78 | swap = ' 79 | # other 80 | character screen = @ 81 | look around = x 82 | discoveries = \ 83 | open = o 84 | open = O 85 | close = c 86 | close = C 87 | kick = ^d 88 | skills = m 89 | use mutant power = a 90 | # debug 91 | debug command = & 92 | -------------------------------------------------------------------------------- /user/keymap/prime_laptop.cfg: -------------------------------------------------------------------------------- 1 | # PRIME for laptops (DEFAULT) 2 | # movement 3 | move SW = 1 4 | move S = 2 5 | move SE = 3 6 | move W = 4 7 | move E = 6 8 | move NW = 7 9 | move N = 8 10 | move NE = 9 11 | move SW = end 12 | move SE = page down 13 | move NW = home 14 | move NE = page up 15 | move N = up arrow 16 | move S = down arrow 17 | move W = left arrow 18 | move E = right arrow 19 | rest = keypad 5 20 | rest = 5 21 | move up = < 22 | move down = > 23 | # vi keys 24 | rest = . 25 | move W = h 26 | move S = j 27 | move N = k 28 | move E = l 29 | move NW = y 30 | move NE = u 31 | move SW = b 32 | move SE = n 33 | # semi-automated movement 34 | run = g 35 | run W = H 36 | run S = J 37 | run N = K 38 | run E = L 39 | run NW = Y 40 | run NE = U 41 | run SW = B 42 | run SE = N 43 | # quick shooting 44 | shoot W = ^h 45 | shoot S = ^j 46 | shoot N = ^k 47 | shoot E = ^l 48 | shoot NW = ^y 49 | shoot NE = ^u 50 | shoot SW = ^b 51 | shoot SE = ^n 52 | # meta actions 53 | help = ? 54 | help = fn 1 55 | main menu = escape 56 | toggle autopickup = # 57 | show message history = P 58 | # with items 59 | adjust inventory = A 60 | show inventory = i 61 | show inventory = space 62 | pick up = , 63 | pick up all = tab 64 | drop = d 65 | multi drop = D 66 | throw = t 67 | shoot = f 68 | wield = w 69 | wear = W 70 | take off = T 71 | apply = a 72 | quaff = q 73 | examine = x 74 | execute = e 75 | zap ray gun = z 76 | name = M 77 | pay = p 78 | swap = ' 79 | # other 80 | character screen = @ 81 | discoveries = \ 82 | look around = / 83 | open = o 84 | close = c 85 | kick = C 86 | skills = S 87 | use mutant power = m 88 | # debug 89 | debug command = ` 90 | -------------------------------------------------------------------------------- /src/noteye/noteye.cpp: -------------------------------------------------------------------------------- 1 | // Necklace of the Eye v5.1 2 | // roguelike frontend 3 | // Copyright (C) 2010-2012 Zeno Rogue, see 'noteye.h' for details 4 | 5 | #define USELUA 6 | 7 | #include "noteye.h" 8 | using namespace std; 9 | using namespace noteye; 10 | 11 | #include "util.cpp" 12 | #include "gfx.cpp" 13 | #include "image.cpp" 14 | #include "tiles.cpp" 15 | #include "screen.cpp" 16 | #include "fpp.cpp" 17 | #include "iso.cpp" 18 | #include "font.cpp" 19 | #include "process.cpp" 20 | #include "stream.cpp" 21 | #include "consout.cpp" 22 | #include "sound.cpp" 23 | #include "lua.cpp" 24 | 25 | int noteyeStats() { 26 | fprintf(logfile, "NOTEYE STATS\n"); 27 | fprintf(logfile, "Objects allocated: %d\n", size(objs)); 28 | fprintf(logfile, "Hashtable collisions: %d/%d\n", hashcol, hashok); 29 | fprintf(logfile, "Compression stats for streams:\n"); 30 | fprintf(logfile, " write %9d B -> %9d B\n", writeUnc, writeCmp); 31 | fprintf(logfile, " read %9d B -> %9d B\n", readUnc, readCmp); 32 | 33 | fprintf(logfile, "Total size of images: %lld pixels\n", totalimagesize); 34 | fprintf(logfile, "Total size of isocache: %lld pixels\n", totalimagesize); 35 | 36 | return 0; 37 | } 38 | 39 | 40 | int main(int argc, char **argv) { 41 | 42 | gargc = argc; gargv = argv; 43 | 44 | errfile = stdout; 45 | 46 | fprintf(errfile, "Necklace of the Eye v5.1 (C) 2010-2012 Zeno Rogue\n"); 47 | 48 | objs.push_back(NULL); 49 | objs.push_back(&gfx); gfx.id = 1; 50 | 51 | initMode(); 52 | 53 | initLua(); 54 | runLua(); 55 | closeLua(); 56 | 57 | logfile && noteyeStats(); 58 | 59 | endwin(); 60 | halt(); 61 | } 62 | 63 | -------------------------------------------------------------------------------- /docs/licenses/LICENSE.ogg-vorbis.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_mixer can be found here: 2 | http://www.libsdl.org/projects/SDL_mixer/libs/ 3 | --- 4 | 5 | Copyright (c) 2002-2008 Xiph.org Foundation 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | 11 | - Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | 18 | - Neither the name of the Xiph.org Foundation nor the names of its 19 | contributors may be used to endorse or promote products derived from 20 | this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 26 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 29 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 30 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 32 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /src/noteye/jni_md.h: -------------------------------------------------------------------------------- 1 | /* jni_md.h 2 | Copyright (C) 2001, 2005 Free Software Foundation, Inc. 3 | 4 | This file is part of GNU Classpath. 5 | 6 | GNU Classpath is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2, or (at your option) 9 | any later version. 10 | 11 | GNU Classpath is distributed in the hope that it will be useful, but 12 | WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with GNU Classpath; see the file COPYING. If not, write to the 18 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 | 02110-1301 USA. 20 | 21 | As a special exception, if you link this library with other files to 22 | produce an executable, this library does not by itself cause the 23 | resulting executable to be covered by the GNU General Public License. 24 | This exception does not however invalidate any other reasons why the 25 | executable file might be covered by the GNU General Public License. */ 26 | 27 | #ifndef __CLASSPATH_JNI_MD_H__ 28 | #define __CLASSPATH_JNI_MD_H__ 29 | 30 | /* Define some defaults */ 31 | #define JNICALL 32 | #define JNIEXPORT 33 | #define JNIIMPORT 34 | 35 | typedef unsigned char jboolean; 36 | typedef signed char jbyte; 37 | typedef unsigned short jchar; 38 | typedef short jshort; 39 | typedef int jint; 40 | typedef long long jlong; 41 | typedef float jfloat; 42 | typedef double jdouble; 43 | typedef jint jsize; 44 | 45 | #endif /* __CLASSPATH_JNI_MD_H__ */ 46 | -------------------------------------------------------------------------------- /docs/licenses/LICENSE.FLAC.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_mixer can be found here: 2 | http://www.libsdl.org/projects/SDL_mixer/libs/ 3 | --- 4 | 5 | Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions 9 | are met: 10 | 11 | - Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | - Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | 18 | - Neither the name of the Xiph.org Foundation nor the names of its 19 | contributors may be used to endorse or promote products derived from 20 | this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 | -------------------------------------------------------------------------------- /docs/licenses/LICENSE.webp.txt: -------------------------------------------------------------------------------- 1 | The source code to this library used with SDL_image can be found here: 2 | http://www.libsdl.org/projects/SDL_image/libs/ 3 | --- 4 | 5 | Copyright (c) 2010, Google Inc. All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are 9 | met: 10 | 11 | * Redistributions of source code must retain the above copyright 12 | notice, this list of conditions and the following disclaimer. 13 | 14 | * Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in 16 | the documentation and/or other materials provided with the 17 | distribution. 18 | 19 | * Neither the name of Google nor the names of its contributors may 20 | be used to endorse or promote products derived from this software 21 | without specific prior written permission. 22 | 23 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 26 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 27 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 29 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 30 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 31 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | -------------------------------------------------------------------------------- /src/win32/pdcurses/panel.h: -------------------------------------------------------------------------------- 1 | /* Public Domain Curses */ 2 | 3 | /* $Id: panel.h,v 1.19 2008/07/13 16:08:16 wmcbrine Exp $ */ 4 | 5 | /*----------------------------------------------------------------------* 6 | * Panels for PDCurses * 7 | *----------------------------------------------------------------------*/ 8 | 9 | #ifndef __PDCURSES_PANEL_H__ 10 | #define __PDCURSES_PANEL_H__ 1 11 | 12 | #include 13 | 14 | #if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS) 15 | extern "C" 16 | { 17 | #endif 18 | 19 | typedef struct panelobs 20 | { 21 | struct panelobs *above; 22 | struct panel *pan; 23 | } PANELOBS; 24 | 25 | typedef struct panel 26 | { 27 | WINDOW *win; 28 | int wstarty; 29 | int wendy; 30 | int wstartx; 31 | int wendx; 32 | struct panel *below; 33 | struct panel *above; 34 | const void *user; 35 | struct panelobs *obscure; 36 | } PANEL; 37 | 38 | int bottom_panel(PANEL *pan); 39 | int del_panel(PANEL *pan); 40 | int hide_panel(PANEL *pan); 41 | int move_panel(PANEL *pan, int starty, int startx); 42 | PANEL *new_panel(WINDOW *win); 43 | PANEL *panel_above(const PANEL *pan); 44 | PANEL *panel_below(const PANEL *pan); 45 | int panel_hidden(const PANEL *pan); 46 | const void *panel_userptr(const PANEL *pan); 47 | WINDOW *panel_window(const PANEL *pan); 48 | int replace_panel(PANEL *pan, WINDOW *win); 49 | int set_panel_userptr(PANEL *pan, const void *uptr); 50 | int show_panel(PANEL *pan); 51 | int top_panel(PANEL *pan); 52 | void update_panels(void); 53 | 54 | #if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS) 55 | } 56 | #endif 57 | 58 | #endif /* __PDCURSES_PANEL_H__ */ 59 | -------------------------------------------------------------------------------- /data/intro/quarterback.txt: -------------------------------------------------------------------------------- 1 | You were thrown into high security prison for beating up your country's sport 2 | and recreation minister when he declared funds for national football 3 | representations are to be cut in half. You were there when he made the public 4 | announcement. Everyone was enraged at him, yet seemingly nobody could do 5 | anything about his evil deeds. Really nobody? Your nerves snapped. That was 6 | an act on the spot. This was an act of honor! You dashed through police cordon 7 | with help of the angry mob. Next you broke through line of security officers 8 | with aid of your trusted few football co-stars that made it that far. Finally, 9 | you got to the minister himself. Boy, did you squash him. After just a few 10 | seconds of personal contact you left him with a bunch of teeth less and lying 11 | in a small puddle of his own blood. 12 | 13 | Then the security used drastic measures to "pacify" the crowd. 14 | Tear gas, tazers, rubber bullets, stun grenades and clubbing. 15 | 16 | `You still don't remember?` The police officer asks mockingly. 17 | `Well *heroname*, for you there are two options,` he continues. 18 | `The electric chair...`, he grins smugly, 19 | `...or something that generates huge viewership. You could survive in theory.` 20 | The officer bursts into laughter proud of his own joke. 21 | 22 | A prison ship shall drop you off on a lone asteroid. Mysterious "they" 23 | will be tracking your progress by a satellite as you quest for the Bizarro 24 | Orgasmatron. So far this programme has just generated bloody deaths of 25 | so-called "main stars" at hands of monsters. On the other hand you heard 26 | there will be reticulans nearby. Better for them *not* to be cops ... 27 | because someone certainly *will* suffer your accumulated wrath. 28 | -------------------------------------------------------------------------------- /src/pio/pio.pas: -------------------------------------------------------------------------------- 1 | library pio; 2 | 3 | uses Crt, Video; 4 | 5 | procedure pio_init; cdecl; 6 | begin 7 | InitVideo 8 | end; 9 | 10 | procedure pio_exit; cdecl; 11 | begin 12 | DoneVideo 13 | end; 14 | 15 | procedure pio_clear; cdecl; 16 | begin 17 | ClearScreen 18 | end; 19 | 20 | procedure pio_gotoxy (x, y : Integer); cdecl; 21 | begin 22 | SetCursorPos (x, y) 23 | end; 24 | 25 | procedure pio_echo (x, y : Integer; c : Char); cdecl; 26 | begin 27 | VideoBuf^[x + y * ScreenWidth] := ord (c) + (textattr shl 8) 28 | end; 29 | 30 | procedure pio_draw (x, y : Integer; c : Char; fg, bg : Integer); cdecl; 31 | begin 32 | VideoBuf^[x + y * ScreenWidth] := ord (c) + (fg shl 8) + (bg shl 12) 33 | end; 34 | 35 | function pio_screen (x, y : Integer) : Integer; cdecl; 36 | begin 37 | pio_screen := VideoBuf^[x + y * ScreenWidth] 38 | end; 39 | 40 | procedure pio_string (x, y : Integer; s : PChar); cdecl; 41 | var len, max, cnt : Integer; 42 | begin 43 | len := strlen (s) - 1; 44 | max := x + len; 45 | if max > ScreenWidth then max := ScreenWidth; 46 | for cnt := x to max do 47 | VideoBuf^[cnt + y * ScreenWidth] := ord (s[cnt - x]) + (textattr shl 8) 48 | end; 49 | 50 | procedure pio_textattr (attr : Integer); cdecl; 51 | begin 52 | textattr := attr 53 | end; 54 | 55 | procedure pio_refresh; cdecl; 56 | begin 57 | UpdateScreen (false) 58 | end; 59 | 60 | function pio_get_width : Cardinal; cdecl; 61 | begin 62 | pio_get_width := ScreenWidth 63 | end; 64 | 65 | function pio_get_height : Cardinal; cdecl; 66 | begin 67 | pio_get_height := ScreenHeight 68 | end; 69 | 70 | function pio_read_key : Char; cdecl; 71 | begin 72 | pio_read_key := readkey 73 | end; 74 | 75 | exports 76 | pio_init, pio_exit, pio_clear, pio_refresh, 77 | pio_gotoxy, pio_echo, pio_draw, pio_screen, 78 | pio_string, pio_textattr, 79 | pio_get_width, pio_get_height, pio_read_key; 80 | 81 | end. 82 | -------------------------------------------------------------------------------- /data/intro/ninja.txt: -------------------------------------------------------------------------------- 1 | You have come here bearing the body of your mentor. It was his request 2 | that interment be performed here. 3 | 4 | Oddly, the station gave no response to your docking request. You pull 5 | into an open shuttle bay and prepare to disembark. Nobody came to greet 6 | you nor to extract docking fees. The hangar is devoid of all personnel 7 | save for a bunch of service robots. You enlist them to help with proper 8 | burial procedures, carefully overseeing that all rituals are performed 9 | exactly as is required by tradition. 10 | 11 | After this silent funeral you sit down and reminisce many events you 12 | and your master lived through together. A certain memory refuses to 13 | leave your mind, continuing to pester you mercilessly. Long ago driven 14 | by curiosity you managed to get your mentor badly drunk. He raved about 15 | his exploits of youth for hours on end. His passion would wane when he 16 | got to tell about the Bizarro Orgasmatron, an artifact of untold power he 17 | was absolutely sure existed, but never found. Every journey to obtain it 18 | proved fruitless and made him the mockery of his peers. The legendary 19 | elusive Orgasmatron ... you know he desired it. That was his greatest 20 | dream. Sadly, he never got to turn it into reality. 21 | 22 | Master said the artifact is rumored to be lost somewhere at this space 23 | station, thus his wish to at least be put to rest somewhere close to the 24 | fabled device. It is customary to mourn your guide of life for a week 25 | staying near the site of burial and performing honorable acts to glorify 26 | the memory of the passed warrior. You come to a conclusion: the quest 27 | for Bizarro Orgasmatron starts now. Honoring the dead is the right thing 28 | to do and there is no better way to please the soul of your mentor. 29 | After all you will be staying here for awhile. The Orgasmatron will be 30 | yours, or you shall not dare proudly call yourself *heroname* again. 31 | -------------------------------------------------------------------------------- /docs/whats_here.txt: -------------------------------------------------------------------------------- 1 | Directory 'zapm' contains documents originally shipped with ZapM sources. They are unchanged except for following: 2 | - The changelog previously being part of SPACEHACK file has been moved to its own file ZAPM-changelog.txt. The order of history has been reversed to place newest entries on top. 3 | - In town.txt all tabulators were replaced by appropriate number of spaces. 4 | 5 | 6 | In directory 'prime' one may find documents originally descended from Cyrus' work. Guidebook is simply updated (yet still outdated) version of ZapM's guidebook. Man page file is also guidebook with some markup. Finally, there is also a changelog. All of those files were normally part of source PRIME distribution. 7 | 8 | 9 | PRIME once had a wiki for storing information typically exchanged between maintainers by email. Players who contacted us by email also typically were given directions to this place. The wiki was not linked from official website. It ran on Foswiki engine. The directory 'wiki' contains most interesting articles salvaged after its collapse following full system upgrade performed by hosting owner. 10 | 11 | 12 | In directory 'design' some of our discussions, plans and design documents otherwise never released to the public are kept. We had great fun reading Cyrus' SPACEHACK file so generously donated to the public. Led by this example we acted alike. Some files are direct excepts from emails, other are files we were working together on. Three were actually fully fledged Open Office documents before being subject to conversion to plain text: multiwielding.txt, guild_and_quests.txt, on_science_fiction_undead.txt. 13 | 14 | 15 | The directory 'licenses' contains what it says on the tin. However, the main licensing document lies in the same directory the file you are reading now resides. It is called "license.txt". Captain Obvious liked this paragrph so much he wrote us complimenting our literary style. We are likewise sure you have enjoyed reading it. 16 | -------------------------------------------------------------------------------- /makefile.base: -------------------------------------------------------------------------------- 1 | # This file is intended to be included at the beginning of OS-specific 2 | # makefiles. 3 | 4 | OBJS = $(GENOBJS) obj/Ability.o obj/AttackList.o obj/AttackType.o obj/BunkerRooms.o obj/BOFH.o obj/Canister.o obj/Cave.o obj/Creature.o obj/Door.o obj/DressCode.o obj/Droid.o obj/Effect.o obj/Equipment.o obj/Fight.o obj/FlavorList.o obj/FloppyDisk.o obj/Game.o obj/Help.o obj/Hero.o obj/Implant.o obj/Interface.o obj/Intrinsic.o obj/Inventory.o obj/ItemSet.o obj/Lore.o obj/LoreHelp.o obj/Mainframe.o obj/MatterCompiler.o obj/Map.o obj/Menu.o obj/Monster.o obj/MonsterAI.o obj/MonsterList.o obj/MonTeam.o obj/Mutant.o obj/Object.o obj/ObjectList.o obj/ObjectParser.o obj/OperatingSystem.o obj/Options.o obj/Path.o obj/PointerStore.o obj/Portability.o obj/Profession.o obj/Property.o obj/RayGun.o obj/Room.o obj/SaveLoad.o obj/Scenario.o obj/Services.o obj/Sewer.o obj/Shop.o obj/Skills.o obj/SpecialLevel.o obj/Tombstone.o obj/Tool.o obj/Transport.o obj/TwistyRooms.o obj/Util.o obj/Vat.o obj/Vision.o obj/Weapon.o obj/Wreck.o obj/main.o 5 | 6 | CONFIG = src/gen/config.h 7 | GENFILES = $(CONFIG) \ 8 | src/gen/Attack.cpp src/gen/Attack.h \ 9 | src/gen/Flavor.cpp src/gen/Flavor.h \ 10 | src/gen/MonsterIlk.cpp src/gen/MonsterIlk.h \ 11 | src/gen/ObjectIlk.cpp src/gen/ObjectIlk.h 12 | 13 | # If going for graphical frontend both declarations are included. Otherwise 14 | # only CONOBJS gets added. 15 | CONOBJS = obj/NCUI.o 16 | NEOBJS = obj/NEUI.o 17 | # Override MOREOBJS if your platform needs additional modules to compile. 18 | MOREOBJS = 19 | # Override this too unless all you need is console build. 20 | LIBNOTEYE = 21 | # Override only if you want to replace NCurses. 22 | LIBPIO = 23 | 24 | PROGRAM=prime 25 | 26 | # These are default and you may want to change them. 27 | LIBS=-lsigsegv 28 | CONLIBS=-lncurses -lpanel 29 | NELIBS=-lnoteye -lz -llua5.1 30 | LDFLAGS=$(LDPATH) -L./lib -Xlinker -rpath=./lib 31 | 32 | CXX=g++ 33 | 34 | CXXFLAGS=-Wall -Wextra -pedantic -Wno-variadic-macros -O -DNDEBUG 35 | -------------------------------------------------------------------------------- /makefile.bases: -------------------------------------------------------------------------------- 1 | # This file is intended to be included at the beginning of OS-specific 2 | # makefiles. 3 | 4 | OBJS = $(GENOBJS) obj/Ability.o obj/AttackList.o obj/AttackType.o obj/BunkerRooms.o obj/BOFH.o obj/Canister.o obj/Cave.o obj/Creature.o obj/Door.o obj/DressCode.o obj/Droid.o obj/Effect.o obj/Equipment.o obj/Fight.o obj/FlavorList.o obj/FloppyDisk.o obj/Game.o obj/Help.o obj/Hero.o obj/Implant.o obj/Interface.o obj/Intrinsic.o obj/Inventory.o obj/ItemSet.o obj/Lore.o obj/LoreHelp.o obj/Mainframe.o obj/MatterCompiler.o obj/Map.o obj/Menu.o obj/Monster.o obj/MonsterAI.o obj/MonsterList.o obj/MonTeam.o obj/Mutant.o obj/Object.o obj/ObjectList.o obj/ObjectParser.o obj/OperatingSystem.o obj/Options.o obj/Path.o obj/PointerStore.o obj/Portability.o obj/Profession.o obj/Property.o obj/RayGun.o obj/Room.o obj/SaveLoad.o obj/Scenario.o obj/Services.o obj/Sewer.o obj/Shop.o obj/Skills.o obj/SpecialLevel.o obj/Tombstone.o obj/Tool.o obj/Transport.o obj/TwistyRooms.o obj/Util.o obj/Vat.o obj/Vision.o obj/Weapon.o obj/Wreck.o obj/main.o 5 | 6 | CONFIG = src/gen/config.h 7 | GENFILES = $(CONFIG) \ 8 | src/gen/Attack.cpp src/gen/Attack.h \ 9 | src/gen/Flavor.cpp src/gen/Flavor.h \ 10 | src/gen/MonsterIlk.cpp src/gen/MonsterIlk.h \ 11 | src/gen/ObjectIlk.cpp src/gen/ObjectIlk.h 12 | 13 | # If going for graphical frontend both declarations are included. Otherwise 14 | # only CONOBJS gets added. 15 | CONOBJS = obj/NCUI.o 16 | NEOBJS = obj/NEUI.o 17 | # Override MOREOBJS if your platform needs additional modules to compile. 18 | MOREOBJS = 19 | # Override this too unless all you need is console build. 20 | LIBNOTEYE = 21 | # Override only if you want to replace NCurses. 22 | LIBPIO = 23 | 24 | PROGRAM=prime 25 | 26 | # These are default and you may want to change them. 27 | LIBS=-lsigsegv 28 | CONLIBS=-lncurses -lpanel 29 | NELIBS=-lnoteye -lz -llua5.1 30 | LDFLAGS=$(LDPATH) -L./lib -Xlinker -rpath=./lib 31 | 32 | CXX=g++ 33 | 34 | CXXFLAGS=-Wall -Wextra -pedantic -Wno-variadic-macros -O -DNDEBUG 35 | -------------------------------------------------------------------------------- /src/Mutant.h: -------------------------------------------------------------------------------- 1 | #ifndef MUTANT_H 2 | #define MUTANT_H 3 | 4 | #include "Ability.h" 5 | 6 | #define MUT_POWER_ON 2 7 | #define MUT_POWER_PRESENT 1 8 | #define MUT_POWER_ABSENT 0 9 | 10 | enum shMutantPower { 11 | kNoMutantPower = 0x0, 12 | /* Level 1 */ 13 | kIllumination, 14 | kDigestion, 15 | kHypnosis, 16 | kRegeneration, 17 | kGammaSight, 18 | kPsiVomit, 19 | kDeepsight, 20 | /* Level 2 */ 21 | kOpticBlast, 22 | kHaste, 23 | kTelepathyPower, 24 | kTremorsensePower, 25 | kShootWebs, 26 | kCharge, 27 | kWarFlow, 28 | /* Level 3 */ 29 | kMentalBlast, 30 | kRestoration, 31 | kUnderstanding, 32 | kImbue, 33 | kKinesis, 34 | //kGravityCrush, 35 | kCauseFear, 36 | /* Level 4 */ 37 | kAdrenalineControl, 38 | kXRayVisionPower, 39 | kTheVoice, 40 | kMagMayhem, 41 | //kSwordOfTheMind, 42 | //kSaltTheWound, 43 | /* Level 5 */ 44 | kTeleport, 45 | kBGAwareness, 46 | kShockwave, 47 | //kCharm, 48 | //kMarkOfHate, 49 | /* Level 6 */ 50 | kAutolysis, 51 | kFlightPower, 52 | //kGroundBurst, 53 | /* Level 8 */ 54 | kPsionicStorm, 55 | //kStasisField, 56 | /* monster only powers*/ 57 | kHallucinate, 58 | kMaxHeroPower = kHallucinate, 59 | kTerrify, 60 | kDarkness, 61 | kMaxMutantPower = kDarkness, 62 | kCeaseAndDesist, /* lawyer first */ 63 | kSeizeEvidence, 64 | kSueForDamages, 65 | kSummonWitness, /* lawyer last */ 66 | kLaunchMissile, /* rocket turret */ 67 | kMaxAllPower 68 | }; 69 | 70 | struct shMutantPowerData { 71 | int mLevel; 72 | char mLetter; 73 | abil::Index mAbility; 74 | shSkillCode mSkill; 75 | const char *mName; 76 | int (*mFunc) (shCreature *); 77 | int (*mOffFunc) (shCreature *); 78 | 79 | bool isPersistent (void); 80 | shSkillCode getCode (void); 81 | int maintainCost (void); 82 | }; 83 | 84 | extern shMutantPowerData MutantPowers[kMaxHeroPower]; 85 | const char *getMutantPowerName (shMutantPower id); 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /data/help/psychokineticshove.txt: -------------------------------------------------------------------------------- 1 | @LPsychokinetic Shove @E(Psionics) @J(Telekinesis)@H 2 | 3 | Hurls a target creature, object or feature in chosen direction. If target 4 | creature is @Cwebbed@H these are @Ctorn@H first. Causes damage on impact. 5 | 6 | Collision damage: 1 + bonus to 10 + bonus * 2 7 | Collision stun: 1 + bonus / 4 to 2 + bonus / 3 8 | 9 | Bonus starts at zero and increases by two point per each square flown through. 10 | 11 | Range increase is non-linear. It starts at one to three randomly and then 12 | is increased according to your skill: 13 | 14 | | range | skill | | range | skill | | range | skill | 15 | +---------+---------+ +---------+---------+ +---------+---------+ 16 | | 1 | 0 | | 2 | 0 | | 3 | 0 | 17 | | 2 | 1 | | 3 | 2 | | 4 | 3 | 18 | | 3 | 3 | | 4 | 5 | | 5 | 7 | 19 | | 4 | 6 | | 5 | 9 | | 6 | 12 | 20 | | 5 | 10 | | 6 | 14 | | 7 | 18 | 21 | | 6 | 15 | | 7 | 20 | | 8 | 25 | 22 | | 7 | 21 | | 8 | 27 | | ... | ... | 23 | | 8 | 28 | | ... | ... | | ... | ... | 24 | | ... | ... | | ... | ... | | ... | ... | 25 | 26 | You may look also from the other side. Given your skill how far you can throw 27 | something by psychokinetic shove: 28 | 29 | | skill | range | | skill | range | | skill | range | 30 | +---------+---------+ +---------+---------+ +---------+---------+ 31 | | 0 | 1,2,3 | | 8 | 4,4,5 | | 16 | 6,6,6 | 32 | | 1 | 2,2,3 | | 9 | 4,5,5 | | 17 | 6,6,6 | 33 | | 2 | 2,3,3 | | 10 | 5,5,5 | | 18 | 6,6,7 | 34 | | 3 | 3,3,4 | | 11 | 5,5,5 | | 19 | 6,6,7 | 35 | | 4 | 3,3,4 | | 12 | 5,5,6 | | 20 | 6,7,7 | 36 | | 5 | 3,4,4 | | 13 | 5,5,6 | | 21 | 7,7,7 | 37 | | 6 | 4,4,4 | | 14 | 5,6,6 | | 22 | 7,7,7 | 38 | | 7 | 4,4,5 | | 15 | 6,6,6 | | 23 | 7,7,7 | 39 | 40 | -------------------------------------------------------------------------------- /data/help/skills.txt: -------------------------------------------------------------------------------- 1 | @CSKILLS@H 2 | 3 | 4 | Each skill is described by its @Fname@H, associated @Bkey ability@H (eg. Str), 5 | invested points plus bonus points from equipment or other circumstances 6 | and maximum skill points in parentheses. How many points you earn each 7 | time you gain a character level is dictated by your profession. If you 8 | do not wish to advance skills right now hit enter. 9 | 10 | 11 | The following weapon skills affect your chances of hitting a target 12 | with a weapon of that type: 13 | 14 | 15 | @FThrown Weapons @B(Dex)@H: Grenades and any other thrown weapons. 16 | 17 | @FHandguns @B(Dex)@H: Guns you hold in one hand: pea shooters, pistols, 18 | laser pistols, phasers, blasters. 19 | 20 | @FLight Guns @B(Dex)@H: Most guns you aim with both hands: laser rifles, 21 | shotguns, and sniper rifles. 22 | 23 | @FHeavy Guns @B(Dex)@H: Badass guns: pulse rifles, railguns, chainguns, and 24 | cannons. 25 | 26 | @FUnarmed Combat @B(Str)@H: Fighting with your bare fists or "unarmed" weapons 27 | like power fists and power claws. 28 | 29 | @FBasic Melee Weapons @B(Agi)@H: Covers all melee weapons that aren't swords, 30 | from mop to chainsaw. 31 | 32 | @FSwords @B(Agi)@H: Covers all types of swords, including the bat'leth. 33 | 34 | 35 | The following adventuring skills help you in various ways: 36 | 37 | 38 | @FConcentration @B(Con)@H: Helps you sustain any mutant powers you're using 39 | when you might otherwise get distracted. 40 | 41 | @FPick Locks @B(Dex)@H: You can pick locks. 42 | 43 | @FRepair @B(Dex)@H: You can repair damaged droids, and other things, too. 44 | 45 | @FSearch @B(Int)@H: Gives you a better chance to find secrets when you're 46 | actively searching for them. 47 | 48 | @FProgramming @B(Int)@H: Helps you do things that involve computer progamming. 49 | 50 | @FSpot @B(Int)@H: Helps you notice secrets when you're not actively 51 | searching for them, even from a distance. 52 | 53 | 54 | @FMutant Power Skills @B(Psi)@H: Each power has a skill associated with 55 | it that improves your chances of using the power successfully. Becoming 56 | more skilled in use of the power might enhance it in other ways too. 57 | -------------------------------------------------------------------------------- /src/noteye/libnoteye.cpp: -------------------------------------------------------------------------------- 1 | // Necklace of the Eye v6.2 2 | // roguelike frontend 3 | // Copyright (C) 2010-2012 Zeno Rogue, see 'noteye.h' for details 4 | 5 | #define USELUA 6 | 7 | #include "noteye.h" 8 | 9 | #ifdef USELUA 10 | extern "C" { 11 | #include 12 | #include 13 | #include 14 | } 15 | #endif 16 | 17 | using namespace std; 18 | 19 | #include "util.cpp" 20 | #include "opengl.cpp" 21 | #include "gfx.cpp" 22 | #include "image.cpp" 23 | #include "tiles.cpp" 24 | #include "drawtile.cpp" 25 | #include "screen.cpp" 26 | #include "fpp.cpp" 27 | #include "iso.cpp" 28 | #include "font.cpp" 29 | #include "process.cpp" 30 | #include "stream.cpp" 31 | #include "consout.cpp" 32 | #include "sound.cpp" 33 | #include "lua.cpp" 34 | 35 | using namespace noteye; 36 | 37 | extern "C" { 38 | 39 | void noteye_init() { 40 | errfile = stdout; 41 | objs.resize(0); 42 | objs.push_back(NULL); 43 | objs.push_back(&gfx); gfx.id = 1; 44 | eventobjs.resize(0); 45 | eventobjs.push_back(1); 46 | initMode(); 47 | initLua(); 48 | } 49 | 50 | void noteye_run(const char *noemain, bool applyenv) { 51 | 52 | char *buf; 53 | 54 | if(applyenv && getenv("NOTEYEDIR")) { 55 | buf = (char*) malloc(strlen(getenv("NOTEYEDIR")) + strlen(noemain) + 8); 56 | sprintf(buf, "%s/%s", getenv("NOTEYEDIR"), noemain); 57 | } 58 | else buf = strdup(noemain); 59 | 60 | if(luaL_dofile(LS, buf)) 61 | noteyeError(21, "dofile", lua_tostring(LS, -1)); 62 | 63 | free(buf); 64 | } 65 | 66 | void noteye_handleerror(noteyehandler h) { 67 | noteyeErrorHandler = h; 68 | } 69 | 70 | void noteye_halt() { 71 | closeLua(); 72 | if(logfile) { 73 | fprintf(logfile, "%s", noteyeStats()); 74 | fclose(logfile); 75 | logfile = NULL; 76 | } 77 | #ifndef NOAUDIO 78 | extern void closeAudio(); 79 | closeAudio(); 80 | #endif 81 | SDL_Quit(); gfx.s = NULL; exsurface = NULL; 82 | for(int i=2; i