142 lines
7.1 KiB
Org Mode
142 lines
7.1 KiB
Org Mode
-*-org-*-
|
|
|
|
* v1.0.0
|
|
** v0.1.0
|
|
*** TODO v0.0.1
|
|
**** Improvments
|
|
- [ ] All sources go in src/
|
|
For instance, our own sources are
|
|
- [ ] Doxygen documentation
|
|
- [ ] Unit tests
|
|
- [ ] With a correct script we could generate captions one for all
|
|
and generate map at multiple zoom factors to handle web UI zoom
|
|
**** Should handle unit tests
|
|
:LOGBOOK:
|
|
CLOCK: [2020-12-07 lun. 10:14]--[2020-12-07 lun. 10:24] => 0:10
|
|
CLOCK: [2020-04-13 lun. 17:12]--[2020-04-13 lun. 17:46] => 0:34
|
|
:END:
|
|
maybe based on https://github.com/catchorg/Catch2/blob/master/docs/tutorial.md
|
|
- [X] cmake should search for catch
|
|
- [X] Should link to `make check`
|
|
- [ ] Start to implement FactionsHandler_Test.cpp
|
|
- [ ] Continue to improve the first real test of FactionsHandler
|
|
**** TODO factions.conf reading and unit tests
|
|
:LOGBOOK:
|
|
CLOCK: [2022-06-09 jeu. 06:54]--[2022-06-09 jeu. 07:33] => 0:39
|
|
CLOCK: [2022-05-03 mar. 22:18]--[2022-05-03 mar. 22:43] => 0:25
|
|
CLOCK: [2022-01-20 jeu. 07:36]--[2022-01-20 jeu. 07:49] => 0:13
|
|
CLOCK: [2021-11-02 mar. 17:58]--[2021-11-02 mar. 18:45] => 0:47
|
|
CLOCK: [2021-09-08 mer. 19:01]--[2021-09-08 mer. 19:30] => 0:29
|
|
CLOCK: [2021-09-08 mer. 18:53]--[2021-09-08 mer. 18:58] => 0:05
|
|
CLOCK: [2021-07-26 lun. 18:01]--[2021-07-26 lun. 18:38] => 0:37
|
|
:END:
|
|
- [X] mapper.src should be src/main.cpp (modified)
|
|
- [ ] Building actually fail référence indéfinie vers
|
|
« lua_pushvalue(lua_State*, int) »
|
|
- [ ] Actual REQUIRE_NOTHROW seems to be due to extra newline
|
|
- [ ] Must compute absolute/canonical path and fix other unit tests
|
|
Then, enable CI at gitlab
|
|
see https://en.cppreference.com/w/cpp/filesystem/canonical
|
|
|
|
- [ ] If no faction found in the game, should print a readable
|
|
error message (use and keep test-5.3-no_faction/ for this test)
|
|
FactionsFileNotFound::what text is buggy
|
|
- [ ] FactionsHandler shoudn't have all this exception/lua code
|
|
- [ ] Our actual minetest world is called 'test-5.0.0'
|
|
segfault when called on
|
|
#1 0x00007ffff790f6cc in lua_next () from /lib/x86_64-linux-gnu/liblua5.1.so.0
|
|
#2 0x000055555556989e in iterate_and_print (L=0x5555555a0fa0,
|
|
index=<optimized out>)
|
|
at /home/rainbru/programmation/gitlab/minetestmapper-factions/src/FactionsHandler.cpp:29
|
|
|
|
- [ ] We just have to know which keys we need
|
|
For instance, keep the faction's name and add to legend
|
|
- [ ] If received type is nil, maybe the factions.conf file is empty (no factions)
|
|
- [ ] Add a legend with all known factions
|
|
legend can be sorted by faction's power
|
|
write a svg file
|
|
|
|
- [ ] Add a little outline for all known protectors for each factions
|
|
**** DONE Improve the mapper
|
|
:LOGBOOK:
|
|
CLOCK: [2021-06-03 jeu. 19:50]--[2021-06-03 jeu. 20:47] => 0:57
|
|
CLOCK: [2021-06-03 jeu. 19:20]--[2021-06-03 jeu. 19:40] => 0:20
|
|
CLOCK: [2020-06-02 mar. 15:21]--[2020-06-02 mar. 15:28] => 0:07
|
|
CLOCK: [2020-04-22 mer. 19:14]--[2020-04-22 mer. 19:23] => 0:09
|
|
CLOCK: [2020-04-02 jeu. 18:00]--[2020-04-02 jeu. 18:11] => 0:11
|
|
CLOCK: [2020-03-24 mar. 20:39]--[2020-03-24 mar. 20:47] => 0:08
|
|
CLOCK: [2020-03-16 lun. 11:28]--[2020-03-16 lun. 11:45] => 0:17
|
|
CLOCK: [2020-03-04 mer. 12:03]--[2020-03-04 mer. 12:14] => 0:11
|
|
CLOCK: [2020-03-04 mer. 11:37]--[2020-03-04 mer. 11:53] => 0:16
|
|
CLOCK: [2020-01-31 ven. 07:44]--[2020-01-31 ven. 07:56] => 0:12
|
|
CLOCK: [2019-11-28 jeu. 13:02]--[2019-11-28 jeu. 13:25] => 0:23
|
|
CLOCK: [2019-11-14 jeu. 12:21]--[2019-11-14 jeu. 12:46] => 0:25
|
|
CLOCK: [2019-11-14 jeu. 11:28]--[2019-11-14 jeu. 12:01] => 0:33
|
|
CLOCK: [2019-11-06 mer. 02:22]--[2019-11-06 mer. 02:54] => 0:32
|
|
CLOCK: [2019-10-28 lun. 05:52]--[2019-10-28 lun. 06:41] => 0:49
|
|
CLOCK: [2019-10-10 jeu. 12:49]--[2019-10-10 jeu. 12:52] => 0:03
|
|
CLOCK: [2019-05-30 jeu. 23:39]--[2019-05-30 jeu. 23:47] => 0:08
|
|
CLOCK: [2019-05-31 ven. 02:21]--[2019-05-31 ven. 02:40] => 0:19
|
|
CLOCK: [2019-05-31 ven. 03:20]--[2019-05-31 ven. 03:24] => 0:04
|
|
CLOCK: [2019-05-31 ven. 03:29]--[2019-05-31 ven. 03:47] => 0:18
|
|
CLOCK: [2019-05-31 ven. 04:20]--[2019-05-31 ven. 04:28] => 0:08
|
|
CLOCK: [2019-05-31 ven. 04:36]--[2019-05-31 ven. 04:59] => 0:23
|
|
CLOCK: [2019-05-31 ven. 07:16]--[2019-05-31 ven. 07:36] => 0:20
|
|
CLOCK: [2019-08-08 jeu. 04:07]--[2019-08-08 jeu. 04:12] => 0:05
|
|
:END:
|
|
Maybe the legend in another file to handle a client zoom feature.
|
|
- [X] Try to write the legend in SVG ?, in exemple caption.svg ?
|
|
We must get the basename and call it {basename}-caption.svg
|
|
Or get the full name from the caption parameter ?
|
|
- [X] Where does the factions mod save the factions states
|
|
in the world dir, there is a factions.conf file
|
|
it loosk like a lua file
|
|
- [X] We should have a lua interpreter for that
|
|
- [X] cmake search for lua : to get the same version as minetest game,
|
|
use the same =minetest/cmake/Modules/FindLua.cmake= file
|
|
- [X] Update README with this new dependency
|
|
- [X] In an unique Factions.h/cpp
|
|
The main function is in mapper.cpp
|
|
- [X] get the factions.conf file : we need the world dir
|
|
- [X] create a lua interpreter : we're using LuaJIT
|
|
- Can't link with lua (lua_open())
|
|
see https://riptutorial.com/lua/example/16238/embedded-lua-interpreter-with-custom-api-and-lua-customization
|
|
- [X] I don't think we need luagit : we don't search it in CMakeLists.txt
|
|
Simply search for /usr/lib/pkgconfig/lua51.pc
|
|
- [X] Just claimed a parcel in SOLO world
|
|
Can't see it in factions.conf
|
|
faction name is solefact (for player singleplayer)
|
|
it should be in 'parcels' retry
|
|
- [X] Tried https://github.com/vinniefalco/LuaBridge, not interesting
|
|
- [X] Must get factions.conf lua object in C++
|
|
- [X] cmake must search for luabridge : not needed, trying with basci lua
|
|
- [X] Try to print factions names
|
|
- [X] Try to get lua lib with debug symbols
|
|
liblua5.1.so.0 => liblua5.1-0
|
|
- [X] Use luaAccess function to print for given names
|
|
We have a segfault in the while (Lua_Next(l, -2)) of lua_access()
|
|
- [X] Try to read current string : =attempt to call a table value=
|
|
- [X] Retry to read factions file
|
|
Always the =attempt to call a table value= issue
|
|
Maybe openning with dofile can't work
|
|
- [X] Try with luaL_loadfile()
|
|
see https://cpp.hotexamples.com/examples/-/-/luaL_loadfile/cpp-lual_loadfile-function-examples.html
|
|
We have another error
|
|
- [X] Now, we have a table, try to print its content (in ::printLuaTable)
|
|
- [X] Again, we have a segfault
|
|
- [X] Start to implement models
|
|
- [X] We need a list of factions (with a name and a color)
|
|
- [X] May be randomized (name and color)
|
|
- [X] Should know how color are stored
|
|
Struct Color is in include/Image.h
|
|
- [X] Cmake should search for gd.h
|
|
- [X] New lua error
|
|
- [X] On factionCreationTest/, we actually get a table using dofile
|
|
Now, I get newFaction => (null)
|
|
Trying a recursive call when getting a null value
|
|
- [X] `make check` fail :
|
|
When we can't open lua file, FactionsHandler call exit(1) : fix that
|
|
- [-] We must be able to extract faction name from factions'.conf lua file
|
|
- [X] Unit test that
|
|
Not sure we have <filesystem> (C++17): now, yes
|