summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
9 daysCMake: Added install rules for configuration and datablaming-the-toolsThorbjørn Lindeijer1-0/+7
2024-06-07README.md: Update to reflect renamesFreeyorp1-1/+1
Note this is not yet updated to reflect the availability of cmake.
2024-06-07README.md: Reword with friendlier languageFreeyorp1-201/+80
2024-06-07Use -ggdb everywhereFreeyorp3-2/+2
-fvar-tracking and -fvar-tracking-assignments are enabled by default when available, so are not explicitly set here.
2024-06-06CI: Split attoconf and cmake artifactsFreeyorp2-9/+18
Artifacts of the same name from different runs can overwrite each other. This makes sure that tests of the cmake pipeline actually test the cmake artifacts, and similarly for attoconf.
2024-06-05real.make: rank-fwd: Allow src/conf specificationFreeyorp1-1/+1
Previously, only ../conf style includes were excluded from expecting a fwd.hpp file to be provided for the directory. Permit src/conf style includes too.
2024-06-05DTEST: Provide LD_LIBRARY_PATHFreeyorp1-1/+1
How did this ever work before? Did it expect there to be a previously installed libtmwa-shared.so and run tests against that, rather than what was just built?
2024-06-05real.make: Permit existant SRC_DIR relative pathsFreeyorp1-2/+6
This allows files that already exist to be specified relative to SRC_DIR, rather than just relative to the current file. This is used in tests, though it appears not to be used in main tmwa.
2024-06-05debug-debug: Update deprecated gdb syntaxFreeyorp1-3/+3
2024-06-05configure: srcdir for GTEST_DIR defaultFreeyorp1-1/+1
The default value for GTEST_DIR should be deps/googletest/googletest under the source directory, not under the build directory. The build directory will often not have anything in it at all in the case of an out-of-tree build. This allows some tests to run for out-of-tree builds.
2024-06-05Create generated files in the build directoryFreeyorp4-15/+12
Also, just require the use of full paths when #including a generated file. This fixes fresh out-of-tree builds using attoconf, and gets rid of a lot of annoying terminal output when attoconf is tracing dependencies.
2024-06-05real.make: Fix out-of-tree buildsFreeyorp1-2/+8
I appreciate and respect how densely packed Makefile code can be. hahahaahahahaaa
2024-06-05python3: Add explicit encoding='utf-8' for python3.6Freeyorp1-1/+1
2024-06-05python3: Add explicit list()s for python3.6Freeyorp4-9/+9
This should be reverted once we drop support for Ubuntu 18.04, and therefore python3.6, as it does clutter up the code a bit. Sourced from specing's work on the porting process. See https://git.themanaworld.org/legacy/tmwa/-/merge_requests/256
2024-06-05python3: Update namesFreeyorp2-59/+54
- unicode -> str - u'' -> '' - cStringIO -> io Sourced from specing's work on the porting process. See https://git.themanaworld.org/legacy/tmwa/-/merge_requests/256
2024-06-05python3: Strip old __future__ referencesFreeyorp6-10/+0
2024-06-05CI: Add cmake buildFreeyorp1-8/+36
2024-06-05CMakeLists.txt: Add install targetFreeyorp1-0/+5
2024-06-05CMakeLists.txt: Remove dead code, add TODOsFreeyorp1-4/+2
2024-06-05CI: Out-of-tree build by defaultFreeyorp1-2/+8
2024-06-05Update attoconfFreeyorp1-0/+0
- Correctly handle files in subdirectories in out-of-tree builds - Handle UTF-8 properly - Close file resources properly
2024-06-05Fix CIFreeyorp1-6/+4
2024-06-05real.make: Allow generated files not in conf-rawFreeyorp1-1/+4
2024-06-05real.make: Split dependency sanitization stepFreeyorp1-4/+12
If we want to be able to filter specific other entries, such as for the sake of more generated files, we'll want to be doing this over a list that has already been made relative and simplified.
2024-06-05real.make: Document dependency sanitization stepFreeyorp1-1/+32
A little indentation and formatting, and quite a lot of commenting, goes a long way. This doesn't change any code, it only reformats it.
2024-06-05Fix up .d generation for generated filesFreeyorp1-0/+8
2024-06-05.gitignore: Add newly generated filesFreeyorp1-0/+2
2024-06-05version.mk: Always generate version.hppFreeyorp2-2/+8
2024-06-05version.mk: make version target PHONYFreeyorp1-0/+1
2024-06-05Generate {install,version}.hpp through attoconfFreeyorp5-5/+31
Or more specifically, in the attoconf buildchain. attoconf itself directly generates src/conf/install.hpp alongside Makefile, but version inforation is only available later. To generate version.hpp, I extended version.mk slightly to provide the recipe. It's not anywhere near as generic as real.make tends to be, but with any luck we'll soon be doing all builds through cmake going forward. The template for install.hpp has been changed to use variables actually provided by attoconf. PACKAGE{SYSCONF,LOCALSTATE}DIR are actually only defined in real.make, and then only in terms of SYSCONFDIR and LOCALSTATEDIR, adding `/tmwa`. It's simpler to just use the attoconf variable and adjust the template, which conveniently also simplifies the construction in CMakeLists.txt, too.
2024-06-05VENDOR_SOURCE: github.com -> git.themanaworld.orgFreeyorp2-2/+2
2024-06-05cmake: Fix out of tree buildFreeyorp3-72/+6
Also remove {install,version}.hpp from source control, so they're actually generated. There may be a better way to handle this, but I'll just leave a note as a TODO for now.
2024-06-05CMake: Make the build work the first timeThorbjørn Lindeijer1-17/+14
Use execute_process instead of add_custom_target to make sure the generated files are found on the first configure run. Set CMAKE_CONFIGURE_DEPENDS so that touching the script generating files will automatically trigger a re-configre, which will re-run the make process.
2024-06-05CMake: Simplified VERSION_DOTS and match version.mk SO versionThorbjørn Lindeijer1-2/+5
2024-06-05CMake: Generate the install.hpp and version.hpp filesThorbjørn Lindeijer3-4/+121
The values of defines in these files should be the same as those set from version.mk / Makefile.in.
2024-06-05Forgot to add 'generate' as dependency to login/char binary nowThorbjørn Lindeijer1-2/+2
2024-06-05Fixed tmwa-map linker errors and made tmwa-login and tmwa-char compileThorbjørn Lindeijer1-6/+25
2024-06-04WIP: Add CMake based toolchainFreeyorp1-0/+102
attoconf is a bespoke build system that has seen little maintenance, and the overwhelming majority of build logic happens inside real.mk, here Makefile.in. While attoconf and real.mk provide a lot of very nice functionality, it doesn't integrate so well with IDEs, and is very intimidating for prospective developers. Providing a full cmake based approach solves both of these problems, and there isn't anything so complicated in tmwa that it needs its own build system. WIP: This represents a messy dump of CMakeLists.txt in the last state I left it. It has been shared to make collaboration easier, but should by no means be considered anything more than exploratory at this point.
2024-06-04Rename .make to .mkFreeyorp6-10/+10
.mk is more widely understood than .make, for IDE usage.
2024-06-04real.make: Use C++11Freeyorp1-2/+2
C++0x was released as C++11 nearly a decade and a half ago. My version of cmake doesn't recognize it in CMAKE_CXX_STANDARD, which makes before/after comparison difficult.
2024-06-04Very basic python3 supportFreeyorp10-9/+15
Extremely minimal, not touching any __future__ imports or such. For serious use, see specing's WIP PR at: https://git.themanaworld.org/legacy/tmwa/-/merge_requests/256
2024-05-31Change char_conf.max_connect_user back to signed integerThorbjørn Lindeijer1-1/+1
This configuration variable changed from signed to unsigned with the move to Python-generated config file parsing in e1418f378c66343a35db3791cbf0d54a4be3fbd3 and c482e420bcf447073ffe3ff8a106a0561e0baadd. Changing it back to signed because it is compared to a signed integer returned from count_users. Also, having it as signed integer allows setting it to a negative value to refuse any user connection.
2024-05-17Mages Quality Of Life, part 2:Hello=)1-2/+2
This commit lands fix for infamous AFK-kill summons exploit. Its what essentially caused summoner spells in cities to be disabled. This is not free lunch: it comes at expense of little fun where mob would bite bad master hitting it. But its been minor fun or cosmetics while spells restriction in cities and so on is annoying setback for mages. So if choosing between evil and even more evil, guess... Technically, server's bug is: it too eager to reattach some things to wrong RID or something like this. Its what causes aggroed mob to lock on really wrong random targets and AFK-kill them.
2024-05-15bugfix for previous commit. Need to wrap MobMode in bool()asuratva1-1/+1
2024-05-15fix issummon function signature. Thanks @HoraK-FDF for catching the typo.asuratva1-1/+1
2024-05-15updated itenplz fix to use mob flag instead of string comparison. More ↵asuratva1-2/+2
efficient. Credit to @Hello for figuring this out :)
2024-05-15Add function to check for summoned creature in scriptsasuratva1-0/+18
2024-04-29npc: formattingFreeyorp1-1/+2
Nice consistency there, past!Freeyorp.
2024-04-29npc_scripcont: consistent return valueFreeyorp1-2/+2
`npc_scriptcont` now consistently returns 1 on failure, though in practice, this return value was always ignored.
2024-04-29npc_destroy: Defer NPC destruction via timerFreeyorp4-12/+36
055-1 _nodes.txt will call `destroy;` from within OnInit, that is during an iteration of the global `ev_db`. Previously, concurrent modification invalidated this iteration, resulting in a crash. This still nullifes `oid`, dequeues all timers, and effectively calls `builtin_end`. `npc_data::deletion_pending` is extended to include a third state. In addition to no deletion happening, and indicating when `npc_free` is currently on the stack, it now also tracks whether the NPC is about to be deleted by a timer. This means that an NPC which is about to be deleted is still blocked from triggering new events, much like an NPC actively being deleted would. Starting or continuing an NPC dialog with an NPC that does not, or is about to no longer exist, is now also blocked.