41 Commits

Author SHA1 Message Date
VIA256 697eb88a1a add little fix for high resolutions moniters
a lot of people have had issues with fonts/textures getting messed up on high resolutions
2025-12-07 14:38:32 -08:00
VIA256 a3b12586e0 undo Object.cs CompareBaseObject implementation
on second thought lets not get into the weeds with this yet
2025-12-07 14:23:27 -08:00
VIA256 2eb0549f6f reimplement internal call for UnityEngine.Object::CompareBaseObjects 2025-12-06 18:16:52 -08:00
VIA256 79080a6e55 MarsRuntime: fix missing semicolon 2025-11-13 16:14:48 -08:00
VIA256 70a50e3bf5 MarsRuntime: impliment logging to output_log.txt 2025-11-13 15:57:18 -08:00
VIA256 a95257981c organize mono init code into its own func 2025-11-13 09:36:10 -08:00
VIA256 bc90b054e2 MarsRuntime fully make building work on mac 2025-11-12 19:56:11 -08:00
VIA256 047388a74e MarsRuntime: make wscript account for darwin hosts 2025-11-12 19:41:47 -08:00
VIA256 702697ec13 mention the requirement of a c compiler in README.md 2025-11-11 15:20:31 -08:00
VIA256 7fe9a1b8a5 MarsRuntime: fix warning on linux caused by joining win32 and linux mono runtime linker 2025-11-11 15:08:33 -08:00
VIA256 5998a401ff MarsRuntime: attempt 1 at making runtimelinker win/linux cross platform with preprocessor 2025-11-11 12:23:47 -08:00
VIA256 d75bc2aca9 MarsRuntime: start making runtime linking work on windows
much refactoring to do with this ofc but im eepy
2025-11-11 01:19:50 -08:00
VIA256 5c306dac5c MarsRuntime: make memory allo/deallocation of path strings in main.c less mind-numbing 2025-11-10 17:45:56 -08:00
VIA256 d1dbf22af0 MarsRuntime: make FSUtil use const char * as input instead of char *, add variadic MX_pathConcat 2025-11-10 15:15:09 -08:00
VIA256 eafdfec9d8 MarsRuntime: fix mono runtime linking and revert mscorlib.dll to old position 2025-11-10 12:04:53 -08:00
VIA256 07ae01a867 added runtime linking for mono 2025-11-08 23:00:46 -08:00
VIA256 2a8a6bf8e7 MarsRuntime: fix things i missed in the build script when changing to c from c++, and fixed memory allocation bugs in FCUtil.c 2025-11-08 14:25:57 -08:00
VIA256 4dbe5f67ed MarsRuntime: fuck it we use c now
cannot deal with c++ its too much madness istg
2025-11-07 23:36:17 -08:00
VIA256 fa5304e4b2 add unity resources from original Mars Explorer_Data to resources dir 2025-11-07 13:06:12 -08:00
VIA256 d504c12d54 MarsRuntime: fix problems that surfaced when testing on linux 2025-11-06 22:34:54 -08:00
VIA256 55d2752345 get rid of boost, make our own little fs path helper functions
we're not doing much heavy lifting with what we need boost.(filesystem, logging) for and its easy enough to make simple versions of these things ourselves. better than adding another dependancy
2025-11-06 22:16:40 -08:00
VIA256 ebb8d4670d setup to successfully load UnityDomainLoad.exe with dummy internalcall 2025-11-06 14:32:55 -08:00
VIA256 55a3764563 get mscorlib.dll working in runtime 2025-11-06 12:48:39 -08:00
VIA256 b75ffdb50b start preparing source tree for using machine config and mscorlib 2025-11-06 10:02:51 -08:00
VIA256 9be77652c3 MarsRuntime: try loading UnityDomainLoad.exe in mono runtime 2025-11-06 09:45:18 -08:00
VIA256 16a891b425 fixed presumptuous .exe extension in MarsRuntime postbuild copy 2025-11-05 21:29:45 -08:00
VIA256 f1c8dfd6e0 add boost filesystem configuration to new waf file and test it in MarsRuntime 2025-11-05 21:18:41 -08:00
VIA256 ba484a42e2 add marsruntime postbuild copy 2025-11-05 19:40:30 -08:00
VIA256 b55a1e3ce4 fix various issues when testing on linux 2025-11-05 19:26:09 -08:00
VIA256 1592e648d6 add MarsRuntime and linking with mono 2025-11-05 18:50:28 -08:00
VIA256 6d59062c5a refactor waf setup to be able to build efficiently 2025-11-04 19:17:42 -08:00
VIA256 4d28ef7ef5 add waf.bat for convenience 2025-11-03 13:29:55 -08:00
VIA256 5b7bc3ee86 inform README.md abt the new waf system 2025-11-01 19:42:49 -04:00
VIA256 9572cee415 wscript find mono allow for path and --mono_home option override 2025-11-01 16:08:15 -07:00
VIA256 f29d498f68 fix some bugs issued by the different mono compiler 2025-11-01 14:59:11 -07:00
VIA256 5913d6be38 move everything in Game/ back into top level 2025-11-01 13:32:21 -07:00
VIA256 dddbd69a3d get rid of visual studio building support 2025-10-31 15:20:32 -07:00
VIA256 8d041fbb34 add waf build system setup 2025-10-31 01:11:00 -07:00
VIA256 7a252ce3e8 Revert "Start creating cmake build system"
This reverts commit 9cc907f653.
2025-10-30 17:00:36 -07:00
VIA256 9cc907f653 Start creating cmake build system 2025-10-29 19:24:25 -07:00
VIA256 ba9d5563df add semantic version class and make gameVersion use it 2025-10-27 16:41:30 -07:00
374 changed files with 1449 additions and 648 deletions
+4
View File
@@ -0,0 +1,4 @@
marsxplr_build/
waf*/
.lock-waf*
.DS_Store
+23
View File
@@ -0,0 +1,23 @@
## Assembly - CSharp
import os
import shutil
def post(bld):
distdir = os.path.join(bld.top_dir, 'marsxplr_build', 'Mars Explorer_Data')
os.makedirs(distdir, exist_ok=True)
shutil.copy(
os.path.join(bld.out_dir, 'Assembly_-_CSharp', 'e36192721fc364533a8edf2aefd3b72c.dll'),
os.path.join(distdir, 'Assembly - CSharp.dll'))
def build(bld):
bld.add_post_fun(post)
bld(
source=bld.path.ant_glob(os.path.join('src', '*.cs')),
target='e36192721fc364533a8edf2aefd3b72c.dll',
rule='"${MCS}" -recurse:\"' +
os.path.join(bld.path.abspath(), 'src', '*.cs') +
'\" -reference:\"' + str(os.path.join(bld.out_dir, 'UnityEngine', 'UnityEngine.dll')) +
'\" -reference:\"' + str(os.path.join(bld.out_dir, 'Assembly_-_CSharp_-_first_pass', '26998b3a9cbf54825a27e5f2d3cc4df1.dll')) +
'\" -out:${TGT} -target:library ${MONOOPTS}')
+22
View File
@@ -0,0 +1,22 @@
## Assembly - CSharp - first pass
import os
import shutil
def post(bld):
distdir = os.path.join(bld.top_dir, 'marsxplr_build', 'Mars Explorer_Data')
os.makedirs(distdir, exist_ok=True)
shutil.copy(
os.path.join(bld.out_dir, 'Assembly_-_CSharp_-_first_pass', '26998b3a9cbf54825a27e5f2d3cc4df1.dll'),
os.path.join(distdir, 'Assembly - CSharp - first pass.dll'))
def build(bld):
bld.add_post_fun(post)
bld(
source=bld.path.ant_glob(os.path.join('src', '*.cs')),
target='26998b3a9cbf54825a27e5f2d3cc4df1.dll',
rule='"${MCS}" -recurse:\"' +
os.path.join(bld.path.abspath(), 'src', '*.cs') + '\"' +
' -reference:\"' + str(os.path.join(bld.out_dir, 'UnityEngine', 'UnityEngine.dll')) + '\"'
' -out:${TGT} -target:library ${MONOOPTS}')
@@ -35,7 +35,7 @@ public class Buggy : MonoBehaviour
private Transform[] bouyancyPoints; private Transform[] bouyancyPoints;
private float suspensionRange; private float suspensionRange;
private float friction; private float friction;
private float[] realComp; // /*UNUSED*/ private float[] realComp;
private float[] hitDistance; private float[] hitDistance;
private float[] hitCompress; private float[] hitCompress;
private float[] hitFriction; private float[] hitFriction;
@@ -51,7 +51,7 @@ public class Buggy : MonoBehaviour
//Drivetrain Data //Drivetrain Data
private float motorTorque; private float motorTorque;
private float motorSpeed; private float motorSpeed;
private float motorSpd; // /*UNUSED*/ private float motorSpd;
private float motorInputSmoothed; private float motorInputSmoothed;
private float wheelRadius; private float wheelRadius;
private float wheelCircumference; private float wheelCircumference;
@@ -66,7 +66,7 @@ public class Buggy : MonoBehaviour
wingState = 0f; wingState = 0f;
//wingFlaps = 0; //wingFlaps = 0;
isInverted = false; isInverted = false;
realComp = new float[4]; //realComp = new float[4];
hitDistance = new float[4]; hitDistance = new float[4];
hitCompress = new float[4]; hitCompress = new float[4];
hitFriction = new float[4]; hitFriction = new float[4];
@@ -76,7 +76,7 @@ public class Buggy : MonoBehaviour
wheelMarkIndex = new int[4]; wheelMarkIndex = new int[4];
isDynamic = false; isDynamic = false;
motorSpeed = 0f; motorSpeed = 0f;
motorSpd = 0f; //motorSpd = 0f;
motorInputSmoothed = 0f; motorInputSmoothed = 0f;
wheelRadius = 0.3f; wheelRadius = 0.3f;
wheelCircumference = wheelRadius * (float)Math.PI * 2f; wheelCircumference = wheelRadius * (float)Math.PI * 2f;
@@ -188,7 +188,7 @@ public class Buggy : MonoBehaviour
leftTrail.localPosition = localPosition; leftTrail.localPosition = localPosition;
localPosition = rightTrail.localPosition; localPosition = rightTrail.localPosition;
float num4 = (localPosition.x = 0); localPosition.x = 0;
rightTrail.localPosition = localPosition; rightTrail.localPosition = localPosition;
wingState = 0f; wingState = 0f;
@@ -588,7 +588,7 @@ public class Buggy : MonoBehaviour
); );
//motorSpeed += -motorSpeed * motorDrag / motorTorque * Time.fixedDeltaTime; //motorSpeed += -motorSpeed * motorDrag / motorTorque * Time.fixedDeltaTime;
} }
motorSpd = (frictionTotal - Game.Settings.buggyPower * 3) / (Game.Settings.buggyPower * 3 / Game.Settings.buggySpeed); //motorSpd = (frictionTotal - Game.Settings.buggyPower * 3) / (Game.Settings.buggyPower * 3 / Game.Settings.buggySpeed);
wheelsAreTouchingGround = true; wheelsAreTouchingGround = true;
isDynamic = ( isDynamic = (
@@ -1,16 +1,8 @@
using System; using System;
using CompilerGenerated; using CompilerGenerated;
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class
| AttributeTargets.Method)]
public sealed class ExtensionAttribute : Attribute { }
}
public static class CompilerGeneratedExtensions public static class CompilerGeneratedExtensions
{ {
//[Extension]
public static IAsyncResult BeginInvoke( public static IAsyncResult BeginInvoke(
this adaptableMethod self, this adaptableMethod self,
AsyncCallback callback AsyncCallback callback
@@ -19,7 +11,6 @@ public static class CompilerGeneratedExtensions
return self.BeginInvoke(callback, null); return self.BeginInvoke(callback, null);
} }
//[Extension]
public static IAsyncResult BeginInvoke( public static IAsyncResult BeginInvoke(
this adaptableMethod self this adaptableMethod self
) )
@@ -111,7 +111,7 @@ public class Game : MonoBehaviour
public bool serverHidden = false; public bool serverHidden = false;
[NonSerialized] [NonSerialized]
public Hashtable authenticatedPlayers = new Hashtable(); public Hashtable authenticatedPlayers = new Hashtable();
private ArrayList authenticatingPlayers = new ArrayList(); //private ArrayList authenticatingPlayers = new ArrayList();
[NonSerialized] [NonSerialized]
public static Hashtable Players; public static Hashtable Players;
public List<unauthPlayer> unauthPlayers = new List<unauthPlayer>(); public List<unauthPlayer> unauthPlayers = new List<unauthPlayer>();
@@ -1256,7 +1256,6 @@ public class Game : MonoBehaviour
": "; ": ";
try try
{ {
float boo = Convert.ToSingle(thread.Value);
threadList += threadList +=
Mathf.RoundToInt( Mathf.RoundToInt(
Convert.ToSingle(thread.Value) * Convert.ToSingle(thread.Value) *
@@ -2056,7 +2055,7 @@ public class Game : MonoBehaviour
} }
[RPC] [RPC]
public void sSH(string sname, string sworld, string swelcome, string sblacklist, string spassword, float gVersion, bool shidden, NetworkMessageInfo info) public void sSH(string sname, string sworld, string swelcome, string sblacklist, string spassword, SemVer gVersion, bool shidden, NetworkMessageInfo info)
{ {
serverName = sname; serverName = sname;
Settings.serverWelcome = swelcome; Settings.serverWelcome = swelcome;
@@ -4,7 +4,8 @@ using UnityEngine;
[Serializable] [Serializable]
public class GameData : MonoBehaviour public class GameData : MonoBehaviour
{ {
public static float gameVersion = 4.0f; //public static float gameVersion = 4.0f;
public static SemVer gameVersion = new SemVer("4.0.1");
public static float serverVersion = 0.2f; public static float serverVersion = 0.2f;
public static string gameName = "marsxplr"; public static string gameName = "marsxplr";
public static string userName = ""; public static string userName = "";
+43
View File
@@ -0,0 +1,43 @@
using System;
using UnityEngine;
[Serializable]
public class Init : MonoBehaviour
{
public GUIText txt;
//----------------------
// temporary fix for texture/font rendering issues on super high res moniters
// resolution is capped to 1920x1080
public void Start()
{
int wnew = -1;
int hnew = -1;
foreach(Resolution r in Screen.resolutions)
{
if(
r.width > 1920 || r.width < wnew ||
r.height > 1080 || r.height < hnew)
{
continue;
}
wnew = r.width;
hnew = r.height;
}
Screen.SetResolution(wnew, hnew, Screen.fullScreen);
}
//----------------------
public void Update()
{
float i = Application.GetStreamProgressForLevel(Application.loadedLevel + 1);
if (i == 1f)
{
Application.LoadLevel(Application.loadedLevel + 1);
}
else
{
txt.text = Mathf.RoundToInt(i * 100f) + "%";
}
}
}
@@ -136,11 +136,8 @@ public class Lobby : MonoBehaviour
String[] val = tmp.ToArray(); String[] val = tmp.ToArray();
if ( if (
val[0] == "v" && val[0] == "sv" &&
float.Parse( SemVer.Parse(val[1]) > GameData.gameVersion)
val[1],
CultureInfo.InvariantCulture.NumberFormat
) > (float)GameData.gameVersion)
{ {
outdated = val[1]; outdated = val[1];
} }
@@ -907,7 +904,7 @@ public class Lobby : MonoBehaviour
HostData[] data = MasterServer.PollHostList(); HostData[] data = MasterServer.PollHostList();
String[] serverData; String[] serverData;
float gameVersion; SemVer gameVersion;
float serverVersion; float serverVersion;
//Precull Data //Precull Data
@@ -922,13 +919,13 @@ public class Lobby : MonoBehaviour
if (filterNATHosts && element.useNat) continue; if (filterNATHosts && element.useNat) continue;
serverData = element.comment.Split(";"[0]); serverData = element.comment.Split(";"[0]);
gameVersion = 0.0f; gameVersion = new SemVer(0);
serverVersion = 0.0f; serverVersion = 0.0f;
foreach (String dat in serverData) foreach (String dat in serverData)
{ {
if (dat == "") continue; if (dat == "") continue;
vals = dat.Split("="[0]); vals = dat.Split("="[0]);
if (vals[0] == "v") gameVersion = float.Parse(vals[1]); if (vals[0] == "v") gameVersion = SemVer.Parse(vals[1]);
if (vals[0] == "d") serverVersion = float.Parse(vals[1]); if (vals[0] == "d") serverVersion = float.Parse(vals[1]);
} }
@@ -961,11 +958,11 @@ public class Lobby : MonoBehaviour
masterServerConFailures = 0; masterServerConFailures = 0;
masterServerMessage = ""; masterServerMessage = "";
serverData = element.comment.Split(";"[0]); serverData = element.comment.Split(";"[0]);
gameVersion = 0.0f; gameVersion = new SemVer(0);
serverVersion = 0.0f; serverVersion = 0.0f;
String serverWorld = ""; String serverWorld = "";
String serverPlayers = ""; String serverPlayers = "";
String serverWorldURL = ""; // /*UNUSED*/ String serverWorldURL = "";
String bannedIPs = ""; String bannedIPs = "";
String serverLag = ""; String serverLag = "";
bool isLocked = false; bool isLocked = false;
@@ -973,11 +970,11 @@ public class Lobby : MonoBehaviour
{ {
if (dat == "") continue; if (dat == "") continue;
vals = dat.Split("="[0]); vals = dat.Split("="[0]);
if (vals[0] == "v") gameVersion = float.Parse(vals[1]); if (vals[0] == "v") gameVersion = SemVer.Parse(vals[1]);
if (vals[0] == "d") serverVersion = float.Parse(vals[1]); if (vals[0] == "d") serverVersion = float.Parse(vals[1]);
else if (vals[0] == "w") serverWorld = vals[1]; else if (vals[0] == "w") serverWorld = vals[1];
else if (vals[0] == "p") serverPlayers = vals[1]; else if (vals[0] == "p") serverPlayers = vals[1];
else if (vals[0] == "u") serverWorldURL = vals[1]; //else if (vals[0] == "u") serverWorldURL = vals[1];
else if (vals[0] == "b") bannedIPs = vals[1]; else if (vals[0] == "b") bannedIPs = vals[1];
else if (vals[0] == "s") serverLag = vals[1]; else if (vals[0] == "s") serverLag = vals[1];
else if (vals[0] == "l") isLocked = true; else if (vals[0] == "l") isLocked = true;
@@ -284,7 +284,7 @@ public class MeshSerializer : MonoBehaviour
float xx = ((float)(int)ix - 128f) / 127f; float xx = ((float)(int)ix - 128f) / 127f;
float yy = ((float)(int)iy - 128f) / 127f; float yy = ((float)(int)iy - 128f) / 127f;
float zz = ((float)(int)iz - 128f) / 127f; float zz = ((float)(int)iz - 128f) / 127f;
float ww = ((float)(int)iz - 128f) / 127f; float ww = ((float)(int)iw - 128f) / 127f;
arr[i] = new Vector4(xx, yy, zz, ww); arr[i] = new Vector4(xx, yy, zz, ww);
} }
} }
@@ -297,7 +297,7 @@ public class MeshSerializer : MonoBehaviour
byte ix = (byte)Mathf.Clamp(v.x * 127f + 128f, 0f, 255f); byte ix = (byte)Mathf.Clamp(v.x * 127f + 128f, 0f, 255f);
byte iy = (byte)Mathf.Clamp(v.y * 127f + 128f, 0f, 255f); byte iy = (byte)Mathf.Clamp(v.y * 127f + 128f, 0f, 255f);
byte iz = (byte)Mathf.Clamp(v.z * 127f + 128f, 0f, 255f); byte iz = (byte)Mathf.Clamp(v.z * 127f + 128f, 0f, 255f);
byte iw = (byte)Mathf.Clamp(v.z * 127f + 128f, 0f, 255f); byte iw = (byte)Mathf.Clamp(v.w * 127f + 128f, 0f, 255f);
buf.Write(ix); buf.Write(ix);
buf.Write(iy); buf.Write(iy);
buf.Write(iz); buf.Write(iz);
+115
View File
@@ -0,0 +1,115 @@
using System;
public class SemVer
{
public byte maj;
public byte min;
public byte patch;
public SemVer(byte mj, byte mn, byte pt)
{
maj = mj;
min = mn;
patch = pt;
}
public SemVer(byte mj, byte mn)
{
maj = mj;
min = mn;
patch = 0;
}
public SemVer(byte mj)
{
maj = mj;
min = 0;
patch = 0;
}
public SemVer(String str)
{
SemVer sv = SemVer.Parse(str);
maj = sv.maj;
min = sv.min;
patch = sv.patch;
}
public static bool operator ==(SemVer a, SemVer b)
{
return (
a.maj == b.maj &&
a.min == b.min &&
a.patch == b.patch);
}
public static bool operator !=(SemVer a, SemVer b)
{
return (
a.maj != b.maj ||
a.min != b.min ||
a.patch != b.patch);
}
public static bool operator >(SemVer a, SemVer b)
{
return a.maj > b.maj ? true :
a.min > b.min ? true :
a.patch > b.patch ? true :
false;
}
public static bool operator >=(SemVer a, SemVer b)
{
return a.maj >= b.maj ? true :
a.min >= b.min ? true :
a.patch >= b.patch ? true :
false;
}
public static bool operator <=(SemVer a, SemVer b)
{
return b > a;
}
public static bool operator <(SemVer a, SemVer b)
{
return b >= a;
}
public override string ToString()
{
if (patch == 0) return maj.ToString() + "." + min.ToString();
return maj.ToString() + "." + min.ToString() + "." + patch.ToString();
}
public static SemVer Parse(String str)
{
String[] sv = str.Split("."[0]);
if (sv.Length == 3) return new SemVer(
byte.Parse(sv[0]),
byte.Parse(sv[1]),
byte.Parse(sv[2]));
if (sv.Length == 2) return new SemVer(
byte.Parse(sv[0]),
byte.Parse(sv[1]));
if (sv.Length == 1) return new SemVer(
byte.Parse(sv[0]));
throw new FormatException();
}
public override int GetHashCode()
{
return maj.GetHashCode() ^ (min.GetHashCode() << 2) ^ (patch.GetHashCode() >> 2);
}
public override bool Equals(object other)
{
if (!(other is SeaData)) return false;
SemVer osv = (SemVer)other;
return (
osv.maj == maj &&
osv.min == min &&
osv.patch == patch);
}
}
@@ -165,7 +165,7 @@ public class Settings : MonoBehaviour
camDist = PlayerPrefs.GetFloat("camDist", 0.01f); camDist = PlayerPrefs.GetFloat("camDist", 0.01f);
flightCam = PlayerPrefs.GetInt("flightCam", 0) != 0; flightCam = PlayerPrefs.GetInt("flightCam", 0) != 0;
gyroCam = PlayerPrefs.GetInt("gyroCam", 0) != 0; gyroCam = PlayerPrefs.GetInt("gyroCam", 0) != 0;
quarryCam = PlayerPrefs.GetInt("quarryCam", 0) != 0; quarryCam = PlayerPrefs.GetInt("quarryCam", 0) != 0;
} }
public void showDialogGame() public void showDialogGame()
@@ -123,7 +123,7 @@ public class TerrainController : MonoBehaviour
if (trnAlt < seaLevel) if (trnAlt < seaLevel)
{ {
submerged = true; submerged = true;
float depth = seaLevel + trnAlt; // /*UNUSED*/ float depth = seaLevel + trnAlt;
} }
//Update AlphaMap Array //Update AlphaMap Array
@@ -841,7 +841,7 @@ public class WhirldIn : System.Object
String tSpmp = null; String tSpmp = null;
String tSpmp2 = null; String tSpmp2 = null;
String[] tTxts = null; String[] tTxts = null;
String tDtmp = null; // /*UNUSED*/ String tDtmp = null;
for (int i2 = 1; i2 < vS2.Length; i2++) for (int i2 = 1; i2 < vS2.Length; i2++)
{ {
@@ -852,7 +852,7 @@ public class WhirldIn : System.Object
else if (str[0] == "s") tSpmp = GetURL(str[1]); else if (str[0] == "s") tSpmp = GetURL(str[1]);
else if (str[0] == "s2") tSpmp2 = GetURL(str[1]); else if (str[0] == "s2") tSpmp2 = GetURL(str[1]);
else if (str[0] == "t") tTxts = str[1].Split(","[0]); else if (str[0] == "t") tTxts = str[1].Split(","[0]);
else if (str[0] == "d") tDtmp = GetURL(str[1]); //else if (str[0] == "d") tDtmp = GetURL(str[1]);
} }
String thread = tName; String thread = tName;
+23
View File
@@ -0,0 +1,23 @@
## Assembly - UnityScript
import os
import shutil
def post(bld):
distdir = os.path.join(bld.top_dir, 'marsxplr_build', 'Mars Explorer_Data')
os.makedirs(distdir, exist_ok=True)
shutil.copy(
os.path.join(bld.out_dir, 'Assembly_-_UnityScript', '58cc2f0ae478d40e7a89c7ba576c3586.dll'),
os.path.join(distdir, 'Assembly - UnityScript.dll'))
def build(bld):
bld.add_post_fun(post)
bld(
source=bld.path.ant_glob(os.path.join('src', '*.cs')),
target='58cc2f0ae478d40e7a89c7ba576c3586.dll',
rule='"${MCS}" -recurse:\"' +
os.path.join(bld.path.abspath(), 'src', '*.cs') +
'\" -reference:\"' + str(os.path.join(bld.out_dir, 'UnityEngine', 'UnityEngine.dll')) +
'\" -reference:\"' + str(os.path.join(bld.out_dir, 'Assembly_-_CSharp_-_first_pass', '26998b3a9cbf54825a27e5f2d3cc4df1.dll')) +
'\" -out:${TGT} -target:library ${MONOOPTS}')
-46
View File
@@ -1,46 +0,0 @@
Assembly - UnityScript/obj/
Assembly - UnityScript/bin/
Assembly - UnityScript/.vs/
Assembly - UnityScript/Assembly---UnityScript.suo
Assembly - CSharp - first pass/obj/
Assembly - CSharp - first pass/bin/
Assembly - CSharp - first pass/.vs/
Assembly - CSharp - first pass/Assembly---CSharp---first-pass.suo
Assembly - CSharp/obj/
Assembly - CSharp/bin/
Assembly - CSharp/.vs/
Assembly - CSharp/Assembly---CSharp.suo
Assembly - UnityScript - first pass/obj/
Assembly - UnityScript - first pass/bin/
Assembly - UnityScript - first pass/.vs/
Assembly - UnityScript - first pass/Assembly---UnityScript---first-pass.suo
Ionic.Zlib/obj/
Ionic.Zlib/bin/
Ionic.Zlib/.vs/
Ionic.Zlib/Ionic.Zlib.suo
TerrainControllerData/obj/
TerrainControllerData/bin/
TerrainControllerData/.vs/
TerrainControllerData/TerrainControllerData.suo
marsxplr_build/
UnityEngine/obj/
UnityEngine/bin/
UnityEngine/.vs/
UnityEngine/UnityEngine.suo
Boo.Lang/obj/
Boo.Lang/bin/
Boo.Lang/.vs/
Boo.Lang/Boo.Lang.suo
UnityScript.Lang/obj/
UnityScript.Lang/bin/
UnityScript.Lang/.vs/
UnityScript.Lang/UnityScript.Lang.suo
UnityDomainLoad/obj/
UnityDomainLoad/bin/
UnityDomainLoad/.vs/
UnityDomainLoad/UnityDomainLoad.suo
MarsXPLR.suo
MarsXPLR.ncb
PreBuild/Debug
PreBuild/Release
PreBuild/PreBuild.vcproj.*
@@ -1,69 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Assembly - CSharp - first pass</RootNamespace>
<AssemblyName>26998b3a9cbf54825a27e5f2d3cc4df1</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<ProjectGuid>{93A8D6B3-DD52-4C21-A101-AF360DAFC096}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="UnityEngine">
<HintPath>..\UnityEngine\bin\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ActivateTrigger.cs" />
<Compile Include="BlurEffect.cs" />
<Compile Include="ColorCorrectionEffect.cs" />
<Compile Include="CombineChildren.cs" />
<Compile Include="ContrastStretchEffect.cs" />
<Compile Include="EdgeDetectEffect.cs" />
<Compile Include="GlowEffect.cs" />
<Compile Include="GrayscaleEffect.cs" />
<Compile Include="ImageEffectBase.cs" />
<Compile Include="ImageEffects.cs" />
<Compile Include="MeshCombineUtility.cs" />
<Compile Include="MotionBlur.cs" />
<Compile Include="MouseLook.cs" />
<Compile Include="NoiseEffect.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SepiaToneEffect.cs" />
<Compile Include="SSAOEffect.cs" />
<Compile Include="TwirlEffect.cs" />
<Compile Include="VortexEffect.cs" />
<Compile Include="Water.cs" />
<Compile Include="WaterSimple.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)bin\26998b3a9cbf54825a27e5f2d3cc4df1.dll" "$(SolutionDir)marsxplr_build\Mars Explorer_Data\Assembly - CSharp - first pass.dll"</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Assembly - CSharp</RootNamespace>
<AssemblyName>e36192721fc364533a8edf2aefd3b72c</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<ProjectGuid>{23B280BD-8095-4FA3-B894-B77354BEF075}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="UnityEngine">
<HintPath>..\UnityEngine\bin\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="26998b3a9cbf54825a27e5f2d3cc4df1">
<HintPath>..\Assembly - CSharp - first pass\bin\26998b3a9cbf54825a27e5f2d3cc4df1.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="*.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>copy "$(ProjectDir)bin\e36192721fc364533a8edf2aefd3b72c.dll" "$(SolutionDir)marsxplr_build\Mars Explorer_Data\Assembly - CSharp.dll"</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -1,106 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Assembly - UnityScript</RootNamespace>
<AssemblyName>58cc2f0ae478d40e7a89c7ba576c3586</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<ProjectGuid>{084E81A6-3376-4976-B642-4C6443C97C36}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="UnityEngine">
<HintPath>..\UnityEngine\bin\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="26998b3a9cbf54825a27e5f2d3cc4df1">
<HintPath>..\Assembly - CSharp - first pass\bin\26998b3a9cbf54825a27e5f2d3cc4df1.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="BaseSimple.cs" />
<Compile Include="Buggy.cs" />
<Compile Include="CameraVehicle.cs" />
<Compile Include="ColliderAtach.cs" />
<Compile Include="CompilerGeneratedExtensions.cs" />
<Compile Include="CompilerGenerated\GUIAdaptor.cs" />
<Compile Include="CustomCursor.cs" />
<Compile Include="EntryPoint.cs" />
<Compile Include="FloorController.cs" />
<Compile Include="Game.cs" />
<Compile Include="GameData.cs" />
<Compile Include="GameWorldDesc.cs" />
<Compile Include="Hovercraft.cs" />
<Compile Include="HoverThrustClustOfDust.cs" />
<Compile Include="HoverThrustMoonOrBust.cs" />
<Compile Include="Init.cs" />
<Compile Include="Jet.cs" />
<Compile Include="JetThruster.cs" />
<Compile Include="JumpPoint.cs" />
<Compile Include="Lobby.cs" />
<Compile Include="LobbyDecor.cs" />
<Compile Include="LobbyStarfield.cs" />
<Compile Include="MeshSerializer.cs" />
<Compile Include="Messaging.cs" />
<Compile Include="MiniMap.cs" />
<Compile Include="MonoBehaviourScript.cs" />
<Compile Include="PrefabHere.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RamoSphere.cs" />
<Compile Include="Rocket.cs" />
<Compile Include="SeaData.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Skidmarks.cs" />
<Compile Include="SoundEffect.cs" />
<Compile Include="Tank.cs" />
<Compile Include="TankMe.cs" />
<Compile Include="TankTrack.cs" />
<Compile Include="TankTrackSimple.cs" />
<Compile Include="TerrainController.cs" />
<Compile Include="ThrustCone.cs" />
<Compile Include="Vehicle.cs" />
<Compile Include="VehicleBot.cs" />
<Compile Include="VehicleData.cs" />
<Compile Include="VehicleLocal.cs" />
<Compile Include="VehicleMe.cs" />
<Compile Include="VehicleNet.cs" />
<Compile Include="VehicleTrigger.cs" />
<Compile Include="WaterLightmapFog.cs" />
<Compile Include="WhirldData.cs" />
<Compile Include="WhirldIn.cs" />
<Compile Include="WhirldLibrary.cs" />
<Compile Include="WhirldLOD.cs" />
<Compile Include="WhirldObject.cs" />
<Compile Include="World.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)bin\58cc2f0ae478d40e7a89c7ba576c3586.dll" "$(SolutionDir)marsxplr_build\Mars Explorer_Data\Assembly - UnityScript.dll"</PostBuildEvent>
</PropertyGroup>
</Project>
-21
View File
@@ -1,21 +0,0 @@
using System;
using UnityEngine;
[Serializable]
public class Init : MonoBehaviour
{
public GUIText txt;
public void Update()
{
float i = Application.GetStreamProgressForLevel(Application.loadedLevel + 1);
if (i == 1f)
{
Application.LoadLevel(Application.loadedLevel + 1);
}
else
{
txt.text = Mathf.RoundToInt(i * 100f) + "%";
}
}
}
-110
View File
@@ -1,110 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly---UnityScript", "Assembly - UnityScript\Assembly---UnityScript.csproj", "{084E81A6-3376-4976-B642-4C6443C97C36}"
ProjectSection(ProjectDependencies) = postProject
{C67F4835-3976-49D0-AA05-3487C9FD57A2} = {C67F4835-3976-49D0-AA05-3487C9FD57A2}
{546DAF9B-0B6A-4800-922B-2F95A86DE45E} = {546DAF9B-0B6A-4800-922B-2F95A86DE45E}
{23B280BD-8095-4FA3-B894-B77354BEF075} = {23B280BD-8095-4FA3-B894-B77354BEF075}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly---CSharp---first-pass", "Assembly - CSHarp - first pass\Assembly---CSharp---first-pass.csproj", "{93A8D6B3-DD52-4C21-A101-AF360DAFC096}"
ProjectSection(ProjectDependencies) = postProject
{C67F4835-3976-49D0-AA05-3487C9FD57A2} = {C67F4835-3976-49D0-AA05-3487C9FD57A2}
{546DAF9B-0B6A-4800-922B-2F95A86DE45E} = {546DAF9B-0B6A-4800-922B-2F95A86DE45E}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly---CSharp", "Assembly - CSharp\Assembly---CSharp.csproj", "{23B280BD-8095-4FA3-B894-B77354BEF075}"
ProjectSection(ProjectDependencies) = postProject
{C67F4835-3976-49D0-AA05-3487C9FD57A2} = {C67F4835-3976-49D0-AA05-3487C9FD57A2}
{546DAF9B-0B6A-4800-922B-2F95A86DE45E} = {546DAF9B-0B6A-4800-922B-2F95A86DE45E}
{93A8D6B3-DD52-4C21-A101-AF360DAFC096} = {93A8D6B3-DD52-4C21-A101-AF360DAFC096}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine", "UnityEngine\UnityEngine.csproj", "{C67F4835-3976-49D0-AA05-3487C9FD57A2}"
ProjectSection(ProjectDependencies) = postProject
{546DAF9B-0B6A-4800-922B-2F95A86DE45E} = {546DAF9B-0B6A-4800-922B-2F95A86DE45E}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityDomainLoad", "UnityDomainLoad\UnityDomainLoad.csproj", "{9446C081-D322-4861-B4E4-DD57727ABD6D}"
ProjectSection(ProjectDependencies) = postProject
{546DAF9B-0B6A-4800-922B-2F95A86DE45E} = {546DAF9B-0B6A-4800-922B-2F95A86DE45E}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PreBuild", "PreBuild\PreBuild.vcproj", "{546DAF9B-0B6A-4800-922B-2F95A86DE45E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{084E81A6-3376-4976-B642-4C6443C97C36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Debug|Any CPU.Build.0 = Debug|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Debug|Win32.ActiveCfg = Debug|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Release|Any CPU.Build.0 = Release|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{084E81A6-3376-4976-B642-4C6443C97C36}.Release|Win32.ActiveCfg = Release|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Debug|Any CPU.Build.0 = Debug|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Debug|Win32.ActiveCfg = Debug|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Release|Any CPU.ActiveCfg = Release|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Release|Any CPU.Build.0 = Release|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{93A8D6B3-DD52-4C21-A101-AF360DAFC096}.Release|Win32.ActiveCfg = Release|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Debug|Win32.ActiveCfg = Debug|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Release|Any CPU.Build.0 = Release|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{23B280BD-8095-4FA3-B894-B77354BEF075}.Release|Win32.ActiveCfg = Release|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Debug|Win32.ActiveCfg = Debug|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Release|Any CPU.Build.0 = Release|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C67F4835-3976-49D0-AA05-3487C9FD57A2}.Release|Win32.ActiveCfg = Release|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Debug|Win32.ActiveCfg = Debug|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Release|Any CPU.Build.0 = Release|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9446C081-D322-4861-B4E4-DD57727ABD6D}.Release|Win32.ActiveCfg = Release|Any CPU
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Debug|Any CPU.ActiveCfg = Debug|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Debug|Win32.ActiveCfg = Debug|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Debug|Win32.Build.0 = Debug|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Release|Any CPU.ActiveCfg = Release|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Release|Mixed Platforms.Build.0 = Release|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Release|Win32.ActiveCfg = Release|Win32
{546DAF9B-0B6A-4800-922B-2F95A86DE45E}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
-65
View File
@@ -1,65 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="PreBuild"
ProjectGUID="{546DAF9B-0B6A-4800-922B-2F95A86DE45E}"
Keyword="MakeFileProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="if exist &quot;$(SolutionDir)\marsxplr_build\Mars Explorer_Data\lib&quot; rd /S /Q &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib&quot;&#x0D;&#x0A;if exist &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot; rd /S /Q &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot;&#x0D;&#x0A;md $(SolutionDir)marsxplr_build&#x0D;&#x0A;md &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot;&#x0D;&#x0A;md &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib&quot;"
ReBuildCommandLine=""
CleanCommandLine=""
Output=""
PreprocessorDefinitions="WIN32;_DEBUG"
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="if exist &quot;$(SolutionDir)\marsxplr_build\Mars Explorer_Data\lib&quot; rd /S /Q &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib&quot;&#x0D;&#x0A;if exist &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot; rd /S /Q &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot;&#x0D;&#x0A;md $(SolutionDir)marsxplr_build&#x0D;&#x0A;md &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data&quot;&#x0D;&#x0A;md &quot;$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib&quot;"
ReBuildCommandLine=""
CleanCommandLine=""
Output=""
PreprocessorDefinitions="WIN32;NDEBUG"
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
-47
View File
@@ -1,47 +0,0 @@
<details closed>
<summary><h2>Assembly - UnityScript</h2></summary>
<h3>About</h3>
<ul>
<li>(almost) all of the games compiled unityscripts</li>
<li>Used ILSpy to decompile dll from marsxplr 2.22 win32 into C#</li>
<li>Updated upd3 address (Lobby.cs)</li>
<li>Updated game version from 2.22 to 2.3 (GameData.cs)</li>
<li>changed max bots from 10 to 25</li>
</ul>
</details>
<hr>
<details closed>
<summary><h2>Assembly - CSharp</h2></summary>
<h3>About</h3>
<ul>
<li>(almost) all of the games compiled C# scripts</li>
<li>decompiled with ilspy</li>
</ul>
</details>
<hr>
<details closed>
<summary><h2>Assembly - CSharp - first pass</h2></summary>
<h3>About</h3>
<ul>
<li>some of the games compiled C# scripts</li>
<li>decompiled with ilspy</li>
</ul>
</details>
<hr>
<details closed>
<summary><h2>UnityEngine</h2></summary>
<h3>About</h3>
<ul>
<li>Unity Engine functionality</li>
<li>decomipled with ilspy</li>
</ul>
</details>
<hr>
<details closed>
<summary><h2>UnityDomainLoad</h2></summary>
<h3>About</h3>
<ul>
<li>UnityDomainLoad.exe</li>
<li>decompiled with ilspy</li>
</ul>
</details>
@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UnityDomainLoad</RootNamespace>
<AssemblyName>UnityDomainLoad</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<ProjectGuid>{9446C081-D322-4861-B4E4-DD57727ABD6D}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="UnityEngine\UnityDomainLoad.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)bin\UnityDomainLoad.exe" "$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib\UnityDomainLoad.exe"</PostBuildEvent>
</PropertyGroup>
</Project>
-45
View File
@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UnityEngine</RootNamespace>
<AssemblyName>UnityEngine</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<ProjectGuid>{C67F4835-3976-49D0-AA05-3487C9FD57A2}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<OutputPath>bin</OutputPath>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="UnityEngine\*.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(ProjectDir)bin\UnityEngine.dll" "$(SolutionDir)marsxplr_build\Mars Explorer_Data\lib\UnityEngine.dll"</PostBuildEvent>
</PropertyGroup>
</Project>
+161
View File
@@ -0,0 +1,161 @@
#include "FSUtil.h"
#include <string.h>
#include <stdio.h>
#include <sys/stat.h> /*stat()*/
#include <stdbool.h>
#include <stdlib.h> /*(m/c)alloc free*/
#include <assert.h> /*^^^^*/
#include <stdarg.h> /*MX_pathConcat*/
#ifdef _WIN32
#define PATH_SLASH '\\'
#define MAX_PATH 260
#else
#define PATH_SLASH '/'
#ifdef __APPLE__
#include <sys/syslimits.h>
#else
#include <linux/limits.h>
#endif
#ifndef PATH_MAX
#error "PATH_MAX NOT DEFINED"
#endif
#define MAX_PATH PATH_MAX
#endif
bool pathIsRoot(const char *p)
{
#ifdef _WIN32
return (strnlen(p, MAX_PATH) == 2 && p[1] == ':');
#else
return (strncmp(p, "/", MAX_PATH) == 0);
#endif
}
char *pathTrimmed(const char *p)
{
if(p == NULL)
{
char *emptyp = calloc(1, sizeof(char));
assert(calloc);
return emptyp;
}
size_t plen = strnlen(p, MAX_PATH);
size_t truncate = pathIsRoot(p) ?
0 :
p[plen - 1] == PATH_SLASH ?
1 :
0;
char *newp = calloc(plen + 1, sizeof(char));
assert(newp);
memcpy(newp, p, plen - truncate);
return newp;
}
bool MX_pathExists(const char *p)
{
struct stat sb;
return (stat(p, &sb) == 0);
}
char *MX_pathParent(const char *p)
{
char *tp = pathTrimmed(p);
if(pathIsRoot(tp)) return tp;
int i = ((int)strlen(tp)) - 1;
for(; i >= 0; i--)
if(tp[i] == PATH_SLASH) break;
char *newp;
if(i < 0)
{
newp = calloc(2, sizeof(char));
assert(newp);
newp[0] = '.';
}
else
{
newp = calloc(i + 1, sizeof(char));
assert(newp);
memcpy(newp, tp, i);
}
free(tp);
return newp;
}
#ifndef strndup
char *strndup(const char *s, size_t n) {
size_t len = strnlen(s, n);
char *p = malloc(len + 1);
assert(p);
memcpy(p, s, len);
p[len] = '\0';
return p;
}
#endif
char *MX_pathConcat2(const char *a, const char *b)
{
if(a == NULL && b == NULL)
{
char *emptyp = calloc(1, sizeof(char));
assert(emptyp);
return emptyp;
}
if(a == NULL)
{
char *bdup = strndup(b, MAX_PATH);
assert(strncmp(b, bdup, MAX_PATH + 1) == 0);
return bdup;
}
if(b == NULL)
{
char *adup = strndup(a, MAX_PATH);
assert(strncmp(a, adup, MAX_PATH + 1) == 0);
return adup;
}
char *ta = pathTrimmed(a);
char *tb = pathTrimmed(b);
size_t newlen = strlen(ta) + 1 + strlen(tb) + 1;
char *newp = malloc(newlen * sizeof(char));
assert(newp);
size_t i = 0;
for(size_t ia = 0; ta[ia]; ia++) newp[i++] = ta[ia];
newp[i++] = PATH_SLASH;
for(size_t ib = 0; tb[ib]; ib++) newp[i++] = tb[ib];
newp[i] = '\0';
free(ta);
free(tb);
return newp;
}
char *MX_pathConcatV(int none, ...)
{
char *newp = NULL;
char *tp;
va_list args;
char *val;
va_start(args, none);
while((val = va_arg(args, char *))){
tp = newp;
newp = MX_pathConcat2(tp, val);
if(tp) free(tp);
}
va_end(args);
return newp;
}
+32
View File
@@ -0,0 +1,32 @@
/*
== file path manipulation helpers ==
NOTE: all functions that operate on path strings assume
that the path string is a valid path.
they are not to be fed string created by the user.
all functions that return strings are guaranteed to be
newly allocated strings that must be freed later.
WARNING: if an inputted string is longer than the os's set max path length,
a function will not fail, but will truncate the string before
operating on it
*/
#ifndef MX_FS_UTIL_H
#define MX_FS_UTIL_H
#include <stdbool.h>
#include <stdarg.h>
#include <string.h>
//connects two strings into a path accounting for '/' vs '\'
char *MX_pathConcat2(const char *a, const char *b);
//concats arbitrary number of path strings
#define MX_pathConcat(...) MX_pathConcatV(0, __VA_ARGS__, NULL);
char *MX_pathConcatV(int none, ...); //dont call this directly, initial arg needed to work with MSVC
//gets rid of tailing slash
char *MX_pathParent(const char *p);
//checks if path can be stat-ed by os
bool MX_pathExists(const char *p);
#endif
+194
View File
@@ -0,0 +1,194 @@
#include <mono/jit/jit.h>
#include <mono/metadata/environment.h>
#include <mono/metadata/mono-config.h>
#include <mono/metadata/assembly.h>
#include <mono/metadata/debug-helpers.h>
#include <stdio.h>
#include <stdbool.h>
#include "FSUtil.h"
#include "monoRuntimeLinker.h"
#include "outputLog.h"
#ifdef _WIN32
#pragma comment(lib, "user32.lib")
#include <Windows.h>
#endif
void errorMessage(const char *msg)
{
#ifdef _WIN32
MessageBoxA(
NULL,
msg,
"Mars Explorer Error",
MB_ICONERROR | MB_TASKMODAL);
#else
fprintf(stderr, "%s\n", msg);
#endif
}
struct OutputLog *OL;
void RegisterDomainAndLoadAssemblies()
{
MX_LOG_WARN(OL, "this doesn't do anything yet");
}
struct MonoRuntime *initMono(const char *execPath)
{
#ifdef _WIN32
const char *monoRtlName = "mono-runtime.dll";
#elif defined __APPLE__
const char *monoRtlName = "mono-runtime.dylib";
#else
const char *monoRtlName = "mono-runtime.so";
#endif
char *monoRtlPath = MX_pathConcat(
execPath,
"Mars Explorer_Data",
"unity",
monoRtlName);
if(!MX_pathExists(monoRtlPath))
{
errorMessage("failed to locate mono runtime shared library");
free(monoRtlPath);
return NULL;
}
struct MonoRuntime *mono = MX_monoRuntimeCreate(monoRtlPath);
free(monoRtlPath);
if(mono == NULL)
{
errorMessage("failed to link to mono runtime");
return NULL;
}
char *libPath = MX_pathConcat(
execPath,
"Mars Explorer_Data",
"lib");
if(!MX_pathExists(libPath))
{
errorMessage("could not find lib path in Data directory");
free(libPath);
MX_monoRuntimeDestroy(mono);
return NULL;
}
char *etcPath = MX_pathConcat(
execPath,
"Mars Explorer_Data",
"etc");
if(!MX_pathExists(etcPath))
{
errorMessage("could not find etc path in Data directory");
free(etcPath);
MX_monoRuntimeDestroy(mono);
free(libPath);
return NULL;
}
mono->set_dirs(libPath, etcPath);
free(etcPath);
mono->set_assemblies_path(libPath);
free(libPath);
mono->config_parse(NULL);
return mono;
}
int main(int argc, char **argv)
{
if(argc < 1)
{
errorMessage("unable to determine executable path\n");
return -1;
}
char *execPath = MX_pathParent(argv[0]);
if(!MX_pathExists(execPath))
{
errorMessage("executable path determined from argv[0] does not exist as a valid path");
free(execPath);
return -1;
}
struct MonoRuntime *mono = initMono(execPath);
if(mono == NULL)
{
free(execPath);
return -1;
}
char *outputLogPath = MX_pathConcat(execPath, "Mars Explorer_Data", "output_log.txt");
OL = MX_outputLogCreate(outputLogPath, MX_OUTPUT_LOG_INFO);
if(OL == NULL)
{
errorMessage("failed to setup output_log.txt for writing");
free(execPath);
return -1;
}
free(outputLogPath);
char *uniDomLoaPath = MX_pathConcat(execPath, "Mars Explorer_Data", "lib", "UnityDomainLoad.exe");
MonoDomain* domain = mono->jit_init_version(uniDomLoaPath, "v4.0");
if(domain == NULL)
{
MX_LOG_ERROR(OL, "failed to init mono jit on UnityDomainLoad.exe");
free(uniDomLoaPath);
free(execPath);
MX_monoRuntimeDestroy(mono);
return -1;
}
mono->add_internal_call(
"UnityEngine.UnityDomainLoad::RegisterDomainAndLoadAssemblies",
(const void *)RegisterDomainAndLoadAssemblies);
MonoAssembly *assembly = mono->domain_assembly_open(domain, uniDomLoaPath);
free(uniDomLoaPath);
if(assembly == NULL)
{
MX_LOG_ERROR(OL, "failed to open UnityDomainLoad.exe assembly");
free(execPath);
mono->jit_cleanup(domain);
MX_monoRuntimeDestroy(mono);
return -1;
}
mono->jit_exec(domain, assembly, argc, argv);
free(execPath);
mono->jit_cleanup(domain);
bool safeCleanup = true;
if(!MX_outputLogDestroy(OL))
{
errorMessage("failed to cleanly close output_log.txt");
safeCleanup = false;
}
if(!MX_monoRuntimeDestroy(mono))
{
errorMessage("failed to cleanly close mono runtime");
safeCleanup = false;
}
return safeCleanup ? 0 : -1;
}

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