added fastcode route endings

This commit is contained in:
QbeRoot 2018-02-04 00:20:10 +01:00
parent 1fc798bce0
commit 7ed98bb5e9
4 changed files with 38 additions and 13 deletions

View file

@ -15,6 +15,7 @@
<p>Added "Random, no duplicates" order that will only load each stage once.</p>
<p>Exiting area or dying now reloads the current stage instead of moving on.</p>
<p>Added IW and ASIW presets.</p>
<p>Added options for what to do after the last level; removed Corona and Bowser from the regular level choices.</p>
<h2 id="180202"><a href="#180202">Feb 02, 2018</a></h2>
<h3 id="1802021"><a href="#1802021">Site changes</a></h3>
<p>Integrated <a href="https://qberoot.github.io/fastcodes/">Noki Dokis Stage Loader</a> into the Generator.</p>

View file

@ -189,6 +189,8 @@ function updateUIDescription(s) {
document.getElementById("descriptionbox").innerHTML = "<h2>Skippable Cutscenes</h2><p>Makes FMVs Skippable. 'Always' has the same effect as the 'FMV Skips' code. Also, having 'FMV Skips' enabled will override 'Not in Pinna 1' - so don't use both simultaneously.</p>";
else if (s.id === "route_order")
document.getElementById("descriptionbox").innerHTML = "<h2>Level Order</h2><p>The order in which levels are loaded:</p><h4>As specified</h4><p>The code loads levels in the order of the list.</p><h4>Random, no duplicates</h4><p>The code picks levels at random, excluding levels that youve finished already.</p><h4>Fully random</h4><p>The code picks levels at random, even levels that youve finished already.</p>";
else if (s.id === "route_ending")
document.getElementById("descriptionbox").innerHTML = "<h2>Route Ending</h2><p>What to do after you complete the final level on the list. This has no effect if the level order is set to Fully random.</p>";
else if (s.id === "downloadformat")
document.getElementById("descriptionbox").innerHTML = "<h2>File Format</h2><p>You can choose between 3 file formats:</p><h4>GCT</h4><p>Download a GCT file for use with Nintendont</p><h4>Dolphin INI</h4><p>Download a textfile containing the formatted codes for use with Dolphin. Copy the contents of the file on top of your games .ini file.</p><p>You can open the .ini file by right clicking the game in Dolphin. In the context menu select 'Properties' and then 'Edit configuration'.</p><h4>Cheat Manager TXT</h4><p>Download the cheats in a textfile formatted for use with the <a target=\"_blank\" href=\"http://wiibrew.org/wiki/CheatManager\">Gecko Cheat Manager</a>. Place the txt file in SD:/txtcodes/.</p><p>A zip archive containing pregenerated txt files with all available codes on this site can be downloaded <a target=\"_blank\" href=\"files/GCMCodes.zip\">here</a>.</p>";
else if (s.id === "stageloader")
@ -228,7 +230,6 @@ function updateChangelog() {
*
****************************/
'strict mode'
const levels = document.querySelector("#route_levels");
const template = levels.lastElementChild;
template.ondragstart = function() { return false; };
@ -258,13 +259,19 @@ levels.addEventListener("click", function ({target: t}) {
if (t.tagName.toUpperCase() === "BUTTON") levels.removeChild(t.parentNode);
})
document.querySelector("#route_ending").disabled = document.querySelector("#route_order").value === "random";
document.querySelector("#route_order").addEventListener("change", function ({currentTarget: t}) {
document.querySelector("#route_ending").disabled = t.value === "random";
})
document.querySelector("#route_presets").addEventListener("change", function ({currentTarget: t}) {
if (levels.childElementCount <= 1 || confirm("Loading a preset will erase your current list. Continue?")) {
clearLevels();
const preset = t.value;
const [preset, ending] = t.value.split(";");
for (let i = 0; i <= preset.length - 4; i += 4) appendLevel(preset.substr(i, 4));
if (ending) document.querySelector("#route_ending").value = ending
}
t.value = ""
t.value = "";
})
document.querySelector("#route_clear").addEventListener("click", function () {
@ -338,8 +345,8 @@ function getFastCode() {
let game = JSON.parse(atob(document.getElementById("route_levels").getAttribute("data-json")));
const order = document.getElementById("route_order").value;
const levelWords = Math.ceil(levelCodes.length / 2);
const branchBase = 0x14 + 0x24 * (order !== 'list');
const ending = document.getElementById("route_ending").value;
const branchBase = 0x1C + 0x24 * (order !== 'list');
const asm = [];
asm.push("48" + ("00000" + (Math.ceil(levelCodes.length / 2) + 1 << 2 | 1).toString(16).toUpperCase()).slice(-6)); // bl to the code
for (let i = levelCodes.length - 1; i >= 0; i -= 2) {
@ -380,7 +387,9 @@ function getFastCode() {
}
asm.push("2C030000"); // cmpwi r3, 0
asm.push("4081" + ("000" + (branchBase + 4 * (order !== "random")).toString(16).toUpperCase()).slice(-4)); // ble- done
asm.push("4081000C"); // ble- 0x0C
asm.push("3860" + ending); // li r3, ending
asm.push("4800" + ("000" + (branchBase - 8 + 4 * (order !== "random")).toString(16).toUpperCase()).slice(-4)); // b done
if (order !== "list") {
asm.push("7CEC42E6"); // mftbl r7

View file

@ -105,6 +105,18 @@
</select>
</td>
</tr>
<tr>
<td nowrap>
<label for="route_ending">After the last level:</label>
</td>
<td style="width:100%">
<select id="route_ending" style="width:100%" onmouseover="updateUIDescription(this)">
<option selected value="0F00">Return to the title screen</option>
<option value="3400">Load Corona Mountain</option>
<option value="3C00">Load the Bowser fight</option>
</select>
</td>
</tr>
</tbody></table>
</div>
<div>
@ -120,7 +132,6 @@
<option value="1700">Grass pipe</option>
<option value="1800">Lily Pad Ride</option>
<option value="1D00">Jail secret</option>
<option value="3400">Corona Mountain</option>
</optgroup>
<optgroup label="Bianco Hills">
<option value="0200">Bianco 1</option>
@ -212,7 +223,6 @@
<option value="0E00">Casino Delfino (Sirena 4)</option>
<option value="0E01">Casino Delfino (Sirena 5)</option>
<option value="3900">Deep Sea of Mare (Noki 4)</option>
<option value="3C00">Bowser fight (Corona)</option>
</optgroup>
</select>
<button type="button" class="route_remove">&#215;</button>
@ -223,11 +233,11 @@
<button id="route_clear" type="button">Clear list</button>
<select id="route_presets">
<option value="" selected>Load a preset…</option>
<option value="0200020202030204040004060800080108020803080408050806050005010502050305020506030003010302030303040305030602050206060006010602060306040605060609000901090209030904090509063400">Any% usual route</option>
<option value="0200020202030204040004060800080108020803080408050806050005010502050305020506020502060600060106020603060406050606090009010902090309040905090603000301030203030304030503063400">Any% Ricco late</option>
<option value="0200020202030204040004010402040304040405040605000501050205030504050505060300030103020303030403050306020502060600060106020603060406050606090009010902090309040905090608000801080208030804080508063400">Any% No Major Skips</option>
<option value="020002010202020308000801080208030804080508060807050005010502050305040505050605070300030103020303030403050306030702040205020602070600060106020603060406050606060709000901090209030904090509060907040004010402040304040403040504063400">All Episodes</option>
<option value="020002010202020208000801080208030804080408040805080608070807050005010501050205030504050405050505050605070300030103010302030303030304030503050306030702030204020502050205020602070600060106010602060306030603060406050606060709000901090109010902090309040905090509060907040004000400040104020403040504040403040204063400">All Level Shines</option>
<option value="020002020203020404000406080008010802080308040805080605000501050205030502050603000301030203030304030503060205020606000601060206030604060506060900090109020903090409050906;3400">Any% usual route</option>
<option value="020002020203020404000406080008010802080308040805080605000501050205030502050602050206060006010602060306040605060609000901090209030904090509060300030103020303030403050306;3400">Any% Ricco late</option>
<option value="020002020203020404000401040204030404040504060500050105020503050405050506030003010302030303040305030602050206060006010602060306040605060609000901090209030904090509060800080108020803080408050806;3400">Any% No Major Skips</option>
<option value="02000201020202030800080108020803080408050806080705000501050205030504050505060507030003010302030303040305030603070204020502060207060006010602060306040605060606070900090109020903090409050906090704000401040204030404040304050406;3400">All Episodes</option>
<option value="02000201020202020800080108020803080408040804080508060807080705000501050105020503050405040505050505060507030003010301030203030303030403050305030603070203020402050205020502060207060006010601060206030603060306040605060606070900090109010901090209030904090509050906090704000400040004010402040304050404040304020406;3400">All Level Shines</option>
<optgroup label="Individual Worlds">
<option value="020002020203020402050206">Bianco Hills</option>
<option value="0300030103020303030403050306">Ricco Harbor</option>

View file

@ -228,6 +228,11 @@ select {
outline:none
}
select:disabled {
background:#e2e2e2;
color: grey
}
optgroup {
background:#ff5151
}