giant freakin documentation and reorganization pass, it also uses cmake because all the building was getting too complicated for shell scripts

This commit is contained in:
2025-09-29 20:31:42 -07:00
parent a5f837189b
commit 0edb4b50d2
71 changed files with 4895 additions and 127 deletions

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri name="seagull:rules/items" uri="items.xsd" />
<uri name="seagull:rules/upgrades" uri="upgrades.xsd" />
</catalog>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="seagull:rules/items">
<xs:element name="ItemRules">
<xs:complexType>
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element name="Food">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:int" name="Min"/>
<xs:element type="xs:int" name="Max"/>
</xs:sequence>
<xs:attribute type="xs:int" name="StoryBeat" use="optional" default="0"/>
</xs:complexType>
</xs:element>
<xs:element name="Shinies">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:int" name="Min"/>
<xs:element type="xs:int" name="Max"/>
</xs:sequence>
<xs:attribute type="xs:int" name="StoryBeat" use="optional" default="0"/>
</xs:complexType>
</xs:element>
<xs:element name="Psi">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:int" name="Min"/>
<xs:element type="xs:int" name="Max"/>
</xs:sequence>
<xs:attribute type="xs:int" name="StoryBeat" default="0"/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" standalone="yes"?>
<xs:schema id="UpgradeRules" targetNamespace="seagull:rules/upgrades" xmlns="seagull:rules/upgrades" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:element name="UpgradeRules">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="TreeData" maxOccurs="1">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Name" maxOccurs="1" type="xs:string" />
<xs:element name="PrimaryColor" maxOccurs="1" type="xs:string" />
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="Upgrade">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Id" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="Name" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="Desc" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="Modifiers" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Mod" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="Id" form="unqualified" type="xs:string" />
<xs:attribute name="Name" form="unqualified" type="xs:string" />
<xs:attribute name="Speed" form="unqualified" type="xs:int" />
<xs:attribute name="ChanceSteal" form="unqualified" type="xs:int" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Requirements" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="Require" maxOccurs="unbounded" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -0,0 +1,5 @@
function structuredClone(val) {
var output = JSON.parse(JSON.stringify(val));
if (window.pywebview.api.debug_mode) { console.log(("structuredClone:" + val) + " => " + outval); }
return output;
}

View File

@@ -0,0 +1,164 @@
/*
* Konami-JS ~
* :: Now with support for touch events and multiple instances for
* :: those situations that call for multiple easter eggs!
* Code: https://github.com/georgemandis/konami-js
* Copyright (c) 2009 George Mandis (https://george.mand.is)
* Version: 1.7.0 (09/03/2024)
* Licensed under the MIT License (http://opensource.org/licenses/MIT)
* Tested in: Safari 4+, Google Chrome 4+, Firefox 3+, IE7+, Mobile Safari 2.2.1+ and Android
*/
var Konami = function (callback) {
var konami = {
addEvent: function (obj, type, fn, ref_obj) {
if (obj.addEventListener) obj.addEventListener(type, fn, false);
else if (obj.attachEvent) {
// IE
obj["e" + type + fn] = fn;
obj[type + fn] = function () {
obj["e" + type + fn](window.event, ref_obj);
};
obj.attachEvent("on" + type, obj[type + fn]);
}
},
removeEvent: function (obj, eventName, eventCallback) {
if (obj.removeEventListener) {
obj.removeEventListener(eventName, eventCallback);
} else if (obj.attachEvent) {
obj.detachEvent(eventName);
}
},
input: "",
pattern: "38384040373937396665",
keydownHandler: function (e, ref_obj) {
if (ref_obj) {
konami = ref_obj;
} // IE
konami.input += e ? e.keyCode : event.keyCode;
if (konami.input.length > konami.pattern.length) {
konami.input = konami.input.substr(
konami.input.length - konami.pattern.length,
);
}
if (konami.input === konami.pattern) {
konami.code(konami._currentLink);
konami.input = "";
e.preventDefault();
return false;
}
},
load: function (link) {
this._currentLink = link;
this.addEvent(document, "keydown", this.keydownHandler, this);
this.iphone.load(link);
},
unload: function () {
this.removeEvent(document, "keydown", this.keydownHandler);
this.iphone.unload();
},
code: function (link) {
window.location = link;
},
iphone: {
start_x: 0,
start_y: 0,
stop_x: 0,
stop_y: 0,
tap: false,
capture: false,
orig_keys: "",
keys: [
"UP",
"UP",
"DOWN",
"DOWN",
"LEFT",
"RIGHT",
"LEFT",
"RIGHT",
"TAP",
"TAP",
],
input: [],
code: function (link) {
konami.code(link);
},
touchmoveHandler: function (e) {
if (e.touches.length === 1 && konami.iphone.capture === true) {
var touch = e.touches[0];
konami.iphone.stop_x = touch.pageX;
konami.iphone.stop_y = touch.pageY;
konami.iphone.tap = false;
konami.iphone.capture = false;
}
},
touchendHandler: function () {
konami.iphone.input.push(konami.iphone.check_direction());
if (konami.iphone.input.length > konami.iphone.keys.length)
konami.iphone.input.shift();
if (konami.iphone.input.length === konami.iphone.keys.length) {
var match = true;
for (var i = 0; i < konami.iphone.keys.length; i++) {
if (konami.iphone.input[i] !== konami.iphone.keys[i]) {
match = false;
}
}
if (match) {
konami.iphone.code(konami._currentLink);
}
}
},
touchstartHandler: function (e) {
konami.iphone.start_x = e.changedTouches[0].pageX;
konami.iphone.start_y = e.changedTouches[0].pageY;
konami.iphone.tap = true;
konami.iphone.capture = true;
},
load: function (link) {
this.orig_keys = this.keys;
konami.addEvent(document, "touchmove", this.touchmoveHandler);
konami.addEvent(document, "touchend", this.touchendHandler, false);
konami.addEvent(document, "touchstart", this.touchstartHandler);
},
unload: function () {
konami.removeEvent(document, "touchmove", this.touchmoveHandler);
konami.removeEvent(document, "touchend", this.touchendHandler);
konami.removeEvent(document, "touchstart", this.touchstartHandler);
},
check_direction: function () {
var x_magnitude = Math.abs(this.start_x - this.stop_x);
var y_magnitude = Math.abs(this.start_y - this.stop_y);
var x = this.start_x - this.stop_x < 0 ? "RIGHT" : "LEFT";
var y = this.start_y - this.stop_y < 0 ? "DOWN" : "UP";
var result =
this.tap === true ? "TAP" : x_magnitude > y_magnitude ? x : y;
return result;
},
},
};
typeof callback === "string" && konami.load(callback);
if (typeof callback === "function") {
konami.code = callback;
konami.load();
}
return konami;
};
if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
module.exports = Konami;
} else {
if (typeof define === "function" && define.amd) {
define([], function () {
return Konami;
});
} else {
window.Konami = Konami;
}
}

File diff suppressed because one or more lines are too long