new gitignore, not much else.
parent
26b790ed78
commit
6d6c799904
|
|
@ -1,43 +1,215 @@
|
|||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# =========================
|
||||
# Operating System Files
|
||||
# =========================
|
||||
|
||||
# OSX
|
||||
# =========================
|
||||
|
||||
#################
|
||||
## Eclipse
|
||||
#################
|
||||
|
||||
*.pydevproject
|
||||
.project
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.classpath
|
||||
.settings/
|
||||
.loadpath
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# CDT-specific
|
||||
.cproject
|
||||
|
||||
# PDT-specific
|
||||
.buildpath
|
||||
|
||||
|
||||
#################
|
||||
## Visual Studio
|
||||
#################
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.sln.docstates
|
||||
|
||||
# Build results
|
||||
|
||||
[Dd]ebug/
|
||||
[Rr]elease/
|
||||
x64/
|
||||
build/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.log
|
||||
*.scc
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
*.pubxml
|
||||
|
||||
# NuGet Packages Directory
|
||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
||||
#packages/
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
AppPackages/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.[Pp]ublish.xml
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
App_Data/*.mdf
|
||||
App_Data/*.ldf
|
||||
|
||||
#############
|
||||
## Windows detritus
|
||||
#############
|
||||
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Mac crap
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
#############
|
||||
## Python
|
||||
#############
|
||||
|
||||
# Files that might appear on external disk
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
*.py[co]
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
# Packages
|
||||
*.egg
|
||||
*.egg-info
|
||||
dist/
|
||||
build/
|
||||
eggs/
|
||||
parts/
|
||||
var/
|
||||
sdist/
|
||||
develop-eggs/
|
||||
.installed.cfg
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
|
||||
#Translations
|
||||
*.mo
|
||||
|
||||
#Mr Developer
|
||||
.mr.developer.cfg
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
|||
package MAndApps;
|
||||
package MAndEngine;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package MAndApps;
|
||||
package MAndEngine;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package MAndApps;
|
||||
package MAndEngine;
|
||||
|
||||
|
||||
import java.awt.AlphaComposite;
|
||||
|
|
@ -7,9 +7,9 @@ import java.awt.Graphics2D;
|
|||
import java.awt.Image;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
import static MAndApps.Engine.mouseX;
|
||||
import static MAndApps.Engine.mouseY;
|
||||
import static MAndApps.Engine.mouse;
|
||||
import static MAndEngine.Engine.mouse;
|
||||
import static MAndEngine.Engine.mouseX;
|
||||
import static MAndEngine.Engine.mouseY;
|
||||
|
||||
public class Button {
|
||||
private int clickLevel = 0;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package MAndApps;
|
||||
package MAndEngine;
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package MAndApps;
|
||||
package MAndEngine;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
|
@ -11,8 +11,7 @@ import java.util.Stack;
|
|||
|
||||
import javax.swing.*;
|
||||
|
||||
public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
||||
MouseListener {
|
||||
public class Engine extends Canvas implements KeyListener, MouseMotionListener, MouseListener {
|
||||
|
||||
/**
|
||||
* to track the x and y
|
||||
|
|
@ -54,8 +53,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
/**
|
||||
* more framerate stuff, again, chill.
|
||||
*/
|
||||
private static long nextSecond = System.currentTimeMillis() + 1000,
|
||||
startTime = 0;
|
||||
private static long nextSecond = System.currentTimeMillis() + 1000, startTime = 0;
|
||||
|
||||
/**
|
||||
* if our current framerate is below our expected. its not directly
|
||||
|
|
@ -102,8 +100,8 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
private static double progress = 1;
|
||||
|
||||
/**
|
||||
* These are fonts. because STANDARDIZATION!
|
||||
* worked good for oil, WHY NOT ME?
|
||||
* These are fonts. because STANDARDIZATION! worked good for oil, WHY NOT
|
||||
* ME?
|
||||
*/
|
||||
public static final Font largerFont = new Font("Ubuntu", Font.BOLD, 20);
|
||||
public static final Font defaultFont = new Font("Ubuntu", Font.BOLD, 11);
|
||||
|
|
@ -131,14 +129,14 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
*/
|
||||
public Engine(String[] classes, boolean showLoading) {
|
||||
|
||||
//frame.setVisible(true);
|
||||
|
||||
// frame.setVisible(true);
|
||||
|
||||
// set static object
|
||||
staticMain = this;
|
||||
|
||||
// initialize keys
|
||||
keys = new boolean[512];
|
||||
|
||||
|
||||
// set up window
|
||||
frame = new JFrame();
|
||||
setSize(WIDTH, HEIGHT);
|
||||
|
|
@ -148,50 +146,46 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
addKeyListener(this);
|
||||
requestFocus();
|
||||
|
||||
if(showLoading) frame.setVisible(true);
|
||||
|
||||
//make a new thread of the appinitializer thing
|
||||
//and like... make it do things.
|
||||
appInitializer = new AppHelper(classes);
|
||||
Thread thread = new Thread(appInitializer);
|
||||
thread.start();
|
||||
|
||||
|
||||
if (showLoading)
|
||||
frame.setVisible(true);
|
||||
|
||||
//we need to make a frame and such first
|
||||
//more on that later
|
||||
createBuffer();
|
||||
|
||||
|
||||
//while its faffing about, RENDER THINGS AND MAKE A LOADY THING
|
||||
while(!appInitializer.getDone() || !(progress >= 0.999)){
|
||||
try{
|
||||
// make a new thread of the appinitializer thing
|
||||
// and like... make it do things.
|
||||
appInitializer = new AppHelper(classes);
|
||||
Thread thread = new Thread(appInitializer);
|
||||
thread.start();
|
||||
|
||||
// we need to make a frame and such first
|
||||
// more on that later
|
||||
createBuffer();
|
||||
|
||||
// while its faffing about, RENDER THINGS AND MAKE A LOADY THING
|
||||
while (!appInitializer.getDone() || !(progress >= 0.999)) {
|
||||
try {
|
||||
Thread.sleep(17);
|
||||
}catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
}
|
||||
//this is the later part referred to by a few lines back
|
||||
// this is the later part referred to by a few lines back
|
||||
repaint();
|
||||
progress += (appInitializer.getProgress() - progress)/ANIMATION_CONSTANT;
|
||||
progress += (appInitializer.getProgress() - progress) / ANIMATION_CONSTANT;
|
||||
}
|
||||
|
||||
//we done now, gather the loot.
|
||||
apps = appInitializer.getApps();
|
||||
// we done now, gather the loot.
|
||||
apps = appInitializer.getApps();
|
||||
|
||||
switchApps(0);
|
||||
|
||||
switchApps(0);
|
||||
|
||||
}
|
||||
|
||||
//TODO at some point redo this to allow frame drop
|
||||
//if it gets laggy....
|
||||
public void run() {
|
||||
|
||||
|
||||
// REALLY????
|
||||
running = true;
|
||||
|
||||
|
||||
|
||||
frame.setVisible(true);
|
||||
|
||||
|
||||
// now we do stuff.
|
||||
while (running) {
|
||||
// FPS STUFF WORRY NOT, ITS ALL GOOD. MOVE ALONG.
|
||||
|
|
@ -211,8 +205,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
// FRAMERATE OVERCLOCKING AND SUCH, MOVE ALONG.
|
||||
try {
|
||||
if (!overclock)
|
||||
Thread.sleep((long) Math.floor(sleepTime
|
||||
- (System.currentTimeMillis() - startTime)));
|
||||
Thread.sleep((long) Math.floor(sleepTime - (System.currentTimeMillis() - startTime)));
|
||||
else
|
||||
Thread.sleep(0);
|
||||
lag = false;
|
||||
|
|
@ -226,8 +219,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
* makes a buffer and stuff, called with new windows and things. MOVE ALONG
|
||||
*/
|
||||
private static void createBuffer() {
|
||||
buffer = (Image) (new BufferedImage(WIDTH, HEIGHT,
|
||||
BufferedImage.TRANSLUCENT));
|
||||
buffer = (Image) (new BufferedImage(WIDTH, HEIGHT, BufferedImage.TRANSLUCENT));
|
||||
g2 = (Graphics2D) buffer.getGraphics();
|
||||
}
|
||||
|
||||
|
|
@ -259,7 +251,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
log("setting window properties");
|
||||
setWindowProperties(apps[app]);
|
||||
log("Started up " + apps[app].getTitle());
|
||||
|
||||
|
||||
frame.pack();
|
||||
|
||||
// because we now use the ONE buffer system... yeah
|
||||
|
|
@ -280,8 +272,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
* @param app
|
||||
*/
|
||||
private static void setWindowProperties(BasicApp app) {
|
||||
setWindowProperties(app.getResolution(), app.getFramerate(),
|
||||
app.getResizable());
|
||||
setWindowProperties(app.getResolution(), app.getFramerate(), app.getResizable());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -291,8 +282,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
* @param fps
|
||||
* @param resizable
|
||||
*/
|
||||
private static void setWindowProperties(Dimension dimension, int fps,
|
||||
boolean resizable) {
|
||||
private static void setWindowProperties(Dimension dimension, int fps, boolean resizable) {
|
||||
|
||||
staticMain.setSize(dimension);
|
||||
frame.setResizable(true);
|
||||
|
|
@ -315,10 +305,8 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
|
||||
private static void render(Graphics2D g) {
|
||||
|
||||
g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
|
||||
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
|
||||
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
|
||||
RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
|
||||
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
|
||||
g.setFont(defaultFont);
|
||||
|
||||
|
|
@ -345,8 +333,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
g.setColor(Color.WHITE);
|
||||
if (!(log.size() == 0))
|
||||
for (int i = log.size() - 1; i >= 0; i--)
|
||||
log.elementAt(i).render(g, WIDTH - 200,
|
||||
HEIGHT - 10 - (i * 12));
|
||||
log.elementAt(i).render(g, WIDTH - 200, HEIGHT - 10 - (i * 12));
|
||||
} catch (Exception e) {
|
||||
g.setFont(largerFont);
|
||||
g.setColor(Color.BLACK);
|
||||
|
|
@ -387,7 +374,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
@Override
|
||||
public void keyPressed(KeyEvent e) {
|
||||
apps[app].keyPressed(e);
|
||||
if (e.getKeyCode() == KeyEvent.VK_O) {
|
||||
if (e.getKeyCode() == KeyEvent.VK_O && keys[KeyEvent.VK_CONTROL]) {
|
||||
overclock = !overclock;
|
||||
}
|
||||
keys[e.getKeyCode()] = true;
|
||||
|
|
@ -398,27 +385,27 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
|
|||
apps[app].keyReleased(e);
|
||||
keys[e.getKeyCode()] = false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void keyTyped(KeyEvent arg0) {
|
||||
}
|
||||
|
||||
|
||||
public static void exit() {
|
||||
frame.dispose();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
|
||||
private static void setFramerate(int fps) {
|
||||
frameSync = fps;
|
||||
sleepTime = 1000 / frameSync;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void mouseDragged(MouseEvent e) {
|
||||
mouseX = e.getX();
|
||||
mouseY = e.getY();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void mouseMoved(MouseEvent e) {
|
||||
mouseX = e.getX();
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package MAndApps;
|
||||
package MAndEngine;
|
||||
|
||||
|
||||
import java.awt.Color;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package MAndApps;
|
||||
package MAndEngine;
|
||||
|
||||
import java.awt.Graphics;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package MAndApps;
|
||||
package MAndEngine;
|
||||
|
||||
public class Pointer<E> {
|
||||
private volatile E object;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package MAndApps;
|
||||
package MAndEngine;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package MAndApps;
|
||||
package MAndEngine;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue