Skip to content

Commit

Permalink
Merge remote-tracking branch 'yaamboo/master'
Browse files Browse the repository at this point in the history
Conflicts:
	src/fi/ringofsnake/gamestates/GameOverGameState.java
  • Loading branch information
puumuki committed Jan 29, 2012
2 parents 190e205 + 6d52d3b commit f2ceadc
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/fi/ringofsnake/entities/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ public Player( GameContainer cont ) {
width = running.getWidth();
height = running.getHeight();

shape = new Rectangle(position.x,
position.y + 20,
jumping.getWidth(),
jumping.getHeight() -20 );
shape = new Rectangle(position.x + 40,
position.y + 40,
jumping.getWidth() - 80,
jumping.getHeight() -80 );

Input.disableControllers();

Expand Down
1 change: 0 additions & 1 deletion src/fi/ringofsnake/gamestates/GameOverGameState.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public class GameOverGameState extends BasicGameState {
private Image bg;

private int stateID = -1;
private UnicodeFont font;

public GameOverGameState(int gameStateId) {
this.stateID = gameStateId;
Expand Down
28 changes: 24 additions & 4 deletions src/fi/ringofsnake/gamestates/InfoGameState.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,26 @@
import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.UnicodeFont;
import org.newdawn.slick.font.effects.ColorEffect;
import org.newdawn.slick.font.effects.GradientEffect;
import org.newdawn.slick.font.effects.OutlineEffect;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.state.transition.FadeInTransition;
import org.newdawn.slick.state.transition.FadeOutTransition;

import fi.ringofsnake.io.ResourceManager;
import fi.ringofsnake.main.Main;

public class InfoGameState extends BasicGameState {

private Image bg;
private UnicodeFont font;

private int stateID = -1;

public InfoGameState(int gameStateId) {
Expand All @@ -22,20 +31,31 @@ public InfoGameState(int gameStateId) {

@Override
public void init(GameContainer container, StateBasedGame game) throws SlickException {
bg = ResourceManager.fetchImage("INFO_BG");

java.awt.Font awtFont = new java.awt.Font("Verdana", java.awt.Font.PLAIN, 20);

font = new UnicodeFont(awtFont);
font.addAsciiGlyphs();
java.awt.Color col = new java.awt.Color( 0x333333 );
java.awt.Color col2 = new java.awt.Color( 0xffffff );

font.getEffects().add(new ColorEffect(col2));
font.getEffects().add(new OutlineEffect(2, col));
font.loadGlyphs();
}

@Override
public void render(GameContainer container, StateBasedGame game, Graphics g) throws SlickException {
g.drawString("CREDITS\n\n" +
"We have made this game in 48 hours at Tampere during the Global Game Jam 2012 so you could have fun. Yeah!\n\n" +
bg.draw();
g.setFont(font);
g.drawString("We have made this game in 48 hours at Tampere during the Global Game Jam 2012 so you could have fun. Yeah!\n\n" +
"Miika Hämynen\nTeemu Puukko\nWaltteri Reunamo\nMatias Wilkman\n\n" +
"Music: Ruulanko by Sami Juntunen (mutetus)\n\n" +
"Other credits\n" +
"http:https://commons.wikimedia.org/wiki/File:2008-09-15_(14)_Grass,_Gras.JPG by Vera Buhl, CC-BY-SA\n" +
"http:https://commons.wikimedia.org/wiki/File:Farm-Fresh_box.png by Fatcow Web Hosting, CC-BY\n" +
"http:https://www.freesound.org/people/dobroide/sounds/41180/ by dobroide, CC-BY\n" +
"\n\nPress enter to continue.", 20, 20);
"http:https://www.freesound.org/people/dobroide/sounds/41180/ by dobroide, CC-BY\n", 50, 250);

}

Expand Down
2 changes: 1 addition & 1 deletion src/fi/ringofsnake/gamestates/PlayGameState.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void init(GameContainer container, StateBasedGame game)
scrollingBackGround = new ScrollingBackGround(0.5f);
squirrels = new SquirrelMob(container);

player.position.x = squirrels.findSquirrelsMaxHorizontalPosition() + 10;
player.position.x = squirrels.findSquirrelsMaxHorizontalPosition() + 100;

boxes = new BoxDispenser(player, squirrels);

Expand Down
2 changes: 2 additions & 0 deletions src/resources/resources.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
<resource type="image" id="MENU_BUTTON_QUIT">resources\ui\Quit_button.png</resource>

<resource type="image" id="GAMEOVER_BG">resources\ui\gameover.png</resource>

<resource type="image" id="INFO_BG">resources\ui\infoscreen.png</resource>

<!-- TILES -->
<resource type="image" id="TILE_SPACE">resources\tiles\space.png</resource>
Expand Down
Binary file added src/resources/ui/infoscreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f2ceadc

Please sign in to comment.