You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
Fix some bitmaps being loaded directly, skipping alternative extension logic and causing crashes when extensions mismatch (followup to 022510c)
Add flag to not store in static map to ContentFile::GetAsBitmap
Changed ContentFile::LoadAndReleaseBitmap and ContentFile::LoadAndReleaseSample to access specifier to private
Copy file name to clipboardExpand all lines: System/ContentFile.h
+21-17Lines changed: 21 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -119,9 +119,10 @@ namespace RTE {
119
119
/// Gets the data represented by this ContentFile object as an Allegro BITMAP, loading it into the static maps if it's not already loaded. Note that ownership of the BITMAP is NOT transferred!
120
120
/// </summary>
121
121
/// <param name="conversionMode">The Allegro color conversion mode to use when loading this bitmap.</param>
122
+
/// <param name="storeBitmap">Whether to store the BITMAP in the relevant static map after loading it or not.</param>
122
123
/// <param name="dataPathToSpecificFrame">Path to a specific frame when loading an animation to avoid overwriting the original preset DataPath when loading each frame.</param>
123
124
/// <returns>Pointer to the BITMAP loaded from disk.</returns>
/// Gets the data represented by this ContentFile object as an array of Allegro BITMAPs, each representing a frame in the animation.
@@ -132,15 +133,6 @@ namespace RTE {
132
133
/// <returns>Pointer to the beginning of the array of BITMAP pointers loaded from the disk, the length of which is specified with the FrameCount argument.</returns>
133
134
BITMAP ** GetAsAnimation(int frameCount = 1, int conversionMode = 0);
134
135
135
-
/// <summary>
136
-
/// Loads and transfers the data represented by this ContentFile object as an Allegro BITMAP. Ownership of the BITMAP IS transferred!
137
-
/// Note that this is relatively slow since it reads the data from disk each time.
138
-
/// </summary>
139
-
/// <param name="conversionMode">The Allegro color conversion mode to use when loading this bitmap. Only applies the first time a bitmap is loaded from the disk.</param>
140
-
/// <param name="dataPathToSpecificFrame">Path to a specific frame when loading an animation to avoid overwriting the original preset DataPath when loading each frame.</param>
141
-
/// <returns>Pointer to the BITMAP loaded from disk.</returns>
/// Gets the data represented by this ContentFile object as an FMOD FSOUND_SAMPLE, loading it into the static maps if it's not already loaded. Ownership of the FSOUND_SAMPLE is NOT transferred!
146
138
/// </summary>
@@ -149,13 +141,6 @@ namespace RTE {
149
141
/// <returns>Pointer to the FSOUND_SAMPLE loaded from disk.</returns>
/// Loads and transfers the data represented by this ContentFile object as an FMOD FSOUND_SAMPLE. Ownership of the FSOUND_SAMPLE is NOT transferred!
154
-
/// </summary>
155
-
/// <param name="abortGameForInvalidSound">Whether to abort the game if the sound couldn't be added, or just show a console error. Default true.</param>
156
-
/// <param name="asyncLoading">Whether to enable FMOD asynchronous loading or not. Should be disabled for loading audio files with Lua AddSound.
157
-
/// <returns>Pointer to the FSOUND_SAMPLE loaded from disk.</returns>
/// Loads and transfers the data represented by this ContentFile object as an Allegro BITMAP. Ownership of the BITMAP IS transferred!
181
+
/// Note that this is relatively slow since it reads the data from disk each time.
182
+
/// </summary>
183
+
/// <param name="conversionMode">The Allegro color conversion mode to use when loading this bitmap. Only applies the first time a bitmap is loaded from the disk.</param>
184
+
/// <param name="dataPathToSpecificFrame">Path to a specific frame when loading an animation to avoid overwriting the original preset DataPath when loading each frame.</param>
185
+
/// <returns>Pointer to the BITMAP loaded from disk.</returns>
/// Loads and transfers the data represented by this ContentFile object as an FMOD FSOUND_SAMPLE. Ownership of the FSOUND_SAMPLE is NOT transferred!
190
+
/// </summary>
191
+
/// <param name="abortGameForInvalidSound">Whether to abort the game if the sound couldn't be added, or just show a console error. Default true.</param>
192
+
/// <param name="asyncLoading">Whether to enable FMOD asynchronous loading or not. Should be disabled for loading audio files with Lua AddSound.
193
+
/// <returns>Pointer to the FSOUND_SAMPLE loaded from disk.</returns>
0 commit comments