From: Luke H. <lh...@us...> - 2002-11-26 07:05:25
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson10 In directory sc8-pr-cvs1:/tmp/cvs-serv29914/lesson10 Modified Files: Lesson10.java Removed Files: Texture.java Log Message: now using timers, packages... most packages extend lesson1 or 6-7. lessons 10-17 will be broken for the rest of the night. going to bed... They will be done tomarrow =) Index: Lesson10.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson10/Lesson10.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson10/Lesson10.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Lesson10.java 25 Nov 2002 06:53:09 -0000 1.1 +++ Lesson10.java 26 Nov 2002 07:05:22 -0000 1.2 @@ -29,6 +29,8 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +package lesson10; + import java.nio.*; import java.io.*; import java.awt.image.BufferedImage; @@ -40,23 +42,20 @@ import org.lwjgl.opengl.*; import org.lwjgl.input.*; +import lesson06.Texture; +import lesson07.Lesson7; + /** * $Id$ * * Loading And Moving Through A 3D World * - * Credit goes to Lionel Brits (ßetelgeuse) and Jeff Molofee (NeHe) whos tutorial this is based on + * Credit goes to Lionel Brits (?etelgeuse) and Jeff Molofee (NeHe) whos tutorial this is based on * * @author Luke Holden * @version $Revision$ */ -public class Lesson10 { - private GL gl; - private GLU glu; - - private boolean done = false; - private boolean fullscreen = true; - +public class Lesson10 extends Lesson7 { /* Blending OFF/ON? */ private boolean blend; @@ -152,32 +151,7 @@ throw new Exception("Problem setting up the world", e); } } - - /* A javafied version of AUX_RGBImageRec *LoadBMP(char*); */ - private Texture loadImage(String filename) throws Exception { - Texture texture = null; - BufferedImage tmpImg = null; - - /* normally I would use StringUtils.isValid(String) from the - jakarta commons lib, but thats beyond the scope of this lesson */ - if ((filename != null) && (filename.trim() != "")) { - try { - InputStream is = getClass().getResourceAsStream(filename); - tmpImg = (BufferedImage) ImageIO.read(is); - if (tmpImg == null) { - throw new Exception("Error: Got null from ImageIO.read()"); - } - texture = new Texture(tmpImg); - } - catch ( Exception e ) { - throw new Exception("Problem loading bitmap", e); - } - } else { - throw new Exception("Error: file name is not valid!"); - } - return texture; - } - + /* Load Bitmaps And Convert To Textures */ private void loadGLTextures() throws Exception { /* Create Storage Space For The Texture */ --- Texture.java DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson10/Texture.java |