comment cleanup 1, test commit
This commit is contained in:
parent
22186c33b9
commit
c528157a0e
3 changed files with 1 additions and 82 deletions
|
@ -1,22 +1,9 @@
|
||||||
package game;
|
package game;
|
||||||
|
|
||||||
public interface CVar extends Displayable {
|
public interface CVar extends Displayable {
|
||||||
// Object data;
|
|
||||||
// Object aux_data;
|
|
||||||
// int value;
|
|
||||||
// int def;
|
|
||||||
// int min;
|
|
||||||
// int max;
|
|
||||||
// boolean startup;
|
|
||||||
|
|
||||||
// default boolean isReadOnly() {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
String getType();
|
String getType();
|
||||||
CVarCategory getCategory();
|
CVarCategory getCategory();
|
||||||
String getCVarName();
|
String getCVarName();
|
||||||
// default void set() {
|
|
||||||
// }
|
|
||||||
boolean parse(String str);
|
boolean parse(String str);
|
||||||
String format();
|
String format();
|
||||||
String getDefault();
|
String getDefault();
|
||||||
|
|
|
@ -159,13 +159,6 @@ public class Game implements IThreadListener {
|
||||||
Game.getGame().resize(value);
|
Game.getGame().resize(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// public static class DebugFunction implements BoolFunction {
|
|
||||||
// public void apply(BoolVar cv, boolean value) {
|
|
||||||
// if(Game.getGame().getAudioInterface() != null)
|
|
||||||
// Game.getGame().getAudioInterface().alSetDebug(value);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public static class DistanceFunction implements IntFunction {
|
public static class DistanceFunction implements IntFunction {
|
||||||
public void apply(IntVar cv, int value) {
|
public void apply(IntVar cv, int value) {
|
||||||
|
@ -174,12 +167,6 @@ public class Game implements IThreadListener {
|
||||||
Game.getGame().distance(value);
|
Game.getGame().distance(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// private static class BuildTimeFunction implements IntFunction {
|
|
||||||
// public void apply(IntVar cv, int value) {
|
|
||||||
// SKC.buildtime(value);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public static final int LOG_BUFFER = 32768;
|
public static final int LOG_BUFFER = 32768;
|
||||||
|
|
||||||
|
@ -196,12 +183,10 @@ public class Game implements IThreadListener {
|
||||||
private boolean quarternary;
|
private boolean quarternary;
|
||||||
public boolean jump;
|
public boolean jump;
|
||||||
public boolean sneak;
|
public boolean sneak;
|
||||||
// public boolean hideGUI;
|
|
||||||
public boolean debugCamEnable;
|
public boolean debugCamEnable;
|
||||||
public boolean debugWorld;
|
public boolean debugWorld;
|
||||||
public boolean zooming;
|
public boolean zooming;
|
||||||
public boolean sprint;
|
public boolean sprint;
|
||||||
// public boolean overlay;
|
|
||||||
public boolean renderOutlines;
|
public boolean renderOutlines;
|
||||||
public boolean setGamma;
|
public boolean setGamma;
|
||||||
public boolean nickChanged;
|
public boolean nickChanged;
|
||||||
|
@ -210,8 +195,6 @@ public class Game implements IThreadListener {
|
||||||
public boolean itemCheat;
|
public boolean itemCheat;
|
||||||
public boolean dayCycle = true;
|
public boolean dayCycle = true;
|
||||||
|
|
||||||
// public int displayWidth = 1280;
|
|
||||||
// public int displayHeight = 800;
|
|
||||||
private int leftClickCounter;
|
private int leftClickCounter;
|
||||||
private int rightClickTimer;
|
private int rightClickTimer;
|
||||||
private int chunkLoadTimer;
|
private int chunkLoadTimer;
|
||||||
|
@ -271,9 +254,6 @@ public class Game implements IThreadListener {
|
||||||
|
|
||||||
@Variable(name = "win_sync", category = CVarCategory.WINDOW, min = -1, max = 16384, callback = SyncFunction.class)
|
@Variable(name = "win_sync", category = CVarCategory.WINDOW, min = -1, max = 16384, callback = SyncFunction.class)
|
||||||
public int sync = 0;
|
public int sync = 0;
|
||||||
|
|
||||||
// public int fb;
|
|
||||||
// public int fbtex;
|
|
||||||
|
|
||||||
public int width;
|
public int width;
|
||||||
public int height;
|
public int height;
|
||||||
|
@ -289,9 +269,6 @@ public class Game implements IThreadListener {
|
||||||
public int saved_ypos = 0x80000000;
|
public int saved_ypos = 0x80000000;
|
||||||
public int fb_x;
|
public int fb_x;
|
||||||
public int fb_y;
|
public int fb_y;
|
||||||
|
|
||||||
// public Gui queue;
|
|
||||||
|
|
||||||
|
|
||||||
@Variable(name = "phy_sensitivity", category = CVarCategory.PHYSICS, min = 0.01f, max = 10.0f, display = "Mausempfindlichkeit", precision = 2, unit = "%")
|
@Variable(name = "phy_sensitivity", category = CVarCategory.PHYSICS, min = 0.01f, max = 10.0f, display = "Mausempfindlichkeit", precision = 2, unit = "%")
|
||||||
public float sensitivity = 1.0f;
|
public float sensitivity = 1.0f;
|
||||||
|
@ -342,31 +319,12 @@ public class Game implements IThreadListener {
|
||||||
public int port = 26666;
|
public int port = 26666;
|
||||||
public int bind = -1;
|
public int bind = -1;
|
||||||
|
|
||||||
// @Variable(name = "mid_play_unknown", category = CVarCategory.SOUND, display = "Unbekannte Banken")
|
|
||||||
// public boolean midiUnknownBanks = true;
|
|
||||||
// @Variable(name = "mid_keep_notes", category = CVarCategory.SOUND, display = "Stimmen behalten")
|
|
||||||
// public boolean midiKeepNotes = false;
|
|
||||||
// @Variable(name = "mid_dont_fade", category = CVarCategory.SOUND, display = "Nicht ausklingen")
|
|
||||||
// public boolean midiNoWait = false;
|
|
||||||
// @Variable(name = "mid_debug_events", category = CVarCategory.SOUND, callback = DebugFunction.class, display = "MIDI-Debug")
|
|
||||||
// public boolean midiDebug = false;
|
|
||||||
// @Variable(name = "mid_velocity_func", category = CVarCategory.SOUND, min = -128, max = 127, display = "Anschlag")
|
|
||||||
// public int midiVeloFunc = 1;
|
|
||||||
// @Variable(name = "mid_opl_voices", category = CVarCategory.SOUND, min = 4, max = 192, display = "OPL-Stimmen")
|
|
||||||
// public int midiVoices = 64;
|
|
||||||
// @Variable(name = "mid_opl_bank", category = CVarCategory.SOUND, display = "OPL-Bank")
|
|
||||||
// public OPL3Bank midiBank = OPL3Bank.DMX_DMX;
|
|
||||||
|
|
||||||
@Variable(name = "snd_device_type", category = CVarCategory.SOUND, display = "Tonausgabe")
|
@Variable(name = "snd_device_type", category = CVarCategory.SOUND, display = "Tonausgabe")
|
||||||
public boolean soundEnabled = true;
|
public boolean soundEnabled = true;
|
||||||
// @Variable(name = "snd_sample_rate", category = CVarCategory.SOUND, display = "Abtastrate")
|
|
||||||
// public SampleRate soundSampleRate = SampleRate.DAT;
|
|
||||||
@Variable(name = "snd_buffer_size", category = CVarCategory.SOUND, min = 0, max = 1048576, display = "Puffergröße")
|
@Variable(name = "snd_buffer_size", category = CVarCategory.SOUND, min = 0, max = 1048576, display = "Puffergröße")
|
||||||
public int soundBufferSize = 2048;
|
public int soundBufferSize = 2048;
|
||||||
@Variable(name = "snd_frame_size", category = CVarCategory.SOUND, min = 2, max = 8192, display = "PCM-Intervall")
|
@Variable(name = "snd_frame_size", category = CVarCategory.SOUND, min = 2, max = 8192, display = "PCM-Intervall")
|
||||||
public int soundFrameSize = 32;
|
public int soundFrameSize = 32;
|
||||||
// @Variable(name = "snd_sample_format", category = CVarCategory.SOUND, display = "Sample-Format")
|
|
||||||
// public SampleFormat soundSampleFormat = SampleFormat.S16LE;
|
|
||||||
|
|
||||||
private Server server;
|
private Server server;
|
||||||
private AudioInterface audio;
|
private AudioInterface audio;
|
||||||
|
@ -380,14 +338,7 @@ public class Game implements IThreadListener {
|
||||||
private final Bind[] keyBindsHotbar = new Bind[] {
|
private final Bind[] keyBindsHotbar = new Bind[] {
|
||||||
Bind.SELECT1, Bind.SELECT2, Bind.SELECT3, Bind.SELECT4, Bind.SELECT5, Bind.SELECT6, Bind.SELECT7, Bind.SELECT8, Bind.SELECT9
|
Bind.SELECT1, Bind.SELECT2, Bind.SELECT3, Bind.SELECT4, Bind.SELECT5, Bind.SELECT6, Bind.SELECT7, Bind.SELECT8, Bind.SELECT9
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// this.gm.launchIntegratedServer(null, "Debug");
|
|
||||||
// this.gm.launchIntegratedServer(dir, user);
|
|
||||||
// }
|
|
||||||
// this.gm.displayGuiScreen(new GuiConnecting(this.gm, server));
|
|
||||||
|
|
||||||
private Game() {
|
private Game() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,12 +371,6 @@ public class Game implements IThreadListener {
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void convert(String folder, String user)
|
|
||||||
// {
|
|
||||||
// SKC.info("Welt '" + folder + "' wird konvertiert");
|
|
||||||
// Converter.convertMapFormat(new File(folder), user, null);
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void connectToIntegrated(Server server, String user) {
|
public void connectToIntegrated(Server server, String user) {
|
||||||
this.debugWorld = server.getFolder() == null;
|
this.debugWorld = server.getFolder() == null;
|
||||||
this.displayGuiScreen(null);
|
this.displayGuiScreen(null);
|
||||||
|
@ -437,23 +382,16 @@ public class Game implements IThreadListener {
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public void disconnected(String reason) {
|
|
||||||
// SKC.disconnected(reason);
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void unloadWorld() {
|
public void unloadWorld() {
|
||||||
NetHandlerPlayClient netHandler = this.getNetHandler();
|
NetHandlerPlayClient netHandler = this.getNetHandler();
|
||||||
if(netHandler != null)
|
if(netHandler != null)
|
||||||
netHandler.cleanup();
|
netHandler.cleanup();
|
||||||
// if(this.server != null)
|
|
||||||
// this.server.shutdown();
|
|
||||||
this.debugWorld = false;
|
this.debugWorld = false;
|
||||||
this.viewEntity = null;
|
this.viewEntity = null;
|
||||||
this.connection = null;
|
this.connection = null;
|
||||||
this.theWorld = null;
|
this.theWorld = null;
|
||||||
this.thePlayer = null;
|
this.thePlayer = null;
|
||||||
this.soundManager.stopSounds();
|
this.soundManager.stopSounds();
|
||||||
// SKC.loaded(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshResources()
|
public void refreshResources()
|
||||||
|
@ -472,11 +410,7 @@ public class Game implements IThreadListener {
|
||||||
{
|
{
|
||||||
this.textureManager = new TextureManager();
|
this.textureManager = new TextureManager();
|
||||||
this.textureManager.onReload();
|
this.textureManager.onReload();
|
||||||
// if(!Region.SAVE_DIR.exists()) {
|
|
||||||
// Region.SAVE_DIR.mkdirs();
|
|
||||||
// }
|
|
||||||
this.soundManager = new SoundManager(this);
|
this.soundManager = new SoundManager(this);
|
||||||
// FontRenderer.setTextureManager(this.textureManager);
|
|
||||||
Colorizer.reload();
|
Colorizer.reload();
|
||||||
GlState.enableTexture2D();
|
GlState.enableTexture2D();
|
||||||
GlState.shadeModel(7425);
|
GlState.shadeModel(7425);
|
||||||
|
@ -509,7 +443,6 @@ public class Game implements IThreadListener {
|
||||||
EntityTexManager.loadNpcTextures();
|
EntityTexManager.loadNpcTextures();
|
||||||
this.effectRenderer = new EffectRenderer(this.theWorld, this.textureManager);
|
this.effectRenderer = new EffectRenderer(this.theWorld, this.textureManager);
|
||||||
new File("skins").mkdirs();
|
new File("skins").mkdirs();
|
||||||
// this.displayGuiScreen(new GuiEmpty());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void start()
|
public void start()
|
||||||
|
|
|
@ -26,6 +26,5 @@ public class Timing {
|
||||||
public static float tickrate;
|
public static float tickrate;
|
||||||
public static float fdelta;
|
public static float fdelta;
|
||||||
public static int tickTarget;
|
public static int tickTarget;
|
||||||
// public static int tickTimeout;
|
|
||||||
public static int tickFrame;
|
public static int tickFrame;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue