Commit Graph

248 Commits

Author SHA1 Message Date
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 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 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 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 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 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 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 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 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 a7822331f8 Hopefully handle the "event overflow exploit"
There was an exploit where a keyboard would fire events quicker then
they could be consumed. This would lock the main game loop in the
SDL_PollEvent loop and block rendering until the key in this case was
released. Combning this with an attack meant that you could "farm" one
NPC for multiple kills and massive XP gains. Leaving the player at level
8+ on dungeon level 1. This fix should mitigate such shenanigans.
2018-05-16 19:09:01 +02:00
Linus Probert bc0d194dce Additional fall sounds
Wilhelm scream
2018-05-16 15:52:39 +02:00
Linus Probert fa8797a20f Removed a memory leak and MACROD colors 2018-05-15 23:21:28 +02:00
Linus Probert 853d390427 Some create package dir in travis 2018-05-15 14:21:54 +02:00
Linus Probert 6d5acc698e Nicer labels in many places. 2018-05-15 14:12:38 +02:00
Linus Probert b88318097f Render texts after particles. 2018-05-15 11:20:52 +02:00
Linus Probert d6daf7b798 Nicer action texts 2018-05-15 11:16:56 +02:00
Linus Probert 524e10ac8f Adds camera shake.
Removed some old buildfiles that had accidentally made it into the repo.
2018-05-13 23:32:44 +02:00
Linus Probert 0576c47bb2 Fixed the frame sprites 2018-05-12 10:47:06 +02:00
Linus Probert 3e6976d2cc Adds texture creation of gui frames to reduce render time
Also enables leakchecking and removes leaks from hashtable tests and
some other leaks that were obvious. There are some X11 leaks still
present but I don't think these are caused by me.
2018-05-09 00:21:38 +02:00
Linus Probert 2122300f6e Prepare for texture streaming and locking.
The intention is to static stream the gui areas into one big texture.
2018-05-08 16:34:22 +10:00
Linus Probert 9d7669fd35 Some updates regarding asset management
Had an idea of self-cleaning the cache but it didn't hold. Leaving the
stuff I wrote that might not be useless in the future.
2018-05-06 13:27:29 +02:00
Linus Probert da75ccde23 Removed an unused timer on Projectiles 2018-05-06 07:33:00 +02:00
Linus Probert db21bb813f Removed clang warnings 2018-05-06 06:19:59 +02:00
Linus Probert efe062993b Always play sound when daggers hit/miss something 2018-05-05 21:36:16 +02:00
Linus Probert 3665c7ff66 Rotate daggers instead of using spritesheet
Don't know if this is bad for performance but it does make things
simpler.
2018-05-05 21:29:08 +02:00