Compare commits

...

480 Commits

Author SHA1 Message Date
George Sokianos c076098ad9 Fixed hiscore date and compiled with latest SDL 2023-07-04 20:52:03 +01:00
George Sokianos 5dd814e452 Prepare first release 2022-12-21 17:46:45 +00:00
George Sokianos 43c8bd610f Some more fixes and minor changes 2022-09-10 11:57:02 +01:00
George Sokianos 6a78b47ae6 Cleaned up the makefile.os4 2022-09-09 23:38:37 +01:00
George Sokianos 2b1fd35298 Added makefile for OS4 and some fixes to make texts show right 2022-08-31 22:39:46 +01:00
lprobert fc6bb50460
Fixes a bunch of lint errors 2022-08-24 16:00:13 +02:00
lprobert 2aba6c4338
Adds setup/teardown to Makefile 2022-08-24 15:26:02 +02:00
Linus Probert 39bc060a77
Adds maintenance badge 2021-10-05 09:28:01 +02:00
Linus Probert abef4ed9a6
Patches all CMakeLists.txt to new CMake version 2021-10-05 09:15:29 +02:00
Linus Probert 26c5448a30
Fixes linting and some lint warnings 2020-07-11 10:16:57 +02:00
Linus Probert 1a559741e2
Create FUNDING.yml 2020-05-27 21:25:12 +02:00
Linus Probert 38207e03d1 Patch version raised to 3 2020-03-04 21:51:31 +01:00
Linus Probert e636ec1e53 Don't delete saves from other architectures on death 2020-03-04 21:50:51 +01:00
417e7d3cc8 Patch version raised to 2 2020-03-04 17:06:57 +01:00
Linus Probert 4edeb17ddc Fixes cross save problems due to architecture differences 2020-03-04 17:03:02 +01:00
Linus Probert de770ccc9f Patch version raised to 1 2020-03-04 12:50:39 +01:00
Linus Probert 8a347790c1 Update major version 2020-03-04 12:50:20 +01:00
Linus Probert 5a9335576a Completes game saving and resuming 2020-03-03 23:50:11 +01:00
Linus Probert b385f6e73a Don't want to store compile commands like this 2020-03-03 13:57:44 +01:00
Linus Probert 4106a856fc Begin an idea for "continue game" functionality 2020-03-03 13:07:32 +01:00
Linus Probert 8221304df8 Fixes some odd indentations 2019-12-03 15:18:47 +01:00
Linus Probert 4ceb82f171 Fixes MAGICAL achievemnt 2019-06-10 11:37:13 +02:00
Linus Probert 9e5e1d0a1e Patch version raised to 2 2019-06-10 11:20:24 +02:00
Linus Probert 6d323ca500 Adds steam achievements and LB for the Mage class 2019-06-10 11:19:40 +02:00
Linus Probert 9aefed0d00 Adds an dev env setup script 2019-06-10 09:43:39 +02:00
Linus Probert f102e49daf Realeasenotes v3.1.1 2019-06-10 09:19:43 +02:00
Linus Probert 392edd843c Updates blink tooltip to include item pickups. 2019-06-07 07:45:36 +02:00
Boris Vanhoof 6584981d10 remove unnecessary pickup 2019-06-06 23:56:15 +02:00
Boris Vanhoof d2cf79710a Mage blink skill pickup items in the path #60 2019-06-06 23:56:15 +02:00
Boris Vanhoof 78e9413188 Fix : Missing with vampiric blow doesn't seem to trigger a 'Dodge' action text #59 2019-06-06 00:53:52 +02:00
Linus Probert af957eb662 Disables mouse square rendering for all classes 2019-05-25 13:18:25 +02:00
Linus Probert 1d988d7f2f Fixes working explosions and artifacts
Artifacts:
- Explosive daggers
- Explosive kills
2019-05-25 13:11:24 +02:00
Linus Probert 68f4e152d3 Fixes returning daggers and resets erupt attack 2019-05-20 15:37:25 +02:00
Linus Probert 7f232beb32 A beginning to the new exploding artifacts 2019-05-16 07:43:19 +02:00
Linus Probert 12aff9afad Fixes erupt so it has a base push of 1 2019-05-15 20:33:56 +02:00
Linus Probert 2dc25c9b53 Adds the DAGGER_MAGNET artifact
* Adds sprites for volotile and synamite as well
2019-05-15 20:32:48 +02:00
Linus Probert 5e67ca7ef7 Removes stun from backstab skill 2019-05-15 07:50:45 +02:00
Linus Probert cac3fea106 Altered the vampiric blow icon slightly 2019-05-15 07:46:27 +02:00
Linus Probert 9ed80acbee Removes erupt test code 2019-05-14 22:48:29 +02:00
Linus Probert 05cbce0abc Adds vampiric blow icon 2019-05-14 22:47:35 +02:00
Linus Probert 6c135c6b9c Adds gui display for held keys
Also makes the gold key actually golden
2019-05-14 22:27:13 +02:00
Linus Probert fb031e2af3 Bumps version 2019-05-14 20:36:00 +02:00
Linus Probert b861e6e452 Fixes SENTINEL monsters from ignoring forced fear 2019-05-14 16:30:02 +02:00
Linus Probert 046551ad6d Changes ERUPT to cause fear instead of bleeding 2019-05-14 16:10:28 +02:00
Linus Probert 8fb1bbcc1e Fixes bug with erupt pushing direction 2019-05-14 15:57:36 +02:00
Linus Probert 35164a9876 Introduces vampiric blow
Icon isn't done yet.
2019-05-14 15:20:45 +02:00
Linus Probert dd3e84d70d Makes critical hits cause bleeding 2019-05-14 10:26:28 +02:00
Linus Probert 8f21e8bfb2 Prevents skill radius from impacting push back range 2019-05-14 09:00:59 +02:00
Linus Probert 2b743160aa Updates erupt tooltip to mention push back 2019-05-14 08:56:39 +02:00
Linus Probert 7ddaab816e Make erupt always push back 1 tile without any artifacts 2019-05-14 08:38:42 +02:00
Linus Probert 43ca8f4560 Fixes #58 - Game crash with AOE attacks 2019-05-14 08:36:37 +02:00
Linus Probert ef5cd4e244 Adds PUSH_BACK and SKILL_RADIUS effects to erupt skill 2019-05-14 08:27:49 +02:00
Linus Probert b00e607dec Start with debug gold 2019-05-10 12:51:42 +02:00
Linus Probert 67e29d609d Added the SKILL_RADIUS artifact (not used yet)
Also drops the levelcap on artifact drops. I don't think it really
matters if you get an artifact before you have the skill. This should
make the shop a bit more useful.
2019-05-10 12:47:33 +02:00
Linus Probert 81e7df1920 Adds skill icons for the two mage skills 2019-05-09 21:06:06 +02:00
Linus Probert 18effa2416 Rogue backstab skill now triggers bleeding as well 2019-05-09 16:13:25 +02:00
Linus Probert c043ad09cf Implements the erupt skill
Also fixed monsters dying through bleeding logic
2019-05-09 16:02:33 +02:00
Linus Probert 223a3b00c1 Implements the blink skill
The icon still needs to be created but the skill is complete
2019-05-09 10:16:38 +02:00
Linus Probert 2ca78e2ec7 Adds monster bleed damage every turn 2019-05-08 12:59:15 +02:00
Linus Probert 0476d4d1bd Introduces particle emitters on monsters
Also adds the bleed emitter to monsters for later use with the mage.
2019-05-07 11:52:30 +02:00
Linus Probert 826cbe11ff A quick start to the Mage 2019-05-06 13:48:40 +02:00
Linus Probert fcc6527a93 Minor fix 2019-04-23 16:06:20 +02:00
Linus Probert b409b76eca Improved build instruction structure 2019-04-23 16:05:47 +02:00
Andriy Svyryd b0753901ec React to PR feedback 2019-04-23 15:55:20 +02:00
Andriy Svyryd 86e6f66b58 Adds Windows compilation instructions 2019-04-23 15:55:20 +02:00
Linus Probert c0a4a4eb93 Make ninja builds smoother 2019-04-06 12:27:42 +02:00
Linus Probert c917981bad Patch version raised to 2 2019-03-24 17:19:44 +01:00
Linus Probert c2b8fd40eb Adds key pickup SFX 2019-03-24 12:20:45 +01:00
Linus Probert 7a59d15be0 Don't add walls to crumbling rooms before lvl 4 2019-03-24 12:13:38 +01:00
Linus Probert c9fde8dde1 Updated releasenotes 2019-03-21 15:58:23 +01:00
Linus Probert c4811ed073 Fixes checksumtool output again 2019-03-21 10:01:04 +01:00
Linus Probert eceb241162 Removes useless text from checksumtool output 2019-03-21 08:53:31 +01:00
Linus Probert cea891f87d Move checksum configuration to CMakeLists.txt and config.h 2019-03-21 08:52:39 +01:00
Linus Probert 8e282304ad Fixes release notes 2019-03-20 20:29:59 +01:00
Linus Probert 53703f1761 Patch version raised to 1 2019-03-20 20:28:29 +01:00
Linus Probert ce182ad20f Updates checksums 2019-03-20 20:27:06 +01:00
Linus Probert ebfe2715e0 Fixes compile error and some graphical issues
- Keys and artifacts should render on to of other items
- Locked doors will impact surrounding wall layouts
2019-03-20 19:56:30 +01:00
Linus Probert 2ae6ada297 Completes locked room generation 2019-03-20 09:53:35 +01:00
Linus Probert 18987e2c2a Incomplete monster key fixes 2019-03-19 21:54:58 +01:00
Linus Probert 59a1e81c6e Implementation of keys. Completely untested 2019-03-18 11:39:26 +01:00
Linus Probert 1065216b67 Include all files in pack files 2019-03-16 10:32:58 +01:00
Linus Probert 68533f05b3 Remove memory leaks from map destruction 2019-03-15 16:00:20 +01:00
Linus Probert 38dc3deb2c Merge branch 'dev' of github.com:liquidityc/breakhack into dev 2019-03-14 19:15:52 +01:00
Linus Probert beda4f6c7e Reduces fairy frequency 2019-03-14 19:15:45 +01:00
Linus Probert e50d40fb1c Adds doors and greater chance of walls 2019-03-14 19:11:25 +01:00
Linus Probert 0983bd1bd2 Fixes a weird issue with missing code 2019-03-14 08:52:27 +01:00
Linus Probert 184b42ff5a Fixes door logic 2019-03-11 16:28:57 +01:00
Linus Probert e42e0243af Adds some door logic 2019-03-11 16:22:39 +01:00
Linus Probert 756afbae9d Separates walls from regular tiles 2019-03-11 16:21:15 +01:00
Linus Probert 40a20e936c Adapts fopen/fopen_s to WIN32/GCC compile 2019-03-11 08:02:31 +01:00
Linus Probert af930f6b23 Fixes win compiler warnings 2019-03-11 07:27:50 +01:00
Linus Probert c4fd16d925 Updated dll checksums for windows build 2019-03-11 07:21:43 +01:00
Linus Probert f840b28839 Adds mediocre crack protection
- Added a simple checksum calculation lib
- Validates the hardcoded "lib file" checksum against the calculated
    checksum.

By looking at instructions for the cracked version of BreakHack on
various sites that show up on google it seems that the common theme is
to replace the steamlib dll/so with a modified version. Now the Steam
version of the game will validate a hardcoded checksum against a live
validated version to see if everything seems ok before boot.

It's not a major hinderance but it should eliminate the more basic
sites modus operandi.

Honestly I don't really care if people steal the game. IT'S OPEN SOURCE
FFS!

And the above exclamation confirms why I did this. Also, I wanted to se
if it was possible. Game on Crackers! :D
2019-03-11 00:06:06 +01:00
Linus Probert 7fbeaa3907 Introduced base structure for doors in maps 2019-03-10 19:33:47 +01:00
Linus Probert 3e43c30bcb Adds funny casting to avoid pedantic ISO C warning 2019-03-10 07:30:12 +01:00
Linus Probert fd3a625249 Adds monster bloodlust
- Introduces the beginning of an event listener system
- Introduces fairies. When they are killed monsters in the room rage!
2019-03-10 00:15:47 +01:00
Linus Probert d749861477 Make jumbled rooms more likely 2019-03-09 08:55:59 +01:00
Linus Probert 7ab5ece83b Nicer wall decorations on interior walls 2019-03-08 16:58:25 +01:00
Linus Probert 8c9622d6bd Shopkeeper now has bodyguards next time you meet after kiling him
Fixed cl warnings in cmake and added some more walldecorations as well.
Wall decorations needs better logic so we get the right decoration on
the right tile.
2019-03-08 14:39:23 +01:00
Linus Probert af0c61684d Adds juice
- Dust puffs when tiles begin to fall
- Fixed shop prices. 100 gold is a lot of money and it impacts your
    score when buying.
2019-03-08 13:02:56 +01:00
Linus Probert 46fbdc1b3c Fixed jumble layout logic 2019-03-08 12:39:21 +01:00
Linus Probert b40c54a88d Layouts can now be jumbled with each other
This takes quadrants from 4 random layouts and creates a new layout
based on those quadrants.

This is not done for shop layouts.
2019-03-08 12:00:08 +01:00
Linus Probert 8f20f36db7 Lighting on wall layouts and aggro shopkeepers 2019-03-08 10:17:06 +01:00
Linus Probert 3ba33d8852 Adds light tiles to layout files and a shopkeeper
Next step is to add game logic for shopkeeper murderers and
ability to take items after the shopkeeper is dead.
2019-03-07 20:06:04 +01:00
Linus Probert 447c1a773c Monster shopkeeper logic 2019-03-07 15:31:09 +01:00
Linus Probert 7e1dffb45e Shops implemented
Only need to add the shopkeeper now
2019-03-07 11:09:14 +01:00
Linus Probert 6009aa17f1 Merge branch 'dev' into shops
Conflicts:
	src/artifact.c
2019-03-06 22:30:17 +01:00
Linus Probert 9b4a7b6cfc Removes crazy old bug that never presented itself before
This isn't an issue with the current release because destruction of
objects and artifact objects is identical. Only became an issue now that
the artifact struct and destruction is chaning.
2019-03-06 22:28:13 +01:00
Linus Probert 63812fbe05 More wall layouts and cordinated walls 2019-03-06 18:21:27 +01:00
Linus Probert c6a022e2db Moved text sprite logic to sprite_util 2019-03-04 20:32:09 +01:00
Linus Probert 06ca6c3e1e Not finnished yet, commit 2019-03-04 18:06:46 +01:00
Linus Probert bab5fd7980 Merge branch 'dev' into shops 2019-03-04 16:06:58 +01:00
Linus Probert 68f44090ed Add amt sprite to all items where value != 0 2019-03-04 16:06:13 +01:00
Linus Probert 959fae1730 Add value sprite to items.
Completely untested
2019-03-04 15:00:35 +01:00
Linus Probert ca41520c06 Wall layouts added to regular build 2019-03-04 13:13:58 +01:00
Linus Probert 88f4703d00 Some more fence layouts 2019-03-04 13:05:23 +01:00
Linus Probert 486c1bb641 Merge branch 'dev' into shops 2019-03-04 12:52:20 +01:00
Linus Probert 206f95f3b6 Fences and walls in layout files 2019-03-04 10:09:55 +01:00
Linus Probert 1c4e600dd4 Wall layout data 2019-03-04 07:35:26 +01:00
Linus Probert 57a16888b8 Merge branch 'dev' into shops 2019-03-01 12:44:49 +01:00
Linus Probert 13ca11c70e Begins refactoring of layout parser to accomodate more layout details 2019-03-01 12:44:12 +01:00
Linus Probert 33efba87b5 Merge branch 'dev' into shops 2019-03-01 08:58:33 +01:00
Linus Probert 5d61a91139 Split pit layout logic into separate file
The plan is to extend this further to incorporate walls and stuff.
This can later be used for the shop layout.
2019-03-01 08:57:15 +01:00
Linus Probert 6542e4f1d0 Moves item update to its own function 2019-02-28 21:53:30 +01:00
Linus Probert 7b47c6a6bf Completes buyable items 2019-02-28 20:37:19 +01:00
Linus Probert 16d9035941 Merge branch 'dev' into shops 2019-02-28 19:41:30 +01:00
Linus Probert 4054c37caa Ignore vscode_build dir 2019-02-28 19:41:07 +01:00
Linus Probert ad227f1bed A start to "priced" items 2019-02-28 13:49:15 +01:00
Linus Probert 37ba189e54 Suppress cppcheck issues 2019-02-28 13:31:56 +01:00
Linus Probert 645a02c99e Ignore .vscode folder 2019-02-27 10:40:43 +01:00
Linus Probert 35b5d7a8c1 Patch version raised to 4 2019-02-26 17:52:24 +01:00
Linus Probert c3464eb37d Fixes a typo 2019-02-26 17:51:46 +01:00
Linus Probert fe18240060 Patch version raised to 3 2019-02-26 17:30:15 +01:00
Linus Probert e4555237ed
Update README.md
Codefactor badge change
2019-02-26 12:02:32 +01:00
Linus Probert 791dd7ecfd Removes cppcheck warning 2019-02-26 12:02:04 +01:00
Linus Probert b08ef10e82 Code maintenance and cleanup 2019-02-26 11:59:07 +01:00
Linus Probert fffcac12c0 Makes sure til effects and items apply after backstab 2019-02-24 23:33:08 +01:00
Linus Probert 1b440c248d Patch version raised to 2 2019-02-24 23:02:08 +01:00
Linus Probert a03aec7c46 Handles the second mingw special case which I kept forgetting.
Because I'm an idiot
2019-02-24 22:48:03 +01:00
Linus Probert 0de018f3be Fix mingw preprocessor define from cmake 2019-02-24 22:42:51 +01:00
Linus Probert 3eeb4d05a9 Include mingw32 64bit in the exclusion 2019-02-24 22:37:45 +01:00
Linus Probert 5f369da4e1 Fixed preprocessor command for mingw 2019-02-24 22:34:20 +01:00
Linus Probert c98e6e6d05 Fix wonky mingw errors in appveyor 2019-02-24 22:31:32 +01:00
Linus Probert 499f015db9 Only use gmtime_s for MSVC 2019-02-24 20:05:23 +01:00
Linus Probert 9b9a0ca2a0 Fixed bad include 2019-02-24 20:01:06 +01:00
Linus Probert 926054b116 Ensure that we have seed when making a map 2019-02-24 19:57:33 +01:00
Linus Probert 49b7ebb923 Include patch notes for v2.2.1 2019-02-24 19:48:40 +01:00
Linus Probert ee4dd273b9 Patch version raised to 1 2019-02-24 19:46:18 +01:00
Linus Probert 5ee20c9c20 Shifted to safer time functions and utc time 2019-02-24 19:43:41 +01:00
Linus Probert 563ebf9204 Adds another build fix 2019-02-22 00:38:39 +01:00
Linus Probert 3533d5ca58 Fixes build again 2019-02-22 00:36:10 +01:00
Linus Probert 97b097af41 Fixes builds 2019-02-22 00:34:56 +01:00
Linus Probert 685bf97467 Makes the custom random generator deterministic across platforms
TIL that the generators are implemented according to spec but the
distributions are custom. Since this is C I think we can manage without
distributions.

This still needs a test.
2019-02-22 00:27:19 +01:00
Linus Probert cc375bba4e Implements control over lua random numbers 2019-02-22 00:09:31 +01:00
Linus Probert 1205856d00 Attempt att syncing random generation
The default rand() and srand() differ between msvc and gcc.
Attempting to fix this by implementing a custom C++ library.
2019-02-21 20:57:38 +01:00
Linus Probert d1efa8450d Create new leaderboards with attribute 'Descending' 2019-02-20 20:18:52 +01:00
Linus Probert 2775780d5b Makes weekly leaderboards creatable from app.
Removes dependency on breakhack.net if that site ever goes offline.
2019-02-20 20:03:06 +01:00
Linus Probert 269b25ba86 Removes a mingw warning 2019-02-20 19:48:24 +01:00
Linus Probert 72c3817927 Adds weekly challenge seed play and leaderboard saving 2019-02-20 19:45:55 +01:00
Linus Probert 1212b1a88a Weekly challenge option added to play menu 2019-02-20 18:08:13 +01:00
Linus Probert ce2a3482d1 Generate seeds from the core seed so that levels will look different. 2019-01-10 19:26:19 +01:00
Linus Probert bc9d37eb91 Connects the random seed through all the generators
This is very untested and I'm guessing that every level will look
identical with this implementation.

Need to extend this so that generation seeds are created on boot for
every level based on the original seed.

Perhaps the "attack"/"defend" seed should also differ from the
generation seed to prevent playthroughs from becoming completely
identical.
2018-12-17 13:10:11 +01:00
Linus Probert 3c7dcb5ea1 Begins new random impl 2018-12-17 13:09:04 +01:00
Linus Probert 57b57c5051 Patch version raised to 4 2018-12-04 14:31:33 +01:00
Linus Probert 4d01251d1f Merge branch 'master' into dev 2018-12-04 14:30:20 +01:00
Linus Probert 9299087b44 Updates PhysicsFS to latest stable-3.0
This should solve issues related to a crash on windows update 1809
2018-12-04 14:09:18 +01:00
Linus Probert cb2510cf77 Rename physfs folder 2018-12-04 13:59:34 +01:00
Linus Probert 469134a5be Patch version raised to 3 2018-11-01 14:51:02 +01:00
Linus Probert 8ab527ca6a Makes monsters fall when the tile they are on falls
This is a case when phasing as a rogue in the crumbling rooms.
2018-11-01 14:49:27 +01:00
Linus Probert 8e39ff8346 Fix releasenotes for v2.0.2 2018-10-27 14:02:26 +02:00
Linus Probert cb6bd03b5e Patch version raised to 2 2018-10-27 13:56:34 +02:00
Linus Probert b0f2936d44 Removes beta release type 2018-10-27 13:56:17 +02:00
Linus Probert 76c2f90ce9 Fixes a compiler warning and arcade mode coverage 2018-10-27 13:53:29 +02:00
Linus Probert 823384161f Adds burst sound to eldritch blast 2018-10-27 13:47:44 +02:00
Linus Probert c2eae7a9fe Adds arcade game leaderboard
- Also fixes an ASSASSIN hidden state issue where the monster would
dissappear even if it's stunned.
2018-10-27 13:28:48 +02:00
Linus Probert f53703dd88 Introduces arcade mode 2018-10-26 18:37:50 +02:00
Linus Probert 0f66b0f3d0 Adds the game type select menu 2018-10-26 18:07:10 +02:00
Linus Probert 7005239830 Fixed commit msg in version script 2018-10-26 17:11:11 +02:00
Linus Probert 7991e7c1ce Fixes COMPLETED state for quick games 2018-10-26 17:09:46 +02:00
Linus Probert aea9995c68 Reduved stun from trip skill 2018-10-25 15:33:19 +02:00
Linus Probert a38a21a344 Incorporates quickplay leaderboard
Also fixed a bug when hitting esc from the "New Game" char select menu
after getting killed.
2018-10-24 22:50:00 +02:00
Linus Probert deb4638847 Fixes a bad help text 2018-10-24 22:24:53 +02:00
Linus Probert 120f8d7ff6 Some tweaks to the rogue character 2018-10-24 22:18:56 +02:00
Linus Probert 5985c3e7f6 Fixed a bad pointer reset 2018-10-24 16:12:51 +02:00
Linus Probert 9968b377a5 Fixes another memory leak 2018-10-24 08:30:53 +02:00
Linus Probert 7e71fcc773 Build updates 2018-10-23 11:01:35 +02:00
Linus Probert dd77f29e98 Fixes a typo 2018-10-22 18:12:59 +02:00
Linus Probert 51d7b679ef Completed the QUICK_GAME mode
- Still needs more testing before release
2018-10-22 13:57:17 +02:00
Linus Probert 97c95dacd4 Adds lua support for quick mode
This still needs a bunch of testing
2018-10-22 09:38:05 +02:00
Linus Probert f895fdb35e Add a title to char select menu. 2018-10-22 09:15:41 +02:00
Linus Probert 1a0d806459 Introduces menu option descriptions 2018-10-22 09:04:16 +02:00
Linus Probert f5a1c2f48a Removes a memory leak 2018-10-21 07:36:47 +02:00
Linus Probert d2fe3fce4c Fixes a codacy warning 2018-10-19 08:35:35 +02:00
Linus Probert bcdc9c1aa7
Update README.md 2018-10-18 23:56:52 +02:00
Linus Probert 8d09e8a23b Adds the new steam achievement and leaderboards 2018-10-18 23:19:33 +02:00
Linus Probert d034a69f44 Finnished up with the rogue
- Add trip skill icon
- Add phase in and out fx
- Make traps and pits work when phase ends
- Fixed a tooltip
2018-10-18 22:34:48 +02:00
Linus Probert 94ec8cfba1 Removed bad options in .clang_complete 2018-10-18 15:21:03 +02:00
Linus Probert 669a2fb029 Merge branch 'master' into dev
Conflicts:
	CMakeLists.txt
