From 1ac69c2c75eed3efa7177e290f7e27afac0aece2 Mon Sep 17 00:00:00 2001 From: elasota Date: Tue, 30 Mar 2021 05:24:37 -0400 Subject: [PATCH] Misc tweaks, partially bump version to 1.1 --- AerofoilWeb/BuildAerofoilSDL.bat | 2 +- AerofoilWeb/BuildGpApp.bat | 2 +- AerofoilWeb/BuildGpShell.bat | 2 +- AerofoilWeb/Link.bat | 2 +- GpApp/HouseIO.cpp | 6 ++++++ GpApp/Main.cpp | 2 +- GpApp/Sound.cpp | 24 ++++++++++++++++++++++++ GpCommon/GpBuildVersion.h | 6 +++--- 8 files changed, 38 insertions(+), 8 deletions(-) diff --git a/AerofoilWeb/BuildAerofoilSDL.bat b/AerofoilWeb/BuildAerofoilSDL.bat index 3f64240..580b599 100644 --- a/AerofoilWeb/BuildAerofoilSDL.bat +++ b/AerofoilWeb/BuildAerofoilSDL.bat @@ -1,6 +1,6 @@ set INPUT_DIR=../AerofoilSDL set OUTPUT_DIR=obj -set FLAGS=-s USE_SDL=2 -flto -I../GpCommon/ -I../PortabilityLayer/ -I../Common/ -s ASYNCIFY -O0 -DGP_DEBUG_CONFIG=0 +set FLAGS=-s USE_SDL=2 -flto -I../GpCommon/ -I../PortabilityLayer/ -I../Common/ -s ASYNCIFY -O3 -DGP_DEBUG_CONFIG=0 emcc -c %INPUT_DIR%/AerofoilSDL_Combined.cpp -o %OUTPUT_DIR%/AerofoilSDL_Combined.o %FLAGS% diff --git a/AerofoilWeb/BuildGpApp.bat b/AerofoilWeb/BuildGpApp.bat index f18b9eb..5eb22b3 100644 --- a/AerofoilWeb/BuildGpApp.bat +++ b/AerofoilWeb/BuildGpApp.bat @@ -1,6 +1,6 @@ set INPUT_DIR=../GpApp set OUTPUT_DIR=obj -set FLAGS=-s USE_SDL=2 -flto -I../GpCommon/ -I../PortabilityLayer/ -I../Common/ -s ASYNCIFY -O0 -DGP_DEBUG_CONFIG=0 +set FLAGS=-s USE_SDL=2 -flto -I../GpCommon/ -I../PortabilityLayer/ -I../Common/ -s ASYNCIFY -O3 -DGP_DEBUG_CONFIG=0 emcc -c %INPUT_DIR%/GpApp_Combined.cpp -o %OUTPUT_DIR%/GpApp_Combined.o %FLAGS% diff --git a/AerofoilWeb/BuildGpShell.bat b/AerofoilWeb/BuildGpShell.bat index 5c06b0d..d055597 100644 --- a/AerofoilWeb/BuildGpShell.bat +++ b/AerofoilWeb/BuildGpShell.bat @@ -1,6 +1,6 @@ set INPUT_DIR=../GpShell set OUTPUT_DIR=obj -set FLAGS=-s USE_SDL=2 -flto -I../GpCommon/ -I../PortabilityLayer/ -I../Common/ -s ASYNCIFY -O0 -DGP_DEBUG_CONFIG=0 +set FLAGS=-s USE_SDL=2 -flto -I../GpCommon/ -I../PortabilityLayer/ -I../Common/ -s ASYNCIFY -O3 -DGP_DEBUG_CONFIG=0 emcc -c %INPUT_DIR%/GpShell_Combined.cpp -o %OUTPUT_DIR%/GpShell_Combined.o %FLAGS% diff --git a/AerofoilWeb/Link.bat b/AerofoilWeb/Link.bat index f1ff6c4..9950709 100644 --- a/AerofoilWeb/Link.bat +++ b/AerofoilWeb/Link.bat @@ -1,5 +1,5 @@ set INPUT_DIR=. set OUTPUT_DIR=bin -set FLAGS=-flto -O0 -g -s USE_SDL=2 -s USE_ZLIB=1 -s ASYNCIFY -s ASYNCIFY_IGNORE_INDIRECT -s INITIAL_MEMORY=33554432 -s ASYNCIFY_ADVISE +set FLAGS=-flto -O3 -s USE_SDL=2 -s USE_ZLIB=1 -s ASYNCIFY -s ASYNCIFY_IGNORE_INDIRECT -s INITIAL_MEMORY=33554432 -s ASYNCIFY_ADVISE emcc obj/AerofoilWeb_Combined.o obj/AerofoilWeb_Resources.o obj/GpShell_Combined.o obj/AerofoilSDL_Combined.o obj/GpApp_Combined.o obj/PortabilityLayer_Combined.o obj/MacRomanConversion.o -o %OUTPUT_DIR%/aerofoil.html %FLAGS% diff --git a/GpApp/HouseIO.cpp b/GpApp/HouseIO.cpp index f6d7e3a..16a433a 100644 --- a/GpApp/HouseIO.cpp +++ b/GpApp/HouseIO.cpp @@ -12,6 +12,7 @@ #include "FileManager.h" #include "GpIOStream.h" #include "House.h" +#include "IGpLogDriver.h" #include "IGpSystemServices.h" #include "ObjectEdit.h" #include "ResourceManager.h" @@ -858,6 +859,11 @@ Boolean QuerySaveChanges (void) void YellowAlert (short whichAlert, short identifier) { + IGpLogDriver *logger = PLDrivers::GetLogDriver(); + + if (logger) + logger->Printf(IGpLogDriver::Category_Warning, "Yellow alert %i identifier %i", static_cast(whichAlert), static_cast(identifier)); + #define kYellowAlert 1006 Str255 errStr, errNumStr; short whoCares; diff --git a/GpApp/Main.cpp b/GpApp/Main.cpp index f731985..e229e82 100644 --- a/GpApp/Main.cpp +++ b/GpApp/Main.cpp @@ -599,7 +599,7 @@ int AppStartup() FlushResolutionChange(); } - ShowInitialLaunchDisclaimer(); + //ShowInitialLaunchDisclaimer(); } if (thisMac.isResolutionDirty) diff --git a/GpApp/Sound.cpp b/GpApp/Sound.cpp index 94d1bf2..c69b0dc 100644 --- a/GpApp/Sound.cpp +++ b/GpApp/Sound.cpp @@ -10,12 +10,15 @@ #include "PLSound.h" #include "DialogManager.h" #include "Externs.h" +#include "IGpLogDriver.h" #include "MemoryManager.h" #include "ResourceManager.h" #include "SoundSync.h" #include "VirtualDirectory.h" #include "WaveFormat.h" +#include "PLDrivers.h" + #define kBaseBufferSoundID 1000 #define kMaxSounds 64 @@ -273,26 +276,47 @@ void DumpBufferSounds (void) PLError_t OpenSoundChannels (void) { + IGpLogDriver *logger = PLDrivers::GetLogDriver(); + if (channelOpen) + { + if (logger) + logger->Printf(IGpLogDriver::Category_Error, "Audio was already opened?"); return PLErrors::kAudioError; + } channel0 = PortabilityLayer::SoundSystem::GetInstance()->CreateChannel(); if (channel0) channelOpen = true; else + { + if (logger) + logger->Printf(IGpLogDriver::Category_Error, "Audio channel 0 failed to open"); + return PLErrors::kAudioError; + } channel1 = PortabilityLayer::SoundSystem::GetInstance()->CreateChannel(); if (channel1) channelOpen = true; else + { + if (logger) + logger->Printf(IGpLogDriver::Category_Error, "Audio channel 1 failed to open"); + return PLErrors::kAudioError; + } channel2 = PortabilityLayer::SoundSystem::GetInstance()->CreateChannel(); if (channel2) channelOpen = true; else + { + if (logger) + logger->Printf(IGpLogDriver::Category_Error, "Audio channel 2 failed to open"); + return PLErrors::kAudioError; + } return PLErrors::kNone; } diff --git a/GpCommon/GpBuildVersion.h b/GpCommon/GpBuildVersion.h index 29dcae7..e832d25 100644 --- a/GpCommon/GpBuildVersion.h +++ b/GpCommon/GpBuildVersion.h @@ -1,9 +1,9 @@ #pragma once #define GP_BUILD_VERSION_MAJOR 1 -#define GP_BUILD_VERSION_MINOR 0 -#define GP_BUILD_VERSION_UPDATE 17 +#define GP_BUILD_VERSION_MINOR 1 +#define GP_BUILD_VERSION_UPDATE 0 -#define GP_APPLICATION_VERSION_STRING "1.0.17" +#define GP_APPLICATION_VERSION_STRING "1.1.0" #define GP_APPLICATION_COPYRIGHT_STRING "2019-2021 Eric Lasota" #define GP_APPLICATION_WEBSITE_STRING "https://github.com/elasota/Aerofoil"