descriptions

This commit is contained in:
Matteias Collet 2017-09-28 15:21:01 +02:00
parent c75774f7a6
commit d09e5e1f4a
7 changed files with 268 additions and 92 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
[Tt]rash/
*.db

View file

@ -4,8 +4,8 @@
<title lang="en">DPad Functions</title>
<author>Psychonauter, Dan Salvato, Link Master, James0x57</author>
<version>2.0</version>
<date>Aug 28, 2017</date>
<description></description>
<description><![CDATA[Allows various game modifications. Button combinations:<br/><table><tr><th align="left">Combination</th><th align="left">Result</th></tr><tr><td>D-Pad left</td><td>Save Mario sposition</td></tr><tr><td>D-Pad right</td><td>Load Marios Position</td></tr><tr><td>D-Pad up</td><td>Replace all dialog with a single "!!!" line</td></tr><tr><td>D-Pad down</td><td>Restore dialog boxes</td></tr><tr><td>B+D-Pad left</td><td>Lock rocket nozzle</td></tr><tr><td>B+D-Pad right</td><td>Lock turbo nozzle</td></tr><tr><td>B+D-Pad up</td><td>Lock hover nozzle</td></tr><tr><td>B+D-Pad down</td><td>Release nozzle lock</td></tr></table>]]></description>
<date>Jan 22, 2017</date>
<source>
2440E10C 80000000
82200000 8040E10C
@ -43,7 +43,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 20, 2017</date>
<description></description>
<description>Prevents the game from setting the blue coin flag, which makes them respawn after reentering the level</description>
<source>
0429A728 60000000
</source>
@ -53,7 +53,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 20, 2017</date>
<description></description>
<description>Allows skipping FMVs without having to watch them once first.</description>
<source>
042B5EF4 38600001
042B5E8C 38600001
@ -64,7 +64,7 @@
<author>Codejunkies</author>
<version>1.0</version>
<date>Jan 20, 2017</date>
<description></description>
<description>Locks life count at 99</description>
<source>
04578A04 00000063
</source>
@ -74,7 +74,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 28, 2017</date>
<description></description>
<description>Mutes background music, but keeps SFX on.</description>
<source>
04016A34 FC210828
</source>
@ -84,7 +84,7 @@
<author>Psychonauter</author>
<version>1.1</version>
<date>Aug 28, 2017</date>
<description></description>
<description><![CDATA[Adds the ingame timer to every level. Includes modified level select for that purpose. See 'Level Select (Standalone)' for the button combinations.<br /><b>Do not use this in combination with the standalone level select code!</b>]]></description>
<source>
04348158 7C9E2378
0434815C 7C1F0378
@ -291,7 +291,7 @@
<author>Psychonauter, Dan Salvato</author>
<version>1.4</version>
<date>Jan 22, 2017</date>
<description></description>
<description><![CDATA[Allows warping to other levels when starting a file or when exiting level by holding the combination until the screen turns black. Codes:<br /><br /><img src="img/levelselect.png" width="500px">]]></description>
<source>
C22A6710 00000074
3C60803E 60639710
@ -412,4 +412,134 @@
807F0020 00000000
</source>
</code>
<code>
<title lang="en">Fast Any%</title>
<author>Psychonauter</author>
<version>1.0</version>
<description>Loads stages in any% order.</description>
<date>Sep 25, 2017</date>
<source>
C22A6710 00000078
3C60803E 60639710
88830002 2C04000E
41820380 2C04000D
41820310 2C040001
41810394 3C608057
60638988 88830007
70850001 41A2000C
38803400 480002DC
88830006 70850080
41A2000C 38800906
480002C8 70850040
41A2000C 38800905
480002B8 70850020
41A2000C 38800904
480002A8 70850010
41A2000C 38800903
48000298 70850008
41A2000C 38800902
48000288 70850004
41A2000C 38800901
48000278 88830005
70850040 41A2000C
38800900 48000264
70850020 41A2000C
38800606 48000254
70850010 41A2000C
38800605 48000244
70850008 41A2000C
38800604 48000234
70850004 41A2000C
38800603 48000224
70850002 41A2000C
38800602 48000214
70850001 41A2000C
38800601 48000204
88830000 70850040
41A2000C 38800600
480001F0 70850020
41A2000C 38800206
480001E0 88830002
70850001 41A2000C
38800205 480001CC
88830001 70850080
41A2000C 38800306
480001B8 70850040
41A2000C 38800305
480001A8 70850020
41A2000C 38800304
48000198 70850010
41A2000C 38800303
48000188 70850008
41A2000C 38800302
48000178 70850004
41A2000C 38800301
48000168 88830004
70850010 41A2000C
38800300 48000154
70850008 41A2000C
38800506 48000144
70850002 41A2000C
38800502 48000134
70850001 41A2000C
38800503 48000124
88830003 70850080
41A2000C 38800502
48000110 70850040
41A2000C 38800501
48000100 88830008
70850004 41A2000C
38800500 480000EC
88830007 70850080
41A2000C 38800806
480000D8 88830008
70850001 41A2000C
38800805 480000C4
88830007 70850020
41A2000C 38800804
480000B0 70850040
41A2000C 38800803
480000A0 88830008
70850002 41A2000C
38800802 4800008C
88830007 70850010
41A2000C 38800801
48000078 88830003
70850004 41A2000C
38800800 48000064
70850008 41A2000C
38800406 48000054
88830000 70850010
41A2000C 38800400
48000040 70850008
41A2000C 38800204
48000030 70850004
41A2000C 38800203
48000020 70850002
41A2000C 38800202
48000010 38800200
48000008 7C884A14
3C60803E 60639710
90830000 48000090
39000D00 8083FFFC
2C040500 4082000C
39200000 4BFFFFD8
2C040502 4082000C
39200001 4BFFFFC8
2C040504 4082000C
39200002 4BFFFFB8
2C040505 4082000C
39200003 4BFFFFA8
2C040506 4082000C
39200004 4BFFFF98
2C040507 40A20030
39200005 4BFFFF88
3C608057 60638988
88830005 70850008
41A2000C 38800E01
4BFFFF70 38800E00
4BFFFF68 807F0020
60000000 00000000
</source>
</code>
</codes>