2018-10-18 14:08:48 +02:00
Linus Probert a90321e377 Patch version raised to 2018-10-17 21:57:27 +02:00
Linus Probert 0730eb4c49 Disable text input since this is on by default in SDL2.0
This has been causing some "jitter" I'm quite sure. Disabling text input
should help remedy this.
2018-10-17 21:56:04 +02:00
Linus Probert feed0e29fa Completes crumbling rooms. 2018-10-15 22:42:08 +02:00
Linus Probert 6e6f28dd8e Prevent tiles with chests from falling. 2018-10-15 22:42:08 +02:00
Linus Probert fd8799f36b Prevent tiles with objects on them from falling. 2018-10-15 22:42:08 +02:00
Linus Probert ee56143d0d Initial implementation of the falling tiles room modifier.
Incomplete and always on right now.
2018-10-15 22:42:08 +02:00
Linus Probert f65bdd0f13 Add license header to gamecontroller files 2018-10-14 22:43:45 +02:00
Linus Probert a803578bc0 Fixes a gcc warning 2018-10-14 21:38:56 +02:00
Linus Probert 87925041fe Adds the backstab skill icon 2018-10-13 01:09:02 +02:00
Linus Probert da3ff1a222 Small thumbstick tweak 2018-10-13 00:01:44 +02:00
Linus Probert 850aae34ee Adds controller haptics 2018-10-13 00:01:44 +02:00
Linus Probert 423ff733af Fixes a leak and begins restructure of controller code 2018-10-13 00:01:44 +02:00
Linus Probert 2e0a88e5e3 Switches the old MapTile texture system to use sprites instead
This is hardly tested at the moment.
2018-10-12 12:46:36 +02:00
Linus Probert 53151b6ee0 Adds the phase skill icon 2018-10-12 12:28:25 +02:00
Linus Probert e6b5b761b0 Includes attempt to determine if PS3 controller aswell as PS4 2018-10-12 11:06:01 +02:00
Linus Probert 894e3ba551 Merge branch 'master' into dev 2018-10-12 09:24:51 +02:00
Linus Probert c8900e8ddf Controller button rendering based on controller type
Also added in the last button textures that I'd left out previously.
2018-10-11 20:12:11 +02:00
Linus Probert 06d2da164a Controllers are working
Still needs some tweaks and some gui changes.
Also stumbled upon a bug.
2018-10-11 18:54:02 +02:00
Linus Probert 3143236908 Completely untested controller mappings. 2018-10-11 15:20:28 +02:00
Linus Probert 7333d3d62d Update issue templates 2018-10-10 23:53:42 +02:00
Linus Probert 70cc79fc9f
Merge pull request #47 from Oliveshark/add-code-of-conduct-1
Create CODE_OF_CONDUCT.md
2018-10-10 23:48:56 +02:00
Linus Probert bdbb10be04
Create CODE_OF_CONDUCT.md 2018-10-10 23:48:24 +02:00
Linus Probert 75660a5288 Update to readme. 2018-10-10 23:40:36 +02:00
Linus Probert bb7f9effd3 A beginning to controller support 2018-10-10 23:28:24 +02:00
Linus Probert 2919ebf97f Adds controller button support for skillbar 2018-10-10 22:54:43 +02:00
Linus Probert c3b2b6f214 Fixed a typo and made controller layout toggleable. 2018-10-10 22:38:54 +02:00
Linus Probert e526c037e8 Completed the button implementation for the help tooltips
Still need to fix the buttons in the panel
2018-10-10 22:34:41 +02:00
Linus Probert e845195823 Got this texture stuff working 2018-10-09 14:19:59 +02:00
Linus Probert 0723f62559 New approach where we render button textures in tooltips. 2018-10-05 13:08:38 +02:00
Linus Probert a162646177 More font modifications 2018-10-04 12:57:11 +02:00
Linus Probert 60374c93ad Font updates 2018-10-04 09:11:57 +02:00
Linus Probert 2b02ae569e An attempt to group files in msvc
- Mostly to get the header files listed nicely
2018-10-03 16:49:06 +02:00
Linus Probert a4cb234075 Re-aligned the credits file 2018-10-03 16:31:26 +02:00
Linus Probert e59f04b525 Merge branch 'dev' into feature/phase-skill 2018-10-02 23:35:24 +02:00
Linus Probert 2d25e42b40 Merge branch 'master' into dev 2018-10-02 23:35:02 +02:00
Linus Probert 5d1490b14e Another README badge fix 2018-10-02 23:34:02 +02:00
Linus Probert aefbd9586b Update readme to match new github url 2018-10-02 23:27:24 +02:00
Linus Probert c7c5346afc Completes testing of phase and fixes some errors
- Fixes some information in skill tooltips
- Fixes a bug with menu mouse selections
2018-10-02 22:42:29 +02:00
Linus Probert 97ad1ddd23 Introduced the phase artifact 2018-10-02 13:08:32 +02:00
Linus Probert 0dcb658076 Merge branch 'dev' into feature/phase-skill 2018-10-02 12:50:44 +02:00
Linus Probert 961060901c Attempt to bring the mouse menu click back 2018-10-02 12:49:19 +02:00
Linus Probert ee5ed1421f Implementd the skill. Still not tested. 2018-10-02 10:29:32 +02:00
Linus Probert b4fd2cb8b4 Added the phase tooltip. 2018-09-29 06:44:33 +02:00
Linus Probert 742d6e2363 Untested phase code. Needs more work 2018-09-28 14:57:43 +02:00
Linus Probert 90603b4ebe Fix what my bad build script broke 2018-09-25 14:28:03 +02:00
Linus Probert bc452a3fb6 Patch version raised to 2018-09-25 14:26:50 +02:00
Linus Probert 6811c42667 Patch version raised to 2018-09-25 14:24:11 +02:00
Linus Probert e796fffc7c Prepare release script for real versions 2018-09-25 14:23:47 +02:00
Linus Probert 35c3be45e0 Removed a type warning 2018-09-21 12:39:45 +02:00
Linus Probert 3bbe9176b8 Merge branch 'master' into dev 2018-09-18 07:52:53 +02:00
Linus Probert ae44d5c2bc Adds minimal Steam fiddling protection 2018-09-17 14:23:35 +02:00
Linus Probert c97688a690 Incorporate artifacts in rogue skills 2018-09-17 10:10:25 +02:00
Linus Probert 47082daac3 Build env changes 2018-09-15 15:54:05 +02:00
Linus Probert 3301437b8f Tuned the backstab skill slightly 2018-09-15 15:53:02 +02:00
Linus Probert 743e4a3bac Implemented the backstab skill 2018-09-15 11:01:35 +02:00
Linus Probert 81ccf8a730 Fixed a windy room issue 2018-09-14 18:54:48 +02:00
Linus Probert 083834d044 Maint: Remove CI compiler warnings 2018-09-14 13:09:06 +02:00
Linus Probert dc6b816a4a Add slash animation to trip skill 2018-09-14 13:07:20 +02:00
Linus Probert 87b2b9d2c9 Fix pits added to room
-  Prevent pits and wind from being combined too early
2018-09-14 09:33:08 +02:00
Linus Probert 5648be4982 Merge branch 'master' into dev 2018-09-14 08:48:56 +02:00
Linus Probert 6e3343aa3b License stuff and README updates 2018-09-14 08:47:41 +02:00
Linus Probert 5d5170cb0b Version bump for future release 2018-09-14 08:30:20 +02:00
Linus Probert 899d2e5d76 Update to build env 2018-09-13 23:50:33 +02:00
Linus Probert 583a7d049d Fixes some minor bugs caused by coding without testing 2018-09-13 23:45:33 +02:00
Linus Probert 60359d8e9c Untested implementation of the TRIP skill 2018-09-13 15:28:03 +02:00
Linus Probert dbf9fe3931 Maint: Removed duplicate code 2018-09-13 13:46:29 +02:00
Linus Probert 0fc1fed278 Maint: Clean up monster.c 2018-09-13 13:36:38 +02:00
Linus Probert e1b3364d88 Maint: Even more cleanup 2018-09-13 13:12:43 +02:00
Linus Probert 620a7e3ed5 Maint: Less complex main 2018-09-13 12:49:21 +02:00
Linus Probert 983875d064 Maint: Cleaned up a complex function 2018-09-13 11:35:07 +02:00
Linus Probert e293c21908 Rogue preparation 2018-09-13 10:48:35 +02:00
Linus Probert 0ca70c7376 Add the dagger skill to the rogue 2018-09-13 08:16:59 +02:00
Linus Probert c39f05d49e Fixed the player menu 2018-09-13 08:05:17 +02:00
Linus Probert 02a4407eb4 Got a bit further 2018-09-12 20:56:50 +02:00
Linus Probert f246c5751a Broken commit 2018-09-12 14:45:09 +02:00
Linus Probert 367be69852 Buggfix: Prevent clip switching on falling sprite
- This was a forgotten effect when the falling was implemented on the
player struct.
2018-09-12 08:03:28 +02:00
Linus Probert 988b53a4fa Outline the rogue skillset 2018-09-11 15:49:58 +02:00
Linus Probert 03b60f6140 Merge branch 'master' into dev 2018-09-11 15:49:43 +02:00
Linus Probert cfbd8cea4d Patch version bump 2018-09-11 15:48:52 +02:00
Linus Probert cc627dc0c3 Take damage if ending charge on a damaging object
- Currently, ending charge in fire or smoke doesn't damage the player
2018-09-11 15:47:14 +02:00
Linus Probert 5043a86377 Cleaned up main a bit and moved some code 2018-09-11 15:32:33 +02:00
Linus Probert fe88d08c25 Version bump 2018-09-10 22:32:05 +02:00
Linus Probert cb732a80ec Adds possibility to push monsters into pits and traps. 2018-09-10 22:27:26 +02:00
Linus Probert 2316d24942 Fixes falling sound choice bug 2018-09-10 22:23:45 +02:00
Linus Probert 2827d5ac0d Version bump 2018-09-09 12:57:15 +02:00
Linus Probert 956a37c36e Introduce windy rooms earlier 2018-09-09 12:50:35 +02:00
Linus Probert b3724afe49 Make the game a bit more actionfilled
- Level 1 is reduced in size
- More monsters spawn
- Maps are more 'messy' and less linear
- Introduces 'space' to hold your turn
2018-09-09 12:46:15 +02:00
Linus Probert c65d6907e5 Disable redundant physfs builds for CI 2018-09-09 01:40:27 +02:00
Linus Probert c52f6c9f97 Fixed a stupid error 2018-09-09 01:25:32 +02:00
Linus Probert c3c249c2f8 Fix Apple CI build 2018-09-09 00:19:16 +02:00
Linus Probert c22d7612be CI build again 2018-09-08 23:54:22 +02:00
Linus Probert ccf1ec979b Fixing the build 2018-09-08 23:47:24 +02:00
Linus Probert 321dc4f3af Remove a warning and some useless compilations
- Removes lua install from CI
2018-09-08 23:25:10 +02:00
Linus Probert f3ecd50b1a Statically link lua and fix linux steam package 2018-09-08 23:04:31 +02:00
Linus Probert 9e6325905f Switched eastereggs and logic, added last achievement 2018-09-06 20:12:37 +02:00
Linus Probert 3ef3351933 Minor miss in clang_complete 2018-09-06 08:31:22 +02:00
Linus Probert a78e4090ee Fixes a typo 2018-09-05 11:22:33 +02:00
Linus Probert 3fe4c8eb27 Remove leaderboard class from compile
I don't feel like messing with in game leaderboards at the moment. I'll
leave the scoring in so that it can be added in the future. For now the
community leaderboards will have to suffice.
2018-09-05 10:52:12 +02:00
Linus Probert 00a15d6a49 Autocreate a good package for steam if steam build 2018-09-04 11:24:16 +02:00
Linus Probert 7ee85ecdb0 Patch version increase 2018-09-04 11:17:18 +02:00
Linus Probert e217140895 Introduces more pit layouts 2018-09-04 11:16:44 +02:00
Linus Probert 1ee7b92be8 Merge branch 'master' of github.com:liquidityc/breakhack 2018-09-03 20:31:01 +02:00
Linus Probert 9364fec157 Increases patch version 2018-09-03 20:28:42 +02:00
Linus Probert e000580971 Merge branch 'dev' 2018-09-03 20:28:26 +02:00
Linus Probert 280b073a8c Prevents kill achievments from being granted on first hit. 2018-09-03 20:27:34 +02:00
Linus Probert a19a13e054 The beginning of an idea for a global leaderboard view 2018-09-03 20:21:54 +02:00
Linus Probert cb60a035dd Fixes some compiler warnings 2018-09-03 17:21:33 +02:00
Linus Probert 07d7d6e58b Added easteregg monsters and a funny achievement 2018-09-03 16:49:45 +02:00
Linus Probert f4f874c3ed Merge branch 'dev' of github.com:LiquidityC/breakhack into dev 2018-09-03 16:16:02 +02:00
Linus Probert 6e7ce815fd Removes useless transfer function 2018-09-03 12:53:12 +02:00
Linus Probert 4a6422fc09 Fixes non-existant treasure bug 2018-09-03 08:43:05 +02:00
Linus Probert 37518c100d Includes player and dungeon level in steam leaderboards.
- Intended for use in the in game leaderboard view once I make that.
2018-09-02 23:44:48 +02:00
Linus Probert 9bcb398f94 Includes player and dungeon level in steam leaderboards.
- Intended for use in the in game leaderboard view once I make that.
2018-09-02 23:44:48 +02:00
Linus Probert 75292d7539 Fixed stupid issue with steam sync 2018-09-02 17:39:43 +02:00
Linus Probert b962d55510 Fixed stupid issue with steam sync 2018-09-02 17:39:43 +02:00
Linus Probert ad2d0af79b Remove appid from git 2018-09-02 17:21:43 +02:00
Linus Probert 57b7831a45 Remove appid from git 2018-09-02 17:21:43 +02:00
Linus Probert 89168de588 Merge branch 'dev' 2018-09-02 13:54:30 +02:00
Linus Probert 81361bc459 Merge branch 'dev' 2018-09-02 13:54:30 +02:00
Linus Probert 1dadb2d9a0 Removes packaging from CI
Precompiled versions can be retrieved from STEAM from now on. But users
are most welcome to compile the source if they want to.
2018-09-02 13:52:34 +02:00
Linus Probert a6d96da067 Removes packaging from CI
Precompiled versions can be retrieved from STEAM from now on. But users
are most welcome to compile the source if they want to.
2018-09-02 13:52:34 +02:00
Linus Probert b7189b3487 Lifted the patch version
- The "infinite loop fix" merits a patch version increase.
2018-09-02 07:15:48 +02:00
Linus Probert 3acedb93df Lifted the patch version
- The "infinite loop fix" merits a patch version increase.
2018-09-02 07:15:48 +02:00
Linus Probert 35d2e2ee12 Fixes infinite loop issue in trapgen
Vertical coridoors before level 4 wouldn't leave enough space to place
4 traps since there is only 10 rows of tiles eligible for a trap and
every trap ocupies 3 rows and requires at least 2 spare rows. This could
cause an infinite loop situation.

* Also fixes linux build warnings and other stuff.
2018-09-02 06:04:24 +02:00
Linus Probert ef0e418e96 Fixes infinite loop issue in trapgen
Vertical coridoors before level 4 wouldn't leave enough space to place
4 traps since there is only 10 rows of tiles eligible for a trap and
every trap ocupies 3 rows and requires at least 2 spare rows. This could
cause an infinite loop situation.

* Also fixes linux build warnings and other stuff.
2018-09-02 06:04:24 +02:00
Linus Probert 1972b5b1df Added kills leaderboard
- Restructured the code a bit to avoid c vs c++ conflicts.
2018-08-31 15:58:59 +02:00
Linus Probert 0ca64fb882 Added kills leaderboard
- Restructured the code a bit to avoid c vs c++ conflicts.
2018-08-31 15:58:59 +02:00
Linus Probert 26379535be Fixes fullscreen centering on hirez screens 2018-08-30 14:08:34 +02:00
Linus Probert 41a2b1b8f8 Fixes fullscreen centering on hirez screens 2018-08-30 14:08:34 +02:00
Linus Probert f667cdb4fe Removed a stupid mistake 2018-08-30 14:01:28 +02:00
Linus Probert 0ae8849323 Removed a stupid mistake 2018-08-30 14:01:28 +02:00
Linus Probert fbb63ba742 Adds information to player
- Fullscreen command is listed
- ESC to go back from views is listed
2018-08-30 11:32:09 +02:00
Linus Probert 4013449878 Adds information to player
- Fullscreen command is listed
- ESC to go back from views is listed
2018-08-30 11:32:09 +02:00
Linus Probert 0ab65c9989 Fixed charge
- Prevent click sound from triggering
- Prevent hovering on pits if you end charge on them
- Trigger traps if you end charge on them
2018-08-30 11:13:50 +02:00
Linus Probert e1c154fc1c Fixed charge
- Prevent click sound from triggering
- Prevent hovering on pits if you end charge on them
- Trigger traps if you end charge on them
2018-08-30 11:13:50 +02:00
Linus Probert 0f50d3b015 Prevent stunned monsters from getting scared by player 2018-08-30 09:55:04 +02:00
Linus Probert ee8274038f Prevent stunned monsters from getting scared by player 2018-08-30 09:55:04 +02:00
Linus Probert 5a8c1ece14 Fixed some more fullscreen
There is still a slight offset. I need to practice maths I think
2018-08-30 09:12:05 +02:00
Linus Probert 5dc25c1e79 Fixed some more fullscreen
There is still a slight offset. I need to practice maths I think
2018-08-30 09:12:05 +02:00
Linus Probert f9556cbf59 Fixes nicer fullscreen rendering
Also solves some compiler warnings on linux
2018-08-30 08:54:21 +02:00
Linus Probert a75a0d9331 Fixes nicer fullscreen rendering
Also solves some compiler warnings on linux
2018-08-30 08:54:21 +02:00
Linus Probert adb22fed8e Passable fullscreen mode
- Centering is still a bit off
2018-08-30 00:09:55 +02:00
Linus Probert 0d1836a8ba Passable fullscreen mode
- Centering is still a bit off
2018-08-30 00:09:55 +02:00
Linus Probert 7b54e93893 Implemented leaderboard updates 2018-08-29 22:13:22 +02:00
Linus Probert 316325b98d Implemented leaderboard updates 2018-08-29 22:13:22 +02:00
Linus Probert d36c1dd954 Version bump 2018-08-29 15:03:35 +02:00
Linus Probert c7011efc30 Version bump 2018-08-29 15:03:35 +02:00
Linus Probert 3697e9b0b6 Adds hooks for all achievements 2018-08-29 14:31:20 +02:00
Linus Probert d2ced6cef1 Adds hooks for all achievements 2018-08-29 14:31:20 +02:00
Linus Probert 412a30da0d Fixed non-steam build, because I broke it :D 2018-08-29 14:11:36 +02:00
Linus Probert 28b3980fe6 Fixed non-steam build, because I broke it :D 2018-08-29 14:11:36 +02:00
Linus Probert 76d78600cb Completed Steam api integration.
- Next step is to actually trigger the achievements in the right places.
2018-08-29 14:03:18 +02:00
Linus Probert 8cdc87c299 Completed Steam api integration.
- Next step is to actually trigger the achievements in the right places.
2018-08-29 14:03:18 +02:00
Linus Probert 30ab6af565 Update readme with steam info 2018-08-28 16:24:30 +02:00
Linus Probert 78ea122123 Update readme with steam info 2018-08-28 16:23:39 +02:00
Linus Probert 9ae383b34e Prepares for steamworks api integration 2018-08-27 17:16:01 +02:00
Linus Probert c23927c4fa Merge branch 'dev' 2018-08-23 09:45:53 +02:00
Linus Probert cc1ae5d99d Beta 2 releasenotes and version 2018-08-23 09:44:19 +02:00
Linus Probert f5a88fc10e Introduces texture blending
- Makes indicator sprites transparent when the player is under them
2018-08-23 09:41:10 +02:00
Linus Probert 52913af237 Completes #42 Add boss 2 & 3
- Adds "The Shadow"
- Adds the "assassin" behaviour
- Adds some assassins to levels > 15
2018-08-23 09:11:13 +02:00
Linus Probert 449cc362a0 Fixes some minor buggs
- Monsters now drop loot as soon as they die
    (not after the dagger has stopped moving)
- Artifacts keep correct alignment even after a level switch.
2018-08-23 08:41:47 +02:00
Linus Probert f67aab0b37 Completes #43 Add win state
Game now ends if you reach depth level 20

Also fixed:
    - Funky bug with stats with 0 dmg
    - Wonky speed = 2 on monsters behaviour
    - Some other minor stuff
2018-08-22 20:54:39 +02:00
Linus Probert 8c261fd59f Added the undead monsters for level > 10
- Fixed a double damage bug
- Prevent player from getting killed when in DEBUG mode
   - This can cause really weird behaviour if you fall into a pit.
2018-08-22 14:02:55 +02:00
Linus Probert 6326a64111 Begins #42 Add boss 2 & 3
- Added "The cleric" for level 10.
2018-08-22 13:13:54 +02:00
Linus Probert f1b0045829 Introduces the "orc levels"
Also fixes some minor buggs.
2018-08-22 11:05:12 +02:00
Linus Probert ffe1736792 Minor buggfixes and typos
- Mention level in "new skill tooltip"
- Fix a msvc compiler warning
- Prevent level 2 artifact first pickup from bugging rendering
2018-08-21 22:27:45 +02:00
Linus Probert 9244da3b64 Version bump and badges 2018-08-21 17:01:15 +02:00
Linus Probert 8bf9329b8c Version bump and badges 2018-08-21 17:00:33 +02:00
Linus Probert 8c25693d6d Moves sqlite3 files to separate dir
Only intention is to separate my code from 3rd party code.
2018-08-21 16:32:26 +02:00
Linus Probert bec9eb429d Fixed a typo in skill tooltip 2018-08-21 16:21:22 +02:00
Linus Probert 43f021a997 Created an FPS counter for debug mode
- Also moves the "sword pointer" to debug mode only.
2018-08-21 16:18:11 +02:00
Linus Probert dbc36aab9f Fixes #41, Minimap 2018-08-21 15:44:12 +02:00
Linus Probert c390c024f6 Fixes #40, Prevent adjecant traps before lvl 4
Made the simplest solution possible here. An A* start algo to check that
we didn't block paths seemed overkill.
2018-08-21 12:56:02 +02:00
Linus Probert 9ef97c0897 Fixes #38, Artifact inventory 2018-08-21 12:42:23 +02:00
Linus Probert 358c0c7ddc Fixes #37 and #39 Adds tooltips to everything
- A tooltip on first play will explain how it works
- A tooltip on levelup will display skill info
- A setting is introduced to disable tooltips
2018-08-20 14:32:38 +02:00
Linus Probert 5f754d551a Merge branch 'master' into dev 2018-08-19 20:26:28 +02:00
Linus Probert 30058ea4e0 Creates gui_util and moves some code out from gui.c 2018-08-19 20:25:31 +02:00
Linus Probert 6763ef0144 Prevent levels > 10 from crashing the game. 2018-08-18 20:54:08 +02:00
Linus Probert 854f2c0918 Prevent levels > 10 from crashing the game. 2018-08-18 20:53:13 +02:00
Linus Probert 549f47ae0b Minor code fixes and a slight tweak to the blue color 2018-08-16 14:09:54 +02:00
Linus Probert 3fabd039a4 Prevents artifacts before level 3
- Also fixes a potential segfault
2018-08-15 18:16:44 +02:00
Linus Probert 8fa4fbd51c Patch version raised to 13 2018-08-15 08:08:58 +02:00
Linus Probert 9a610d5f88 Adds window icon
- Fixes bug where you could move when falling.
2018-08-15 08:08:18 +02:00
Linus Probert 6af8d9dd8f Completes #8 First boss
- Adds "The Hell Hound" to level 5
2018-08-15 07:20:53 +02:00
Linus Probert 915ea59ca3 Fixes a mistake in music loading. 2018-08-14 17:00:10 +02:00
Linus Probert 6cc96a954d Begins #8 First boss
- Introduces FIRE_DEMON behaviour
- Just need to pick a sprite and adapt the lua code
2018-08-14 13:28:10 +02:00
Linus Probert 1a09328793 Adds boss music and an additional attribution line per request. 2018-08-14 13:15:22 +02:00
Linus Probert 6633db7aa4 Adds room objects and FIRE rooms. 2018-08-13 13:11:32 +02:00
Linus Probert 0b58e535ec Removed "Examples" folder from assets 2018-08-12 19:59:16 +02:00
Linus Probert 292f549d57 Minor compiler warning fix 2018-08-12 19:48:14 +02:00
Linus Probert b4ae946140 Patch version raised to 12 2018-08-12 19:44:17 +02:00
Linus Probert 369cfda70b Completes #33 Create score screen 2018-08-12 19:43:33 +02:00
Linus Probert 254417271c Began #33 Create score screen
Adds the backend (db) part of hiscores, next step is to create the
screen.
2018-08-12 16:14:07 +02:00
Linus Probert 7739ac546f Merge branch 'dev' 2018-08-12 10:46:29 +02:00
Linus Probert ffd777e055 Buggfixes
- Change credit screen font color
- Main menu monsters are back
2018-08-12 10:45:52 +02:00
Linus Probert 4ccdebe79c Patch version raised to 11 2018-08-12 09:25:03 +02:00
Linus Probert 3f1cdf8a12 Fixes: #5 Creates a creditscreen 2018-08-12 09:13:18 +02:00
Linus Probert 2a80434547 Adds posibility for daggers hitting walls to be recoverable. 2018-08-11 23:35:16 +02:00
Linus Probert 4e1050dc8a Patch version raised to 10 2018-08-11 20:25:10 +02:00
Linus Probert 69e5ff99e0 Fixes #35 2018-08-11 20:16:23 +02:00
Linus Probert b4a6c4b46f Fixes some render layer issues
- Chance for more daggers in containers
- Less health from meat
- Prevent exit from spawning under containers
2018-08-11 15:15:53 +02:00
Linus Probert 4ba301769a Fixes: #30
- Also fixes a bug with artifact generation
- Extends menu room with new features
- Adds more descriptive text to container openings
- Fixes bug with container loot generation
2018-08-10 22:31:06 +02:00
Linus Probert 62d1bbd49d Completes #31 Adds chests to game 2018-08-10 20:09:56 +02:00
Linus Probert 1c7631cf52 Starts #31 Items: Chests
Lua gen code remains to do
2018-08-10 14:29:45 +02:00
Linus Probert 83aa92943f Don't open menu immidiately upon death. 2018-08-10 13:29:12 +02:00
Linus Probert 5e3815a233 Fixes: #34 hopefully 2018-08-10 13:18:56 +02:00
Linus Probert 71c1279ef7 Completes #2 artifacts 2018-08-10 13:00:23 +02:00
Linus Probert 8dd774b308 Continues #2 Completed impl of INCREASED_STUN
- That should be all artifacts implemented. Last step is the random
generation and drop rate.
2018-08-09 16:18:34 +02:00
Linus Probert ba1d09ad51 Continues #2 completed impl of DAGGER_RECOVERY 2018-08-09 16:15:22 +02:00
Linus Probert 19e7583f3e Continues #2 FEAR_INDUCING impl
This required changes (improvements imo) to the monster state logic.
2018-08-09 16:09:47 +02:00
Linus Probert 0aacdd2d84 Continues #2 Adds PUSH_BACK impl 2018-08-09 15:31:27 +02:00
Linus Probert ac7dada0d5 Fixes #23 possibly 2018-08-09 15:15:25 +02:00
Linus Probert a04f131c2d Continues #2: Adds charge skill impl
- Also adds an arti pickup sound
2018-08-09 13:58:16 +02:00
Linus Probert 736eb79996 Continues #2: Artifacts
- Adds sparkle effect on artifacts
- Implements TRAP_AVOIDANCE, IMPROVED_HEARING
2018-08-08 14:46:59 +02:00
Linus Probert 095c93e5b2 Began #2: Added artifacts and the PIERCING_DAGGERS modifier
Still need to add the rest of the artifact effects but that should be
simpler from this point.
2018-08-08 00:14:24 +02:00
Linus Probert 611d8ef4d6 Fixes a minor bug in the guerilla behaviour 2018-08-06 19:38:27 +02:00
Linus Probert aaa8e8c36e Makes stunned enemies "wobble" instead of having an indicator.
- Also adds more decorations to rooms.
2018-08-06 13:34:27 +02:00
Linus Probert ffde0793e5 Fixes: #4 Room stuff: Traps
- Adds traps
- Adds lua hooks for traps
- Fixes level exit in pit bug
2018-08-06 00:28:23 +02:00
Linus Probert a3c3c634d6 Adds the bash sound effect 2018-08-05 15:47:56 +02:00
Linus Probert 41a902181a Fixes a bunch of msvc warnings 2018-08-05 15:01:25 +02:00
Linus Probert 3720eb1c19 Minor READM change 2018-08-05 13:01:31 +02:00
Linus Probert 658d039d66 Patch version raised to 9 2018-08-05 12:52:06 +02:00
Linus Probert 484fb30a89 Changes the log to fill from the bottom
Looks more natural this way.
2018-08-05 12:48:56 +02:00
Linus Probert d8615b2f14 Changes stun icon and fixes some syntax reports from codacy 2018-08-05 11:00:43 +02:00
Linus Probert 9fe2edee85 Fixes: #29 and #17 New skill: bash
Adds the bash skill and the stunned state.
Stunned enemies have disadvantage while stunned.
2018-08-04 23:52:52 +02:00
Linus Probert 72772358bd Patch version raised to 8 2018-08-04 21:51:08 +02:00
Linus Probert 56af37edb0 Removing natural lighting debug.
After implementing line of sight light it did not look good at all with
this size of tiles. Keeping as is for now.
2018-08-04 14:07:17 +02:00
Linus Probert c16caf30b5 Comments out unused function 2018-08-03 11:08:44 +02:00
Linus Probert 353b4ed1c5 Adds raycasting debug
Next step is to actually implement the Bresenham Line Algorithm to make
line of sight and object shadowing a reality.
2018-08-03 10:45:54 +02:00
Linus Probert 68cf24ddf8 Dropps the particle line slash effect. 2018-08-03 10:44:30 +02:00
Linus Probert 2aee3600e6 Merge branch 'master' into dev 2018-08-03 10:41:21 +02:00
Linus Probert 1491dfbf3e Minor dev-env change 2018-08-01 23:53:08 +02:00
Linus Probert 1124e88df0 Minor fixes
- Make skills correctly turn the player
- Don't repopulate the matrix on every frame only on turn change
2018-07-31 23:45:09 +02:00
Linus Probert 4819eda1dd Adds "NEW GAME" menu option to game over menu
Also makes menu open when player dies
2018-07-31 23:13:30 +02:00
Linus Probert 4612cabe00 Adds sword animation to flurry
And XP gain to charge skill.
2018-07-31 21:23:01 +02:00
Linus Probert b9a4a8002d Fixes: #27 Suspicious code: sign conversion 2018-07-31 21:15:16 +02:00
Linus Probert 58e9c7ed13 Fixes: #21 Complex method issue in monster.c
At least this is an attempt at a fix
2018-07-31 21:08:36 +02:00
Linus Probert b12e5d4f7a Fixes: #26 Dagger kills should now give XP 2018-07-31 14:30:41 +02:00
Linus Probert b3b8208b11 Adds complete rewrite of lua scripts
Lua scripts now build an in memory structure of all the rooms and their
contents before loading this data into the game. This enables better
possibilities to prevent monsters from spawning in bad places. Monsters
can now also spawn in coridoor rooms.
2018-07-31 14:25:29 +02:00
Linus Probert 18e70221fa Restructured main game loop a bit. Reduced function size 2018-07-28 14:28:55 +02:00
Linus Probert 252955bc8d Removes "resume" option from menu when game over. 2018-07-09 22:53:52 +02:00
Linus Probert 988d6c5cac Implemented the sword swing effect.
This adds the animation type for future use.
Not super happy with the animation png. Will look over it in the future.
2018-07-09 19:26:06 +02:00
Linus Probert 79b0869974 Adds sword swing effect that isn't horrible 2018-07-06 22:54:15 +02:00
Linus Probert c96d0b6718 Removes bug that made it possible to move with daggers in air. 2018-07-06 22:30:28 +02:00
Linus Probert c6b643835b Added codefactor badge and fixed blank line issue. 2018-07-06 12:12:27 +02:00
Linus Probert a30d501e86 Patch version raised to 7 2018-06-28 12:54:15 +02:00
Linus Probert f36a9dd2ac Sleeping state indicator is always visible. 2018-06-28 12:50:32 +02:00
Linus Probert 53dc7e2fe6 Possibly more accurate scaling. 2018-06-23 14:30:29 +02:00
Linus Probert dff55a1978 Fixes some buggs
- Fixes mapbuilder pit loading nullpointer
- Fixes black main menu bg after return to main menu
- Fixes skill sparkling on new game start
2018-06-14 00:12:49 +02:00
Linus Probert be42981ff3 Fixed errors and adapted to new vim 8.1 2018-05-27 15:13:03 +02:00
Linus Probert 60052af7f5 Merge branch 'master' into dev 2018-05-25 13:46:55 +02:00
Linus Probert 4684e0409c Minor cleaning of lua scripts 2018-05-25 13:46:28 +02:00
Linus Probert 6a9a3bdbcf Removed some old debug output from pitlayouts. 2018-05-25 13:32:15 +02:00
Linus Probert ec6722106a Adds an idea for slash animations that didn't look very good. 2018-05-22 23:01:15 +02:00
Linus Probert cc229c8b00 Prepares pengine for more particle types.
Also fixed an invalid read bug.
2018-05-22 22:42:06 +02:00
Linus Probert bbe4526947 Fixes colors to use defines. 2018-05-22 15:48:09 +02:00
Linus Probert 2462e4cf33 Adds sentinel monster behaviour. 2018-05-21 21:03:59 +02:00
Linus Probert a66f16de79 Reintroduces the pointer and mouse menu operation. 2018-05-20 17:25:53 +02:00
Linus Probert 123ae90f59 Better mod key logic in input and mouse motion check. 2018-05-20 16:53:16 +02:00
Linus Probert 821cac2fbd Completely separates input handling and game logic.
This commit disables mouse support in menus. This needs to be rethought
to be more stable.
2018-05-20 00:03:17 +02:00
Linus Probert 186cc7b514 Replaced state logic with behaviours instead. 2018-05-19 17:55:10 +02:00
Linus Probert b905232d5e ....and once again... 2018-05-18 23:28:24 +02:00
Linus Probert 8573bad864 ...and include the SDL dll 2018-05-18 23:25:10 +02:00
Linus Probert 8c58c6ee2f And once again for windows! 2018-05-18 23:20:28 +02:00
Linus Probert 6788e3cd29 Another trywq 2018-05-18 23:13:56 +02:00
Linus Probert 60114ed159 Hopefully fixes the build issues 2018-05-18 23:11:33 +02:00
Linus Probert e222e51a0e Don't test on clang and fix include problem in appveyor
Clang doesn't have the same --wrap linker flag that GCC has. Just ignore
it for now.
2018-05-18 14:17:29 +02:00
Linus Probert 138cba1400 Mock test for keyboardinput and fixed the found issues 2018-05-18 13:49:31 +02:00
Linus Probert 2feeb5cbcf Attempts to fix appveyor build 2018-05-17 23:34:44 +02:00
Linus Probert f1206811d0 Fixed the releasenotes and the script for it 2018-05-17 23:18:35 +02:00
Linus Probert 998501ae42 Patch version raised to 6 2018-05-17 23:15:53 +02:00
Linus Probert 2813a571e4 Separate player movement from input event loop.
Wrote a keyboardinput object but decided against using it for the time
being. I'll leave it in if I change my mind.
2018-05-17 23:14:42 +02:00
Linus Probert c4dc8382a9 Monsters now indicate their state with speech bubbles 2018-05-17 21:41:23 +02:00
Linus Probert f049d66219 Fixed releasenotes and script again 2018-05-17 10:06:58 +02:00
Linus Probert 769a659bfe Patch version raised to 5 2018-05-17 10:00:25 +02:00
Linus Probert 0fcc1d2dc4 Last time now 2018-05-17 10:00:09 +02:00
Linus Probert 60750d73b9 Patch version raised to 5 2018-05-17 09:58:30 +02:00
Linus Probert a551c52394 More trickery 2018-05-17 09:58:18 +02:00
Linus Probert fa0dbe2933 Fixes miss in release script 2018-05-17 09:54:00 +02:00
Linus Probert beb2e79351 Patch version raised to 5 2018-05-17 09:50:13 +02:00
Linus Probert 7f09fbda8d Fiddled some more with release script 2018-05-17 09:49:03 +02:00
Linus Probert d4f2514e7e Patch version raised to 5 2018-05-17 09:00:27 +02:00
343 changed files with 37440 additions and 2474 deletions

View File

