Commit Graph

36 Commits

Author SHA1 Message Date
Richard Wheeler
2b92577f5c Fix: Add shading to river slopes
Adds a 32bpp shading to the river rapids/slopes to make them more visible. Requires a bump of original graphics grfs to use container version 2. Fixes #9031
2023-11-26 23:54:10 +01:00
Peter Nelson
872fdcbbab
Change: When building NewGRFs, use grfid (from grfcodec) to calculate NewGRF MD5 hash. (#11492)
This allows for v2 container NewGRFs to be created. Hashes are needed for building the baseset metadata, so the .hash files are stored the source tree so they can be built if grfcodec and grfid are not present.

The hash of openttd.grf is not actually needed, but it is simpler to leave it in than handle only orig_extra.grf.
2023-11-26 15:59:41 +00:00
Rubidium
f9b5bc7ee6 Cleanup: the need for SQAutoFreePointers has gone 2023-05-14 22:54:10 +02:00
Rubidium
d9e93edc8b Codechange: replace 'const char *' script API parameters with std::string 2023-05-14 22:54:10 +02:00
Rubidium
77177f7e8b Add: support for std::string parameters in the script API 2023-05-14 22:54:10 +02:00
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. (#10663)
This avoids a (soft) namespace conflict between the four ST_* enums.
2023-04-16 20:00:55 +01:00
Michael Lutz
9b3326e3fd Codechange: [Script] Use std::vector instead of a hand-rolled alternative. 2023-02-24 21:46:27 +01:00
Michael Lutz
ca3cb4d2ef Codechange: [Script] Use a class template instead of a function template for squirrel type conversion.
Class templates allow using partial template specialization, which is useful in
case one wants to have a type conversion on a type that is itself templated.
2023-02-24 21:46:27 +01:00
Rubidium
67e1d1ad89 Fix: no need to cast enums down to int32; they will be automatically promoted to int64 2023-01-31 20:09:48 +01:00
Rubidium
042f90a9dd Fix: no ScriptEvent sub class should export constructors to scripts 2023-01-25 22:28:30 +01:00
Loïc Guilloux
0afa6f2424
Codechange: [CMake] Auto-fill list of #include in script_window.hpp (#10103) 2022-10-24 12:35:58 +02:00
glx22
906613e83a Change: [CMake] Disable newgrf scan for regression check 2022-05-27 19:57:50 +02:00
Loïc Guilloux
7331149dde
Codechange: [CMake] Pass API files list via a file to minimise command line length (#9874) 2022-05-01 00:39:59 +02:00
Patric Stout
eca73a810c Change: rebrand 1.12.0 to 12.0
One question that keeps popping up: "when do we release 2.0?".
NewGRF will force that at least 1.16 will be 2.0, but to not wait
for this, let's drop the "1." and be for ever done with that
conversation.

We are following in the footstep of giants here.
2021-08-15 12:28:51 +02:00
Rubidium
3237e97b35 Cleanup: [Script] Use nullptr instead of 0 or NULL 2021-06-17 16:18:30 +02:00
Loïc Guilloux
076f3d26c2
Fix #9329: [CMake] FindVersion.cmake relied on internal cmake variable (#9330) 2021-06-10 22:14:08 +02:00
glx22
aca20092aa Fix: [CMake] Check nforenum and grfcodec return value 2021-04-24 21:16:06 +02:00
Loïc Guilloux
d4f0b6f434
Fix: [CMake] Auto-fill version details in rev.cpp and ottres.rc (#9066) 2021-04-20 21:38:46 +02:00
Patric Stout
501087058e Fix: [CMake] if the regex for STABLETAG is empty, it means it is stable
This feels a bit inside out, but it makes sense: if there are no
"beta1" or "RC1" mentions, it means it is a stable release.
2021-04-01 13:26:34 +02:00
glx22
35a228f78f Add: [CMake] Install menu and media files 2021-03-09 22:42:25 +01:00
glx22
b5770acd50 Codechange: [CMake] Add checks for baseset script parameters 2021-03-09 22:42:25 +01:00
glx22
349dc568ea Fix: [CMake] Remove timestamps from regression output 2021-03-04 16:22:58 +01:00
glx22
b67245d71e Fix: [CMake] CMake may use || at the end of custom commands 2021-02-22 23:17:45 +01:00
glx22
97d554feb1 Codechange: On regression failure, output the result in a file 2021-01-09 23:48:09 +01:00
Michael Lutz
a660dce295 Fix: [CMake, MSVC] Don't copy regression exe's into a subfolder as they need have their lang files next to them. 2020-12-13 22:45:50 +01:00
glx22
6fae0b83d9 Add: [CMake] targets to generate documentation 2020-12-12 15:48:04 +01:00
Charles Pigott
348c231e12 Codechange: Make codestyle for CMake files consistent for 'control' statements 2020-09-25 14:43:13 +01:00
Michael Lutz
7d66540af5 Fix: [CMake] Don't strip final newline from regression output.
The expected regression output files all end with a newline. As such, we have to make sure we capture the output from OpenTTD with the last newline intact.
2020-07-27 17:26:19 +01:00
glx
4079c47b6c Change: rewrote squirrel_export in CMake 2020-07-16 00:53:26 +02:00
glx
8794c61f25 Change: rewrote generate_widget in CMake 2020-07-16 00:53:26 +02:00
Dan Villiom Podlaski Christiansen
70905ee82e Fix: fix building release tags
I tried building a tag, and got this error:

CMake Error at cmake/scripts/FindVersion.cmake:85 (string):
  string sub-command REGEX, mode REPLACE: regex "^[0-9.]*$" matched an empty
  string.
2020-06-30 09:43:00 +01:00
glx
877d196ef5 Fix: Incorrect REV_YEAR, and parsing of .ottdrev 2020-06-05 22:32:07 +02:00
Patric Stout
4218ebc932 Fix: [AzurePipelines] switch the CI / CD to CMake too
This also means dropping Debian/jessie, as it has a CMake that is
too old (3.0), with no real path to upgrade.
2020-06-05 19:36:05 +02:00
Patric Stout
56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
2020-06-05 19:36:05 +02:00
Patric Stout
85315e2e31 Codechange: rework how grf and ob[msg] are generated
For grfs, it now uses CMake scripts to do its job, and both grf
files are split into their own folder to make more clear what is
going on. Additionally, it no longer builds in-source (although the
resulting grf is copied back in the source folder).

For ob[msg] it now uses CMake scripts to generate the translation
files; the result is no longer stored in-source (but in the build
folder).

Although all files are available to create the GRFs and basesets, it
won't really work till CMake is introduced (which will happen in a
few commits from here)
2020-06-05 19:36:05 +02:00
Patric Stout
203a77c1dc Codechange: move regression outside of bin and make it work via CMake script
The tst_stationlist savegame had to be changed to start the correct
AI. In the old setup, all regression AIs had the same name, which
made it impossible to run both regressions in parallel. With the new
setup this is possible.

Although all files are available to run the regression, it won't
really work till CMake is introduced (which will happen in a few
commits from here)
2020-06-05 19:36:05 +02:00