View file

@ -4,8 +4,8 @@
<title lang="en">DPad Functions</title>
<author>Psychonauter, Dan Salvato, Link Master, James0x57</author>
<version>2.0</version>
<date>Aug 28, 2017</date>
<description></description>
<date>Jan 22, 2017</date>
<description><![CDATA[Allows various game modifications. Button combinations:<br/><table><tr><th align="left">Combination</th><th align="left">Result</th></tr><tr><td>D-Pad left</td><td>Save Mario sposition</td></tr><tr><td>D-Pad right</td><td>Load Marios Position</td></tr><tr><td>D-Pad up</td><td>Replace all dialog with a single "!!!" line</td></tr><tr><td>D-Pad down</td><td>Restore dialog boxes</td></tr><tr><td>B+D-Pad left</td><td>Lock rocket nozzle</td></tr><tr><td>B+D-Pad right</td><td>Lock turbo nozzle</td></tr><tr><td>B+D-Pad up</td><td>Lock hover nozzle</td></tr><tr><td>B+D-Pad down</td><td>Release nozzle lock</td></tr></table>]]></description>
<source>
2440A39C 80000000
82200000 8040A39C
@ -45,7 +45,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 20, 2017</date>
<description></description>
<description>Prevents the game from setting the blue coin flag, which makes them respawn after reentering the level</description>
<source>
040EDCAC 60000000
</source>
@ -55,7 +55,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 20, 2017</date>
<description></description>
<description>Allows skipping FMVs without having to watch them once first.</description>
<source>
0410AF5C 38600001
0410AFC0 38600001
@ -66,7 +66,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 20, 2017</date>
<description></description>
<description>Locks life count at 99</description>
<source>
04575227 00000063
</source>
@ -76,7 +76,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 28, 2017</date>
<description></description>
<description>Mutes background music, but keeps SFX on.</description>
<source>
0417FF58 FC210828
</source>
@ -86,7 +86,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>May 27, 2017</date>
<description></description>
<description><![CDATA[Adds the ingame timer to every level. Includes modified level select for that purpose. See 'Level Select (Standalone)' for the button combinations.<br /><b>Do not use this in combination with the standalone level select code!</b>]]></description>
<source>
04092A78 7C9E2378
04092A7C 7C1F0378
@ -278,7 +278,7 @@
<author>Psychonauter, Dan Salvato</author>
<version>1.4</version>
<date>Jan 22, 2017</date>
<description></description>
<description><![CDATA[Allows warping to other levels when starting a file or when exiting level by holding the combination until the screen turns black. Codes:<br /><br /><img src="img/levelselect.png" width="500px">]]></description>
<source>
C20FA19C 00000074
3C60803E 60636010

View file

