Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codechange: Replace all FILE * with FileHandle RAII class. #3

Closed
wants to merge 73 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
0c7faa4
Update: Translations from eints
Aug 6, 2024
19cf605
Update: Translations from eints
Aug 7, 2024
e1b9a3e
Fix: Excessively fast ships on aqueducts fail to move at correct speed
JGRennison Aug 7, 2024
cfeab64
Update: Translations from eints
Aug 8, 2024
daa4981
Fix 77f27e08: Crash due to incorrect use of AirportSpec::GetIndex
JGRennison Aug 8, 2024
c69e236
Update: Translations from eints
Aug 9, 2024
0c4dcd5
Update: Translations from eints
Aug 10, 2024
574ec4e
Update: Translations from eints
Aug 11, 2024
0633b94
Update: Translations from eints
Aug 12, 2024
f829b1d
Codechange: Replace BmpData palette and bitmap with vectors.
PeterN May 15, 2024
d0d5c5c
Codechange: Pass BmpInfo and BmpData as references.
PeterN May 15, 2024
367e508
Codefix: Resolve CodeQL warnings by converting to size_t.
PeterN Aug 10, 2024
bdd16ee
Update: Translations from eints
Aug 13, 2024
55ca1c7
Codefix: Remove dead code for WID_SIL_FILTER_ENTER_BTN in sign window…
JGRennison Aug 13, 2024
7a698c7
Fix #12365: Company Window now displays proper inauguration year and …
Vinixss Jun 18, 2024
4cddb3a
Fix 12860, 2bada59: Timetable does not show vehicles as early
ivpravdin Jul 20, 2024
88110e9
Fix: Train unit ID allocation when moving engine to new train at trai…
JGRennison Aug 13, 2024
79369a8
Codechange: Don't mark tiles dirty when deleting from animated tile l…
PeterN Aug 1, 2024
8754846
Codechange: Allow adding to animated tile list without marking dirty.
PeterN Aug 1, 2024
1ff35cb
Codechange: Don't mark animated tiles dirty if frame is not changed.
PeterN Aug 1, 2024
39465d7
Codefix: Move saveload of road stop tile data (#12883)
JGRennison Aug 13, 2024
ff972ec
Codechange: Store custom station layouts in a map instead of nested v…
PeterN Aug 14, 2024
f14c152
Update: Translations from eints
Aug 15, 2024
73cb7cd
Update: Translations from eints
Aug 16, 2024
4e11a9c
Update: Translations from eints
Aug 17, 2024
e4c04e8
Update: Translations from eints
Aug 18, 2024
0f0f3d7
Codefix: Delete PersistentStorage when a town is deleted. (#12903)
PeterN Aug 19, 2024
9a037fe
Codechange: Replace malloc/free with vector when padding sprites.
PeterN Aug 18, 2024
0594628
Codechange: Replace malloc/free with vector when loading heightmap data.
PeterN Aug 7, 2024
c4a638d
Codechange: Replace malloc/free with vector for screenshot buffers.
PeterN Aug 8, 2024
4224d08
Codechange: Replace malloc/free with vector for TGP heightmap process…
PeterN Aug 8, 2024
2327b70
Codechange: Use std::string to load ini file comments. (#12909)
PeterN Aug 21, 2024
d325231
Update: Translations from eints
Aug 23, 2024
3be96c6
Update: Translations from eints
Aug 24, 2024
4070cf9
Codefix: LinkGraphOverlay::dirty was never initialised
JGRennison Aug 23, 2024
b5264a7
Codechange: [NewGRF] Use reference to unique_ptr instead of .get() (#…
PeterN Aug 24, 2024
719763d
Codechange: Store start and end position in RandomAccessFile.
PeterN May 15, 2024
cb23651
Codechange: Replace BmpBuffer with RandomAccessFile.
PeterN May 15, 2024
9eaa00c
Update: Translations from eints
Aug 26, 2024
bb770b7
Update: Translations from eints
Aug 29, 2024
2eb3e77
Update: Translations from eints
Aug 31, 2024
ef7ad26
Update: Translations from eints
Sep 1, 2024
b80f205
Update: Translations from eints
Sep 2, 2024
f2a8e18
Fix 208952f: incorrect truncation in string setting validation
rubidium42 Sep 2, 2024
34c09b3
Update: Translations from eints
Sep 3, 2024
1d90761
Update: Translations from eints
Sep 4, 2024
c1f8569
Update: Translations from eints
Sep 5, 2024
92cbf7a
Update: Translations from eints
Sep 6, 2024
d5ff6b4
Fix 8d62a8f0: Road stop variable 6B crashing for road stop preview in…
JGRennison Sep 6, 2024
5c243ee
Fix: Road stop availability callback (#12931)
JGRennison Sep 7, 2024
69aa6f6
Doc: Add missing road waypoint map bits to landscape documents (#12922)
JGRennison Sep 7, 2024
29ff3d7
Fix: DupSprite did not copy the control_flags field (#12906)
PeterN Sep 7, 2024
cb2f4f3
Fix: Picker window 'used' filter for rail waypoints
JGRennison Aug 22, 2024
81b684a
Codefix: StationUsesDefaultType always returned false for rail waypoints
JGRennison Aug 22, 2024
d8c3653
Update: Translations from eints
Sep 10, 2024
d0b3e0c
Fix: Crash in GetGameStringPtr when there are no GS strings (#12933)
JGRennison Sep 10, 2024
27efa57
Change: Standardize filter button strings (#12847)
2TallTyler Sep 10, 2024
e477706
Codechange: Add AssignBit function to assign the value of a single bi…
JGRennison Sep 10, 2024
2d51659
Fix d8c36536: \u200B is not allowed in translations. (#12935)
PeterN Sep 10, 2024
bed2a06
Update: Translations from eints
Sep 12, 2024
6deee5e
Fix: Train curve detection did not take shortened parts into account.…
PeterN Sep 12, 2024
9631c68
Codefix: Implement explicit ByteReader::PeekDWord() instead of type-p…
PeterN Sep 12, 2024
7f5a3ea
Codefix: Avoid type-casting function pointer with incorrect type. (#1…
PeterN Sep 12, 2024
ad5da0c
Codechange: Use `__VA_OPT__(,)` instead of `, ##` (#12921)
PeterN Sep 12, 2024
45a5868
Update: Translations from eints
Sep 13, 2024
59b1856
Update: Translations from eints
Sep 14, 2024
9eb28de
Codechange: Return reference from GetNextParameterPointer.
PeterN Jul 30, 2024
b449839
Codechange: Pass span instead of vector to HaveDParamChanged.
PeterN Jul 30, 2024
3d8d0e0
Codechange: Use std::variant to store string parameter data.
PeterN Jul 29, 2024
d1463f4
Codechange: Treat reading incorrect parameter type as a string error.
PeterN Aug 1, 2024
c277ff1
Fix #12901: Savegame format of company allow lists
JGRennison Aug 21, 2024
2a5a0b0
Codechange: No longer allow saving of incorrect string container tabl…
JGRennison Aug 21, 2024
0f21ddd
Codechange: Replace all FILE * with FileHandle RAII class.
PeterN Mar 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmake/CompileFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ macro(compile_flags)
# C++11 standard". We need C++11 for the way we use threads.
add_compile_options(/Zc:rvalueCast)

# Needed for __VA_OPT__() in macros.
add_compile_options(/Zc:preprocessor)

if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(
/MP # Enable multi-threaded compilation.
Expand Down
18 changes: 17 additions & 1 deletion docs/landscape.html
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,22 @@ <h3><a name="Landscape">Landscape</a></h3>
</td>
</tr>

<tr>
<td nowrap valign=top><tt>04</tt>..<tt>05</tt>&nbsp; </td>
<td align=left>road waypoints
<table>
<tr>
<td><tt>04</tt>&nbsp; </td>
<td align=left>drive through X</td>
</tr>
<tr>
<td><tt>05</tt>&nbsp; </td>
<td align=left>drive through Y</td>
</tr>
</table>
</td>
</tr>

<tr>
<td nowrap valign=top><tt>00</tt>..<tt>05</tt>&nbsp; </td>
<td align=left>ship dock
Expand Down Expand Up @@ -1016,7 +1032,7 @@ <h3><a name="Landscape">Landscape</a></h3>
<li>m8 bit 15: Snow or desert present (road waypoints)</li>
<li>m8 bits 11..6: <a href="#TramType">Tramtype</a></li>
<li>m8 bits 5..0: <a href="#TrackType">track type</a> for railway stations/waypoints</li>
<li>m8 bits 5..0: custom road stop id; 0 means standard graphics</li>
<li>m8 bits 5..0: custom road stop/waypoint id; 0 means standard graphics</li>
</ul>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/landscape_grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ <h3 style="font-weight: bold;">Landscape</h3>
<tr>
<td class="caption">road waypoint</td>
<td class="bits"><span class="used" title="Owner of tram">XXXX</span> <span class="used" title="Pavement type">XX</span><span class="free">OO</span></td>
<td class="bits"><span class="used" title="Snow/desert present">X</span><span class="free">OOO</span> <span class="used" title="Tram type">XXXX XX<span class="free">OO OOOO</span></td>
<td class="bits"><span class="used" title="Snow/desert present">X</span><span class="free">OOO</span> <span class="used" title="Tram type">XXXX XX</span> <span class="used" title="Custom road stops specifications ID">XXXXXX</span></td>
</tr>
<tr>
<td class="caption">airport</td>
Expand Down
2 changes: 1 addition & 1 deletion src/airport_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ class BuildAirportWindow : public PickerWindowBase {
if (as->IsAvailable()) {
_selected_airport_class = cls.Index();
this->vscroll->SetCount(cls.GetSpecCount());
this->SelectOtherAirport(as->GetIndex());
this->SelectOtherAirport(as->index);
return;
}
}
Expand Down
9 changes: 4 additions & 5 deletions src/animated_tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,17 @@ void DeleteAnimatedTile(TileIndex tile)
if (to_remove != _animated_tiles.end()) {
/* The order of the remaining elements must stay the same, otherwise the animation loop may miss a tile. */
_animated_tiles.erase(to_remove);
MarkTileDirtyByTile(tile);
}
}

/**
* Add the given tile to the animated tile table (if it does not exist
* on that table yet). Also increases the size of the table if necessary.
* Add the given tile to the animated tile table (if it does not exist yet).
* @param tile the tile to make animated
* @param mark_dirty whether to also mark the tile dirty.
*/
void AddAnimatedTile(TileIndex tile)
void AddAnimatedTile(TileIndex tile, bool mark_dirty)
{
MarkTileDirtyByTile(tile);
if (mark_dirty) MarkTileDirtyByTile(tile);
include(_animated_tiles, tile);
}

Expand Down
2 changes: 1 addition & 1 deletion src/animated_tile_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "tile_type.h"

void AddAnimatedTile(TileIndex tile);
void AddAnimatedTile(TileIndex tile, bool mark_dirty = true);
void DeleteAnimatedTile(TileIndex tile);
void AnimateAnimatedTiles();
void InitializeAnimatedTiles();
Expand Down
4 changes: 2 additions & 2 deletions src/base_station_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ struct BaseStation : StationPool::PoolItem<&_station_pool> {
}

private:
void SetRoadStopTileData(TileIndex tile, uint8_t data, bool animation);
bool SetRoadStopTileData(TileIndex tile, uint8_t data, bool animation);

public:
inline void SetRoadStopRandomBits(TileIndex tile, uint8_t random_bits) { this->SetRoadStopTileData(tile, random_bits, false); }
inline void SetRoadStopAnimationFrame(TileIndex tile, uint8_t frame) { this->SetRoadStopTileData(tile, frame, true); }
inline bool SetRoadStopAnimationFrame(TileIndex tile, uint8_t frame) { return this->SetRoadStopTileData(tile, frame, true); }
void RemoveRoadStopTileData(TileIndex tile);

static void PostDestructor(size_t index);
Expand Down
Loading