Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 3f9b40a

Browse files
committed
Merge branch 'development' into CF112-FMOD-Fixes
# Conflicts: # GUI/GUISound.cpp - Resolved using mine then changed file extensions back to flac # System/ContentFile.cpp - Resolved using theirs then re-removed extra newline in error message
2 parents ee254ae + 3316949 commit 3f9b40a

25 files changed

+214
-159
lines changed

Activities/AreaEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ int AreaEditor::Start()
214214
m_pSaveDialogBox = dynamic_cast<GUICollectionBox *>(m_pGUIController->GetControl("SaveDialogBox"));
215215

216216
// Set the background image of the parent collection box
217-
// ContentFile backgroundFile("Base.rte/GUIs/BuyMenuBackground.bmp");
217+
// ContentFile backgroundFile("Base.rte/GUIs/BuyMenuBackground.png");
218218
// m_pSaveDialogBox->SetDrawImage(new AllegroBitmap(backgroundFile.GetAsBitmap()));
219219
// m_pSaveDialogBox->SetDrawBackground(true);
220220
// m_pSaveDialogBox->SetDrawType(GUICollectionBox::Image);

Activities/GAScripted.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,10 @@ int GAScripted::Create(const GAScripted &reference)
107107

108108
int GAScripted::ReadProperty(std::string propName, Reader &reader)
109109
{
110-
if (propName == "ScriptFile")
111-
reader >> m_ScriptPath;
112-
else if (propName == "LuaClassName")
110+
if (propName == "ScriptFile") {
111+
reader >> m_ScriptPath;
112+
CorrectBackslashesInPaths(m_ScriptPath);
113+
} else if (propName == "LuaClassName")
113114
reader >> m_LuaClassName;
114115
else if (propName == "AddPieSlice")
115116
{

Activities/GibEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ int GibEditor::Start()
221221
m_pSaveDialogBox = dynamic_cast<GUICollectionBox *>(m_pGUIController->GetControl("SaveDialogBox"));
222222

223223
// Set the background image of the parent collection box
224-
// ContentFile backgroundFile("Base.rte/GUIs/BuyMenuBackground.bmp");
224+
// ContentFile backgroundFile("Base.rte/GUIs/BuyMenuBackground.png");
225225
// m_pSaveDialogBox->SetDrawImage(new AllegroBitmap(backgroundFile.GetAsBitmap()));
226226
// m_pSaveDialogBox->SetDrawBackground(true);
227227
// m_pSaveDialogBox->SetDrawType(GUICollectionBox::Image);

Activities/SceneEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ int SceneEditor::Start()
226226
m_pSaveDialogBox = dynamic_cast<GUICollectionBox *>(m_pGUIController->GetControl("SaveDialogBox"));
227227

228228
// Set the background image of the parent collection box
229-
// ContentFile backgroundFile("Base.rte/GUIs/BuyMenuBackground.bmp");
229+
// ContentFile backgroundFile("Base.rte/GUIs/BuyMenuBackground.png");
230230
// m_pSaveDialogBox->SetDrawImage(new AllegroBitmap(backgroundFile.GetAsBitmap()));
231231
// m_pSaveDialogBox->SetDrawBackground(true);
232232
// m_pSaveDialogBox->SetDrawType(GUICollectionBox::Image);

CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
137137

138138
- GUI sliders (like for music volume) can now be adjusted with the mouse scroll wheel.
139139

140-
- Exposed PEmitter to lua. Bindings are identical to AEmitter's bindings, except that damage-related bindings don't exist for PEmitter.
140+
- Exposed `PEmitter` to lua. Bindings are identical to `AEmitter` bindings, except that damage-related bindings don't exist for `PEmitter`.
141+
142+
- `FLAC` audio files can now be loaded through lua and ini.
141143

142144
### Changed
143145

@@ -221,17 +223,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
221223

222224
**Note:** Changing the game window resolution while an Activity is active requires ending the Activity. A dialog box will appear asking to confirm the change.
223225

224-
- Moved from C-style random number generation to C++ standard. This includes usage of an mt19937 random number generator.
225-
For C++ coders the functions SelectRand, PosRand and RangeRand have been replaced by the function template RandomNum() and its overload RandomNum(T min, T max). The function NormalRand has been replaced by the function template RandomNormalNum(). For lua coders there is no change.
226+
- Moved from C-style random number generation to C++ standard. This includes usage of a `mt19937` random number generator.
226227

227228
- Resolution validation changed to support multiple screens. Incompatible/bad resolution settings will be overridden at startup with messages explaining the issue.
228229
**Note:** For multi-screen to work properly, the left-most screen MUST be set as primary. Screens having different resolutions does not actually matter but different heights will still be warned about and overridden due to the likeliness of GUI elementes being cropped on the shortest screen.
229230
Resolution validation can be disabled for multi-screen setups with `Settings.ini` property `DisableMultiScreenResolutionValidation`. Bad settings are likely to crash, use at own risk.
230231
For setups with more than 3 screens `DisableMultiScreenResolutionValidation` must be set true.
231232

232-
- Damage to actors from impulses is now relative to their max health instead of being on a scale from 0 to 100.
233+
- Damage to `Actors` from impulses is now relative to their max health instead of being on a scale from 0 to 100.
233234

234-
- Scenes with a PresetName containing the strings "Test", "Editor" and "Tutorial" are no longer excluded from the scenarios screen and from the metagame.
235+
- `Scenes` with a `PresetName` containing the strings "Test", "Editor" and "Tutorial" are no longer excluded from the scenarios screen and from the MetaGame.
235236

236237
### Fixed
237238

Entities/Actor.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -258,31 +258,31 @@ int Actor::Create(const Actor &reference)
258258
// Only load the static AI mode icons once
259259
if (!m_sIconsLoaded)
260260
{
261-
ContentFile noTeamFile("Base.rte/GUIs/TeamIcons/NoTeam.bmp");
261+
ContentFile noTeamFile("Base.rte/GUIs/TeamIcons/NoTeam.png");
262262
m_apNoTeamIcon = noTeamFile.GetAsAnimation(2);
263263

264-
ContentFile iconFile("Base.rte/GUIs/PieIcons/Blank000.bmp");
264+
ContentFile iconFile("Base.rte/GUIs/PieIcons/Blank000.png");
265265
m_apAIIcons[AIMODE_NONE] = iconFile.GetAsBitmap();
266266
m_apAIIcons[AIMODE_BOMB] = iconFile.GetAsBitmap();
267-
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Eye000.bmp");
267+
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Eye000.png");
268268
m_apAIIcons[AIMODE_SENTRY] = iconFile.GetAsBitmap();
269-
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Cycle000.bmp");
269+
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Cycle000.png");
270270
m_apAIIcons[AIMODE_PATROL] = iconFile.GetAsBitmap();
271-
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/GoTo000.bmp");
271+
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/GoTo000.png");
272272
m_apAIIcons[AIMODE_GOTO] = iconFile.GetAsBitmap();
273-
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Brain000.bmp");
273+
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Brain000.png");
274274
m_apAIIcons[AIMODE_BRAINHUNT] = iconFile.GetAsBitmap();
275-
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Dig000.bmp");
275+
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Dig000.png");
276276
m_apAIIcons[AIMODE_GOLDDIG] = iconFile.GetAsBitmap();
277-
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Return000.bmp");
277+
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Return000.png");
278278
m_apAIIcons[AIMODE_RETURN] = iconFile.GetAsBitmap();
279-
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Land000.bmp");
279+
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Land000.png");
280280
m_apAIIcons[AIMODE_STAY] = iconFile.GetAsBitmap();
281-
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Launch000.bmp");
281+
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Launch000.png");
282282
m_apAIIcons[AIMODE_DELIVER] = iconFile.GetAsBitmap();
283-
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Death000.bmp");
283+
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Death000.png");
284284
m_apAIIcons[AIMODE_SCUTTLE] = iconFile.GetAsBitmap();
285-
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Follow000.bmp");
285+
iconFile.SetDataPath("Base.rte/GUIs/PieIcons/Follow000.png");
286286
m_apAIIcons[AIMODE_SQUAD] = iconFile.GetAsBitmap();
287287

288288
ContentFile arrowFile("Base.rte/GUIs/Indicators/SelectArrow.png");

Entities/GlobalScript.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ int GlobalScript::Create(const GlobalScript &reference)
6161

6262
int GlobalScript::ReadProperty(std::string propName, Reader &reader)
6363
{
64-
if (propName == "ScriptPath")
65-
reader >> m_ScriptPath;
66-
else if (propName == "LuaClassName")
64+
if (propName == "ScriptPath") {
65+
reader >> m_ScriptPath;
66+
CorrectBackslashesInPaths(m_ScriptPath);
67+
} else if (propName == "LuaClassName")
6768
reader >> m_LuaClassName;
6869
else if (propName == "LateUpdate")
6970
reader >> m_LateUpdate;

Entities/MovableObject.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,11 @@ int MovableObject::ReadProperty(std::string propName, Reader &reader)
331331
reader >> newSlice;
332332
PieMenuGUI::AddAvailableSlice(newSlice);
333333
}
334-
else if (propName == "ScriptPath")
335-
{
336-
std::string scriptPath = reader.ReadPropValue();
337-
if (LoadScript(scriptPath) == -2) { reader.ReportError("Duplicate script path " + scriptPath); }
338-
}
339-
else if (propName == "ScreenEffect")
340-
{
334+
else if (propName == "ScriptPath") {
335+
std::string scriptPath = reader.ReadPropValue();
336+
CorrectBackslashesInPaths(scriptPath);
337+
if (LoadScript(scriptPath) == -2) { reader.ReportError("Duplicate script path " + scriptPath); }
338+
} else if (propName == "ScreenEffect") {
341339
reader >> m_ScreenEffectFile;
342340
m_pScreenEffect = m_ScreenEffectFile.GetAsBitmap();
343341
m_ScreenEffectHash = m_ScreenEffectFile.GetHash();

GUI/GUISound.cpp

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -39,77 +39,77 @@ namespace RTE {
3939
int GUISound::Create() {
4040
// Interface sounds should not be pitched to reinforce the appearance of time decoupling between simulation and UI.
4141

42-
m_SplashSound.Create("Base.rte/Sounds/GUIs/MetaStart.wav", true, false);
42+
m_SplashSound.Create("Base.rte/Sounds/GUIs/MetaStart.flac", true, false);
4343

44-
m_EnterMenuSound.Create("Base.rte/Sounds/GUIs/MenuEnter.wav", true, false);
44+
m_EnterMenuSound.Create("Base.rte/Sounds/GUIs/MenuEnter.flac", true, false);
4545

46-
m_ExitMenuSound.Create("Base.rte/Sounds/GUIs/MenuExit1.wav", true, false);
47-
m_ExitMenuSound.AddSound("Base.rte/Sounds/GUIs/MenuExit2.wav", true);
46+
m_ExitMenuSound.Create("Base.rte/Sounds/GUIs/MenuExit1.flac", true, false);
47+
m_ExitMenuSound.AddSound("Base.rte/Sounds/GUIs/MenuExit2.flac", true);
4848

49-
m_FocusChangeSound.Create("Base.rte/Sounds/GUIs/FocusChange.wav", true, false);
49+
m_FocusChangeSound.Create("Base.rte/Sounds/GUIs/FocusChange.flac", true, false);
5050

51-
m_SelectionChangeSound.Create("Base.rte/Sounds/GUIs/SelectionChange.wav", true, false);
51+
m_SelectionChangeSound.Create("Base.rte/Sounds/GUIs/SelectionChange.flac", true, false);
5252

53-
m_ItemChangeSound.Create("Base.rte/Sounds/GUIs/ItemChange.wav", true, false);
53+
m_ItemChangeSound.Create("Base.rte/Sounds/GUIs/ItemChange.flac", true, false);
5454

55-
m_ButtonPressSound.Create("Base.rte/Sounds/GUIs/ButtonPress.wav", true, false);
55+
m_ButtonPressSound.Create("Base.rte/Sounds/GUIs/ButtonPress.flac", true, false);
5656

57-
m_BackButtonPressSound.Create("Base.rte/Sounds/GUIs/BackButtonPress.wav", true, false);
57+
m_BackButtonPressSound.Create("Base.rte/Sounds/GUIs/BackButtonPress.flac", true, false);
5858

59-
m_ConfirmSound.Create("Base.rte/Sounds/GUIs/MenuExit1.wav", true, false);
59+
m_ConfirmSound.Create("Base.rte/Sounds/GUIs/MenuExit1.flac", true, false);
6060

61-
m_UserErrorSound.Create("Base.rte/Sounds/GUIs/UserError.wav", true, false);
61+
m_UserErrorSound.Create("Base.rte/Sounds/GUIs/UserError.flac", true, false);
6262

63-
m_TestSound.Create("Base.rte/Sounds/GUIs/Test.wav", true, false);
63+
m_TestSound.Create("Base.rte/Sounds/GUIs/Test.flac", true, false);
6464

65-
m_PieMenuEnterSound.Create("Base.rte/Sounds/GUIs/PieMenuEnter.wav", true, false);
65+
m_PieMenuEnterSound.Create("Base.rte/Sounds/GUIs/PieMenuEnter.flac", true, false);
6666

67-
m_PieMenuExitSound.Create("Base.rte/Sounds/GUIs/PieMenuExit.wav", true, false);
67+
m_PieMenuExitSound.Create("Base.rte/Sounds/GUIs/PieMenuExit.flac", true, false);
6868

69-
// m_HoverChangeSound.Create("Base.rte/Sounds/GUIs/SelectionChange.wav", true, false);
69+
// m_HoverChangeSound.Create("Base.rte/Sounds/GUIs/SelectionChange.flac", true, false);
7070
m_HoverChangeSound = m_SelectionChangeSound;
7171

72-
// m_HoverDisabledSound.Create("Base.rte/Sounds/GUIs/PlacementBlip.wav", true, false);
72+
// m_HoverDisabledSound.Create("Base.rte/Sounds/GUIs/PlacementBlip.flac", true, false);
7373
m_HoverDisabledSound = m_PlacementBlip;
7474

75-
m_SlicePickedSound.Create("Base.rte/Sounds/GUIs/SlicePicked.wav", true, false);
75+
m_SlicePickedSound.Create("Base.rte/Sounds/GUIs/SlicePicked.flac", true, false);
7676

77-
// m_DisabledPickedSound.Create("Base.rte/Sounds/GUIs/PieMenuExit.wav", true, false);
77+
// m_DisabledPickedSound.Create("Base.rte/Sounds/GUIs/PieMenuExit.flac", true, false);
7878
m_DisabledPickedSound = m_PieMenuExitSound;
7979

80-
m_FundsChangedSound.Create("Base.rte/Sounds/GUIs/FundsChanged1.wav", true, false);
81-
m_FundsChangedSound.AddSound("Base.rte/Sounds/GUIs/FundsChanged2.wav", true);
82-
m_FundsChangedSound.AddSound("Base.rte/Sounds/GUIs/FundsChanged3.wav", true);
83-
m_FundsChangedSound.AddSound("Base.rte/Sounds/GUIs/FundsChanged4.wav", true);
84-
m_FundsChangedSound.AddSound("Base.rte/Sounds/GUIs/FundsChanged5.wav", true);
85-
m_FundsChangedSound.AddSound("Base.rte/Sounds/GUIs/FundsChanged6.wav", true);
80+
m_FundsChangedSound.Create("Base.rte/Sounds/GUIs/FundsChanged1.flac", true, false);
81+
m_FundsChangedSound.AddSound("Base.rte/Sounds/GUIs/FundsChanged2.flac", true);
82+
m_FundsChangedSound.AddSound("Base.rte/Sounds/GUIs/FundsChanged3.flac", true);
83+
m_FundsChangedSound.AddSound("Base.rte/Sounds/GUIs/FundsChanged4.flac", true);
84+
m_FundsChangedSound.AddSound("Base.rte/Sounds/GUIs/FundsChanged5.flac", true);
85+
m_FundsChangedSound.AddSound("Base.rte/Sounds/GUIs/FundsChanged6.flac", true);
8686

87-
m_ActorSwitchSound.Create("Base.rte/Sounds/GUIs/ActorSwitch.wav", true, false);
87+
m_ActorSwitchSound.Create("Base.rte/Sounds/GUIs/ActorSwitch.flac", true, false);
8888

89-
m_BrainSwitchSound.Create("Base.rte/Sounds/GUIs/BrainSwitch.wav", true, false);
89+
m_BrainSwitchSound.Create("Base.rte/Sounds/GUIs/BrainSwitch.flac", true, false);
9090

91-
m_CameraTravelSound.Create("Base.rte/Sounds/GUIs/CameraTravel1.wav", true, false);
92-
m_CameraTravelSound.AddSound("Base.rte/Sounds/GUIs/CameraTravel2.wav", true);
93-
m_CameraTravelSound.AddSound("Base.rte/Sounds/GUIs/CameraTravel3.wav", true);
91+
m_CameraTravelSound.Create("Base.rte/Sounds/GUIs/CameraTravel1.flac", true, false);
92+
m_CameraTravelSound.AddSound("Base.rte/Sounds/GUIs/CameraTravel2.flac", true);
93+
m_CameraTravelSound.AddSound("Base.rte/Sounds/GUIs/CameraTravel3.flac", true);
9494

95-
// m_AreaPickedSound.Create("Base.rte/Sounds/GUIs/MenuEnter.wav", true, false);
95+
// m_AreaPickedSound.Create("Base.rte/Sounds/GUIs/MenuEnter.flac", true, false);
9696
m_AreaPickedSound = m_ConfirmSound;
9797

98-
// m_ObjectPickedSound.Create("Base.rte/Sounds/GUIs/MenuEnter.wav", true, false);
98+
// m_ObjectPickedSound.Create("Base.rte/Sounds/GUIs/MenuEnter.flac", true, false);
9999
m_ObjectPickedSound = m_ConfirmSound;
100100

101-
// m_PurchaseMadeSound.Create("Base.rte/Sounds/GUIs/MenuEnter.wav", true, false);
101+
// m_PurchaseMadeSound.Create("Base.rte/Sounds/GUIs/MenuEnter.flac", true, false);
102102
m_PurchaseMadeSound = m_ConfirmSound;
103103

104-
m_PlacementBlip.Create("Base.rte/Sounds/GUIs/PlacementBlip.wav", true, false);
104+
m_PlacementBlip.Create("Base.rte/Sounds/GUIs/PlacementBlip.flac", true, false);
105105

106-
m_PlacementThud.Create("Base.rte/Sounds/GUIs/PlacementThud1.wav", true, false);
107-
m_PlacementThud.AddSound("Base.rte/Sounds/GUIs/PlacementThud2.wav", true);
106+
m_PlacementThud.Create("Base.rte/Sounds/GUIs/PlacementThud1.flac", true, false);
107+
m_PlacementThud.AddSound("Base.rte/Sounds/GUIs/PlacementThud2.flac", true);
108108

109-
m_PlacementGravel.Create("Base.rte/Sounds/GUIs/PlacementGravel1.wav", true, false);
110-
m_PlacementGravel.AddSound("Base.rte/Sounds/GUIs/PlacementGravel2.wav", true);
111-
m_PlacementGravel.AddSound("Base.rte/Sounds/GUIs/PlacementGravel3.wav", true);
112-
m_PlacementGravel.AddSound("Base.rte/Sounds/GUIs/PlacementGravel4.wav", true);
109+
m_PlacementGravel.Create("Base.rte/Sounds/GUIs/PlacementGravel1.flac", true, false);
110+
m_PlacementGravel.AddSound("Base.rte/Sounds/GUIs/PlacementGravel2.flac", true);
111+
m_PlacementGravel.AddSound("Base.rte/Sounds/GUIs/PlacementGravel3.flac", true);
112+
m_PlacementGravel.AddSound("Base.rte/Sounds/GUIs/PlacementGravel4.flac", true);
113113

114114
return 0;
115115
}

Main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ void ReinitMainMenu() {
186186
g_pScenarioGUI->Destroy();
187187
g_MetaMan.GetGUI()->Destroy();
188188

189+
g_ConsoleMan.Destroy();
190+
g_ConsoleMan.Create();
191+
189192
InitMainMenu();
190193
g_FrameMan.DestroyTempBackBuffers();
191194
g_HadResolutionChange = true;

0 commit comments

Comments
 (0)