@ -60,6 +60,10 @@ before_build:
%DEPENDS% copy cmocka-1.1.0\include\* %PREFIX%\include > nul
%DEPENDS% copy cmocka-1.1.0\lib\*.a %PREFIX%\lib > nul
%DEPENDS% copy cmocka-1.1.0\bin\*.dll %PREFIX%\lib > nul
# Copy dll's for test exec
- |-
copy %PREFIX%\lib\SDL2.dll %APPVEYOR_BUILD_FOLDER% > nul
copy %PREFIX%\lib\cmocka.dll %APPVEYOR_BUILD_FOLDER% > nul
# Lua
@ -82,29 +86,29 @@ build_script:
# Build
- |-
cmake --version
cmake -DCMAKE_PREFIX_PATH="%PREFIX%" -DCMAKE_C_COMPILER=mingw32-gcc.exe -DCMAKE_MAKE_PROGRAM=mingw32-make.exe -G "MinGW Makefiles"
cmake -DCMAKE_PREFIX_PATH="%PREFIX%" -DCMAKE_C_COMPILER=mingw32-gcc.exe -DCMAKE_MAKE_PROGRAM=mingw32-make.exe -G "MinGW Makefiles" .
- |-
mingw32-make
ctest -V
mingw32-make package
# mingw32-make package
artifacts:
- path: package/breakhack-*.zip
name: breakhack_zip
# artifacts:
# - path: package/breakhack-*.zip
# name: breakhack_zip
- path: package/breakhack-*.exe
name: breakhack_exe
# - path: package/breakhack-*.exe
# name: breakhack_exe
deploy:
provider: GitHub
description: 'Alpha pre-release'
auth_token:
secure: IlMEyGp0AuDI8/MkFAY2KpRr70c3p8eVEMdcqC1EcgyCCbvoMOppBQ0gY44ao0gq
draft: false
prerelease: true
on:
branch: master
appveyor_repo_tag: true
# deploy:
# provider: GitHub
# description: 'Alpha pre-release'
# auth_token:
# secure: IlMEyGp0AuDI8/MkFAY2KpRr70c3p8eVEMdcqC1EcgyCCbvoMOppBQ0gY44ao0gq
# draft: false
# prerelease: true
# on:
# branch: master
# appveyor_repo_tag: true

View File

@ -1,5 +1,4 @@
-DDEBUG
-I./build/config.h
-DSTEAM_BUILD
-I/usr/include/SDL2/
-I/usr/include/lua5.2/
-I/usr/include/physfs.h
-include./_build/debug/config.h

12
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: LiquidityC
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

29
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- Version [e.g. 1.1.4]
- OS: [e.g. Windows, Archlinux, Ubuntu]
- Architecture: 32 or 64 bit?
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

12
.gitignore vendored
View File

