Commit Graph

40 Commits (e6136c32a5a565d23af02ff9f01e8a494c45fa03)

Author SHA1 Message Date
Josh Cooper 04058c7529 Update matcher.cpp 2022-06-08 12:42:33 -07:00
Josh Cooper 0eb9eee773 Fixes presumed typo in if statement 2022-06-08 12:42:33 -07:00
lethosor d1f0edd33b
Apply initial pre-commit config 2022-04-12 14:48:19 -04:00
lethosor e7754ea890
Enable -Wunused-variable and fix most errors 2021-09-07 01:16:21 -04:00
PatrikLundell ba5915b866 embark-assistant early waterfall quit removed 2021-06-13 17:47:15 +02:00
bseiller 60e83046f8 Prevent accidental double-frees
- matcher.cpp, survey.cpp: setting the state pointer to null/nullptr in ::shutdown() to prevent errors caused by accidental double-frees - an additional check if the pointer is null already is not necessary as the standard guarantees that nothing happens if delete is called on a nullpointer

Co-Authored-By: Alan <3719547+lethosor@users.noreply.github.com>
2021-02-20 22:43:12 +01:00
bseiller 0c304cf85f Improve performance of surveying => faster search
replace the local/automatic mid_level_tiles variable in matcher::match_world_tile with one that is created once during the setup phase (heap).
The dynamic part of the contained (16*16*3 = 768) vectors is being allocated on the heap in both cases - which made the repeated instatiations of the automatic variable so slow/expensive.

Also replace calls to vector<bool>.resize in nested loops with direct assignments to those vectors, which curiously even after a lot of profiling is the fastest way to reset the inorganic vectors - at least on Windows.

- embark-assistant.cpp: Replace 2 local/automatic mid_level_tiles variables with a single dynamic variable created during setup as well; add calls to matcher::setup() and matcher::shutdown()
- matcher.cpp/.h: add state with mid_level_tiles member; add setup and shutdown functions
- survey.cpp: add function reset_mlt_inorganics as replacement for the looped calls to vector::resize as all inorganic vectors are now expected to have the proper size when entering survey::survey_mid_level_tile
2021-02-03 00:08:59 +01:00
bseiller 1f7cae17ef Merge branch 'develop' into ea_incursion_struct 2021-01-26 23:22:59 +01:00
bseiller 6a1b70ae76 making lint happy by removing trailing whitespace 2021-01-19 17:43:32 +01:00
bseiller 438811e108 handling special case of the cursor having been positioned in the lower right corner before the search
- matcher.cpp: manually moving the cursor to the neighbouring world tile so it can be moved back and embark_update is being called when all (incursion) data has been collected

Co-Authored-By: PatrikLundell <22739822+PatrikLundell@users.noreply.github.com>
2021-01-19 16:37:59 +01:00
bseiller bdfd50cc65 using mid_level_tile_incursion_base instead of mid_level_tile for incursion processing
- matcher.cpp, survey.cpp: adapting signatures to use new struct that only contains incursion specific attributes
2021-01-18 23:50:14 +01:00
PatrikLundell 3e3a34af99 corrected index usage 2020-12-16 10:59:27 +01:00
PatrikLundell c36fbe4c8b Corrected river size handling 2020-12-03 15:40:22 +01:00
PatrikLundell afe99b83c2 corrected orientation bug 2020-11-18 10:43:15 +01:00
PatrikLundell ab617f67cc corrected world tile level incursion calculations 2020-11-17 19:52:46 +01:00
PatrikLundell 0ef56ba859 another space character met its demise 2020-11-14 14:53:54 +01:00
PatrikLundell 46835c9edd reworked aquifer bit fiddling 2020-11-14 14:43:43 +01:00
PatrikLundell 6014a45235 Fixed bug missing world tiles lacking incurson supplied resources 2020-11-13 20:11:03 +01:00
PatrikLundell 6f9f398e22 blind attempt to silence warnings 2020-03-04 16:54:00 +01:00
PatrikLundell 8dd89eee8a Addressed warnings 2020-03-04 10:09:51 +01:00
PatrikLundell cd4c7ee422 Updated embark-assistant. Lt aquifer, trees, neighbors 2020-03-03 21:45:20 +01:00
lethosor 4feb0aa21f Merge remote-tracking branch 'PatrikLundell/embark-assistant' into develop 2020-01-14 23:41:22 -05:00
PatrikLundell 07dedfb333 Fixed/improved river tile detection 2019-11-24 21:32:07 +01:00
lethosor 267d52bd17 Merge remote-tracking branch 'PatrikLundell/embark-assistant' into develop
Closes #1456
2019-11-02 22:10:08 -04:00
lethosor f3658db85f Merge branch 'develop' into avoid_rebuilding_df_statics_if_core_h_changes 2019-10-03 23:23:36 -04:00
PatrikLundell 7979150566 Removed trailing blank 2019-09-24 11:14:50 +02:00
PatrikLundell 5eceab2794 Added 'fileresult' optional parameter, improved world traversal 2019-09-23 13:13:04 +02:00
PatrikLundell 8248832cbc Added detection and use of incursions into embark tiles 2019-07-12 22:09:03 +02:00
PatrikLundell bcb62697c9 Waterfall detection changed 2019-07-01 13:29:19 +02:00
PatrikLundell 8259243d2a Modified Flat detection options 2019-06-23 18:35:59 +02:00
Pauli f0632347d0 Remove Core.h include from DataDefs.h
Core.h isn't required for DataDefs.h which removes Core.h dependency
from DataStatics*.
2018-12-30 17:08:42 -05:00
PatrikLundell 8f9cbfeafd Added coal search to embark-assistant 2018-12-04 14:57:23 +01:00
PatrikLundell 4c850cabca Added embark-assistant world match indication 2018-08-05 17:11:39 +02:00
PatrikLundell baef5ca319 Added Finder scrolling and Frozen search 2018-07-13 20:44:11 +02:00
PatrikLundell 02dd97722c Added Finder scrolling and Frozen search 2018-07-13 17:23:12 +02:00
PatrikLundell f02f4b8bcc Updated evil weather 2018-06-21 20:51:05 +02:00
Ben Lubar a7dfacd1c5
Fix warnings in supported plugins. 2018-04-06 01:25:21 -05:00
PatrikLundell 7705eada5a Added magma/candy search + profile save/load. 2018-02-26 18:31:33 +01:00
PatrikLundell 596296358f Moved all externally visible operation implementations out of name spaces to satisfy both Travis and Visual Studio. 2017-09-01 17:00:14 +02:00
PatrikLundell 80fe49b339 Add embark-assistant plugin 2017-09-01 14:13:34 +02:00