Compare commits
17 Commits
b8b509bbc8
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7464150fe8 | |||
| 3aa6302f6d | |||
| 046247a1df | |||
| e7e11686f3 | |||
| ef1e01307c | |||
| c7d35c6761 | |||
| ed4751fa71 | |||
| a79e82891d | |||
| f070c32b88 | |||
| 1d6e3e871d | |||
| d295f43506 | |||
| 0cbb5fc447 | |||
| c4a78200d7 | |||
| d99e58b06c | |||
| 4dc21dc9a5 | |||
| 2c3aba3283 | |||
| fef065eddf |
@@ -1497,9 +1497,18 @@ public class Game : MonoBehaviour
|
||||
|
||||
GUILayout.Space(20f);
|
||||
|
||||
serverHidden = GUILayout.Toggle(
|
||||
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(
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
@@ -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.LeftAlt))
|
||||
if(Input.GetKeyDown(KeyCode.V) && !Game.textInput)
|
||||
moveCam = !moveCam;
|
||||
|
||||
if(!moveCam)
|
||||
|
||||
+63
-13
@@ -5,13 +5,21 @@ using UnityEngine;
|
||||
public class Game : MonoBehaviour
|
||||
{
|
||||
public GUISkin Skin;
|
||||
const float TopElemWidth = 50f;
|
||||
const float TopElemHeight = 20f;
|
||||
float TopElemWidth = Screen.width / 19f;
|
||||
float TopElemHeight = Screen.height / 38;
|
||||
bool fileMenu = false;
|
||||
bool fileOpenMenu = false;
|
||||
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, 300, TopElemHeight),
|
||||
new Rect(TopElemWidth, TopElemHeight * 2, TopElemWidth * 3, TopElemHeight),
|
||||
fileOpenUrl);
|
||||
GUI.FocusControl("FileOpenTF");
|
||||
if(GUI.Button(
|
||||
new Rect(TopElemWidth + 300, TopElemHeight * 2, TopElemWidth, TopElemHeight),
|
||||
"Submit"))
|
||||
new Rect(TopElemWidth * 4, TopElemHeight * 2, TopElemWidth, TopElemHeight),
|
||||
"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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user