Skip to content

Commit

Permalink
Fixed lib, included LWJGL license
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpenaranda committed Apr 12, 2012
1 parent 1865a8f commit dcd6904
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bin/*
.settings
.classpath
31 changes: 31 additions & 0 deletions LICENSE-LWJGL
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2002-2008 Lightweight Java Game Library Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of 'Light Weight Java Game Library' nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Binary file added lib/jinput.jar
Binary file not shown.
Binary file added lib/linux_natives.jar
Binary file not shown.
Binary file added lib/lwjgl-debug.jar
Binary file not shown.
Binary file added lib/lwjgl.jar
Binary file not shown.
Binary file added lib/lwjgl_applet.jar
Binary file not shown.
Binary file added lib/lwjgl_util.jar
Binary file not shown.
Binary file added lib/lwjgl_util_applet.jar
Binary file not shown.
Binary file added lib/macosx_natives.jar
Binary file not shown.
Binary file added lib/slick.jar
Binary file not shown.
Binary file added lib/solaris_natives.jar
Binary file not shown.
Binary file added lib/windows_natives.jar
Binary file not shown.
51 changes: 29 additions & 22 deletions src/com/nickpenaranda/kokgee/KokgeeGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private enum Movement {

private boolean bBoost;
private boolean bEnableBoost;

private boolean bSounds;
private boolean bForcePhysics; // @HACK

/*
Expand Down Expand Up @@ -157,14 +157,17 @@ public void init(GameContainer arg0) throws SlickException {
bForcePhysics = false;
movement = Movement.NONE;

bSounds = true;
try {
mSoundGameover = new Sound("./res/you_lose.wav");
mSoundSetPiece = new Sound("./res/block_set.wav");
mSoundClear1 = new Sound("./res/clear_x1.wav");
mSoundClear2 = new Sound("./res/clear_x2.wav");
mSoundClear3 = new Sound("./res/clear_x3.wav");
mSoundClear4 = new Sound("./res/clear_x4.wav");
mSoundGameover = new Sound("res/you_lose.wav");
mSoundSetPiece = new Sound("res/block_set.wav");
mSoundClear1 = new Sound("res/clear_x1.wav");
mSoundClear2 = new Sound("res/clear_x2.wav");
mSoundClear3 = new Sound("res/clear_x3.wav");
mSoundClear4 = new Sound("res/clear_x4.wav");
} catch(SlickException e) {
e.printStackTrace();
bSounds = false;
// @TODO Do the right thing!!!
}

Expand Down Expand Up @@ -401,7 +404,8 @@ private void haltPiece() {
int ox = mPiece.getX();
int oy = mPiece.getY();

mSoundSetPiece.play();
if(bSounds)
mSoundSetPiece.play();

for(int k : mPiece.getParts()) {
int px = ox + ((k - 1) % 4);
Expand All @@ -410,7 +414,8 @@ private void haltPiece() {
mBoard[px][py] = mPiece.getColor();
else {
// @ENDGAME
mSoundGameover.play();
if(bSounds)
mSoundGameover.play();
//System.exit(-1);
}

Expand Down Expand Up @@ -454,19 +459,21 @@ private void checkLines() {
break;
}

switch(numComplete) {
case 1:
mSoundClear1.play();
break;
case 2:
mSoundClear2.play();
break;
case 3:
mSoundClear3.play();
break;
case 4:
mSoundClear4.play();
break;
if(bSounds) {
switch(numComplete) {
case 1:
mSoundClear1.play();
break;
case 2:
mSoundClear2.play();
break;
case 3:
mSoundClear3.play();
break;
case 4:
mSoundClear4.play();
break;
}
}
}

Expand Down

0 comments on commit dcd6904

Please sign in to comment.