@ -1,3 +1,6 @@
/.vscode/
/vscode_build/
/CMakeSettings.json
/_build/
/*.dll
/tags
@ -5,5 +8,14 @@
/data.pack
/.vs/
/.data.db
/steamworks_c_wrapper/_build
/steamworks_c_wrapper/sdk
*.swp
*~
/steam_appid.txt
/*.so
/breakhack*.run
compile_commands.json
*.o
breakhack

View File

@ -52,19 +52,18 @@ addons:
build_command: "make"
branch_pattern: coverity_scan
before_deploy:
- make package
# before_deploy:
# - make package
deploy:
provider: releases
api_key:
secure: "KeT/BC2ck2eqs1q4keoLe/Y9KIk+AR5shiAnA2oMQzbLWoZmxUx3Kol7rLPJ0Hfgb+aCpSpTM1njX6Kw7Nl8j4NrOkgadb3ZmfqRthFazzb93reRt+0dZZcurilHpWtMeteaZLWGWaG0j09xnI3CPPjmth6BB+/roGRsQyo1QKk0pZYsQD6ZKfGAUR1576dFyRzvsIrnfLd7rZVSNZ8HtPwN2rmSLD/cGxMCf+IafcBInPyv9p6bCoVLIDFnDdCr+kwBuSlGudT15EtDx3d9Abab3ZIS3NUpnXr2s0BmknCpyb59YsG9V0YXIQsIkwioEWiJskcAznXT/yB4XqDCq693b+0sxldsUVPw2JkMU+40V5ay2itH3SeP/LyXVFUARdWB+nn6avaFRVaZ1nHYP95CrBXC8JGB1bd7ejeEm9+cOvBOgvsZp71uRJ2OdEXN5Z3i373cyvWXPFHVbQRJS5l1dRBJR0sozYcPe8BMQ4Pv+xahFWIeyDAErUwJSiOf1Uv/x6PNxJaZTTZKCYGSRo6Ywb15bw4YnlOzDXllBxNg3IsJjJes1qFBJGR1eRMq/U9Ne+eHLk7cn2r7Fa77DtFsbONTDHftXDFHk46LDLF+HlL2wHIoTJVzLl/tXyBm3MJuaghGEvvZSwalWS3UnvMTQOBlDG0qC/ww6mlkv+Y="
skip_cleanup: true
file_glob: true
file:
- "package/breakhack*.tar.gz"
- "package/breakhack*.tar.Z"
on:
tags: true
condition: $CC = gcc
condition: $BUILD_TYPE = Release
# deploy:
# provider: releases
# api_key:
# secure: "KeT/BC2ck2eqs1q4keoLe/Y9KIk+AR5shiAnA2oMQzbLWoZmxUx3Kol7rLPJ0Hfgb+aCpSpTM1njX6Kw7Nl8j4NrOkgadb3ZmfqRthFazzb93reRt+0dZZcurilHpWtMeteaZLWGWaG0j09xnI3CPPjmth6BB+/roGRsQyo1QKk0pZYsQD6ZKfGAUR1576dFyRzvsIrnfLd7rZVSNZ8HtPwN2rmSLD/cGxMCf+IafcBInPyv9p6bCoVLIDFnDdCr+kwBuSlGudT15EtDx3d9Abab3ZIS3NUpnXr2s0BmknCpyb59YsG9V0YXIQsIkwioEWiJskcAznXT/yB4XqDCq693b+0sxldsUVPw2JkMU+40V5ay2itH3SeP/LyXVFUARdWB+nn6avaFRVaZ1nHYP95CrBXC8JGB1bd7ejeEm9+cOvBOgvsZp71uRJ2OdEXN5Z3i373cyvWXPFHVbQRJS5l1dRBJR0sozYcPe8BMQ4Pv+xahFWIeyDAErUwJSiOf1Uv/x6PNxJaZTTZKCYGSRo6Ywb15bw4YnlOzDXllBxNg3IsJjJes1qFBJGR1eRMq/U9Ne+eHLk7cn2r7Fa77DtFsbONTDHftXDFHk46LDLF+HlL2wHIoTJVzLl/tXyBm3MJuaghGEvvZSwalWS3UnvMTQOBlDG0qC/ww6mlkv+Y="
# skip_cleanup: true
# file_glob: true
# file:
# - "package/breakhack*.tar.gz"
# on:
# tags: true
# condition: $CC = gcc
# condition: $BUILD_TYPE = Release

11
.vimrc
View File

@ -1,6 +1,9 @@
nnoremap <F1> :Make<cr>
nnoremap <F2> :Make clean<cr>
nnoremap <F3> :Make lint test<cr>
nnoremap <F4> :!./_build/breakhack<cr>
nnoremap <F2> :Make lint test<cr>
nnoremap <F3> :Termdebug _build/debug/breakhack<cr>
nnoremap <F4> :ter ++close env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./_build/debug/breakhack<cr>
let g:syntastic_c_include_dirs = [ '_build', '/usr/include/SDL2' ]
packadd termdebug
let g:termdebug_wide = 1
let g:syntastic_c_include_dirs = [ '_build/debug', '/usr/include/SDL2', 'steamworks_c_wrapper/src', 'physfs-3.0/src', 'bh_random/src', 'checksum/src' ]
let g:syntastic_cpp_include_dirs = [ 'steamworks_c_wrapper/sdk/public/steam', 'bh_random/src' ]

View File

@ -5,10 +5,14 @@ SET(CMAKE_COLOR_MAKEFILE ON)
project(breakhack C)
set(breakhack_GAME_TITLE "BreakHack")
set(breakhack_MAJOR_VERSION 0)
set(breakhack_MINOR_VERSION 1)
set(breakhack_PATCH_VERSION 4)
set(breakhack_RELEASE_TYPE "(early access)")
set(breakhack_MAJOR_VERSION 4)
set(breakhack_MINOR_VERSION 0)
set(breakhack_PATCH_VERSION 3)
set(breakhack_RELEASE_TYPE "")
# Checksums
set(breakhack_STEAMAPI_DLL_CHECKSUM 0x18dba28)
set(breakhack_STEAMAPI_SO_CHECKSUM 0x1f5786b)
include(FindLua)
include(FindPhysFS)
@ -25,12 +29,37 @@ configure_file(
"${PROJECT_BINARY_DIR}/config.h"
)
macro(set_option option value)
set(${option} ${value} CACHE INTERNAL "" FORCE)
endmacro()
if (EXISTS "${PROJECT_SOURCE_DIR}/steamworks_c_wrapper/sdk")
MESSAGE ( STATUS "Steam SDK located, Steam build enabled")
set(STEAM 1)
else ()
MESSAGE ( STATUS "Steam SDK not found, Steam build disabled")
endif()
if (STEAM)
add_subdirectory(steamworks_c_wrapper)
endif()
add_subdirectory(bh_random)
add_subdirectory(checksum)
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
set(CLANG 1)
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set(GCC 1)
endif()
if ("${CMAKE_GENERATOR}" STREQUAL "Ninja")
set(NINJA 1)
endif()
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
set(OSX 1)
endif()
set (default_build_type "Release")
if (NOT CMAKE_BUILD_TYPE AND default_build_type)
message( STATUS "Setting default buildtype to '${default_build_type}' as none was specified")
@ -48,24 +77,26 @@ endif()
IF ( MSVC )
MESSAGE ( STATUS "Setting MSVC MT switches")
SET (
CMAKE_C_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} /MTd"
CACHE STRING "MSVC MT flags " FORCE
string (REPLACE
"/MDd"
"/MTd"
CMAKE_C_FLAGS_DEBUG
${CMAKE_C_FLAGS_DEBUG}
)
SET (
CMAKE_C_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} /MT"
CACHE STRING "MSVC MT flags " FORCE
string (REPLACE
"/MDd"
"/MTd"
CMAKE_C_FLAGS_RELEASE
${CMAKE_C_FLAGS_RELEASE}
)
ELSEIF ( WIN32 )
SET (
CMAKE_C_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -mconsole"
"${CMAKE_C_FLAGS_DEBUG} -mconsole"
)
SET (
CMAKE_C_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -mwindows"
"${CMAKE_C_FLAGS_RELEASE} -mwindows"
)
ENDIF ()
IF ( GCC OR CLANG )
@ -75,27 +106,40 @@ IF ( GCC OR CLANG )
)
ENDIF ( GCC OR CLANG )
if (NOT PHYSFS_FOUND OR WIN32)
set(PHYSFS_BUILD_STATIC TRUE)
set(PHYSFS_BUILD_SHARED FALSE)
set(PHYSFS_BUILD_TEST FALSE)
add_subdirectory(physfs-3.0.1)
if (STEAM)
include_directories(
physfs-3.0.1/src
)
else ()
include_directories(
${PHYSFS_INCLUDE_DIR}
)
${STEAMWORKS_INCLUDE_DIR}
steamworks_c_wrapper/src
)
endif ()
if (NOT LUA_FOUND OR STEAM)
add_subdirectory(lua-5.3.5)
include_directories(lua-5.3.5/src)
set(LUA_LIBRARIES lua)
set(LUA_INCLUDE_DIR lua-5.3.5/src)
endif ()
if (NOT PHYSFS_FOUND OR STEAM)
set_option(PHYSFS_BUILD_SHARED off)
set_option(PHYSFS_BUILD_TEST off)
add_subdirectory(physfs-3.0)
include_directories(physfs-3.0/src)
set(PHYSFS_LIBRARY physfs-static)
set(PHYSFS_INCLUDE_DIR physfs-3.0/src)
endif ()
include_directories(
${PROJECT_BINARY_DIR}
${LUA_INCLUDE_DIR}
${SDL2_INCLUDE_DIR}
${SDL2_IMAGE_INCLUDE_DIR}
${SDL2_TTF_INCLUDE_DIR}
${SDL2_MIXER_INCLUDE_DIR}
${PHYSFS_INCLUDE_DIR}
${LUA_INCLUDE_DIR}
sqlite3
bh_random/src
checksum/src
)
if (CMOCKA_FOUND)
@ -118,109 +162,154 @@ if (NOT MSVC)
endif (NOT MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
if (STEAM)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSTEAM_BUILD")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DSTEAM_BUILD")
set(STEAM_SOURCES
src/steam/steamworks_api_wrapper
)
else ()
set(STEAM_SOURCES "")
endif ()
if (MINGW)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DMINGW")
endif (MINGW)
if (NOT MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
else (NOT MSVC)
else ()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__=__FILE__")
endif (NOT MSVC)
endif ()
# PROGRAMS:
add_executable(breakhack
src/main
src/texture
src/screenresolution
src/sprite
src/util
src/player
src/map
src/map_lua
src/camera
src/timer
src/roommatrix
src/position
src/monster
src/stats
src/actiontext
src/random
src/linkedlist
src/hashtable
src/gui
src/item
src/item_builder
src/pointer
src/gui_button
src/particle_engine
src/menu
src/collisions
src/keyboard
src/mixer
src/io_util
src/physfsrwops
src/skillbar
src/texturecache
src/skill
src/projectile
src/vector2d
src/map_room_modifiers
src/sqlite3
src/db
src/settings
src/actiontextbuilder
src/main.c
src/texture.c
src/screenresolution.c
src/sprite.c
src/sprite_util.c
src/util.c
src/event.c
src/player.c
src/save.c
src/map.c
src/map_lua.c
src/camera.c
src/timer.c
src/roommatrix.c
src/position.c
src/monster.c
src/stats.c
src/actiontext.c
src/random.c
src/time.c
src/linkedlist.c
src/hashtable.c
src/gui.c
src/item.c
src/item_builder.c
src/pointer.c
src/gui_button.c
src/particle_engine.c
src/particle_emitter.c
src/menu.c
src/collisions.c
src/keyboard.c
src/input.c
src/mixer.c
src/io_util.c
src/physfsrwops.c
src/skillbar.c
src/texturecache.c
src/skill.c
src/projectile.c
src/vector2d.c
src/map_room_modifiers.c
sqlite3/sqlite3.c
src/db.c
src/settings.c
src/actiontextbuilder.c
src/animation.c
src/trap.c
src/artifact.c
src/screen.c
src/hiscore.c
src/object.c
src/gui_util.c
src/tooltip.c
src/gamecontroller.c
src/effect_util.c
${STEAM_SOURCES}
)
if (MSVC)
source_group("Header files" REGULAR_EXPRESSION ".*\\.h")
source_group("Source files" REGULAR_EXPRESSION ".*\\.c")
endif ()
# Sqlite has some warnings that I we don't need to see
set_source_files_properties(src/sqlite3.c COMPILE_FLAGS -w)
set_source_files_properties(sqlite3/sqlite3.c COMPILE_FLAGS -w)
target_link_libraries(breakhack
${CMAKE_DL_LIBS} # Sqlite needs DL libs
${LUA_LIBRARY}
${SDL2_LIBRARY}
${SDL2MAIN_LIBRARY}
${SDL2_IMAGE_LIBRARY}
${SDL2_TTF_LIBRARY}
${SDL2_MIXER_LIBRARY}
${LUA_LIBRARIES}
${PHYSFS_LIBRARY}
bh_random
checksum
)
if (NOT PHYSFS_FOUND)
if (STEAM)
target_link_libraries(breakhack
physfs-static
)
else ()
target_link_libraries(breakhack
${PHYSFS_LIBRARY}
steamworks_c_wrapper
)
endif ()
if (MSVC)
set_target_properties(breakhack PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
set_target_properties(breakhack PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE /NODEFAULTLIB:MSVCRTD")
set_target_properties(breakhack PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE")
set_target_properties(breakhack PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
set_target_properties(breakhack PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE")
set_target_properties(breakhack PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
set_target_properties(breakhack PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS /NODEFAULTLIB:MSVCRTD")
set_target_properties(breakhack PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
endif (MSVC)
# TESTS:
IF (CMOCKA_FOUND)
IF (CMOCKA_FOUND AND NOT OSX AND NOT CLANG)
find_package(Threads REQUIRED)
enable_testing()
add_executable(test_util test/test_util src/util)
target_link_libraries(test_util ${CMOCKA_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
add_executable(test_util test/test_util.c src/util.c)
target_link_libraries(test_util ${CMOCKA_LIBRARY})
add_test(test_util test_util)
add_executable(test_linkedlist test/test_linkedlist src/linkedlist src/util)
target_link_libraries(test_linkedlist ${CMOCKA_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
add_executable(test_linkedlist test/test_linkedlist.c src/linkedlist.c src/util.c)
target_link_libraries(test_linkedlist ${CMOCKA_LIBRARY})
add_test(test_linkedlist test_linkedlist)
add_executable(test_hashtable test/test_hashtable src/hashtable src/util)
target_link_libraries(test_hashtable ${CMOCKA_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
add_executable(test_hashtable test/test_hashtable.c src/hashtable.c src/util.c)
target_link_libraries(test_hashtable ${CMOCKA_LIBRARY})
add_test(test_hashtable test_hashtable)
ENDIF (CMOCKA_FOUND )
add_executable(test_input test/test_input.c src/input.c src/keyboard.c)
target_link_libraries(test_input
${CMOCKA_LIBRARY}
${SDL2_LIBRARY}
${SDL2MAIN_LIBRARY}
)
#set_target_properties(test_input PROPERTIES
#LINK_FLAGS "-Wl,--wrap,keyboard_direction_press -Wl,--wrap,keyboard_press")
add_test(test_input test_input)
ENDIF ()
# LINT:
if (CPPCHECK_FOUND)
add_custom_target(lint
COMMAND ${CPPCHECK_EXECUTABLE} --force --language=c --template=gcc --error-exitcode=1 --quiet --enable=warning,style,performance,portability,information,missingInclude --suppress=*:src/sqlite3.? -isrc/sqlite3.c src/
COMMAND ${CPPCHECK_EXECUTABLE} --force --language=c --template=gcc --error-exitcode=1 --quiet --suppress=missingInclude --enable=warning,style,performance,portability,information,missingInclude src/
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Run cppcheck"
)
@ -245,22 +334,22 @@ if (NOT DEBUG_BUILD)
"maproombuilder.lua"
"menumapgen.lua"
"monstergen.lua"
"trapgen.lua"
"chestgen.lua"
"layoutparser.lua"
"pitlayouts.dat"
"walllayouts.dat"
"shoplayouts.dat"
"lockedroomlayouts.dat"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data
)
if (WIN32)
add_definitions(-mwindows)
endif()
else()
if (WIN32)
add_definitions(-mconsole)
endif()
endif ()
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT "Release")
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ".")
if (WIN32)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
${CMAKE_SOURCE_DIR}/bin/libFLAC-8.dll
${CMAKE_SOURCE_DIR}/bin/libfreetype-6.dll
${CMAKE_SOURCE_DIR}/bin/libmodplug-1.dll
@ -275,6 +364,20 @@ if (WIN32)
${CMAKE_SOURCE_DIR}/bin/SDL2_ttf.dll
${CMAKE_SOURCE_DIR}/bin/zlib1.dll
)
if (STEAM)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
steamworks_c_wrapper/sdk/redistributable_bin/steam_api.dll
)
endif ()
else (WIN32)
if (STEAM)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
steamworks_c_wrapper/sdk/redistributable_bin/linux64/libsteam_api.so
build/linux/breakhack.run
)
endif ()
endif (WIN32)
include(InstallRequiredSystemLibraries)
@ -293,15 +396,23 @@ set(CPACK_PACKAGE_VENDOR "OliveShark")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}/package)
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "1")
set(CPACK_PACKAGE_VERSION_PATCH "1")
set(CPACK_PACKAGE_VERSION_MAJOR ${breakhack_MAJOR_VERSION})
set(CPACK_PACKAGE_VERSION_MINOR ${breakhack_MINOR_VERSION})
set(CPACK_PACKAGE_VERSION_PATCH ${breakhack_PATCH_VERSION})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "BreakHack")
set(CPACK_PACKAGE_FILE_NAME "breakhack-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_CHECKSUM "MD5")
if (WIN32)
set(CPACK_PACKAGE_FILE_NAME "breakhack-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-win32")
else ()
set(CPACK_PACKAGE_FILE_NAME "breakhack-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
endif ()
if (STEAM)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-steambuild")
endif ()
if(UNIX)
set(CPACK_GENERATOR STGZ TGZ TZ)
set(CPACK_GENERATOR TGZ ZIP)
set(CPACK_STRIP_FILES breakhack)
set(CPACK_SOURCE_STRIP_FILES "")
elseif(WIN32)

46
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@oliveshark.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

20
CREDITS.md Normal file
View File

@ -0,0 +1,20 @@
- Game -
--------
Code: Linus Probert
liquidityc.github.io
@LiquidityC
- Graphics -
------------
Palette: DawnBringer
- Music and Sound -
-------------------
Music: Eric Matyas
www.soundimage.org
Sound: Eric Matyas
www.soundimage.org
ArtisticDuded
opengameart.org/users/artisticdude

View File

@ -0,0 +1,10 @@
Apart from basic compile tools (*GCC/Clang, Make*) you'll also need to install **sdl2, sdl2-image, sdl2-ttf, sdl2-mixer** (If on a debian based dist you need to install the *dev* packages).
Optionally you can also install **cppcheck** and **physfs**
Once that is done run the following:
```bash
mkdir _build
cd _build
cmake -DCMAKE_BUILD_TYPE=Debug .. # Build type flag is optional
make
```

View File

@ -0,0 +1,16 @@
Compile on Windows with Visual Studio
-------------------------------------
1. Install [Visual Studio Community 2019](https://visualstudio.microsoft.com/vs/community/) with the "Desktop development with C++" workload
2. Install [CMake](https://cmake.org/download/)
3. Install [NSIS](https://nsis.sourceforge.io/Download)
4. Download and unzip [SDL2-devel-2.x.x-VC.zip](https://www.libsdl.org/download-2.0.php), [SDL2_image-devel-2.x.x-VC.zip](https://www.libsdl.org/projects/SDL_image/), [SDL2_mixer-devel-2.x.x-VC.zip](https://www.libsdl.org/projects/SDL_mixer/), [SDL2_ttf-devel-2.x.x-VC.zip](https://www.libsdl.org/projects/SDL_ttf/)
5. Open Developer Command Prompt for VS 2019 and run the following, substituting paths as appropriate:
```batch
SET SDL2DIR=C:\repos\breakhackBuild\SDL2-2.0.9
SET SDL2MIXERDIR=C:\repos\breakhackBuild\SDL2_mixer-2.0.4
SET SDL2_IMAGE=C:\repos\breakhackBuild\SDL2_image-2.0.4
SET SDLTTFDIR=C:\repos\breakhackBuild\SDL2_ttf-2.0.15
cmake -S C:\repos\breakhack -B C:\repos\breakhackBuild
cmake --build C:\repos\breakhackBuild --target package --config Release
```

View File

@ -1,19 +1,50 @@
all:
@make -sC _build
@make -sC _build/debug
.PHONY: all
release:
@make -sC _build/release
.PHONY: release
clean:
@make clean -sC _build
@make -sC _build/debug clean
@make -sC _build/release clean
.PHONY: clean
test:
@make test -sC _build
@make -sC _build/debug test
.PHONY: test
run: $(all)
@./_build/breakhack
@LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./_build/debug/breakhack
.PHONY: run
playtest: $(all)
@LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./_build/release/breakhack
.PHONY: playtest
lint:
@make lint -sC _build
@make -sC _build/debug lint
.PHONY: lint
package:
@make -sC _build/release package
.PHONY: package
setup:
@mkdir -p _build/release
@mkdir -p _build/debug
@cd _build/debug/ && \
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=YES ../.. && \
cd -
@cd _build/debug/ && \
cmake -DCMAKE_BUILD_TYPE=Release ../.. && \
cd -
@ln -s _build/debug/compile_commands.json
@echo "Setup complete"
.PHONY: setup
teardown:
@rm -rf _build
@rm compile_commands.json
.PHONY: teardown

503
Makefile.os4 Normal file
View File

@ -0,0 +1,503 @@
#
# Project: breakhack
#
# Created on: 29-08-2022 21:00:37
# by George Sokianos
#
###################################################################
##
##//// Objects
##
###################################################################
breakhack_OBJ := \
src/actiontext.o src/actiontextbuilder.o src/animation.o \
src/artifact.o src/camera.o src/collisions.o \
src/db.o src/effect_util.o src/event.o \
src/gamecontroller.o src/gui_button.o src/gui.o \
src/gui_util.o src/hashtable.o src/hiscore.o \
src/input.o src/io_util.o src/item_builder.o \
src/item.o src/keyboard.o src/linkedlist.o \
src/main.o src/map.o src/map_lua.o \
src/map_room_modifiers.o src/menu.o src/mixer.o \
src/monster.o src/object.o src/particle_emitter.o \
src/particle_engine.o src/physfsrwops.o src/player.o \
src/pointer.o src/position.o src/projectile.o \
src/random.o src/roommatrix.o src/save.o \
src/screen.o src/screenresolution.o src/settings.o \
src/skill.o src/skillbar.o src/sprite.o \
src/sprite_util.o src/stats.o src/texture.o \
src/texturecache.o src/time.o src/timer.o \
src/tooltip.o src/trap.o src/util.o \
src/vector2d.o bh_random/src/bh_random.o
###################################################################
##
##//// Variables and Environment
##
###################################################################
CC := gcc:bin/gcc
INCPATH := -I. -I/sdk/local/newlib/include/SDL2 -Ibh_random/src \
-I/sdk/local/common/include/lua53
# -DDEBUG
CFLAGS := $(INCPATH) -Wall -Wwrite-strings -Wno-discarded-qualifiers
# \
# -g -gstabs
# -ggdb -gdwarf-2
LFLAGS := -lauto -lSDL2_image -lSDL2_ttf -lfreetype -ltiff -lwebp -lpng -ljpeg \
-llua53 -lsqlite3 -lz \
-lSDL2_mixer -lmikmod -lmodplug -lFLAC -logg \
-lSDL2 -lphysfs -lpthread -athread=native -lstdc++
# \
# -g -gstabs
# -ggdb -gdwarf-2
# -lunix
# -lenet -lcrypto -lSDL2_gl4es -lglu_gl4es -lgl4es -lopenal \
###################################################################
##
##//// General rules
##
###################################################################
.PHONY: all all-before all-after clean clean-custom realclean
all: all-before breakhack all-after
all-before:
# You can add rules here to execute before the project is built
all-after:
# You can add rules here to execute after the project is built
clean: clean-custom
@echo "Cleaning compiler objects..."
@rm -f $(breakhack_OBJ)
realclean:
@echo "Cleaning compiler objects and targets..."
@rm -f $(breakhack_OBJ) breakhack
###################################################################
##
##//// Targets
##
###################################################################
breakhack: $(breakhack_OBJ)
@echo "Linking breakhack"
@gcc:bin/gcc -o breakhack $(breakhack_OBJ) $(LFLAGS)
@echo "Removing stale debug target: breakhack"
@rm -f breakhack.debug
###################################################################
##
##//// Standard rules
##
###################################################################
# A default rule to make all the objects listed below
# because we are hiding compiler commands from the output
.c.o:
@echo "Compiling $<"
@$(CC) -c $< -o $*.o $(CFLAGS)
src/actiontext.o: src/actiontext.c src/actiontext.h \
src/position.h src/sprite.h src/texture.h \
src/camera.h src/roommatrix.h src/timer.h \
src/vector2d.h src/util.h src/update_data.h \
src/player.h src/stats.h src/skill.h \
src/linkedlist.h src/input.h src/artifact.h \
src/map.h src/defines.h src/monster.h \
src/map_room_modifiers.h src/object.h src/doorlocktype.h
src/actiontextbuilder.o: src/actiontextbuilder.c src/actiontextbuilder.h src/actiontext.h \
src/position.h src/sprite.h src/timer.h \
src/vector2d.h src/camera.h src/update_data.h \
src/player.h src/map.h src/roommatrix.h \
src/gui.h src/util.h
src/animation.o: src/animation.c src/animation.h src/timer.h \
src/camera.h src/position.h src/vector2d.h \
src/sprite.h src/texture.h \
src/dimension.h src/roommatrix.h src/defines.h \
src/map_room_modifiers.h src/input.h
src/artifact.o: src/artifact.c src/artifact.h src/sprite.h \
src/texture.h src/position.h src/camera.h \
src/roommatrix.h src/timer.h \
src/vector2d.h src/util.h src/texturecache.h \
src/dimension.h src/particle_engine.h src/player.h \
src/stats.h src/actiontext.h src/skill.h \
src/linkedlist.h src/input.h src/random.h \
src/camera.o: src/camera.c src/camera.h src/position.h \
src/timer.h src/vector2d.h src/map.h \
src/linkedlist.h src/sprite.h src/texture.h \
src/roommatrix.h src/defines.h src/config.h \
src/monster.h src/stats.h src/actiontext.h \
src/player.h src/doorlocktype.h src/particle_emitter.h \
src/skill.h src/input.h src/artifact.h \
src/map_room_modifiers.h src/object.h src/util.h
src/collisions.o: src/collisions.c src/collisions.h
src/db.o: src/db.c src/db.h
src/effect_util.o: src/effect_util.c src/gui.h src/linkedlist.h \
src/sprite.h src/texture.h src/position.h \
src/camera.h src/roommatrix.h src/timer.h \
src/vector2d.h src/player.h \
src/stats.h src/actiontext.h src/skill.h \
src/input.h src/artifact.h src/monster.h src/doorlocktype.h \
src/particle_emitter.h src/dimension.h src/defines.h \
src/config.h src/map_room_modifiers.h
src/event.o: src/event.c src/event.h src/player.h \
src/sprite.h src/stats.h \
src/actiontext.h src/camera.h src/skill.h \
src/linkedlist.h src/input.h src/artifact.h
src/gamecontroller.o: src/gamecontroller.c src/gamecontroller.h
src/gui_button.o: src/gui_button.c src/util.h src/gui_button.h \
src/pointer.h src/sprite.h src/camera.h \
src/input.h src/texture.h src/position.h \
src/roommatrix.h src/timer.h src/linkedlist.h \
src/vector2d.h
src/gui.o: src/gui.c src/gui.h src/linkedlist.h \
src/sprite.h src/texture.h src/position.h \
src/camera.h src/roommatrix.h src/timer.h \
src/vector2d.h src/player.h \
src/stats.h src/actiontext.h src/skill.h \
src/input.h src/artifact.h src/util.h \
src/map.h \
src/defines.h src/config.h src/monster.h \
src/doorlocktype.h src/particle_emitter.h src/map_room_modifiers.h \
src/object.h src/texturecache.h \
src/dimension.h src/gui_util.h
src/gui_util.o: src/gui_util.c src/texturecache.h src/texture.h \
src/dimension.h src/position.h \
src/camera.h src/gui_util.h src/sprite.h \
src/roommatrix.h src/timer.h
src/hashtable.o: src/hashtable.c src/hashtable.h src/defines.h \
src/config.h
src/hiscore.o: src/hiscore.c src/hiscore.h src/linkedlist.h \
src/player.h src/sprite.h \
src/stats.h src/actiontext.h src/camera.h \
src/skill.h src/input.h src/artifact.h \
src/db.h
src/input.o: src/input.c src/input.h
src/io_util.o: src/io_util.c src/physfsrwops.h src/io_util.h
src/item_builder.o: src/item_builder.c src/item_builder.h \
src/item.h src/sprite.h src/position.h \
src/player.h src/camera.h src/linkedlist.h \
src/texture.h src/dimension.h \
src/timer.h src/vector2d.h src/util.h \
src/gui.h src/roommatrix.h src/stats.h \
src/actiontext.h src/skill.h src/input.h \
src/artifact.h src/mixer.h src/gamestate.h \
src/random.h src/texturecache.h src/defines.h \
src/map_room_modifiers.h src/sprite_util.h src/map.h \
src/config.h src/monster.h src/doorlocktype.h \
src/particle_emitter.h
src/item.o: src/item.c src/item.h src/sprite.h \
src/texture.h src/position.h src/camera.h \
src/roommatrix.h src/timer.h src/player.h \
src/stats.h src/actiontext.h \
src/skill.h src/linkedlist.h src/input.h \
src/artifact.h src/vector2d.h src/util.h \
src/mixer.h src/gamestate.h src/gui.h \
src/actiontextbuilder.h src/update_data.h
src/keyboard.o: src/keyboard.c src/keyboard.h src/defines.h \
src/config.h
src/linkedlist.o: src/linkedlist.c src/linkedlist.h
src/main.o: src/main.c /sdk/local/newlib/include/SDL2/SDL_main.h \
src/linkedlist.h src/player.h src/sprite.h \
src/texture.h src/position.h src/camera.h \
src/roommatrix.h src/timer.h src/stats.h \
src/actiontext.h src/vector2d.h src/skill.h \
src/input.h src/artifact.h src/screenresolution.h \
src/dimension.h src/map.h src/defines.h \
src/config.h src/monster.h src/doorlocktype.h \
src/particle_emitter.h src/map_room_modifiers.h src/object.h \
src/map_lua.h src/gamestate.h src/gui.h \
src/util.h src/item_builder.h src/item.h \
src/pointer.h src/gui_button.h src/particle_engine.h \
src/menu.h src/keyboard.h \
src/mixer.h src/random.h src/skillbar.h \
src/texturecache.h src/update_data.h src/settings.h \
src/actiontextbuilder.h src/screen.h src/hiscore.h \
src/io_util.h src/tooltip.h src/gamecontroller.h \
src/time.h src/sprite_util.h src/event.h \
src/save.h src/steam/steamworks_api_wrapper.h src/defines.h
src/map.o: src/map.c src/map.h src/linkedlist.h \
src/sprite.h src/texture.h src/position.h \
src/camera.h src/roommatrix.h src/timer.h \
src/vector2d.h src/defines.h src/config.h \
src/monster.h src/stats.h src/actiontext.h \
src/player.h src/doorlocktype.h src/particle_emitter.h \
src/skill.h src/input.h src/artifact.h \
src/map_room_modifiers.h src/object.h src/map_lua.h \
src/util.h src/item.h src/item_builder.h \
src/gui.h src/particle_engine.h src/dimension.h \
src/update_data.h src/trap.h src/mixer.h
src/map_lua.o: src/map_lua.c src/map_lua.h src/map.h \
src/linkedlist.h src/sprite.h \
src/camera.h src/position.h src/timer.h \
src/defines.h src/monster.h src/player.h \
src/map_room_modifiers.h src/object.h src/doorlocktype.h \
src/config.h src/util.h src/stats.h \
src/io_util.h src/texturecache.h src/texture.h \
src/dimension.h src/trap.h src/roommatrix.h \
src/actiontext.h src/skill.h src/input.h \
src/artifact.h src/update_data.h src/gui.h \
src/vector2d.h src/item.h src/item_builder.h
src/map_room_modifiers.o: src/map_room_modifiers.c src/map_room_modifiers.h src/vector2d.h \
src/player.h src/sprite.h src/texture.h \
src/position.h src/camera.h src/roommatrix.h \
src/timer.h src/stats.h src/actiontext.h \
src/skill.h src/linkedlist.h src/input.h \
src/artifact.h src/defines.h
src/menu.o: src/menu.c src/menu.h src/camera.h \
src/position.h src/timer.h src/vector2d.h \
src/linkedlist.h src/texture.h \
src/dimension.h src/sprite.h src/roommatrix.h \
src/util.h src/defines.h src/map_room_modifiers.h \
src/input.h src/config.h src/gui_button.h \
src/pointer.h src/keyboard.h src/mixer.h \
src/gamestate.h src/collisions.h
src/mixer.o: src/mixer.c src/mixer.h src/gamestate.h \
src/util.h src/io_util.h src/settings.h
src/monster.o: src/monster.c src/monster.h src/sprite.h \
src/texture.h src/position.h src/camera.h \
src/roommatrix.h src/timer.h src/stats.h \
src/actiontext.h src/vector2d.h src/player.h \
src/skill.h src/linkedlist.h src/input.h \
src/artifact.h src/doorlocktype.h src/particle_emitter.h \
src/dimension.h src/util.h src/random.h \
src/gui.h src/item.h src/item_builder.h \
src/map.h src/defines.h src/config.h \
src/map_room_modifiers.h src/object.h src/particle_engine.h \
src/update_data.h src/actiontextbuilder.h src/texturecache.h \
src/trap.h src/mixer.h
src/object.o: src/object.c src/object.h src/camera.h \
src/position.h src/timer.h src/vector2d.h \
src/player.h src/sprite.h src/stats.h \
src/actiontext.h src/skill.h src/linkedlist.h \
src/input.h src/artifact.h src/texture.h \
src/roommatrix.h src/util.h src/mixer.h \
src/gamestate.h src/random.h src/texturecache.h
src/particle_emitter.o: src/particle_emitter.c src/particle_emitter.h src/timer.h \
src/position.h src/dimension.h
src/particle_engine.o: src/particle_engine.c src/particle_engine.h src/position.h \
src/dimension.h src/camera.h src/timer.h \
src/vector2d.h src/linkedlist.h src/util.h \
src/defines.h src/config.h
src/physfsrwops.o: src/physfsrwops.c src/physfsrwops.h
src/player.o: src/player.c src/player.h src/sprite.h \
src/texture.h src/position.h src/camera.h \
src/roommatrix.h src/timer.h src/stats.h \
src/actiontext.h src/vector2d.h src/skill.h \
src/linkedlist.h src/input.h src/artifact.h \
src/monster.h src/doorlocktype.h src/particle_emitter.h \
src/dimension.h src/util.h src/gui.h \
src/item.h src/particle_engine.h src/keyboard.h \
src/defines.h src/config.h src/mixer.h \
src/gamestate.h src/random.h src/projectile.h \
src/map_room_modifiers.h src/update_data.h src/map.h \
src/texturecache.h src/actiontextbuilder.h \
src/animation.h src/trap.h src/gamecontroller.h \
src/event.h src/effect_util.h src/steam/steamworks_api_wrapper.h \
src/defines.h
src/pointer.o: src/pointer.c src/pointer.h src/sprite.h \
src/texture.h src/position.h src/camera.h \
src/roommatrix.h src/timer.h src/vector2d.h \
src/input.h src/util.h src/particle_engine.h
src/position.o: src/position.c src/position.h src/defines.h
src/projectile.o: src/projectile.c src/projectile.h src/sprite.h \
src/texture.h src/position.h src/camera.h \
src/roommatrix.h src/timer.h \
src/vector2d.h src/defines.h src/map_room_modifiers.h \
src/input.h src/update_data.h src/player.h \
src/map.h src/gui.h src/config.h \
src/util.h src/texturecache.h src/dimension.h \
src/stats.h src/actiontext.h src/skill.h \
src/linkedlist.h src/artifact.h src/monster.h \
src/doorlocktype.h src/particle_emitter.h src/mixer.h \
src/gamestate.h src/item_builder.h src/item.h \
src/random.h src/object.h src/effect_util.h
src/random.o: src/random.c src/time.h src/random.h
src/roommatrix.o: src/roommatrix.c src/defines.h src/config.h \
src/roommatrix.h src/position.h src/camera.h \
src/timer.h src/vector2d.h \
src/map_room_modifiers.h src/input.h src/util.h \
src/map.h src/linkedlist.h src/sprite.h src/texture.h \
src/monster.h src/stats.h src/actiontext.h \
src/player.h src/doorlocktype.h src/particle_emitter.h \
src/skill.h src/artifact.h src/object.h \
src/item.h src/update_data.h src/gui.h
src/save.o: src/save.c src/save.h src/player.h \
src/sprite.h src/stats.h \
src/actiontext.h src/camera.h src/skill.h \
src/linkedlist.h src/input.h src/artifact.h \
src/db.h src/defines.h src/config.h
src/screen.o: src/screen.c src/screen.h src/texture.h \
src/dimension.h \
src/position.h src/camera.h src/linkedlist.h \
src/sprite.h src/roommatrix.h src/timer.h \
src/vector2d.h src/util.h src/hiscore.h \
src/player.h src/stats.h src/actiontext.h \
src/skill.h src/input.h
src/screenresolution.o: src/screenresolution.c src/defines.h src/config.h \
src/util.h src/screenresolution.h
src/settings.o: src/settings.c src/settings.h src/util.h \
src/defines.h src/config.h
src/skill.o: src/skill.c src/texturecache.h src/texture.h \
src/dimension.h src/position.h \
src/camera.h src/skill.h src/roommatrix.h \
src/defines.h src/map_room_modifiers.h src/input.h \
src/sprite.h src/timer.h src/vector2d.h \
src/util.h src/player.h src/stats.h \
src/actiontext.h src/linkedlist.h src/artifact.h \
src/config.h src/monster.h src/doorlocktype.h \
src/particle_emitter.h src/mixer.h src/gamestate.h \
src/gui.h src/random.h src/particle_engine.h \
src/projectile.h src/update_data.h src/map.h \
src/item.h src/animation.h src/trap.h \
src/tooltip.h src/actiontextbuilder.h
src/skillbar.o: src/skillbar.c src/defines.h src/config.h \
src/skillbar.h src/linkedlist.h src/camera.h \
src/position.h src/timer.h src/vector2d.h \
src/player.h src/sprite.h src/stats.h \
src/actiontext.h src/skill.h src/input.h \
src/artifact.h src/texture.h \
src/dimension.h src/util.h src/roommatrix.h \
src/map_room_modifiers.h src/keyboard.h src/texturecache.h \
src/particle_engine.h src/update_data.h src/map.h \
src/monster.h src/object.h src/doorlocktype.h
src/sprite.o: src/sprite.c src/sprite.h src/texture.h \
src/dimension.h \
src/position.h src/camera.h src/timer.h \
src/vector2d.h src/roommatrix.h src/defines.h \
src/map_room_modifiers.h src/input.h src/util.h \
src/update_data.h src/player.h src/stats.h \
src/actiontext.h src/skill.h src/linkedlist.h \
src/artifact.h src/map.h src/monster.h \
src/object.h src/doorlocktype.h
src/sprite_util.o: src/sprite_util.c src/sprite_util.h src/sprite.h \
src/texture.h src/position.h src/camera.h \
src/roommatrix.h src/timer.h
src/stats.o: src/stats.c src/gui.h \
src/linkedlist.h src/sprite.h src/texture.h \
src/position.h src/camera.h src/roommatrix.h \
src/timer.h src/vector2d.h src/player.h \
src/stats.h src/actiontext.h src/skill.h \
src/input.h src/artifact.h src/random.h \
src/util.h src/defines.h
src/texture.o: src/texture.c src/texture.h \
src/dimension.h src/position.h \
src/camera.h src/timer.h src/vector2d.h \
src/util.h
src/texturecache.o: src/texturecache.c src/texturecache.h \
src/texture.h src/dimension.h \
src/position.h src/camera.h src/hashtable.h \
src/defines.h src/config.h src/util.h
src/time.o: src/time.c src/time.h
src/timer.o: src/timer.c src/util.h
src/tooltip.o: src/tooltip.c src/tooltip.h src/camera.h \
src/position.h src/timer.h \
src/vector2d.h src/sprite.h src/texture.h \
src/roommatrix.h src/gui_util.h src/defines.h \
src/config.h src/gui.h src/linkedlist.h \
src/player.h src/stats.h src/actiontext.h \
src/skill.h src/input.h src/artifact.h \
src/texturecache.h
src/trap.o: src/trap.c src/trap.h \
src/sprite.h src/texture.h src/position.h \
src/camera.h src/roommatrix.h src/timer.h \
src/player.h src/stats.h src/actiontext.h \
src/skill.h src/linkedlist.h src/input.h \
src/artifact.h src/update_data.h src/map.h \
src/gui.h src/vector2d.h src/util.h \
src/random.h
src/util.o: src/util.c src/time.h src/defines.h \
src/config.h
src/vector2d.o: src/vector2d.c
bh_random/src/bh_random.o:
@g++ -c bh_random/src/bh_random.cpp -o bh_random/src/bh_random.o $(CFLAGS)
# prepare an archive for the program
release:
@echo "Creating release files..."
@mkdir -p release/breakhack
@cp -r release_files/* release/breakhack/
@cp -r data release/breakhack/
@cp -r assets release/breakhack/
@cp breakhack release/breakhack/
@strip release/breakhack/breakhack
@cp README.md release/breakhack/
@cp README_Amiga.md release/breakhack/
@cp LICENSE.txt release/breakhack/
@cp CREDITS.md release/breakhack/
@echo "Creating release archive..."
@lha -aeqr3 a breakhack-OS4.lha release/
@echo "Clean release files..."
@delete release ALL QUIET FORCE

View File

@ -1,12 +1,19 @@
[![Build Status](https://travis-ci.org/LiquidityC/breakhack.svg?branch=master)](https://travis-ci.org/LiquidityC/breakhack)
[![Build Status](https://ci.appveyor.com/api/projects/status/2nvna97cmm4cf535?svg=true)](https://ci.appveyor.com/project/LiquidityC/breakhack)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fc02d56fa7194e61b2c7d260fd2e4186)](https://www.codacy.com/app/LiquidityC/breakhack?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=LiquidityC/breakhack&amp;utm_campaign=Badge_Grade)
<!--[![Coverity Scan](https://scan.coverity.com/projects/15218/badge.svg)](https://scan.coverity.com/projects/liquidityc-breakhack)-->
[![maintenance](https://img.shields.io/badge/maintenance-passively--maintained-orange)](https://img.shields.io/badge/maintenance-passively--maintained-orange)
[![Build Status](https://travis-ci.org/Oliveshark/breakhack.svg?branch=master)](https://travis-ci.org/Oliveshark/breakhack)
[![Build status](https://ci.appveyor.com/api/projects/status/2a18npdntkmlx3dc?svg=true)](https://ci.appveyor.com/project/LiquidityC/breakhack)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fc02d56fa7194e61b2c7d260fd2e4186)](https://www.codacy.com/app/LiquidityC/breakhack?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Oliveshark/breakhack&amp;utm_campaign=Badge_Grade)
[![CodeFactor](https://www.codefactor.io/repository/github/oliveshark/breakhack/badge/dev)](https://www.codefactor.io/repository/github/oliveshark/breakhack/overview/master)
<!--[![Coverity Scan](https://scan.coverity.com/projects/15218/badge.svg)](https://scan.coverity.com/projects/oliveshark-breakhack)-->
[![GitHub issues](https://img.shields.io/github/issues/oliveshark/breakhack.svg)](https://github.com/oliveshark/breakhack/issues)
[![GitHub closed issues](https://img.shields.io/github/issues-closed/oliveshark/breakhack.svg)](https://github.com/oliveshark/breakhack/issues)
![GitHub (pre-)release](https://img.shields.io/github/release/oliveshark/breakhack/all.svg)
[![Github All Releases](https://img.shields.io/github/downloads/oliveshark/breakhack/total.svg)](https://github.com/oliveshark/breakhack/releases)
[![HitCount](http://hits.dwyl.io/oliveshark/breakhack.svg)](http://hits.dwyl.io/oliveshark/breakhack)
Something in the ways of NETHACK
Something in the ways of a roguelike
================================
A simple nethack similar game written in C using SDL2.
A simple roguelike written in C using SDL2.
Idea
----
@ -18,26 +25,30 @@ I wanted to practice C and I'm comfortable using SDL2. The assets
are graciously taken from the web. More info in the README in the
assets folder.
Future
Download
--------
This game is available in the [steam store](https://store.steampowered.com/app/931040/BreakHack/) (release Okt 2018).
If you enjoy the game and want a properly installed, signed copy of the game with achievements and
global highscores you are most welcome to purchase it there.
If you feel like getting a free copy you can download and compile from here.
Issues
------
I'm planning on releaseing this game on Steam once I'm happy with it.
Not to get rich, mostly because I think it will look nice on my resumé.
the code will remain open source under GPLv3 even after a possible Steam
release. So you'll still be able to download and compile it yourself if you
can and want to.
I'd prefer if issues could be handled here on github. Either check the list if your particular problem is reported
otherwise create a new issue. Support questions can be submitted as issues as well, I haven't figured out how I want to
work with support yet since I haven't received any questions.
License
-------
BreakHack is released under two different licenses.
- The source code is released under [GPLv3](https://github.com/oliveshark/breakhack/blob/master/LICENSE.txt)
- The Steam release is released under the [Steam subscriber agreement](https://store.steampowered.com/subscriber_agreement/)
Compile
-------
Apart from basic compile tools (*GCC/Clang, Make*) you'll also need to install **lua, sdl2, sdl2-image, sdl2-ttf, sdl2-mixer** (If on a debian based dist you need to install the *dev* packages).
Optionally you can also install **cppcheck** and **physfs**
Once that is done run the following:
```bash
mkdir _build
cd _build
cmake -DCMAKE_BUILD_TYPE=Debug .. # Build type flag is optional
make
```
* [Linux](LINUX_BUILD_INSTRUCTIONS.md)
* [Windows (Visual Studio)](MSVC_BUILD_INSTRUCTIONS.md)
Contribute
----------
@ -45,7 +56,14 @@ Have an idea and able to implement it? Fork and send me a pull request and
I'll check it out. If I like it I will add it. If it's a big thing I'll add
your name to the credits list (once I add it in game).
If you do contribute something you should be aware that if your PR is merged
into the master code-base your code will eventually make it out with the Steam version
of the game. I don't make any revenue from those sales so don't expect any other compensation
than a "I have code on Steam" feeling. Which is quite nice and also why I decided to release
on Steam.
Links
-----
- [https://liquidityc.itch.io/breakhack](https://liquidityc.itch.io/breakhack)
- [Itch.io](https://store.steampowered.com/app/931040/BreakHack/)
- [Steam](https://liquidityc.itch.io/breakhack)

48
README_Amiga.md Normal file
View File

@ -0,0 +1,48 @@
# breakhack for AmigaOS 4.1 FE
breakhack is a small roguelike game for having some good time, while
you wait for your amiga to compile or render a screen. It is developed
by Linus Probert and you can find it for various platforms on Steam.
## Installation
Extract the archive wherever you want and run the *breakhack* binary.
## I would like to thank
- Linus Probert for creating this awesome game and open sourcing it
- Capehill for his tireless work on SDL port for AmigaOS 4.1 FE
- Roman "kas1e" Kargin and Nouvel "HunoPPC" Hugues for their help
with libphysfs
## Known issues
There are some issues with the Fullscreen graphics, depending which
Renderer driver is used. I might fix them in the future.
## Support
If you enjoy what I am doing and would like to keep me up during the night,
please consider to buy me a coffee at:
https://ko-fi.com/walkero
## Known issues
You can find the known issues at
https://git.walkero.gr/walkero/breakhack/issues
# Changelog
## [4.0.3r2] - 2023-07-04
### Changed
- Compiled with latest SDL 2.0.28 that has a better support for 16bit
screens. Now it works under Qemu. Tested with Software rendering
### Fixed
- Fixed the hiscore date. Now it is saved on UTC +8 years which is
the Amiga epoch diff against the unix one. This doesn affect the
old hi-scores though
## [4.0.3r1] - 2022-12-21
### Added
- First release for AmigaOS 4

BIN
README_Amiga.md.info Normal file

Binary file not shown.

View File

@ -1,20 +0,0 @@
o Make things less difficult and more interesting
o Interesting items
x Daggers
- Bombs?
- Magical permanent items would be nice
- Piercing daggers
- Charge passthrough
- +1 atk / +1 def items
o Creat some nice room modifiers
x Windy room
x Liquid in rooms
- Falling floor tiles
- Credit screen showing music and graphics guys:
- Music: http://soundimage.org/ (Eric Matyas)
- SFX (Eric Matyas & https://opengameart.org/users/artisticdude & ZapSplat.com)
- Graphics: (see README)
Legend: ( '-' = future) ( 'x' = completed ) ( 'o' = begun )

View File

@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="20" height="15" tilewidth="16" tileheight="16">
<tileset firstgid="1" name="Wall" tilewidth="16" tileheight="16">
<image source="../Objects/Wall.png" width="320" height="432"/>
</tileset>
<tileset firstgid="541" name="Floor" tilewidth="16" tileheight="16">
<image source="../Objects/Floor.png" width="336" height="432"/>
</tileset>
<tileset firstgid="1108" name="Pit0" tilewidth="16" tileheight="16">
<image source="../Objects/Pit0.png" width="128" height="352"/>
</tileset>
<tileset firstgid="1284" name="Door0" tilewidth="16" tileheight="16">
<image source="../Objects/Door0.png" width="128" height="80"/>
</tileset>
<tileset firstgid="1324" name="Decor0" tilewidth="16" tileheight="16">
<image source="../Objects/Decor0.png" width="128" height="288"/>
</tileset>
<tileset firstgid="1468" name="Ground0" tilewidth="16" tileheight="16">
<image source="../Objects/Ground0.png" width="128" height="48"/>
</tileset>
<layer name="Tiles" width="20" height="15">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer name="Sprites" width="20" height="15">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

View File

@ -1,77 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="20" height="15" tilewidth="16" tileheight="16">
<tileset firstgid="1" name="Wall" tilewidth="16" tileheight="16">
<image source="../Objects/Wall.png" width="320" height="816"/>
</tileset>
<tileset firstgid="1021" name="Floor" tilewidth="16" tileheight="16">
<image source="../Objects/Floor.png" width="336" height="624"/>
</tileset>
<tileset firstgid="1840" name="Pit0" tilewidth="16" tileheight="16">
<image source="../Objects/Pit0.png" width="128" height="512"/>
</tileset>
<tileset firstgid="2096" name="Door0" tilewidth="16" tileheight="16">
<image source="../Objects/Door0.png" width="128" height="80"/>
</tileset>
<tileset firstgid="2136" name="Decor0" tilewidth="16" tileheight="16">
<image source="../Objects/Decor0.png" width="128" height="352"/>
</tileset>
<tileset firstgid="2312" name="Ground0" tilewidth="16" tileheight="16">
<image source="../Objects/Ground0.png" width="128" height="112"/>
</tileset>
<tileset firstgid="2368" name="Player0" tilewidth="16" tileheight="16">
<image source="../Characters/Player0.png" width="128" height="240"/>
</tileset>
<tileset firstgid="2488" name="Pest0" tilewidth="16" tileheight="16">
<image source="../Characters/Pest0.png" width="128" height="176"/>
</tileset>
<tileset firstgid="2576" name="Rodent0" tilewidth="16" tileheight="16">
<image source="../Characters/Rodent0.png" width="128" height="64"/>
</tileset>
<tileset firstgid="2608" name="Undead0" tilewidth="16" tileheight="16">
<image source="../Characters/Undead0.png" width="128" height="160"/>
</tileset>
<tileset firstgid="2688" name="Money" tilewidth="16" tileheight="16">
<image source="../Items/Money.png" width="128" height="128"/>
</tileset>
<tileset firstgid="2752" name="Chest0" tilewidth="16" tileheight="16">
<image source="../Items/Chest0.png" width="128" height="48"/>
</tileset>
<layer name="Tiles" width="20" height="15">
<data encoding="csv">
1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,1031,
1031,181,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,183,1031,1031,
1031,201,1210,1211,1211,1211,1212,1232,1235,1236,1236,1236,1236,1236,1236,1236,1212,201,1031,1031,
1031,201,1231,1232,1232,1232,1233,181,182,182,182,182,182,182,182,183,1234,201,1031,1031,
1031,201,1231,1232,1232,1232,1233,223,1031,1031,1031,1031,1031,1031,1031,201,1234,201,1031,1031,
1031,201,1231,1232,1462,1463,1464,381,1031,181,182,182,182,182,182,182,1255,182,183,1031,
1031,201,1252,1253,1483,1484,1506,381,1031,201,1856,1857,1857,1857,1857,1857,1556,1858,201,1031,
1031,221,182,182,363,1506,361,403,1031,201,1864,1865,1865,1865,1865,1865,1556,1866,201,1031,
1031,1031,1031,1031,401,362,403,1031,1031,201,1864,1532,1558,1558,1558,1558,1576,1866,201,1031,
181,182,182,182,182,182,182,183,1031,201,1864,1556,1865,1865,1865,1865,1865,1866,201,1031,
201,1210,1211,1211,1211,1212,1535,201,1031,201,1864,1556,1865,1865,1865,1865,1865,1866,201,1031,
201,1231,1232,1232,1232,1233,1556,201,1031,221,183,1213,181,182,182,182,182,182,223,1031,
201,1252,1253,1253,1253,1254,1556,201,1031,1031,201,1234,201,1031,1031,1031,1031,1031,1031,1031,
221,182,182,182,182,183,1556,201,1031,1031,201,1234,201,1031,1031,1031,1031,1031,1031,1031,
1031,1031,1031,1031,1031,201,1556,201,1031,1031,201,1234,201,1031,1031,1031,1031,1031,1031,1031
</data>
</layer>
<layer name="Sprites" width="20" height="15">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,2200,0,0,0,0,0,0,0,2200,0,0,0,0,0,0,0,
0,0,2317,0,0,0,0,2097,0,0,2147486304,0,0,0,0,0,2317,0,0,0,
0,0,0,2692,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,2691,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,2147486401,0,2147486154,0,2326,0,0,0,0,2200,0,0,2200,0,2098,0,0,0,
0,0,0,2317,2315,2319,2585,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2592,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,2569,0,0,0,0,0,
0,0,2200,0,2200,0,0,0,0,0,0,2147486041,0,0,0,0,0,0,0,0,
0,2304,0,2208,2166,2113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,2147486276,0,0,2117,0,0,0,0,0,2096,0,0,0,0,0,0,0,0,
0,2160,2192,2193,0,2113,0,0,0,0,0,2316,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,2104,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,2147486233,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="15" height="12" tilewidth="16" tileheight="16">
<tileset firstgid="1" name="Wall" tilewidth="16" tileheight="16">
<image source="../Objects/Wall.png" width="320" height="432"/>
</tileset>
<layer name="Tile Layer 1" width="15" height="12">
<data encoding="csv">
121,123,83,83,83,141,83,0,141,83,141,83,141,83,141,
141,161,123,83,121,165,123,0,141,83,141,83,144,123,141,
141,0,141,83,141,0,141,0,141,141,141,83,141,141,141,
141,0,141,83,144,122,146,0,141,141,141,83,141,141,141,
141,121,163,83,141,83,141,0,144,122,146,83,141,161,146,
161,163,83,83,142,83,142,0,142,83,142,83,142,83,142,
381,83,381,83,83,381,83,83,83,361,362,83,381,83,381,
381,83,381,83,361,405,363,83,361,403,83,83,381,361,403,
384,362,386,83,381,83,381,83,381,83,83,83,384,386,83,
381,83,381,83,384,362,386,83,381,83,83,83,381,401,363,
381,83,381,83,381,83,381,83,401,363,83,83,381,83,381,
382,83,382,83,382,83,382,83,83,401,362,83,382,83,382
</data>
</layer>
</map>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

View File

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="20" height="15" tilewidth="16" tileheight="16">
<tileset firstgid="1" name="Wall" tilewidth="16" tileheight="16">
<image source="../Objects/Wall.png" width="320" height="816"/>
</tileset>
<tileset firstgid="1021" name="Floor" tilewidth="16" tileheight="16">
<image source="../Objects/Floor.png" width="336" height="624"/>
</tileset>
<tileset firstgid="1840" name="Pit0" tilewidth="16" tileheight="16">
<image source="../Objects/Pit0.png" width="128" height="512"/>
</tileset>
<tileset firstgid="2096" name="Door0" tilewidth="16" tileheight="16">
<image source="../Objects/Door0.png" width="128" height="80"/>
</tileset>
<tileset firstgid="2136" name="Decor0" tilewidth="16" tileheight="16">
<image source="../Objects/Decor0.png" width="128" height="352"/>
</tileset>
<tileset firstgid="2312" name="Ground0" tilewidth="16" tileheight="16">
<image source="../Objects/Ground0.png" width="128" height="112"/>
</tileset>
<tileset firstgid="2368" name="Player0" tilewidth="16" tileheight="16">
<image source="../Characters/Player0.png" width="128" height="240"/>
</tileset>
<tileset firstgid="2488" name="Food" tilewidth="16" tileheight="16">
<image source="../Items/Food.png" width="128" height="96"/>
</tileset>
<tileset firstgid="2536" name="Ore0" tilewidth="16" tileheight="16">
<image source="../Objects/Ore0.png" width="144" height="112"/>
</tileset>
<tileset firstgid="2599" name="Elemental0" tilewidth="16" tileheight="16">
<image source="../Characters/Elemental0.png" width="128" height="176"/>
</tileset>
<tileset firstgid="2687" name="Misc0" tilewidth="16" tileheight="16">
<image source="../Characters/Misc0.png" width="128" height="128"/>
</tileset>
<tileset firstgid="2751" name="LongWep" tilewidth="16" tileheight="16">
<image source="../Items/LongWep.png" width="128" height="112"/>
</tileset>
<tileset firstgid="2807" name="Avian0" tilewidth="16" tileheight="16">
<image source="../Characters/Avian0.png" width="128" height="208"/>
</tileset>
<layer name="Tiles" width="20" height="15">
<data encoding="csv">
10,10,10,361,362,363,1423,381,361,403,1928,1930,401,362,363,10,10,10,10,10,
10,361,362,403,1402,382,1423,401,403,1402,1928,1927,1922,1404,401,362,363,10,10,10,
10,382,1424,1425,1421,1400,1421,1400,1400,1422,1928,1913,1927,1922,1399,1401,381,10,10,10,
1873,1873,1873,1873,1420,1421,1442,1442,1442,1422,1928,1913,1913,1930,1420,1443,381,10,10,10,
1881,1881,1882,1399,1421,1443,361,362,363,1441,1426,1928,1930,1424,1443,361,403,10,10,10,
10,1882,1399,1421,1422,361,403,10,401,362,362,362,362,362,362,403,10,10,10,10,
136,136,1441,1442,1443,175,136,136,136,136,136,136,136,136,136,136,136,136,136,136,
1432,1432,1432,1432,1432,1424,1425,1426,1432,1432,1432,1424,1426,1432,1432,1432,1404,1432,1404,1432,
136,136,136,136,136,136,136,136,1424,1400,1426,135,137,1404,135,136,136,136,136,136,
10,10,10,361,362,362,365,362,363,1423,361,403,155,1430,155,0,0,0,0,0,
10,10,361,403,1399,1400,401,362,403,1423,381,10,155,1430,175,136,136,136,136,136,
361,362,403,1399,1157,1421,1154,1156,1400,1159,381,10,155,1424,1426,1432,1432,1432,1432,1424,
381,1399,1400,1442,1199,1154,1176,1176,1177,1444,381,10,175,136,136,136,136,136,136,136,
403,1420,1443,381,1441,1196,1176,1176,1176,361,403,10,10,10,10,10,10,10,10,10,
1399,1422,361,405,362,362,362,362,362,403,10,10,10,10,10,10,10,10,10,10
</data>
</layer>
<layer name="Sprites" width="20" height="15">
<data encoding="csv">
0,0,0,0,0,0,2316,0,0,2545,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,2895,0,0,2327,0,0,0,0,0,2554,0,0,0,0,
0,0,2327,0,0,0,0,0,2895,0,0,2895,0,0,0,2316,2569,0,0,0,
0,0,0,0,0,2522,0,0,0,0,0,0,0,0,0,2759,2569,0,0,0,
0,0,0,2147485973,0,0,0,0,0,2325,0,0,0,0,2500,0,0,0,0,0,
0,0,2319,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,2147486132,0,0,0,0,0,2568,0,0,0,2554,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,2608,0,0,0,0,0,0,
0,0,0,0,2586,0,0,0,0,0,0,0,2574,0,0,0,0,0,0,0,
0,0,0,0,2166,0,0,0,0,0,2587,0,0,2147486107,0,0,0,2581,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2459,0,0,0,0,
0,2319,0,0,0,0,2331,2488,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,2330,0,2147485979,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
</map>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

View File

@ -1,77 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="20" height="15" tilewidth="16" tileheight="16">
<tileset firstgid="1" name="Wall" tilewidth="16" tileheight="16">
<image source="../Objects/Wall.png" width="320" height="816"/>
</tileset>
<tileset firstgid="1021" name="Floor" tilewidth="16" tileheight="16">
<image source="../Objects/Floor.png" width="336" height="624"/>
</tileset>
<tileset firstgid="1840" name="Pit0" tilewidth="16" tileheight="16">
<image source="../Objects/Pit0.png" width="128" height="512"/>
</tileset>
<tileset firstgid="2096" name="Door0" tilewidth="16" tileheight="16">
<image source="../Objects/Door0.png" width="128" height="80"/>
</tileset>
<tileset firstgid="2136" name="Decor0" tilewidth="16" tileheight="16">
<image source="../Objects/Decor0.png" width="128" height="352"/>
</tileset>
<tileset firstgid="2312" name="Ground0" tilewidth="16" tileheight="16">
<image source="../Objects/Ground0.png" width="128" height="112"/>
</tileset>
<tileset firstgid="2368" name="Player0" tilewidth="16" tileheight="16">
<image source="../Characters/Player0.png" width="128" height="240"/>
</tileset>
<tileset firstgid="2488" name="Tree0" tilewidth="16" tileheight="16">
<image source="../Objects/Tree0.png" width="128" height="528"/>
</tileset>
<tileset firstgid="2752" name="Humanoid0" tilewidth="16" tileheight="16">
<image source="../Characters/Humanoid0.png" width="128" height="432"/>
</tileset>
<tileset firstgid="2968" name="Cat0" tilewidth="16" tileheight="16">
<image source="../Characters/Cat0.png" width="128" height="80"/>
</tileset>
<tileset firstgid="3008" name="Quadraped0" tilewidth="16" tileheight="16">
<image source="../Characters/Quadraped0.png" width="128" height="192"/>
</tileset>
<tileset firstgid="3104" name="Container0" tilewidth="16" tileheight="16">
<image source="../Items/Chest0.png" width="128" height="48"/>
</tileset>
<layer name="Tiles" width="20" height="15">
<data encoding="csv">
1176,1176,1176,1176,1176,1176,1177,1171,1175,1176,1176,1176,1176,1176,1176,1176,1176,1176,1176,1176,
1176,1176,1176,1176,1176,1176,1177,1171,1175,1197,1197,1197,1197,1197,1197,1197,1197,1197,1197,1176,
1176,1176,1176,1176,1176,1176,1177,1171,1178,1421,129,129,129,129,129,129,129,129,1421,1175,
1176,1176,1176,1176,1176,1176,1177,1171,1178,148,1406,1408,1411,1406,1407,1407,1407,1408,148,1175,
1197,1197,1197,1197,1197,1176,1177,1171,1178,148,1448,1450,132,1427,1428,1428,1428,1429,148,1175,
129,129,129,129,1421,1175,1177,1171,1178,1421,129,129,153,1427,1428,1428,1428,1429,148,1196,
1407,1407,1407,1408,148,1175,1177,1171,1175,1155,1155,1156,148,1427,1428,1428,1428,1429,129,129,
1428,1428,1428,1429,148,1175,1177,1171,1175,1176,1176,1177,148,1427,1428,1428,1428,1429,1431,1432,
1428,1428,1428,1429,148,1175,1198,1171,1196,1197,1197,1177,148,1427,1428,1428,1428,1429,128,129,
1449,1449,1449,1450,148,1178,1147,1169,1148,1148,1149,1178,148,1448,1449,1449,1449,1450,148,1154,
129,1411,129,129,1421,1178,1168,1169,1169,1169,1170,1178,1421,129,129,1411,129,129,1421,1175,
1155,1402,1155,1155,1155,1177,1168,1169,1169,1169,1170,1175,1155,1155,1156,1402,1154,1155,1155,1176,
1197,1444,1197,1197,1197,1198,1168,1169,1169,1169,1170,1196,1197,1197,1198,1444,1196,1197,1197,1197,
1148,1148,1148,1173,1173,1173,1190,1169,1169,1169,1190,1173,1173,1173,1173,1148,1148,1148,1148,1148,
1190,1190,1191,1154,1155,1155,1156,1168,1169,1170,1154,1155,1155,1155,1156,1168,1169,1169,1169,1169
</data>
</layer>
<layer name="Sprites" width="20" height="15">
<data encoding="csv">
2497,2497,2498,2504,2505,2506,7,0,7,2147485969,7,2147485969,2313,2147486720,3073,2491,2147485969,2491,2496,2497,
2497,2497,2498,2491,2321,7,2491,0,7,7,2147485969,2147485969,7,2491,7,7,2491,7,2504,2505,
2497,2497,2498,2321,2491,2147485968,7,0,2461,128,7,7,7,7,7,7,7,7,130,2147485969,
2505,2505,2506,7,2321,2491,7,0,7,7,2147486752,7,2097,2164,2147486640,0,2848,2160,7,7,
2491,7,2321,7,2321,7,2147486109,0,7,7,3120,3120,7,2216,2217,2217,2217,2218,7,2147485969,
7,7,7,7,130,7,7,2147486109,2147485969,168,7,7,7,2192,7,2192,2800,2147485840,7,7,
2227,7,2849,2225,7,2147485961,7,0,7,2330,2330,2331,7,7,2248,2249,2250,7,7,7,
2217,2217,2217,2218,7,7,2313,0,2147485961,2331,2331,2330,7,7,2256,2257,2258,2832,2097,7,
2252,2252,2252,2253,7,2491,7,0,7,2147485961,2491,2491,7,2195,2264,2265,2266,2147485843,7,7,
2268,2268,2268,2269,7,2321,0,0,0,0,0,7,7,2196,2147485843,7,2195,2196,7,2491,
7,2096,7,2186,170,7,0,7,2305,7,2826,7,168,2185,7,2096,7,2185,170,2147485961,
2334,0,2334,2147485968,2491,7,0,7,7,2827,0,3050,7,7,2332,0,2332,2491,7,7,
0,0,0,0,7,2147485968,0,2147486472,7,7,0,7,2177,7,2320,0,7,7,2147485969,7,
0,0,0,2147486018,0,0,0,0,0,0,0,0,0,2460,0,0,0,0,7,7,
0,0,0,0,2491,2491,7,0,2374,0,2491,7,2491,7,7,0,0,0,2825,0
</data>
</layer>
</map>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

View File

@ -1,95 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="20" height="15" tilewidth="16" tileheight="16">
<tileset firstgid="1" name="Wall" tilewidth="16" tileheight="16">
<image source="../Objects/Wall.png" width="320" height="816"/>
</tileset>
<tileset firstgid="1021" name="Floor" tilewidth="16" tileheight="16">
<image source="../Objects/Floor.png" width="336" height="624"/>
</tileset>
<tileset firstgid="1840" name="Pit0" tilewidth="16" tileheight="16">
<image source="../Objects/Pit0.png" width="128" height="512"/>
</tileset>
<tileset firstgid="2096" name="Door0" tilewidth="16" tileheight="16">
<image source="../Objects/Door0.png" width="128" height="80"/>
</tileset>
<tileset firstgid="2136" name="Decor0" tilewidth="16" tileheight="16">
<image source="../Objects/Decor0.png" width="128" height="352"/>
</tileset>
<tileset firstgid="2312" name="Ground0" tilewidth="16" tileheight="16">
<image source="../Objects/Ground0.png" width="128" height="112"/>
</tileset>
<tileset firstgid="2368" name="Player0" tilewidth="16" tileheight="16">
<image source="../Characters/Player0.png" width="128" height="240"/>
</tileset>
<tileset firstgid="2488" name="Tile" tilewidth="16" tileheight="16">
<image source="../Objects/Tile.png" width="128" height="64"/>
</tileset>
<tileset firstgid="2520" name="Demon0" tilewidth="16" tileheight="16">
<image source="../Characters/Demon0.png" width="128" height="144"/>
</tileset>
<tileset firstgid="2592" name="Dog0" tilewidth="16" tileheight="16">
<image source="../Characters/Dog0.png" width="128" height="112"/>
</tileset>
<tileset firstgid="2648" name="Tree0" tilewidth="16" tileheight="16">
<image source="../Objects/Tree0.png" width="128" height="528"/>
</tileset>
<tileset firstgid="2912" name="Money" tilewidth="16" tileheight="16">
<image source="../Items/Money.png" width="128" height="128"/>
</tileset>
<tileset firstgid="2976" name="Book" tilewidth="16" tileheight="16">
<image source="../Items/Book.png" width="128" height="144"/>
</tileset>
<tileset firstgid="3048" name="Amulet" tilewidth="16" tileheight="16">
<image source="../Items/Amulet.png" width="128" height="48"/>
</tileset>
<tileset firstgid="3072" name="Elemental0" tilewidth="16" tileheight="16">
<image source="../Characters/Elemental0.png" width="128" height="176"/>
</tileset>
<tileset firstgid="3160" name="Pest0" tilewidth="16" tileheight="16">
<image source="../Characters/Pest0.png" width="128" height="176"/>
</tileset>
<tileset firstgid="3248" name="Chest0" tilewidth="16" tileheight="16">
<image source="../Items/Chest0.png" width="128" height="48"/>
</tileset>
<tileset firstgid="3272" name="Fence" tilewidth="16" tileheight="16">
<image source="../Objects/Fence.png" width="128" height="192"/>
</tileset>
<layer name="Tiles" width="20" height="15">
<data encoding="csv">
10,261,1234,261,241,285,285,285,285,285,285,285,285,285,285,243,261,1234,261,10,
10,261,1234,261,261,1273,1274,1299,1299,1299,1299,1299,1299,1274,1275,261,261,1234,261,10,
10,261,1234,261,261,1294,262,1210,1211,1211,1211,1211,1212,262,1296,261,261,1234,261,10,
10,261,1234,281,283,1294,1296,1231,1232,1232,1232,1232,1233,1294,1296,281,283,1234,261,10,
285,283,1234,1298,1299,1316,262,1231,1232,1232,1232,1232,1233,262,1316,1299,1300,1234,281,285,
1236,1236,1253,1236,1236,1236,1236,1253,1253,1232,1232,1253,1253,1236,1236,1236,1236,1253,1236,1236,
285,243,1273,1274,1274,1274,1275,2048,2050,1231,1233,2048,2050,1273,1274,1274,1274,1275,241,285,
10,261,1315,1316,1295,1316,1317,2056,2058,1231,1233,2056,2058,1315,1316,1295,1316,1317,261,10,
10,281,285,285,1316,285,285,2056,2055,2049,2049,2053,2058,285,285,1316,285,285,283,10,
375,376,1462,1463,1463,1463,1464,2056,2058,1231,1233,2056,2058,1462,1463,1463,1464,376,377,10,
395,1462,1484,1484,1484,1484,1485,2056,2058,1231,1233,2056,2058,1483,1484,1484,1484,1485,395,10,
417,1504,1505,1484,1484,1484,1485,2056,2058,1231,1233,2056,2058,1483,1484,1484,1506,375,417,10,
2049,2049,2050,1504,1505,1505,1506,2056,2058,1231,1233,2056,2058,1483,1484,1485,375,400,10,10,
2057,2057,2055,2049,2049,2049,2049,2053,2055,2049,1233,2056,2058,1483,1484,1485,415,419,377,10,
2057,2057,2057,2057,2058,1462,1464,2056,2058,1231,1233,2056,2058,1483,1484,1484,1463,1464,415,376
</data>
</layer>
<layer name="Sprites" width="20" height="15">
<data encoding="csv">
0,0,0,0,0,0,2201,0,2200,0,0,2200,0,2201,0,0,0,0,0,0,
0,0,2147486722,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,2147486897,0,0,2920,2924,2916,2913,0,0,3251,0,0,0,0,0,
0,0,2106,2200,0,0,0,2920,2922,2147486713,3040,2924,2925,0,0,0,2200,2104,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2105,0,
0,0,0,0,0,0,0,0,0,2147486282,0,0,0,0,0,0,3114,0,0,0,
0,0,0,2147486746,0,0,0,0,0,0,2633,0,0,0,0,0,0,0,0,0,
0,0,0,2200,3321,2200,0,0,0,2512,2512,0,0,0,2200,3321,2200,0,0,0,
0,0,2943,2318,0,0,2655,0,0,0,0,0,0,0,2319,0,2147485975,0,0,0,
0,2655,0,2276,2273,2282,0,0,0,0,0,0,0,0,3106,0,0,2147486303,0,0,
0,2930,0,2147486177,0,0,0,0,0,0,2467,0,0,0,0,2655,0,0,0,0,
0,0,0,0,2147486179,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,2147486842,0,0,0,0,0,0,0,0,0,0,0,0,2147486303,2147486201,0,0,0,0,
0,0,0,0,0,2147486303,0,0,0,0,0,0,0,2318,0,0,2147486202,2553,0,0
</data>
</layer>
</map>

BIN
assets/Extras/Artifacts.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/Extras/Keys.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

7
assets/Extras/README.txt Normal file
View File

@ -0,0 +1,7 @@
The image files contained in this folder are created by Linus Probert (author
of BreakHack).
They are either modifications of the DanwLike tileset or completely original
content. Feel free to use them as you please. The images that are combined
from DawnLike assets should be handled under the same licensing rights as the
original works. The others are completely unencumbered.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 B

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

BIN
assets/Extras/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

BIN
assets/Sounds/FX/blast.wav Normal file

Binary file not shown.

BIN
assets/Sounds/FX/blink.wav Normal file

Binary file not shown.

BIN
assets/Sounds/FX/burst.wav Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/Sounds/FX/slam.wav Normal file

Binary file not shown.

Binary file not shown.

29
bh_random/CMakeLists.txt Normal file
View File

@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.1)
project(bh_random CXX)
add_definitions(-std=c++11)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif ()
add_library(bh_random STATIC
src/bh_random.cpp
)
IF ( MSVC )
MESSAGE ( STATUS "Setting MSVC MT switches")
string (REPLACE
"/MDd"
"/MTd"
CMAKE_C_FLAGS_DEBUG
${CMAKE_C_FLAGS_DEBUG}
)
string (REPLACE
"/MDd"
"/MTd"
CMAKE_C_FLAGS_RELEASE
${CMAKE_C_FLAGS_RELEASE}
)
endif ()

View File

@ -0,0 +1,51 @@
/*
* BreakHack - A dungeone crawler RPG
* Copyright (C) 2018 Linus Probert <linus.probert@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <random>
#include <climits>
extern "C" {
#include "bh_random.h"
}
static std::mt19937 generator;
static std::mt19937 map_generator;
extern "C" void
bh_srand(unsigned int seed)
{
generator.seed(seed);
}
extern "C" unsigned int
bh_rand(void)
{
return generator();
}
extern "C" void
bh_map_srand(unsigned int seed)
{
map_generator.seed(seed);
}
extern "C" unsigned int
bh_map_rand(void)
{
return map_generator();
}

31
bh_random/src/bh_random.h Normal file
View File

@ -0,0 +1,31 @@
/*
* BreakHack - A dungeone crawler RPG
* Copyright (C) 2018 Linus Probert <linus.probert@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
void
bh_srand(unsigned int);
unsigned int
bh_rand(void);
void
bh_map_srand(unsigned int);
unsigned int
bh_map_rand(void);

View File

@ -64,6 +64,14 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(SDL2_ARCH_64 TRUE)
set(SDL2_PROCESSOR_ARCH "x64")
else()
set(SDL2_ARCH_64 FALSE)
set(SDL2_PROCESSOR_ARCH "x86")
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(SDL2_SEARCH_PATHS
~/Library/Frameworks
/Library/Frameworks
@ -87,7 +95,7 @@ FIND_LIBRARY(SDL2_LIBRARY_TEMP
NAMES SDL2
HINTS
$ENV{SDL2DIR}
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib64 lib lib/${SDL2_PROCESSOR_ARCH}
PATHS ${SDL2_SEARCH_PATHS} ${SDL2_INCLUDE_DIR}/../..
)
@ -101,7 +109,7 @@ IF(NOT SDL2_BUILDING_LIBRARY)
NAMES SDL2main
HINTS
$ENV{SDL2DIR}
PATH_SUFFIXES lib64 lib
PATH_SUFFIXES lib64 lib lib/${SDL2_PROCESSOR_ARCH}
PATHS ${SDL2_SEARCH_PATHS}
)
ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")

View File

@ -28,6 +28,14 @@
# See the License for more information.
#=============================================================================
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(SDL2_ARCH_64 TRUE)
set(SDL2_PROCESSOR_ARCH "x64")
else()
set(SDL2_ARCH_64 FALSE)
set(SDL2_PROCESSOR_ARCH "x86")
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(NOT SDL2_TTF_INCLUDE_DIR AND SDL2TTF_INCLUDE_DIR)
set(SDL2_TTF_INCLUDE_DIR ${SDL2TTF_INCLUDE_DIR} CACHE PATH "directory cache
entry initialized from old variable name")
@ -48,7 +56,7 @@ find_library(SDL2_TTF_LIBRARY
HINTS
ENV SDLTTFDIR
ENV SDLDIR
PATH_SUFFIXES lib
PATH_SUFFIXES lib lib/${SDL2_PROCESSOR_ARCH}
)
if(SDL2_TTF_INCLUDE_DIR AND EXISTS "${SDL2_TTF_INCLUDE_DIR}/SDL_ttf.h")

4
build/linux/breakhack.run Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./
exec ./breakhack

View File

View File

@ -0,0 +1,20 @@
f5a88fc Introduces texture blending
52913af Completes #42 Add boss 2 & 3
449cc36 Fixes some minor buggs
f67aab0 Completes #43 Add win state
8c261fd Added the undead monsters for level > 10
6326a64 Begins #42 Add boss 2 & 3
f1b0045 Introduces the "orc levels"
ffe1736 Minor buggfixes and typos
8bf9329 Version bump and badges
8c25693 Moves sqlite3 files to separate dir
bec9eb4 Fixed a typo in skill tooltip
43f021a Created an FPS counter for debug mode
dbc36aa Fixes #41, Minimap
c390c02 Fixes #40, Prevent adjecant traps before lvl 4
9ef97c0 Fixes #38, Artifact inventory
358c0c7 Fixes #37 and #39 Adds tooltips to everything
5f754d5 Merge branch 'master' into dev
30058ea Creates gui_util and moves some code out from gui.c
854f2c0 Prevent levels > 10 from crashing the game.
549f47a Minor code fixes and a slight tweak to the blue color

View File

@ -0,0 +1,22 @@
69e5ff9 Fixes #35
b4a6c4b Fixes some render layer issues
4ba3017 Fixes: #30
62d1bbd Completes #31 Adds chests to game
1c7631c Starts #31 Items: Chests
83aa929 Don't open menu immidiately upon death.
5e3815a Fixes: #34 hopefully
71c1279 Completes #2 artifacts
8dd774b Continues #2 Completed impl of INCREASED_STUN
ba1d09a Continues #2 completed impl of DAGGER_RECOVERY
19e7583 Continues #2 FEAR_INDUCING impl
0aacdd2 Continues #2 Adds PUSH_BACK impl
ac7dada Fixes #23 possibly
a04f131 Continues #2: Adds charge skill impl
736eb79 Continues #2: Artifacts
095c93e Began #2: Added artifacts and the PIERCING_DAGGERS modifier
611d8ef Fixes a minor bug in the guerilla behaviour
aaa8e8c Makes stunned enemies "wobble" instead of having an indicator.
ffde079 Fixes: #4 Room stuff: Traps
a3c3c63 Adds the bash sound effect
41a9021 Fixes a bunch of msvc warnings
3720eb1 Minor READM change

View File

@ -0,0 +1,2 @@
3f1cdf8 Fixes: #5 Creates a creditscreen
2a80434 Adds posibility for daggers hitting walls to be recoverable.

View File

@ -0,0 +1,4 @@
369cfda Completes #33 Create score screen
2544172 Began #33 Create score screen
7739ac5 Merge branch 'dev'
ffd777e Buggfixes

View File

@ -0,0 +1,8 @@
9a610d5 Adds window icon
6af8d9d Completes #8 First boss
915ea59 Fixes a mistake in music loading.
6cc96a9 Begins #8 First boss
1a09328 Adds boss music and an additional attribution line per request.
6633db7 Adds room objects and FIRE rooms.
0b58e53 Removed "Examples" folder from assets
292f549 Minor compiler warning fix

View File

@ -0,0 +1,8 @@
769a659 Patch version raised to 5
0fcc1d2 Last time now
60750d7 Patch version raised to 5
a551c52 More trickery
fa0dbe2 Fixes miss in release script
beb2e79 Patch version raised to 5
7f09fbd Fiddled some more with release script
d4f2514 Patch version raised to 5

View File

@ -0,0 +1,4 @@
998501a Patch version raised to 6
2813a57 Separate player movement from input event loop.
c4dc838 Monsters now indicate their state with speech bubbles
f049d66 Fixed releasenotes and script again

View File

@ -0,0 +1,18 @@
f36a9dd Sleeping state indicator is always visible.
53dc7e2 Possibly more accurate scaling.
dff55a1 Fixes some buggs
6a9a3bd Removed some old debug output from pitlayouts.
cc229c8 Prepares pengine for more particle types.
bbe4526 Fixes colors to use defines.
2462e4c Adds sentinel monster behaviour.
a66f16d Reintroduces the pointer and mouse menu operation.
123ae90 Better mod key logic in input and mouse motion check.
821cac2 Completely separates input handling and game logic.
186cc7b Replaced state logic with behaviours instead.
b905232 ....and once again...
8573bad ...and include the SDL dll
8c58c6e And once again for windows!
6788e3c Another trywq
60114ed Hopefully fixes the build issues
e222e51 Don't test on clang and fix include problem in appveyor
138cba1 Mock test for keyboardinput and fixed the found issues

View File

@ -0,0 +1,23 @@
56af37e Removing natural lighting debug.
c16caf3 Comments out unused function
353b4ed Adds raycasting debug
68cf24d Dropps the particle line slash effect.
2aee360 Merge branch 'master' into dev
1491dfb Minor dev-env change
1124e88 Minor fixes
4819eda Adds "NEW GAME" menu option to game over menu
4612cab Adds sword animation to flurry
b9a4a80 Fixes: #27 Suspicious code: sign conversion
58e9c7e Fixes: #21 Complex method issue in monster.c
b12e5d4 Fixes: #26 Dagger kills should now give XP
b3b8208 Adds complete rewrite of lua scripts
18e7022 Restructured main game loop a bit. Reduced function size
252955b Removes "resume" option from menu when game over.
988d6c5 Implemented the sword swing effect.
79b0869 Adds sword swing effect that isn't horrible
c96d0b6 Removes bug that made it possible to move with daggers in air.
c6b6438 Added codefactor badge and fixed blank line issue.
be42981 Fixed errors and adapted to new vim 8.1
60052af Merge branch 'master' into dev
4684e04 Minor cleaning of lua scripts
ec67221 Adds an idea for slash animations that didn't look very good.

View File

@ -0,0 +1,3 @@
484fb30 Changes the log to fill from the bottom
d8615b2 Changes stun icon and fixes some syntax reports from codacy
9fe2ede Fixes: #29 and #17 New skill: bash

View File

@ -0,0 +1,5 @@
6811c42 Patch version raised to
e796fff Prepare release script for real versions
ae44d5c Adds minimal Steam fiddling protection
6e3343a License stuff and README updates
899d2e5 Update to build env

View File

@ -0,0 +1,8 @@
0730eb4 Disable text input since this is on by default in SDL2.0
7333d3d Update issue templates
70cc79f Merge pull request #47 from Oliveshark/add-code-of-conduct-1
bdbb10b Create CODE_OF_CONDUCT.md
75660a5 Update to readme.
5d1490b Another README badge fix
aefbd95 Update readme to match new github url
90603b4 Fix what my bad build script broke

View File

@ -0,0 +1,93 @@
cb6bd03 Patch version raised to 2
b0f2936 Removes beta release type
76c2f90 Fixes a compiler warning and arcade mode coverage
8233841 Adds burst sound to eldritch blast
c2eae7a Adds arcade game leaderboard
f53703d Introduces arcade mode
0f66b0f Adds the game type select menu
7005239 Fixed commit msg in version script
7991e7c Fixes COMPLETED state for quick games
aea9995 Reduved stun from trip skill
a38a21a Incorporates quickplay leaderboard
deb4638 Fixes a bad help text
120f8d7 Some tweaks to the rogue character
5985c3e Fixed a bad pointer reset
9968b37 Fixes another memory leak
7e71fcc Build updates
dd77f29 Fixes a typo
51d7b67 Completed the QUICK_GAME mode
97c95da Adds lua support for quick mode
f895fdb Add a title to char select menu.
1a0d806 Introduces menu option descriptions
f5a1c2f Removes a memory leak
d2fe3fc Fixes a codacy warning
bcdc9c1 Update README.md
8d09e8a Adds the new steam achievement and leaderboards
d034a69 Finnished up with the rogue
94ec8cf Removed bad options in .clang_complete
669a2fb Merge branch 'master' into dev
feed0e2 Completes crumbling rooms.
6e6f28d Prevent tiles with chests from falling.
fd8799f Prevent tiles with objects on them from falling.
ee56143 Initial implementation of the falling tiles room modifier.
f65bdd0 Add license header to gamecontroller files
a803578 Fixes a gcc warning
8792504 Adds the backstab skill icon
da3ff1a Small thumbstick tweak
850aae3 Adds controller haptics
423ff73 Fixes a leak and begins restructure of controller code
2e0a88e Switches the old MapTile texture system to use sprites instead
53151b6 Adds the phase skill icon
e6b5b76 Includes attempt to determine if PS3 controller aswell as PS4
894e3ba Merge branch 'master' into dev
c8900e8 Controller button rendering based on controller type
06d2da1 Controllers are working
3143236 Completely untested controller mappings.
bb7f9ef A beginning to controller support
2919ebf Adds controller button support for skillbar
c3b2b6f Fixed a typo and made controller layout toggleable.
e526c03 Completed the button implementation for the help tooltips
e845195 Got this texture stuff working
0723f62 New approach where we render button textures in tooltips.
a162646 More font modifications
60374c9 Font updates
2b02ae5 An attempt to group files in msvc
a4cb234 Re-aligned the credits file
e59f04b Merge branch 'dev' into feature/phase-skill
2d25e42 Merge branch 'master' into dev
c7c5346 Completes testing of phase and fixes some errors
97ad1dd Introduced the phase artifact
0dcb658 Merge branch 'dev' into feature/phase-skill
9610609 Attempt to bring the mouse menu click back
ee5ed14 Implementd the skill. Still not tested.
b4fd2cb Added the phase tooltip.
742d6e2 Untested phase code. Needs more work
35c3be4 Removed a type warning
3bbe917 Merge branch 'master' into dev
c97688a Incorporate artifacts in rogue skills
47082da Build env changes
3301437 Tuned the backstab skill slightly
743e4a3 Implemented the backstab skill
81ccf8a Fixed a windy room issue
083834d Maint: Remove CI compiler warnings
dc6b816 Add slash animation to trip skill
87b2b9d Fix pits added to room
5648be4 Merge branch 'master' into dev
5d5170c Version bump for future release
583a7d0 Fixes some minor bugs caused by coding without testing
60359d8 Untested implementation of the TRIP skill
dbf9fe3 Maint: Removed duplicate code
0fc1fed Maint: Clean up monster.c
e1b3364 Maint: Even more cleanup
620a7e3 Maint: Less complex main
983875d Maint: Cleaned up a complex function
e293c21 Rogue preparation
0ca70c7 Add the dagger skill to the rogue
c39f05d Fixed the player menu
02a4407 Got a bit further
f246c57 Broken commit
367be69 Buggfix: Prevent clip switching on falling sprite
988b53a Outline the rogue skillset
03b60f6 Merge branch 'master' into dev
5043a86 Cleaned up main a bit and moved some code
cb732a8 Adds possibility to push monsters into pits and traps.

View File

@ -0,0 +1,2 @@
8ab527c Makes monsters fall when the tile they are on falls
8e39ff8 Fix releasenotes for v2.0.2

View File

@ -0,0 +1,3 @@
4d01251 Merge branch 'master' into dev
9299087 Updates PhysicsFS to latest stable-3.0
cb2510c Rename physfs folder

View File

@ -0,0 +1,16 @@
ee4dd27 Patch version raised to 1
5ee20c9 Shifted to safer time functions and utc time
563ebf9 Adds another build fix
3533d5c Fixes build again
97b097a Fixes builds
685bf97 Makes the custom random generator deterministic across platforms
cc375bb Implements control over lua random numbers
1205856 Attempt att syncing random generation
d1efa84 Create new leaderboards with attribute 'Descending'
2775780 Makes weekly leaderboards creatable from app.
269b25b Removes a mingw warning
72c3817 Adds weekly challenge seed play and leaderboard saving
1212b1a Weekly challenge option added to play menu
ce2a348 Generate seeds from the core seed so that levels will look different.
bc9d37e Connects the random seed through all the generators
3c7dcb5 Begins new random impl

View File

@ -0,0 +1,9 @@
a03aec7 Handles the second mingw special case which I kept forgetting.
0de018f Fix mingw preprocessor define from cmake
3eeb4d0 Include mingw32 64bit in the exclusion
5f369da Fixed preprocessor command for mingw
c98e6e6 Fix wonky mingw errors in appveyor
499f015 Only use gmtime_s for MSVC
9b9a0ca Fixed bad include
926054b Ensure that we have seed when making a map
49b7ebb Include patch notes for v2.2.1

View File

@ -0,0 +1,4 @@
e455523 Update README.md
791dd7e Removes cppcheck warning
b08ef10 Code maintenance and cleanup
fffcac1 Makes sure til effects and items apply after backstab

View File

@ -0,0 +1 @@
c3464eb Fixes a typo

View File

@ -0,0 +1,60 @@
c4811ed Fixes checksumtool output again
eceb241 Removes useless text from checksumtool output
cea891f Move checksum configuration to CMakeLists.txt and config.h
8e28230 Fixes release notes
53703f1 Patch version raised to 1
ce182ad Updates checksums
ebfe271 Fixes compile error and some graphical issues
2ae6ada Completes locked room generation
18987e2 Incomplete monster key fixes
59a1e81 Implementation of keys. Completely untested
1065216 Include all files in pack files
68533f0 Remove memory leaks from map destruction
38dc3de Merge branch 'dev' of github.com:liquidityc/breakhack into dev
beda4f6 Reduces fairy frequency
e50d40f Adds doors and greater chance of walls
0983bd1 Fixes a weird issue with missing code
184b42f Fixes door logic
e42e024 Adds some door logic
756afba Separates walls from regular tiles
40a20e9 Adapts fopen/fopen_s to WIN32/GCC compile
af930f6 Fixes win compiler warnings
c4fd16d Updated dll checksums for windows build
f840b28 Adds mediocre crack protection
7fbeaa3 Introduced base structure for doors in maps
3e43c30 Adds funny casting to avoid pedantic ISO C warning
fd3a625 Adds monster bloodlust
d749861 Make jumbled rooms more likely
7ab5ece Nicer wall decorations on interior walls
8c9622d Shopkeeper now has bodyguards next time you meet after kiling him
af0c616 Adds juice
46fbdc1 Fixed jumble layout logic
b40c54a Layouts can now be jumbled with each other
8f20f36 Lighting on wall layouts and aggro shopkeepers
3ba33d8 Adds light tiles to layout files and a shopkeeper
447c1a7 Monster shopkeeper logic
7e1dffb Shops implemented
6009aa1 Merge branch 'dev' into shops
9b4a7b6 Removes crazy old bug that never presented itself before
63812fb More wall layouts and cordinated walls
c6a022e Moved text sprite logic to sprite_util
06ca6c3 Not finnished yet, commit
bab5fd7 Merge branch 'dev' into shops
68f4409 Add amt sprite to all items where value != 0
959fae1 Add value sprite to items.
ca41520 Wall layouts added to regular build
88f4703 Some more fence layouts
486c1bb Merge branch 'dev' into shops
206f95f Fences and walls in layout files
1c4e600 Wall layout data
57a1688 Merge branch 'dev' into shops
13ca11c Begins refactoring of layout parser to accomodate more layout details
33efba8 Merge branch 'dev' into shops
5d61a91 Split pit layout logic into separate file
6542e4f Moves item update to its own function
7b47c6a Completes buyable items
16d9035 Merge branch 'dev' into shops
4054c37 Ignore vscode_build dir
ad227f1 A start to "priced" items
37ba189 Suppress cppcheck issues
645a02c Ignore .vscode folder

View File

@ -0,0 +1,6 @@
c2b8fd4 Adds key pickup SFX
7a59d15 Don't add walls to crumbling rooms before lvl 4
c9fde8d Updated releasenotes
c4811ed Fixes checksumtool output again
eceb241 Removes useless text from checksumtool output
cea891f Move checksum configuration to CMakeLists.txt and config.h

View File

@ -0,0 +1,40 @@
392edd8 Updates blink tooltip to include item pickups.
6584981 remove unnecessary pickup
d2cf797 Mage blink skill pickup items in the path #60
78e9413 Fix : Missing with vampiric blow doesn't seem to trigger a 'Dodge' action text #59
af957eb Disables mouse square rendering for all classes
1d988d7 Fixes working explosions and artifacts
68f4e15 Fixes returning daggers and resets erupt attack
7f232be A beginning to the new exploding artifacts
12aff9a Fixes erupt so it has a base push of 1
2dc25c9 Adds the DAGGER_MAGNET artifact
5e67ca7 Removes stun from backstab skill
cac3fea Altered the vampiric blow icon slightly
9ed80ac Removes erupt test code
05cbce0 Adds vampiric blow icon
6c135c6 Adds gui display for held keys
fb031e2 Bumps version
b861e6e Fixes SENTINEL monsters from ignoring forced fear
046551a Changes ERUPT to cause fear instead of bleeding
8fb1bbc Fixes bug with erupt pushing direction
35164a9 Introduces vampiric blow
dd3e84d Makes critical hits cause bleeding
8f21e8b Prevents skill radius from impacting push back range
2b74316 Updates erupt tooltip to mention push back
7ddaab8 Make erupt always push back 1 tile without any artifacts
43ca8f4 Fixes #58 - Game crash with AOE attacks
ef5cd4e Adds PUSH_BACK and SKILL_RADIUS effects to erupt skill
b00e607 Start with debug gold
67e29d6 Added the SKILL_RADIUS artifact (not used yet)
81e7df1 Adds skill icons for the two mage skills
18effa2 Rogue backstab skill now triggers bleeding as well
c043ad0 Implements the erupt skill
223a3b0 Implements the blink skill
2ca78e2 Adds monster bleed damage every turn
0476d4d Introduces particle emitters on monsters
826cbe1 A quick start to the Mage
fcc6527 Minor fix
b409b76 Improved build instruction structure
b075390 React to PR feedback
86e6f66 Adds Windows compilation instructions
c0a4a4e Make ninja builds smoother

View File

@ -0,0 +1,2 @@
6d323ca Adds steam achievements and LB for the Mage class
9aefed0 Adds an dev env setup script

View File

View File

@ -0,0 +1 @@
4edeb17 Fixes cross save problems due to architecture differences

View File

@ -0,0 +1 @@
e636ec1 Don't delete saves from other architectures on death

View File

@ -1,12 +1,24 @@
#!/bin/sh
# Get the current patch version
CURRENT_VERSION=$(egrep -o 'breakhack_PATCH_VERSION [0-9]+' CMakeLists.txt | awk '{print $2}')
git tag early-access-v$CURRENT_VERSION
git push origin early-access-v$CURRENT_VERSION
MAJOR_VERSION=$(egrep -o 'breakhack_MAJOR_VERSION [0-9]+' CMakeLists.txt | awk '{print $2}')
MINOR_VERSION=$(egrep -o 'breakhack_MINOR_VERSION [0-9]+' CMakeLists.txt | awk '{print $2}')
LAST_PATCH_VERSION=$(egrep -o 'breakhack_PATCH_VERSION [0-9]+' CMakeLists.txt | awk '{print $2}')
NEXT_PATCH_VERSION=$((LAST_PATCH_VERSION + 1))
LAST_TAG=v$MAJOR_VERSION.$MINOR_VERSION.$LAST_PATCH_VERSION
NEXT_TAG=v$MAJOR_VERSION.$MINOR_VERSION.$NEXT_PATCH_VERSION
# Update the version and create release notes
sed -i -e "s/breakhack_PATCH_VERSION [0-9]\+/breakhack_PATCH_VERSION $NEXT_PATCH_VERSION/" CMakeLists.txt
git log --oneline $LAST_TAG..HEAD > build/releasenotes/$NEXT_TAG.txt
git add build/releasenotes/$NEXT_TAG.txt
git commit -a -m"Patch version raised to $NEXT_PATCH_VERSION"
# Create the tag
git tag $NEXT_TAG
# Push to repo
git push
git push origin $NEXT_TAG
NEXT_VERSION=$((CURRENT_VERSION + 1))
# Update the version
sed -i -e "s/breakhack_PATCH_VERSION [0-9]\+/breakhack_PATCH_VERSION $NEXT_VERSION/" CMakeLists.txt
git commit -a -m"Patch version raised to $NEXT_VERSION"
"push"

View File

@ -0,0 +1,12 @@
#!/bin/sh
mkdir -p _build/debug
mkdir -p _build/release
cd _build/debug
cmake -DCMAKE_BUILD_TYPE=Debug ../..
cd -
cd _build/release
cmake -DCMAKE_BUILD_TYPE=Release ../..
cd -

33
checksum/CMakeLists.txt Normal file
View File

@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.1)
project(checksum C)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif ()
add_executable(checksumtool
src/checksum.c
)
target_compile_definitions(checksumtool PUBLIC EXECUTABLE=1)
add_library(checksum
src/checksum.c
)
IF ( MSVC )
MESSAGE ( STATUS "Setting MSVC MT switches")
string (REPLACE
"/MDd"
"/MTd"
CMAKE_C_FLAGS_DEBUG
${CMAKE_C_FLAGS_DEBUG}
)
string (REPLACE
"/MDd"
"/MTd"
CMAKE_C_FLAGS_RELEASE
${CMAKE_C_FLAGS_RELEASE}
)
endif ()

61
checksum/src/checksum.c Normal file
View File

@ -0,0 +1,61 @@
/*
** CHECKSUM.C - Compute the checksum of a file
**
** public somain demo by Bob Stout
*/
#include <stdlib.h>
#include "checksum.h"
unsigned
checksum(void *buffer, size_t len, unsigned int seed)
{
unsigned char *buf = (unsigned char *)buffer;
size_t i;
for (i = 0; i < len; ++i)
seed += (unsigned int)(*buf++);
return seed;
}
unsigned
checksum_fp(FILE *fp)
{
unsigned int seed = 0;
char buf[4096];
size_t len;
do {
len = fread(buf, sizeof(char), sizeof(buf), fp);
seed = checksum(buf, len, seed);
} while (len > 0);
return seed;
}
#ifdef EXECUTABLE
#include <stdio.h>
int main(int argc, char *argv[])
{
FILE *fp;
const char *file;
if (argc < 2) {
printf("You need to provide an input file\n");
printf("Example: %s <file>", argv[0]);
}
file = argv[1];
if (NULL == (fp = fopen(file, "rb")))
{
printf("Unable to open %s for reading\n", file);
return -1;
}
printf("%#x\n", checksum_fp(fp));
return 0;
}
#endif

