Peter Nelson
b85ecf9ac2
Codechange: Replace pointer to Sprite array with reference to SpriteCollection. ( #11580 )
...
Add `SpriteLoader::SpriteCollection` type which is an array of `SpriteLoad::Sprite`.
This removes the ambiguity of what `SpriteLoader::Sprite *` is pointing to,
and cleans up mismatches using both dereference -> and array access [] for the
same object.
6 months ago
rubidium42
cb8612ba79
Remove: ZOOM_LVL_COUNT
...
This is the only enumeration with a COUNT and END. The logic of the COUNT
implied that BEGIN could be non-zero, but all but two uses of zoom level
assume that BEGIN is zero, making the separate count only confusing.
7 months ago
Peter Nelson
49dae08a3b
Codechange: Add missing override specifiers.
9 months ago
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
12 months ago
Patric Stout
199e41c762
Codechange: use default dtor instead of empty ( #10826 )
1 year ago
Rubidium
4a5a9f57c4
Fix: conversion to smaller type warnings
1 year ago
PeterN
db573c8742
Fix #10660 : Sprite Font scale affected by viewport zoom level limits. ( #10668 )
1 year ago
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Rubidium
51049946d1
Fix: prevent corrupted GRF files to allocate stupid amounts of memory
2 years ago
Patric Stout
1fb101eabb
Codechange: address CodeQL issue "Multiplication result converted to larger type" ( #10306 )
...
Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
2 years ago
Jonathan G Rennison
5e413c9dcd
Fix #9804 : Only apply sprite_zoom_min setting when sprites available ( #9988 )
...
Only discard sprite zoom levels when a suitable higher zoom level is
defined in the same colour mode
This is to avoid placeholder or empty sprites being used, causing
visual artefacts
2 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
rubidium42
e588923bff
Codechange: add std::string accepting SetDParamStr to ErrorMessageData
3 years ago
Rubidium
fdc11a9f94
Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality
3 years ago
Matt Kimber
bcb3313e13
Feature: allow setting maximum zoom level at which sprites are drawn ( #8604 )
3 years ago
Michael Lutz
70aa3b4011
Codechange: Give sprite encoders a hint which colour components of a sprite are filled with useful information.
3 years ago
Michael Lutz
e7e5316340
Add: Allow sprite encoders (blitters) to specify an alignment for sprite width and height.
3 years ago
Michael Lutz
02e8741457
Codechange: Allow for using a sprite encoder that is not the currently active blitter when loading a sprite.
3 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
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.
4 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Michael Lutz
38729297f9
Codechange: No need for AutoFreePtr if there's std::unique_ptr.
5 years ago
peter1138
1088ad48fc
(svn r27004) -Codechange: Make GUI size apply to (sprite-font) text as well.
10 years ago
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
10 years ago
rubidium
70b2093ddb
(svn r26132) -Fix-ish: prevent issues due to overflowing multiplications by limiting the size of full zoom sprites to about 32kix32ki
11 years ago
michi_cc
44abdccfd0
(svn r23898) -Remove: PNG sprite loader.
13 years ago
michi_cc
2c3bca6ad9
(svn r23897) -Feature: [NewGRF] 32bpp sprites in GRFs.
13 years ago
michi_cc
c9e664d4cb
(svn r23894) -Fix (r23893): Use the right variable, not the one that's always going to be 0.
13 years ago
michi_cc
4702924f6e
(svn r23893) -Change: [NewGRF] Extended chunked sprite encoding to work for bigger sprites.
13 years ago
michi_cc
5c1cc27b03
(svn r23890) -Add: [NewGRF] Support for RealSprites with multiple zoom levels.
13 years ago
michi_cc
e85d5b5d31
(svn r23889) -Codechange: Centralise sprite resizing in one place. (peter1138)
13 years ago
michi_cc
6db39410a1
(svn r23887) -Feature: [NewGRF] Support for container version 2.
13 years ago
michi_cc
5af68295b0
(svn r23881) -Codechange: Move GRF sprite decoding into a separate function.
13 years ago
peter1138
3ef77e55c5
(svn r23670) -Feature: Add ability to adjust brightness of colour after remapping for 32bpp sprites
13 years ago
rubidium
fd559171b4
(svn r23527) -Codechange: unify colo(u)r as far as it goes
13 years ago
rubidium
58423b26d1
(svn r23474) -Codechange: move the declaration error related functions to error.h
13 years ago
peter1138
8be8d5e843
(svn r23324) -Fix (r15555): Don't free reusable buffer.
13 years ago
peter1138
81598273e9
(svn r23316) -Feature: Add ability to zoom in to 2x and 4x level.
13 years ago
peter1138
15d0a22aac
(svn r23315) -Codechange: Only encode sprites for zoom levels that will be used.
13 years ago
frosch
ca1df3ddab
(svn r23008) -Add: Palette detection and conversion for the M part of 32bpp sprites.
13 years ago
frosch
b910ae9886
(svn r22878) -Fix (r22873-ish): Check range before casting to uint16.
13 years ago
michi_cc
6c7cbb1d46
(svn r22873) -Fix [FS#4747]: Validate image dimensions before loading. (Based on patch by monoid)
13 years ago
rubidium
b4edc30c64
(svn r22827) -Codechange: pass the/a more proper sub directory when opening (some) files instead of the default one
13 years ago
rubidium
2a12c9df2f
(svn r22825) -Codechange: pass subdir to FioOpenFile
13 years ago
frosch
bbcd2bab5d
(svn r22419) -Change: Always use the DOS palette for drawing.
...
-Remove: the '-i' option for palette selection.
13 years ago
rubidium
5a620d1c65
(svn r22406) -Document: some more "random-ish" tidbits
13 years ago
rubidium
7eba2bf4d3
(svn r21890) -Cleanup: remove some unneeded includes
14 years ago
rubidium
eb299736c1
(svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n].
14 years ago
alberth
be6c058424
(svn r20211) -Codechange: Indented code should have curly braces around it.
14 years ago
rubidium
51ea33f92f
(svn r19628) -Change: support the tRNS chunk to read transparency information for RGB PNGs (Szvengar)
14 years ago