Compare commits
23 Commits
v4.0.2
..
ef7b99d4cf
| Author | SHA1 | Date | |
|---|---|---|---|
| ef7b99d4cf | |||
| 68f88bd24c | |||
| 83ba7539d6 | |||
| 8f450c658f | |||
| 8f08aded00 | |||
| 7272c66c51 | |||
| 86308f5687 | |||
| 2acc894ac2 | |||
| 5319333fb0 | |||
| 38d9f58477 | |||
| 5f6738dcd6 | |||
| 705afcf7d8 | |||
| 4a56f34951 | |||
| 2bd00c9999 | |||
| c02fd0a8ab | |||
| e14c122fd7 | |||
| aa54f06cc2 | |||
| 31eed0bb02 | |||
| 110a1ff190 | |||
| b66935daf5 | |||
| da1ef6bb06 | |||
| 90f7de6454 | |||
| aa573daa1e |
@@ -1,4 +1,6 @@
|
|||||||
marsxplr_build/
|
marsxplr_build/
|
||||||
|
ripper_build/
|
||||||
|
editor_build/
|
||||||
waf*/
|
waf*/
|
||||||
.lock-waf*
|
.lock-waf*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
@@ -272,9 +272,8 @@ public class SeaShader : MonoBehaviour
|
|||||||
// old cards to make water texture scroll.
|
// old cards to make water texture scroll.
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
Camera cam = Camera.main;
|
Camera cam = Camera.main;
|
||||||
if (!cam)
|
if (!cam || !WaterTransform)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//Flip upsidedown if cam is below us
|
//Flip upsidedown if cam is below us
|
||||||
|
|||||||
@@ -12,12 +12,13 @@ public class FloorController : MonoBehaviour
|
|||||||
if (
|
if (
|
||||||
!whirldObject ||
|
!whirldObject ||
|
||||||
whirldObject.parameters["Texture"] == null ||
|
whirldObject.parameters["Texture"] == null ||
|
||||||
|
whirldObject.parameters["Texture"] as Texture == null ||
|
||||||
!floorObject
|
!floorObject
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
floorObject.renderer.material.mainTexture = (Texture)whirldObject.parameters["Texture"];
|
floorObject.renderer.material.mainTexture = (Texture)(whirldObject.parameters["Texture"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ using UnityEngine;
|
|||||||
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 SemVer gameVersion = new SemVer("4.0.3");
|
||||||
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 = "";
|
||||||
|
|||||||
@@ -1141,7 +1141,6 @@ public class WhirldIn : System.Object
|
|||||||
public IEnumerator LoadSkybox(string v)
|
public IEnumerator LoadSkybox(string v)
|
||||||
{
|
{
|
||||||
String[] vS = v.Split(","[0]);
|
String[] vS = v.Split(","[0]);
|
||||||
|
|
||||||
//Multiple Image Skybox
|
//Multiple Image Skybox
|
||||||
if (vS.Length > 5)
|
if (vS.Length > 5)
|
||||||
{
|
{
|
||||||
@@ -1187,7 +1186,11 @@ public class WhirldIn : System.Object
|
|||||||
{
|
{
|
||||||
//Wait for everything else to load
|
//Wait for everything else to load
|
||||||
while (threads.Count > 0) yield return null;
|
while (threads.Count > 0) yield return null;
|
||||||
RenderSettings.skybox = (Material)GetAsset(v); //, Material
|
|
||||||
|
UnityEngine.Object sbasset = GetAsset(v);
|
||||||
|
RenderSettings.skybox = (sbasset as Material) == null ?
|
||||||
|
null :
|
||||||
|
(Material)sbasset;
|
||||||
if (!RenderSettings.skybox)
|
if (!RenderSettings.skybox)
|
||||||
{
|
{
|
||||||
info +=
|
info +=
|
||||||
@@ -1231,7 +1234,7 @@ public class WhirldIn : System.Object
|
|||||||
char s = data[readChr];
|
char s = data[readChr];
|
||||||
|
|
||||||
//Ignore spaces
|
//Ignore spaces
|
||||||
if (s == ' ' || s == '\n' || s == '\t') { ; }
|
if (s == ' ' || s == '\n' || s == '\r' || s == '\t') { ; }
|
||||||
|
|
||||||
//Name fully read, begin collecting param value(s)
|
//Name fully read, begin collecting param value(s)
|
||||||
else if (s == ':')
|
else if (s == ':')
|
||||||
@@ -1446,6 +1449,7 @@ public class WhirldIn : System.Object
|
|||||||
(
|
(
|
||||||
data[readChr] == ' ' ||
|
data[readChr] == ' ' ||
|
||||||
data[readChr] == '\n' ||
|
data[readChr] == '\n' ||
|
||||||
|
data[readChr] == '\r' ||
|
||||||
data[readChr] == '\t'))
|
data[readChr] == '\t'))
|
||||||
{
|
{
|
||||||
readChr++;
|
readChr++;
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ struct MonoRuntime *initMono(const char *execPath)
|
|||||||
if(!MX_pathExists(monoRtlPath))
|
if(!MX_pathExists(monoRtlPath))
|
||||||
{
|
{
|
||||||
errorMessage("failed to locate mono runtime shared library");
|
errorMessage("failed to locate mono runtime shared library");
|
||||||
|
printf("libpath: %s\n", monoRtlPath);
|
||||||
free(monoRtlPath);
|
free(monoRtlPath);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -148,7 +149,7 @@ int main(int argc, char **argv)
|
|||||||
free(outputLogPath);
|
free(outputLogPath);
|
||||||
|
|
||||||
char *uniDomLoaPath = MX_pathConcat(execPath, "Mars Explorer_Data", "lib", "UnityDomainLoad.exe");
|
char *uniDomLoaPath = MX_pathConcat(execPath, "Mars Explorer_Data", "lib", "UnityDomainLoad.exe");
|
||||||
MonoDomain* domain = mono->jit_init_version(uniDomLoaPath, "v4.0");
|
MonoDomain *domain = (MonoDomain *)mono->jit_init_version(uniDomLoaPath, "v4.0");
|
||||||
if(domain == NULL)
|
if(domain == NULL)
|
||||||
{
|
{
|
||||||
MX_LOG_ERROR(OL, "failed to init mono jit on UnityDomainLoad.exe");
|
MX_LOG_ERROR(OL, "failed to init mono jit on UnityDomainLoad.exe");
|
||||||
@@ -163,7 +164,7 @@ int main(int argc, char **argv)
|
|||||||
"UnityEngine.UnityDomainLoad::RegisterDomainAndLoadAssemblies",
|
"UnityEngine.UnityDomainLoad::RegisterDomainAndLoadAssemblies",
|
||||||
(const void *)RegisterDomainAndLoadAssemblies);
|
(const void *)RegisterDomainAndLoadAssemblies);
|
||||||
|
|
||||||
MonoAssembly *assembly = mono->domain_assembly_open(domain, uniDomLoaPath);
|
MonoAssembly *assembly = (MonoAssembly *)mono->domain_assembly_open(domain, uniDomLoaPath);
|
||||||
free(uniDomLoaPath);
|
free(uniDomLoaPath);
|
||||||
if(assembly == NULL)
|
if(assembly == NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,35 +9,52 @@
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <Windows.h>
|
||||||
|
typedef HMODULE MX_MODULE;
|
||||||
|
typedef FARPROC MX_PTR;
|
||||||
|
#else
|
||||||
|
typedef void * MX_MODULE;
|
||||||
|
typedef void * MX_PTR;
|
||||||
|
#endif
|
||||||
|
|
||||||
/// leading "mono_" stripped from names so calling mono functions is like this for example:
|
/// leading "mono_" stripped from names so calling mono functions is like this for example:
|
||||||
/// mono->config_parse(NULL);
|
/// mono->config_parse(NULL);
|
||||||
struct MonoRuntime
|
struct MonoRuntime
|
||||||
{
|
{
|
||||||
void *handle;
|
MX_MODULE handle;
|
||||||
|
|
||||||
// void mono_set_assemblies_path(const char *assembly_dir)
|
// void mono_set_assemblies_path(const char *assembly_dir)
|
||||||
void (*set_assemblies_path)(const char *);
|
//void (*set_assemblies_path)(const char *);
|
||||||
|
MX_PTR set_assemblies_path;
|
||||||
|
|
||||||
/// void mono_set_dirs(const char *assembly_dir, const char *config_dir)
|
/// void mono_set_dirs(const char *assembly_dir, const char *config_dir)
|
||||||
void (*set_dirs)(const char *, const char *);
|
//void (*set_dirs)(const char *, const char *);
|
||||||
|
MX_PTR set_dirs;
|
||||||
|
|
||||||
/// void mono_config_parse (const char *filename)
|
/// void mono_config_parse (const char *filename)
|
||||||
void (*config_parse)(const char *);
|
//void (*config_parse)(const char *);
|
||||||
|
MX_PTR config_parse;
|
||||||
|
|
||||||
/// MonoDomain *mono_jit_init_version(const char *root_domain_name, const char *runtime_version)
|
/// MonoDomain *mono_jit_init_version(const char *root_domain_name, const char *runtime_version)
|
||||||
MonoDomain *(*jit_init_version)(const char *, const char *);
|
//MonoDomain *(*jit_init_version)(const char *, const char *);
|
||||||
|
MX_PTR jit_init_version;
|
||||||
|
|
||||||
/// void mono_add_internal_call(const char *name, const void* method);
|
/// void mono_add_internal_call(const char *name, const void* method);
|
||||||
void (*add_internal_call)(const char *, const void *);
|
//void (*add_internal_call)(const char *, const void *);
|
||||||
|
MX_PTR add_internal_call;
|
||||||
|
|
||||||
/// MonoAssembly *mono_domain_assembly_open(MonoDomain *domain, const char *name)
|
/// MonoAssembly *mono_domain_assembly_open(MonoDomain *domain, const char *name)
|
||||||
MonoAssembly *(*domain_assembly_open)(MonoDomain *, const char *);
|
//MonoAssembly *(*domain_assembly_open)(MonoDomain *, const char *);
|
||||||
|
MX_PTR domain_assembly_open;
|
||||||
|
|
||||||
/// void mono_jit_cleanup(MonoDomain *domain)
|
/// void mono_jit_cleanup(MonoDomain *domain)
|
||||||
void (*jit_cleanup)(MonoDomain *);
|
//void (*jit_cleanup)(MonoDomain *);
|
||||||
|
MX_PTR jit_cleanup;
|
||||||
|
|
||||||
/// void mono_jit_exec(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[])
|
/// void mono_jit_exec(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[])
|
||||||
void (*jit_exec)(MonoDomain *, MonoAssembly *, int, char *[]);
|
//void (*jit_exec)(MonoDomain *, MonoAssembly *, int, char *[]);
|
||||||
|
MX_PTR jit_exec;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MonoRuntime *MX_monoRuntimeCreate(char *monoLibPath);
|
struct MonoRuntime *MX_monoRuntimeCreate(char *monoLibPath);
|
||||||
|
|||||||
+2
-2
@@ -9,14 +9,14 @@ def options(opt):
|
|||||||
opt.add_option('--release_profile',
|
opt.add_option('--release_profile',
|
||||||
action='store',
|
action='store',
|
||||||
default='no',
|
default='no',
|
||||||
help='specify this as \"yes\" or \"no\" to make a release build instead of a debug build which is the default')
|
help='specify this as \"yes\" to make a release build instead of a debug build which is the default')
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
conf.load('compiler_c')
|
conf.load('compiler_c')
|
||||||
conf.env.MONOINC = os.path.join(conf.env.MONO_HOME, 'include', 'mono-2.0')
|
conf.env.MONOINC = os.path.join(conf.env.MONO_HOME, 'include', 'mono-2.0')
|
||||||
conf.env.RELEASE_PROFILE = conf.options.release_profile
|
conf.env.RELEASE_PROFILE = conf.options.release_profile
|
||||||
if conf.env.RELEASE_PROFILE == 'yes':
|
if conf.env.RELEASE_PROFILE == 'yes':
|
||||||
print('you are configured to build a release profile')
|
print('TAKE NOTE: you are configured to build a release profile')
|
||||||
|
|
||||||
def post(bld):
|
def post(bld):
|
||||||
ext = '.exe' if os.name == 'nt' else ''
|
ext = '.exe' if os.name == 'nt' else ''
|
||||||
|
|||||||
@@ -7,5 +7,5 @@ Pretty much all of the game in terms of functionality has compilable source now,
|
|||||||
Building the project requires the mono mcs compiler and libraries, a c compiler, and python.<br>
|
Building the project requires the mono mcs compiler and libraries, a c compiler, and python.<br>
|
||||||
1. configure the project: <pre>python waf configure [--mono_home=...]</pre>
|
1. configure the project: <pre>python waf configure [--mono_home=...]</pre>
|
||||||
2. build the project: <pre>python waf build</pre>
|
2. build the project: <pre>python waf build</pre>
|
||||||
If the build is successful, you should be able to find a bunch of dlls in the directory Game\marsxplr_build\Mars Explorer_Data.<br>
|
If the build is successful, you should be able to find a bunch of dlls in the directory marsxplr_build\Mars Explorer_Data.<br>
|
||||||
To test the build, can copy the contents of the built Mars Explorer_Data dir into the Mars Explorer_Data dir of your own personal Mars Explorer install in place of the original files.<br>
|
To test the build, can copy the contents of the built Mars Explorer_Data dir into the Mars Explorer_Data dir of your own personal Mars Explorer install in place of the original files.<br>
|
||||||
|
|||||||
+9
-3
@@ -4,11 +4,17 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
def post(bld):
|
def post(bld):
|
||||||
distdir = os.path.join(bld.top_dir, 'marsxplr_build', 'Mars Explorer_Data', 'lib')
|
distdir_m = os.path.join(bld.top_dir, 'marsxplr_build', 'Mars Explorer_Data', 'lib')
|
||||||
os.makedirs(distdir, exist_ok=True)
|
os.makedirs(distdir_m, exist_ok=True)
|
||||||
shutil.copy(
|
shutil.copy(
|
||||||
os.path.join(bld.out_dir, 'UnityEngine', 'UnityEngine.dll'),
|
os.path.join(bld.out_dir, 'UnityEngine', 'UnityEngine.dll'),
|
||||||
os.path.join(distdir, 'UnityEngine.dll'))
|
os.path.join(distdir_m, 'UnityEngine.dll'))
|
||||||
|
distdir_r = os.path.join(bld.top_dir, 'ripper_build', 'Mars Explorer_Data', 'lib')
|
||||||
|
os.makedirs(distdir_r, exist_ok=True)
|
||||||
|
shutil.copy(
|
||||||
|
os.path.join(bld.out_dir, 'UnityEngine', 'UnityEngine.dll'),
|
||||||
|
os.path.join(distdir_r, 'UnityEngine.dll'))
|
||||||
|
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
bld.add_post_fun(post)
|
bld.add_post_fun(post)
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class Game : MonoBehaviour
|
||||||
|
{
|
||||||
|
Camera cam;
|
||||||
|
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
cam = Camera.main;
|
||||||
|
cam.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FixedUpdate()
|
||||||
|
{
|
||||||
|
Vector3 lea = cam.transform.localEulerAngles;
|
||||||
|
lea.y = (lea.y + 0.1f) % 360f;
|
||||||
|
cam.transform.localEulerAngles = lea;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class Init : MonoBehaviour
|
||||||
|
{
|
||||||
|
public void Awake()
|
||||||
|
{
|
||||||
|
Application.LoadLevel(Application.loadedLevel + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class Lobby : MonoBehaviour
|
||||||
|
{
|
||||||
|
public void Awake()
|
||||||
|
{
|
||||||
|
Application.LoadLevel(Application.loadedLevel + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class LobbyStarfield : MonoBehaviour
|
||||||
|
{
|
||||||
|
public void Update()
|
||||||
|
{
|
||||||
|
if (Application.loadedLevel > 1)
|
||||||
|
{
|
||||||
|
particleEmitter.emit = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
## editor
|
||||||
|
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
def post(bld):
|
||||||
|
distdir = os.path.join(bld.top_dir, 'editor_build', 'Mars Explorer_Data')
|
||||||
|
os.makedirs(distdir, exist_ok=True)
|
||||||
|
shutil.copy(
|
||||||
|
os.path.join(bld.out_dir, 'editor', '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}')
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class Game : MonoBehaviour
|
||||||
|
{
|
||||||
|
public void Awake()
|
||||||
|
{
|
||||||
|
LevelInfo.LogToFile();
|
||||||
|
|
||||||
|
Application.Quit();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class Init : MonoBehaviour
|
||||||
|
{
|
||||||
|
public void Awake()
|
||||||
|
{
|
||||||
|
LevelInfo.LogToFile();
|
||||||
|
|
||||||
|
Application.LoadLevel(Application.loadedLevel + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
//TODO: dont display the header of an object type if no objects of that type are found in the scene.
|
||||||
|
|
||||||
|
public class LevelInfo
|
||||||
|
{
|
||||||
|
private static void Discriminate<T>(ref List<T> objs, T heir) where T : UnityEngine.Object
|
||||||
|
{
|
||||||
|
for(int i = objs.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
if(objs[i].GetInstanceID() == heir.GetInstanceID())
|
||||||
|
{
|
||||||
|
objs.RemoveAt(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private struct ObjsWithType {
|
||||||
|
public List<UnityEngine.Object> objs;
|
||||||
|
public string type;
|
||||||
|
|
||||||
|
public ObjsWithType(List<UnityEngine.Object> o, string t)
|
||||||
|
{
|
||||||
|
objs = o;
|
||||||
|
type = t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void LogToFile()
|
||||||
|
{
|
||||||
|
string ripLogPath = Path.Combine(
|
||||||
|
Directory.GetParent(Application.dataPath).ToString(),
|
||||||
|
Application.loadedLevelName + "_level" + Application.loadedLevel + "_info.txt");
|
||||||
|
|
||||||
|
List<int> taken = new List<int>();
|
||||||
|
List<ObjsWithType> owts = new List<ObjsWithType>();
|
||||||
|
Type[] types = {
|
||||||
|
// : MonoBehaviour
|
||||||
|
typeof(Terrain),
|
||||||
|
|
||||||
|
// : Renderer
|
||||||
|
typeof(LineRenderer),
|
||||||
|
typeof(MeshRenderer),
|
||||||
|
typeof(ParticleRenderer),
|
||||||
|
typeof(SkinnedMeshRenderer),
|
||||||
|
typeof(TrailRenderer),
|
||||||
|
|
||||||
|
// : GUIElement
|
||||||
|
typeof(GUIText),
|
||||||
|
typeof(GUITexture),
|
||||||
|
|
||||||
|
// : ScriptableObject
|
||||||
|
typeof(GUISkin),
|
||||||
|
typeof(ScriptableShaderPass),
|
||||||
|
|
||||||
|
// : Texture
|
||||||
|
typeof(Cubemap),
|
||||||
|
typeof(MovieTexture),
|
||||||
|
typeof(RenderTexture),
|
||||||
|
typeof(Texture2D),
|
||||||
|
|
||||||
|
// : Joint
|
||||||
|
typeof(CharacterJoint),
|
||||||
|
typeof(ConfigurableJoint),
|
||||||
|
typeof(FixedJoint),
|
||||||
|
typeof(HingeJoint),
|
||||||
|
typeof(SpringJoint),
|
||||||
|
|
||||||
|
// : Collider
|
||||||
|
typeof(BoxCollider),
|
||||||
|
typeof(CapsuleCollider),
|
||||||
|
typeof(CharacterController),
|
||||||
|
typeof(MeshCollider),
|
||||||
|
typeof(RaycastCollider),
|
||||||
|
typeof(SphereCollider),
|
||||||
|
typeof(TerrainCollider),
|
||||||
|
typeof(WheelCollider),
|
||||||
|
|
||||||
|
// : Behaviour
|
||||||
|
typeof(Animation),
|
||||||
|
typeof(AudioListener),
|
||||||
|
typeof(AudioSource),
|
||||||
|
typeof(Camera),
|
||||||
|
typeof(ConstantForce),
|
||||||
|
typeof(GUIElement),
|
||||||
|
typeof(GUILayer),
|
||||||
|
typeof(LensFlare),
|
||||||
|
typeof(Light),
|
||||||
|
typeof(MonoBehaviour),
|
||||||
|
typeof(NetworkView),
|
||||||
|
typeof(Projector),
|
||||||
|
typeof(Skybox),
|
||||||
|
|
||||||
|
// : Component
|
||||||
|
typeof(Behaviour),
|
||||||
|
typeof(Collider),
|
||||||
|
typeof(Joint),
|
||||||
|
typeof(Renderer),
|
||||||
|
typeof(MeshFilter),
|
||||||
|
typeof(ParticleAnimator),
|
||||||
|
typeof(ParticleEmitter),
|
||||||
|
typeof(Rigidbody),
|
||||||
|
typeof(TextMesh),
|
||||||
|
typeof(Transform),
|
||||||
|
|
||||||
|
// : UnityEngine.Object
|
||||||
|
typeof(GameObject),
|
||||||
|
typeof(Component),
|
||||||
|
typeof(AnimationClip),
|
||||||
|
typeof(AssetBundle),
|
||||||
|
typeof(AudioClip),
|
||||||
|
typeof(Texture),
|
||||||
|
typeof(Flare),
|
||||||
|
typeof(Font),
|
||||||
|
typeof(ScriptableObject),
|
||||||
|
typeof(Material),
|
||||||
|
typeof(Mesh),
|
||||||
|
typeof(PhysicMaterial),
|
||||||
|
typeof(Shader),
|
||||||
|
typeof(TerrainData),
|
||||||
|
typeof(TextAsset),
|
||||||
|
|
||||||
|
typeof(UnityEngine.Object),
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach(Type t in types)
|
||||||
|
{
|
||||||
|
owts.Add(new ObjsWithType(
|
||||||
|
new List<UnityEngine.Object>(UnityEngine.Object.FindObjectsOfTypeAll(t)),
|
||||||
|
t.ToString()
|
||||||
|
));
|
||||||
|
if(owts[owts.Count - 1].objs.Count < 1) owts.RemoveAt(owts.Count - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
using(StreamWriter ripLog = new StreamWriter(ripLogPath, false))
|
||||||
|
{
|
||||||
|
string objformat = "{0,-8} | {1,-32} | {2}";
|
||||||
|
ripLog.WriteLine(objformat,
|
||||||
|
"id", "name", "hideFlags");
|
||||||
|
ripLog.WriteLine();
|
||||||
|
ripLog.WriteLine();
|
||||||
|
|
||||||
|
foreach(ObjsWithType owt in owts)
|
||||||
|
{
|
||||||
|
ripLog.WriteLine("\t-- " + owt.type + " --");
|
||||||
|
|
||||||
|
foreach(UnityEngine.Object o in owt.objs)
|
||||||
|
{
|
||||||
|
if(taken.Contains(o.GetInstanceID())) continue;
|
||||||
|
ripLog.WriteLine(
|
||||||
|
objformat,
|
||||||
|
o.GetInstanceID().ToString(),
|
||||||
|
o.name,
|
||||||
|
o.hideFlags.ToString());
|
||||||
|
|
||||||
|
taken.Add(o.GetInstanceID());
|
||||||
|
}
|
||||||
|
ripLog.WriteLine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
public class Lobby : MonoBehaviour
|
||||||
|
{
|
||||||
|
public void Awake()
|
||||||
|
{
|
||||||
|
LevelInfo.LogToFile();
|
||||||
|
|
||||||
|
Application.LoadLevel(Application.loadedLevel + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
## ripper
|
||||||
|
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
def post(bld):
|
||||||
|
distdir = os.path.join(bld.top_dir, 'ripper_build', 'Mars Explorer_Data')
|
||||||
|
os.makedirs(distdir, exist_ok=True)
|
||||||
|
shutil.copy(
|
||||||
|
os.path.join(bld.out_dir, 'ripper', '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}')
|
||||||
@@ -4,7 +4,7 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
APPNAME = 'MarsXPLR'
|
APPNAME = 'MarsXPLR'
|
||||||
VERSION = '4.0.1'
|
VERSION = '4.0.3'
|
||||||
|
|
||||||
top = '.'
|
top = '.'
|
||||||
out = 'wafbuild'
|
out = 'wafbuild'
|
||||||
@@ -14,6 +14,10 @@ def options(opt):
|
|||||||
action='store',
|
action='store',
|
||||||
default='',
|
default='',
|
||||||
help='path where a mono install contains bin, lib, and include directories')
|
help='path where a mono install contains bin, lib, and include directories')
|
||||||
|
opt.add_option('--self_hosted',
|
||||||
|
action='store',
|
||||||
|
default='no',
|
||||||
|
help='specify this as \"no\" to make a build that can be copied into a legacy build of marsxplr')
|
||||||
|
|
||||||
opt.recurse('MarsRuntime')
|
opt.recurse('MarsRuntime')
|
||||||
|
|
||||||
@@ -31,18 +35,26 @@ def configure(conf):
|
|||||||
)[0]
|
)[0]
|
||||||
)[0]
|
)[0]
|
||||||
|
|
||||||
|
conf.env.SELF_HOSTED = conf.options.self_hosted
|
||||||
|
if conf.env.SELF_HOSTED == 'no':
|
||||||
|
print('TAKE NOTE: this build is configured to not be self hosted, meaning it can not run as is and must be copied into a legacy copy of marsxplr')
|
||||||
|
|
||||||
conf.recurse('MarsRuntime')
|
conf.recurse('MarsRuntime')
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
if bld.cmd == 'distclean':
|
if bld.cmd == 'clean':
|
||||||
mbuild = os.path.join(bld.top_dir, 'marsxplr_build')
|
mbuild = os.path.join(bld.top_dir, 'marsxplr_build')
|
||||||
if os.path.exists(mbuild):
|
if os.path.exists(mbuild):
|
||||||
shutil.rmtree(mbuild)
|
shutil.rmtree(mbuild)
|
||||||
|
rbuild = os.path.join(bld.top_dir, 'ripper_build')
|
||||||
|
if os.path.exists(rbuild):
|
||||||
|
shutil.rmtree(rbuild)
|
||||||
return
|
return
|
||||||
|
|
||||||
bld.env.MONOOPTS = '-sdk:2 -langversion:3'
|
bld.env.MONOOPTS = '-sdk:2 -langversion:3'
|
||||||
|
|
||||||
bld.recurse('MarsRuntime')
|
if(bld.env.SELF_HOSTED == 'yes'):
|
||||||
|
bld.recurse('MarsRuntime')
|
||||||
|
|
||||||
bld.recurse('UnityDomainLoad')
|
bld.recurse('UnityDomainLoad')
|
||||||
bld.recurse('UnityEngine')
|
bld.recurse('UnityEngine')
|
||||||
@@ -51,3 +63,5 @@ def build(bld):
|
|||||||
bld.add_group()
|
bld.add_group()
|
||||||
bld.recurse('Assembly_-_CSharp')
|
bld.recurse('Assembly_-_CSharp')
|
||||||
bld.recurse('Assembly_-_UnityScript')
|
bld.recurse('Assembly_-_UnityScript')
|
||||||
|
bld.recurse('ripper')
|
||||||
|
bld.recurse('editor')
|
||||||
|
|||||||
Reference in New Issue
Block a user