Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Fixed textures
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiko van der Heijden authored and Heiko van der Heijden committed Apr 9, 2017
1 parent 5c11b8f commit 094faae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@
<maven.compiler.target>1.8</maven.compiler.target>
<lwjgl.version>3.1.1</lwjgl.version>
<log4j.version>2.8.2</log4j.version>
<junit.version>4.11</junit.version>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
Expand Down Expand Up @@ -96,6 +103,7 @@
<classifier>${lwjgl.natives}</classifier>
<scope>runtime</scope>
</dependency>

</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Sound(String fileLocation,int position,String soundName)
{
name = soundName;
File scrFile = new File(Sound.class.getResource(fileLocation).getPath());
InputStream inputStream = new FileInputStream(scrFile);
// InputStream inputStream = Sound.cl//new FileInputStream(scrFile);
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(scrFile);
buffSize = audioInputStream.available() - 1;
audioFormat = audioInputStream.getFormat();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public class Texture extends Resource{

public Texture(String fileLocation, int position) throws ResourceNotFoundException {
super(fileLocation, position);
File scrFile = new File(Texture.class.getResource(fileLocation).getPath());

//Mirror the texture firsrt
BufferedImage image = null;
try {
image = ImageIO.read(scrFile);
image = ImageIO.read(Texture.class.getResourceAsStream(fileLocation));

} catch (IOException e) {
throw new ResourceNotFoundException(String.format("File %s has not been found", fileLocation));
}
Expand Down

0 comments on commit 094faae

Please sign in to comment.