From e8f3523a381d7a799a0b81892217fff5d082f98b Mon Sep 17 00:00:00 2001 From: Robert Vokac Date: Fri, 9 Aug 2024 14:23:38 +0200 Subject: [PATCH] Changes --- .../compatibility/FeatureLevel.java | 18 +-- .../{GraphicsMode.java => Language.java} | 6 +- .../Publisher.java} | 8 +- .../compatibility/ReleaseVersion.java | 2 +- .../com/openeggbert/entity/common/Cheat.java | 2 +- .../entity/common/GameExecution.java | 2 - .../{EggbertSound.java => MusicType.java} | 20 ++- .../openeggbert/entity/common/SoundType.java | 115 ++++++++++++++++++ .../com/openeggbert/entity/common/Utils.java | 2 +- 9 files changed, 152 insertions(+), 23 deletions(-) rename core/src/main/java/com/openeggbert/compatibility/{GraphicsMode.java => Language.java} (96%) rename core/src/main/java/com/openeggbert/{entity/common/EggbertMusic.java => compatibility/Publisher.java} (90%) rename core/src/main/java/com/openeggbert/entity/common/{EggbertSound.java => MusicType.java} (75%) create mode 100644 core/src/main/java/com/openeggbert/entity/common/SoundType.java diff --git a/core/src/main/java/com/openeggbert/compatibility/FeatureLevel.java b/core/src/main/java/com/openeggbert/compatibility/FeatureLevel.java index 3cf1b83..b236bbf 100644 --- a/core/src/main/java/com/openeggbert/compatibility/FeatureLevel.java +++ b/core/src/main/java/com/openeggbert/compatibility/FeatureLevel.java @@ -26,19 +26,21 @@ import lombok.Getter; * @author robertvokac */ public enum FeatureLevel { - SPEEDY_BLUPI_DEMO(ReleaseType.BLUPI, ReleaseVersion.DEMO), - SPEEDY_BLUPI_I(ReleaseType.BLUPI, ReleaseVersion.ONE), - SPEEDY_BLUPI_II(ReleaseType.BLUPI, ReleaseVersion.TWO), - SPEEDY_EGGBERT_DEMO(ReleaseType.EGGBERT, ReleaseVersion.DEMO), - SPEEDY_EGGBERT_1(ReleaseType.EGGBERT, ReleaseVersion.ONE), - SPEEDY_EGGBERT_2(ReleaseType.EGGBERT, ReleaseVersion.TWO), - OPEN_EGGBERT_3(ReleaseType.OPEN, ReleaseVersion.THREE); + SPEEDY_BLUPI_DEMO(ReleaseType.BLUPI, ReleaseVersion.DEMO, Publisher.EPSITEC_SA), + SPEEDY_BLUPI_I(ReleaseType.BLUPI, ReleaseVersion.ONE, Publisher.EPSITEC_SA), + SPEEDY_BLUPI_II(ReleaseType.BLUPI, ReleaseVersion.TWO, Publisher.EPSITEC_SA), + SPEEDY_EGGBERT_DEMO(ReleaseType.EGGBERT, ReleaseVersion.DEMO, Publisher.E_GAMES), + SPEEDY_EGGBERT_1(ReleaseType.EGGBERT, ReleaseVersion.ONE, Publisher.E_GAMES), + SPEEDY_EGGBERT_2(ReleaseType.EGGBERT, ReleaseVersion.TWO, Publisher.E_GAMES), + SPEEDY_EGGBERT_VALUEWARE(ReleaseType.EGGBERT, ReleaseVersion.VALUEWARE, Publisher.E_GAMES), + SPEEDY_BLUPI_FOR_WINDOWS_PHONE(ReleaseType.BLUPI, ReleaseVersion.WINDOWS_PHONE, Publisher.DADA_GAMES), + OPEN_EGGBERT_3(ReleaseType.OPEN, ReleaseVersion.THREE, Publisher.OPEN_EGGBERT); @Getter private final ReleaseType releaseType; @Getter private final ReleaseVersion releaseVersion; - private FeatureLevel(ReleaseType releaseType, ReleaseVersion releaseVersion) { + private FeatureLevel(ReleaseType releaseType, ReleaseVersion releaseVersion, Publisher publisher) { this.releaseType = releaseType; this.releaseVersion = releaseVersion; } diff --git a/core/src/main/java/com/openeggbert/compatibility/GraphicsMode.java b/core/src/main/java/com/openeggbert/compatibility/Language.java similarity index 96% rename from core/src/main/java/com/openeggbert/compatibility/GraphicsMode.java rename to core/src/main/java/com/openeggbert/compatibility/Language.java index 7abde1b..56ae060 100644 --- a/core/src/main/java/com/openeggbert/compatibility/GraphicsMode.java +++ b/core/src/main/java/com/openeggbert/compatibility/Language.java @@ -17,14 +17,12 @@ // or write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. /////////////////////////////////////////////////////////////////////////////////////////////// - - package com.openeggbert.compatibility; /** * * @author robertvokac */ -public enum GraphicsMode { - ORIGINAL, NEW; +public class Language { + } diff --git a/core/src/main/java/com/openeggbert/entity/common/EggbertMusic.java b/core/src/main/java/com/openeggbert/compatibility/Publisher.java similarity index 90% rename from core/src/main/java/com/openeggbert/entity/common/EggbertMusic.java rename to core/src/main/java/com/openeggbert/compatibility/Publisher.java index b0eaec6..11555ab 100644 --- a/core/src/main/java/com/openeggbert/entity/common/EggbertMusic.java +++ b/core/src/main/java/com/openeggbert/compatibility/Publisher.java @@ -17,14 +17,12 @@ // or write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. /////////////////////////////////////////////////////////////////////////////////////////////// - - -package com.openeggbert.entity.common; +package com.openeggbert.compatibility; /** * * @author robertvokac */ -public enum EggbertMusic { - +public enum Publisher { + EPSITEC_SA, E_GAMES, DADA_GAMES, OPEN_EGGBERT; } diff --git a/core/src/main/java/com/openeggbert/compatibility/ReleaseVersion.java b/core/src/main/java/com/openeggbert/compatibility/ReleaseVersion.java index 6700a69..aad2c9b 100644 --- a/core/src/main/java/com/openeggbert/compatibility/ReleaseVersion.java +++ b/core/src/main/java/com/openeggbert/compatibility/ReleaseVersion.java @@ -26,5 +26,5 @@ package com.openeggbert.compatibility; * @author robertvokac */ public enum ReleaseVersion { - DEMO, ONE, TWO, THREE + DEMO, ONE, TWO, WINDOWS_PHONE, VALUEWARE, THREE; } diff --git a/core/src/main/java/com/openeggbert/entity/common/Cheat.java b/core/src/main/java/com/openeggbert/entity/common/Cheat.java index be77cf8..228f408 100644 --- a/core/src/main/java/com/openeggbert/entity/common/Cheat.java +++ b/core/src/main/java/com/openeggbert/entity/common/Cheat.java @@ -30,7 +30,7 @@ import lombok.Getter; */ public enum Cheat { - MEGABLUPI(Utils.ALL__COMPATIBILITY_MODES); + MEGABLUPI(Utils.ALL_FEATURE_LEVELS); //todo//todo @Getter diff --git a/core/src/main/java/com/openeggbert/entity/common/GameExecution.java b/core/src/main/java/com/openeggbert/entity/common/GameExecution.java index 9f199c0..e7f78f5 100644 --- a/core/src/main/java/com/openeggbert/entity/common/GameExecution.java +++ b/core/src/main/java/com/openeggbert/entity/common/GameExecution.java @@ -22,7 +22,6 @@ package com.openeggbert.entity.common; import com.openeggbert.compatibility.FeatureLevel; -import com.openeggbert.compatibility.GraphicsMode; import com.openeggbert.compatibility.ResolutionMode; import lombok.Data; @@ -34,7 +33,6 @@ import lombok.Data; public class GameExecution { private FeatureLevel compatibilityMode; private ResolutionMode resolutionMode = ResolutionMode.RESOLUTION_640_480; - private GraphicsMode graphicsMode = GraphicsMode.ORIGINAL; private Boolean cheatsEnabled = true; } diff --git a/core/src/main/java/com/openeggbert/entity/common/EggbertSound.java b/core/src/main/java/com/openeggbert/entity/common/MusicType.java similarity index 75% rename from core/src/main/java/com/openeggbert/entity/common/EggbertSound.java rename to core/src/main/java/com/openeggbert/entity/common/MusicType.java index 412a396..89080e7 100644 --- a/core/src/main/java/com/openeggbert/entity/common/EggbertSound.java +++ b/core/src/main/java/com/openeggbert/entity/common/MusicType.java @@ -21,10 +21,28 @@ package com.openeggbert.entity.common; +import com.openeggbert.compatibility.FeatureLevel; +import lombok.Getter; + /** * * @author robertvokac */ -public enum EggbertSound { +public enum MusicType { + MUSIC1(0), + MUSIC2(1), + MUSIC3(2), + MUSIC4(3), + MUSIC5(4), + MUSIC6(5), + MUSIC7(6), + MUSIC8(7), + MUSIC9(8), + MUSIC10(9); + @Getter + private int number; + MusicType(int numberIn, FeatureLevel... featureLevels) { + this.number = numberIn; + } } diff --git a/core/src/main/java/com/openeggbert/entity/common/SoundType.java b/core/src/main/java/com/openeggbert/entity/common/SoundType.java new file mode 100644 index 0000000..5240c80 --- /dev/null +++ b/core/src/main/java/com/openeggbert/entity/common/SoundType.java @@ -0,0 +1,115 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Open Eggbert: Free recreation of the computer game Speedy Eggbert. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + + +package com.openeggbert.entity.common; + +import com.openeggbert.compatibility.FeatureLevel; +import lombok.Getter; + +/** + * + * @author robertvokac + */ +public enum SoundType { + CLICK(0), + MEDIUM_JUMP(1), + HIGH_JUMP(2), + FALLING_ON_FLOOR(3), + HEAD_WAS_BANGED_THE_HEAD_SOUND(4), + TURNING_ON_THE_OTHER_SIDE(5), + ALMOST_FALLED(6), + LOOKING_DOWN(7), + INSTANT_DEATH(8), + NEW_LIFE(9), + EXPLOSION(10), + ONE_TREASURE_WAS_COLLECTED(11), + ONE_EGG_WAS_COLLECTED(12), + REACHED_GOAL_BUT_NOT_TREASURES_ARE_COLLECTED(13), + REACHED_GOAL_BUT_AND_ALL_TREASURES_ARE_COLLECTED(14), + HELICOPTER_IS_BEING_STARTED(15), + HELICOPTER_IS_WORKING(16), + HELICOPTER_IS_BEING_STOPPED(17), + HELICOPTER_IS_WORKING_IN_REDUCED_POWER(18), + //19 + //20 + //21 + LOG_JUMP(22), + FALLING_IN_WATER(23), + SWIMMING_IN_WATER(24), + SAILING_TO_WATER_SURFACE(25), + DROWNED_IN_THE_WATER(26), + //27 + JEEP_IS_BEING_STARTED(28), + JEEP_IS_WORKING(29), + JEEP_IS_BEING_STOPPED(30), + JEEP_IS_WORKING_IN_REDUCED_POWER(31), + GOODBYE_BEFORE_VISITING_ANOTHER_WORLD(32), + OPENING_DOORS(33), + //34 + //35 + MONKEY_SOUND_IF_TOO_LONG_HANGING_ON_BAR_WITHOUT_AN_ACTIVITY(36), + FEET_TAPPING(37), + PUSHING_CASE_FORWARD(38), + PULLING_CASE_BACKWARD(39), + HEAD_WAS_BANGED_THE_BLUPI_VOICE(40), + JUMPING_FROM_SPRING(41), + COLLECTED_SHIELD_AND_INSTANTLY_USING(42), + SHIELD_LOST_EFFECT(43), + LOLLIPOP_EFFECT_STARTED(44), + LOLLIPOP_EFFECT_ENDED(45), + SIGHING_FROM_THE_FATIGUE_OF_PUSHING_THE_CASE(46), + //47 + ANGRY_FROM_PULLING_THE_CASE_FOR_TOO_LONG_TIME(48), + FEAR(49), + LICKING_LOLLIPOP(50), + //51 + //52 + EMPTY_TANK(53), + //54 + RECHARGING_DEVICE_EFFECT_STARTING(55), + RECHARGING_DEVICE_EFFECT_ENDING(56), + DRINKING_INVISIBILITY_POTION(57), + //58 + //59 + HAPPY_BECAUSE_COLLECTED_ONE_DYNAMITE(60), + HAPPY_BECAUSE_FIRED_ONE_DYNAMITE(61), + //62 + //63 + SPLASH_OF_WATER(64), + STICKING_OUT_THE_TONGUE(65), + //66-69 + CRUSHER_EFFECT(70), + //71 + BRIDGE_IS_COLLAPSING(72); + + + + +//LAST_TREASURE_WAS_COLLECTED(12) + + ; + @Getter + private int number; + SoundType(int numberIn, FeatureLevel... featureLevels) { + this.number = numberIn; + } + +} diff --git a/core/src/main/java/com/openeggbert/entity/common/Utils.java b/core/src/main/java/com/openeggbert/entity/common/Utils.java index 53a6b53..03d714e 100644 --- a/core/src/main/java/com/openeggbert/entity/common/Utils.java +++ b/core/src/main/java/com/openeggbert/entity/common/Utils.java @@ -31,5 +31,5 @@ public class Utils { private Utils() { //Instantiate not needed. } - public static final FeatureLevel[] ALL__COMPATIBILITY_MODES = FeatureLevel.values(); + public static final FeatureLevel[] ALL_FEATURE_LEVELS = FeatureLevel.values(); }