diff options
Diffstat (limited to 'src')
4 files changed, 17 insertions, 4 deletions
diff --git a/src/com/fourisland/fourpuzzle/Display.java b/src/com/fourisland/fourpuzzle/Display.java index f513d31..5f5a891 100644 --- a/src/com/fourisland/fourpuzzle/Display.java +++ b/src/com/fourisland/fourpuzzle/Display.java | |||
@@ -71,8 +71,6 @@ public class Display { | |||
71 | 71 | ||
72 | if (transitionRunning) | 72 | if (transitionRunning) |
73 | { | 73 | { |
74 | Game.getGameState().render(g); | ||
75 | |||
76 | if (transition != null) | 74 | if (transition != null) |
77 | { | 75 | { |
78 | if (transition.render(g)) | 76 | if (transition.render(g)) |
diff --git a/src/com/fourisland/fourpuzzle/transition/DoNotEraseTransition.java b/src/com/fourisland/fourpuzzle/transition/DoNotEraseTransition.java index 027077c..55fe614 100644 --- a/src/com/fourisland/fourpuzzle/transition/DoNotEraseTransition.java +++ b/src/com/fourisland/fourpuzzle/transition/DoNotEraseTransition.java | |||
@@ -16,12 +16,15 @@ public class DoNotEraseTransition implements OutTransition { | |||
16 | 16 | ||
17 | public boolean render(Graphics2D g) | 17 | public boolean render(Graphics2D g) |
18 | { | 18 | { |
19 | g.drawImage(preTransition, 0, 0, null); | ||
20 | |||
19 | return true; | 21 | return true; |
20 | } | 22 | } |
21 | 23 | ||
24 | private BufferedImage preTransition; | ||
22 | public void setPreTransition(BufferedImage preTransition) | 25 | public void setPreTransition(BufferedImage preTransition) |
23 | { | 26 | { |
24 | // Do nothing | 27 | this.preTransition = preTransition; |
25 | } | 28 | } |
26 | 29 | ||
27 | public Transition copy() | 30 | public Transition copy() |
diff --git a/src/com/fourisland/fourpuzzle/transition/SlideTransition.java b/src/com/fourisland/fourpuzzle/transition/SlideTransition.java index 81031fe..aa91061 100644 --- a/src/com/fourisland/fourpuzzle/transition/SlideTransition.java +++ b/src/com/fourisland/fourpuzzle/transition/SlideTransition.java | |||
@@ -55,7 +55,7 @@ public class SlideTransition implements MultidirectionalTransition { | |||
55 | int max; | 55 | int max; |
56 | SlideDirection way; | 56 | SlideDirection way; |
57 | public boolean render(Graphics2D g) | 57 | public boolean render(Graphics2D g) |
58 | { | 58 | { |
59 | if (max > 0) | 59 | if (max > 0) |
60 | { | 60 | { |
61 | tick = Math.min(tick + wait, max); | 61 | tick = Math.min(tick + wait, max); |
diff --git a/src/com/fourisland/fourpuzzle/transition/Transition.java b/src/com/fourisland/fourpuzzle/transition/Transition.java index 8362d1a..e9b6d9f 100644 --- a/src/com/fourisland/fourpuzzle/transition/Transition.java +++ b/src/com/fourisland/fourpuzzle/transition/Transition.java | |||
@@ -24,5 +24,17 @@ public interface Transition { | |||
24 | 24 | ||
25 | public void setPreTransition(BufferedImage preTransition); | 25 | public void setPreTransition(BufferedImage preTransition); |
26 | 26 | ||
27 | /** | ||
28 | * Create another Transition with the same properties | ||
29 | * | ||
30 | * This function is used in the Database where default transitions are | ||
31 | * stored to be used in certain circumstances. When these transitions are | ||
32 | * needed, this function is called on them to create a copy of the | ||
33 | * Transition with the same parameters. Essentially, this function should | ||
34 | * return a new Transition of the same type constructed with the same | ||
35 | * parameters as the Transition this function is being called on. | ||
36 | * | ||
37 | * @return A copy of the specified Transition | ||
38 | */ | ||
27 | public Transition copy(); | 39 | public Transition copy(); |
28 | } \ No newline at end of file | 40 | } \ No newline at end of file |