Commit Graph

96 Commits (master)

Author SHA1 Message Date
Gliese852 af5d52cfd9 Move the System Map to PiGUI
The main idea of the interaction of lua side and C++ side is the same as
in the worldview - the C++ View Class builds three-dimensional objects,
some projected points are passed to the lua script, the lua script only
works with screen coordinates.

The difference between the system view and the world view is that not
all objects can have a physical body. If we examine a non-current star
system, we see only system bodies that do not have physical bodies.
Therefore, if for a world view you can simply create an array of
physical bodies, this will not work in a system view.

To solve this problem, struct "Projectable" was created, into which you
can write any point object, system body, ship, Lagrange point,
apocenter, pericenter, etc. Now all these objects can be processed in a
single array.

The names of the types of these objects are recorded in an enum, which
is exported to a enum_table.cpp and read by the script as integers at
the start. I thought it was better to avoid passing strings in such a
hot place in the code. (runs for every object in every frame) Therefore,
type names are written and transmitted as integers.

All colors are now imported from lua: color index names are listed in
the enum, which is exported to the enum_table.cpp. At event
"onGameStart" the lua script reads these names and sends color values to
the class. Now you can change colors at runtime.

* Improvements/fixes: *

- Fix zooming speeds.
- Fix ship's orbits in nonroot frame.
- Remove unused old gui objects.
- Landed ship are now spinning with the planet when rewinding time in a
    planner.
- Now you can center the view on any object, including the player’s ship.
- Add right-click context menu to center or set object as target.
    Therefore, to rotate the view, set the middle button.
- Add indicators for navigation target and combat target.

* Changes in the files explained *

    SystemView.cpp, SystemView.h, system-view-ui.lua, lang/core/en.json

The whole thing, lots of changes. Now the system view draws only the
orbits and the grid. In those places where the icons were drawn, instead
of drawing, they are stored in an array, which is then requested from
the lua.

    LuaEngine.cpp

Add a general function that returns the value of an any enum by name
from an enum_table.cpp (for calling from a lua)

    Space.cpp

Added a notification for the systemview when the ship is removed from
space, because it can be centered at this time, and an segmentation
fault will occur.

    LuaSystemBody.cpp

Added attributes to determine the shape of the icon and set the
navigation target.

    enum_table.cpp, enum_table.h

Rescanned enums to pass color settings and object types between Lua and
C++.

    LuaGame.cpp

The float does not have enough accuracy to display time up to seconds,
change to double.

    icons.svg, themes/default.lua

