mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-12 06:41:51 +09:00
added sources for Slick
Former-commit-id: 1647fa32ef6894bd7db44f741f07c2f4dcdf9054 Former-commit-id: 0e5810dcfbe1fd59b13e7cabe9f1e93c5542da2d
This commit is contained in:
59
lib/slick-source/org/newdawn/slick/tests/IsoTiledTest.java
Normal file
59
lib/slick-source/org/newdawn/slick/tests/IsoTiledTest.java
Normal file
@@ -0,0 +1,59 @@
|
||||
package org.newdawn.slick.tests;
|
||||
|
||||
import org.newdawn.slick.BasicGame;
|
||||
import org.newdawn.slick.GameContainer;
|
||||
import org.newdawn.slick.Graphics;
|
||||
import org.newdawn.slick.SlickException;
|
||||
import org.newdawn.slick.tiled.TiledMap;
|
||||
import org.newdawn.slick.util.Bootstrap;
|
||||
|
||||
/**
|
||||
* Simple test for isometric map rendering
|
||||
*
|
||||
* @author kevin
|
||||
*/
|
||||
public class IsoTiledTest extends BasicGame {
|
||||
/** The tilemap we're going to render */
|
||||
private TiledMap tilemap;
|
||||
|
||||
/**
|
||||
* Create a new test
|
||||
*/
|
||||
public IsoTiledTest() {
|
||||
super("Isometric Tiled Map Test");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
|
||||
*/
|
||||
public void init(GameContainer container) throws SlickException {
|
||||
tilemap = new TiledMap("testdata/isoexample.tmx", "testdata/");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.newdawn.slick.BasicGame#update(org.newdawn.slick.GameContainer, int)
|
||||
*/
|
||||
public void update(GameContainer container, int delta)
|
||||
throws SlickException {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.newdawn.slick.Game#render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
|
||||
*/
|
||||
public void render(GameContainer container, Graphics g)
|
||||
throws SlickException {
|
||||
tilemap.render(350,150);
|
||||
}
|
||||
|
||||
/**
|
||||
* Entry point to our test
|
||||
*
|
||||
* @param argv The arguments passed in from the command line
|
||||
*/
|
||||
public static void main(String[] argv) {
|
||||
Bootstrap.runAsApplication(new IsoTiledTest(), 800,600,false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user