From 7c8c6e2b37be39fbef4c168342fcdebc4ec58974 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sun, 8 Feb 2009 13:35:20 -0500 Subject: Added support for other System files Because the coordinates and transparent color previously used were tuned for the default System file, the coordinates were changed to be more forgiving and the color is picked from the last pixel of the first row from the graphic. Also, for some reason, every file in source control has been marked as modified, even though most haven't been. Don't know why this happened. --- src/com/fourisland/fourpuzzle/Audio.java | 0 src/com/fourisland/fourpuzzle/Database.java | 0 src/com/fourisland/fourpuzzle/Direction.java | 0 src/com/fourisland/fourpuzzle/Display.java | 0 src/com/fourisland/fourpuzzle/Game.java | 0 src/com/fourisland/fourpuzzle/GameCharacter.java | 0 src/com/fourisland/fourpuzzle/GameCharacters.java | 0 src/com/fourisland/fourpuzzle/Layer.java | 0 .../fourisland/fourpuzzle/PuzzleApplication.java | 3 +++ src/com/fourisland/fourpuzzle/SaveFile.java | 0 .../fourpuzzle/gamestate/GameOverGameState.java | 0 .../fourisland/fourpuzzle/gamestate/GameState.java | 0 .../fourpuzzle/gamestate/TitleScreenGameState.java | 0 .../fourpuzzle/gamestate/mapview/CharSet.java | 0 .../fourpuzzle/gamestate/mapview/ChipSet.java | 0 .../fourpuzzle/gamestate/mapview/ChipSetData.java | 0 .../fourpuzzle/gamestate/mapview/Map.java | 0 .../gamestate/mapview/MapViewGameState.java | 0 .../gamestate/mapview/event/AbstractEvent.java | 0 .../gamestate/mapview/event/AnimationType.java | 0 .../gamestate/mapview/event/CommonEvent.java | 0 .../fourpuzzle/gamestate/mapview/event/Event.java | 0 .../gamestate/mapview/event/EventCall.java | 0 .../gamestate/mapview/event/EventCallTime.java | 0 .../gamestate/mapview/event/EventHandler.java | 0 .../gamestate/mapview/event/EventList.java | 0 .../gamestate/mapview/event/HeroEvent.java | 0 .../gamestate/mapview/event/LayerEvent.java | 0 .../gamestate/mapview/event/PossibleEvent.java | 0 .../gamestate/mapview/event/SpecialEvent.java | 0 .../mapview/event/graphic/BlankEventGraphic.java | 0 .../mapview/event/graphic/CharSetEventGraphic.java | 0 .../mapview/event/graphic/EventGraphic.java | 0 .../mapview/event/movement/CustomMovementType.java | 0 .../mapview/event/movement/MovementType.java | 0 .../mapview/event/movement/RandomMovementType.java | 0 .../event/movement/StayStillMovementType.java | 0 .../precondition/HeroInPartyPrecondition.java | 0 .../mapview/event/precondition/Precondition.java | 0 .../event/precondition/SwitchPrecondition.java | 0 .../precondition/VariableNumberPrecondition.java | 0 .../precondition/VariableVariablePrecondition.java | 0 .../mapview/event/specialmove/FaceMoveEvent.java | 0 .../specialmove/LoopUntilCollisionMoveEvent.java | 0 .../mapview/event/specialmove/MoveEvent.java | 0 .../mapview/event/specialmove/MoveEventThread.java | 0 .../mapview/event/specialmove/StepMoveEvent.java | 0 .../mapview/event/specialmove/WaitMoveEvent.java | 0 .../mapview/viewpoint/AutomaticViewpoint.java | 0 .../mapview/viewpoint/FixedViewpoint.java | 0 .../mapview/viewpoint/MovingViewpoint.java | 0 .../gamestate/mapview/viewpoint/Viewpoint.java | 0 .../transition/DoNotEraseTransition.java | 0 .../fourpuzzle/transition/InTransition.java | 0 .../transition/MultidirectionalTransition.java | 0 .../fourpuzzle/transition/OutTransition.java | 0 .../fourpuzzle/transition/SlideTransition.java | 0 .../fourpuzzle/transition/SquareTransition.java | 0 .../fourpuzzle/transition/Transition.java | 0 .../fourpuzzle/transition/TransitionDirection.java | 0 .../transition/TransitionUnsupportedException.java | 0 src/com/fourisland/fourpuzzle/util/Comparison.java | 0 src/com/fourisland/fourpuzzle/util/Functions.java | 0 src/com/fourisland/fourpuzzle/util/Interval.java | 0 .../fourisland/fourpuzzle/util/ObjectLoader.java | 0 .../fourpuzzle/util/ResourceNotFoundException.java | 0 .../fourpuzzle/util/TransparentPixelFilter.java | 0 .../fourisland/fourpuzzle/window/ChoiceWindow.java | 22 +++++++++++++++++----- .../fourpuzzle/window/SystemChoiceArea.java | 14 +++++++------- .../fourpuzzle/window/SystemGraphic.java | 15 +++++++++++---- 70 files changed, 38 insertions(+), 16 deletions(-) mode change 100644 => 100755 src/com/fourisland/fourpuzzle/Audio.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/Database.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/Direction.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/Display.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/Game.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/GameCharacter.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/GameCharacters.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/Layer.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/PuzzleApplication.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/SaveFile.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/GameState.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/TitleScreenGameState.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/CharSet.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/ChipSet.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/ChipSetData.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/AbstractEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/AnimationType.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/CommonEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/Event.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventCall.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventCallTime.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventHandler.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventList.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/HeroEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/PossibleEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/CustomMovementType.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/MovementType.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/RandomMovementType.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/StayStillMovementType.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroInPartyPrecondition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/Precondition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/SwitchPrecondition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableNumberPrecondition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableVariablePrecondition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/FaceMoveEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/LoopUntilCollisionMoveEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEventThread.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/StepMoveEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/WaitMoveEvent.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/AutomaticViewpoint.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/FixedViewpoint.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/MovingViewpoint.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/Viewpoint.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/transition/DoNotEraseTransition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/transition/InTransition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/transition/MultidirectionalTransition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/transition/OutTransition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/transition/SlideTransition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/transition/SquareTransition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/transition/Transition.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/transition/TransitionDirection.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/transition/TransitionUnsupportedException.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/util/Comparison.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/util/Functions.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/util/Interval.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/util/ObjectLoader.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/util/ResourceNotFoundException.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/util/TransparentPixelFilter.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/window/ChoiceWindow.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/window/SystemChoiceArea.java mode change 100644 => 100755 src/com/fourisland/fourpuzzle/window/SystemGraphic.java (limited to 'src/com/fourisland') diff --git a/src/com/fourisland/fourpuzzle/Audio.java b/src/com/fourisland/fourpuzzle/Audio.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/Database.java b/src/com/fourisland/fourpuzzle/Database.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/Direction.java b/src/com/fourisland/fourpuzzle/Direction.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/Display.java b/src/com/fourisland/fourpuzzle/Display.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/Game.java b/src/com/fourisland/fourpuzzle/Game.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/GameCharacter.java b/src/com/fourisland/fourpuzzle/GameCharacter.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/GameCharacters.java b/src/com/fourisland/fourpuzzle/GameCharacters.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/Layer.java b/src/com/fourisland/fourpuzzle/Layer.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/PuzzleApplication.java b/src/com/fourisland/fourpuzzle/PuzzleApplication.java old mode 100644 new mode 100755 index c8d4e5d..edf6ac8 --- a/src/com/fourisland/fourpuzzle/PuzzleApplication.java +++ b/src/com/fourisland/fourpuzzle/PuzzleApplication.java @@ -7,6 +7,7 @@ package com.fourisland.fourpuzzle; import com.fourisland.fourpuzzle.gamestate.TitleScreenGameState; import com.fourisland.fourpuzzle.gamestate.mapview.ChipSet; import com.fourisland.fourpuzzle.util.Interval; +import com.fourisland.fourpuzzle.window.SystemGraphic; import java.awt.GraphicsEnvironment; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; @@ -107,6 +108,8 @@ public class PuzzleApplication extends Application { try { Audio.init(); ChipSet.initalize(); + SystemGraphic.initalize(); + Game.setGameState(new TitleScreenGameState()); Interval in = Interval.createTickInterval(1); diff --git a/src/com/fourisland/fourpuzzle/SaveFile.java b/src/com/fourisland/fourpuzzle/SaveFile.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java b/src/com/fourisland/fourpuzzle/gamestate/GameOverGameState.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/GameState.java b/src/com/fourisland/fourpuzzle/gamestate/GameState.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/TitleScreenGameState.java b/src/com/fourisland/fourpuzzle/gamestate/TitleScreenGameState.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/CharSet.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/CharSet.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/ChipSet.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/ChipSet.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/ChipSetData.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/ChipSetData.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/MapViewGameState.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/AbstractEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/AbstractEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/AnimationType.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/AnimationType.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/CommonEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/CommonEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/Event.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/Event.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventCall.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventCall.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventCallTime.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventCallTime.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventHandler.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventHandler.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventList.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/EventList.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/HeroEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/HeroEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/LayerEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/PossibleEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/PossibleEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/CustomMovementType.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/CustomMovementType.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/MovementType.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/MovementType.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/RandomMovementType.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/RandomMovementType.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/StayStillMovementType.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/movement/StayStillMovementType.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroInPartyPrecondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/HeroInPartyPrecondition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/Precondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/Precondition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/SwitchPrecondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/SwitchPrecondition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableNumberPrecondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableNumberPrecondition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableVariablePrecondition.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/precondition/VariableVariablePrecondition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/FaceMoveEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/FaceMoveEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/LoopUntilCollisionMoveEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/LoopUntilCollisionMoveEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEventThread.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/MoveEventThread.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/StepMoveEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/StepMoveEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/WaitMoveEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/specialmove/WaitMoveEvent.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/AutomaticViewpoint.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/AutomaticViewpoint.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/FixedViewpoint.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/FixedViewpoint.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/MovingViewpoint.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/MovingViewpoint.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/Viewpoint.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/viewpoint/Viewpoint.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/transition/DoNotEraseTransition.java b/src/com/fourisland/fourpuzzle/transition/DoNotEraseTransition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/transition/InTransition.java b/src/com/fourisland/fourpuzzle/transition/InTransition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/transition/MultidirectionalTransition.java b/src/com/fourisland/fourpuzzle/transition/MultidirectionalTransition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/transition/OutTransition.java b/src/com/fourisland/fourpuzzle/transition/OutTransition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/transition/SlideTransition.java b/src/com/fourisland/fourpuzzle/transition/SlideTransition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/transition/SquareTransition.java b/src/com/fourisland/fourpuzzle/transition/SquareTransition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/transition/Transition.java b/src/com/fourisland/fourpuzzle/transition/Transition.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/transition/TransitionDirection.java b/src/com/fourisland/fourpuzzle/transition/TransitionDirection.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/transition/TransitionUnsupportedException.java b/src/com/fourisland/fourpuzzle/transition/TransitionUnsupportedException.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/util/Comparison.java b/src/com/fourisland/fourpuzzle/util/Comparison.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/util/Functions.java b/src/com/fourisland/fourpuzzle/util/Functions.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/util/Interval.java b/src/com/fourisland/fourpuzzle/util/Interval.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/util/ObjectLoader.java b/src/com/fourisland/fourpuzzle/util/ObjectLoader.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/util/ResourceNotFoundException.java b/src/com/fourisland/fourpuzzle/util/ResourceNotFoundException.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/util/TransparentPixelFilter.java b/src/com/fourisland/fourpuzzle/util/TransparentPixelFilter.java old mode 100644 new mode 100755 diff --git a/src/com/fourisland/fourpuzzle/window/ChoiceWindow.java b/src/com/fourisland/fourpuzzle/window/ChoiceWindow.java old mode 100644 new mode 100755 index bf7391e..40fff30 --- a/src/com/fourisland/fourpuzzle/window/ChoiceWindow.java +++ b/src/com/fourisland/fourpuzzle/window/ChoiceWindow.java @@ -73,7 +73,7 @@ public class ChoiceWindow { Graphics2D g2 = cacheBase.createGraphics(); g2.drawImage(SystemGraphic.getMessageBackground(), 1, 1, TopLeft.getWidth()+getWidth()+TopRight.getWidth()-2, TopLeft.getHeight()+getHeight()+BottomLeft.getHeight()-2, null); - g2.drawImage(Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(temp.getSource(), new TransparentPixelFilter(-25600))), 0, 0, null); + g2.drawImage(Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(temp.getSource(), new TransparentPixelFilter(SystemGraphic.getTransparentColor().getRGB()))), 0, 0, null); g2.setFont(g2.getFont().deriveFont(Font.BOLD)); int ty = TopLeft.getHeight()+g2.getFontMetrics().getHeight()-SPACER; @@ -86,10 +86,6 @@ public class ChoiceWindow { tx += ((width/2)-(g2.getFontMetrics().stringWidth(choice)/2)); } - /* TODO The following code paints the text onto the window. However, - * when it paints the lowercase 'y', the tail is white, not the - * correct gradient. */ - g2.setPaint(new TexturePaint(SystemGraphic.getTextColor(), new Rectangle(tx, ty, g2.getFontMetrics().stringWidth(choice),g2.getFontMetrics().getHeight()))); g2.drawString(choice, tx, ty); @@ -113,5 +109,21 @@ public class ChoiceWindow { { return height; } + + int selected = 0; + public void moveUp() + { + selected--; + } + + public void moveDown() + { + selected++; + } + + public String getSelected() + { + return choices.get(selected); + } } diff --git a/src/com/fourisland/fourpuzzle/window/SystemChoiceArea.java b/src/com/fourisland/fourpuzzle/window/SystemChoiceArea.java old mode 100644 new mode 100755 index 8908c10..5fc115f --- a/src/com/fourisland/fourpuzzle/window/SystemChoiceArea.java +++ b/src/com/fourisland/fourpuzzle/window/SystemChoiceArea.java @@ -11,13 +11,13 @@ package com.fourisland.fourpuzzle.window; */ public enum SystemChoiceArea { - Top(47, 0, 1, 4), - TopRight(56, 0, 8, 8), - Right(60, 15, 4, 1), - BottomRight(56, 24, 8, 8), - Bottom(47, 28, 1, 4), - BottomLeft(32, 24, 8, 8), - Left(32, 15, 4, 1), + Top(47, 0, 1, 9), + TopRight(56, 0, 8, 9), + Right(56, 15, 8, 1), + BottomRight(56, 25, 8, 9), + Bottom(47, 24, 1, 9), + BottomLeft(32, 24, 11, 9), + Left(32, 15, 11, 1), TopLeft(32, 0, 8, 8), UpArrow(43, 9, 10, 6), DownArrow(43, 17, 10, 6); diff --git a/src/com/fourisland/fourpuzzle/window/SystemGraphic.java b/src/com/fourisland/fourpuzzle/window/SystemGraphic.java old mode 100644 new mode 100755 index 70fc7fe..ea67f41 --- a/src/com/fourisland/fourpuzzle/window/SystemGraphic.java +++ b/src/com/fourisland/fourpuzzle/window/SystemGraphic.java @@ -6,6 +6,7 @@ package com.fourisland.fourpuzzle.window; import com.fourisland.fourpuzzle.util.ObjectLoader; +import java.awt.Color; import java.awt.image.BufferedImage; /** @@ -15,14 +16,15 @@ import java.awt.image.BufferedImage; public class SystemGraphic { private static BufferedImage systemGraphic; - static + private static String filename = "System"; + public static void setGraphic(String filename) { - initalize("System"); + SystemGraphic.filename = filename; } - public static void initalize(String graphic) + public static void initalize() { - systemGraphic = ObjectLoader.getImage("Picture", graphic); + systemGraphic = ObjectLoader.getImage("Picture", filename); } public static BufferedImage getMessageBackground() @@ -39,5 +41,10 @@ public class SystemGraphic { { return systemGraphic.getSubimage(0, 48, 16, 16); } + + public static Color getTransparentColor() + { + return new Color(systemGraphic.getRGB(159, 0)); + } } -- cgit 1.4.1