Add rotate view icon
2020-04-04 11:56:10 +03:00
Webster Sheets d7e1c897da Remove GITHUB_WORKSPACE in clang-format.sh 2020-03-24 13:13:30 -04:00
Webster Sheets b7cfc56b59 Move clang-format to Github Actions
Refactor clang-format, add Github Action
Remove clang-format step from travis
2020-03-23 23:28:39 -04:00
Webster Sheets a91f411822 Update scripts
- better clang-format handling, fix minor issues with deploy script
2020-03-13 14:06:52 -04:00
Karl F 436db08636 Happy new decade!
May you live long and prosper!
2020-01-01 10:47:46 +01:00
Andrew Copland a8c39c6081 OSX cp doesn't allow use of -r or -t, -r can be replaced with -R and -t can be avoided 2019-11-17 13:47:03 +00:00
Webster Sheets 255df01868 Fix several build-tool bugs, cleanup Windows compilation and remove warning messages. 2019-06-02 13:35:38 -04:00
Webster Sheets d627fe1fb4 Fixup minor refactoring errors, fix clang-format script. 2019-06-02 13:33:48 -04:00
Webster Sheets a1f158b118 Improve the clang-format hook and autoformat tool. (#4539)
* Update the clang-format hook for better error handling.

Only clang-format cached files (files staged to be committed).

Don't generate a patch if clang-format errors out.

Don't diff deleted files.

Use bash for variable redirection.
2019-02-19 19:15:22 +01:00
Webster Sheets 97eebfd5bc Only clang-format cached files (files staged to be committed). 2019-02-16 00:39:23 -05:00
Webster Sheets a1bacf8b09 Update hooks, add autoformat tool. 2019-01-06 21:10:29 -05:00
Karl F d2ab921b62 Happy New Year!
Awesome sauce (for next year):
find . -type f -exec sed -i 's/2008-2018 Pioneer Developers'/'2008-2019 Pioneer Developers/g' {} \;

closes #4507
2019-01-03 15:28:42 +01:00
Webster Sheets ed22f42da9 Update build script to use the new binary location. 2018-12-13 10:00:39 -05:00
Webster Sheets 9814c4e8c1 Disable MXE builds for now. 2018-09-27 18:04:08 +02:00
Webster Sheets c78a512ec5 Added travis build script for releases. 2018-09-27 18:04:08 +02:00
Webster Sheets cc066738d3 Clean up the generated patch files when done. 2018-09-13 11:57:56 +02:00
Webster Sheets 79dfd12383 Add a pre-commit hook to run clang-format, optionally applying the format changes. 2018-09-13 11:57:56 +02:00
Webster Sheets e9b782d688 Integrate into travis - hopefully it doesn't break horribly. 2018-09-13 11:57:56 +02:00
Webster Sheets f4e4af7d01 Added a clang-format harness.
Still needs integration with Travis and to be signed off on by the core team,
but it is a functioning static checker.
2018-09-13 11:57:56 +02:00
Karl F 87a1fd7cbf Add new ship Lodos to sketchfab wiki json file 2018-08-03 08:53:38 +02:00
Peter b2c8c37ee1 Fix script for wiki syntax for generating ships table. 2018-08-01 21:22:49 +02:00
Peter 75a64e2cd7 add sketchfab ids to wiki syntax generator 2018-08-01 18:16:03 +02:00
Peter c340631d7a Update wiki_ship_stat_parser.py to current wiki syntax 2018-08-01 17:33:50 +02:00
Karl F c641089251 Updated script for parsing ship files for the wiki
The old version was in lua for parsing ship files defined in lua,
now ships are in json format, and this uses python.
2018-08-01 15:37:09 +02:00
Karl F 7225e9c723 Happy New Year!
Ten years in the making now, but how can we improve upon perfection
for ten more years?
2018-01-01 21:22:12 +01:00
Phil Howlett 7b34dc0fad Tidy up the script and remove the duplicate library. Closes #4181 2017-10-14 22:34:15 +10:00
Phil Howlett b4ee8069e6 Update build script with updated libraries. 2017-10-14 22:28:34 +10:00
Peter 0bd38caa7a Fix enum tables.
Recode files from latin-1 to utf8.
Fix incorrect enum annotations.
2017-05-08 18:44:58 +02:00
Andrew Copland d0f2939fed MERRY HAPPY 2017 2017-01-04 15:17:40 +00:00
Andrew Copland 74d50958fe MERRY HAPPY 2017 2017-01-04 15:11:15 +00:00
Karl F 5f136c83fc Include README.md in official build 2016-08-15 13:51:03 +02:00
Karl F efe09583b3 Exclude source related files from official build 2016-08-15 13:50:42 +02:00
Szlrd 752c19081e Fixing a typo on retro thrust writing an extra "2" on the end of the number, making it ten times more pwerful than it should be. 2016-03-06 12:49:13 +01:00
Szlrd 8bf7089b15 Ship stat planner addon for Blender. Exports ship.json with the same name as the .blend file, to the directory where the .blend file is. 2016-03-06 00:21:04 +01:00
Andrew Copland fea5ac26b2 MERRY HAPPY 2016 2016-01-29 11:31:54 +00:00
John Bartholomew 49c3c6a883 add utility script scripts/move_translation.py 2015-12-25 21:31:38 +00:00
John Bartholomew bec7eec4a2 replace shell+perl canonicalise-translations.sh with a Python script
The Python script is faster, because it processes all the files with a single
process rather than spawning a new perl process for each translation JSON file.

Of course, it could have been written in perl and got the same speedup, but I
don't know perl so Python was easier for me.
2015-12-25 20:39:25 +00:00
John Bartholomew 9e5865730c add script to canonicalise translations 2015-12-19 22:44:25 +00:00
Robert Norris 50c25a65cc explicity link -ldl and -lrt on thirdparty static builds 2015-02-01 14:34:54 +11:00
Robert Norris 664c8f110d update nightly-build to what's actually being used 2015-01-30 22:08:53 +11:00
Robert Norris 9f95339a9d MERRY HAPPY 2014-12-31 23:05:37 +11:00
Andrew Copland b771c66f3d Default configuration for CppCheck, useful for static analysis of codebase. 2014-11-29 13:18:29 +00:00
Lars W. (lwho) fff869efd4 Add galaxy verification script. 2014-09-06 22:43:23 +02:00
Karl F 14bc5e0d3a exclude COMPILING, and SAVEBUMP from build script 2014-08-01 08:33:00 +02:00
Karl F 65b9830d03 indentation fix in nightly build script 2014-08-01 07:54:45 +02:00
Robert Norris 6ce8daaa87 just dump the currently nightly script into the repo. its a mess, yeah 2014-07-31 12:09:10 +10:00
John Bartholomew bca1574a6a modify scan_enums so that it explicitly converts values to int in its data
This is necessary when generating tables for strongly typed enums
(that is, the 'enum class' syntax), because they don't have an implicit
conversion to int.
2014-07-20 15:28:11 +01:00
Karl F 778d62d27c update wiki ship script for new AC33 ship 2014-07-07 10:44:13 +02:00
Karl F a167e25038 wiki ship chart script: varada is in lowercase 2014-06-28 16:46:33 +02:00
Karl F d11e25d077 added Varada to wiki ship chart script 2014-06-28 16:41:19 +02:00