@ -4,8 +4,8 @@
<title lang="en">DPad Functions</title>
<author>Psychonauter, Dan Salvato, Link Master, James0x57</author>
<version>2.0</version>
<date>Aug 28, 2017</date>
<description></description>
<date>Jan 22, 2017</date>
<description><![CDATA[Allows various game modifications. Button combinations:<br/><table><tr><th align="left">Combination</th><th align="left">Result</th></tr><tr><td>D-Pad left</td><td>Save Mario sposition</td></tr><tr><td>D-Pad right</td><td>Load Marios Position</td></tr><tr><td>D-Pad up</td><td>Replace all dialog with a single "!!!" line</td></tr><tr><td>D-Pad down</td><td>Restore dialog boxes</td></tr><tr><td>B+D-Pad left</td><td>Lock rocket nozzle</td></tr><tr><td>B+D-Pad right</td><td>Lock turbo nozzle</td></tr><tr><td>B+D-Pad up</td><td>Lock hover nozzle</td></tr><tr><td>B+D-Pad down</td><td>Release nozzle lock</td></tr></table>]]></description>
<source>
244057D4 80000000
82200000 804057D4
@ -53,7 +53,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 20, 2017</date>
<description></description>
<description>Prevents the game from setting the blue coin flag, which makes them respawn after reentering the level</description>
<source>
04292604 60000000
</source>
@ -63,7 +63,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 20, 2017</date>
<description></description>
<description>Allows skipping FMVs without having to watch them once first.</description>
<source>
042ADE20 38600001
042ADE88 38600001
@ -74,7 +74,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 20, 2017</date>
<description></description>
<description>Locks life count at 99</description>
<source>
04570967 00000063
</source>
@ -84,7 +84,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>Jan 28, 2017</date>
<description></description>
<description>Mutes background music, but keeps SFX on.</description>
<source>
04016A90 FC210828
</source>
@ -94,7 +94,7 @@
<author>Psychonauter</author>
<version>1.0</version>
<date>May 27, 2017</date>
<description></description>
<description><![CDATA[Adds the ingame timer to every level. Includes modified level select for that purpose. See 'Level Select (Standalone)' for the button combinations.<br /><b>Do not use this in combination with the standalone level select code!</b>]]></description>
<source>
043403B4 7C9E2378
043403B8 7C1F0378
@ -287,7 +287,7 @@
<author>Psychonauter, Dan Salvato</author>
<version>1.4</version>
<date>Jan 22, 2017</date>
<description></description>
<description><![CDATA[Allows warping to other levels when starting a file or when exiting level by holding the combination until the screen turns black. Codes:<br /><br /><img src="img/levelselect.png" width="500px">]]></description>
<source>
C229E668 00000074
3C60803E 606310D0

BIN
img/levelselect.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View file