27
checksum/src/checksum.h Normal file
View File

@ -0,0 +1,27 @@
/*
* BreakHack - A dungeone crawler RPG
* Copyright (C) 2018 Linus Probert <linus.probert@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdio.h>
unsigned
checksum(void *buffer, size_t len, unsigned int seed);
unsigned
checksum_fp(FILE *fp);

63
data/chestgen.lua Normal file
View File

@ -0,0 +1,63 @@
local room_builder = require "maproombuilder"
local module = {}
local random = map_random
local textures = {
"Items/Chest0.png",
"Items/Chest1.png"
}
local chests = {}
for i=0,1 do
table.insert(chests, {
textures[1],
textures[2],
0,
i * 16
});
table.insert(chests, {
textures[1],
textures[2],
16,
i * 16
});
end
local function repack(data)
return {
texturePath1 = data[1],
texturePath2 = data[2],
clipX = data[3],
clipY = data[4]
}
end
function module.add_chests_to_room(room)
if room.type == "coridoor" then
return
end
local count = random(3) - 1
local i = 0
while i < count do
local rx = random(13) + 1
local ry = random(9) + 1
if room_builder.is_tile_avilable(room, rx, ry) then
room.chests[rx][ry] = chests[random(#chests)]
i = i + 1
end
end
end
function module.load_chests(map, chests)
for i=0,15 do
for j=0,11 do
chest = chests[i][j]
if chest then
add_chest(map, i, j, CURRENT_LEVEL, repack(chest))
end
end
end
end
return module

406
data/layoutparser.lua Normal file
View File

@ -0,0 +1,406 @@
local random = map_random
local pits = {}
local walls = {}
local fences = {}
local lights = {}
local doors = {}
local walldecor = {}
local chest
local function readLayoutFile(file)
local layoutfile = read_file(file)
local cleanData = ""
for i=1, #layoutfile do
local c = layoutfile:sub(i+1, i+1)
if c ~= " " and c ~= "\n" and c ~= "\r" then
cleanData = cleanData .. c
end
end
local matrix = {}
for i=0, #cleanData-1 do
local c = cleanData:sub(i, i)
local col = i % 16
local row = (i - col)/16
local layout = 1 + (row - (row % 12))/12
local row = row % 12
if not matrix[layout] then matrix[layout] = {} end
if not matrix[layout][col] then matrix[layout][col] = {} end
matrix[layout][col][row] = c
end
return matrix;
end
local function has_value(list, char)
for _, value in ipairs(list) do
if value == char then return true end
end
return false
end
local function getTileStateFor(matrix, i, j, c)
local charList
if type(c) == "string" then
charList = { c }
else
charList = c
end
local above = has_value(charList, matrix[i][j-1])
local below = has_value(charList, matrix[i][j+1])
local left = has_value(charList, matrix[i-1][j])
local right = has_value(charList, matrix[i+1][j])
local above_left = has_value(charList, matrix[i-1][j-1])
local above_right = has_value(charList, matrix[i+1][j-1])
local below_left = has_value(charList, matrix[i-1][j+1])
local below_right = has_value(charList, matrix[i+1][j+1])
return above, below, left, right, above_left, above_right, below_left, below_right
end
local function getRandomWallDecorFrom(wallDecorations)
return wallDecorations[random(#wallDecorations)]
end
local function setBlockTile(room, matrix, i, j, tiles, char, decor)
local above, below, left, right, above_left, above_right, below_left, below_right = getTileStateFor(matrix, i, j, char);
room.decor[i][j] = nil
local tile = nil
local decorTile = nil
if above and below and left and right then
tile = tiles.cross
elseif not above and below and left and right then
tile = tiles.top_t
elseif not below and above and left and right then
tile = tiles.bottom_t
decorTile = getRandomWallDecorFrom(walldecor.bottom_t)
elseif not left and above and below and right then
tile = tiles.left_t
decorTile = getRandomWallDecorFrom(walldecor.left_t)
elseif not right and above and below and left then
tile = tiles.right_t
decorTile = getRandomWallDecorFrom(walldecor.right_t)
elseif not above and not left and right and below then
tile = tiles.topleft
decorTile = getRandomWallDecorFrom(walldecor.topleft)
elseif not above and not right and left and below then
tile = tiles.topright
decorTile = getRandomWallDecorFrom(walldecor.topright)
elseif not below and not left and above and right then
tile = tiles.bottomleft
decorTile = getRandomWallDecorFrom(walldecor.bottomleft)
elseif not below and not right and above and left then
tile = tiles.bottomright
decorTile = getRandomWallDecorFrom(walldecor.bottomright)
elseif not left and not right and below then
tile = tiles.left
decorTile = getRandomWallDecorFrom(walldecor.left)
elseif not above and not below and (left or right) then
tile = tiles.top
decorTile = getRandomWallDecorFrom(walldecor.top)
else
tile = tiles.single
decorTile = getRandomWallDecorFrom(walldecor.single)
end
room.walls[i][j] = tile
if random(8) == 1 and decor then
room.decor[i][j] = decorTile
end
end
local function setPitTile(room, matrix, i, j)
local above, below, left, right, above_left, above_right, below_left, below_right = getTileStateFor(matrix, i, j, "p");
room.decor[i][j] = nil
if not above_left and not above_right and left and right and above then
room.tiles[i][j] = pits.innermid
elseif not above_left and left and above then
room.tiles[i][j] = pits.innerleft
elseif not above_right and right and above then
room.tiles[i][j] = pits.innerright
elseif not left and not above and not right then
room.tiles[i][j] = pits.topcrevice
elseif not left and not right then
room.tiles[i][j] = pits.bottomcrevice
elseif not left and not above then
room.tiles[i][j] = pits.topleft
elseif not right and not above then
room.tiles[i][j] = pits.topright
elseif not left then
room.tiles[i][j] = pits.left
elseif not right then
room.tiles[i][j] = pits.right
elseif not above then
room.tiles[i][j] = pits.top
else
room.tiles[i][j] = pits.center
end
end
local function getDoor(matrix, i, j, topDoor, leftDoor)
local above, below, left, right, above_left, above_right, below_left, below_right = getTileStateFor(matrix, i, j, { "#", "\"", "/"});
if above and below then
return leftDoor
else
return topDoor
end
end
local module = {}
function module.load_textures(map, wall_xoffset, wall_yoffset)
local t_pit0 = add_texture(map, "Objects/Pit0.png")
local t_pit1 = add_texture(map, "Objects/Pit1.png")
local t_wall = add_texture(map, "Objects/Wall.png")
local t_fence = add_texture(map, "Objects/Fence.png")
local t_decor0 = add_texture(map, "Objects/Decor0.png")
local t_decor1 = add_texture(map, "Objects/Decor1.png")
local t_door0 = add_texture(map, "Objects/Door0.png")
local t_door1 = add_texture(map, "Objects/Door1.png")
local yo = (random(5) + random(3)) * (16 * 2)
pits = {
center = { t_pit0, t_pit1, 16, yo + 16, false, false, false, true },
top = { t_pit0, t_pit1, 16, yo, false, false, false, true },
left = { t_pit0, t_pit1, 0, yo + 16, false, false, false, true },
right = { t_pit0, t_pit1, 32, yo + 16, false, false, false, true },
topleft = { t_pit0, t_pit1, 0, yo, false, false, false, true },
topright = { t_pit0, t_pit1, 32, yo, false, false, false, true },
innerleft = { t_pit0, t_pit1, 80, yo, false, false, false, true },
innermid = { t_pit0, t_pit1, 96, yo, false, false, false, true },
innerright = { t_pit0, t_pit1, 112, yo, false, false, false, true },
topcrevice = { t_pit0, t_pit1, 64, yo, false, false, false, true },
bottomcrevice = { t_pit0, t_pit1, 64, yo + 16, false, false, false, true },
}
local xo = wall_xoffset
yo = wall_yoffset
walls = {
topleft = { t_wall, nil, xo + 0, yo, true },
top = { t_wall, nil, xo + 16, yo, true },
single = { t_wall, nil, xo + 16, yo + 16, true },
topright = { t_wall, nil, xo + 32, yo, true },
left = { t_wall, nil, xo + 0, yo + 16, true },
bottomleft = { t_wall, nil, xo + 0, yo + 32, true },
bottomright = { t_wall, nil, xo + 32, yo + 32, true },
center = { t_wall, nil, xo + 48, yo, true },
top_t = { t_wall, nil, xo + 64, yo, true },
left_t = { t_wall, nil, xo + 48, yo + 16, true },
cross = { t_wall, nil, xo + 64, yo + 16, true },
right_t = { t_wall, nil, xo + 80, yo + 16, true },
bottom_t = { t_wall, nil, xo + 64, yo + 32, true },
}
yo = 48 * random(3)
fences = {
topleft = { t_fence, nil, 0, yo, true },
top = { t_fence, nil, 16, yo, true },
single = { t_fence, nil, 0, yo + 16, true },
topright = { t_fence, nil, 32, yo, true },
left = { t_fence, nil, 0, yo + 16, true },
bottomleft = { t_fence, nil, 0, yo + 32, true },
bottomright = { t_fence, nil, 32, yo + 32, true },
center = { t_fence, nil, 48, yo, true },
top_t = { t_fence, nil, 64, yo, true },
left_t = { t_fence, nil, 48, yo + 16, true },
cross = { t_fence, nil, 64, yo + 16, true },
right_t = { t_fence, nil, 80, yo + 16, true },
bottom_t = { t_fence, nil, 64, yo + 32, true },
}
doors = {
door_top_nolock = { t_door0, t_door1, 0, 0, true },
door_left_nolock = { t_door0, t_door1, 16, 0, true },
door_top_silverlock = { t_door0, t_door1, 32, 0, true, false, false, false, 1 },
door_left_silverlock = { t_door0, t_door1, 48, 0, true, false, false, false, 1 },
door_top_goldlock = { t_door0, t_door1, 64, 0, true, false, false, false, 2 },
door_left_goldlock = { t_door0, t_door1, 80, 0, true, false, false, false, 2 },
gate_top_nolock = { t_door0, t_door1, 0, 32, true },
gate_left_nolock = { t_door0, t_door1, 16, 32, true },
gate_top_silverlock = { t_door0, t_door1, 32, 32, true, false, false, false, 1 },
gate_left_silverlock = { t_door0, t_door1, 48, 32, true, false, false, false, 1 },
gate_top_goldlock = { t_door0, t_door1, 64, 32, true, false, false, false, 2 },
gate_left_goldlock = { t_door0, t_door1, 80, 32, true, false, false, false, 2 },
}
lights = {
candle0 = { t_decor0, t_decor1, 3 * 16, 8 * 16, true, true },
candle1 = { t_decor0, t_decor1, 1 * 16, 8 * 16, true, true },
candle2 = { t_decor0, t_decor1, 5 * 16, 8 * 16, true, false },
}
walldecor = {
topleft = {
{ t_decor0, nil, 2 * 16, 2 * 16, false },
{ t_decor0, nil, 6 * 16, 2 * 16, false },
{ t_decor0, nil, 7 * 16, 2 * 16, false },
},
top = {
{ t_decor0, nil, 0 * 16, 2 * 16, false },
{ t_decor0, nil, 1 * 16, 2 * 16, false },
{ t_decor0, nil, 4 * 16, 2 * 16, false },
{ t_decor0, nil, 5 * 16, 2 * 16, false },
},
single = {
{ t_decor0, nil, 0 * 16, 2 * 16, false },
{ t_decor0, nil, 1 * 16, 2 * 16, false },
{ t_decor0, nil, 4 * 16, 2 * 16, false },
{ t_decor0, nil, 5 * 16, 2 * 16, false },
},
topright = {
{ t_decor0, nil, 3 * 16, 2 * 16, false },
},
left = {
{ t_decor0, nil, 2 * 16, 2 * 16, false },
{ t_decor0, nil, 3 * 16, 2 * 16, false },
{ t_decor0, nil, 6 * 16, 2 * 16, false },
{ t_decor0, nil, 7 * 16, 2 * 16, false },
},
bottomleft = {
{ t_decor0, nil, 0 * 16, 2 * 16, false },
{ t_decor0, nil, 1 * 16, 2 * 16, false },
{ t_decor0, nil, 2 * 16, 2 * 16, false },
{ t_decor0, nil, 4 * 16, 2 * 16, false },
{ t_decor0, nil, 5 * 16, 2 * 16, false },
{ t_decor0, nil, 6 * 16, 2 * 16, false },
{ t_decor0, nil, 7 * 16, 2 * 16, false },
},
bottomright = {
{ t_decor0, nil, 0 * 16, 2 * 16, false },
{ t_decor0, nil, 1 * 16, 2 * 16, false },
{ t_decor0, nil, 3 * 16, 2 * 16, false },
{ t_decor0, nil, 4 * 16, 2 * 16, false },
{ t_decor0, nil, 5 * 16, 2 * 16, false },
},
left_t = {
{ t_decor0, nil, 2 * 16, 2 * 16, false },
{ t_decor0, nil, 6 * 16, 2 * 16, false },
{ t_decor0, nil, 7 * 16, 2 * 16, false },
},
right_t = {
{ t_decor0, nil, 3 * 16, 2 * 16, false },
},
bottom_t = {
{ t_decor0, nil, 0 * 16, 2 * 16, false },
{ t_decor0, nil, 1 * 16, 2 * 16, false },
{ t_decor0, nil, 4 * 16, 2 * 16, false },
{ t_decor0, nil, 5 * 16, 2 * 16, false },
},
}
chest = { "Items/Chest0.png", "Items/Chest1.png", 16, 0}
end
function createJumbleLayout(matrix)
local room1 = matrix[random(#matrix)]
local room2 = matrix[random(#matrix)]
local room3 = matrix[random(#matrix)]
local room4 = matrix[random(#matrix)]
local room = {}
for i=0,15 do
for j=0,12 do
if not room[i] then room[i] = {} end
if not room[i][j] then room[i][j] = {} end
if i < 7 then
if j < 6 then
room[i][j] = room1[i][j]
else
room[i][j] = room2[i][j]
end
else
if j < 6 then
room[i][j] = room3[i][j]
else
room[i][j] = room4[i][j]
end
end
end
end
return room
end
function draw_layout_to_room(room, matrix, roomx, roomy)
local wallTypes = {"#", "\"", "/", "d", "g", "S", "G"}
for i=2,13 do
for j=2,10 do
if matrix[i][j] == "p" then
setPitTile(room, matrix, i, j);
elseif matrix[i][j] == "#" then
setBlockTile(room, matrix, i, j, walls, wallTypes, false)
elseif matrix[i][j] == "\"" then
setBlockTile(room, matrix, i, j, walls, wallTypes, false)
room.decor[i][j] = lights.candle1
elseif matrix[i][j] == "/" then
setBlockTile(room, matrix, i, j, walls, wallTypes, false)
if random(2) == 1 then
room.decor[i][j] = lights.candle1
else
room.decor[i][j] = lights.candle2
end
elseif matrix[i][j] == "f" then
setBlockTile(room, matrix, i, j, fences, "f", true)
elseif matrix[i][j] == "a" then
create_shop_artifact(map, (roomx*512) + i*32, (roomy * 384) + j*32)
elseif matrix[i][j] == "l" then
room.decor[i][j] = lights.candle0
elseif matrix[i][j] == "c" then
room.chests[i][j] = chest
elseif matrix[i][j] == "d" then
room.doors[i][j] = getDoor(matrix, i, j, doors.door_top_nolock, doors.door_left_nolock)
elseif matrix[i][j] == "S" then
room.doors[i][j] = getDoor(matrix, i, j, doors.door_top_silverlock, doors.door_left_silverlock)
elseif matrix[i][j] == "G" then
room.doors[i][j] = getDoor(matrix, i, j, doors.door_top_goldlock, doors.door_left_goldlock)
elseif matrix[i][j] == "g" then
room.doors[i][j] = getDoor(matrix, i, j, doors.gate_top_nolock, doors.gate_left_nolock)
end
end
end
end
function pickALayout(matrix)
-- Chose a random layout
if random(3) == 1 then
return matrix[random(#matrix)]
else
return createJumbleLayout(matrix)
end
end
function module.add_walls_to_room(room)
if random(2) == 1 then
return false
end
draw_layout_to_room(room, pickALayout(readLayoutFile("walllayouts.dat")))
return true
end
function module.add_pits_to_room(room)
if CURRENT_LEVEL < 2 or random(5) ~= 1 then
return false
end
draw_layout_to_room(room, pickALayout(readLayoutFile("pitlayouts.dat")))
return true
end
function module.add_shop_layout(room, roomx, roomy)
local matrix = readLayoutFile("shoplayouts.dat")
draw_layout_to_room(room, matrix[random(#matrix)], roomx, roomy)
return true
end
function module.add_locked_room_layout(room, roomx, roomy)
local matrix = readLayoutFile("lockedroomlayouts.dat")
draw_layout_to_room(room, matrix[random(#matrix)], roomx, roomy)
return true
end
return module

View File

@ -0,0 +1,90 @@
++++++++++++++++
++++++++++++++++
++"#####G####"++
++#-c--c--c--#++
++#----------#++
++#-c--c--c--#++
++G----------G++
++#-c--c--c--#++
++#----------#++
++"#####G####"++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++"#####S####"++
++#-c--c--c--#++
++#----------#++
++#-c--c--c--#++
++S----------S++
++#-c--c--c--#++
++#----------#++
++"#####S####"++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++/####-#####/++
++#--c#-#c---#++
++S---#-#----G++
++#####-######++
++------------++
++#####-######++
++S--c#-#c---G++
++/####-#####/++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++----#S#-----++
++----#c#-----++
++----#c#-----++
++----#c#-----++
++----###-----++
++------------++
++------------++
++------------++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++------------++
++------------++
++------------++
++---###S##---++
++---#cccc#---++
++---######---++
++------------++
++------------++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++----#G#-----++
++----#c#-----++
++----#c#-----++
++----#c#-----++
++----###-----++
++------------++
++------------++
++------------++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++------------++
++------------++
++------------++
++---###G##---++
++---#cccc#---++
++---######---++
++------------++
++------------++
++++++++++++++++
++++++++++++++++

View File

@ -1,10 +1,12 @@
local room_builder = require "maproombuilder"
local monster_gen = require "monstergen"
local trap_gen = require "trapgen"
local chest_gen = require "chestgen"
-- Setting up some functions
local time = os.time
local random = math.random
local randomseed = math.randomseed
local random = map_random
local randomseed = map_randomseed
-- CONSTANTS
local UP = 1
@ -12,12 +14,14 @@ local LEFT = 2
local RIGHT = 3
local DOWN = 4
local lockedDoorsAdded = false
-- BEGIN FUNCTIONS
local function matrix_coverage (matrix)
local cov = 0
for i=1,10 do
for j=1,10 do
if matrix[i][j].active then cov = cov + 1 end
if matrix[i][j] then cov = cov + 1 end
end
end
return cov
@ -36,82 +40,125 @@ local function generate_path ()
for i=1,10 do
map_matrix[i] = {}
for j=1,10 do
map_matrix[i][j] = room_builder.create_room()
map_matrix[i][j] = nil
end
end
local cx, cy = 1, 1
local seed = time();
local seed = get_random_seed(CURRENT_LEVEL)
info("Map generation seed: " .. seed)
randomseed(seed)
local direction = 0
local lastDirection = 0
local coridoor_count = 0
local coverage = 10
local shopLevel = CURRENT_LEVEL % 4 == 0
local bossLevel = CURRENT_LEVEL % 5 == 0
if QUICK_MODE then
bossLevel = CURRENT_LEVEL % 3 == 0
shopLevel = CURRENT_LEVEL % 2 == 0
end
local coverage = 8 + CURRENT_LEVEL
if bossLevel or CURRENT_LEVEL == 1 then
coverage = 5
end
if ARCADE_MODE then
coverage = 40
shopLevel = true
end
if shopLevel then
coverage = coverage + 1
end
-- Create the first room
map_matrix[cx][cy] = room_builder.create_empty_room()
while matrix_coverage(map_matrix) < coverage do
local direction = random(4)
if lastDirection > 0 then
if random(24) <= 6 then direction = lastDirection end
end
while lastDirection == reverse_direction(direction) do
direction = random(4)
end
map_matrix[cx][cy].active = true
if coridoor_count < coverage/3 then
if coridoor_count < coverage/2 then
if random(3) == 1 and (cx > 1 or cy > 1) then
map_matrix[cx][cy].type = "coridoor"
coridoor_count = coridoor_count + 1
end
end
valid_direction = false
if direction == UP and cy > 1 then -- UP
table.insert(map_matrix[cx][cy].exits, direction)
room_builder.add_exit(map_matrix[cx][cy], direction)
map_matrix[cx][cy].path_dir = direction
cy = cy - 1;
table.insert(map_matrix[cx][cy].exits, reverse_direction(direction))
cy = cy - 1
valid_direction = true
elseif direction == LEFT and cx > 1 then -- LEFT
table.insert(map_matrix[cx][cy].exits, direction)
room_builder.add_exit(map_matrix[cx][cy], direction)
map_matrix[cx][cy].path_dir = direction
cx = cx - 1;
table.insert(map_matrix[cx][cy].exits, reverse_direction(direction))
cx = cx - 1
valid_direction = true
elseif direction == RIGHT and cx < 10 then -- RIGHT
table.insert(map_matrix[cx][cy].exits, direction)
room_builder.add_exit(map_matrix[cx][cy], direction)
map_matrix[cx][cy].path_dir = direction
cx = cx + 1;
table.insert(map_matrix[cx][cy].exits, reverse_direction(direction))
cx = cx + 1
valid_direction = true
elseif direction == DOWN and cy < 10 then -- DOWN
table.insert(map_matrix[cx][cy].exits, direction)
room_builder.add_exit(map_matrix[cx][cy], direction)
map_matrix[cx][cy].path_dir = direction
cy = cy + 1;
table.insert(map_matrix[cx][cy].exits, reverse_direction(direction))
cy = cy + 1
valid_direction = true
end
-- Create the next room and add the reverse exit
-- if a valid direction was found
if valid_direction then
if not map_matrix[cx][cy] then
map_matrix[cx][cy] = room_builder.create_empty_room()
end
room_builder.add_exit(map_matrix[cx][cy], reverse_direction(direction))
end
lastDirection = direction
end
-- Last room rules
map_matrix[cx][cy].active = true
map_matrix[cx][cy].goal = true
map_matrix[cx][cy].type = "room"
return map_matrix;
end
local roomCount = 0
local bossAdded = false
local shopAdded = false
local function print_matrix(matrix)
-- Build all the rooms
for i=1,10 do
for j=1,10 do
if not map_matrix[j][i].goal then
io.write(map_matrix[j][i].path_dir .. " ")
else
io.write("G ")
room = map_matrix[i][j]
if room then
if roomCount > 4 and shopLevel and not shopAdded and not room.goal then
room.type = "shop"
shopAdded = true
elseif random(8) == 1 and not room.goal then
room.type = "locked"
lockedDoorsAdded = true
end
roomCount = roomCount + 1
room_builder.build_room(room, i-1, j-1)
if room.type ~= "shop" then
monster_gen.add_monsters_to_room(room, i-1, j-1)
trap_gen.add_traps_to_room(room, i-1, j-1)
chest_gen.add_chests_to_room(room, i-1, j-1)
else
monster_gen.add_shopkeeper_to_room(room, i-1, j-1)
if PlayerData.shopOwnerKiller then
monster_gen.add_bodyguard_to_room(room, i-1, j-1)
monster_gen.add_bodyguard_to_room(room, i-1, j-1)
end
end
if roomCount > 3 and bossLevel and not bossAdded then
bossAdded = true
monster_gen.add_boss_to_room(room, i-1, j-1)
end
end
end
io.write("\n")
end
return map_matrix;
end
-- END FUNCTIONS
@ -126,15 +173,17 @@ local map_matrix = generate_path()
for i=1,10 do
for j=1,10 do
local room = map_matrix[i][j]
if room.active then
if room then
set_current_room(map, i-1, j-1);
if room.type == "room" then
room_builder.build_square_room(map, room)
monster_gen.add_monster_to_room(map, i-1, j-1);
elseif room.type == "coridoor" then
room_builder.build_coridoor_room(map, room)
end
room_builder.load_room(map, room)
monster_gen.load_monsters(map, room.monsters)
trap_gen.load_traps(map, room.traps)
chest_gen.load_chests(map, room.chests)
end
end
end
if lockedDoorsAdded then
add_keybearers(map)
end
-- END SCRIPT

View File

@ -1,5 +1,6 @@
-- FUNCTIONS
local random = math.random
local random = map_random
local layoutparser = require "layoutparser"
-- CONSTANTS
local UP = 1
@ -28,18 +29,10 @@ local wall = {
horizontal = nil
}
local pits = {
center = nil,
top = nil,
left = nil,
right = nil,
topleft = nil,
topright = nil,
}
local special = { level_exit = nil }
local floorDecor = { }
local blockingFloorDecor = { }
local lightDecor = { }
local function load_decor_textures()
@ -49,9 +42,9 @@ local function load_decor_textures()
-- Skulls
table.insert(floorDecor, { td0, td1, 0, 12 * 16, false, false })
table.insert(floorDecor, { td0, td1, 32, 12 * 16, false, false })
table.insert(floorDecor, { td0, td1, 64, 12 * 16, false, true })
table.insert(floorDecor, { td0, td1, 0, 13 * 16, false, false })
table.insert(floorDecor, { td0, td1, 32, 13 * 16, false, false })
table.insert(floorDecor, { td0, td1, 64, 12 * 16, false, true })
table.insert(floorDecor, { td0, td1, 64, 13 * 16, false, true })
-- Bones
@ -60,42 +53,6 @@ local function load_decor_textures()
table.insert(floorDecor, { td0, td1, 16, 13 * 16, false, false })
table.insert(floorDecor, { td0, td1, 48, 13 * 16, false, false })
-- Urns
table.insert(floorDecor, { td0, td1, 0 * 16, 48, true, false })
table.insert(floorDecor, { td0, td1, 1 * 16, 48, true, false })
table.insert(floorDecor, { td0, td1, 2 * 16, 48, true, false })
table.insert(floorDecor, { td0, td1, 3 * 16, 48, true, false })
table.insert(floorDecor, { td0, td1, 4 * 16, 48, true, false })
table.insert(floorDecor, { td0, td1, 5 * 16, 48, true, false })
table.insert(floorDecor, { td0, td1, 6 * 16, 48, false, false })
table.insert(floorDecor, { td0, td1, 7 * 16, 48, false, false })
-- Racks
table.insert(floorDecor, { td0, td1, 0 * 16, 11 * 16, true, false })
table.insert(floorDecor, { td0, td1, 1 * 16, 11 * 16, true, false })
table.insert(floorDecor, { td0, td1, 2 * 16, 11 * 16, true, false })
table.insert(floorDecor, { td0, td1, 3 * 16, 11 * 16, true, false })
table.insert(floorDecor, { td0, td1, 4 * 16, 11 * 16, true, false })
table.insert(floorDecor, { td0, td1, 5 * 16, 11 * 16, true, false })
table.insert(floorDecor, { td0, td1, 6 * 16, 11 * 16, true, false })
-- Headstones
table.insert(floorDecor, { td0, td1, 0 * 16, 17 * 16, true, false })
table.insert(floorDecor, { td0, td1, 1 * 16, 17 * 16, true, false })
table.insert(floorDecor, { td0, td1, 2 * 16, 17 * 16, true, false })
table.insert(floorDecor, { td0, td1, 3 * 16, 17 * 16, true, false })
table.insert(floorDecor, { td0, td1, 4 * 16, 17 * 16, true, false })
table.insert(floorDecor, { td0, td1, 0 * 16, 18 * 16, true, false })
table.insert(floorDecor, { td0, td1, 1 * 16, 18 * 16, true, false })
table.insert(floorDecor, { td0, td1, 2 * 16, 18 * 16, true, false })
table.insert(floorDecor, { td0, td1, 3 * 16, 18 * 16, true, false })
table.insert(floorDecor, { td0, td1, 4 * 16, 18 * 16, true, false })
-- Altars
table.insert(floorDecor, { td0, td1, 0 * 16, 20 * 16, true, false })
table.insert(floorDecor, { td0, td1, 1 * 16, 20 * 16, true, false })
table.insert(floorDecor, { td0, td1, 2 * 16, 20 * 16, true, false })
-- Webs
--table.insert(floorDecor, { td0, td1, 0 * 16, 19 * 16, false })
--table.insert(floorDecor, { td0, td1, 1 * 16, 19 * 16, false })
@ -103,9 +60,47 @@ local function load_decor_textures()
--table.insert(floorDecor, { td0, td1, 3 * 16, 19 * 16, false })
--table.insert(floorDecor, { td0, td1, 4 * 16, 19 * 16, false })
-- Urns
table.insert(floorDecor, { td0, td1, 6 * 16, 48, false, false })
table.insert(floorDecor, { td0, td1, 7 * 16, 48, false, false })
-- Urns
--table.insert(blockingFloorDecor, { td0, td1, 0 * 16, 48, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 1 * 16, 48, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 2 * 16, 48, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 3 * 16, 48, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 4 * 16, 48, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 5 * 16, 48, true, false })
-- Racks
--table.insert(blockingFloorDecor, { td0, td1, 0 * 16, 11 * 16, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 1 * 16, 11 * 16, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 2 * 16, 11 * 16, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 3 * 16, 11 * 16, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 4 * 16, 11 * 16, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 5 * 16, 11 * 16, true, false })
--table.insert(blockingFloorDecor, { td0, td1, 6 * 16, 11 * 16, true, false })
-- Headstones
table.insert(blockingFloorDecor, { td0, td1, 0 * 16, 17 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 1 * 16, 17 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 2 * 16, 17 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 3 * 16, 17 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 4 * 16, 17 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 0 * 16, 18 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 1 * 16, 18 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 2 * 16, 18 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 3 * 16, 18 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 4 * 16, 18 * 16, true, false })
-- Altars
table.insert(blockingFloorDecor, { td0, td1, 0 * 16, 20 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 1 * 16, 20 * 16, true, false })
table.insert(blockingFloorDecor, { td0, td1, 2 * 16, 20 * 16, true, false })
-- Statues
--table.insert(floorDecor, { td0, td1, 3 * 16, 20 * 16, true })
--table.insert(floorDecor, { td0, td1, 4 * 16, 20 * 16, true })
--table.insert(blockingFloorDecor, { td0, td1, 3 * 16, 20 * 16, true })
--table.insert(blockingFloorDecor, { td0, td1, 4 * 16, 20 * 16, true })
lightDecor.candle0 = { td0, td1, 0, 8 * 16, false, true }
lightDecor.candle1 = { td0, td1, 16, 8 * 16, false, true }
@ -126,284 +121,225 @@ local function repack(data)
isCollider = data[5] or false,
isLightSource = data[6] or false,
isLevelExit = data[7] or false,
isLethal = data[8] or false
isLethal = data[8] or false,
lockType = data[9] or 0
}
end
local function check_add_decoration(map, x, y, data)
if tile_occupied(map, x, y) then
return false
end
add_decoration(map, x, y, repack(data))
return true
local function room_tile_available(room, rx, ry)
return not room.chests[rx][ry]
and not room.traps[rx][ry]
and not room.walls[rx][ry]
and not room.doors[rx][ry]
and not room.monsters[rx][ry]
and not room.decor[rx][ry]
and (room.tiles[rx][ry]
and not room.tiles[rx][ry][5]
and not room.tiles[rx][ry][7]
and not room.tiles[rx][ry][8])
end
local function check_add_tile(map, x, y, data)
if tile_occupied(map, x, y) then
return false
end
add_tile(map, x, y, repack(data))
return true
end
local function add_random_decor_to_room(map)
local decor_count = random(4) - 1
local function add_random_decor_to_room(room, blockingDecor)
local decor_count = random(8)
if blockingDecor then
decor_count = random(4)
end
for i=1,decor_count do
check_add_decoration(map, random(11)+1, random(8)+1, floorDecor[random(#floorDecor)])
end
end
local function add_pits_to_room(map)
if CURRENT_LEVEL < 2 then
return
elseif random(5) ~= 1 then
return
end
local pitdata = read_file("pitlayouts.dat")
local cleanData = ""
for i=1, #pitdata do
local c = pitdata:sub(i+1, i+1)
if c == "#" or c == "-" then
cleanData = cleanData .. c
end
end
local matrix = {}
for i=0, #cleanData-1 do
local c = cleanData:sub(i, i)
local col = i % 16
local row = (i - col)/16
local layout = 1 + (row - (row % 12))/12
local row = row % 12
if not matrix[layout] then matrix[layout] = {} end
if not matrix[layout][col] then matrix[layout][col] = {} end
if c == "#" then
matrix[layout][col][row] = true
elseif c == "-" then
matrix[layout][col][row] = false
end
end
print(#matrix)
matrix = matrix[random(#matrix)]
for i=0, 11 do
for j=0, 15 do
if matrix[j][i] then
io.write("#")
else
io.write("-")
local success = false
while not success do
x = random(11) + 1
y = random(8) + 1
if room_tile_available(room, x, y) then
room.decor[x][y] = floorDecor[random(#floorDecor)]
success = true
end
end
io.write("\n")
end
for i=2,13 do
for j=2,10 do
if not tile_occupied(map, (i), (j)) and matrix[i][j] then
if not matrix[i-1][j-1] and not matrix[i+1][j-1] and matrix[i-1][j] and matrix[i+1][j] and matrix[i][j-1] then
add_tile(map, i, j, repack(pits.innermid))
elseif not matrix[i-1][j-1] and matrix[i-1][j] and matrix[i][j-1] then
add_tile(map, i, j, repack(pits.innerleft))
elseif not matrix[i+1][j-1] and matrix[i+1][j] and matrix[i][j-1] then
add_tile(map, i, j, repack(pits.innerright))
elseif not matrix[i-1][j] and not matrix[i][j-1] and not matrix[i+1][j] then
add_tile(map, i, j, repack(pits.topcrevice))
elseif not matrix[i-1][j] and not matrix[i+1][j] then
add_tile(map, i, j, repack(pits.bottomcrevice))
elseif not matrix[i-1][j] and not matrix[i][j-1] then
add_tile(map, i, j, repack(pits.topleft))
elseif not matrix[i+1][j] and not matrix[i][j-1] then
add_tile(map, i, j, repack(pits.topright))
elseif not matrix[i-1][j] then
add_tile(map, i, j, repack(pits.left))
elseif not matrix[i+1][j] then
add_tile(map, i, j, repack(pits.right))
elseif not matrix[i][j-1] then
add_tile(map, i, j, repack(pits.top))
else
add_tile(map, i, j, repack(pits.center))
if blockingDecor then
decor_count = random(4)
for i=1,decor_count do
local success = false
while not success do
x = random(11) + 1
y = random(8) + 1
if room_tile_available(room, x, y) then
room.decor[x][y] = blockingFloorDecor[random(#blockingFloorDecor)]
success = true
end
end
end
end
if blockingDecor then
if random(2) == 1 and room_tile_available(room, 4, 3) then
room.decor[4][3] = lightDecor.candle2
end
if random(2) == 1 and room_tile_available(room, 11, 3) then
room.decor[11][3] = lightDecor.candle2
end
if random(2) == 1 and room_tile_available(room, 4, 9) then
room.decor[4][9] = lightDecor.candle2
end
if random(2) == 1 and room_tile_available(room, 11, 9) then
room.decor[11][9] = lightDecor.candle2
end
end
end
local function add_tiles_to_room (map)
local function add_tiles_to_room (room, singletile)
for i=0,15 do
for j=0,11 do
if (i >= 1 and i <= 14 and j >= 1 and j <= 10) then
if (i == 1 and j == 1) then
add_tile(map, i, j, repack(floor.topleft))
room.tiles[i][j] = singletile and floor.single or floor.topleft
elseif (i == 14 and j == 1) then
add_tile(map, i, j, repack(floor.topright))
room.tiles[i][j] = singletile and floor.single or floor.topright
elseif (i == 1 and j == 10) then
add_tile(map, i, j, repack(floor.bottomleft))
room.tiles[i][j] = singletile and floor.single or floor.bottomleft
elseif (i == 14 and j == 10) then
add_tile(map, i, j, repack(floor.bottomright))
room.tiles[i][j] = singletile and floor.single or floor.bottomright
elseif (i == 1) then
add_tile(map, i, j, repack(floor.left))
room.tiles[i][j] = singletile and floor.single or floor.left
elseif (i == 14) then
add_tile(map, i, j, repack(floor.right))
room.tiles[i][j] = singletile and floor.single or floor.right
elseif (j == 1) then
add_tile(map, i, j, repack(floor.top))
room.tiles[i][j] = singletile and floor.single or floor.top
elseif (j == 10) then
add_tile(map, i, j, repack(floor.bottom))
room.tiles[i][j] = singletile and floor.single or floor.bottom
else
add_tile(map, i, j, repack(floor.center))
room.tiles[i][j] = singletile and floor.single or floor.center
end
else
room.tiles[i][j] = floor.single
end
end
end
add_random_decor_to_room(map)
add_pits_to_room(map)
end
local function add_walls_to_room (map)
local function add_walls_to_room (room)
for i=0,15 do
for j=0,11 do
if (i == 0 and j == 0) then
add_tile(map, i, j, repack(wall.topleft))
room.walls[i][j] = wall.topleft
elseif (i == 15 and j == 0) then
add_tile(map, i, j, repack(wall.topright))
room.walls[i][j] = wall.topright
elseif (i == 0 and j == 11) then
add_tile(map, i, j, repack(wall.bottomleft))
room.walls[i][j] = wall.bottomleft
elseif (i == 15 and j == 11) then
add_tile(map, i, j, repack(wall.bottomright))
room.walls[i][j] = wall.bottomright
elseif (i == 0 or i == 15) then
add_tile(map, i, j, repack(wall.vertical))
room.walls[i][j] = wall.vertical
elseif (j == 0 or j == 11) then
add_tile(map, i, j, repack(wall.horizontal))
room.walls[i][j] = wall.horizontal
end
end
end
if random(2) == 1 then
check_add_decoration(map, 4, 3, lightDecor.candle2)
end
if random(2) == 1 then
check_add_decoration(map, 11, 3, lightDecor.candle2)
end
if random(2) == 1 then
check_add_decoration(map, 4, 9, lightDecor.candle2)
end
if random(2) == 1 then
check_add_decoration(map, 11, 9, lightDecor.candle2)
end
end
local function add_exit(map, direction)
if direction > 4 then return end
if direction == UP then
add_tile(map, 6, 0, repack(wall.bottomright))
add_tile(map, 7, 0, repack(floor.singleleft))
add_tile(map, 8, 0, repack(floor.singleright))
add_tile(map, 9, 0, repack(wall.bottomleft))
elseif direction == LEFT then
add_tile(map, 0, 4, repack(wall.bottomright))
add_tile(map, 0, 5, repack(floor.singletop))
add_tile(map, 0, 6, repack(floor.singlebottom))
add_tile(map, 0, 7, repack(wall.topright))
elseif direction == RIGHT then
add_tile(map, 15, 4, repack(wall.bottomleft))
add_tile(map, 15, 5, repack(floor.singletop))
add_tile(map, 15, 6, repack(floor.singlebottom))
add_tile(map, 15, 7, repack(wall.topleft))
elseif direction == DOWN then
add_tile(map, 6, 11, repack(wall.topright))
add_tile(map, 7, 11, repack(floor.singleleft))
add_tile(map, 8, 11, repack(floor.singleright))
add_tile(map, 9, 11, repack(wall.topleft))
end
end
local function add_level_exit(map)
success = false
while not success do
x = random(14)
y = random(10)
success = check_add_tile(map, x, y, special.level_exit)
end
end
local function build_vert_center_coridoor(map, offset)
for j=0,4 do
add_tile(map, 6, offset+j, repack(wall.vertical));
add_tile(map, 7, offset+j, repack(floor.center));
add_tile(map, 8, offset+j, repack(floor.center));
add_tile(map, 9, offset+j, repack(wall.vertical));
local function build_vert_center_coridoor(room, offset)
for i=0,4 do
room.walls[6][offset+i] = wall.vertical
room.tiles[7][offset+i] = floor.center
room.tiles[8][offset+i] = floor.center
room.walls[7][offset+i] = nil
room.walls[8][offset+i] = nil
room.walls[9][offset+i] = wall.vertical
end
if random(2) == 1 then
add_decoration(map, 6, offset + 2, repack(lightDecor.candle1))
room.decor[6][offset+2] = lightDecor.candle1
end
if random(2) == 1 then
add_decoration(map, 9, offset + 2, repack(lightDecor.candle1))
room.decor[6][offset+2] = lightDecor.candle1
end
end
local function build_horiz_center_coridoor(map, offset)
local function build_horiz_center_coridoor(room, offset)
for i=0,6 do
add_tile(map, offset+i, 4, repack(wall.horizontal));
add_tile(map, offset+i, 5, repack(floor.center));
add_tile(map, offset+i, 6, repack(floor.center));
add_tile(map, offset+i, 7, repack(wall.horizontal));
room.walls[offset+i][4] = wall.horizontal
room.tiles[offset+i][5] = floor.center
room.tiles[offset+i][6] = floor.center
room.walls[offset+i][5] = nil
room.walls[offset+i][6] = nil
room.walls[offset+i][7] = wall.horizontal
end
if random(2) == 1 then
check_add_decoration(map, offset+3, 4, lightDecor.candle1)
room.decor[offset+3][4] = lightDecor.candle1
end
if random(2) == 1 then
check_add_decoration(map, offset+3, 7, lightDecor.candle1)
room.decor[offset+3][7] = lightDecor.candle1
end
end
local function build_center_corner_walls(map, exits)
local function build_center_corner_walls(room, exits)
if exits.down then
if exits.left then
add_tile(map, 6, 7, repack(wall.topright))
room.walls[6][7] = wall.topright
end
if exits.right then
add_tile(map, 9, 7, repack(wall.topleft))
room.walls[9][7] = wall.topleft
end
else
if not exits.left then
add_tile(map, 6, 7, repack(wall.bottomleft))
room.walls[6][7] = wall.bottomleft
end
if not exits.right then
add_tile(map, 9, 7, repack(wall.bottomright))
room.walls[9][7] = wall.bottomright
end
end
if exits.up then
if exits.left then
add_tile(map, 6, 4, repack(wall.bottomright))
room.walls[6][4] = wall.bottomright
end
if exits.right then
add_tile(map, 9, 4, repack(wall.bottomleft))
room.walls[9][4] = wall.bottomleft
end
else
if not exits.left then
add_tile(map, 6, 4, repack(wall.topleft))
room.walls[6][4] = wall.topleft
end
if not exits.right then
add_tile(map, 9, 4, repack(wall.topright))
room.walls[9][4] = wall.topright
end
end
end
local module = {}
function module.add_full_lighting(map)
check_add_decoration(map, 4, 3, lightDecor.candle2)
check_add_decoration(map, 11, 3, lightDecor.candle2)
check_add_decoration(map, 4, 9, lightDecor.candle2)
check_add_decoration(map, 11, 9, lightDecor.candle2)
local function add_exits_to_room(room)
for _,direction in ipairs(room.exits) do
if direction == UP then
room.walls[6][0] = wall.bottomright
room.tiles[7][0] = floor.singleleft
room.tiles[8][0] = floor.singleright
room.walls[7][0] = nil
room.walls[8][0] = nil
room.walls[9][0] = wall.bottomleft
elseif direction == LEFT then
room.walls[0][4] = wall.bottomright
room.tiles[0][5] = floor.singletop
room.tiles[0][6] = floor.singlebottom
room.walls[0][5] = nil
room.walls[0][6] = nil
room.walls[0][7] = wall.topright
elseif direction == RIGHT then
room.walls[15][4] = wall.bottomleft
room.tiles[15][5] = floor.singletop
room.tiles[15][6] = floor.singlebottom
room.walls[15][5] = nil
room.walls[15][6] = nil
room.walls[15][7] = wall.topleft
elseif direction == DOWN then
room.walls[6][11] = wall.topright
room.tiles[7][11] = floor.singleleft
room.tiles[8][11] = floor.singleright
room.walls[7][11] = nil
room.walls[8][11] = nil
room.walls[9][11] = wall.topleft
end
end
end
function module.build_coridoor_room(map, room)
local function build_coridoor_room(room)
local exits = {
up = false,
down = false,
@ -420,64 +356,203 @@ function module.build_coridoor_room(map, room)
end
-- Fill the center
add_tile(map, 6, 5, repack(wall.vertical))
add_tile(map, 6, 6, repack(wall.vertical))
add_tile(map, 7, 4, repack(wall.horizontal))
add_tile(map, 7, 5, repack(floor.center))
add_tile(map, 7, 6, repack(floor.center))
add_tile(map, 7, 7, repack(wall.horizontal))
add_tile(map, 8, 4, repack(wall.horizontal))
add_tile(map, 8, 5, repack(floor.center))
add_tile(map, 8, 6, repack(floor.center))
add_tile(map, 8, 7, repack(wall.horizontal))
add_tile(map, 9, 5, repack(wall.vertical))
add_tile(map, 9, 6, repack(wall.vertical))
room.tiles[7][5] = floor.center
room.tiles[7][6] = floor.center
room.tiles[8][5] = floor.center
room.tiles[8][6] = floor.center
room.walls[6][5] = wall.vertical
room.walls[6][6] = wall.vertical
room.walls[7][4] = wall.horizontal
room.walls[7][7] = wall.horizontal
room.walls[8][4] = wall.horizontal
room.walls[8][7] = wall.horizontal
room.walls[9][5] = wall.vertical
room.walls[9][6] = wall.vertical
-- Build the coridoors
if exits.down then build_vert_center_coridoor(map, 7) end
if exits.up then build_vert_center_coridoor(map, 0) end
if exits.left then build_horiz_center_coridoor(map, 0) end
if exits.right then build_horiz_center_coridoor(map, 9) end
if exits.down then build_vert_center_coridoor(room, 7) end
if exits.up then build_vert_center_coridoor(room, 0) end
if exits.left then build_horiz_center_coridoor(room, 0) end
if exits.right then build_horiz_center_coridoor(room, 9) end
build_center_corner_walls(map, exits)
build_center_corner_walls(room, exits)
end
function module.create_room ()
return {
local function add_level_exit(room)
local success = false
while not success do
x = random(14)
y = random(10)
if room_tile_available(room, x, y) then
success = true
room.tiles[x][y] = special.level_exit
end
end
end
local function build_shop_room(room, roomx, roomy)
add_tiles_to_room(room, false)
add_walls_to_room(room)
add_exits_to_room(room)
layoutparser.add_shop_layout(room, roomx, roomy)
return room
end
local function build_locked_room(room, roomx, roomy)
add_tiles_to_room(room, false)
add_walls_to_room(room)
add_exits_to_room(room)
layoutparser.add_locked_room_layout(room, roomx, roomy)
return room
end
local function build_normal_room(room)
local crumbling = (CURRENT_LEVEL > 3 or QUICK_MODE) and random(8) == 1
local pitsAdded = false;
local interiorWallsAdded = false
add_tiles_to_room(room, crumbling)
add_walls_to_room(room)
add_exits_to_room(room)
if not crumbling then
pitsAdded = layoutparser.add_pits_to_room(room)
end
if not pitsAdded and (not crumbling or CURRENT_LEVEL > 3) then
interiorWallsAdded = layoutparser.add_walls_to_room(room)
end
add_random_decor_to_room(room, not interiorWallsAdded)
if room.goal then
add_level_exit(room)
end
if crumbling then
room.modifier.type = "CRUMBLING"
room.modifier.arg = ""
elseif (CURRENT_LEVEL > 3 or QUICK_MODE) and random(8) == 1 then
room.modifier.type = "FIRE"
room.modifier.arg = ""
elseif ((not pitsAdded and not crumbling and (CURRENT_LEVEL > 1 or QUICK_MODE)) or CURRENT_LEVEL > 3) and random(8) == 1 then
directions = { "LEFT", "RIGHT", "UP", "DOWN" }
room.modifier.type = "WINDY"
room.modifier.arg = directions[random(#directions)]
end
return room
end
local module = {}
function module.add_exit(room, direction)
if direction > 4 then
return
end
table.insert(room.exits, direction)
end
function module.add_full_lighting(room)
room.decor[4][3] = lightDecor.candle2
room.decor[11][3] = lightDecor.candle2
room.decor[4][9] = lightDecor.candle2
room.decor[11][9] = lightDecor.candle2
end
function module.is_tile_avilable(room, rx, ry)
return room_tile_available(room, rx, ry);
end
function module.create_empty_room()
room = {
exits = {},
active = false,
goal = false,
path_dir = 0,
type = "room"
type = "room",
tiles = {},
walls = {},
doors = {},
decor = {},
modifier = {
type = nil,
arg = nil
},
monsters = {},
chests = {},
traps = {}
}
for i=0,15 do
room.tiles[i] = {}
room.walls[i] = {}
room.doors[i] = {}
room.decor[i] = {}
room.monsters[i] = {}
room.traps[i] = {}
room.chests[i] = {}
for j=0,11 do
room.tiles[i][j] = nil
room.walls[i][j] = nil
room.doors[i][j] = nil
room.decor[i][j] = nil
room.monsters[i][j] = nil
room.traps[i][j] = nil
room.chests[i][j] = nil
end
end
return room
end
function module.build_square_room(map, room)
add_tiles_to_room(map);
add_walls_to_room(map);
for exit=1, #room.exits do
add_exit(map, room.exits[exit]);
end
if room.goal then
add_level_exit(map);
function module.build_room(room, roomx, roomy)
if room.type == "coridoor" then
build_coridoor_room(room)
elseif room.type == "shop" then
build_shop_room(room, roomx, roomy)
elseif room.type == "locked" then
build_locked_room(room, roomx, roomy)
else
build_normal_room(room)
--build_locked_room(room, roomx, roomy)
end
end
if CURRENT_LEVEL > 3 and random(10) == 1 then
directions = { "LEFT", "RIGHT", "UP", "DOWN" }
set_modifier(map, "WINDY", directions[random(#directions)]);
function module.load_room(map, room)
for i=0, 15 do
for j=0, 11 do
if room.tiles[i][j] then
add_tile(map, i, j, repack(room.tiles[i][j]))
end
if room.walls[i][j] then
add_wall(map, i, j, repack(room.walls[i][j]))
end
if room.doors[i][j] then
add_door(map, i, j, repack(room.doors[i][j]))
end
if room.decor[i][j] then
add_decoration(map, i, j, repack(room.decor[i][j]))
end
end
end
if room.modifier.type then
set_modifier(map, room.modifier.type, room.modifier.arg)
end
end
function module.load_textures(map)
t_floor = add_texture(map, "Objects/Floor.png")
t_wall = add_texture(map, "Objects/Wall.png")
t_pit0 = add_texture(map, "Objects/Pit0.png")
t_pit1 = add_texture(map, "Objects/Pit1.png")
math.randomseed(os.time())
local seed = get_random_seed(CURRENT_LEVEL);
info("Map room random seed: " .. seed)
map_randomseed(seed)
local xo = (random(3) - 1) * 112
local yo = (random(8)) * 48
layoutparser.load_textures(map, xo, yo)
floor.center = { t_floor, -1, xo + 16, yo + 16, false }
floor.top = { t_floor, -1, xo + 16, yo + 0, false }
floor.bottom = { t_floor, -1, xo + 16, yo + 32, false }
@ -491,19 +566,7 @@ function module.load_textures(map)
floor.singlebottom = { t_floor, -1, xo + 48, yo + 32, false }
floor.singleleft = { t_floor, -1, xo + 64, yo + 16, false }
floor.singleright = { t_floor, -1, xo + 96, yo + 16, false }
local pit_yo = (random(5) + random(3)) * (16 * 2)
pits.topleft = { t_pit0, t_pit1, 0, pit_yo, false, false, false, true }
pits.top = { t_pit0, t_pit1, 16, pit_yo, false, false, false, true }
pits.topright = { t_pit0, t_pit1, 32, pit_yo, false, false, false, true }
pits.left = { t_pit0, t_pit1, 0, pit_yo + 16, false, false, false, true }
pits.center = { t_pit0, t_pit1, 16, pit_yo + 16, false, false, false, true }
pits.right = { t_pit0, t_pit1, 32, pit_yo + 16, false, false, false, true }
pits.innerleft = { t_pit0, t_pit1, 80, pit_yo, false, false, false, true }
pits.innermid = { t_pit0, t_pit1, 96, pit_yo, false, false, false, true }
pits.innerright = { t_pit0, t_pit1, 112, pit_yo, false, false, false, true }
pits.topcrevice = { t_pit0, t_pit1, 64, pit_yo, false, false, false, true }
pits.bottomcrevice = { t_pit0, t_pit1, 64, pit_yo + 16, false, false, false, true }
floor.single = { t_floor, -1, xo + 80, yo + 0, false }
wall.topleft = { t_wall, -1, xo + 0, yo + 0, true }
wall.topright = { t_wall, -1, xo + 32, yo + 0, true }

View File

@ -1,12 +1,20 @@
local room_builder = require "maproombuilder"
local monster_gen = require "monstergen"
local trap_gen = require "trapgen"
local chest_gen = require "chestgen"
map = create_map(CURRENT_LEVEL) -- 'map' needs to be global
room_builder.load_textures(map)
local room = room_builder.create_room()
set_current_room(map, 0, 0)
room_builder.build_square_room(map, room)
monster_gen.add_monster_to_room(map, 0, 0);
room_builder.add_full_lighting(map);
local room = room_builder.create_empty_room()
room_builder.build_room(room, 0, 0)
room_builder.add_full_lighting(room)
monster_gen.add_monsters_to_room(room, 0, 0)
trap_gen.add_traps_to_room(room, 0, 0)
chest_gen.add_chests_to_room(room, 0, 0)
room_builder.load_room(map, room)
monster_gen.load_monsters(map, room.monsters)
trap_gen.load_traps(map, room.traps)
chest_gen.load_chests(map, room.chests)

View File

@ -1,5 +1,6 @@
local room_builder = require "maproombuilder"
local module = {}
local random = math.random
local random = map_random
local texturePaths = {
aquatic0 = "Characters/Aquatic0.png",
@ -37,10 +38,16 @@ local texturePaths = {
}
local state = {
passive = 0,
agressive = 1,
scared = 2,
local behaviour = {
pacifist = 0,
normal = 1,
hostile = 2,
guerilla = 3,
coward = 4,
sentinel = 5,
fire_demon = 6,
sorcerer = 7,
assassin = 8
}
local stats = {
@ -58,6 +65,13 @@ local stats = {
def = 0,
speed = 1
},
misc = {
hp = 18,
dmg = 2,
atk = 0,
def = 0,
speed = 1
},
dog = {
hp = 12,
dmg = 2,
@ -72,123 +86,34 @@ local stats = {
def = 0,
speed = 1
},
platino = {
orc = {
hp = 20,
dmg = 2,
atk = 0,
def = 0,
speed = 1
},
boss = {
hp = 60,
dmg = 60,
atk = 60,
def = 60,
speed = 3
}
}
local pests = {
-- PESTS
--{ texturePaths.pest0, texturePaths.pest1, stats.pest, 0, 0, "A Beetle" },
--{ texturePaths.pest0, texturePaths.pest1, stats.pest, 16, 0, "A Beetle" },
--{ texturePaths.pest0, texturePaths.pest1, stats.pest, 32, 0, "A Beetle" },
--{ texturePaths.pest0, texturePaths.pest1, stats.pest, 48, 0, "A Beetle" },
--{ texturePaths.pest0, texturePaths.pest1, stats.pest, 64, 0, "A Large Grub" },
--{ texturePaths.pest0, texturePaths.pest1, stats.pest, 80, 0, "A Small Grub" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 96, 0, "A Slim Worm" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 112, 0, "A Fat Worm" },
--{ texturePaths.pest0, texturePaths.pest1, 0, 16, "Female Dragonfly" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 16, 16, "A Fly" },
--{ texturePaths.pest0, texturePaths.pest1, stats.pest, 32, 16, "A Larva" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 48, 16, "A Moth" },
--{ texturePaths.pest0, texturePaths.pest1, stats.pest, 64, 16 },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 80, 16, "A Gnat" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 0, 32, "A Small Spider" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 16, 32, "A Medium Spider" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 32, 32, "A Large Spider" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 48, 32, "A Small Scorpion" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 64, 32, "A Medium Scorpion" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 80, 32, "A Large Scorpion" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 0, 48, "A Slug" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 16, 48, "A Large Slug" },
--{ texturePaths.pest0, texturePaths.pest1, 32, 48 },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 48, 48, "A Red Slug" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 64, 48, "A Large Red Slug" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 0, 64, "A Giant Brown Ant" },
{ texturePaths.pest0, texturePaths.pest1, stats.pest, 16, 64, "A Giant Black Ant" },
--{ texturePaths.pest0, texturePaths.pest1, stats.pest, 32, 64, "A Giant Gold Ant" },
--{ texturePaths.pest0, texturePaths.pest1, stats.pest, 48, 64, "A Giant Silver Ant" },
--{ texturePaths.pest0, texturePaths.pest1, 0, 80 },
--{ texturePaths.pest0, texturePaths.pest1, 16, 80 },
--{ texturePaths.pest0, texturePaths.pest1, 32, 80 },
--{ texturePaths.pest0, texturePaths.pest1, 48, 80 },
--{ texturePaths.pest0, texturePaths.pest1, 0, 96 },
--{ texturePaths.pest0, texturePaths.pest1, 16, 96 },
--{ texturePaths.pest0, texturePaths.pest1, 32, 96 },
--{ texturePaths.pest0, texturePaths.pest1, 0, 112 },
--{ texturePaths.pest0, texturePaths.pest1, 16, 112 },
--{ texturePaths.pest0, texturePaths.pest1, 32, 112 },
--{ texturePaths.pest0, texturePaths.pest1, 48, 112 },
}
local undead = {
-- UNDEAD
--{ texturePaths.undead0, texturePaths.undead1, 0, 0, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 16, 0, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 32, 0, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 48, 0, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 64, 0, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 80, 0, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 96, 0, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 112, 0, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 0, 16, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 16, 16, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 32, 16, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 48, 16, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 64, 16, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 80, 16, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 96, 16, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 112, 16, "", state.passive, state.agressive };
{ texturePaths.undead0, texturePaths.undead1, stats.undead, 0, 32, "A Skeleton", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 16, 32, "An Umber Skeleton", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 32, 32, "A Caustic Skeleton", state.passive, state.agressive };
{ texturePaths.undead0, texturePaths.undead1, stats.undead, 48, 32, "A Black Skeleton", state.passive, state.agressive };
{ texturePaths.undead0, texturePaths.undead1, stats.undead, 64, 32, "A Zombie", state.passive, state.agressive };
{ texturePaths.undead0, texturePaths.undead1, stats.undead, 80, 32, "A Zombie", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 96, 32, "", state.passive, state.agressive };
--{ texturePaths.undead0, texturePaths.undead1, 112, 32, "", state.passive, state.scared };
}
local dogs = {
{ texturePaths.dog0, texturePaths.dog1, stats.dog, 0, 16, "A Rabid Dog", state.passive, state.agressive };
{ texturePaths.dog0, texturePaths.dog1, stats.dog, 16, 16, "An Angry Rabid Dog", state.agressive, state.agressive };
}
local reptile = {
{ texturePaths.reptile0, texturePaths.reptile1, stats.default, 0, 64, "A Small Brown Snake", state.passive, state.agressive };
{ texturePaths.reptile0, texturePaths.reptile1, stats.default, 16, 64, "A Medium Brown Snake", state.passive, state.agressive };
{ texturePaths.reptile0, texturePaths.reptile1, stats.default, 32, 64, "A Large Brown Snake", state.passive, state.agressive };
{ texturePaths.reptile0, texturePaths.reptile1, stats.default, 48, 64, "A Small Black Snake", state.agressive, state.agressive };
{ texturePaths.reptile0, texturePaths.reptile1, stats.default, 64, 64, "A Medium Black Snake", state.agressive, state.agressive };
{ texturePaths.reptile0, texturePaths.reptile1, stats.default, 80, 64, "A Large Black Snake", state.agressive, state.agressive };
}
local platino = {
{ texturePaths.reptile0, texturePaths.reptile1, stats.platino, 48, 12*16, "Platino", state.agressive, state.agressive };
}
local demon = {
{ texturePaths.demon0, texturePaths.demon1, stats.default, 0, 0, "A Demon", state.agressive, state.agressive };
{ texturePaths.demon0, texturePaths.demon1, stats.default, 16, 0, "A Demon", state.agressive, state.agressive };
{ texturePaths.demon0, texturePaths.demon1, stats.default, 32, 0, "A Demon", state.agressive, state.agressive };
{ texturePaths.demon0, texturePaths.demon1, stats.default, 48, 0, "A Demon", state.agressive, state.agressive };
{ texturePaths.demon0, texturePaths.demon1, stats.default, 64, 0, "A Demon", state.agressive, state.agressive };
{ texturePaths.demon0, texturePaths.demon1, stats.default, 80, 0, "A Demon", state.agressive, state.agressive };
{ texturePaths.demon0, texturePaths.demon1, stats.default, 96, 0, "A Demon", state.agressive, state.agressive };
{ texturePaths.demon0, texturePaths.demon1, stats.default, 112, 0, "A Demon", state.agressive, state.agressive };
dmg = 3,
atk = 1,
def = 0,
speed = 1
},
platino = {
hp = 90,
dmg = 1,
atk = 0,
def = 0,
speed = 1
},
shopkeeper = {
hp = 200,
dmg = 10,
atk = 2,
def = 0,
speed = 1
},
}
local function concat(table1, table2)
@ -198,6 +123,209 @@ local function concat(table1, table2)
return table1
end
local pests = {
{ stats.pest, 96, 0, "A Slim Worm", behaviour.pacifist },
{ stats.pest, 112, 0, "A Fat Worm", behaviour.pacifist },
{ stats.pest, 16, 16, "A Fly", behaviour.pacifist },
{ stats.pest, 48, 16, "A Moth", behaviour.pacifist },
{ stats.pest, 80, 16, "A Gnat", behaviour.pacifist },
{ stats.pest, 0, 32, "A Small Spider", behaviour.pacifist },
{ stats.pest, 16, 32, "A Medium Spider", behaviour.pacifist },
{ stats.pest, 32, 32, "A Large Spider", behaviour.pacifist },
{ stats.pest, 48, 32, "A Small Scorpion", behaviour.pacifist },
{ stats.pest, 64, 32, "A Medium Scorpion", behaviour.pacifist },
{ stats.pest, 80, 32, "A Large Scorpion", behaviour.pacifist },
{ stats.pest, 0, 48, "A Slug", behaviour.pacifist },
{ stats.pest, 16, 48, "A Large Slug", behaviour.pacifist },
{ stats.pest, 48, 48, "A Red Slug", behaviour.pacifist },
{ stats.pest, 64, 48, "A Large Red Slug", behaviour.pacifist },
{ stats.pest, 0, 64, "A Giant Brown Ant", behaviour.pacifist },
{ stats.pest, 16, 64, "A Giant Black Ant", behaviour.pacifist },
}
for i=1,#pests do
pests[i] = concat({ texturePaths.pest0, texturePaths.pest1 }, pests[i])
end
local avian = {
{ stats.default, 0, 11*16, "A Small Brown Bat", behaviour.pacifist },
{ stats.default, 16, 11*16, "A Big Brown Bat", behaviour.normal },
{ stats.default, 32, 11*16, "A Vampire Bat", behaviour.guerilla },
{ stats.default, 48, 11*16, "A Rabid Bat", behaviour.hostile },
}
for i=1,#avian do
avian[i] = concat({ texturePaths.avian0, texturePaths.avian1 }, avian[i])
end
local misc = {
{ stats.misc, 0, 0, "A Giant Black Rat", behaviour.sentinel },
{ stats.misc, 16, 0, "A Giant White Rat", behaviour.sentinel },
{ stats.misc, 64, 0, "An Owl Bear", behaviour.sentinel },
}
for i=1,#misc do
misc[i] = concat({ texturePaths.misc0, texturePaths.misc1 }, misc[i])
end
local fairies = {
{ stats.misc, 0, 48, "A Fairy", behaviour.pacifist },
{ stats.misc, 16, 48, "A Fairy", behaviour.pacifist },
{ stats.misc, 32, 48, "A Fairy", behaviour.pacifist },
{ stats.misc, 48, 48, "A Fairy", behaviour.pacifist },
{ stats.misc, 64, 48, "A Fairy", behaviour.pacifist },
{ stats.misc, 80, 48, "A Fairy", behaviour.pacifist },
}
for i=1,#fairies do
fairies[i] = concat({ texturePaths.humanoid0, texturePaths.humanoid1 }, fairies[i])
end
local reanimated = {
{ stats.undead, 0, 32, "A Skeleton", behaviour.normal },
{ stats.undead, 48, 32, "A Black Skeleton", behaviour.normal },
{ stats.undead, 64, 32, "A Zombie", behaviour.normal },
{ stats.undead, 80, 32, "A Zombie", behaviour.normal }
}
for i=1,#reanimated do
reanimated[i] = concat({ texturePaths.undead0, texturePaths.undead1 }, reanimated[i])
end
local undead = {
{ stats.undead, 5*16, 16, "A Mummy", behaviour.normal },
{ stats.undead, 6*16, 16, "A Two Headed Mummy", behaviour.sentinel },
{ stats.undead, 0*16, 32, "A Skeleton", behaviour.normal },
{ stats.misc, 1*16, 32, "A Burning Skeleton", behaviour.fire_demon },
{ stats.misc, 2*16, 32, "An Eldritch Skeleton", behaviour.sorcerer },
{ stats.misc, 3*16, 32, "A Black Skeleton", behaviour.guerilla },
{ stats.misc, 4*16, 32, "A Zombie", behaviour.coward },
{ stats.misc, 5*16, 32, "A Pale Zombie", behaviour.coward },
{ stats.misc, 7*16, 32, "A Scorched Zombie", behaviour.fire_demon },
{ stats.undead, 0*16, 4*16, "A Whight", behaviour.coward },
{ stats.undead, 1*16, 4*16, "A Ghast", behaviour.sentinel },
{ stats.misc, 1*16, 4*16, "A Ghost", behaviour.guerilla },
{ stats.misc, 0*16, 5*16, "A Spectre", behaviour.sentinel },
{ stats.undead, 1*16, 5*16, "An Eldritch Spectre", behaviour.sorcerer },
{ stats.undead, 2*16, 5*16, "A Scorched Spectre", behaviour.fire_demon },
}
for i=1,#undead do
undead[i] = concat({ texturePaths.undead0, texturePaths.undead1 }, undead[i])
end
local dogs = {
{ stats.dog, 0, 16, "A Rabid Dog", behaviour.normal },
{ stats.dog, 16, 16, "An Angry Rabid Dog", behaviour.hostile }
}
for i=1,#dogs do
dogs[i] = concat({ texturePaths.dog0, texturePaths.dog1 }, dogs[i])
end
local reptile = {
{ stats.default, 0, 64, "A Small Brown Snake", behaviour.coward },
{ stats.default, 16, 64, "A Medium Brown Snake", behaviour.guerilla },
{ stats.default, 32, 64, "A Large Brown Snake", behaviour.hostile },
{ stats.default, 48, 64, "A Small Black Snake", behaviour.coward },
{ stats.default, 64, 64, "A Medium Black Snake", behaviour.guerilla },
{ stats.default, 80, 64, "A Large Black Snake", behaviour.hostile },
}
for i=1,#reptile do
reptile[i] = concat({ texturePaths.reptile0, texturePaths.reptile1 }, reptile[i])
end
local demon = {
{ stats.default, 0, 0, "A Demon", behaviour.hostile },
{ stats.default, 16, 0, "A Demon", behaviour.hostile },
{ stats.default, 32, 0, "A Demon", behaviour.hostile },
{ stats.default, 48, 0, "A Demon", behaviour.hostile },
{ stats.default, 64, 0, "A Demon", behaviour.hostile },
{ stats.default, 80, 0, "A Demon", behaviour.hostile },
{ stats.default, 96, 0, "A Demon", behaviour.hostile },
{ stats.default, 112, 0, "A Demon", behaviour.hostile },
}
for i=1,#demon do
demon[i] = concat({ texturePaths.demon0, texturePaths.demon1 }, demon[i])
end
local orcs = {
{ stats.orc, 0, 4*16, "An Orc Guard", behaviour.normal },
{ stats.orc, 16, 4*16, "An Orc Seargeant", behaviour.coward },
{ stats.orc, 32, 4*16, "An Orc Militia", behaviour.hostile },
{ stats.orc, 48, 4*16, "An Orc Sentry", behaviour.sentinel },
{ stats.orc, 64, 4*16, "An Orc Brute", behaviour.guerilla },
{ stats.orc, 80, 4*16, "An Orc Captain", behaviour.hostile },
{ stats.orc, 96, 4*16, "An Orc Pyro", behaviour.fire_demon },
}
for i=1,#orcs do
orcs[i] = concat({ texturePaths.humanoid0, texturePaths.humanoid1 }, orcs[i])
end
local assassins = {
{ stats.misc, 1*16, 6*16, "A Reaper", behaviour.assassin },
{ stats.misc, 0*16, 7*16, "An Assassin", behaviour.assassin },
{ stats.misc, 1*16, 7*16, "A Royal Assassin", behaviour.assassin },
}
for i=1,#assassins do
assassins[i] = concat({ texturePaths.undead0, texturePaths.undead1 }, assassins[i])
end
local bosses = {
{ stats.boss, 16, 5*16, "The Hell Hound", behaviour.fire_demon, true },
{ stats.boss, 16, 23*16, "The Cleric", behaviour.sorcerer, true },
{ stats.boss, 16, 8*16, "The Shadow", behaviour.assassin, true },
}
bosses[1] = concat({ texturePaths.dog0, texturePaths.dog1 }, bosses[1])
bosses[2] = concat({ texturePaths.humanoid0, texturePaths.humanoid1 }, bosses[2])
bosses[3] = concat({ texturePaths.undead0, texturePaths.undead1 }, bosses[3])
local eastereggs = {
{ stats.misc, 6*16, 1*16, "Linus, the Developer", behaviour.passive },
{ stats.misc, 2*16, 3*16, "Lialynn, the Ranger", behaviour.passive },
{ stats.misc, 4*16, 3*16, "Miniel, the Paladin", behaviour.passive },
{ stats.misc, 2*16,12*16, "Feng, the Fighter", behaviour.passive },
{ stats.misc, 0*16, 7*16, "Adnis, the Ranger", behaviour.passive },
{ stats.misc, 7*16, 8*16, "Ti, the Mage", behaviour.passive },
}
for i=1,#eastereggs do
eastereggs[i] = concat({ texturePaths.player0, texturePaths.player1 }, eastereggs[i])
end
local shopkeeperBehaviour = behaviour.passive
if PlayerData.shopOwnerKiller then
shopkeeperBehaviour = behaviour.hostile
end
local shopkeeper = {
texturePaths.humanoid0,
texturePaths.humanoid1,
stats.shopkeeper,
16,
12*16,
"The Trader",
shopkeeperBehaviour
}
local bodyguard = {
texturePaths.humanoid0,
texturePaths.humanoid1,
stats.orc,
32,
12*16,
"A Bodyguard",
behaviour.hostile
}
-- Add Platino
table.insert(eastereggs, {
texturePaths.reptile0,
texturePaths.reptile1,
stats.platino,
48,
12*16,
"Platino",
behaviour.sentinel,
true
})
local function repack(data)
return {
texturePath1 = data[1],
@ -206,51 +334,151 @@ local function repack(data)
clipX = data[4],
clipY = data[5],
label = data[6] or "",
nstate = data[7] or state.passive,
cstate = data[8] or state.scared,
behaviour = data[7] or behaviour.normal,
boss = data[8] or false,
}
end
-- Begin script
local enemies = {}
if(CURRENT_LEVEL > 0 and CURRENT_LEVEL < 10) then
if(CURRENT_LEVEL > 0) then
if (CURRENT_LEVEL == 1) then
enemies = concat(enemies, pests)
enemies = concat(enemies, avian)
enemies = concat(enemies, misc)
enemies = concat(enemies, dogs)
elseif (CURRENT_LEVEL > 5) then
enemies = {}
enemies = concat(enemies, demon)
enemies = concat(enemies, undead)
enemies = concat(enemies, reptile)
elseif (CURRENT_LEVEL > 3) then
elseif (CURRENT_LEVEL > 15 or (QUICK_MODE and CURRENT_LEVEL > 9)) then
enemies = {}
enemies = concat(enemies, undead)
enemies = concat(enemies, reptile)
enemies = concat(enemies, dogs)
elseif (CURRENT_LEVEL > 2) then
enemies = concat(enemies, orcs)
enemies = concat(enemies, assassins)
elseif (CURRENT_LEVEL > 10 or (QUICK_MODE and CURRENT_LEVEL > 6)) then
enemies = {}
enemies = concat(enemies, undead)
enemies = concat(enemies, reptile)
enemies = concat(enemies, dogs)
enemies = concat(enemies, avian)
elseif (CURRENT_LEVEL > 5 or (QUICK_MODE and CURRENT_LEVEL > 3)) then
enemies = {}
enemies = concat(enemies, orcs)
enemies = concat(enemies, avian)
elseif (CURRENT_LEVEL > 1) then
enemies = {}
enemies = concat(enemies, undead)
enemies = concat(enemies, reanimated)
enemies = concat(enemies, reptile)
enemies = concat(enemies, avian)
enemies = concat(enemies, misc)
enemies = concat(enemies, dogs)
end
end
if random(100) == 1 then
enemies = concat(enemies, platino);
local addSpecialInLevel = random(100) == 1
local addFairyToLevel = random(3) == 1;
local function add_monster_to_tile(room, roomx, roomy, rx, ry, monster)
local x = (roomx * 512) + rx * 32
local y = (roomy * 384) + ry * 32
room.monsters[rx][ry] = {
x,
y,
monster
}
end
function module.add_monster_to_room(map, roomx, roomy)
function module.add_monsters_to_room(room, roomx, roomy)
local addSpecial = addSpecialInLevel and random(2) == 1
local addFairy = random(4) == 1
local count = random(3)
for i=0,count do
local x = (roomx * 512) + (random(13) + 1) * 32
local y = (roomy * 384) + (random(9) + 1) * 32
add_monster(map, x, y, repack(enemies[random(#enemies)]));
if (CURRENT_LEVEL > 3) then
count = random(4)
end
count = count + 1
local i = 0
while i < count do
local rx = random(13) + 1
local ry = random(9) + 1
if room_builder.is_tile_avilable(room, rx, ry) then
if addSpecial then
addSpecialInLevel = false
addSpecial = false
add_monster_to_tile(room, roomx, roomy, rx, ry, eastereggs[random(#eastereggs)])
elseif addFairyToLevel and addFairy then
addFairyToLevel = false
add_monster_to_tile(room, roomx, roomy, rx, ry, fairies[random(#fairies)])
else
add_monster_to_tile(room, roomx, roomy, rx, ry, enemies[random(#enemies)])
end
i = i + 1
end
end
end
function module.add_boss_to_room(room, roomx, roomy)
local boss = bosses[CURRENT_LEVEL / 5]
if QUICK_MODE then
boss = bosses[CURRENT_LEVEL / 3]
end
local success = false
while not success do
local rx = random(13) + 1
local ry = random(9) + 1
if room_builder.is_tile_avilable(room, rx, ry) then
local x = (roomx * 512) + rx * 32
local y = (roomy * 384) + ry * 32
room.monsters[rx][ry] = {
x,
y,
boss
}
success = true
end
end
end
function module.add_shopkeeper_to_room(room, roomx, roomy)
local success = false
while not success do
local rx = random(13) + 1
local ry = random(9) + 1
if room_builder.is_tile_avilable(room, rx, ry) then
local x = (roomx * 512) + rx * 32
local y = (roomy * 384) + ry * 32
room.monsters[rx][ry] = {
x,
y,
shopkeeper
}
success = true
end
end
end
function module.add_bodyguard_to_room(room, roomx, roomy)
local success = false
while not success do
local rx = random(13) + 1
local ry = random(9) + 1
if room_builder.is_tile_avilable(room, rx, ry) then
local x = (roomx * 512) + rx * 32
local y = (roomy * 384) + ry * 32
room.monsters[rx][ry] = {
x,
y,
bodyguard
}
success = true
end
end
end
function module.load_monsters(map, monsters)
for i=0,15 do
for j=0,11 do
monster = monsters[i][j]
if monster then
add_monster(map, monster[1], monster[2], repack(monster[3]))
end
end
end
end
return module

View File

@ -1,13 +1,13 @@
----------------
----------------
--##--------##--
--##--####--##--
-------##-------
-------##-------
-------##-------
-------##-------
--##--####--##--
--##--------##--
--pp--------pp--
--pp--pppp--pp--
-------pp-------
-------pp-------
-------pp-------
-------pp-------
--pp--pppp--pp--
--pp--------pp--
----------------
----------------
@ -15,11 +15,11 @@
----------------
----------------
----------------
-----##-##------
-----##-##------
-----pp-pp------
-----pp-pp------
----------------
-----##-##------
-----##-##------
-----pp-pp------
-----pp-pp------
----------------
----------------
----------------
@ -27,12 +27,12 @@
----------------
----------------
----------------
--############--
--pppppppppppp--
----------------
----------------
----------------
----------------
--############--
--pppppppppppp--
----------------
----------------
----------------
@ -40,77 +40,194 @@
----------------
----------------
----------------
--############--
--pppppppppppp--
----------------
--############--
--############--
--pppppppppppp--
--pppppppppppp--
----------------
--############--
--pppppppppppp--
----------------
----------------
----------------
----------------
----------------
--############--
--############--
--pppppppppppp--
--pppppppppppp--
----------------
----------------
----------------
----------------
--############--
--############--
--pppppppppppp--
--pppppppppppp--
----------------
----------------
----------------
----------------
-------#--------
------###-------
-------#--------
------###-------
------###-------
-------#--------
------###-------
-------#--------
-------p--------
------ppp-------
-------p--------
------ppp-------
------ppp-------
-------p--------
------ppp-------
-------p--------
----------------
----------------
----------------
----------------
--############--
--#----------#--
--#----------#--
--pppppppppppp--
--p----------p--
--p----------p--
----------------
----------------
--#----------#--
--#----------#--
--############--
--p----------p--
--p----------p--
--pppppppppppp--
----------------
----------------
----------------
----------------
--############--
--#----------#--
--#-########-#--
----#-----------
-----------#----
--#-########-#--
--#----------#--
--############--
--pppppppppppp--
--p----------p--
--p-pppppppp-p--
----p-----------
-----------p----
--p-pppppppp-p--
--p----------p--
--pppppppppppp--
----------------
----------------
----------------
----------------
--############--
--#----------#--
--#-###-####-#--
----###---##----
----#####-##----
--#-#####-##-#--
--#----------#--
--############--
--pppppppppppp--
--p----------p--
--p-ppp-pppp-p--
----ppp---pp----
----ppppp-pp----
--p-ppppp-pp-p--
--p----------p--
--pppppppppppp--
----------------
----------------
----------------
----------------
--pp--------pp--
--pp--------pp--
----------------
-------pp-------
-------pp-------
--p----------p--
--p----------p--
--pppppppppppp--
----------------
----------------
----------------
----------------
--pp--------pp--
--pp--------pp--
----------------
-------pp-------
-------pp-------
----------------
--pp--------pp--
--pp--------pp--
----------------
----------------
----------------
----------------
--pp--------pp--
--pp--------pp--
----------------
----------------
----------------
----------------
--pp--------pp--
--pp--------pp--
----------------
----------------
----------------
----------------
--pp---pp---pp--
--pp---pp---pp--
----------------
----------------
----------------
----------------
--pp---pp---pp--
--pp---pp---pp--
----------------
----------------
----------------
----------------
--pp---pp---pp--
--pp---pp---pp--
----------------
--pp---pp---pp--
--pp---pp---pp--
----------------
--pp---pp---pp--
--pp---pp---pp--
----------------
----------------
----------------
----------------
---p----p----p--
--pp---pp---pp--
----------------
---p----p----p--
--pp---pp---pp--
----------------
---p----p----p--
--pp---pp---pp--
----------------
----------------
----------------
----------------
--pp---pp---pp--
--p----------p--
----------------
--p----pp----p--
--p----pp----p--
----------------
--p----------p--
--pp---pp---pp--
----------------
----------------
----------------
----------------
--pp---pp---pp--
--p----------p--
----------------
--p----------p--
--p----------p--
----------------
--p----------p--
--pp---pp---pp--
----------------
----------------
----------------
----------------
--pp---pp---pp--
--p----------p--
-----pp--pp-----
--p--p----p--p--
--p--p----p--p--
-----pp--pp-----
--p----------p--
--pp---pp---pp--
----------------
----------------

64
data/shoplayouts.dat Normal file
View File

@ -0,0 +1,64 @@
++++++++++++++++
++++++++++++++++
++##ffffffff##++
++#"--------"#++
++f---a--a---f++
++-----------f++
++-----------f++
++f---a--a---f++
++#"--------"#++
++##ffffffff##++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++ffff----ffff++
++fppf-a--fppf++
++ffff--l-ffff++
++------a-----++
++------------++
++ffff-a--ffff++
++fppf-l--fppf++
++ffff--a-ffff++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++###########"++
++#----------#++
++#-####"###-#++
++--#aa--aa#-#++
++--#--------#++
++#-####"###-#++
++#----------#++
++"###########++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++--pppppppp--++
++--pffffffp--++
++--pfl--afp--++
++-------afp--++
++-------afp--++
++--pfl--afp--++
++--pffffffp--++
++--pppppppp--++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++pppppppppppp++
++ppffffffffpp++
++fffa----afff++
++------l-----++
++-----l------++
++fffa----afff++
++ppffffffffpp++
++pppppppppppp++
++++++++++++++++
++++++++++++++++

75
data/trapgen.lua Normal file
View File

@ -0,0 +1,75 @@
local room_builder = require "maproombuilder"
local module = {}
local random = map_random
local textures = {
"Objects/Trap1.png",
"Objects/Trap0.png"
}
local traps = {}
for i=1,7 do
trap = { textures[1], textures[2], i*16, 3*16, CURRENT_LEVEL * 4 }
table.insert(traps, trap)
end
local function repack(data)
return {
texturePath1 = data[1],
texturePath2 = data[2],
clipX = data[3],
clipY = data[4],
damage = data[5]
}
end
function module.add_traps_to_room(room)
if room.type == "coridoor" then
if random(2) ~= 1 then return end
else
if random(4) ~= 1 then return end
end
local count = random(4)
local attempts = 0;
local i = 0
while i < count do
local rx = random(13) + 1
local ry = random(9) + 1
if CURRENT_LEVEL < 4 then
if room_builder.is_tile_avilable(room, rx, ry)
and not room.traps[rx+1][ry]
and not room.traps[rx-1][ry]
and not room.traps[rx][ry+1]
and not room.traps[rx][ry-1]
and not room.traps[rx+1][ry+1]
and not room.traps[rx+1][ry-1]
and not room.traps[rx-1][ry+1]
and not room.traps[rx-1][ry-1]
then
room.traps[rx][ry] = traps[random(#traps)]
i = i + 1
end
else
if room_builder.is_tile_avilable(room, rx, ry) then
room.traps[rx][ry] = traps[random(#traps)]
i = i + 1
end
end
attempts = attempts + 1
if attempts > 100 then break end
end
end
function module.load_traps(map, traps)
for i=0,15 do
for j=0,11 do
trap = traps[i][j]
if trap then
add_trap(map, i, j, repack(trap))
end
end
end
end
return module

90
data/walllayouts.dat Normal file
View File

@ -0,0 +1,90 @@
++++++++++++++++
++++++++++++++++
++/#--------#/++
++##--------##++
++------------++
++------------++
++------------++
++------------++
++##--------##++
++/#--------#/++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++#--#-#-#-#-#++
++---c--------++
++/-#-#-#-#--/++
++-------c----++
++/--#-#-#-#-/++
++------------++
++--#-#-#-#---++
++#-########-#++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++############++
++#----------#++
++#-/#######-#++
++--#------#-#++
++--d--cc--d-#++
++#-/#######-#++
++#----------#++
++############++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++/#--------#/++
++##-ffffdf-##++
++---f--c-f---++
++---f----f---++
++---f-c--f---++
++---f----f---++
++##-fdffff-##++
++/#--------#/++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++/#ffffffff#/++
++#----------#++
++---######---++
++---d----#---++
++---#-cc-d---++
++---######---++
++#----------#++
++/#ffffffff#/++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++/##########/++
++d-----d----d++
++#c----#---c#++
++############++
++#----#-----#++
++#-c--d--c--#++
++d----#-----d++
++/##########/++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++++++++++++++++
++/####-#####/++
++#--c#-#c---#++
++d---#-#----d++
++#####-######++
++------------++
++#####-######++
++d--c#-#c---d++
++/####-#####/++
++++++++++++++++
++++++++++++++++

Some files were not shown because too many files have changed in this diff Show More