Commit Graph

20 Commits

Author SHA1 Message Date
Peter Nelson ae575a7a5b Codechange: Store text run positions in vector of points.
This simplifies the interlaced vector of x/y positions.
2024-01-19 00:08:31 +00:00
Peter Nelson a5b6e17556 Codechange: Make geometry methods constexpr. 2024-01-16 21:57:05 +00:00
Peter Nelson 102fc6a9d1
Cleanup: iif should be iff (if-and-only-if) (#11570) 2023-12-10 12:05:28 +00:00
Peter Nelson 62e4d1e507 Codechange: Dimension must have both width and height.
Default parameters allowed Dimension to be constructed with only a width.

Instead use separate empty and width/height constructors to ensure that either none or both are provided.
2023-12-02 15:23:05 +00:00
Peter Nelson 7d48a3f073
Codechange: Move RectPadding::zero definition to header. (#11461)
This potentially allows better inlining/optimization.
2023-11-16 17:07:29 +00:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
PeterN a7adadcf9b
Fix: Indent production in industry window and resolve button issues. (#10184)
Industry production used to be indented, although a different amount than
the industry accepts list. This is now added back, with the standard indent
width.

Additionally the cheat-mode production modifier buttons now support RTL and
the list height now takes account of the button height.
2022-11-19 21:18:53 +00:00
Peter Nelson 75b222b0d9 Add: RectPadding type.
This is similar to Rect but specifies padding to apply to a Rect.
2022-11-12 18:28:39 +00:00
Peter Nelson d8e01f8aa5 Codechange: Add some Rect helpers.
Shrink/Expand/Translate are marked nodiscard as they provide a new Rect
rather than modifying the original Rect.
2022-11-12 18:28:39 +00:00
Peter Nelson 5ff15443e9 Cleanup: Replace single-use Pair struct with std::pair.
This struct is defined in geometry_type but not used by any geometry-related
code, only for subsidy code where both parameters are cast from int to
NewsReferenceType.
2021-04-21 21:39:00 +02:00
TechGeekNZ 716c883737 Fix: Globally apply preprocessor directive coding style
Global; except for the 32-bit SSE blitter, which has some #DEFINEs
in not-very-nice places.
2020-07-03 09:08:46 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
glx 9195f2337a Codechange: use std::vector for _resolutions 2019-04-18 21:49:34 +02:00
Patric Stout 7784d77713 Remove: MorphOS / AmigaOS support
In 10 years there is no commit to change how MorphOS works, and we
have no active maintainer for it. It is unlikely it works in its
current state (but not impossible).

With the arrival of SDL2 (and removal of SDL), MorphOS is no longer
support. There is an SDL2 port for MorphOS, but it is not maintained
by upstream SDL2, and nobody can currently test it out.

If anyone wants to re-add MorphOS, please do (revert this patch,
fix the problems, and create a Pull Request). If you need any help
doing so, let us know! It is not that we don't like MorphOS, it is
that we don't have anyone fixing the problems :(
2019-03-05 22:03:00 +01:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
alberth 9b070b5405 (svn r16677) -Codechange: Dimension width and height are unsigned. 2009-06-27 20:53:45 +00:00
rubidium 72eb1f100b (svn r12936) -Doc: a few structs in geometry_type.hpp. Patch by Alberth. 2008-05-04 08:38:21 +00:00
egladil 22f79df328 (svn r11688) -Fix [FS#1581]: Compilation was broken on OS X again. 2007-12-23 18:08:39 +00:00
skidd13 da5d3a7b3b (svn r11687) -Codechange: move some defines to a better place 2007-12-23 14:06:03 +00:00
rubidium 8f0e68285b (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type. 2007-12-22 23:30:28 +00:00