Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Firestar99 committed Oct 23, 2017
1 parent 575ccda commit b300278
Show file tree
Hide file tree
Showing 59 changed files with 1,468 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/libraries/PNGDecoder.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/jinput_2_0_5.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions ColorExperiment.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/res" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.settings" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="inheritedJdk" />
<orderEntry type="library" name="LWJGL2 - org.lwjgl.lwjgl:lwjgl:2.9.3" level="application" />
<orderEntry type="library" name="Guava - com.google.guava:guava:21.0" level="application" />
<orderEntry type="library" name="Slick Util" level="application" />
<orderEntry type="library" name="native" level="project" />
<orderEntry type="library" name="jinput-2.0.5" level="project" />
<orderEntry type="library" name="PNGDecoder" level="project" />
</component>
</module>
Binary file added levels/Lvl1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added levels/Lvl9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lib/PNGDecoder.jar
Binary file not shown.
Binary file added lib/jinput-2.0.5.jar
Binary file not shown.
Binary file added lib/lwjgl_fix.jar
Binary file not shown.
Binary file added lib/lwjgl_src.jar
Binary file not shown.
Binary file added lib/lwjgl_util.jar
Binary file not shown.
Binary file added native/OpenAL32.dll
Binary file not shown.
Binary file added native/OpenAL64.dll
Binary file not shown.
Binary file added native/liblwjgl.dylib
Binary file not shown.
Binary file added native/liblwjgl.so
Binary file not shown.
Binary file added native/liblwjgl64.so
Binary file not shown.
Binary file added native/libopenal.so
Binary file not shown.
Binary file added native/libopenal64.so
Binary file not shown.
Binary file added native/lwjgl.dll
Binary file not shown.
Binary file added native/lwjgl64.dll
Binary file not shown.
Binary file added native/openal.dylib
Binary file not shown.
Binary file added res/Leak.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions res/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: colors.Starter

Binary file added res/Spike.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/Splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/Throw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/Thrown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions src/colors/Init.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package colors;

import colors.util.Texture;

import java.io.IOException;

import static org.lwjgl.opengl.GL11.*;

public class Init {

public static int splashId = -1;
public static Texture leakTex;
public static int throwId = -1;
public static int thrownId = -1;

public static void init() throws Exception {
splashId = makeTexture("Splash.png");
throwId = makeTexture("Throw.png");
thrownId = makeTexture("Thrown.png");
leakTex = Texture.setupTexture("Leak.png", false);
}

public static void release() {
if (splashId != -1)
glDeleteTextures(splashId);
}

public static int makeTexture(String tex) throws IOException {
Texture splashTex = Texture.setupTexture(tex, false);
int Id = glGenTextures();
glBindTexture(GL_TEXTURE_2D, Id);
splashTex.setupParameter();
splashTex.upload();
return Id;
}

}
22 changes: 22 additions & 0 deletions src/colors/Movement.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package colors;

import colors.util.Vector2d;

import static org.lwjgl.input.Keyboard.*;

public enum Movement {

LEFT(KEY_LEFT, new Vector2d(-1, 0)),
A(KEY_A, new Vector2d(-1, 0)),
RIGHT(KEY_RIGHT, new Vector2d(1, 0)),
D(KEY_D, new Vector2d(1, 0));

public final int key;
public final Vector2d offset;

Movement(int key, Vector2d offset) {
this.key = key;
this.offset = offset;
}

}
Loading

0 comments on commit b300278

Please sign in to comment.