-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 0.2 (Beta Build 3) Changelog: Changes by Davideesk: * Added more camera modes (Top, Bottom, Left, Right, Front, Back) - Removed Field of View slider to make room for the buttons. That feature was kinda pointless anyway * Added a menu for changing warps (Edit -> Warp), which should make it easier to select a level without having to remember the level id. - Note: Multi-selecting warps doesn't really work at the moment, so you can only change one warp at a time. * 'Drop to Ground' will now find the closest triangle to the y-pos, instead of just selecting the highest point. This may need to be tweaked even more. * Quad64 should now be a 32-bit program again. Changes by aglab2: * The editor should now only save changes you make, instead of just overwriting the entire ROM file * Reordered the level list by in-game courses, instead of by level ID. * Added Kaze's objects from "More Object's patch" to the default object-combo name list. * Various fixes related to saving
- Loading branch information
Showing
11 changed files
with
1,728 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Data; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Windows.Forms; | ||
|
||
namespace Quad64.src.Forms | ||
{ | ||
public partial class EditWarp : Form | ||
{ | ||
public byte fromID, toLevel, toArea, toID, triggerID; | ||
public short tX, tY, tZ; | ||
public bool pressedSaved = false; | ||
bool isInstantWarp = false; | ||
List<ushort> levelIds = new List<ushort>(); | ||
|
||
public EditWarp(string title, byte fromID, byte toLevel, byte toArea, byte toID) | ||
{ | ||
this.fromID = fromID; | ||
this.toLevel = toLevel; | ||
this.toArea = toArea; | ||
this.toID = toID; | ||
isInstantWarp = false; | ||
InitializeComponent(); | ||
Text = title; | ||
} | ||
|
||
public EditWarp(byte triggerID, byte toArea, short teleX, short teleY, short teleZ) | ||
{ | ||
this.triggerID = triggerID; | ||
this.toArea = toArea; | ||
tX = teleX; | ||
tY = teleY; | ||
tZ = teleZ; | ||
isInstantWarp = true; | ||
InitializeComponent(); | ||
Text = "Update Instant Warp"; | ||
} | ||
|
||
private void EditWarp_Load(object sender, EventArgs e) | ||
{ | ||
if (Globals.useHexadecimal) | ||
{ | ||
iw_trigger.Hexadecimal = true; | ||
iw_area.Hexadecimal = true; | ||
iw_tx.Hexadecimal = true; | ||
iw_ty.Hexadecimal = true; | ||
iw_tz.Hexadecimal = true; | ||
|
||
w_areaID.Hexadecimal = true; | ||
w_warpFrom.Hexadecimal = true; | ||
w_warpToID.Hexadecimal = true; | ||
} | ||
|
||
|
||
if (!isInstantWarp) | ||
{ | ||
panel_instWarp_controls.Hide(); | ||
panel_warp_controls.Show(); | ||
w_warpFrom.Value = fromID; | ||
w_warpToID.Value = toID; | ||
w_areaID.Value = toArea; | ||
levelIds.Clear(); | ||
foreach (KeyValuePair<string, ushort> entry in ROM.Instance.levelIDs) | ||
{ | ||
w_selectLevel.Items.Add(entry.Key + " (0x" + entry.Value.ToString("X2") + ")"); | ||
levelIds.Add(entry.Value); | ||
if (entry.Value == toLevel) | ||
{ | ||
w_selectLevel.SelectedIndex = w_selectLevel.Items.Count - 1; | ||
} | ||
} | ||
} | ||
else | ||
{ | ||
panel_instWarp_controls.Show(); | ||
panel_warp_controls.Hide(); | ||
iw_trigger.Value = triggerID; | ||
iw_area.Value = toArea; | ||
iw_tx.Value = tX; | ||
iw_ty.Value = tY; | ||
iw_tz.Value = tZ; | ||
} | ||
} | ||
|
||
private void cancelButton_Click(object sender, EventArgs e) | ||
{ | ||
pressedSaved = false; | ||
Hide(); | ||
} | ||
|
||
private void selectButton_Click(object sender, EventArgs e) | ||
{ | ||
if (!isInstantWarp) | ||
{ | ||
fromID = (byte)w_warpFrom.Value; | ||
toID = (byte)w_warpToID.Value; | ||
toArea = (byte)w_areaID.Value; | ||
toLevel = (byte)levelIds[w_selectLevel.SelectedIndex]; | ||
} | ||
else | ||
{ | ||
panel_instWarp_controls.Show(); | ||
panel_warp_controls.Hide(); | ||
iw_trigger.Value = triggerID; | ||
iw_area.Value = toArea; | ||
iw_tx.Value = tX; | ||
iw_ty.Value = tY; | ||
iw_tz.Value = tZ; | ||
} | ||
pressedSaved = true; | ||
Hide(); | ||
} | ||
} | ||
} |
Oops, something went wrong.