Enno Rehling
643883d539
remove some more unused defines.
2017-12-09 11:17:39 +01:00
Enno Rehling
17ee0e50b6
cppcheck warnings and scope reductions.
2017-12-08 21:08:11 +01:00
Enno Rehling
5192ffdb60
Merge branch 'develop' of https://github.com/ennorehling/eressea.git
2017-12-08 20:18:29 +01:00
Enno Rehling
9163d166ec
cppcheck style fixes.
...
delete dead functions.
reactivate patzer_deathcloud.
2017-12-08 19:59:49 +01:00
Enno Rehling
5e435a7c0b
pass cppcheck v 1.54 default checks
2017-12-08 19:26:26 +01:00
Enno Rehling
a67b2fa68d
stop using random numbers to scale units.
2017-11-26 15:15:25 +01:00
Enno Rehling
38922d9205
on the Rapsberry Pi, long is only 32 bit
2017-11-25 11:29:52 +01:00
Enno Rehling
b0ce88631e
fix bug 2386, int overflow
2017-11-19 03:19:59 +01:00
Enno Rehling
f594a908df
deprecate old get_mage implementation.
...
fix test_familiar_equip with new get_mage.
2017-10-06 21:53:07 +02:00
Enno Rehling
02cfde0a49
fix create_unit default order memory leak
2017-10-01 17:08:05 +02:00
Enno Rehling
0a9705809b
fix some bugs created during conversions (thanks, tests!)
2017-09-22 17:19:55 +02:00
Enno Rehling
3aed0b1ee5
fix gcc compilation
2017-09-22 16:39:46 +02:00
Enno Rehling
902e2126c9
WIP: change the resolve.h API
2017-09-21 17:29:01 +02:00
Enno Rehling
89e162c12a
change resolve.h api to use int, not variant.
2017-09-19 11:42:02 +02:00
Enno Rehling
30777e5948
CID 173898 'Constant' variable guards dead code
2017-09-18 20:27:34 +02:00
Enno Rehling
4bccc87f2b
fix Invalid read (valgrind) in remove_skill
2017-09-18 20:20:13 +02:00
Enno Rehling
a569ef67e8
sortiere unit.skills nach id.
...
TODO: binary search statt linear, read_unit optimization
https://trello.com/c/ydUTDGgl/616-sort-unitskills-binary-search
2017-09-15 21:52:20 +02:00
Enno Rehling
eabf72e60e
BUG 2362: clone_men hitpoint calculation was wrong.
2017-09-01 22:04:36 +02:00
Enno Rehling
2dd159841e
Merge branch 'master' into develop
2017-08-24 16:47:24 +02:00
Enno Rehling
7985ebe511
replace ct_find calls with constants.
...
reorder a lot of includes.
2017-08-21 20:18:19 +02:00
Enno Rehling
c99e92db20
kill curse cache logic, it was a bad idea.
...
ct_find is almost never what we want to do.
2017-08-21 19:43:35 +02:00
Enno Rehling
eb1dc731cb
consistently rename ec_flags constants (ECF_*)
2017-07-17 12:33:55 +02:00
Enno Rehling
f934e4d5e3
remove unused ECF_KEEP_ITEM flag.
2017-07-17 12:31:47 +02:00
Enno Rehling
beecc0e323
BUG 2343: fix clone_men (hitpoints), add test.
2017-06-25 14:07:50 +02:00
Enno Rehling
3e0bc4f26d
cannot assert that free_unit has no faction (complicated reasons)
2017-06-04 14:35:15 +02:00
Enno Rehling
728f7ed389
Revert "fix some failing tests."
...
This reverts commit 8c11cb676f
.
2017-06-04 14:33:13 +02:00
Enno Rehling
8c11cb676f
fix some failing tests.
2017-06-04 14:18:28 +02:00
Enno Rehling
5b807e2057
crash casued by spell conversion.
...
remove unit from faction, not only region!
also remove spammy warning that has no value.
2017-06-04 14:13:05 +02:00
Enno Rehling
3306488641
Merge pull request #695 from ennorehling/feature/refactor-rcspell
...
refactor observers, lighthouses
2017-05-28 12:50:05 +02:00
Enno Rehling
18daa9db2f
entirely remove RC_SPELL
2017-05-24 08:52:19 +02:00
Enno Rehling
58d9aa58a0
BUG 2326: Untote Helden fehlen in der Kampfübersicht
...
https://bugs.eressea.de/view.php?id=2326
2017-05-21 11:14:16 +02:00
Enno Rehling
c6a8a76e31
strip skillmod down to the essentials.
2017-04-02 20:17:39 +02:00
Enno Rehling
ed99f60186
decluttering settings.h
2017-03-31 21:37:30 +02:00
Enno Rehling
a93dc5459b
BUG 2313: spells must not be counted.
...
https://bugs.eressea.de/view.php?id=2313
2017-03-12 13:39:25 +01:00
Enno Rehling
decc38a056
BUG 2313: proper accounting in remove_unit.
...
https://bugs.eressea.de/view.php?id=2313
2017-03-12 13:02:55 +01:00
Enno Rehling
d633c2a9fb
BUG 2310: counting units and people.
...
reduce number of count_all loops made,
make f->num_units and f->num_people be correct.
2017-03-11 19:36:26 +01:00
Enno Rehling
05bb109a09
BUG 2303: allied units are not traitors.
...
had to rewrite the creport code for this, it is probably less efficient now than ever, but at least it works.
2017-03-06 21:35:48 +01:00
Enno Rehling
bfb5a9b692
set age_unit and name_unit funpointers in rc_create.
...
no more <function/> in XML races.
rename juju-zombie => juju.
2017-02-20 22:07:36 +01:00
Enno Rehling
ba1fdcce59
remove race.describe funpointer
2017-02-20 07:47:36 +01:00
Enno Rehling
4e5f1d05ce
Be very strict about C standards.
...
Compile with -std=c89 in gcc.
remove all // comments (they are nice, but unnecessary).
variables only declared at start of block.
various pedantery.
backwards compatible va_copy for pre-C99 gcc.
2017-02-18 21:15:14 +01:00
Enno Rehling
4828045fd7
there is no NEWATSROI, remove dead code
2017-02-12 18:52:41 +01:00
Enno Rehling
b05c2564e5
make att_modification not crash when a good/bad dream curse has no magician.
2017-02-12 13:22:44 +01:00
Enno Rehling
3b3e39a319
optimization: elf-special "regen.forest" is now a config.
...
this is an E3 feature
eliminates rc.parameters for elves
allows use of a local cached static
2017-02-04 23:21:36 +01:00
Enno Rehling
1c347ca5ba
race.healing is now an int percentage, not a float multiplier
2017-02-03 18:18:55 +01:00
Enno Rehling
fd9583df3d
fix healing for elves in a forest.
...
rename _magres back to magres.
rc->parameters is not linked to config_changed invalidation.
add tests.
2017-02-03 17:43:40 +01:00
Enno Rehling
8b7dae6977
kill autoconf.h, replace platform.h for C99 compatibility work
2017-01-10 16:31:05 +01:00
Enno Rehling
4a802be67c
fix undead name generation.
2016-12-31 20:03:50 +01:00
Enno Rehling
ec4060cb9a
fix curse-vigour calculation math.
...
also fix a ton of small other niggles from pvs-studio.
2016-11-20 19:08:39 +01:00
Enno Rehling
2f305f16d9
additional testing for renumber.
2016-11-17 21:08:35 +01:00
Enno Rehling
11b122048b
reduce dependency on save.h
...
moving a_write* functions to attrib.h, which was most of the reason everyone and their mom include save.h
2016-11-13 19:40:38 +01:00
Enno Rehling
754ad78db7
WIP: remove GUARD_* flags.
...
TODO: does not compile
TODO: write new guard.test.c tests
2016-10-31 07:45:06 +01:00
Enno Rehling
2fbc7a44d5
add missing tests for recent failures.
2016-10-23 13:02:53 +02:00
Enno Rehling
a921a6594a
Merge branch 'develop' of https://github.com/ennorehling/eressea.git
2016-10-23 10:03:46 +02:00
Enno Rehling
f12eda8bdf
remove cfindhash, again.
...
curse and unit ids can collide, there is no reason why they should be from the same pool.
2016-10-23 10:03:33 +02:00
Enno Rehling
ac4e32a8f5
Merge branch 'master' into develop
2016-10-23 09:59:42 +02:00
Enno Rehling
34a6dd8d54
fix crash in 997: re-introduce cfindhash.
...
this prevents duplicate curse.no values.
2016-10-22 22:35:10 +02:00
Enno Rehling
38721e2046
remove all mention of centaurs from the code and configuration
2016-10-07 19:33:50 +02:00
Enno Rehling
c53ac9d8aa
remove RS_FARVISION, it is the only spell that uses units.
2016-10-01 21:03:16 +02:00
Enno Rehling
423e293745
some more config lookup caching
2016-09-23 20:39:08 +02:00
Enno Rehling
f8ac5c390d
SAMRT_INTERVALS is no longer an option, but regular
2016-09-20 09:39:21 +02:00
Enno Rehling
9af5fb0326
cache some of the highest-ranking ct_find callers
2016-09-19 04:23:49 +02:00
Enno Rehling
e7739867df
use curse_type caching in att_modification
2016-09-19 03:55:12 +02:00
Enno Rehling
6c9c460815
fix failing unit tests, remove deleted unit from f->units list.
2016-09-18 11:46:54 +02:00
Enno Rehling
f946d50001
alternative implementation for dfindhash that doesn't use as much memory.
...
do not set u->faction = NULL for deleted units.
2016-09-11 20:09:48 +02:00
Enno Rehling
87fed5b7d2
Merge pull request #548 from ennorehling/refactor-volcano
...
new tests, TODOs removed, remove code duplication
2016-08-31 17:19:29 +01:00
Enno Rehling
8a157de36c
only name monsters that have a naming function. test is bad, failing.
2016-08-31 16:43:02 +02:00
Enno Rehling
2d1a13a811
death to static caches!
2016-08-30 07:51:05 +01:00
Enno Rehling
873e6f8086
remove more static curse_type variables
2016-08-29 20:34:30 +01:00
Enno Rehling
f47113e9bd
eliminate static curse variables (gbdream & more)
2016-08-29 20:31:18 +01:00
Enno Rehling
0d609f2115
test magicwalls and strongwalls effects on buildings.
2016-08-29 08:53:09 +01:00
Enno Rehling
33701ab891
make describe_braineater more generic (describe_race).
2016-08-28 20:44:45 +01:00
Enno Rehling
0f3de70ced
refactor to push back the const-ness of generated names.
2016-08-28 19:06:14 +01:00
Enno Rehling
0ac30c65a1
refactoring prior to removing static variable
2016-08-28 18:15:00 +01:00
Enno Rehling
b2e79dc5e9
building maintenance unit tests.
...
backfilling some very basic test coverage.
2016-08-21 20:01:30 +02:00
Enno Rehling
4f5bd43dcf
Merge branch 'master' into develop
...
Conflicts:
src/buildno.h
2016-08-07 00:47:50 +02:00
Enno Rehling
44b6a87649
death by NMR was broken, because I can't write loops good.
2016-08-07 00:40:10 +02:00
Enno Rehling
db5b90e80b
clarify building_type.maxsize and add error logging for bug 2221.
...
https://bugs.eressea.de/view.php?id=2221
2016-08-06 13:52:29 +02:00
Enno Rehling
d0f54bf69a
Merge branch 'feature/kill-maintenance' of https://github.com/ennorehling/eressea into ennorehling-feature/kill-maintenance
...
Conflicts:
src/kernel/config.c
src/kernel/config.h
src/tests.c
2016-07-30 23:27:03 +02:00
Enno Rehling
98a3b31953
cfindhash is gone
2016-03-25 21:51:49 +01:00
Enno Rehling
02cfacd7f8
refactorings
...
- learn_skill from unit.c to study.c
- add academy.c module
2016-03-09 14:52:50 +01:00
Enno Rehling
3d5c7ba8fb
refactoring: move produceexp from unit.c to study.c
2016-03-09 14:50:54 +01:00
Enno Rehling
8a9d617aa3
read_referernce takes a gamedata object.
...
with all the trimmings that requires,
this is for github issue $479
2016-02-24 11:53:22 +01:00
Enno Rehling
7f6ced99b9
attrib.read gets a gamedata object (remove dependency on global.data_version)
2016-02-24 11:44:18 +01:00
Enno Rehling
ca500a499e
adding a much-needed getter function for faction_alive
2016-01-11 12:25:23 +01:00
Enno Rehling
b4389c91fe
fix compilation (what was I thinking?), remove uses of f.alive where they should not be needed.
2016-01-11 11:54:45 +01:00
Enno Rehling
5187788f3c
pass the parent of an attribute into a_age and attrib_type::age
2015-12-16 22:18:44 +01:00
Enno Rehling
c85e489f4f
Merge branch 'monster_leftovers' of https://github.com/stm2/server into stm2-monster_leftovers
...
Conflicts:
src/kernel/unit.c
src/laws.test.c
src/monsters.c
2015-11-25 14:25:42 +01:00
Enno Rehling
f559c263e3
cleanup of config.c: move more code to other modules like unit.c and faction.c
2015-11-24 19:53:27 +01:00
Enno Rehling
84a943b698
fix gcc build
2015-11-24 19:15:53 +01:00
Enno Rehling
64b84481b2
refactoring: move parsing and allies code out of config.c
2015-11-24 18:52:09 +01:00
Enno Rehling
817d81dbf9
remove the rules.hunger.reduces_skill variable, no game was doing anything other than the default.
2015-11-23 21:05:25 +01:00
Enno Rehling
0a47f0e398
eliminate SkillCap feature, it was stupid and not used by any game, ever
2015-11-23 20:58:51 +01:00
Enno Rehling
2e392b4d7c
eliminate even more static variable caches
2015-11-22 16:14:27 +01:00
Enno Rehling
a4cb5e2906
replace all get_param_* for global.parameters with config_get_*
2015-11-22 10:44:46 +01:00
Enno Rehling
66dd1b8172
remove produce_exp caching in static variables (more slowdown)
2015-11-22 10:21:37 +01:00
Enno Rehling
990fda6234
clean up config.c, remove static configuration caching
2015-11-21 18:13:16 +01:00
Enno Rehling
7e27928d17
eliminate static variables and cache logic from more modules
2015-11-21 12:28:20 +01:00
Steffen Mecke
8cec4b20e0
reduce code obfuscation
2015-11-17 02:14:08 +01:00
Steffen Mecke
1789bc06e9
monster faction may learn from experience
2015-11-17 02:13:57 +01:00
Enno Rehling
b81e56d306
CID 22486 Dereference after null check
2015-11-05 08:32:21 +01:00