@ -1,14 +1,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="style/style.css">
<title>GCT Generator</title>
<title>SMS GCT Generator</title>
<script language="javascript">
function getCodeNamesFromXML(name) {
function parseXML(name) {
var xml = new XMLHttpRequest();
var file = "codes/" + name + ".xml";
xml.onload = function() {
@ -20,10 +18,15 @@
for (var i = 0; i < xmlData.length; i++) {
var li = document.createElement("li");
var desc = xmlData[i].getElementsByTagName("title")[0].textContent;
desc += " (v" + xmlData[i].getElementsByTagName("version")[0].textContent + ", " + xmlData[i].getElementsByTagName("date")[0].textContent + ")";
var t = document.createTextNode(desc);
li.appendChild(t);
li.setAttribute("data-codeName", xmlData[i].getElementsByTagName("title")[0].textContent);
li.setAttribute("data-codeAuthor", xmlData[i].getElementsByTagName("author")[0].textContent);
li.setAttribute("data-codeDesc", xmlData[i].getElementsByTagName("description")[0].textContent);
li.setAttribute("data-codeVersion", xmlData[i].getElementsByTagName("version")[0].textContent);
li.setAttribute("data-codeDate", xmlData[i].getElementsByTagName("date")[0].textContent);
li.setAttribute("data-codeSrc", xmlData[i].getElementsByTagName("source")[0].textContent.replace(/[\s\n\r\t]+/gm, ""));
li.setAttribute("onmouseover", "updateDescription(this)");
document.getElementById("checkList").appendChild(li);
}
}
@ -57,53 +60,69 @@
function generateGCT() {
var xml = new XMLHttpRequest();
var file = "codes/" + document.getElementById("gameID").value + ".xml";
xml.onload = function() {
if (this.status == 200 && this.responseXML != null) {
if (document.getElementById("gameID").value === "Choose Version") {
alert("Select the game version!");
return;
}
var data = "00D0C0DE00D0C0DE";
var xmlData = xml.responseXML;
xmlData = (new DOMParser()).parseFromString(xml.responseText, "text/xml");
xmlData = xmlData.getElementsByTagName("code");
var codeList = document.getElementById("checkList").getElementsByTagName("li");
var valueSelected = false;
for (var i = 0; i < codeList.length; i++) {
if (codeList[i].className === "checked")
data += xmlData[i].getElementsByTagName("source")[0].textContent;
if (codeList[i].className === "checked") {
data += codeList[i].getAttribute("data-codeSrc");
valueSelected = true;
}
}
data = data.replace(/[\s\n\r\t]+/gm, "");
if (valueSelected) {
//data = data.replace(/[\s\n\r\t]+/gm, "");
data += "FF00000000000000";
downloadGCT(data, document.getElementById("gameID").value + ".gct");
} else {
alert("No cheat(s) selected!");
}
}
xml.open("GET", file);
xml.send();
}
function updateCodelist() {
document.getElementById("downloadButton").style.visibility = "visible";
document.getElementById("checkList").innerHTML = "";
var gameVersion = document.getElementById("gameID").value;
getCodeNamesFromXML(gameVersion);
parseXML(gameVersion);
}
function updateDescription($this) {
document.getElementById("descriptionBox").style.visibility = "visible";
var description = "<p><h2>" + $this.getAttribute("data-codeName") + "</h2></p><p><i>Author: " + $this.getAttribute("data-codeAuthor") + "<br />Version: " + $this.getAttribute("data-codeVersion") + " (" + $this.getAttribute("data-codeDate") + ")</i></p>" + "<p>Description:<br />" + $this.getAttribute("data-codeDesc") + "</p>";
document.getElementById("descriptionBox").innerHTML = description;
}
function hideDescription() {
document.getElementById("descriptionBox").style.visibility = "hidden";
}
</script>
</head>
<body>
<div style="width: 100%; overflow: hidden;">
<h2>Mario Sunshine Cheatfile Generator</h2>
<div style="width: 510px; float: left;">
<select id="gameID" class="selectionHeader" onchange="updateCodelist()">
<option selected disabled hidden>Choose Version</option>
<option value="GMSE01">GMSE01 (NTSC-U)</option>
<option value="GMSJ01">GMSJ01 (NTSC-J 1.0)</option>
<option value="GMSP01">GMSP01 (PAL)</option>
</select>
<ul id="checkList">
<ul id="checkList" onmouseleave="hideDescription()">
</ul>
<button onclick="generateGCT()">Download</button>
<button id="downloadButton" onclick="generateGCT()" style="visibility:hidden;">Download</button>
</div>
<div style="margin-left: 530px;">
<div id="descriptionBox" class="framed" style="visibility:hidden;">
</div>
</div>
</div>
</body>
<script language="javascript">
document.getElementById("checkList").addEventListener("click", function(ev) {
if (ev.target && ev.target.nodeName == "LI") {
@ -112,5 +131,4 @@
});
</script>
</html>

View file

@ -1,17 +1,15 @@
body {
margin: 50px 50px 0 50px;
width: 1200px;
}
html {
background-color: #262626;
color: #f1f1f1;
font-family: Calibri;
}
#gameID {
margin: 10px 0 10px 0;
}
body button {
width: 500px;
padding: 12px 8px 12px 0px;
@ -22,23 +20,25 @@ body button {
color: #f1f1f1;
background-color: #f44336;
border-style: none;
border-radius: 4px;
cursor: pointer;
margin-top: 10px;
}
img {
border-radius: 4px;
}
ul {
margin: 0;
padding: 0;
width: 500px;
list-style-type: none;
}
ul li {
cursor: pointer;
position: relative;
padding: 12px 8px 12px 40px;
background: #dedeed;
color: #02028c;
background: #ffefef;
color: #262626;
font-size: 18px;
transition: 0.2s;
-webkit-user-select: none;
@ -46,38 +46,64 @@ ul li {
-ms-user-select: none;
user-select: none;
}
ul li::before {
content: '';
position: absolute;
border-color: #a6a6a6;
border-style: solid;
border-width: 1.5px 1.5px 1.5px 1.5px;
border-radius: 4px;
top: 14.5px;
left: 12px;
height: 15px;
width: 15px;
}
ul li:nth-child(odd) {
background: #f9f9f9;
background: #fdfdfd;
}
ul li:hover {
background: #ddd;
}
/*background: #ddd;*/
background: #565656;
color: #ffffff;
}
ul li.checked {
background: #888;
background: #565656;
color: #fff;
}
ul li.checked::before {
content: '';
position: absolute;
border-color: #fff;
border-style: solid;
border-width: 0 2px 2px 0;
top: 10px;
left: 16px;
transform: rotate(45deg);
border-width: 1.5px 1.5px 1.5px 1.5px;
border-radius: 4px;
top: 14.5px;
left: 12px;
height: 15px;
width: 7px;
width: 15px;
background-color: #ffffff;
}
.selectionHeader {
background-color: #f44336;
padding: 12px 8px 12px 40px;
padding: 12px 8px 12px 10px;
color: white;
width: 500px;
font-size: 16px;
border-style: none;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.framed {
margin: 30px 0 10px 0;
padding: 0px 12px 12px 12px;
border-color: #fff;
border-style: solid;
border-width: 1px;
border-radius: 4px;
width: 500px;
/*min-height: 300px;*/
}