Cleans up project

This commit is contained in:
2020-02-14 01:01:38 +01:00
parent de6607442b
commit dfa7a142c3
126 changed files with 147 additions and 825 deletions

View File

@@ -1,39 +1,39 @@
# ZX Spectrum 7 Font
By Sizenko Alexander, [Style-7](http://www.styleseven.com), December 2012. From http://www.styleseven.com/php/get_product.php?product=ZX-Spectrum-7
Minor metrics adjustments by Anya Helene Bagge, October 2017.
* ZXSpectrum-7.otf monospaced regular
# True Type Font: ZX Spectrum-7 version 1.0
## EULA
The font ZX Spectrum-7 is freeware.
## DESCRIPTION
This font has been created to mark the 30th anniversary of the great computer ZX-Spectrum. Font based on native ZX-Spectrum symbols. Latin and Cyrillic code pages are supported.
Files in zx_spectrum-7.zip:
* readme.txt this file;
* zx_spectrum-7.ttf regular style;
* zx_spectrum-7_bold.ttf bold style;
* zx_spectrum-7_screen.png preview image.
Please visit http://www.styleseven.com/ for download our other products as freeware as shareware.
We will welcome any useful suggestions and comments; please send them to ms-7@styleseven.com
## WHAT'S NEW?
* Version 1.01 (December 27 2012):
* Fixed bug for Cyrillic code page.
## AUTHOR
Sizenko Alexander
Style-7
http://www.styleseven.com
# ZX Spectrum 7 Font
By Sizenko Alexander, [Style-7](http://www.styleseven.com), December 2012. From http://www.styleseven.com/php/get_product.php?product=ZX-Spectrum-7
Minor metrics adjustments by Anya Helene Bagge, October 2017.
* ZXSpectrum-7.otf monospaced regular
# True Type Font: ZX Spectrum-7 version 1.0
## EULA
The font ZX Spectrum-7 is freeware.
## DESCRIPTION
This font has been created to mark the 30th anniversary of the great computer ZX-Spectrum. Font based on native ZX-Spectrum symbols. Latin and Cyrillic code pages are supported.
Files in zx_spectrum-7.zip:
* readme.txt this file;
* zx_spectrum-7.ttf regular style;
* zx_spectrum-7_bold.ttf bold style;
* zx_spectrum-7_screen.png preview image.
Please visit http://www.styleseven.com/ for download our other products as freeware as shareware.
We will welcome any useful suggestions and comments; please send them to ms-7@styleseven.com
## WHAT'S NEW?
* Version 1.01 (December 27 2012):
* Fixed bug for Cyrillic code page.
## AUTHOR
Sizenko Alexander
Style-7
http://www.styleseven.com
Created: December 24 2012

View File

@@ -1,95 +1,95 @@
      leahciM  
  ▓████ ▄▀   ▓█
███ ▄▄ ▀▀▀▀██▐
 ████▀ ▀▀▀    
       :yb neercS  
 ▓████     ▓██
██▄  ▀ ████ ░ ▓
███▐▄ ▓███▀▄▄█▀
▀▀                 
   ▓███▄ ▄▀█ 
 ▓████▄ ▀▀ ███
▄ ░ ▓███▀▄ ▓███
▀ ▄▄██▀▀▀       
         ▓███  
▄   ▓███▄▄▀▀▀▀
▄▄  ░░█▌ ▓███
▀▄ ▓▓██▀  ▄█▀
██▀▀ █     ▀▀▀ ▀▀▀
▓███     ▓███▄
 ▀▀▄▄▄   ▄ ░  
██▄▀▄█ ▄▄ ▓
██▀  ▄▄▄███▀   
  ▄▀▀▀▀▀███ ▐ 
 ▐▄ ▓██▄  █▄
 ▀▀▀▀░░▀█▀▀▀██
█   ▄ ▓██     ▄▄
▄▄▄      ▄▄▄▄▄▄
▄▌▌ ▒▓ ▐ ▄▄▄
▄   ▄▄▄  ▄█████▀▀███
███▄▀▀▀▀▀▄▄█   
                     
  ▐▌ ▒▓▓▐ ▐██▀
▀▀▀ ▀▀▀▀▀▀▄███████
▓▓▓▀██████████▀▀▀  
                     
 ▌ ▐ ▒▒▓▄ █████
█▀▀▀███▓▓██▀▀▄██▓
▓▓▀▀▓▓▓▓▓██████▄▄▀
▀                   
  ▌ ▌  ▓▓▌ ██▀█
██████████▓▓▓▓▓▄▄▀▀
▓▓▓▓████▄▄▄▄▄██
 ▀                 
     ▐  ▄▓▌ ▓█▄▄
▄██████████▄▀█▄▄▄███▄▄▄
▀▀█▀▀ ▄██ ▀▀    
               ▌    ▄
▄▄░▓█▀██▀▀▀▄▄▄▄▄▀▀
▓▓████▀▀▀▀▓▓▓▓▓███
▀ ▄▄█▀▀▀▀▀▀▀   
                 ▀▄▄▄
▀▀████████▓▓▓▓▓█▓▓▓▓
▓▓███▀████▓▓▓▓███
▀▀ ▄▄▄▄▄▄▄▄█   
                 ▄███
███████▓▓▓▓▓███▀█▓▓▓
▓▓▓███▀▄▄▄▄███████
█▀                   
          ▄ ▀▀▄███
█████████▄▄▐▌▀█▄▀▀▀
▀▀▀▄▄█▀▐  ▄▀▀▄▄▄███
▀▀                
            ██▄▄▄
▄▄▄▄▄▄▄▄▀▀▀▀▀▀█▄
 ▀▀▀▄██▀▀▀▀▀  ██
▄▄▄█           
               ▀ ██
           ▀▀▄▄▄▀▀
▀█▓▐▐█▓▀▀▀▀▄▄▄▀▀ 
█▀  ▄▄▄          
                 ██
▄          ▀▄▀█▄
███▓▓█▌▌▐█▓█████
█▀▄█  █           
                    
 ███           ▄▀
▄▄██████▐█▒█▐████
███▄▀▄  █▀      
                     
  ▄██▄           
 ▄▄█▀▄▄▄██████████
▄▄▄▀▄  ▄ █▀   
                     
    ▌█▄           
    ▄▄▄▄█▀▄▄▄██▄▄
▄▀█▄▄▄    ▄▄█  
                      
    ▌▄            
        ▄▄▄▄▄▄▄▄▄
▄▄▄         ▄▄▄     
                      
 ▄▄▄                
                     
                     
      leahciM  
  ▓████ ▄▀   ▓█
███ ▄▄ ▀▀▀▀██▐
 ████▀ ▀▀▀    
       :yb neercS  
 ▓████     ▓██
██▄  ▀ ████ ░ ▓
███▐▄ ▓███▀▄▄█▀
▀▀                 
   ▓███▄ ▄▀█ 
 ▓████▄ ▀▀ ███
▄ ░ ▓███▀▄ ▓███
▀ ▄▄██▀▀▀       
         ▓███  
▄   ▓███▄▄▀▀▀▀
▄▄  ░░█▌ ▓███
▀▄ ▓▓██▀  ▄█▀
██▀▀ █     ▀▀▀ ▀▀▀
▓███     ▓███▄
 ▀▀▄▄▄   ▄ ░  
██▄▀▄█ ▄▄ ▓
██▀  ▄▄▄███▀   
  ▄▀▀▀▀▀███ ▐ 
 ▐▄ ▓██▄  █▄
 ▀▀▀▀░░▀█▀▀▀██
█   ▄ ▓██     ▄▄
▄▄▄      ▄▄▄▄▄▄
▄▌▌ ▒▓ ▐ ▄▄▄
▄   ▄▄▄  ▄█████▀▀███
███▄▀▀▀▀▀▄▄█   
                     
  ▐▌ ▒▓▓▐ ▐██▀
▀▀▀ ▀▀▀▀▀▀▄███████
▓▓▓▀██████████▀▀▀  
                     
 ▌ ▐ ▒▒▓▄ █████
█▀▀▀███▓▓██▀▀▄██▓
▓▓▀▀▓▓▓▓▓██████▄▄▀
▀                   
  ▌ ▌  ▓▓▌ ██▀█
██████████▓▓▓▓▓▄▄▀▀
▓▓▓▓████▄▄▄▄▄██
 ▀                 
     ▐  ▄▓▌ ▓█▄▄
▄██████████▄▀█▄▄▄███▄▄▄
▀▀█▀▀ ▄██ ▀▀    
               ▌    ▄
▄▄░▓█▀██▀▀▀▄▄▄▄▄▀▀
▓▓████▀▀▀▀▓▓▓▓▓███
▀ ▄▄█▀▀▀▀▀▀▀   
                 ▀▄▄▄
▀▀████████▓▓▓▓▓█▓▓▓▓
▓▓███▀████▓▓▓▓███
▀▀ ▄▄▄▄▄▄▄▄█   
                 ▄███
███████▓▓▓▓▓███▀█▓▓▓
▓▓▓███▀▄▄▄▄███████
█▀                   
          ▄ ▀▀▄███
█████████▄▄▐▌▀█▄▀▀▀
▀▀▀▄▄█▀▐  ▄▀▀▄▄▄███
▀▀                
            ██▄▄▄
▄▄▄▄▄▄▄▄▀▀▀▀▀▀█▄
 ▀▀▀▄██▀▀▀▀▀  ██
▄▄▄█           
               ▀ ██
           ▀▀▄▄▄▀▀
▀█▓▐▐█▓▀▀▀▀▄▄▄▀▀ 
█▀  ▄▄▄          
                 ██
▄          ▀▄▀█▄
███▓▓█▌▌▐█▓█████
█▀▄█  █           
                    
 ███           ▄▀
▄▄██████▐█▒█▐████
███▄▀▄  █▀      
                     
  ▄██▄           
 ▄▄█▀▄▄▄██████████
▄▄▄▀▄  ▄ █▀   
                     
    ▌█▄           
    ▄▄▄▄█▀▄▄▄██▄▄
▄▀█▄▄▄    ▄▄█  
                      
    ▌▄            
        ▄▄▄▄▄▄▄▄▄
▄▄▄         ▄▄▄     
                      
 ▄▄▄                
                     
                     

View File

@@ -390,38 +390,4 @@ public class GameMap implements IGameMap {
}
return neighbours;
}
/**
* Goes in a direction, and saves all locations it passes to a list.
*
* @param locations Target list
* @param loc The location to start from
* @param dir Which direction to go
* @param max Maximum amount of steps
*/
private void addLoc(List<ILocation> locations, ILocation loc, GridDirection dir, int max) {
for (int j = 0; j < max; j++) {
locations.add(loc);
if (loc.canGo(dir)) {
loc = loc.go(dir);
} else {
return;
}
}
}
/**
* Goes a set amount of steps in a set direction, from a location, and returns the new location.
*
* @param loc Start location
* @param dir Direction to go
* @param max Maximum amount of steps
* @return The new location
*/
private ILocation goTo(ILocation loc, GridDirection dir, int max) {
for (int j = 0; j < max; j++) {
loc = loc.go(dir);
}
return loc;
}
}

View File

@@ -63,7 +63,8 @@ public class MapReader {
*/
public static IGrid<String> readFile(String path) {
IGrid<String> symbolMap = null;
InputStream stream = MapReader.class.getResourceAsStream(path);
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
InputStream stream = classloader.getResourceAsStream(path);
if (stream == null)
return null;
try (Scanner in = new Scanner(stream, "UTF-8")) {

View File

@@ -14,6 +14,8 @@ import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import java.io.File;
import java.io.FileNotFoundException;
import java.net.URL;
import java.util.List;
/**
@@ -167,9 +169,14 @@ public class NPC {
* @param filename The String path of the audio file to play
*/
public static void playSound(String filename) {
Media sound = new Media(new File(filename).toURI().toString());
MediaPlayer mediaPlayer = new MediaPlayer(sound);
mediaPlayer.play();
URL url = NPC.class.getClassLoader().getResource(filename);
if (url != null) {
Media sound = new Media(url.toString());
MediaPlayer mediaPlayer = new MediaPlayer(sound);
mediaPlayer.play();
} else {
System.out.println("Could not play audio file " + filename);
}
}
/**

Some files were not shown because too many files have changed in this diff Show More