15 Commits

7 changed files with 107 additions and 19 deletions
+9
View File
@@ -1497,9 +1497,18 @@ public class Game : MonoBehaviour
GUILayout.Space(20f);
if (
WorldDesc.url.Length >= 7 &&
WorldDesc.url.Substring(0, 7) == "file://")
{
serverHidden = true;
}
else
{
serverHidden = GUILayout.Toggle(
serverHidden,
"Hide This Game From List");
}
if(!serverHidden)
{
bool usePass = GUILayout.Toggle(
+3 -1
View File
@@ -4,8 +4,10 @@ My amatuer attempt at decompiling Mars Explorer so that it can be improved to ru
<hr>
<h1>building</h1>
Pretty much all of the game in terms of functionality has compilable source now, but the runtime code is still a work in progress.<br>
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>
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 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>
<br>
*: c compiler is only required if you intend to build with the option --self_hosted=yes<br>
+23
View File
@@ -0,0 +1,23 @@
== THE BIG BOOK OF EDITOR KEYBINDS ==
W in moveCam mode: move forward
A moveCam: strafe left
S moveCam: move backward
D moveCam: strafe right
Shift moveCam: move down
Space moveCam: move up
Ctrl moveCam: move faster
V enable/disable moveCam
Ctrl-N new whirld
Ctrl-O open whirld
Ctrl-Q quit editor
+2 -2
View File
@@ -22,11 +22,11 @@ public class CameraVehicle : MonoBehaviour
Quaternion originalRotation;
public bool moveCam = false;
public static bool moveCam = false;
void Update()
{
if(Input.GetKeyDown(KeyCode.V))
if(Input.GetKeyDown(KeyCode.V) && !Game.textInput)
moveCam = !moveCam;
if(!moveCam)
+59 -9
View File
@@ -12,6 +12,14 @@ public class Game : MonoBehaviour
string fileOpenUrl = "http://gitea.moe/lamp/whirlds/raw/branch/master/Geiodo/bagels_skate_park.utw";
float fileOpenTimeout = 0f;
public static bool textInput = false;
public void loadPrefs()
{
string openWhirldDefault = PlayerPrefs.GetString("openWhirldDefault", "");
if(openWhirldDefault != "") fileOpenUrl = openWhirldDefault;
}
public void Start()
{
Camera cam = Camera.main;
@@ -21,6 +29,8 @@ public class Game : MonoBehaviour
{
pE.emit = false;
}
loadPrefs();
}
public void Update()
@@ -31,18 +41,15 @@ public class Game : MonoBehaviour
public void OnGUI()
{
CameraVehicle camveh = Camera.main.GetComponent<CameraVehicle>();
if(!camveh) return;
if(camveh.moveCam) return;
if(CameraVehicle.moveCam) return;
if(GUI.Button(
new Rect(0, 0, TopElemWidth, TopElemHeight),
"File"))
{
if(fileMenu)
if(fileMenu && !fileOpenMenu)
{
fileMenu = false;
fileOpenMenu = false;
}
else
{
@@ -53,6 +60,40 @@ public class Game : MonoBehaviour
{
ShowFileMenu();
}
if(fileOpenMenu)
{
textInput = true;
}
else
{
textInput = false;
}
//handle utility keybinds
if(textInput) return;
if(Input.GetKey(KeyCode.LeftControl))
{
if(Input.GetKeyDown(KeyCode.N))
{
onFileNew();
}
else if(Input.GetKeyDown(KeyCode.O))
{
fileMenu = true;
fileOpenMenu = true;
}
else if(Input.GetKeyDown(KeyCode.Q))
{
Application.Quit();
}
}
}
private void onFileNew()
{
if(!GameObject.Find("WhirldBuffer"))
WhirldIn.ResetSpace();
}
private void ShowFileMenu()
@@ -61,8 +102,7 @@ public class Game : MonoBehaviour
new Rect(0, TopElemHeight, TopElemWidth, TopElemHeight),
"New"))
{
if(!GameObject.Find("WhirldBuffer"))
WhirldIn.ResetSpace();
onFileNew();
}
if(GUI.Button(
@@ -78,7 +118,7 @@ public class Game : MonoBehaviour
if(GUI.Button(
new Rect(0, TopElemHeight * 3, TopElemWidth, TopElemHeight),
"eXit"))
"Exit"))
{
Application.Quit();
}
@@ -86,12 +126,15 @@ public class Game : MonoBehaviour
private void ShowFileOpenMenu()
{
GUI.SetNextControlName("FileOpenTF");
fileOpenUrl = GUI.TextField(
new Rect(TopElemWidth, TopElemHeight * 2, TopElemWidth * 3, TopElemHeight),
fileOpenUrl);
GUI.FocusControl("FileOpenTF");
if(GUI.Button(
new Rect(TopElemWidth * 4, TopElemHeight * 2, TopElemWidth, TopElemHeight),
"Submit"))
"Submit") ||
Input.GetKeyDown(KeyCode.Return))
{
if(!GameObject.Find("WhirldBuffer") && fileOpenTimeout <= 0)
{
@@ -100,7 +143,14 @@ public class Game : MonoBehaviour
WhirldIn wi = new WhirldIn();
wi.url = fileOpenUrl;
wi.Load();
fileOpenMenu = false;
fileMenu = false;
}
} else if(Input.GetKeyDown(KeyCode.Escape))
{
fileOpenMenu = false;
fileMenu = false;
}
}
}
+2 -4
View File
@@ -249,10 +249,6 @@ public class WhirldIn : System.Object
"OnSceneGenerated",
SendMessageOptions.DontRequireReceiver);
}
foreach (ParticleEmitter pE in UnityEngine.Object.FindObjectsOfType(typeof(ParticleEmitter)))
{
pE.emit = false;
}
//Success!
status = WhirldInStatus.Success;
@@ -261,6 +257,8 @@ public class WhirldIn : System.Object
{
Debug.Log("Whirld Loading Info: " + info);
}
PlayerPrefs.SetString("openWhirldDefault", url);
}
public void ReadObject(Transform parent)
+6
View File
@@ -0,0 +1,6 @@
- slideshow abt unity 5.x internals
https://www.slideshare.net/slideshow/unity-internals-memory-and-performance/35909332
- unity pro for ppc machine. perhaps get this running on an old machine or vm and try ripping scenes/assets from it
https://www.macintoshrepository.org/15255-unity-pro
- info on godot engine architecture:
https://docs.godotengine.org/en/4.4/contributing/development/core_and_modules/index.html