Class Options


  • public class Options
    extends java.lang.Object
    Game options for the Starpoint game.
    • Field Detail

      • SLOW_SPEED

        public static final int SLOW_SPEED
        Speed Constant for slow mode.
        See Also:
        Constant Field Values
      • STANDARD_SPEED

        public static final int STANDARD_SPEED
        Speed Constant for standard mode.
        See Also:
        Constant Field Values
      • FAST_SPEED

        public static final int FAST_SPEED
        Speed Constant for fast mode.
        See Also:
        Constant Field Values
      • pointDesign3D

        public int pointDesign3D
        Point design in 3D game. 0 for simple, 1 for techy, 2 for smooth. Default is 2.
      • playerPerspective

        public boolean playerPerspective
        Flag for 3D game, if player perspective is enabled. Default is false.
      • play3D

        public boolean play3D
        Flag, if 3D game is enabled. Default is false.
      • rearView

        public boolean rearView
        Flag, if rearview is enabled in 3D game. Unused currently. Default is true.
      • cockpit

        public boolean cockpit
        Flag, if cockpit mode should be used for display. Default is true.
      • textOnPickupItem

        public boolean textOnPickupItem
        Flag, if text appears on every item picked up. Default is true.
      • initialLivesTwoPlayer

        public int initialLivesTwoPlayer
        Number of initial lives in two player mode. Default is 5.
      • maxPermSlots

        public int maxPermSlots
        Maximum number of permanent slots. Default is 5.
      • leagueSlots

        public int leagueSlots
        Number of permanent slots for league game. Default is 12.
      • leagueItems

        public int leagueItems
        Item set for league game. Default is 1 (Standard).
      • leagueColors

        public int leagueColors
        Color set for league game. Default is 1 (Standard).
      • leagueStats

        public boolean leagueStats
        Flag, if player loose lives.
      • looseLives

        public boolean looseLives
        Flag, if player loose lives.
      • schemeName

        public java.lang.String schemeName
        The sound scheme name.
      • levelEntryPrefix

        public java.lang.String levelEntryPrefix
        The prefix to insert before level name. Default is "Enter ".
      • shopsOn

        public boolean shopsOn
        Flag, if sound fx are played when heat level is critical. Default is true.
      • alwaysPlayLevelSong

        public boolean alwaysPlayLevelSong
        Flag, if level sound is played even if level is reentered after ir was not won. Default is false.
      • animatePlayer

        public boolean animatePlayer
        Flag, if player figure is animated during movement. Default is false.
      • skinSelectionOn

        public boolean skinSelectionOn
        Flag, if player figure allows skin selection. Default is true.
      • noHeat

        public boolean noHeat
        Flag, if heaat is generally off. Default is false.
      • showPanelMenu

        public boolean showPanelMenu
        Flag, if panel selection is shown in graphic options menu. Default is true.
      • maxPlayers

        public int maxPlayers
        Maximum number of human players. Default is 4.
      • pauseCode

        public int pauseCode
        Key code for pause.
      • animationProbability

        public double animationProbability
        Probability for background animations to start. Default is 0.0005.
      • randomAnimations

        public boolean randomAnimations
        Flag, if background animations are switched randomly. Default is true.
      • leagueModeEnabled

        public boolean leagueModeEnabled
        Flag, if league mode is enabled. Default is true.
      • codeBeforeFlashs

        public boolean codeBeforeFlashs
        Flag, if level codes are collected in the level before the suiting flash animation (like Bonus Levels in original game). Default is true.
    • Constructor Detail

      • Options

        public Options()
        Creates Options.
    • Method Detail

      • getDifficultyLevel

        public DifficultyLevel getDifficultyLevel()
        Returns:
        the difficultyLevel
      • setDifficultyLevel

        public void setDifficultyLevel​(DifficultyLevel difficultyLevel)
        Parameters:
        difficultyLevel - the difficultyLevel to set
      • getHeatLevel

        public HeatLevel getHeatLevel()
        Returns:
        the heatLevel
      • setHeatLevel

        public void setHeatLevel​(HeatLevel heatLevel)
        Parameters:
        heatLevel - the heatLevel to set
      • getSpeedLevel

        public SpeedLevel getSpeedLevel()
        Gets the speed level.
        Returns:
        the speedLevel
      • setSpeedLevel

        public void setSpeedLevel​(SpeedLevel speedLevel)
        Sets the speed level.
        Parameters:
        speedLevel - the speedLevel to set
      • getNoPlayerSpeed

        public SpeedLevel getNoPlayerSpeed()
        Gets the speed level for league games with no player.
        Returns:
        the noPlayerSpeed
      • setNoPlayerSpeed

        public void setNoPlayerSpeed​(SpeedLevel noPlayerSpeed)
        Sets the speed level for league games with no player.
        Parameters:
        noPlayerSpeed - the noPlayerSpeed to set
      • isReplay

        public boolean isReplay()
        Returns:
        the replay
      • setReplay

        public void setReplay​(boolean replay)
        Parameters:
        replay - the replay to set
      • isIntroOn

        public boolean isIntroOn()
        Returns:
        the introOn
      • setIntroOn

        public void setIntroOn​(boolean introOn)
        Parameters:
        introOn - the introOn to set
      • isBackgroundImages

        public boolean isBackgroundImages()
        Returns:
        the backgroundImages
      • setBackgroundImages

        public void setBackgroundImages​(boolean backgroundImages)
        Parameters:
        backgroundImages - the backgroundImages to set
      • is3D

        public boolean is3D()
        Returns:
        play3D
      • set3D

        public void set3D​(boolean play3D)
        Sets 3D mode.
        Parameters:
        play3D - Sets the 3D mode.
      • isSoundOn

        public boolean isSoundOn()
        Gets, if sound is on.
        Returns:
        the soundOn
      • setSoundOn

        public void setSoundOn​(boolean soundOn)
        Sets, if sound is on.
        Parameters:
        soundOn - the soundOn to set
      • isMusicOn

        public boolean isMusicOn()
        Gets, if music is on.
        Returns:
        true, if music is on.
      • setMusicOn

        public void setMusicOn​(boolean musicOn)
        Sets, if music is on.
        Parameters:
        musicOn - the musicOn to set.
      • isExtraMusicOn

        public boolean isExtraMusicOn()
        Checks, if extra music (for extra music items) is on.
        Returns:
        true, if extra music is on
      • setExtraMusicOn

        public void setExtraMusicOn​(boolean extraMusicOn)
        Sets, if extra music is on.
        Parameters:
        extraMusicOn - the extraMusicOn to set
      • isRocketMusicOn

        public boolean isRocketMusicOn()
        Checks, if rocket music is on.
        Returns:
        true, if rocket music is on
      • setRocketMusicOn

        public void setRocketMusicOn​(boolean rocketMusicOn)
        Sets, if rocket music is on.
        Parameters:
        rocketMusicOn - the rocketMusicOn to set
      • isEnergyGainSoundOn

        public boolean isEnergyGainSoundOn()
        Checks, if energy sound fx are on.
        Returns:
        true, if energy gain sound is on.
      • setEnergyGainSoundOn

        public void setEnergyGainSoundOn​(boolean energyGainSoundOn)
        Sets, if energy sound fx are on.
        Parameters:
        energyGainSoundOn - the energyGainSoundOn to set.
      • isCountdownSoundOn

        public boolean isCountdownSoundOn()
        Checks, if countdown sound fx are on.
        Returns:
        true, if the countdown sound is on.
      • setCountdownSoundOn

        public void setCountdownSoundOn​(boolean countdownSoundOn)
        Sets, if countdown sound fx are on.
        Parameters:
        countdownSoundOn - the countdownSoundOn to set
      • isHeatAlarmOn

        public boolean isHeatAlarmOn()
        Checks, if heatalarm sound fx are on.
        Returns:
        true, if the heatalarm sound is on.
      • setHeatAlarmOn

        public void setHeatAlarmOn​(boolean heatAlarmOn)
        Sets, if heatalarm sound fx are on.
        Parameters:
        heatAlarmOn - the heatAlarmOn to set.
      • isSoundFxOn

        public boolean isSoundFxOn()
        Checks, if general sound fx are on.
        Returns:
        the soundFxOn
      • setSoundFxOn

        public void setSoundFxOn​(boolean soundFxOn)
        Sets, if general sound fx are on.
        Parameters:
        soundFxOn - the soundFxOn to set.
      • getPlayerPanelDesign

        public int getPlayerPanelDesign()
        Gets the player panel design.
        Returns:
        the playerPanelDesign
      • setPlayerPanelDesign

        public void setPlayerPanelDesign​(int playerPanelDesign)
        Sets the player panel design. 0 for classic or 1 for Ole's design. 0 by default.
        Parameters:
        playerPanelDesign - The playerPanelDesign to set.
      • isStartWithTutorial

        public boolean isStartWithTutorial()
        Checks, if first start should have Tutorial as menu default.
        Returns:
        true, if starting with Tutorial as defaault menu setting.
      • setStartWithTutorial

        public void setStartWithTutorial​(boolean startWithTutorial)
        Sets, if first start should have Tutorial as menu default.
        Parameters:
        startWithTutorial - the startWithTutorial to set.
      • isIntelliTouch

        public boolean isIntelliTouch()
        Checks, if IntelliTouch is on. Allows to click on the field to control the player figure.
        Returns:
        true, if IntelliTouch is on.
      • setIntelliTouch

        public void setIntelliTouch​(boolean intelliTouch)
        Sets, if IntelliTouch is on.
        Parameters:
        intelliTouch - the intelliTouch to set
      • isTouchpad

        public boolean isTouchpad()
        Checks, if touchpad should be shown for player control.
        Returns:
        true, if the touchpad is enabled.
      • setTouchpad

        public void setTouchpad​(boolean touchpad)
        Sets, if touchpad should be shown for player control.
        Parameters:
        touchpad - the touchpad to set
      • getFrameRate

        public int getFrameRate()
        Gets the frame rate (between 1 and 5). Number of frames for each animation phase.
        Returns:
        The frameRate.
      • setFrameRate

        public void setFrameRate​(int frameRate)
        Sets the frame rate (between 1 and 5). Number of frames for each animation phase.
        Parameters:
        frameRate - The framerate.
      • setShowStadium

        public void setShowStadium​(boolean showStadium)
        Sets, if stadium should be shown around field (in 3D). Unused yet.
        Parameters:
        showStadium - the showStadium to set
      • isShowingStadium

        public boolean isShowingStadium()
        Checks, if stadium should be shown around field (in 3D). Unused yet.
        Returns:
        true, if Stadium should be shown.
      • getKeyCodes

        public int[][] getKeyCodes()
        Gets the key codes for player control.
        Returns:
        The keyCodes. First dimension corresponds with player indices, second: up, right, down, left, turn right, turn left, use item
      • setKeyCodes

        public void setKeyCodes​(int[][] keyCodes)
        Sets the key codes for player control.
        Parameters:
        keyCodes - The keyCodes to set
      • read

        protected java.util.Properties read​(java.io.InputStream stream)
        Reads the options.ini file.
        Parameters:
        stream - The input stream.
        Returns:
        The properties.
      • write

        protected void write​(java.io.OutputStream stream)
        Writes an options ini file.
        Parameters:
        stream - The Output stream.
      • saveKeys

        public void saveKeys​(java.io.OutputStream os)
        Stores the keys to a default file.
        Parameters:
        os - The OutputStream.
      • readKeys

        protected void readKeys​(java.io.InputStream is)
        Reads the keys from a keys.ini file.
        Parameters:
        is - The InputStream.