Joise, Kotlin (it's working at least)

Former-commit-id: d5be0e95ba259d566d6d5d20eb576010a149ae7d
Former-commit-id: 9502c7cd7e738147e31d2e9824e48bea24d00abf
This commit is contained in:
Song Minjae
2016-03-14 22:43:28 +09:00
parent 46a553d258
commit 3f49a8aebe
342 changed files with 17386 additions and 360 deletions

2
.idea/compiler.xml generated
View File

@@ -14,7 +14,7 @@
<entry name="!?*.aj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<profile default="true" name="Default" enabled="true">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>

10
.idea/libraries/KotlinJavaRuntime.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<component name="libraryTable">
<library name="KotlinJavaRuntime">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/kotlin-reflect.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -19,6 +19,7 @@
</NATIVE>
<SOURCES>
<root url="file://$USER_HOME$/Downloads/slick/src" />
<root url="jar://$PROJECT_DIR$/lib/kotlin-runtime-sources.jar!/" />
</SOURCES>
<excluded>
<root url="jar://$PROJECT_DIR$/lib/gson-2.5-javadoc.jar!/" />

BIN
lib/kotlin-reflect.jar Executable file

Binary file not shown.

BIN
lib/kotlin-runtime-sources.jar Executable file

Binary file not shown.

BIN
lib/kotlin-runtime.jar Executable file

Binary file not shown.

View File

@@ -4,14 +4,14 @@ import com.Torvald.Rand.HQRNG;
import com.Torvald.Terrarum.*;
import com.Torvald.Terrarum.GameMap.GameMap;
import com.Torvald.Terrarum.MapDrawer.MapDrawer;
import com.Torvald.Terrarum.NotNull;
import com.Torvald.Terrarum.Nullable;
import com.Torvald.Terrarum.TileProperties.TilePropCodex;
import com.Torvald.spriteAnimation.SpriteAnimation;
import com.jme3.math.FastMath;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import java.io.Serializable;
/**
* Created by minjaesong on 16-01-13.
*/
@@ -245,7 +245,7 @@ public class ActorWithBody implements Actor, Visible, Glowing {
*/
// FIXME abnormal jump behaviour if mass < 2, same thing happens if mass == 0 (but zero mass is invalid anyway).
private void applyGravitation() {
if (!isGrounded()) {
if (!getGrounded()) {
/**
* weight; gravitational force in action
* W = mass * G (9.8 [m/s^2])
@@ -766,11 +766,6 @@ public class ActorWithBody implements Actor, Visible, Glowing {
if (sprite != null) sprite.update(delta_t);
}
@Override
public long getRefID() {
return referenceID;
}
private float clampW(float x) {
if (x < TSIZE + nextHitbox.getWidth() / 2) {
return TSIZE + nextHitbox.getWidth() / 2;
@@ -980,6 +975,17 @@ public class ActorWithBody implements Actor, Visible, Glowing {
this.density = density;
}
@org.jetbrains.annotations.Nullable
@Override
public Long getReferenceID() {
return this.referenceID;
}
@Override
public void setReferenceID(@org.jetbrains.annotations.Nullable Long aLong) {
referenceID = aLong;
}
}
/**

View File

@@ -12,7 +12,7 @@ import java.io.IOException;
/**
* Created by minjaesong on 16-02-05.
*/
public class CreatureBuildFactory {
public class CreatureFactory {
private static final String JSONPATH = "./res/raw/";
@@ -62,7 +62,6 @@ public class CreatureBuildFactory {
actor.inventory = new ActorInventory((int) actor.actorValue.get("encumberance"), true);
return actor;
}

View File

@@ -13,7 +13,7 @@ import java.io.IOException;
/**
* Created by minjaesong on 16-02-03.
*/
public class PBFSigrid {
public class PFSigrid {
private static String FACTION_PATH = "./res/raw/";
@@ -36,7 +36,6 @@ public class PBFSigrid {
p.spriteGlow.setAsVisible();
p.spriteGlow.composeSprite();
p.actorValue = new ActorValue();
p.actorValue.set("scale", 1.0f);
p.actorValue.set("speed", 4.0f);
@@ -66,7 +65,7 @@ public class PBFSigrid {
p.setHitboxDimension(18, 46, 8, 0);
p.inventory = new ActorInventory(0x7FFFFFFF, true);
p.setInventory(new ActorInventory(0x7FFFFFFF, true));
p.setPosition(4096 * 16, 300 * 16);

View File

@@ -522,16 +522,6 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac
}
}
@Override
public ActorInventory getInventory() {
return inventory;
}
@Override
public void overwriteInventory(ActorInventory inventory) {
this.inventory = inventory;
}
public boolean isNoClip() {
return noClip;
}

View File

@@ -38,7 +38,7 @@ public class PlayerDebugger {
public float scale() { return getPlayer().getScale(); }
public Hitbox hitbox() { return getPlayer().getHitbox(); }
public Hitbox nextHitbox() { return getPlayer().getNextHitbox(); }
public boolean grounded() { return getPlayer().isGrounded(); }
public boolean grounded() { return getPlayer().getGrounded(); }
public ActorValue actorValue() { return getPlayer().getActorValue(); }
public float mass() { return getPlayer().getMass(); }
public boolean noClip() { return getPlayer().isNoClip(); }

View File

@@ -60,13 +60,29 @@
"13"; "12";"TILE_ILLUMINATOR_GREY_LIGHT"; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "47589"; "13"; "12"; "0";"16"
"13"; "13";"TILE_ILLUMINATOR_GREY_MED"; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "29538"; "13"; "13"; "0";"16"
"13"; "14";"TILE_ILLUMINATOR_GREY_DARK"; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "16410"; "13"; "14"; "0";"16"
"13"; "15";"TILE_ILLUMINATOR_BLACK" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "4923"; "13"; "15"; "0";"16"
"14"; "0";"TILE_SANDSTONE" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "14"; "0"; "0";"16"
"14"; "1";"TILE_SANDSTONE_WHITE" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "14"; "1"; "0";"16"
"14"; "2";"TILE_SANDSTONE_RED" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "14"; "2"; "0";"16"
"14"; "3";"TILE_SANDSTONE_DESERT" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "14"; "3"; "0";"16"
"14"; "4";"TILE_SANDSTONE_BLACK" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "14"; "4"; "0";"16"
"14"; "5";"TILE_SANDSTONE_BLACK" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "14"; "5"; "0";"16"
"13"; "15";"TILE_ILLUMINATOR_BLACK" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "27239"; "13"; "15"; "0";"16"
"14"; "0";"TILE_ILLUMINATOR_WHITE" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "0"; "0";"16"
"14"; "1";"TILE_ILLUMINATOR_YELLOW" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "1"; "0";"16"
"14"; "2";"TILE_ILLUMINATOR_ORANGE" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "2"; "0";"16"
"14"; "3";"TILE_ILLUMINATOR_RED" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "3"; "0";"16"
"14"; "4";"TILE_ILLUMINATOR_FUCHSIA" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "4"; "0";"16"
"14"; "5";"TILE_ILLUMINATOR_PURPLE" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "5"; "0";"16"
"14"; "6";"TILE_ILLUMINATOR_BLUE" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "6"; "0";"16"
"14"; "7";"TILE_ILLUMINATOR_CYAN" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "7"; "0";"16"
"14"; "8";"TILE_ILLUMINATOR_GREEN" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "8"; "0";"16"
"14"; "9";"TILE_ILLUMINATOR_GREEN_DARK"; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "9"; "0";"16"
"14"; "10";"TILE_ILLUMINATOR_BROWN" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "10"; "0";"16"
"14"; "11";"TILE_ILLUMINATOR_TAN" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "11"; "0";"16"
"14"; "12";"TILE_ILLUMINATOR_GREY_LIGHT"; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "12"; "0";"16"
"14"; "13";"TILE_ILLUMINATOR_GREY_MED"; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "13"; "0";"16"
"14"; "14";"TILE_ILLUMINATOR_GREY_DARK"; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "14"; "0";"16"
"14"; "15";"TILE_ILLUMINATOR_BLACK" ; "0"; "0"; "N/A"; "0"; "0"; "1"; "1"; "0"; "13"; "15"; "0";"16"
"15"; "0";"TILE_SANDSTONE" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "15"; "0"; "0";"16"
"15"; "1";"TILE_SANDSTONE_WHITE" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "15"; "1"; "0";"16"
"15"; "2";"TILE_SANDSTONE_RED" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "15"; "2"; "0";"16"
"15"; "3";"TILE_SANDSTONE_DESERT" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "15"; "3"; "0";"16"
"15"; "4";"TILE_SANDSTONE_BLACK" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "15"; "4"; "0";"16"
"15"; "5";"TILE_SANDSTONE_BLACK" ; "8205"; "25";"1900"; "0"; "0"; "1"; "1"; "0"; "15"; "5"; "0";"16"
"254"; "0";"TILE_WATER" ; "6522"; "100";"1000"; "1"; "12"; "0"; "0"; "0"; "N/A"; "N/A"; "0";"16"
"254"; "1";"TILE_WATER" ; "6522"; "100";"1000"; "1"; "12"; "0"; "0"; "0"; "N/A"; "N/A"; "0";"16"
"254"; "2";"TILE_WATER" ; "6522"; "100";"1000"; "1"; "12"; "0"; "0"; "0"; "N/A"; "N/A"; "0";"16"
@@ -111,6 +127,8 @@
# Magical ice: theoretical __metallic__ ice that might form under super-high pressure (> 5 TPa). Its density is a wild guess.
# Off illuminator: NO OPACITY! this is intended!
# References:
# * Density of various woods : http://www.engineeringtoolbox.com/wood-density-d_40.html
# * Density of various phases of ice : http://www1.lsbu.ac.uk/water/ice_phases.html
Can't render this file because it contains an unexpected character in line 1 and column 18.

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