mirror of
https://github.com/open-goal/jak-project.git
synced 2026-11-07 09:26:09 -10:00
Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e307c8a9e | ||
|
|
3a67f40098 | ||
|
|
cbfa65c78a | ||
|
|
681c419f17 | ||
|
|
a4e108cca6 | ||
|
|
f1ee25c640 | ||
|
|
af6de539b5 | ||
|
|
c72a086e49 | ||
|
|
a66d832b2f | ||
|
|
d29ab77892 | ||
|
|
e975eab15a | ||
|
|
441952186c | ||
|
|
495a8bc26f | ||
|
|
c2cccc48cd | ||
|
|
c5effb2395 | ||
|
|
5f3671b8a3 | ||
|
|
26bfac8555 |
No files matched your search
@@ -54,12 +54,8 @@ void append_body_to_function_definition(goos::Object* top_form,
|
||||
body_elements.insert(body_elements.end(), inline_body.begin(), inline_body.end());
|
||||
// If the first element in the body is a docstring, add it first
|
||||
if (body_elements.size() > 0 && body_elements.at(0).is_string()) {
|
||||
if (version > GameVersion::Jak2) {
|
||||
initial_top_level_forms.push_back(
|
||||
goos::StringObject::make_new(fix_docstring_indent(inline_body.at(0).as_string()->data)));
|
||||
} else {
|
||||
initial_top_level_forms.push_back(inline_body.at(0));
|
||||
}
|
||||
initial_top_level_forms.push_back(
|
||||
goos::StringObject::make_new(fix_docstring_indent(inline_body.at(0).as_string()->data)));
|
||||
body_elements.erase(body_elements.begin());
|
||||
}
|
||||
|
||||
|
||||
@@ -2515,6 +2515,7 @@
|
||||
(iop-mem 48)
|
||||
(cancel-dgo 49)
|
||||
(set-stereo-mode 50) ;; sound-rpc-set-stereo-mode
|
||||
(set-mirror 201)
|
||||
)
|
||||
|
||||
(defenum sound-group
|
||||
@@ -2829,6 +2830,17 @@
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
; added
|
||||
(defenum sound-mirror-mode
|
||||
:type uint8
|
||||
(normal)
|
||||
(mirrored)
|
||||
)
|
||||
|
||||
; added for mirror mode
|
||||
(deftype sound-rpc-set-mirror-mode (sound-rpc-cmd)
|
||||
((mirror sound-mirror-mode)))
|
||||
|
||||
(deftype sound-rpc-union (structure)
|
||||
((data uint32 20 :offset-assert 0)
|
||||
(load-bank sound-rpc-load-bank :offset 0)
|
||||
@@ -2852,6 +2864,7 @@
|
||||
(shutdown sound-rpc-shutdown :offset 0)
|
||||
(list-sounds sound-rpc-list-sounds :offset 0)
|
||||
(unload-music sound-rpc-unload-music :offset 0)
|
||||
(mirror-mode sound-rpc-set-mirror-mode :overlay-at (-> data 0))
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x50
|
||||
@@ -8774,6 +8787,7 @@ Unlike [[engine]], users can use [[engine-pers]] as a parent class."
|
||||
(progress-graphics-ps2-lod-dist #x1337)
|
||||
(progress-graphics-msaa-off #x1338)
|
||||
(progress-graphics-display #x1339)
|
||||
(language-name-finnish #x133a)
|
||||
)
|
||||
;; ---text-id-h:text-id
|
||||
|
||||
|
||||
@@ -2742,20 +2742,12 @@
|
||||
[27, "gp", "process-drawable"],
|
||||
[30, "gp", "process-drawable"]
|
||||
],
|
||||
"(method 23 weapon-trail)": [
|
||||
[[0, 100], "gp", "weapon-trail-crumb"]
|
||||
],
|
||||
"(method 23 weapon-trail)": [[[0, 100], "gp", "weapon-trail-crumb"]],
|
||||
"(method 22 weapon-trail)": [[32, "v0", "light-trail-breadcrumb"]],
|
||||
"(method 22 tread-trail)": [[19, "v0", "light-trail-breadcrumb"]],
|
||||
"(method 23 tread-trail)": [
|
||||
[[0, 100], "s5", "tread-trail-crumb"]
|
||||
],
|
||||
"(method 23 tire-trail)": [
|
||||
[[0, 74], "s5", "tire-trail-crumb"]
|
||||
],
|
||||
"(method 22 tire-trail)": [
|
||||
[[18, 24], "v1", "tire-trail-crumb"]
|
||||
],
|
||||
"(method 23 tread-trail)": [[[0, 100], "s5", "tread-trail-crumb"]],
|
||||
"(method 23 tire-trail)": [[[0, 74], "s5", "tire-trail-crumb"]],
|
||||
"(method 22 tire-trail)": [[[18, 24], "v1", "tire-trail-crumb"]],
|
||||
"(trans idle fma-sphere)": [[39, "a2", "process-drawable"]],
|
||||
"part-water-splash-callback": [[3, "v1", "float"]],
|
||||
"(method 15 water-control)": [[48, "v1", "float"]],
|
||||
|
||||
@@ -54,4 +54,11 @@
|
||||
:lines "game/assets/jak2/subtitle/subtitle_lines_en-GB.json"
|
||||
:meta "game/assets/jak2/subtitle/subtitle_meta_en-GB.json"
|
||||
:lines-base "game/assets/jak2/subtitle/subtitle_lines_en-US.json"
|
||||
:meta-base "game/assets/jak2/subtitle/subtitle_meta_en-US.json")
|
||||
(file-json
|
||||
:language-id 9
|
||||
:text-version "jak2"
|
||||
:lines "game/assets/jak2/subtitle/subtitle_lines_fi-FI.json"
|
||||
:meta "game/assets/jak2/subtitle/subtitle_meta_fi-FI.json"
|
||||
:lines-base "game/assets/jak2/subtitle/subtitle_lines_en-US.json"
|
||||
:meta-base "game/assets/jak2/subtitle/subtitle_meta_en-US.json"))
|
||||
@@ -21,7 +21,8 @@
|
||||
(file-json 7 jak2 "common" '("game/assets/jak2/text/game_custom_text_en-GB.json"))
|
||||
;; custom languages
|
||||
(file-json 8 jak2 "common" '("game/assets/jak2/text/game_custom_text_pt-PT.json"))
|
||||
(file-json 9 jak2 "common" '("game/assets/jak2/text/game_custom_text_fi-FI.json"))
|
||||
(file-json 9 jak2 "common" '("game/assets/jak2/text/game_custom_text_fi-FI.json"
|
||||
"game/assets/jak2/text/game_base_text_fi-FI.json"))
|
||||
(file-json 10 jak2 "common" '("game/assets/jak2/text/game_custom_text_sv-SE.json"))
|
||||
(file-json 11 jak2 "common" '("game/assets/jak2/text/game_custom_text_da-DK.json"))
|
||||
(file-json 12 jak2 "common" '("game/assets/jak2/text/game_custom_text_no-NO.json"))
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"1a3": "138",
|
||||
"1b5": "161",
|
||||
"133a": "1113",
|
||||
"1200": "1031",
|
||||
"1201": "1032",
|
||||
"1202": "1034",
|
||||
|
||||
@@ -0,0 +1,531 @@
|
||||
{
|
||||
"0100": "Lopeta",
|
||||
"0101": "Tauko~",
|
||||
"0102": "Tekstityksen kieli",
|
||||
"0103": "Ääniformaatti",
|
||||
"0104": "Mono",
|
||||
"0105": "Stereo",
|
||||
"0106": "Surround",
|
||||
"0107": "Äänitehosteet",
|
||||
"0108": "Musiikki",
|
||||
"0109": "Puhe",
|
||||
"010a": "Kieli",
|
||||
"010b": "Värinätoiminto",
|
||||
"010c": "Vinkit",
|
||||
"010d": "Keskitä ruutu",
|
||||
"010e": "Päällä",
|
||||
"010f": "Pois",
|
||||
"0110": "Käytä suuntanäppäimiä",
|
||||
"0111": "<FLAG_USA> English",
|
||||
"0112": "<FLAG_FRANCE> Fran,cais",
|
||||
"0113": "<FLAG_GERMAN> Deutsch",
|
||||
"0114": "<FLAG_SPAIN> Español",
|
||||
"0115": "<FLAG_ITALIAN> Italiano",
|
||||
"0116": "<FLAG_KOREA> ~Y~Z<K32e>~Z<K31a>~Z<K3c8>~Y~Z<K35e>~Z<K36b>~Z<K3de>~Y~Z<K30f>~Z<K31d>",
|
||||
"0117": "<FLAG_JAPAN> にほんご",
|
||||
"0118": "Kuvasuhde",
|
||||
"0119": "Progressiivinen skannaus",
|
||||
"011a": "Videotila",
|
||||
"011b": "Peliasetukset",
|
||||
"011c": "Grafiikan asetukset",
|
||||
"011d": "Ääniasetukset",
|
||||
"011e": "4x3",
|
||||
"011f": "16x9",
|
||||
"0120": "60Hz",
|
||||
"0121": "50Hz",
|
||||
"0122": "Jak II",
|
||||
"0123": "Poistu demosta",
|
||||
"0124": "Kyllä",
|
||||
"0125": "Ei",
|
||||
"0126": "Takaisin",
|
||||
"0127": "OK",
|
||||
"0128": "Seuraava",
|
||||
"0129": "Edellinen",
|
||||
"012a": "Jatka tallentamatta",
|
||||
"012b": "Valitse tallennuspaikka",
|
||||
"012c": "Valitse ladattava tallennus",
|
||||
"012d": "Lataa peli",
|
||||
"012e": "Tallenna peli",
|
||||
"012f": "Tyhjä",
|
||||
"0130": "Asetukset",
|
||||
"0131": "Uusi peli",
|
||||
"0132": "Paina START-näppäintä",
|
||||
"0133": "Lopeta peli",
|
||||
"0134": "Kartta",
|
||||
"0135": "Valitse aloitus",
|
||||
"0136": "Ennätykset",
|
||||
"0137": "1. sija",
|
||||
"0138": "2. sija",
|
||||
"0139": "3. sija",
|
||||
"013a": "4. sija",
|
||||
"013b": "5. sija",
|
||||
"013c": "6. sija",
|
||||
"013d": "7. sija",
|
||||
"013e": "8. sija",
|
||||
"013f": "NYFE-leijuri",
|
||||
"0140": "Luokka 1",
|
||||
"0141": "Luokka 2",
|
||||
"0142": "Luokka 3",
|
||||
"0143": "Harjoitusrata",
|
||||
"0144": "Haulikko",
|
||||
"0145": "Läjäytin",
|
||||
"0146": "Vulkanus-piippu",
|
||||
"0147": "Rauhantekijä",
|
||||
"0148": "Oninin haaste",
|
||||
"0149": "Metallipää-mäiskintä",
|
||||
"014a": "JET-lauta-haaste",
|
||||
"014b": "Oninin teltta",
|
||||
"014c": "Sikahevon saluuna",
|
||||
"014d": "Stadion",
|
||||
"014e": "Luokka 1 - käänteinen",
|
||||
"014f": "Luokka 2 - käänteinen",
|
||||
"0150": "Luokka 3 - käänteinen",
|
||||
"0151": "Sataman kisa",
|
||||
"0152": "Kaupungin kisa",
|
||||
"0153": "Salaisuudet",
|
||||
"0154": "Avattu",
|
||||
"0155": "Poista Jakin pukinparta",
|
||||
"0156": "Käänteinen maailma",
|
||||
"0157": "Loputtomat ammukset",
|
||||
"0158": "Haavoittumattomuus",
|
||||
"0159": "Sankaritila",
|
||||
"015a": "Välinäytösten 1. näytös",
|
||||
"015b": "Välinäytösten 2. näytös",
|
||||
"015c": "Välinäytösten 3. näytös",
|
||||
"015d": "Leikekirja",
|
||||
"015e": "Mega-leikekirja",
|
||||
"015f": "Leikekirja 3",
|
||||
"0160": "Tehtävän valinta",
|
||||
"0161": "Loputon Raivo-Jak",
|
||||
"0162": "Vulkanus-tykin harjoitusrata",
|
||||
"0163": "Rauhantekijän harjoitusrata",
|
||||
"0164": "Käänteiset kisat",
|
||||
"0165": "Isopäinen Jak",
|
||||
"0166": "Pienipäinen Jak",
|
||||
"0167": "Saatavilla",
|
||||
"0168": "Kerätty",
|
||||
"0169": "Tehtävät",
|
||||
"016a": "Valitse esialoitus",
|
||||
"016b": "Valitse kioski-aloitus",
|
||||
"016c": "Valitse kohtaus",
|
||||
"016d": "Tekstitys",
|
||||
"016e": "Aloita uudelleen",
|
||||
"016f": "<ICON_MISSION_TODO>",
|
||||
"0170": "<ICON_MISSION_COMPLETE>",
|
||||
"0171": "Ei mitään",
|
||||
"0172": "Peli",
|
||||
"0173": "Aloita/lopeta",
|
||||
"0174": "Osta",
|
||||
"0175": "Voitto",
|
||||
"0176": "Häviö",
|
||||
"0177": "Kokonaisaika",
|
||||
"0178": "Kierros ",
|
||||
"0179": "Palauta painamalla <PAD_SQUARE>",
|
||||
"017a": "Kiireinen",
|
||||
"017b": "Jatka painamalla <PAD_X>",
|
||||
"017c": "____~%Suoritetut tehtävät",
|
||||
"017d": "Suorittamattomat tehtävät",
|
||||
"017e": "Yritä uudelleen?",
|
||||
"017f": "Salaisuus saatavilla päävalikosta",
|
||||
"0180": "<PAD_X> = Kyllä, <PAD_TRIANGLE> = Ei",
|
||||
"0181": "Paina <PAD_TRIANGLE> puhuaksesi.",
|
||||
"0182": "Paina <PAD_TRIANGLE> käyttääksesi.",
|
||||
"0183": "Paina <PAD_TRIANGLE> matkustaaksesi.",
|
||||
"0184": "Valitse taso suuntanäppäimellä",
|
||||
"0185": "Paina <PAD_TRIANGLE> poistuaksesi.",
|
||||
"0186": "Paina <PAD_TRIANGLE> pelataksesi.",
|
||||
"0187": "Halutako pelata uudelleen?",
|
||||
"0188": "Tehtävä suoritettu",
|
||||
"0189": "Tehtävä epäonnistui",
|
||||
"018a": "Yritä uudelleen?",
|
||||
"018b": "Ruutu ottaa nyt käyttöön 60Hz-tilan",
|
||||
"018c": "Ruutu ottaa nyt käyttöön progressiivisen skannauksen",
|
||||
"018d": "Jos kuva näkyy virheellisenä, televisiosi ei tue tätä tilaa",
|
||||
"018e": "Jos niin käy, odota 10 sekuntia, niin ruutu palautuu takaisin",
|
||||
"018f": "Ruutu on nyt 60Hz-tilassa",
|
||||
"0190": "Ruutu on nyt Progresiivinen skannaus -tilassa",
|
||||
"0191": "Haluatko pitää tämän tilan käytössä?",
|
||||
"0192": "Levy poistettiin",
|
||||
"0193": "Syötä Jak II -levy sisään, jotta voit jatkaa pelaamista",
|
||||
"0194": "Virhe tietojen lukemisessa",
|
||||
"0195": "Tarkista Jak II -levysi ja yritä uudelleen",
|
||||
"0196": "Haluatko varmasti lopettaa?",
|
||||
"0197": "Haluatko aloittaa pelin?",
|
||||
"0198": "Ei tarpeeksi tilaa muistikortilla Memory__Card__(PS2) paikassa Memory__Card__Slot__~D",
|
||||
"0199": "Ei Memory__Card__(PS2) liitettynä paikassa Memory__Card__slot__~D",
|
||||
"019a": "Memory__Card__(PS2) paikassa Memory__Card__slot__~D on alustamaton",
|
||||
"019b": "Jak II vaatii ~D Kt vapaata tilaa",
|
||||
"019c": "Syötä Jak II -pelitietoja sisältävä Memory__Card__(PS2) paikkaan Memory__Card__slot__~D",
|
||||
"019d": "Syötä Memory__Card__(PS2) jossa on tarpeeksi tilaa, muuten pelitietojasi ei voida tallentaa",
|
||||
"019e": "Ilman alustamista pelitietoja ei voida tallentaa",
|
||||
"019f": "Tallennetaan tietoja",
|
||||
"01a0": "Ladataan tietoja",
|
||||
"01a1": "Alustetaan",
|
||||
"01a2": "Luodaan tallennustiedostoa",
|
||||
"01a3": "Älä poista Memory__Card__(PS2) paikassa Memory__Card__slot__~D tai sammuta laitettasi",
|
||||
"01a4": "Jak II -tallennus on jo olemassa valitsemassasi tiedostossa",
|
||||
"01a5": "Haluatko korvata tämän?",
|
||||
"01a6": "Alusta?",
|
||||
"01a7": "Jatka?",
|
||||
"01a8": "Takaisin?",
|
||||
"01a9": "Virhe ladattaessa",
|
||||
"01aa": "virhe tallentaessa",
|
||||
"01ab": "Virhe alustaessa",
|
||||
"01ac": "Virhe luodessa tallennustiedostoa",
|
||||
"01ad": "Tarkista Memory__Card__(PS2) paikassa Memory__Card__slot__~D",
|
||||
"01ae": "Tarkista Memory__Card__(PS2) paikassa Memory__Card__slot__~D ja yritä uudelleen",
|
||||
"01af": "Memory__Card__(PS2) paikasta Memory__Card__slot__~D poistettiin",
|
||||
"01b0": "Automaattinen tallennus on poistettu käytöstä",
|
||||
"01b1": "Tallenna pelisi manuaalisesti, niin automaattinen tallennus palautetaan käyttöön",
|
||||
"01b2": "Jak II -tallennustietoja ei löytynyt kortilta Memory__Card__(PS2) paikassa Memory__Card__slot__~D",
|
||||
"01b3": "Haluatko luoda uuden Jak II -tallennuksen?",
|
||||
"01b4": "Kun oheinen kuvake ilmestyy, edistykesi tallennetaan",
|
||||
"01b5": "Kun tämä kuvake on ruudulla, älä irrota Memory__Card__(PS2) tai sammuta laitettasi",
|
||||
"01b6": "Pakene <COLOR_WHITE>linnoituksesta",
|
||||
"01b7": "Suojele Koria ja lasta",
|
||||
"01b8": "Nouda lippu <COLOR_WHITE>aavekaupungista",
|
||||
"01b9": "Etsi <COLOR_WHITE>pumppaamon<COLOR_PROGRESS> venttiili",
|
||||
"01ba": "Räjäytä ammukset <COLOR_WHITE>linnoituksessa",
|
||||
"01bb": "Kuljeta toimitus <COLOR_WHITE>Sikahevon saluunaan",
|
||||
"01bc": "Läpäise haulikon <COLOR_WHITE>harjoitusrata",
|
||||
"01bd": "Suojele Sigiä <COLOR_WHITE>pumppaamolla",
|
||||
"01be": "Tuhoa tykit <COLOR_WHITE>viemärissä",
|
||||
"01bf": "Etsi <COLOR_WHITE>läjäytin<COLOR_PROGRESS>-modi",
|
||||
"01c0": "Pelasta Vin <COLOR_WHITE>avolouhoksella",
|
||||
"01c1": "Voita aika <COLOR_WHITE>kisatalliin",
|
||||
"01c2": "Läpäise läjäyttimen <COLOR_WHITE>harjoitusrata",
|
||||
"01c3": "Tuhoa munat <COLOR_WHITE>poralautalla",
|
||||
"01c4": "Etsi <COLOR_WHITE>pumppaamon<COLOR_PROGRESS> partio",
|
||||
"01c5": "Nouda rahat Krewille",
|
||||
"01c6": "Voita JET-lauta-haaste <COLOR_WHITE>stadionilla",
|
||||
"01c7": "Etsi Linssi <COLOR_WHITE>vuoristotemppelissä",
|
||||
"01c8": "Etsi Siru <COLOR_WHITE>vuoristotemppelissä",
|
||||
"01c9": "Etsi Ratas <COLOR_WHITE>vuoristotemppelissä",
|
||||
"01ca": "Käynnistä 5 virtakytkintä",
|
||||
"01cb": "Nouse hissillä <COLOR_WHITE>palatsiin",
|
||||
"01cc": "Päihitä paroni <COLOR_WHITE>palatsissa",
|
||||
"01cd": "Kuljeta Vastarinnan jäsenet",
|
||||
"01ce": "Suojele paikkaa <COLOR_WHITE>aavekaupungissa",
|
||||
"01cf": "Nappaa tarkkailijat <COLOR_WHITE>Havenin metsässä",
|
||||
"01d0": "Saata lapsi <COLOR_WHITE>voimalaan",
|
||||
"01d1": "Pelasta vaanijoita Brutterille",
|
||||
"01d2": "Tuhoa lasti <COLOR_WHITE>satamalla",
|
||||
"01d3": "Pysäytä tankkeri",
|
||||
"01d4": "Tuhoa välineistö <COLOR_WHITE>kaivannolla",
|
||||
"01d5": "Räjäytä ecokaivot <COLOR_WHITE>avolouhoksella",
|
||||
"01d6": "Tyhjennä <COLOR_WHITE>viemäri<COLOR_PROGRESS> löytääksesi patsaan",
|
||||
"01d7": "Tuhoa alus <COLOR_WHITE>poralautalla",
|
||||
"01d8": "Pelasta vaanijat <COLOR_WHITE>kaivannolla",
|
||||
"01d9": "Tapa Metallipäät <COLOR_WHITE>Havenin metsässä",
|
||||
"01da": "Voita luokan 3 kisa <COLOR_WHITE>stadionilla",
|
||||
"01db": "Nouda sinetin pala <COLOR_WHITE>kaivannolla",
|
||||
"01dc": "Nouda sinetin pala <COLOR_WHITE>vesislummeilla",
|
||||
"01dd": "Tuhoa 5 Villikissa-leijuria",
|
||||
"01de": "Voita Oninin haaste",
|
||||
"01df": "Käytä esineitä <COLOR_WHITE>Ei-kenenkään-kanjonissa",
|
||||
"01e0": "Kohtaa testit <COLOR_WHITE>Marin haudassa",
|
||||
"01e1": "Avaa holvin ovi <COLOR_WHITE>Marin haudassa",
|
||||
"01e2": "Läpäise ensimmäinen <COLOR_WHITE>miehuuden testi",
|
||||
"01e3": "Läpäise toinen <COLOR_WHITE>miehuuden testi",
|
||||
"01e4": "Päihitä paroni <COLOR_WHITE>Marin haudassa",
|
||||
"01e5": "Pelasta ystävät <COLOR_WHITE>linnoituksesta",
|
||||
"01e6": "Saata miehet <COLOR_WHITE>viemärien<COLOR_PROGRESS> läpi",
|
||||
"01e7": "Etsi <COLOR_WHITE>Rauhantekijä",
|
||||
"01e8": "Voita luokan 2 kisa <COLOR_WHITE>stadionilla",
|
||||
"01e9": "Suojele piilopaikkaa pommiboteilta",
|
||||
"01ea": "Tutki <COLOR_WHITE>rakennustyömaa",
|
||||
"01eb": "Kiipeä <COLOR_WHITE>rakennustyömaata",
|
||||
"01ec": "Voita Erol kisahaasteessa",
|
||||
"01ed": "Tuhoa munat <COLOR_WHITE>avolouhoksella",
|
||||
"01ee": "Nouda Elämän siemen <COLOR_WHITE>aavekaupungissa",
|
||||
"01ef": "Vie Elämän siemen <COLOR_WHITE>Havenin metsään",
|
||||
"01f0": "Suojele Samosia <COLOR_WHITE>Havenin metsässä",
|
||||
"01f1": "Tuhoa <COLOR_WHITE>poralautan<COLOR_PROGRESS> torni",
|
||||
"01f2": "Voita luokan 1 kisa <COLOR_WHITE>stadionilla",
|
||||
"01f3": "Tutki <COLOR_WHITE>palatsia",
|
||||
"01f4": "Hanki Marin sydän <COLOR_WHITE>asetehtaalla",
|
||||
"01f5": "Päihitä Krew <COLOR_WHITE>asetehtaalla",
|
||||
"01f6": "Voita peli <COLOR_WHITE>Sikahevon saluunassa",
|
||||
"01f7": "Etsi Sig <COLOR_WHITE>satamanpohjalla",
|
||||
"01f8": "Saata Sig <COLOR_WHITE>satamanpohjan<COLOR_PROGRESS> läpi",
|
||||
"01f9": "Puolusta <COLOR_WHITE>stadionia",
|
||||
"01fa": "Puolusta vaanijapalloa",
|
||||
"01fb": "Tuhoa tunnelit <COLOR_WHITE>satamanpohjalla",
|
||||
"01fc": "Taistele tiesi <COLOR_WHITE>pesän muurille",
|
||||
"01fd": "Löydä Paroni <COLOR_WHITE>rakennustyömaalla",
|
||||
"01fe": "Tuhoa <COLOR_WHITE>pesän muuri",
|
||||
"01ff": "Tuhoa Metalli-Kor <COLOR_WHITE>pesällä",
|
||||
"0200": "Puhu <COLOR_WHITE>Korille",
|
||||
"0201": "Puhu <COLOR_WHITE>Tornille",
|
||||
"0202": "Puhu <COLOR_WHITE>Krewille",
|
||||
"0203": "Puhu <COLOR_WHITE>Oninille",
|
||||
"0204": "Puhu <COLOR_WHITE>Vinille",
|
||||
"0205": "Puhu <COLOR_WHITE>Varjolle",
|
||||
"0206": "Puhu <COLOR_WHITE>Sigille",
|
||||
"0207": "Puhu <COLOR_WHITE>Mekaanikolle",
|
||||
"0208": "Puhu <COLOR_WHITE>Keiralle",
|
||||
"0209": "Puhu <COLOR_WHITE>Brutterille",
|
||||
"020a": "Tarkista <COLOR_WHITE>basaari",
|
||||
"020b": "Tarkista <COLOR_WHITE>vesislummit",
|
||||
"020c": "Mene <COLOR_WHITE>Ei-kenenkään-kanjonille",
|
||||
"020d": "Mene <COLOR_WHITE>Marin hautaan",
|
||||
"020e": "Voita <COLOR_WHITE>Metallipää-mäiskintä",
|
||||
"020f": "Puolusta <COLOR_WHITE>sataman muuria",
|
||||
"0210": "Tarkista <COLOR_WHITE>rakennustyömaa",
|
||||
"0211": "Hyökkää <COLOR_WHITE>Metallipäiden pesään",
|
||||
"0212": "Käy <COLOR_WHITE>Oraakkelin<COLOR_PROGRESS> luona",
|
||||
"0213": "Haven City",
|
||||
"0214": "Linnoitus",
|
||||
"0215": "Laskeutumisalusta",
|
||||
"0216": "Palatsin katto",
|
||||
"0217": "Palatsi",
|
||||
"0218": "Asetehdas",
|
||||
"0219": "Aavekaupunki",
|
||||
"021a": "Pumppaamo",
|
||||
"021b": "Viemäri",
|
||||
"021c": "Avolouhos",
|
||||
"021d": "Vuoristotemppeli",
|
||||
"021e": "Havenin metsä",
|
||||
"021f": "Poralautta",
|
||||
"0220": "Marin hauta",
|
||||
"0221": "Kaivanto",
|
||||
"0222": "Satamanpohja",
|
||||
"0223": "Pesä",
|
||||
"0224": "Hyppää painamalla <PAD_X>",
|
||||
"0225": "Kieri painamalla <PAD_L1> liikkeessä",
|
||||
"0226": "Paina <PAD_X> ja sitten <PAD_X> uudelleen ilmassa",
|
||||
"0227": "Hyökkää painamalla <PAD_SQUARE> tai <PAD_CIRCLE>",
|
||||
"0228": "Kieri ja paina sitten <PAD_X> syöksyhyppyyn",
|
||||
"0229": "Hyppää ja paina <PAD_SQUARE> ilmassa",
|
||||
"022a": "Paina <PAD_L1> ja sitten <PAD_X> korkeaan hyppyyn",
|
||||
"022b": "Ammu painamalla <PAD_R1>",
|
||||
"022c": "<PAD_DPAD_UP> laittaa aseen pois",
|
||||
"022d": "<PAD_DPAD_UP> tai <PAD_R1> tuo aseen esiin",
|
||||
"022e": "Pelaa haulikon harjoitusrata painamalla <PAD_X>",
|
||||
"022f": "<PAD_X> = Haulikon harjoitus~%<PAD_SQUARE> = Vulkanus-tykin harjoitus",
|
||||
"0230": "Vaihda asetta painamalla <PAD_DPAD_DOWN>",
|
||||
"0231": "Pelaa läjäyttimen harjoitusrata painamalla <PAD_X>",
|
||||
"0232": "<PAD_X> = Läjäyttimen harjoitus~%<PAD_SQUARE> = Rauhantekijän harjoitus",
|
||||
"0233": "Potkaise kohdetta ja paina <PAD_R1> tehdäksesi pikatulisarjan",
|
||||
"0234": "Ammu laatikoita",
|
||||
"0235": "Tavoite",
|
||||
"0236": "Kulta",
|
||||
"0237": "Hopea",
|
||||
"0238": "Pronssi",
|
||||
"0239": "Käytä lautaa painamalla <PAD_R2>",
|
||||
"023a": "Hyppy: Paina <PAD_X>",
|
||||
"023b": "Kyykkyhyppy: Paina <PAD_L1> ja sitten <PAD_X>",
|
||||
"023c": "Voimahyppy: Paina <PAD_X> hieman laskeuduttuasi hypystä",
|
||||
"023d": "Kaideliuku: Paina <PAD_SQUARE> ja <PAD_ANALOG_ANY>",
|
||||
"023e": "Pyörähdys: Paina <PAD_X> ja sitten <PAD_R1> ja <PAD_ANALOG_LEFT_RIGHT>",
|
||||
"023f": "Voltti: Paina <PAD_X> ja sitten <PAD_R1> ja <PAD_ANALOG_UP_DOWN>",
|
||||
"0240": "Temppu: Paina <PAD_X> ja sitten <PAD_L1> ja <PAD_ANALOG_ANY>",
|
||||
"0241": "Saat paljon pisteitä, jos liu'ut ja teet tempun liukuaksesi uudestaan",
|
||||
"0242": "Aloita haaste aktivoimalla tuomari",
|
||||
"0243": "Yritä uudelleen!",
|
||||
"0244": "Palaa talliin",
|
||||
"0245": "Tehtävä suoritettu: Palaa Krewin luo",
|
||||
"0246": "Vaihda leijuvyöhykettä painamalla <PAD_R2>",
|
||||
"0247": "Sukella painamalla <PAD_CIRCLE> pohjassa uidessasi",
|
||||
"0248": "<PAD_CIRCLE> = Turbo~%<PAD_R1> tai <PAD_L1> = Hyppy",
|
||||
"0249": "Iske Titaaniasulla painamalla <PAD_SQUARE>",
|
||||
"024a": "Tartu Titaaniasulla lohkareisiin painamalla <PAD_R1>",
|
||||
"024b": "Heitä nostetut esineet painamalla <PAD_SQUARE>",
|
||||
"024c": "Paina <PAD_X> rampin yläpäässä",
|
||||
"024d": "Liu'u kaidetta JET-laudalla painamalla <PAD_SQUARE> tai <PAD_CIRCLE>",
|
||||
"024e": "Käytä <PAD_DPAD_ANY> ja <PAD_X> <PAD_CIRCLE> <PAD_SQUARE> <PAD_TRIANGLE>",
|
||||
"024f": "Pumppaamo",
|
||||
"0250": "Avolouhos",
|
||||
"0251": "Katso traileri",
|
||||
"0252": "<PAD_R2> mennäksesi laudan päälle tai pois",
|
||||
"0253": "Käytä pimeää voimaa painamalla <PAD_L2>",
|
||||
"0254": "Sony Computer Entertainment America~%presents",
|
||||
"0255": "Sony Computer Entertainment Europe~%presents",
|
||||
"0256": "Sony Computer Entertainment Korea~%presents",
|
||||
"0257": "Sony Computer Entertainment Inc.~%presents",
|
||||
"0258": "A game by",
|
||||
"0259": "Jak II",
|
||||
"025a": "Kaksi vuotta myöhemmin...",
|
||||
"025b": "Viikko myöhemmin...",
|
||||
"025c": "Asepäivitys hankittu",
|
||||
"025d": "Haulikko hankittu",
|
||||
"025e": "Läjäytin-modi mankittu",
|
||||
"025f": "Vulkanus-piippu hankittu",
|
||||
"0260": "Rauhantekijä hankittu",
|
||||
"0261": "Haulikon tulinopeus päivitetty",
|
||||
"0262": "Aseiden ammuskapasiteetti päivitetty",
|
||||
"0263": "Aseiden vahinkoa päivitetty",
|
||||
"0264": "Tehtävä suoritettu",
|
||||
"0265": "Punainen turvapassi hankittu",
|
||||
"0266": "Vihreä turvapassi hankittu",
|
||||
"0267": "Keltainen turvapassi hankittu",
|
||||
"0268": "Palatsin turvapassi hankittu",
|
||||
"0269": "Musta turvapassi hankittu",
|
||||
"026a": "Linssi hankittu",
|
||||
"026b": "Ratas hankittu",
|
||||
"026c": "Siru hankittu",
|
||||
"026d": "Tuo 25 metallipäiden kallohelmeä",
|
||||
"026e": "Tuo 200 metallipäiden kallohelmeä",
|
||||
"026f": "Tuo 25 metallipäiden kallohelmeä",
|
||||
"0270": "Tuo 200 metallipäiden kallohelmeä",
|
||||
"0271": "Tuo 200 metallipäiden kallohelmeä",
|
||||
"0272": "Tuo 100 metallipäiden kallohelmeä",
|
||||
"0273": "Raivopommi: Paina <PAD_X> ja sitten <PAD_SQUARE>",
|
||||
"0274": "Raivopurkaus: Paina <PAD_SQUARE> ja sitten <PAD_X>",
|
||||
"0275": "Raivo-Jak on nyt haavoittumaton!",
|
||||
"0276": "Raivojätti: Paina <PAD_L2> raivotilassa",
|
||||
"0277": "Ohi",
|
||||
"0278": "Valitse tapahtuma",
|
||||
"0279": "Skeittipuisto",
|
||||
"027a": "Luokan 3 kisa",
|
||||
"027b": "Luokan 2 kisa",
|
||||
"027c": "Luokan 1 kisa",
|
||||
"027d": "Käänteinen luokan 3 kisa",
|
||||
"027e": "Käänteinen luokan 2 kisa",
|
||||
"027f": "Käänteinen luokan 1 kisa",
|
||||
"0280": "Daxter saa suupalan",
|
||||
"0281": "Tavataan Torn",
|
||||
"0282": "Noutamassa lippua",
|
||||
"0283": "Suojele pyhää paikkaa",
|
||||
"0284": "Meidän maailmamme!",
|
||||
"0285": "Vanhoja muistoja",
|
||||
"0286": "Vin tarvitsee apua",
|
||||
"0287": "Tavataan Vin",
|
||||
"0288": "Hyviä ja huonoja uutisia",
|
||||
"0289": "Suuri murskaus",
|
||||
"028a": "Meillä on yhä ongelmia",
|
||||
"028b": "Kaivot posahtavat!",
|
||||
"028c": "Tavataan Kor ja lapsi",
|
||||
"028d": "Vastarinta",
|
||||
"028e": "Villikissa-tehtävä",
|
||||
"028f": "Tornin toimitus",
|
||||
"0290": "Tavataan Krew ja Sig",
|
||||
"0291": "Yllätyshyökkäys!",
|
||||
"0292": "Ashelin on huolissaan",
|
||||
"0293": "Vin, kamu. Tarvitsemme palveluksen.",
|
||||
"0294": "Kuka on verhojen takana?",
|
||||
"0295": "Tiedonjyvä",
|
||||
"0296": "Iloinen jälleennäkeminen",
|
||||
"0297": "Kissatappelu",
|
||||
"0298": "Jak poistuu paikalta",
|
||||
"0299": "Daxterin suuri voitto",
|
||||
"029a": "Keira paljastaa suunnitelmansa",
|
||||
"029b": "Suuri kilpailu",
|
||||
"029c": "Voittajan piiri",
|
||||
"029d": "Tavataan Oraakkeli",
|
||||
"029e": "Jak saa pimeän voiman",
|
||||
"029f": "Jak saa toisen pimeän voiman",
|
||||
"02a0": "Jak saa kolmannen pimeän voiman",
|
||||
"02a1": "Jak saa neljännen pimeän voiman",
|
||||
"02a2": "Valitus, naiset, ja laulu",
|
||||
"02a3": "Rahankerääjät",
|
||||
"02a4": "Mikä tämän lapsen tarina on?",
|
||||
"02a5": "Krewilla on uusi keikka",
|
||||
"02a6": "Tavataan Brutter",
|
||||
"02a7": "Krewin kilpailusopimus",
|
||||
"02a8": "Mitä te kaksi oikein teitte?",
|
||||
"02a9": "Oninin haaste",
|
||||
"02aa": "Marin sinetti on valmis",
|
||||
"02ab": "Pelasta lisää vaanijoita",
|
||||
"02ac": "Suojele piilopaikkaa",
|
||||
"02ad": "Krew uhkailee",
|
||||
"02ae": "Pelaaja astelee esiin",
|
||||
"02af": "Saadaan aikakartta",
|
||||
"02b0": "Brutter pelastaa päivän",
|
||||
"02b1": "Leijutaan pois",
|
||||
"02b2": "Saadaan keltainen ase",
|
||||
"02b3": "Saadaan JET-lauta",
|
||||
"02b4": "Jak laittaa JET-laudan pois",
|
||||
"02b5": "Ihka oma Rauhantekijämme!",
|
||||
"02b6": "Ulosmeno",
|
||||
"02b7": "Jak matkaa pesään",
|
||||
"02b8": "Paluu",
|
||||
"02b9": "Ashelin kuljettaa Jakin",
|
||||
"02ba": "Pala sinettiä",
|
||||
"02bb": "Erol inhoaa häviötä",
|
||||
"02bc": "Torn ja ammusvarasto",
|
||||
"02bd": "Metallipäitä kaupungissa?",
|
||||
"02be": "Nyt räjähtää!",
|
||||
"02bf": "Torn myöntää petoksensa",
|
||||
"02c0": "Aikakaksoset",
|
||||
"02c1": "Krewin viemärikeikka",
|
||||
"02c2": "Mikä on tuo löyhkä?",
|
||||
"02c3": "Taiteenkeräilijä",
|
||||
"02c4": "Että kaipaankin housuja!",
|
||||
"02c5": "Sig paljastaa sielunsa",
|
||||
"02c6": "Patsaanposauttelua",
|
||||
"02c7": "Se on ansa!",
|
||||
"02c8": "Daxter saa suupalan",
|
||||
"02c9": "Daxter matkustaa putkea",
|
||||
"02ca": "Työtarjous",
|
||||
"02cb": "Torn tarjoaa tehtävän",
|
||||
"02cc": "Tavataan Ashelin",
|
||||
"02cd": "Daxter tekee siirtonsa",
|
||||
"02ce": "Tästä tulee hauskaa!",
|
||||
"02cf": "Boom, beibi!",
|
||||
"02d0": "Peukut alas",
|
||||
"02d1": "Heihei",
|
||||
"02d2": "Temppu",
|
||||
"02d3": "Hyvää yötä",
|
||||
"02d4": "Toimit hienosti, tulokas",
|
||||
"02d5": "Vin tahtoo munakokkelia",
|
||||
"02d6": "Kor on huolissaan",
|
||||
"02d7": "Poika on kadoksissa",
|
||||
"02d8": "Ohjaustorni räjähtää",
|
||||
"02d9": "Tavataan Onin ja Pecker",
|
||||
"02da": "Vekotin romahtaa",
|
||||
"02db": "Hyvät fiilikset",
|
||||
"02dc": "Daxter kärventyy",
|
||||
"02dd": "Salatapaaminen",
|
||||
"02de": "Paroni kohtaa Jakin",
|
||||
"02df": "Minä tuhoan sinut!",
|
||||
"02e0": "Takaisin mistä aloitimme",
|
||||
"02e1": "Salaisuus pommin rakentamiseen",
|
||||
"02e2": "Krewin kaunotar",
|
||||
"02e3": "Oi voi...",
|
||||
"02e4": "Lentoon",
|
||||
"02e5": "Laskeutumisalusta",
|
||||
"02e6": "Jak löytää Marin haudan!",
|
||||
"02e7": "tomb-open-door-res",
|
||||
"02e8": "tomb-open-door-2-res",
|
||||
"02e9": "Haudan ovet",
|
||||
"02ea": "Ensimmäinen säde",
|
||||
"02eb": "Toinen säde",
|
||||
"02ec": "Ovet avautuvat",
|
||||
"02ed": "Edeltäjäkivi!",
|
||||
"02ee": "Paroni varastaa show'n",
|
||||
"02ef": "Daxter ojentaa auttavan kätensä",
|
||||
"02f0": "Daxterin karvainen takaa-ajo",
|
||||
"02f1": "Tavataan Varjo",
|
||||
"02f2": "Daxterin pöhkötarina",
|
||||
"02f3": "Pecker haastaa riitaa",
|
||||
"02f4": "Samos ja siemen",
|
||||
"02f5": "Näky",
|
||||
"02f6": "Kor ja lapsi",
|
||||
"02f7": "Pelasta lisää vaanijoita",
|
||||
"02f8": "Marin haudan legenda",
|
||||
"02f9": "Se on kirous, eikö vain?",
|
||||
"02fa": "Pora romahtaa",
|
||||
"02fb": "Valotorni nousee",
|
||||
"02fc": "Sinetti avaa portin",
|
||||
"02fd": "Sig on ongelmissa",
|
||||
"02fe": "Juokse!",
|
||||
"02ff": "Sigin vahva käsi",
|
||||
"0300": "Sieltä se taas tulee!",
|
||||
"0301": "Sigin viimeinen hetki",
|
||||
"0302": "Kivi... ase... pesä!",
|
||||
"0303": "Jak matkaa pesään",
|
||||
"0304": "Poistutaan pesästä",
|
||||
"0305": "Kor hyppää esiin",
|
||||
"0306": "Etkö tunnista häntä?",
|
||||
"0307": "Outo uusi maailma",
|
||||
"0308": "Juhlinta",
|
||||
"0309": "<ICON_MISSION_COMPLETE>",
|
||||
"030a": "<ICON_MISSION_TODO>",
|
||||
"030b": "<FLAG_UK> English",
|
||||
"030c": "Ota tekstitys käyttöön painamalla <PAD_SQUARE>",
|
||||
"030d": "Tekstitys käytössä",
|
||||
"030e": "Tekstitys ei käytössä",
|
||||
"030f": "JET-lauta",
|
||||
"0310": "Jatka"
|
||||
}
|
||||
@@ -232,5 +232,6 @@
|
||||
"1336": "Fast Progress Menu",
|
||||
"1337": "PS2 LOD Distance",
|
||||
"1338": "Off",
|
||||
"1339": "Display"
|
||||
"1339": "Display",
|
||||
"133a": "Suomi"
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
"1101": "Pelataan bonustehtävää",
|
||||
"1102": "Haulikon harjoitusrata",
|
||||
"1103": "Läjäyttimen harjoitusrata",
|
||||
"1104": "Vulkanusraivon harjoitusrata",
|
||||
"1104": "Vulkanus-tykin harjoitusrata",
|
||||
"1105": "Rauhantekijän harjoitusrata",
|
||||
"1106": "Oninin haaste",
|
||||
"1107": "Metallipää-mäiskintä",
|
||||
@@ -18,8 +18,8 @@
|
||||
"1206": "4x3 (PS2)",
|
||||
"1207": "16x9 (PS2)",
|
||||
"1208": "Valitse leveys- ja korkeussuhde",
|
||||
"1209": "Paina <PAD_X> vahvistaaksesi ja poistuaksesi.",
|
||||
"120a": "Paina <PAD_CIRCLE> vahvistaaksesi ja poistuaksesi.",
|
||||
"1209": "Vahvista ja poistu painamalla <PAD_X>.",
|
||||
"120a": "Vahvista ja poistu painamalla <PAD_CIRCLE>.",
|
||||
"120b": "Kuvasuhde ei saa olla pienempi kuin 4x3!",
|
||||
"120c": "Musiikkisoitin",
|
||||
"120d": "Pystytahdistus",
|
||||
@@ -34,7 +34,7 @@
|
||||
"1216": "Muuntoase",
|
||||
"1217": "JET-lauta",
|
||||
"1218": "Titaaniasu",
|
||||
"1219": "Pimeä Jak",
|
||||
"1219": "Raivo-Jak",
|
||||
"121a": "Ajoneuvo",
|
||||
"121b": "Vaara",
|
||||
"121c": "Ei mikään",
|
||||
@@ -85,10 +85,10 @@
|
||||
"124a": "Ohjaimen LED-asetukset",
|
||||
"124b": "Näytä pelaajan tila",
|
||||
"124c": "Näytä terveyden määrä",
|
||||
"124d": "Lopeta auto-tallennus",
|
||||
"124e": "Auto-tallennus pois päältä",
|
||||
"124d": "Lopeta autom. tallennus",
|
||||
"124e": "Autom. tallennus pois",
|
||||
"124f": "Haluatko varmasti lopettaa automaattisen tallentamisen?",
|
||||
"1250": "Turbo JET-lauta Haven Cityssä",
|
||||
"1250": "Turbo-JET-lauta Haven Cityssä",
|
||||
"1251": "Vihollisten terveyspalkit",
|
||||
"1252": "Ajoneuvojen terveyspalkit",
|
||||
"1253": "Ajoneuvojen haavoittumattomuus",
|
||||
@@ -96,13 +96,13 @@
|
||||
"1255": "Kerää kerättävät automaattisesti",
|
||||
"1256": "Musiikkisoitin",
|
||||
"1257": "Tekstuuriton tila",
|
||||
"1258": "Nopeat välianimaatiot",
|
||||
"1259": "Hitaat välianimaatiot",
|
||||
"1258": "Nopeat välinäytökset",
|
||||
"1259": "Hitaat välinäytökset",
|
||||
"125a": "Nopea pelattavuus",
|
||||
"125b": "Hidas pelattavuus",
|
||||
"125c": "Pikamatkustus Haven Cityssä",
|
||||
"125d": "Edeltäjähelmien seuranta",
|
||||
"125e": "Todellinen vuorokauden aika",
|
||||
"125e": "Todellinen vuorokaudenaika",
|
||||
"125f": "Tyyni Haven City",
|
||||
"1260": "Näytä JET-laudan temput",
|
||||
"1261": "Huono sää",
|
||||
@@ -112,14 +112,14 @@
|
||||
"1265": "Käännä kaikki 3 venttiiliä ja löydä Marin patsas tehtävässä \"~S\" alle ~D sekunnissa",
|
||||
"1266": "Vähennä Haven Cityn asukaslukua ~D kappaleella",
|
||||
"1267": "Vähennä Haven Cityn ajoneuvojen määrää ~D kappaleella",
|
||||
"1268": "Metsästä jokaista Metallipäälajia",
|
||||
"1268": "Metsästä jokaista metallipää-lajia",
|
||||
"1269": "Käytä JET-lautaa rikkoaksesi säiliöt auki",
|
||||
"126a": "Siirrä repeämäkuljetin jättäen Samos ja nuori Samos vaurioitta",
|
||||
"1280": "Kuvakulma-asetukset",
|
||||
"1281": "Vasen/oikea (ensimmäinen persoona)",
|
||||
"1282": "Ylös/alas (ensimmäinen persoona)",
|
||||
"1283": "Vasen/oikea (kolmas persoona)",
|
||||
"1284": "Ylös/alas (kolmas persoona)",
|
||||
"1281": "Vasen/oikea (1. persoona)",
|
||||
"1282": "Ylös/alas (1. persoona)",
|
||||
"1283": "Vasen/oikea (3. persoona)",
|
||||
"1284": "Ylös/alas (3. persoona)",
|
||||
"1285": "Palauta oletukset",
|
||||
"1286": "Normaali",
|
||||
"1287": "Käänteinen",
|
||||
@@ -137,15 +137,15 @@
|
||||
"1293": "Ohjainasetukset",
|
||||
"1294": "Valitse ohjain",
|
||||
"1295": "Analogisauvan katvealue",
|
||||
"1296": "Älä huomioi, kun ikkuna ei aktiivinen",
|
||||
"1296": "Älä huomioi työpöydällä",
|
||||
"1297": "Ohjaimen LED terveydelle",
|
||||
"1298": "Ohjaimen LED muihin tiloihin",
|
||||
"1299": "Salli näppäimistö",
|
||||
"129a": "Salli hiiri",
|
||||
"129b": "Hiiriasetukset",
|
||||
"129c": "Kameran ohjaus hiirellä",
|
||||
"129d": "Vaakasuuntainen herkkyys",
|
||||
"129e": "Pystysuuntainen herkkyys",
|
||||
"129d": "Herkkyys (vaakasuunta)",
|
||||
"129e": "Herkkyys (pystysuunta)",
|
||||
"129f": "Pelaajan ohjaus hiirellä",
|
||||
"12a0": "Objektien varjot",
|
||||
"12a1": "Normaali",
|
||||
@@ -156,25 +156,25 @@
|
||||
"12a6": "Muut tilastot",
|
||||
"12a7": "Tappoja yhteensä",
|
||||
"12a8": "Jakin tappamia",
|
||||
"12a9": "Pimeän Jakin tappamia",
|
||||
"12a9": "Raivo-Jakin tappamia",
|
||||
"12aa": "Daxterin tappamia",
|
||||
"12ab": "Muiden tappamia",
|
||||
"12ac": "Läjäytin",
|
||||
"12ad": "Haulikko",
|
||||
"12ae": "Vulkanusraivo",
|
||||
"12ae": "Vulkanus-tykki",
|
||||
"12af": "Rauhantekijä",
|
||||
"12b0": "JET-lauta",
|
||||
"12b1": "JET-lautatemppu",
|
||||
"12b1": "JET-lauta-temppu",
|
||||
"12b2": "Titaaniasun isku",
|
||||
"12b3": "Titaaniasun runko",
|
||||
"12b4": "Tykki",
|
||||
"12b5": "Isku",
|
||||
"12b6": "Lyyhistyi",
|
||||
"12b6": "Maaisku",
|
||||
"12b7": "Kohokoukku",
|
||||
"12b8": "Pyörähdys",
|
||||
"12b9": "Kierintä",
|
||||
"12bf": "Pimeä pommi",
|
||||
"12c0": "Pimeä purkaus",
|
||||
"12bf": "Raivopommi",
|
||||
"12c0": "Raivopurkaus",
|
||||
"12c3": "Karmiinivartija",
|
||||
"12c4": "Sig",
|
||||
"12c5": "Ashelin",
|
||||
@@ -208,24 +208,24 @@
|
||||
"1315": "Tämä asetus on erittäin kokeellinen. Kun peliä ei pelata 60 Hz:n kuvataajuudella, visuaalisia sekä pelattavuuden ongelmia voi ilmaantua sen seurauksena.",
|
||||
"1316": "Paikallinen tulos",
|
||||
"1320": "Ei mitään",
|
||||
"1321": "Spin",
|
||||
"1322": "Buusti",
|
||||
"1321": "Pyörähdys",
|
||||
"1322": "Nopeuslisä",
|
||||
"1323": "Voltti",
|
||||
"1324": "Kaideliuku",
|
||||
"1325": "Kaidehyppy",
|
||||
"1326": "Nosegrab",
|
||||
"1327": "Method",
|
||||
"1328": "Board Spin",
|
||||
"1329": "Board Flip",
|
||||
"1328": "Lautapyörähdys",
|
||||
"1329": "Lautavoltti",
|
||||
"132a": "Noseflip",
|
||||
"132b": "Kickflip",
|
||||
"132c": "Hyppy",
|
||||
"132d": "Kyykkyhyppy",
|
||||
"132e": "Pikahyppy",
|
||||
"132f": "Pimeä Jak",
|
||||
"1330": "Pimeä pommi",
|
||||
"1331": "Pimeä purkaus",
|
||||
"1332": "Pimeä jätti",
|
||||
"132f": "Raivo-Jak",
|
||||
"1330": "Raivopommi",
|
||||
"1331": "Raivopurkaus",
|
||||
"1332": "Raivojätti",
|
||||
"1333": "PS2-asetukset",
|
||||
"1334": "Objektien vähennys",
|
||||
"1335": "Pakota ympäristökartoitus",
|
||||
|
||||
@@ -1081,7 +1081,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000005e040000d102000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000dd02000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000e002000000000000,Xbox One Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000e002000003090000,Xbox One Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
030000005e040000e002000003090000,Xbox One Controller,a:b0,b:b1,x:b2,y:b3,back:b6,guide:b10,start:b7,leftstick:b8,rightstick:b9,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Mac OS X,
|
||||
030000005e040000e302000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000ea02000000000000,Xbox One Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
|
||||
030000005e040000fd02000003090000,Xbox One Controller,a:b0,b:b1,back:b16,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
|
||||
|
||||
@@ -325,6 +325,10 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
fmt::format("tfrag-l{}-water", i), BucketCategory::TFRAG,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::TFRAG_L0_WATER, BucketId::TFRAG_L1_WATER, i),
|
||||
std::vector{tfrag3::TFragmentTreeKind::WATER}, false, i, anim_slot_array());
|
||||
init_bucket_renderer<Generic2BucketRenderer>(
|
||||
fmt::format("gmerc2-l{}-water", i), BucketCategory::GENERIC,
|
||||
GET_BUCKET_ID_FOR_LIST(BucketId::GMERC2_L0_WATER, BucketId::GMERC2_L1_WATER, i),
|
||||
m_generic2, Generic2::Mode::PRIM);
|
||||
}
|
||||
|
||||
// 563
|
||||
|
||||
@@ -460,6 +460,9 @@ void* RPC_Loader(unsigned int /*fno*/, void* data, int size) {
|
||||
snd_SetPlayBackMode(0);
|
||||
}
|
||||
} break;
|
||||
case Jak2SoundCommand::mirror_mode: {
|
||||
gMirrorMode = cmd->mirror.value;
|
||||
} break;
|
||||
default:
|
||||
ASSERT_MSG(false, fmt::format("Unhandled RPC Loader command {}", int(cmd->j2command)));
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ enum class Jak2SoundCommand : u16 {
|
||||
iop_mem = 48,
|
||||
cancel_dgo = 49,
|
||||
set_stereo_mode = 50,
|
||||
mirror_mode = 201,
|
||||
};
|
||||
|
||||
struct SoundRpcCommand {
|
||||
|
||||
@@ -594,14 +594,16 @@
|
||||
;; loop over all tags
|
||||
(while (< (the-as int save-data) (the-as int (+ (+ (-> save length) 76) (the-as int save))))
|
||||
(let ((a0-1 (-> save-data elt-type)))
|
||||
;; og:preserve-this Moved these settings to pc-settings
|
||||
(cond
|
||||
((= a0-1 (game-save-elt sfx-volume)) (set! (-> *setting-control* default sfx-volume) (-> save-data user-float0)))
|
||||
((= a0-1 (game-save-elt music-volume)) (set! (-> *setting-control* default music-volume) (-> save-data user-float0)))
|
||||
((= a0-1 (game-save-elt dialog-volume)) (set! (-> *setting-control* default dialog-volume) (-> save-data user-float0)))
|
||||
;; ((= a0-1 (game-save-elt sfx-volume)) (set! (-> *setting-control* default sfx-volume) (-> save-data user-float0)))
|
||||
;; ((= a0-1 (game-save-elt music-volume)) (set! (-> *setting-control* default music-volume) (-> save-data user-float0)))
|
||||
;; ((= a0-1 (game-save-elt dialog-volume)) (set! (-> *setting-control* default dialog-volume) (-> save-data user-float0)))
|
||||
((= a0-1 (game-save-elt language))
|
||||
(set! (-> *setting-control* default language) (the-as language-enum (-> save-data user-uint64))))
|
||||
((= a0-1 (game-save-elt vibration)) (set! (-> *setting-control* default vibration) (= (-> save-data user-uint64) 1)))
|
||||
((= a0-1 (game-save-elt play-hints)) (set! (-> *setting-control* default play-hints) (= (-> save-data user-uint64) 1)))))
|
||||
;; ((= a0-1 (game-save-elt vibration)) (set! (-> *setting-control* default vibration) (= (-> save-data user-uint64) 1)))
|
||||
;; ((= a0-1 (game-save-elt play-hints)) (set! (-> *setting-control* default play-hints) (= (-> save-data user-uint64) 1)))
|
||||
(else (format 0 "PC PORT: Skipping setting from game save, its stored in the pc-settings now"))))
|
||||
(set! save-data
|
||||
(the-as game-save-tag
|
||||
(&+ (the-as pointer save-data) (logand -16 (+ (* (the-as int (-> save-data elt-size)) (-> save-data elt-count)) 31)))))))
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
(list-sounds)
|
||||
(unload-music)
|
||||
(set-fps)
|
||||
;; og:preserve-this mirror mode
|
||||
(set-mirror 201))
|
||||
|
||||
;; flavors for music
|
||||
@@ -279,6 +280,7 @@
|
||||
(shutdown sound-rpc-shutdown :overlay-at (-> data 0))
|
||||
(list-sounds sound-rpc-list-sounds :overlay-at (-> data 0))
|
||||
(unload-music sound-rpc-unload-music :overlay-at (-> data 0))
|
||||
;; og:preserve-this mirror mode
|
||||
(mirror-mode sound-rpc-set-mirror-mode :overlay-at (-> data 0))))
|
||||
|
||||
;; GOAL-side sound specification.
|
||||
|
||||
@@ -539,6 +539,10 @@
|
||||
(("controller-led-brightness") (set! (-> obj controller-led-brightness) (file-stream-read-float file)))
|
||||
(("controller-led-min-brightness") (set! (-> obj controller-led-min-brightness) (file-stream-read-float file)))
|
||||
(("controller-led-max-brightness") (set! (-> obj controller-led-max-brightness) (file-stream-read-float file)))
|
||||
(("memcard-volume-sfx") (set! (-> obj memcard-volume-sfx) (file-stream-read-float file)))
|
||||
(("memcard-volume-music") (set! (-> obj memcard-volume-music) (file-stream-read-float file)))
|
||||
(("memcard-volume-dialog") (set! (-> obj memcard-volume-dialog) (file-stream-read-float file)))
|
||||
(("memcard-vibration?") (set! (-> obj memcard-vibration?) (file-stream-read-symbol file)))
|
||||
;; debug
|
||||
(("debug-font-scale") (set! (-> obj debug-font-scale) (file-stream-read-float file)))
|
||||
(("debug-font-scale-auto?") (set! (-> obj debug-font-scale-auto?) (file-stream-read-symbol file)))
|
||||
@@ -611,6 +615,10 @@
|
||||
(format file " (game-language ~D)~%" (get-game-language obj))
|
||||
(format file " (subtitle-speaker ~A)~%" (-> obj subtitle-speaker?))
|
||||
(format file " (territory ~D)~%" (-> obj territory))
|
||||
(format file " (memcard-volume-sfx ~f)~%" (-> obj memcard-volume-sfx))
|
||||
(format file " (memcard-volume-music ~f)~%" (-> obj memcard-volume-music))
|
||||
(format file " (memcard-volume-dialog ~f)~%" (-> obj memcard-volume-dialog))
|
||||
(format file " (memcard-vibration? ~A)~%" (-> obj memcard-vibration?))
|
||||
0)
|
||||
|
||||
(defmethod write-to-file ((obj pc-settings) (filename string))
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
;; how many entries the spool anim log has. only 164 are used in-game.
|
||||
(defconstant PC_SPOOL_LOG_LENGTH 170)
|
||||
|
||||
(define *PC-MIRROR-MODE-SET* #f)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;; types and enums
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -191,7 +193,12 @@
|
||||
(discord-rpc? symbol) ;; enable discord rich presence integration
|
||||
(speedrunner-mode? symbol) ;; enable speedrunner mode
|
||||
(flava-hack int64)
|
||||
;; TODO - save/restore original settings (language/sound/etc)
|
||||
;; settings originally stored in the game save
|
||||
;; now stored in pc-settings
|
||||
(memcard-volume-sfx float)
|
||||
(memcard-volume-music float)
|
||||
(memcard-volume-dialog float)
|
||||
(memcard-vibration? symbol)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
|
||||
@@ -67,16 +67,17 @@
|
||||
|
||||
;; The Jak 1 version of the pc-settings object.
|
||||
(deftype pc-settings-jak1 (pc-settings)
|
||||
((cheats pc-cheats)
|
||||
(cheats-known pc-cheats)
|
||||
(skip-movies? symbol) ;; if on, enable cutscene skipping
|
||||
(subtitles? symbol) ;; if on, cutscene subtitles will show up
|
||||
(text-language pc-language) ;; language for game text
|
||||
(subtitle-language pc-language) ;; language for subtitles
|
||||
(money-starburst? symbol) ;; add a starburst to the money
|
||||
(extra-hud? symbol) ;; extra hud elements.
|
||||
(secrets pc-game-secrets :inline) ;; hidden goodies and additional secrets!
|
||||
(scenes-seen uint8 PC_SPOOL_LOG_LENGTH) ;; cutscenes that have been seen, by spool-anim (maybe use 8-char name or bits instead?)
|
||||
((cheats pc-cheats)
|
||||
(cheats-known pc-cheats)
|
||||
(skip-movies? symbol) ;; if on, enable cutscene skipping
|
||||
(subtitles? symbol) ;; if on, cutscene subtitles will show up
|
||||
(text-language pc-language) ;; language for game text
|
||||
(subtitle-language pc-language) ;; language for subtitles
|
||||
(money-starburst? symbol) ;; add a starburst to the money
|
||||
(extra-hud? symbol) ;; extra hud elements.
|
||||
(secrets pc-game-secrets :inline) ;; hidden goodies and additional secrets!
|
||||
(scenes-seen uint8 PC_SPOOL_LOG_LENGTH) ;; cutscenes that have been seen, by spool-anim (maybe use 8-char name or bits instead?)
|
||||
(memcard-play-hints? symbol)
|
||||
))
|
||||
|
||||
(define *pc-settings* (the pc-settings-jak1 #f))
|
||||
@@ -131,6 +132,12 @@
|
||||
(else))
|
||||
(set! (-> obj money-starburst?) #f)
|
||||
(set! (-> obj extra-hud?) #f)
|
||||
;; original settings, minus 25 to be a bit more conservative
|
||||
(set! (-> obj memcard-volume-sfx) 50.0)
|
||||
(set! (-> obj memcard-volume-music) 40.0)
|
||||
(set! (-> obj memcard-volume-dialog) 75.0)
|
||||
(set! (-> obj memcard-vibration?) #t)
|
||||
(set! (-> obj memcard-play-hints?) #t)
|
||||
0)
|
||||
|
||||
(defmethod reset-extra ((obj pc-settings-jak1) (call-handlers symbol))
|
||||
|
||||
@@ -14,6 +14,16 @@
|
||||
;;;; methods
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defmethod initialize ((obj pc-settings-jak1))
|
||||
"initial initialize method to be run after allocating"
|
||||
((method-of-type pc-settings initialize) obj)
|
||||
(set! (-> *setting-control* default sfx-volume) (-> obj memcard-volume-sfx))
|
||||
(set! (-> *setting-control* default music-volume) (-> obj memcard-volume-music))
|
||||
(set! (-> *setting-control* default dialog-volume) (-> obj memcard-volume-dialog))
|
||||
(set! (-> *setting-control* default vibration) (-> obj memcard-vibration?))
|
||||
(set! (-> *setting-control* default play-hints) (-> obj memcard-play-hints?))
|
||||
obj)
|
||||
|
||||
(defmethod set-game-setting! ((obj pc-settings-jak1) (setting symbol) (value symbol))
|
||||
(case setting
|
||||
(('video-mode)
|
||||
@@ -129,7 +139,8 @@
|
||||
(when (zero? (-> date stat))
|
||||
(set-time-of-day (+ (the float (bcd->dec (-> date hour))) (/ (the float (bcd->dec (-> date minute))) 60))))))
|
||||
(pc-set-gfx-hack (pc-gfx-hack no-tex) (logtest? (-> obj cheats) (pc-cheats no-tex)))
|
||||
(if (pc-cheats? (-> obj cheats) mirror)
|
||||
(if (or (pc-cheats? (-> obj cheats) mirror)
|
||||
*PC-MIRROR-MODE-SET*)
|
||||
(sound-set-mirror-mode (sound-mirror-mode mirrored))
|
||||
(sound-set-mirror-mode (sound-mirror-mode normal)))
|
||||
;; run cheats end!!!
|
||||
@@ -433,6 +444,7 @@
|
||||
(("subtitle-language") (set! (-> obj subtitle-language) (the-as pc-language (file-stream-read-int file))))
|
||||
(("text-language") (set! (-> obj text-language) (the-as pc-language (file-stream-read-int file))))
|
||||
(("scenes-seen") (dotimes (i PC_SPOOL_LOG_LENGTH) (set! (-> obj scenes-seen i) (file-stream-read-int file))))
|
||||
(("memcard-play-hints?") (set! (-> obj memcard-play-hints?) (file-stream-read-symbol file)))
|
||||
(("secrets")
|
||||
(dosettings (file)
|
||||
(case-str *pc-temp-string*
|
||||
@@ -466,6 +478,7 @@
|
||||
(format file " (subtitles? ~A)~%" (-> obj subtitles?))
|
||||
(format file " (subtitle-language ~D)~%" (-> obj subtitle-language))
|
||||
(format file " (text-language ~D)~%" (-> obj text-language))
|
||||
(format file " (memcard-play-hints? ~A)~%" (-> obj memcard-play-hints?))
|
||||
#|
|
||||
(format file " (scenes-seen")
|
||||
(dotimes (i PC_SPOOL_LOG_LENGTH)
|
||||
|
||||
@@ -225,7 +225,10 @@
|
||||
:name (text-id input-options)
|
||||
:scale #t
|
||||
:param3 (game-option-menu input-options))
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id play-hints) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id play-hints) :scale #t
|
||||
:on-confirm
|
||||
(lambda ()
|
||||
(set! (-> *setting-control* default play-hints) (-> *pc-settings* memcard-play-hints?))))
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id subtitles) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id hinttitles) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type language) :name (text-id language) :scale #t)
|
||||
@@ -297,7 +300,11 @@
|
||||
:scale #t
|
||||
:param1 0.0
|
||||
:param2 100.0
|
||||
:slider-step-size 1.0)
|
||||
:slider-step-size 1.0
|
||||
:on-confirm
|
||||
(lambda ((val object))
|
||||
(set! (-> *setting-control* default sfx-volume) (-> *pc-settings* memcard-volume-sfx))
|
||||
(none)))
|
||||
(new 'static
|
||||
'game-option
|
||||
:option-type (game-option-type slider)
|
||||
@@ -305,7 +312,11 @@
|
||||
:scale #t
|
||||
:param1 0.0
|
||||
:param2 100.0
|
||||
:slider-step-size 1.0)
|
||||
:slider-step-size 1.0
|
||||
:on-confirm
|
||||
(lambda ((val object))
|
||||
(set! (-> *setting-control* default music-volume) (-> *pc-settings* memcard-volume-music))
|
||||
(none)))
|
||||
(new 'static
|
||||
'game-option
|
||||
:option-type (game-option-type slider)
|
||||
@@ -313,7 +324,11 @@
|
||||
:scale #t
|
||||
:param1 0.0
|
||||
:param2 100.0
|
||||
:slider-step-size 1.0)
|
||||
:slider-step-size 1.0
|
||||
:on-confirm
|
||||
(lambda ((val object))
|
||||
(set! (-> *setting-control* default dialog-volume) (-> *pc-settings* memcard-volume-dialog))
|
||||
(none)))
|
||||
;(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id music-fadein) :scale #t)
|
||||
(new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t)))
|
||||
|
||||
@@ -371,7 +386,10 @@
|
||||
:scale #t
|
||||
:option-disabled-func
|
||||
(lambda ()
|
||||
(not (pc-current-controller-has-rumble?))))
|
||||
(not (pc-current-controller-has-rumble?)))
|
||||
:on-confirm
|
||||
(lambda ()
|
||||
(set! (-> *setting-control* default vibration) (-> *pc-settings* memcard-vibration?))))
|
||||
(new 'static
|
||||
'game-option
|
||||
:option-type (game-option-type slider)
|
||||
@@ -1279,7 +1297,7 @@
|
||||
(set! (-> option bind-info input-idx) i)
|
||||
(set! (-> option bind-info analog-min-range?) #t)
|
||||
(set! (-> option option-type) (game-option-type binding-assignment))
|
||||
(set! (-> option name-override) (-> *analog-bind-names* (* i 2)))
|
||||
(set! (-> option name-override) (copy-string<-string (-> option name-override) (-> *analog-bind-names* (* i 2))))
|
||||
(set! (-> option scale) #t)
|
||||
(1+! (-> *temp-options* length)))
|
||||
(let ((option (-> *temp-options* (length *temp-options*))))
|
||||
@@ -1290,7 +1308,7 @@
|
||||
(set! (-> option bind-info input-idx) i)
|
||||
(set! (-> option bind-info analog-min-range?) #f)
|
||||
(set! (-> option option-type) (game-option-type binding-assignment))
|
||||
(set! (-> option name-override) (-> *analog-bind-names* (+ 1 (* i 2))))
|
||||
(set! (-> option name-override) (copy-string<-string (-> option name-override) (-> *analog-bind-names* (+ 1 (* i 2)))))
|
||||
(set! (-> option scale) #t)
|
||||
(1+! (-> *temp-options* length)))))
|
||||
;; Add Button bindings
|
||||
@@ -1305,7 +1323,7 @@
|
||||
(set! (-> option bind-info input-idx) i)
|
||||
(set! (-> option bind-info analog-min-range?) #f)
|
||||
(set! (-> option option-type) (game-option-type binding-assignment))
|
||||
(set! (-> option name-override) (-> *button-bind-names* i))
|
||||
(set! (-> option name-override) (copy-string<-string (-> option name-override) (-> *button-bind-names* i)))
|
||||
(set! (-> option scale) #t)
|
||||
(1+! (-> *temp-options* length))))
|
||||
;; We add a restore defaults button at the bottom of each binding menu
|
||||
@@ -2025,19 +2043,19 @@
|
||||
(set! (-> *progress-state* video-mode-choice) (get-video-mode))
|
||||
(set! (-> *progress-state* yes-no-choice) #f)
|
||||
;; set variable pointers
|
||||
(set! (-> *game-options* 1 value-to-modify) (&-> *setting-control* default play-hints))
|
||||
(set! (-> *game-options* 1 value-to-modify) (&-> *pc-settings* memcard-play-hints?))
|
||||
(set! (-> *game-options* 2 value-to-modify) (&-> *setting-control* default language))
|
||||
(set! (-> *game-options-japan* 0 value-to-modify) (&-> *setting-control* default vibration))
|
||||
(set! (-> *game-options-japan* 1 value-to-modify) (&-> *setting-control* default play-hints))
|
||||
(set! (-> *game-options-demo* 0 value-to-modify) (&-> *setting-control* default vibration))
|
||||
(set! (-> *game-options-demo* 1 value-to-modify) (&-> *setting-control* default play-hints))
|
||||
(set! (-> *game-options-japan* 0 value-to-modify) (&-> *pc-settings* memcard-vibration?))
|
||||
(set! (-> *game-options-japan* 1 value-to-modify) (&-> *pc-settings* memcard-play-hints?))
|
||||
(set! (-> *game-options-demo* 0 value-to-modify) (&-> *pc-settings* memcard-vibration?))
|
||||
(set! (-> *game-options-demo* 1 value-to-modify) (&-> *pc-settings* memcard-play-hints?))
|
||||
(set! (-> *graphic-options* 1 value-to-modify) (&-> *progress-state* aspect-ratio-choice))
|
||||
(set! (-> *sound-options* 0 value-to-modify) (&-> *setting-control* default sfx-volume))
|
||||
(set! (-> *sound-options* 1 value-to-modify) (&-> *setting-control* default music-volume))
|
||||
(set! (-> *sound-options* 2 value-to-modify) (&-> *setting-control* default dialog-volume))
|
||||
(set! (-> *yes-no-options* 0 value-to-modify) (&-> *progress-state* yes-no-choice))
|
||||
;; our options!
|
||||
(set! (-> *game-options-pc* 1 value-to-modify) (&-> *setting-control* default play-hints))
|
||||
(set! (-> *game-options-pc* 1 value-to-modify) (&-> *pc-settings* memcard-play-hints?))
|
||||
(set! (-> *game-options-pc* 2 value-to-modify) (&-> *pc-settings* subtitles?))
|
||||
(set! (-> *game-options-pc* 3 value-to-modify) (&-> *pc-settings* hinttitles?))
|
||||
(set! (-> *game-options-pc* 4 value-to-modify) (&-> *setting-control* default language))
|
||||
@@ -2057,7 +2075,7 @@
|
||||
(set! (-> *camera-options* 2 value-to-modify) (&-> *pc-settings* third-camera-h-inverted?))
|
||||
(set! (-> *camera-options* 3 value-to-modify) (&-> *pc-settings* third-camera-v-inverted?))
|
||||
;; input options
|
||||
(set! (-> *controller-options* 1 value-to-modify) (&-> *setting-control* default vibration))
|
||||
(set! (-> *controller-options* 1 value-to-modify) (&-> *pc-settings* memcard-vibration?))
|
||||
(set! (-> *controller-options* 2 value-to-modify) (&-> *pc-settings* stick-deadzone))
|
||||
(set! (-> *controller-options* 3 value-to-modify) (&-> *pc-settings* ignore-controller-win-unfocused?))
|
||||
(set! (-> *controller-options* 4 value-to-modify) (&-> *pc-settings* controller-led-hp?))
|
||||
@@ -2075,9 +2093,9 @@
|
||||
(set! (-> *gfx-ps2-options* 2 value-to-modify) (&-> *pc-settings* ps2-parts?))
|
||||
(set! (-> *gfx-ps2-options* 3 value-to-modify) (&-> *pc-settings* force-envmap?))
|
||||
(set! (-> *gfx-ps2-options* 4 value-to-modify) (&-> *pc-settings* ps2-actor-vis?))
|
||||
(set! (-> *sound-options-pc* 0 value-to-modify) (&-> *setting-control* default sfx-volume))
|
||||
(set! (-> *sound-options-pc* 1 value-to-modify) (&-> *setting-control* default music-volume))
|
||||
(set! (-> *sound-options-pc* 2 value-to-modify) (&-> *setting-control* default dialog-volume))
|
||||
(set! (-> *sound-options-pc* 0 value-to-modify) (&-> *pc-settings* memcard-volume-sfx))
|
||||
(set! (-> *sound-options-pc* 1 value-to-modify) (&-> *pc-settings* memcard-volume-music))
|
||||
(set! (-> *sound-options-pc* 2 value-to-modify) (&-> *pc-settings* memcard-volume-dialog))
|
||||
(dotimes (i (1- (-> *cheats* length)))
|
||||
(set! (-> *cheats* i value-to-modify) (&-> *progress-carousell* symbol-backup)))
|
||||
;(set! (-> *sound-options-pc* 3 value-to-modify) (&-> *pc-settings* music-fadein?))
|
||||
|
||||
@@ -3416,6 +3416,7 @@
|
||||
(flag "japanese" 5 dm-setting-subtitle-language)
|
||||
(flag "korean" 6 dm-setting-subtitle-language)
|
||||
(flag "uk-english" 7 dm-setting-subtitle-language)
|
||||
(flag "finnish" 9 dm-setting-subtitle-language)
|
||||
)
|
||||
(flag
|
||||
"play-hints "
|
||||
|
||||
@@ -1643,12 +1643,28 @@
|
||||
)
|
||||
|
||||
(defmethod adjust-to-screen-flip ((this cpad-info))
|
||||
(when (logtest? (-> *game-info* secrets) (game-secrets hflip-screen))
|
||||
;; og:preserve-this mirror mode flag
|
||||
(when (or (logtest? (-> *game-info* secrets) (game-secrets hflip-screen))
|
||||
*PC-MIRROR-MODE-SET*)
|
||||
(set! (-> this leftx) (- 255 (the-as int (-> this leftx))))
|
||||
(set! (-> this rightx) (- 255 (the-as int (-> this rightx))))
|
||||
)
|
||||
0
|
||||
)
|
||||
;; while in the progress menu, invert left/right as well
|
||||
(when *progress-process*
|
||||
;; right = 5th bit and 1st index for pressure
|
||||
;; left = 7th bit and 2nd index for pressure
|
||||
(let ((right-pressed? (logtest? (-> this button0) (pad-buttons right)))
|
||||
(right-pressure (-> this abutton 0))
|
||||
(left-pressed? (logtest? (-> this button0) (pad-buttons left)))
|
||||
(left-pressure (-> this abutton 1)))
|
||||
(when right-pressed?
|
||||
(logclear! (-> this button0) (pad-buttons right))
|
||||
(logior! (-> this button0) (pad-buttons left)))
|
||||
(when left-pressed?
|
||||
(logclear! (-> this button0) (pad-buttons left))
|
||||
(logior! (-> this button0) (pad-buttons right)))
|
||||
(set! (-> this abutton 0) left-pressure)
|
||||
(set! (-> this abutton 1) right-pressure))))
|
||||
0)
|
||||
|
||||
(defmethod game-info-method-28 ((this game-info) (arg0 game-score) (arg1 float))
|
||||
(when (!= arg1 0.0)
|
||||
|
||||
@@ -1103,21 +1103,22 @@
|
||||
(let ((v1-0 (the-as object (-> arg0 tag))))
|
||||
(while (< (the-as int v1-0) (the-as int (&-> arg0 tag 0 user-int8 (-> arg0 length))))
|
||||
(case (-> (the-as (inline-array game-save-tag) v1-0) 0 elt-type)
|
||||
(((game-save-elt sfx-volume))
|
||||
(set! (-> *setting-control* user-default sfx-volume)
|
||||
(-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
)
|
||||
)
|
||||
(((game-save-elt music-volume))
|
||||
(set! (-> *setting-control* user-default music-volume)
|
||||
(-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
)
|
||||
)
|
||||
(((game-save-elt dialog-volume))
|
||||
(set! (-> *setting-control* user-default dialog-volume)
|
||||
(-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
)
|
||||
)
|
||||
;; og:preserve-this Moved saving these settings to pc-settings
|
||||
;; (((game-save-elt sfx-volume))
|
||||
;; (set! (-> *setting-control* user-default sfx-volume)
|
||||
;; (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
;; )
|
||||
;; )
|
||||
;; (((game-save-elt music-volume))
|
||||
;; (set! (-> *setting-control* user-default music-volume)
|
||||
;; (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
;; )
|
||||
;; )
|
||||
;; (((game-save-elt dialog-volume))
|
||||
;; (set! (-> *setting-control* user-default dialog-volume)
|
||||
;; (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
;; )
|
||||
;; )
|
||||
(((game-save-elt language))
|
||||
(set! (-> *setting-control* user-default language)
|
||||
(the-as language-enum (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64))
|
||||
@@ -1133,16 +1134,16 @@
|
||||
(the-as int (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64))
|
||||
)
|
||||
)
|
||||
(((game-save-elt vibration))
|
||||
(set! (-> *setting-control* user-default vibration)
|
||||
(= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1)
|
||||
)
|
||||
)
|
||||
(((game-save-elt subtitle))
|
||||
(set! (-> *setting-control* user-default subtitle)
|
||||
(= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1)
|
||||
)
|
||||
)
|
||||
;; (((game-save-elt vibration))
|
||||
;; (set! (-> *setting-control* user-default vibration)
|
||||
;; (= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1)
|
||||
;; )
|
||||
;; )
|
||||
;; (((game-save-elt subtitle))
|
||||
;; (set! (-> *setting-control* user-default subtitle)
|
||||
;; (= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1)
|
||||
;; )
|
||||
;; )
|
||||
(((game-save-elt camera-stick-dir))
|
||||
(set! (-> *setting-control* user-default camera-stick-dir)
|
||||
(= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1)
|
||||
@@ -1163,6 +1164,7 @@
|
||||
(the int (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0))
|
||||
)
|
||||
)
|
||||
(else (format 0 "PC PORT: Skipping setting from game save, its stored in the pc-settings now"))
|
||||
)
|
||||
(set! v1-0 (&+
|
||||
(the-as pointer v1-0)
|
||||
|
||||
@@ -1215,6 +1215,7 @@
|
||||
(set! (-> s5-0 display-dy) (-> s4-0 display-dy))
|
||||
(set! (-> *video-params* display-dy) (* (/ (-> s4-0 display-dy) 2) 2))
|
||||
)
|
||||
;; og:preserve-this If this flag worked end-to-end (i believe it doesn't), mirror mode would come a bit easier
|
||||
(set! (-> *blit-displays-work* horizontal-flip-flag)
|
||||
(logtest? (-> *game-info* secrets) (game-secrets hflip-screen))
|
||||
)
|
||||
|
||||
@@ -220,9 +220,11 @@ renderers that want a single matrix.
|
||||
;; #xffffffff, which overflows the 24-bit z buffer.
|
||||
;; cheating this by 1 bit seems to fix it.
|
||||
(#when PC_PORT
|
||||
;; #x4b002032 -> #x4b002031
|
||||
(set! (-> arg0 isometric vector 3 z) (the-as float (- (the-as int (-> arg0 isometric vector 3 z)) 1)))
|
||||
)
|
||||
;; #x4b002032 -> #x4b002031
|
||||
(set! (-> arg0 isometric vector 3 z) (the-as float (- (the-as int (-> arg0 isometric vector 3 z)) 1)))
|
||||
;; also do mirror game check here.
|
||||
(when *PC-MIRROR-MODE-SET*
|
||||
(*! (-> arg0 perspective vector 0 x) -1.)))
|
||||
)
|
||||
(set! (-> arg0 isometric trans w) f30-0)
|
||||
(let ((f1-28 (-> arg0 perspective vector 0 x))
|
||||
|
||||
@@ -61,6 +61,8 @@
|
||||
(iop-mem 48)
|
||||
(cancel-dgo 49)
|
||||
(set-stereo-mode 50) ;; sound-rpc-set-stereo-mode
|
||||
;; og:preserve-this mirror mode
|
||||
(set-mirror 201)
|
||||
)
|
||||
|
||||
(defenum sound-group
|
||||
@@ -96,6 +98,11 @@
|
||||
(unk)
|
||||
)
|
||||
|
||||
(defenum sound-mirror-mode
|
||||
:type uint8
|
||||
(normal)
|
||||
(mirrored))
|
||||
|
||||
(defenum stream-status
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
@@ -402,6 +409,10 @@
|
||||
()
|
||||
)
|
||||
|
||||
;; og:preserve-this added for mirror mode
|
||||
(deftype sound-rpc-set-mirror-mode (sound-rpc-cmd)
|
||||
((mirror sound-mirror-mode)))
|
||||
|
||||
|
||||
(deftype sound-rpc-union (structure)
|
||||
((data uint32 20)
|
||||
@@ -426,6 +437,8 @@
|
||||
(shutdown sound-rpc-shutdown :overlay-at (-> data 0))
|
||||
(list-sounds sound-rpc-list-sounds :overlay-at (-> data 0))
|
||||
(unload-music sound-rpc-unload-music :overlay-at (-> data 0))
|
||||
;; og:preserve-this mirror mode
|
||||
(mirror-mode sound-rpc-set-mirror-mode :overlay-at (-> data 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -283,6 +283,19 @@
|
||||
0
|
||||
)
|
||||
|
||||
;; og:preserve-this mirror mode
|
||||
(define *sound-current-mirror* (sound-mirror-mode normal))
|
||||
|
||||
;; og:preserve-this mirror mode
|
||||
(defun sound-set-mirror-mode ((mode sound-mirror-mode))
|
||||
(when (!= mode *sound-current-mirror*)
|
||||
(let ((cmd (the sound-rpc-set-mirror-mode (add-element *sound-loader-rpc*))))
|
||||
(set! (-> cmd command) (sound-command set-mirror))
|
||||
(set! (-> cmd mirror) mode))
|
||||
(call *sound-loader-rpc* (the-as uint 0) (the-as pointer 0) (the-as uint 0))
|
||||
(set! *sound-current-mirror* mode))
|
||||
(none))
|
||||
|
||||
(define *sound-player-enable* #t)
|
||||
|
||||
(defun swap-sound-buffers ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float))
|
||||
|
||||
@@ -1592,7 +1592,9 @@
|
||||
(f30-1 (vector-vector-angle-safe s2-2 (vector-! (new 'stack-no-clear 'vector) s5-1 s3-1)))
|
||||
)
|
||||
(let ((f0-10 (- (atan (-> s4-1 x) (-> s4-1 y)))))
|
||||
(if (logtest? (-> *game-info* secrets) (game-secrets hflip-screen))
|
||||
;; og:preserve-this mirror mode
|
||||
(if (or (logtest? (-> *game-info* secrets) (game-secrets hflip-screen))
|
||||
*PC-MIRROR-MODE-SET*)
|
||||
(set! f0-10 (* -1.0 f0-10))
|
||||
)
|
||||
(set! (-> this arrow-angle) (deg-seek (-> this arrow-angle) f0-10 (* 65536.0 (seconds-per-frame))))
|
||||
|
||||
@@ -828,6 +828,7 @@
|
||||
(progress-graphics-ps2-lod-dist #x1337)
|
||||
(progress-graphics-msaa-off #x1338)
|
||||
(progress-graphics-display #x1339)
|
||||
(language-name-finnish #x133a)
|
||||
)
|
||||
;; ---text-id
|
||||
|
||||
|
||||
@@ -28,14 +28,28 @@
|
||||
|
||||
(defenum language-enum
|
||||
:type int64
|
||||
(english)
|
||||
(french)
|
||||
(german)
|
||||
(spanish)
|
||||
(italian)
|
||||
(japanese)
|
||||
(korean)
|
||||
(uk-english)
|
||||
(english 0)
|
||||
(french 1)
|
||||
(german 2)
|
||||
(spanish 3)
|
||||
(italian 4)
|
||||
(japanese 5)
|
||||
(korean 6)
|
||||
(uk-english 7)
|
||||
;; custom
|
||||
(portuguese 8)
|
||||
(finnish 9)
|
||||
(swedish 10)
|
||||
(danish 11)
|
||||
(norwegian 12)
|
||||
(dutch 13)
|
||||
(br-portuguese 14)
|
||||
(hungarian 15)
|
||||
(catalan 16)
|
||||
(icelandic 17)
|
||||
(russian 18)
|
||||
(polish 19)
|
||||
(lithuanian 20)
|
||||
)
|
||||
|
||||
(defenum runtime-exit-status
|
||||
|
||||
@@ -896,6 +896,7 @@
|
||||
(flag "japanese" (the binteger (pc-language japanese)) dm-text-language)
|
||||
(flag "korean" (the binteger (pc-language korean)) dm-text-language)
|
||||
(flag "uk-english" (the binteger (pc-language uk-english)) dm-text-language)
|
||||
(flag "finnish" (the binteger (pc-language finnish)) dm-text-language)
|
||||
)
|
||||
(flag "Discord RPC" #t ,(dm-lambda-boolean-flag (-> *pc-settings* discord-rpc?)))
|
||||
(flag "Speedrunner Mode" #t ,(dm-lambda-boolean-flag (-> *pc-settings* speedrunner-mode?)))
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
;; other
|
||||
(controller-led-status? symbol)
|
||||
(speedrunner-mode-custom-bind uint32)
|
||||
(memcard-subtitles? symbol)
|
||||
|
||||
(text-language pc-language) ;; language for game text
|
||||
)
|
||||
@@ -161,6 +162,12 @@
|
||||
)
|
||||
(else
|
||||
))
|
||||
|
||||
(set! (-> obj memcard-volume-sfx) 0.5)
|
||||
(set! (-> obj memcard-volume-music) 0.4)
|
||||
(set! (-> obj memcard-volume-dialog) 0.75)
|
||||
(set! (-> obj memcard-vibration?) #t)
|
||||
(set! (-> obj memcard-subtitles?) #f)
|
||||
0)
|
||||
|
||||
(defmethod reset-extra ((obj pc-settings-jak2) (call-handlers symbol))
|
||||
|
||||
@@ -314,12 +314,14 @@
|
||||
;;;; methods
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
(defmethod initialize ((obj pc-settings-jak2))
|
||||
"initial initialize method to be run after allocating"
|
||||
|
||||
(set! (-> obj music-unlocked) (new 'global 'bit-array (-> *music-player-tracks* length)))
|
||||
((method-of-type pc-settings initialize) obj)
|
||||
(set! (-> *setting-control* user-default sfx-volume) (-> obj memcard-volume-sfx))
|
||||
(set! (-> *setting-control* user-default music-volume) (-> obj memcard-volume-music))
|
||||
(set! (-> *setting-control* user-default dialog-volume) (-> obj memcard-volume-dialog))
|
||||
(set! (-> *setting-control* user-default vibration) (-> obj memcard-vibration?))
|
||||
obj)
|
||||
|
||||
(defmethod set-game-setting! ((obj pc-settings-jak2) (setting symbol) (value symbol))
|
||||
@@ -594,6 +596,9 @@
|
||||
(defmethod update-cheats ((obj pc-settings-jak2))
|
||||
"run cheats."
|
||||
|
||||
;; sync mirror mode cheat
|
||||
(set! *PC-MIRROR-MODE-SET* (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)))
|
||||
|
||||
;; run cheats here.
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
@@ -635,6 +640,11 @@
|
||||
|
||||
(pc-set-gfx-hack (pc-gfx-hack no-tex) (pc-cheats? (-> obj cheats) no-textures))
|
||||
|
||||
(if (or (logtest? (-> *game-info* secrets) (game-secrets hflip-screen))
|
||||
*PC-MIRROR-MODE-SET*)
|
||||
(sound-set-mirror-mode (sound-mirror-mode mirrored))
|
||||
(sound-set-mirror-mode (sound-mirror-mode normal)))
|
||||
|
||||
;; run cheats end!!!
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
@@ -756,6 +766,7 @@
|
||||
(("cheats-purchased") (set! (-> obj cheats-purchased) (the-as pc-cheats (file-stream-read-int file))))
|
||||
(("cheats-unlocked") (set! (-> obj cheats-unlocked) (the-as pc-cheats (file-stream-read-int file))))
|
||||
(("cheats-backup") (file-stream-read-int file)) ;; TODO - Don't remove this, parsing code can't handle unexpected keys
|
||||
(("memcard-subtitles?") (set! (-> obj memcard-subtitles?) (file-stream-read-symbol file)))
|
||||
(("music-unlocked")
|
||||
(dotimes (i (/ (align64 (-> obj music-unlocked length)) 64))
|
||||
(bit-array<-int64 (-> obj music-unlocked) (* i 64) (file-stream-read-int file))
|
||||
@@ -807,6 +818,7 @@
|
||||
(format file " (cheats-revealed #x~x)~%" (-> obj cheats-revealed))
|
||||
(format file " (cheats-purchased #x~x)~%" (-> obj cheats-purchased))
|
||||
(format file " (cheats-unlocked #x~x)~%" (-> obj cheats-unlocked))
|
||||
(format file " (memcard-subtitles? ~A)~%" (-> obj memcard-subtitles?))
|
||||
|
||||
(format file " (music-unlocked")
|
||||
(dotimes (i (/ (align64 (-> obj music-unlocked length)) 64))
|
||||
|
||||
@@ -57,8 +57,8 @@
|
||||
(set! (-> *progress-state* color-flash-counter) 0)
|
||||
(set! (-> *progress-state* game-options-item-selected) 0)
|
||||
(set! (-> *progress-state* game-options-item-picked) #f)
|
||||
(set! (-> *progress-state* game-options-vibrations) (-> *setting-control* user-default vibration))
|
||||
(set! (-> *progress-state* game-options-subtitles) (-> *setting-control* user-default subtitle))
|
||||
(set! (-> *progress-state* game-options-vibrations) (-> *pc-settings* memcard-vibration?))
|
||||
(set! (-> *progress-state* game-options-subtitles) (-> *pc-settings* memcard-subtitles?))
|
||||
(set! (-> *progress-state* game-options-language-index)
|
||||
(the-as int (-> *setting-control* user-default language))
|
||||
)
|
||||
@@ -81,7 +81,7 @@
|
||||
(set! (-> obj sliding-off) 1.0)
|
||||
(set! (-> obj scanlines-alpha) 0.0)
|
||||
(set! (-> (the-as menu-on-off-game-vibrations-option (-> *game-options* options 0)) value-to-modify)
|
||||
(&-> *setting-control* user-default vibration)
|
||||
(&-> *pc-settings* memcard-vibration?)
|
||||
)
|
||||
(set! (-> (the-as menu-on-off-game-subtitles-option (-> *game-options* options 1)) value-to-modify)
|
||||
(&-> *setting-control* user-default subtitle)
|
||||
@@ -93,10 +93,10 @@
|
||||
(set! (-> (the-as menu-language-option (-> *game-options* options 2)) language-transition) #f)
|
||||
(set! (-> (the-as menu-language-option (-> *game-options* options 2)) language-x-offset) 0)
|
||||
(set! (-> (the-as menu-on-off-option (-> *game-options-japan* options 0)) value-to-modify)
|
||||
(&-> *setting-control* user-default vibration)
|
||||
(&-> *pc-settings* memcard-vibration?)
|
||||
)
|
||||
(set! (-> (the-as menu-on-off-option (-> *game-options-demo* options 0)) value-to-modify)
|
||||
(&-> *setting-control* user-default vibration)
|
||||
(&-> *pc-settings* memcard-vibration?)
|
||||
)
|
||||
(set! (-> (the-as menu-on-off-option (-> *graphic-options* options 2)) value-to-modify)
|
||||
(&-> *setting-control* user-default use-progressive-scan)
|
||||
@@ -104,15 +104,15 @@
|
||||
(set! (-> (the-as menu-on-off-option (-> *graphic-title-options-pal* options 2)) value-to-modify)
|
||||
(&-> *setting-control* user-default use-progressive-scan)
|
||||
)
|
||||
(set! (-> (the-as menu-slider-option (-> *sound-options* options 0)) value-to-modify)
|
||||
(&-> *setting-control* user-default sfx-volume)
|
||||
)
|
||||
(set! (-> (the-as menu-slider-option (-> *sound-options* options 1)) value-to-modify)
|
||||
(&-> *setting-control* user-default music-volume)
|
||||
)
|
||||
(set! (-> (the-as menu-slider-option (-> *sound-options* options 2)) value-to-modify)
|
||||
(&-> *setting-control* user-default dialog-volume)
|
||||
)
|
||||
;; (set! (-> (the-as menu-slider-option (-> *sound-options* options 0)) value-to-modify)
|
||||
;; (&-> *pc-settings* memcard-volume-sfx)
|
||||
;; )
|
||||
;; (set! (-> (the-as menu-slider-option (-> *sound-options* options 1)) value-to-modify)
|
||||
;; (&-> *pc-settings* memcard-volume-music)
|
||||
;; )
|
||||
;; (set! (-> (the-as menu-slider-option (-> *sound-options* options 2)) value-to-modify)
|
||||
;; (&-> *pc-settings* memcard-volume-dialog)
|
||||
;; )
|
||||
(set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) task-line-index) 0)
|
||||
(set-setting-by-param *setting-control* 'extra-bank '((force2 menu1)) 0 0)
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
(set! (-> obj current-options) *graphic-options-pc*)
|
||||
)
|
||||
(('sound-options)
|
||||
(set! (-> obj current-options) *sound-options*)
|
||||
(set! (-> obj current-options) *sound-options-pc*)
|
||||
)
|
||||
(('select-load 'select-save)
|
||||
(set! (-> obj current-options) *load-save-options*)
|
||||
|
||||
@@ -6,9 +6,6 @@ Additional PC port specific file for overriding/expanding the progress menu
|
||||
This gives us more freedom to write code how we want.
|
||||
|#
|
||||
|
||||
;; in jak 2, the options dont have to be all-caps anymore!
|
||||
;; encode controller/display names - current bug waiting to happen
|
||||
|
||||
(define *title-pc*
|
||||
(new 'static 'menu-option-list
|
||||
:y-center #xc6
|
||||
@@ -39,6 +36,52 @@ This gives us more freedom to write code how we want.
|
||||
)
|
||||
)
|
||||
|
||||
(define *sound-options-pc*
|
||||
(progress-new-generic-scrolling-page (text-id progress-root-sound-options)
|
||||
(new 'static 'menu-generic-slider-option
|
||||
:name (text-id progress-sound-sfx-volume)
|
||||
:min-value 0.0
|
||||
:max-value 1.0
|
||||
:step 0.01
|
||||
:show-decimal? #t
|
||||
:get-value-fn (lambda () (-> *pc-settings* memcard-volume-sfx))
|
||||
:on-confirm (lambda ((val float))
|
||||
(set! (-> *pc-settings* memcard-volume-sfx) val)
|
||||
(pc-settings-save)
|
||||
(set! (-> *setting-control* user-default sfx-volume) val)))
|
||||
(new 'static 'menu-generic-slider-option
|
||||
:name (text-id progress-sound-music-volume)
|
||||
:min-value 0.0
|
||||
:max-value 1.0
|
||||
:step 0.01
|
||||
:show-decimal? #t
|
||||
:get-value-fn (lambda () (-> *pc-settings* memcard-volume-music))
|
||||
:on-confirm (lambda ((val float))
|
||||
(set! (-> *pc-settings* memcard-volume-music) val)
|
||||
(pc-settings-save)
|
||||
(set! (-> *setting-control* user-default music-volume) val)))
|
||||
(new 'static 'menu-generic-slider-option
|
||||
:name (text-id progress-sound-speech-volume)
|
||||
:min-value 0.0
|
||||
:max-value 1.0
|
||||
:step 0.01
|
||||
:show-decimal? #t
|
||||
:get-value-fn (lambda () (-> *pc-settings* memcard-volume-dialog))
|
||||
:on-confirm (lambda ((val float))
|
||||
(set! (-> *pc-settings* memcard-volume-dialog) val)
|
||||
(pc-settings-save)
|
||||
(set! (-> *setting-control* user-default dialog-volume) val)))
|
||||
(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-sound-format)
|
||||
:get-max-size-fn (lambda () 3)
|
||||
:get-item-label-fn (lambda ((index int))
|
||||
(case index
|
||||
((0) (lookup-text! *common-text* (text-id progress-sound-mono) #f))
|
||||
((1) (lookup-text! *common-text* (text-id progress-sound-stereo) #f))
|
||||
((2) (lookup-text! *common-text* (text-id progress-sound-surround) #f))))
|
||||
:get-item-index-fn (lambda () (-> *setting-control* user-default stereo-mode))
|
||||
:on-confirm (lambda ((index int) (the-progress progress)) (set! (-> *setting-control* user-default stereo-mode) index)))))
|
||||
|
||||
(define *options-pc* (new 'static 'menu-option-list
|
||||
:y-center #xc6
|
||||
:y-space 30
|
||||
@@ -138,7 +181,10 @@ This gives us more freedom to write code how we want.
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *setting-control* user-default vibration))
|
||||
:on-confirm (lambda ((val symbol)) (set! (-> *setting-control* user-default vibration) val)))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* memcard-vibration?) val)
|
||||
(pc-settings-save)
|
||||
(set! (-> *setting-control* user-default vibration) val)))
|
||||
(new 'static 'menu-generic-slider-option
|
||||
:name (text-id progress-controller-options-analog-deadzone)
|
||||
:min-value 0.0
|
||||
@@ -285,7 +331,10 @@ This gives us more freedom to write code how we want.
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *setting-control* user-default subtitle))
|
||||
:on-confirm (lambda ((val symbol)) (set! (-> *setting-control* user-default subtitle) val))))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* memcard-subtitles?) val)
|
||||
(pc-settings-save)
|
||||
(set! (-> *setting-control* user-default subtitle) val))))
|
||||
|
||||
(defmacro game-options-pc-subtitle-language ()
|
||||
`(new 'static 'menu-generic-carousel-option
|
||||
@@ -298,10 +347,27 @@ This gives us more freedom to write code how we want.
|
||||
(text-id language-name-italian)
|
||||
(text-id language-name-japanese)
|
||||
(text-id language-name-korean)
|
||||
(text-id language-name-english-uk))
|
||||
:get-item-index-fn (lambda () (-> *setting-control* user-default subtitle-language))
|
||||
(text-id language-name-english-uk)
|
||||
(text-id language-name-finnish))
|
||||
:get-item-index-fn (lambda ()
|
||||
;; workaround until all languages are added
|
||||
(if (<= (-> *setting-control* user-default subtitle-language) (language-enum uk-english))
|
||||
(-> *setting-control* user-default subtitle-language)
|
||||
(case (-> *setting-control* user-default subtitle-language)
|
||||
(((language-enum finnish)) 8)
|
||||
(else
|
||||
(format 0 "PROGRESS: Forgot to add subtitle language to workaround switch case, defaulting to english")
|
||||
0))))
|
||||
:on-confirm (lambda ((index int) (the-progress progress))
|
||||
(set! (-> *setting-control* user-default subtitle-language) (the-as language-enum index)))))
|
||||
;; workaround until all languages are added
|
||||
(if (<= index (language-enum uk-english))
|
||||
(set! (-> *setting-control* user-default subtitle-language) (the-as language-enum index))
|
||||
(set! (-> *setting-control* user-default subtitle-language)
|
||||
(case index
|
||||
((8) (language-enum finnish))
|
||||
(else
|
||||
(format 0 "PROGRESS: Forgot to add subtitle language to workaround switch case, defaulting to english")
|
||||
(language-enum english))))))))
|
||||
|
||||
(defmacro game-options-pc-sound-language ()
|
||||
`(new 'static 'menu-generic-carousel-option
|
||||
@@ -329,14 +395,30 @@ This gives us more freedom to write code how we want.
|
||||
(text-id language-name-italian)
|
||||
(text-id language-name-japanese)
|
||||
(text-id language-name-korean)
|
||||
(text-id language-name-english-uk))
|
||||
:get-item-index-fn (lambda () (-> *pc-settings* text-language))
|
||||
(text-id language-name-english-uk)
|
||||
(text-id language-name-finnish))
|
||||
:get-item-index-fn (lambda ()
|
||||
;; workaround until all languages are added
|
||||
(if (<= (-> *pc-settings* text-language) (pc-language uk-english))
|
||||
(-> *pc-settings* text-language)
|
||||
(case (-> *pc-settings* text-language)
|
||||
(((pc-language finnish)) 8)
|
||||
(else
|
||||
(format 0 "PROGRESS: Forgot to add text language to workaround switch case, defaulting to english")
|
||||
(pc-language english)))))
|
||||
:on-confirm (lambda ((index int) (the-progress progress))
|
||||
;; workaround until all languages are added
|
||||
(if (<= index (pc-language uk-english))
|
||||
(set! (-> *pc-settings* text-language) (the-as pc-language index))
|
||||
;; NOTE - this doesn't actually work (naughty dog tried it too in their progress code)
|
||||
;; fix it eventually
|
||||
(load-level-text-files (the-as int (-> *pc-settings* text-language)))
|
||||
(pc-settings-save))))
|
||||
(set! (-> *pc-settings* text-language)
|
||||
(case index
|
||||
((8) (pc-language finnish))
|
||||
(else
|
||||
(format 0 "PROGRESS: Forgot to add text language to workaround switch case, defaulting to english")
|
||||
(pc-language english)))))
|
||||
;; NOTE - this doesn't actually work (naughty dog tried it too in their progress code)
|
||||
(load-level-text-files (the-as int (-> *pc-settings* text-language)))
|
||||
(pc-settings-save))))
|
||||
|
||||
(defmacro misc-options-pc-discord-rpc ()
|
||||
`(new 'static 'menu-generic-boolean-option
|
||||
@@ -427,7 +509,7 @@ This gives us more freedom to write code how we want.
|
||||
|
||||
(define *graphic-options-pc*
|
||||
(progress-new-generic-scrolling-page (text-id progress-root-graphic-options)
|
||||
;; NOTE/TODO - this doesn't following the established generic menu pattern
|
||||
;; NOTE/TODO - this doesn't follow the established generic menu pattern
|
||||
;; a generic scrolling list menu component should be created (similar to menu-generic-details-page)
|
||||
;; so the code can be localized to functions instead of scattered around in a bunch of switch statements
|
||||
(new 'static 'menu-generic-to-resolutions-option
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
(defconstant PC_SUBTITLE_FILE_SIZE (* 384 1024)) ;; 384K heap for subtitles. adjust later if necessary.
|
||||
(defconstant PC_SUBTITLE_FILE_SIZE (* 600 1024)) ;; 600K heap for subtitles. adjust later if necessary.
|
||||
(defconstant PC_SUBTITLE_FILE_NAME "subti2")
|
||||
(defconstant PC_SUBTITLE_QUEUE_SIZE 5) ;; up to 8 things that display subtitles can be detected at once
|
||||
(defconstant PC_SUBTITLE_QUEUE_MAX_LINES 2) ;; up to 2 lines can be queued per queueable thing
|
||||
|
||||
+26
-26
@@ -38,31 +38,31 @@
|
||||
;; definition for method 118 of type enemy
|
||||
(defmethod rnd-float-range ((this enemy) (low float) (high float))
|
||||
"@param low The lower bound of the range (inclusive)
|
||||
@param high The upper bound of the range (exclusive)
|
||||
@returns A random float in the specified range"
|
||||
@param high The upper bound of the range (exclusive)
|
||||
@returns A random float in the specified range"
|
||||
(+ low (* (rand-vu) (- high low)))
|
||||
)
|
||||
|
||||
;; definition for method 119 of type enemy
|
||||
(defmethod rnd-int-count ((this enemy) (high int))
|
||||
"@param high The upper bound of the range (exclusive)
|
||||
@returns a random integer in the range 0 to `high`
|
||||
@see [[rand-vu]]"
|
||||
@returns a random integer in the range 0 to `high`
|
||||
@see [[rand-vu]]"
|
||||
(the int (* (rand-vu) (the float high)))
|
||||
)
|
||||
|
||||
;; definition for method 121 of type enemy
|
||||
(defmethod rnd-int-range ((this enemy) (low int) (high int))
|
||||
"@param low The lower bound of the range (inclusive)
|
||||
@param high The upper bound of the range (exclusive)
|
||||
@returns A random integer in the specified range"
|
||||
@param high The upper bound of the range (exclusive)
|
||||
@returns A random integer in the specified range"
|
||||
(+ low (the int (* (rand-vu) (the float (+ (- 1 low) high)))))
|
||||
)
|
||||
|
||||
;; definition for method 122 of type enemy
|
||||
(defmethod rnd-percent? ((this enemy) (chance float))
|
||||
"@param chance The value to compare ([[>=]]) with the result from [[rand-vu]].
|
||||
@returns If `chance` is greater than the random draw"
|
||||
@returns If `chance` is greater than the random draw"
|
||||
(>= chance (rand-vu))
|
||||
)
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
;; definition for method 59 of type enemy
|
||||
(defmethod get-penetrate-info ((this enemy))
|
||||
"@returns the allowed way(s) this enemy can take damage
|
||||
@see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]"
|
||||
@see [[penetrate]] and [[penetrated-by-all&hit-points->penetrated-by]]"
|
||||
(penetrated-by-all&hit-points->penetrated-by (-> this penetrated-by-all) (-> this hit-points))
|
||||
)
|
||||
|
||||
@@ -303,9 +303,9 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod common-post ((self enemy))
|
||||
"Does a lot of various things relating to interacting with the target
|
||||
- tracks when the enemy was last drawn
|
||||
- looks at the target and handles attacking
|
||||
@TODO Not extremely well understood yet"
|
||||
- tracks when the enemy was last drawn
|
||||
- looks at the target and handles attacking
|
||||
@TODO Not extremely well understood yet"
|
||||
(if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) (draw-control-status on-screen)))
|
||||
(set-time! (-> self last-draw-time))
|
||||
)
|
||||
@@ -803,7 +803,7 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod look-at-target! ((this enemy) (arg0 enemy-flag))
|
||||
"Logic for looking at the target that is locked on, sets some flags and adjusts the neck to look at the target if available
|
||||
@param flag Reacts to [[enemy-flag::death-start]] and [[enemy-flag::enable-on-active]], see implementation for details"
|
||||
@param flag Reacts to [[enemy-flag::death-start]] and [[enemy-flag::enable-on-active]], see implementation for details"
|
||||
(case arg0
|
||||
(((enemy-flag look-at-focus))
|
||||
(logclear! (-> this enemy-flags) (enemy-flag look-at-move-dest))
|
||||
@@ -846,7 +846,7 @@
|
||||
;; definition for method 126 of type enemy
|
||||
(defmethod enemy-above-ground? ((this enemy) (arg0 collide-query) (arg1 vector) (arg2 collide-spec) (arg3 float) (arg4 float) (arg5 float))
|
||||
"@returns if the enemy is above the ground or not
|
||||
@see [[above-ground?]]"
|
||||
@see [[above-ground?]]"
|
||||
(above-ground? (-> this root) arg0 arg1 arg2 arg3 arg4 arg5)
|
||||
)
|
||||
|
||||
@@ -1060,7 +1060,7 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod set-enemy-info! ((this enemy) (arg0 enemy-info))
|
||||
"In addition to setting the `enemy-info`, also init the `neck-joint` if applicable from it
|
||||
@param info Set `enemy-info` accordingly"
|
||||
@param info Set `enemy-info` accordingly"
|
||||
(set! (-> this enemy-info) arg0)
|
||||
(when (and (!= (-> this enemy-info neck-joint) -1) (zero? (-> this neck)))
|
||||
(set! (-> this neck)
|
||||
@@ -1291,11 +1291,11 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this enemy) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(init-enemy-collision! this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(init-enemy! this)
|
||||
@@ -1351,10 +1351,10 @@ This commonly includes things such as:
|
||||
;; definition for method 98 of type enemy
|
||||
(defmethod in-aggro-range? ((this enemy) (arg0 process-focusable) (arg1 vector))
|
||||
"Should the enemy activate.
|
||||
- if `activate-distance` is `0.0`, always true
|
||||
- otherwise, check if the provided process is close enough
|
||||
@param proc The process used to distance check
|
||||
@returns true/false"
|
||||
- if `activate-distance` is `0.0`, always true
|
||||
- otherwise, check if the provided process is close enough
|
||||
@param proc The process used to distance check
|
||||
@returns true/false"
|
||||
#t
|
||||
)
|
||||
|
||||
@@ -1528,8 +1528,8 @@ This commonly includes things such as:
|
||||
;; WARN: Return type mismatch int vs enemy-aware.
|
||||
(defmethod update-target-awareness! ((this enemy) (arg0 process-focusable) (arg1 enemy-best-focus))
|
||||
"Checks a variety of criteria to determine the level of awareness the enemy is of the target. Sets `aware` and related fields as well!
|
||||
@TODO - flesh out docs
|
||||
@returns the value that sets `aware`"
|
||||
@TODO - flesh out docs
|
||||
@returns the value that sets `aware`"
|
||||
(let ((f30-0 (vector-vector-distance (get-trans arg0 0) (-> this root trans)))
|
||||
(s3-1 #f)
|
||||
(s2-0 #f)
|
||||
@@ -1673,7 +1673,7 @@ This commonly includes things such as:
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod general-event-handler ((this enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
"Handles various events for the enemy
|
||||
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
|
||||
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
|
||||
(local-vars (s5-5 rgbaf) (sv-432 process) (sv-448 event-message-block))
|
||||
(cond
|
||||
((= arg2 'track)
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod play-communicator-speech! ((this talker-speech-class))
|
||||
"Plays the provided [[talker-speech-class]]
|
||||
@TODO - understand the array from [[game-info]] better"
|
||||
@TODO - understand the array from [[game-info]] better"
|
||||
(set! (-> *game-info* unknown-pad6 (+ (* (-> this speech) 2) 1)) (the-as uint #xffff))
|
||||
0
|
||||
(none)
|
||||
|
||||
+4
-4
@@ -141,10 +141,10 @@
|
||||
;; definition for method 10 of type align-control
|
||||
(defmethod align! ((this align-control) (options align-opts) (x float) (y float) (z float))
|
||||
"As long as [[align-flags::0]] is not set call [[process-drawable::16]] on the process being controlled
|
||||
using the arguments passed to construct a [[vector]] - <`x`, `y`, `z`, 1.0>
|
||||
|
||||
@returns the `root` of the [[process-drawable]] after the method returns
|
||||
@see [[process-drawable::16]]"
|
||||
using the arguments passed to construct a [[vector]] - <`x`, `y`, `z`, 1.0>
|
||||
|
||||
@returns the `root` of the [[process-drawable]] after the method returns
|
||||
@see [[process-drawable::16]]"
|
||||
(when (not (logtest? (-> this flags) (align-flags disabled)))
|
||||
(let* ((process (-> this process))
|
||||
(method-call (method-of-object process apply-alignment))
|
||||
|
||||
+3
-3
@@ -41,9 +41,9 @@
|
||||
;; definition for function camera-pos
|
||||
(defun camera-pos ()
|
||||
"Returns the `trans` vector from whatever is first determined to exist:
|
||||
- [[*camera-combiner*]]
|
||||
- [[*math-camera*]]
|
||||
- else, [[*camera-dummy-vector*]]"
|
||||
- [[*camera-combiner*]]
|
||||
- [[*math-camera*]]
|
||||
- else, [[*camera-dummy-vector*]]"
|
||||
(cond
|
||||
(*camera-combiner*
|
||||
(-> *camera-combiner* trans)
|
||||
|
||||
+18
-18
@@ -43,7 +43,7 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-plat! ((this base-plat))
|
||||
"Does any necessary initial platform setup.
|
||||
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
|
||||
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -64,8 +64,8 @@ For example for an elevator pre-compute the distance between the first and last
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod start-bouncing! ((this base-plat))
|
||||
"Sets `bouncing` to [[#t]] and sets up the clock to periodically bounce
|
||||
and translate the platform via the `smush`
|
||||
@see [[smush-control]]"
|
||||
and translate the platform via the `smush`
|
||||
@see [[smush-control]]"
|
||||
(activate! (-> this smush) -1.0 60 150 1.0 1.0 (-> self clock))
|
||||
(set-time! (-> this bounce-time))
|
||||
(set! (-> this bouncing) #t)
|
||||
@@ -81,8 +81,8 @@ and translate the platform via the `smush`
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defbehavior plat-code base-plat ()
|
||||
"After calling [[transform-post]] for 2 consecutive frames, put the process to sleep if it's not bouncing
|
||||
otherwise, continue bouncing...forever!
|
||||
@see [[transform-post]]"
|
||||
otherwise, continue bouncing...forever!
|
||||
@see [[transform-post]]"
|
||||
(transform-post)
|
||||
(suspend)
|
||||
(transform-post)
|
||||
@@ -105,9 +105,9 @@ otherwise, continue bouncing...forever!
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior plat-trans base-plat ()
|
||||
"If the platform is `bouncing`, move the platform accordingly with the [[smush-control]]
|
||||
- If the amplitude of the `smush` has hit `0.0` then stop bouncing
|
||||
|
||||
If we aren't bouncing however, TODO - CSHAPE"
|
||||
- If the amplitude of the `smush` has hit `0.0` then stop bouncing
|
||||
|
||||
If we aren't bouncing however, TODO - CSHAPE"
|
||||
(rider-trans)
|
||||
(cond
|
||||
((-> self bouncing)
|
||||
@@ -160,7 +160,7 @@ If we aren't bouncing however, TODO - CSHAPE"
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defbehavior plat-event base-plat ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
"Handles platform related events. Presently all this does is:
|
||||
- if `event-type` is [['bonk]], then call [[base-plat:29]]"
|
||||
- if `event-type` is [['bonk]], then call [[base-plat:29]]"
|
||||
(case event-type
|
||||
(('bonk)
|
||||
(start-bouncing! self)
|
||||
@@ -226,9 +226,9 @@ If we aren't bouncing however, TODO - CSHAPE"
|
||||
;; WARN: Return type mismatch symbol vs object.
|
||||
(defbehavior eco-door-event-handler eco-door ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
"If the `event-type` is `'trigger`, flip the `locked` flag on the door
|
||||
and play the respective sound
|
||||
|
||||
@unused - likely a leftover from Jak 1"
|
||||
and play the respective sound
|
||||
|
||||
@unused - likely a leftover from Jak 1"
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(set! (-> self locked) (not (-> self locked)))
|
||||
@@ -380,7 +380,7 @@ eco-door-event-handler
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod lock-according-to-task! ((this eco-door))
|
||||
"If the associated subtask is completed, lock the door if [[eco-door-flags:0]] is set
|
||||
otherwise, lock it if [[eco-door-flags:0]] is set"
|
||||
otherwise, lock it if [[eco-door-flags:0]] is set"
|
||||
(when (-> this state-actor)
|
||||
(if (logtest? (-> this state-actor extra perm status) (entity-perm-status subtask-complete))
|
||||
(set! (-> this locked) (logtest? (-> this flags) (eco-door-flags ecdf01)))
|
||||
@@ -427,11 +427,11 @@ otherwise, lock it if [[eco-door-flags:0]] is set"
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this eco-door) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(eco-door-method-25 this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(let ((door-scale (res-lump-float (-> this entity) 'scale :default 1.0)))
|
||||
|
||||
+8
-8
@@ -291,9 +291,9 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod send-event! ((this basebutton) (event-type symbol))
|
||||
"Prepares an [[event-message-block]] using the provided type to send an event to:
|
||||
- the `notify-actor`
|
||||
- every [[entity-actor]] in the `actor-group` array
|
||||
@see [[entity-actor]]"
|
||||
- the `notify-actor`
|
||||
- every [[entity-actor]] in the `actor-group` array
|
||||
@see [[entity-actor]]"
|
||||
(when event-type
|
||||
(let ((event (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> event from) (process->ppointer self))
|
||||
@@ -427,11 +427,11 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this basebutton) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(local-vars (sv-16 res-tag))
|
||||
(reset! this)
|
||||
(set! (-> this button-id) -1)
|
||||
|
||||
+5
-5
@@ -175,11 +175,11 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this blocking-plane) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(let ((s5-0 (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f))
|
||||
(f30-0 (res-lump-float (-> this entity) 'height :default 122880.0))
|
||||
)
|
||||
|
||||
+45
-45
@@ -1345,11 +1345,11 @@
|
||||
;; definition for method 11 of type eco-yellow
|
||||
(defmethod init-from-entity! ((this eco-yellow) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(init-common this arg0 (pickup-type eco-yellow) (-> *FACT-bank* eco-single-inc))
|
||||
(none)
|
||||
)
|
||||
@@ -1375,11 +1375,11 @@ This commonly includes things such as:
|
||||
;; definition for method 11 of type eco-red
|
||||
(defmethod init-from-entity! ((this eco-red) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(init-common this arg0 (pickup-type eco-red) (-> *FACT-bank* eco-single-inc))
|
||||
(none)
|
||||
)
|
||||
@@ -1405,11 +1405,11 @@ This commonly includes things such as:
|
||||
;; definition for method 11 of type eco-blue
|
||||
(defmethod init-from-entity! ((this eco-blue) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(init-common this arg0 (pickup-type eco-blue) (-> *FACT-bank* eco-single-inc))
|
||||
(none)
|
||||
)
|
||||
@@ -1435,11 +1435,11 @@ This commonly includes things such as:
|
||||
;; definition for method 11 of type eco-green
|
||||
(defmethod init-from-entity! ((this eco-green) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(init-common this arg0 (pickup-type eco-green) (-> *FACT-bank* eco-single-inc))
|
||||
(none)
|
||||
)
|
||||
@@ -1465,11 +1465,11 @@ This commonly includes things such as:
|
||||
;; definition for method 11 of type health
|
||||
(defmethod init-from-entity! ((this health) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(init-common this arg0 (pickup-type health) (-> *FACT-bank* health-default-inc))
|
||||
(none)
|
||||
)
|
||||
@@ -1520,11 +1520,11 @@ This commonly includes things such as:
|
||||
;; definition for method 11 of type eco-pill
|
||||
(defmethod init-from-entity! ((this eco-pill) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(init-common this arg0 (pickup-type eco-pill-green) (-> *FACT-bank* health-small-inc))
|
||||
(none)
|
||||
)
|
||||
@@ -1749,11 +1749,11 @@ This commonly includes things such as:
|
||||
;; definition for method 11 of type money
|
||||
(defmethod init-from-entity! ((this money) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(initialize-allocations this)
|
||||
(process-drawable-from-entity! this (-> this entity))
|
||||
(initialize-options this 0 1024.0 (the-as fact-info #f))
|
||||
@@ -2393,11 +2393,11 @@ This commonly includes things such as:
|
||||
;; definition for method 11 of type trick-point
|
||||
(defmethod init-from-entity! ((this trick-point) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(initialize-allocations this)
|
||||
(process-drawable-from-entity! this (-> this entity))
|
||||
(initialize-options this 0 1024.0 (the-as fact-info #f))
|
||||
@@ -2713,11 +2713,11 @@ This commonly includes things such as:
|
||||
;; definition for method 11 of type eco
|
||||
(defmethod init-from-entity! ((this eco) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(let ((v1-1 (res-lump-value (-> this entity) 'eco-info uint128 :time -1000000000.0)))
|
||||
(set! (-> this type) (cond
|
||||
((= (the-as uint v1-1) 3)
|
||||
|
||||
+6
-6
@@ -145,7 +145,7 @@
|
||||
;; WARN: Return type mismatch object vs ambient-sound.
|
||||
(defmethod set-and-get-ambient-sound! ((this conveyor))
|
||||
"So long as [[actor-option::16]] is not set, fetch the [[ambient-sound]] for the [[conveyor]]
|
||||
and return it as well. Otherwise, set it to `0`"
|
||||
and return it as well. Otherwise, set it to `0`"
|
||||
(let ((actor-options (res-lump-value (-> this entity) 'options actor-option :time -1000000000.0)))
|
||||
(the-as
|
||||
ambient-sound
|
||||
@@ -429,11 +429,11 @@ and return it as well. Otherwise, set it to `0`"
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this conveyor) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(reset-root! this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(initialize-skeleton this (the-as skeleton-group (get-art-group this)) (the-as pair 0))
|
||||
|
||||
+5
-9
@@ -1168,11 +1168,11 @@
|
||||
;; definition for method 11 of type crate
|
||||
(defmethod init-from-entity! ((this crate) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(crate-init! this arg0)
|
||||
(skel-init! this)
|
||||
(crate-method-38 this)
|
||||
@@ -1471,7 +1471,3 @@ This commonly includes things such as:
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
+29
-29
@@ -136,10 +136,10 @@
|
||||
;; definition for method 43 of type elevator
|
||||
(defmethod move-between-points ((this elevator) (arg0 vector) (arg1 float) (arg2 float))
|
||||
"Move between two points on the elevator's path
|
||||
@param vec TODO not sure
|
||||
@param point-a The first point fetched from the elevator's path
|
||||
@param point-b The second point fetched from the path
|
||||
@see [[path-control]] and [[elevator]]"
|
||||
@param vec TODO not sure
|
||||
@param point-a The first point fetched from the elevator's path
|
||||
@param point-b The second point fetched from the path
|
||||
@see [[path-control]] and [[elevator]]"
|
||||
#f
|
||||
)
|
||||
|
||||
@@ -183,11 +183,11 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-defaults! ((this elevator))
|
||||
"Initializes default settings related to the [[elevator]]:
|
||||
- `elevator-xz-threshold`
|
||||
- `elevator-y-threshold`
|
||||
- `elevator-start-pos`
|
||||
- `elevator-move-rate`
|
||||
- `elevator-flags`"
|
||||
- `elevator-xz-threshold`
|
||||
- `elevator-y-threshold`
|
||||
- `elevator-start-pos`
|
||||
- `elevator-move-rate`
|
||||
- `elevator-flags`"
|
||||
(let ((entity (-> this entity)))
|
||||
(set! (-> this params xz-threshold) ((method-of-object entity get-property-value-float)
|
||||
entity
|
||||
@@ -252,8 +252,8 @@
|
||||
;; definition for function ease-value-in-out
|
||||
(defun ease-value-in-out ((value float) (step-amount float))
|
||||
"TODO - the math in this function is full of duplication and isn't totally clear
|
||||
but if the name is to be believed, it's to slow a values grow at the beginning and end of it's range
|
||||
which is obviously useful for an elevator."
|
||||
but if the name is to be believed, it's to slow a values grow at the beginning and end of it's range
|
||||
which is obviously useful for an elevator."
|
||||
(let* ((step step-amount)
|
||||
(f4-0 (- 1.0 step-amount))
|
||||
(f3-0 (/ step (- 1.0 f4-0)))
|
||||
@@ -421,13 +421,13 @@ which is obviously useful for an elevator."
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod find-closest-point-in-path! ((this elevator) (arg0 vector) (arg1 (pointer float)) (arg2 symbol) (arg3 symbol))
|
||||
"Finds and sets the provided [[path-step]]'s `next-pos` field to the vertex index in the path which is closest to
|
||||
the provided [[vector]]
|
||||
|
||||
@param vec The point at which distance calculations are based off
|
||||
@param! next-step If a point is found, `next-pos` will be set to the correct point
|
||||
@param arg2 TODO
|
||||
@param arg3 TODO
|
||||
@returns [[#t]] if a point in the path was found"
|
||||
the provided [[vector]]
|
||||
|
||||
@param vec The point at which distance calculations are based off
|
||||
@param! next-step If a point is found, `next-pos` will be set to the correct point
|
||||
@param arg2 TODO
|
||||
@param arg3 TODO
|
||||
@returns [[#t]] if a point in the path was found"
|
||||
(local-vars (path-point vector))
|
||||
(let ((elev-params (-> this params))
|
||||
(smallest-dist 0.0)
|
||||
@@ -494,8 +494,8 @@ the provided [[vector]]
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod move-to-next-point! ((this elevator))
|
||||
"If the [[*target*]] is in a valid state and there is a point to transition to in the elevator's path
|
||||
do so.
|
||||
@see [[elevator::47]]"
|
||||
do so.
|
||||
@see [[elevator::47]]"
|
||||
(local-vars (zero float))
|
||||
(let ((target *target*))
|
||||
(when (and target
|
||||
@@ -765,9 +765,9 @@ do so.
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod calc-dist-between-points! ((this elevator) (path-point-x int) (path-point-y int))
|
||||
"Calculates the distance between two points in the elevator's path.
|
||||
|
||||
@param path-point-x The index of the first point in the distance calculation, and where `next-pos` and `dist` are stored in the `path-seq` array
|
||||
@param path-point-y The second point in the distance calculation"
|
||||
|
||||
@param path-point-x The index of the first point in the distance calculation, and where `next-pos` and `dist` are stored in the `path-seq` array
|
||||
@param path-point-y The second point in the distance calculation"
|
||||
(set! (-> this path-seq data path-point-x next-pos) (the float path-point-y))
|
||||
(let ((point-x (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float path-point-x) 'interp))
|
||||
(point-y (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float path-point-y) 'interp))
|
||||
@@ -791,7 +791,7 @@ do so.
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-plat! ((this elevator))
|
||||
"Does any necessary initial platform setup.
|
||||
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
|
||||
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -832,11 +832,11 @@ For example for an elevator pre-compute the distance between the first and last
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this elevator) (entity entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(local-vars (sv-32 float) (sv-36 path-control) (sv-40 target))
|
||||
(init-plat-collision! this)
|
||||
(process-drawable-from-entity! this entity)
|
||||
|
||||
+25
-25
@@ -242,11 +242,11 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this swingpole) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
"Copy defaults from the entity."
|
||||
(stack-size-set! (-> this main-thread) 128)
|
||||
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
@@ -343,11 +343,11 @@ This commonly includes things such as:
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this process-hidden) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
"Copy defaults from the entity."
|
||||
(process-entity-status! this (entity-perm-status dead) #t)
|
||||
(go (method-of-object this die))
|
||||
@@ -2050,11 +2050,11 @@ This commonly includes things such as:
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this med-res-level) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(stack-size-set! (-> this main-thread) 128)
|
||||
(let ((s4-0 (res-lump-struct arg0 'art-name structure))
|
||||
(s3-0 (res-lump-struct (-> this entity) 'level structure))
|
||||
@@ -2137,11 +2137,11 @@ This commonly includes things such as:
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this part-spawner) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(local-vars (sv-16 string))
|
||||
(stack-size-set! (-> this main-thread) 128)
|
||||
(logior! (-> this mask) (process-mask ambient))
|
||||
@@ -2783,11 +2783,11 @@ This commonly includes things such as:
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this launcher) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(stack-size-set! (-> this main-thread) 128)
|
||||
(let ((s4-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(let ((v1-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0))))
|
||||
|
||||
+9
-9
@@ -74,7 +74,7 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-plat! ((this plat))
|
||||
"Does any necessary initial platform setup.
|
||||
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
|
||||
For example for an elevator pre-compute the distance between the first and last points (both ways) and clear the sound."
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -89,9 +89,9 @@ For example for an elevator pre-compute the distance between the first and last
|
||||
;; definition for method 36 of type plat
|
||||
(defmethod plat-path-sync ((this plat))
|
||||
"If the `sync` period is greater than `0` then transition the state to [[plat::35]]
|
||||
otherwise, [[plat::34]]
|
||||
|
||||
@see [[sync-eased]]"
|
||||
otherwise, [[plat::34]]
|
||||
|
||||
@see [[sync-eased]]"
|
||||
(cond
|
||||
((logtest? (-> this path flags) (path-control-flag not-found))
|
||||
(go (method-of-object this plat-idle))
|
||||
@@ -166,11 +166,11 @@ otherwise, [[plat::34]]
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this plat) (entity entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(logior! (-> this mask) (process-mask platform))
|
||||
(init-plat-collision! this)
|
||||
(process-drawable-from-entity! this entity)
|
||||
|
||||
+3
-3
@@ -90,9 +90,9 @@
|
||||
;; definition for method 36 of type projectile
|
||||
(defmethod handle-proj-hit! ((this projectile) (arg0 process) (arg1 event-message-block))
|
||||
"When a projectile hits something, first deal damage via [[projectile::37]]
|
||||
and increment the projectiles hit count.
|
||||
|
||||
If we've met or exceeded the projectiles maximum allowed hits, switch to the [[projectile::impact]] state"
|
||||
and increment the projectiles hit count.
|
||||
|
||||
If we've met or exceeded the projectiles maximum allowed hits, switch to the [[projectile::impact]] state"
|
||||
(when (-> this attack-mode)
|
||||
(let ((a2-1 (-> arg1 param 0)))
|
||||
(when (deal-damage! this arg0 (the-as event-message-block a2-1))
|
||||
|
||||
+5
-5
@@ -551,11 +551,11 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-from-entity! ((this rigid-body-platform) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(logior! (-> this mask) (process-mask platform))
|
||||
(allocate-and-init-cshape this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
|
||||
+5
-5
@@ -608,11 +608,11 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this judge) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(setup-collision this)
|
||||
(init this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
|
||||
+5
-5
@@ -682,11 +682,11 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this water-anim) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(water-anim-method-27 this)
|
||||
(reset-root! this)
|
||||
(water-anim-init! this)
|
||||
|
||||
+10
-10
@@ -174,9 +174,9 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod clear-history-entries! ((this history))
|
||||
"Iterates through each [[history-elt]] in the `elt` dynamic array
|
||||
For each entry:
|
||||
- clear `timestamp`
|
||||
- clear `record-tag`"
|
||||
For each entry:
|
||||
- clear `timestamp`
|
||||
- clear `record-tag`"
|
||||
(set! (-> this alloc-index) 0)
|
||||
(countdown (v1-0 (-> this allocated-length))
|
||||
(let ((a1-3 (-> this elts v1-0)))
|
||||
@@ -199,10 +199,10 @@ For each entry:
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defmethod clear-record-tags! ((this history) (arg0 history-channel) (arg1 uint) (arg2 uint))
|
||||
"First grab the latest [[history-elt]] at `alloc-index`
|
||||
1. update it's `channel`, `record-id` and `owner` from the provided args
|
||||
2. - if it's `record-tag` is zero -- return it
|
||||
- otherwise, iterate through all `elts` until one is found that does not match it's `timestamp`
|
||||
- if not `0` out the `record-tag` for that elt and continue iteration"
|
||||
1. update it's `channel`, `record-id` and `owner` from the provided args
|
||||
2. - if it's `record-tag` is zero -- return it
|
||||
- otherwise, iterate through all `elts` until one is found that does not match it's `timestamp`
|
||||
- if not `0` out the `record-tag` for that elt and continue iteration"
|
||||
(let* ((t1-0 (-> this alloc-index))
|
||||
(v1-0 (-> this elts))
|
||||
(v0-0 (-> v1-0 t1-0))
|
||||
@@ -253,9 +253,9 @@ For each entry:
|
||||
;; definition for method 10 of type history-iterator
|
||||
(defmethod update-entries! ((this history-iterator))
|
||||
"Iterate through each [[history-elt]] in [[*history*]]
|
||||
- If we hit the end set `done?` to true
|
||||
- If the `timestamp` on the elt, minus the current framecounter exceeds `max-age`, we are also done, return #f
|
||||
- However if we find an elt who's `owner` matches the iterator's, break out early returning that `elt`"
|
||||
- If we hit the end set `done?` to true
|
||||
- If the `timestamp` on the elt, minus the current framecounter exceeds `max-age`, we are also done, return #f
|
||||
- However if we find an elt who's `owner` matches the iterator's, break out early returning that `elt`"
|
||||
(let ((v1-0 *history*)
|
||||
(a1-2 (-> *display* base-clock frame-counter))
|
||||
)
|
||||
|
||||
+8
-8
@@ -64,9 +64,9 @@
|
||||
;; definition for function mem-size
|
||||
(defun mem-size ((data basic) (inspect-usage? symbol) (arg2 int))
|
||||
"@param data The [[basic]] to call `mem-usage` on
|
||||
@param inspect-usage? Set to [[#t]] if `inspect` should be called on the resulting [[memory-usage-block]]
|
||||
@param arg2 TODO - unsure, some sort of bitfield
|
||||
@returns The total memory footprint of the provided [[basic]]"
|
||||
@param inspect-usage? Set to [[#t]] if `inspect` should be called on the resulting [[memory-usage-block]]
|
||||
@param arg2 TODO - unsure, some sort of bitfield
|
||||
@returns The total memory footprint of the provided [[basic]]"
|
||||
(let ((block (new 'stack 'memory-usage-block)))
|
||||
(mem-usage data block arg2)
|
||||
(if inspect-usage?
|
||||
@@ -79,11 +79,11 @@
|
||||
;; definition for method 14 of type level
|
||||
(defmethod compute-memory-usage! ((this level) (force? symbol))
|
||||
"Calculates the memory usage of the level, returns and stores the [[memory-usage-block]]
|
||||
in `mem-usage-block` as well as the total size in `mem-usage`
|
||||
|
||||
@param force? - Will re-compute the usage if set to [[#t]], even if `mem-usage` has been set to a non-zero value
|
||||
@returns The [[memory-usage-block]] representing the footprint of the level
|
||||
@see [[memory-usage-block::10]]"
|
||||
in `mem-usage-block` as well as the total size in `mem-usage`
|
||||
|
||||
@param force? - Will re-compute the usage if set to [[#t]], even if `mem-usage` has been set to a non-zero value
|
||||
@returns The [[memory-usage-block]] representing the footprint of the level
|
||||
@see [[memory-usage-block::10]]"
|
||||
(if (zero? (-> this mem-usage-block))
|
||||
(set! (-> this mem-usage-block) (new 'debug 'memory-usage-block))
|
||||
)
|
||||
|
||||
+8
-8
@@ -311,7 +311,7 @@
|
||||
;; definition for method 13 of type mysql-nav-graph
|
||||
(defmethod alloc-new-node! ((this mysql-nav-graph))
|
||||
"Allocates a new `[[mysql-nav-node]]`, if `node-array`'s `length` exceeds `3000` return `-1`
|
||||
otherwise, return the new size of the array"
|
||||
otherwise, return the new size of the array"
|
||||
(cond
|
||||
((>= (-> this node-array length) 3000)
|
||||
(format #t "mysql-nav-graph : nodes buffer too small, increase NAV_GRAPH_EDITOR_NODE_COUNT~%")
|
||||
@@ -336,7 +336,7 @@ otherwise, return the new size of the array"
|
||||
;; definition for method 14 of type mysql-nav-graph
|
||||
(defmethod alloc-new-edge! ((this mysql-nav-graph))
|
||||
"Allocates a new `[[mysql-nav-edge]]`, if `edge-array`'s `length` exceeds `5000` return `-1`
|
||||
otherwise, return the new size of the array"
|
||||
otherwise, return the new size of the array"
|
||||
(cond
|
||||
((>= (-> this edge-array length) 5000)
|
||||
(format #t "mysql-nav-graph : edges buffer too small, increase NAV_GRAPH_EDITOR_EDGE_COUNT~%")
|
||||
@@ -361,7 +361,7 @@ otherwise, return the new size of the array"
|
||||
;; definition for method 15 of type mysql-nav-graph
|
||||
(defmethod indexof-visnode ((this mysql-nav-graph) (edge-id int) (node-id int))
|
||||
"Returns the index in the `visnode-array` whom's [[mysql-nav-visnode]] has the provided `runtime-edge-id` and `runtime-node-id`
|
||||
if none exist, return `-1`"
|
||||
if none exist, return `-1`"
|
||||
(dotimes (v1-0 (-> this visnode-array length))
|
||||
(let ((a3-2 (-> this visnode-array data v1-0)))
|
||||
(if (and (= (-> a3-2 runtime-edge-id) edge-id) (= (-> a3-2 runtime-node-id) node-id))
|
||||
@@ -375,9 +375,9 @@ if none exist, return `-1`"
|
||||
;; definition for method 16 of type mysql-nav-graph
|
||||
(defmethod alloc-new-visnode! ((this mysql-nav-graph) (edge-id int) (node-id int))
|
||||
"Potentially allocates a new `[[mysql-nav-visnode]]`:
|
||||
- if `visnode-array`'s `length` exceeds `3000` return `-1`
|
||||
- otherwise, if the node already exists, TODO
|
||||
- if the node does not already exist, create it!"
|
||||
- if `visnode-array`'s `length` exceeds `3000` return `-1`
|
||||
- otherwise, if the node already exists, TODO
|
||||
- if the node does not already exist, create it!"
|
||||
(cond
|
||||
((>= (-> this visnode-array length) 3000)
|
||||
(format #t "mysql-nav-graph : visnodes buffer too small, increase NAV_GRAPH_EDITOR_VISNODE_COUNT~%")
|
||||
@@ -777,7 +777,7 @@ if none exist, return `-1`"
|
||||
;; definition for method 11 of type mysql-nav-graph
|
||||
(defmethod indexof-nav-node ((this mysql-nav-graph) (node-id int))
|
||||
"Iterate through the `node-array` and return the index for the first [[mysql-nav-node]] whom's `nav_node_id` matches the provided id
|
||||
returns `-1` if none is found"
|
||||
returns `-1` if none is found"
|
||||
(dotimes (v1-0 (-> this node-array length))
|
||||
(if (= node-id (-> (the-as mysql-nav-node (-> this node-array data v1-0)) nav_node_id))
|
||||
(return v1-0)
|
||||
@@ -789,7 +789,7 @@ returns `-1` if none is found"
|
||||
;; definition for method 12 of type mysql-nav-graph
|
||||
(defmethod indexof-nav-edge ((this mysql-nav-graph) (edge-id int))
|
||||
"Iterate through the `edge-array` and return the index for the first [[mysql-nav-edge]] whom's `nav_edge_id` matches the provided id
|
||||
returns `-1` if none is found"
|
||||
returns `-1` if none is found"
|
||||
(dotimes (v1-0 (-> this edge-array length))
|
||||
(if (= edge-id (-> (the-as mysql-nav-edge (-> this edge-array data v1-0)) nav_edge_id))
|
||||
(return v1-0)
|
||||
|
||||
+2
-2
@@ -30,8 +30,8 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun-debug sampler-start ()
|
||||
"Reset the [[timer-bank]] EE registers.
|
||||
- If [[*sampler-mem*]] is undefined, allocate 16.7MB in the debug segment
|
||||
- and when [[*sampler-mem*]] is defined, initialize the [[timer-bank]] fully. Reset [[*sampler-count*]] to 0 as well"
|
||||
- If [[*sampler-mem*]] is undefined, allocate 16.7MB in the debug segment
|
||||
- and when [[*sampler-mem*]] is defined, initialize the [[timer-bank]] fully. Reset [[*sampler-count*]] to 0 as well"
|
||||
(set! (-> (the-as timer-bank #x10000000) mode) (new 'static 'timer-mode))
|
||||
(set! (-> (the-as timer-bank #x10000000) count) (the-as uint 0))
|
||||
(set! (-> (the-as timer-bank #x10000000) comp) *sampler-compare*)
|
||||
|
||||
+5
-5
@@ -218,11 +218,11 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this viewer) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(set! *viewer* this)
|
||||
(set! (-> this root) (new 'process 'trsqv))
|
||||
(process-drawable-from-entity! this arg0)
|
||||
|
||||
+3
-3
@@ -513,9 +513,9 @@
|
||||
;; INFO: Used lq/sq
|
||||
(defun disasm-dma-list ((arg0 dma-packet) (arg1 symbol) (arg2 symbol) (arg3 symbol) (arg4 int))
|
||||
"Print out an entire DMA list.
|
||||
If mode is #t, print vif tags too. If mode is 'details, also print data unpacked by vif-tags.
|
||||
If verbose is #t, print out the addresses of each tag, and total size statistics.
|
||||
If expected size is negative, it is ignored. Otherwise, only disassemble this much dma data."
|
||||
If mode is #t, print vif tags too. If mode is 'details, also print data unpacked by vif-tags.
|
||||
If verbose is #t, print out the addresses of each tag, and total size statistics.
|
||||
If expected size is negative, it is ignored. Otherwise, only disassemble this much dma data."
|
||||
(local-vars
|
||||
(sv-16 object)
|
||||
(sv-32 dma-packet)
|
||||
|
||||
+4
-4
@@ -218,10 +218,10 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod collect-regions ((this drawable) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
|
||||
"Determines the number of [[drawable]]s in the `obj` that overlap the given `area-of-interest` this number is stored in the `region-list`'s item count
|
||||
@param area-of-interest The area defined by a sphere that we care about overlaps
|
||||
@param _count The amount of [[drawable]]s in the object to enumerate through
|
||||
@param! region-list Stores the overlapping regions and a count for how many were found
|
||||
@returns none"
|
||||
@param area-of-interest The area defined by a sphere that we care about overlaps
|
||||
@param _count The amount of [[drawable]]s in the object to enumerate through
|
||||
@param! region-list Stores the overlapping regions and a count for how many were found
|
||||
@returns none"
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
+6
-6
@@ -26,7 +26,7 @@
|
||||
;; INFO: Used lq/sq
|
||||
(defun entity-actor-count ((arg0 res-lump) (arg1 symbol))
|
||||
"Get the number of entities that this res references under the name.
|
||||
This works on more than just next/prev."
|
||||
This works on more than just next/prev."
|
||||
(local-vars (sv-16 res-tag))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
(if (res-lump-data arg0 arg1 pointer :tag-ptr (& sv-16))
|
||||
@@ -95,8 +95,8 @@ and use it for entity lookups."
|
||||
;; definition for method 0 of type actor-link-info
|
||||
(defmethod new actor-link-info ((allocation symbol) (type-to-make type) (arg0 process) (arg1 symbol))
|
||||
"Set up an actor-link-info for the given process.
|
||||
The entity of this process should be the entity-actor
|
||||
that will get this actor-link-info."
|
||||
The entity of this process should be the entity-actor
|
||||
that will get this actor-link-info."
|
||||
(let* ((a0-1 (-> arg0 entity))
|
||||
(s4-0 (entity-actor-lookup a0-1 'next-actor 0))
|
||||
(a0-2 (-> arg0 entity))
|
||||
@@ -152,7 +152,7 @@ that will get this actor-link-info."
|
||||
;; definition for method 16 of type actor-link-info
|
||||
(defmethod apply-function-forward ((this actor-link-info) (arg0 (function entity-actor object object)) (arg1 object))
|
||||
"Iterate forward through actors, and apply this function. Starts at (-> this next)
|
||||
If the function returns truthy, stop iterating."
|
||||
If the function returns truthy, stop iterating."
|
||||
(let ((s3-0 (-> this next)))
|
||||
(while s3-0
|
||||
(if (arg0 s3-0 arg1)
|
||||
@@ -167,7 +167,7 @@ If the function returns truthy, stop iterating."
|
||||
;; definition for method 17 of type actor-link-info
|
||||
(defmethod apply-function-reverse ((this actor-link-info) (arg0 (function entity-actor object object)) (arg1 object))
|
||||
"Iterate backward through actors and apply function.
|
||||
If the function returns truth, stop iterating."
|
||||
If the function returns truth, stop iterating."
|
||||
(let ((s3-0 (-> this prev)))
|
||||
(while s3-0
|
||||
(if (arg0 s3-0 arg1)
|
||||
@@ -323,7 +323,7 @@ If the function returns truth, stop iterating."
|
||||
;; definition for method 9 of type actor-link-info
|
||||
(defmethod get-matching-actor-type-mask ((this actor-link-info) (arg0 type))
|
||||
"Iterate through _all_ actors that are part of this actor list.
|
||||
If the nth actor is type matching-type, then set the nth bit of the result."
|
||||
If the nth actor is type matching-type, then set the nth bit of the result."
|
||||
(let ((s3-0 (-> this process entity))
|
||||
(s5-0 0)
|
||||
)
|
||||
|
||||
+4
-4
@@ -192,10 +192,10 @@
|
||||
;; WARN: Return type mismatch basic vs entity-info.
|
||||
(defun entity-info-lookup ((arg0 type))
|
||||
"Given a type, return the [[entity-info]] from [[*entity-info*]] whos type
|
||||
matches the `ptype` field. Set's `method 13` on said type that returns the `length`
|
||||
off the [[entity-info]]
|
||||
|
||||
If nothing matches, set `method 13` to `#f` and return `#f`"
|
||||
matches the `ptype` field. Set's `method 13` on said type that returns the `length`
|
||||
off the [[entity-info]]
|
||||
|
||||
If nothing matches, set `method 13` to `#f` and return `#f`"
|
||||
(the-as entity-info (cond
|
||||
((nonzero? (-> arg0 method-table 13))
|
||||
(-> arg0 method-table 13)
|
||||
|
||||
+34
-34
@@ -116,16 +116,16 @@
|
||||
;; WARN: Return type mismatch int vs res-tag-pair.
|
||||
(defmethod lookup-tag-idx ((this res-lump) (arg0 symbol) (arg1 symbol) (arg2 float))
|
||||
"Look up the index of the tag containing with the given name and timestamp.
|
||||
Correct lookups return a res-tag-pair, which contains one tag index in the lower 32 bits and one in the upper 32 bits.
|
||||
Depending on the mode, they may be the same, or they may be two tags that you should interpolate
|
||||
between, if the exact time was not found.
|
||||
|
||||
@param name-sym should be the name of the thing you want.
|
||||
@param time is for the timestamp you want.
|
||||
If mode = 'base, then both the indices are the same and the timestamp is ignored.
|
||||
If mode = 'interp, then it tries to get closest below/closest above (or both the same, if exact match found).
|
||||
If mode = 'exact, then it requires an exact timestamp match and both indices are the same.
|
||||
If things go wrong, returns a negative number."
|
||||
Correct lookups return a res-tag-pair, which contains one tag index in the lower 32 bits and one in the upper 32 bits.
|
||||
Depending on the mode, they may be the same, or they may be two tags that you should interpolate
|
||||
between, if the exact time was not found.
|
||||
|
||||
@param name-sym should be the name of the thing you want.
|
||||
@param time is for the timestamp you want.
|
||||
If mode = 'base, then both the indices are the same and the timestamp is ignored.
|
||||
If mode = 'interp, then it tries to get closest below/closest above (or both the same, if exact match found).
|
||||
If mode = 'exact, then it requires an exact timestamp match and both indices are the same.
|
||||
If things go wrong, returns a negative number."
|
||||
(local-vars (t4-1 int))
|
||||
(when (or (= arg0 'id)
|
||||
(= arg0 'aid)
|
||||
@@ -227,9 +227,9 @@ If things go wrong, returns a negative number."
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod make-property-data ((this res-lump) (arg1 float) (tag-pair res-tag-pair) (arg3 pointer))
|
||||
"Returns (a pointer to) the value data of a property with the tag-pair.
|
||||
If tag-pair does not represent an exact point in the timeline, then the data is interpolated based on time
|
||||
with the result written into buf. buf must have enough space to copy all of the data.
|
||||
Otherwise, simply returns an address to the resource binary."
|
||||
If tag-pair does not represent an exact point in the timeline, then the data is interpolated based on time
|
||||
with the result written into buf. buf must have enough space to copy all of the data.
|
||||
Otherwise, simply returns an address to the resource binary."
|
||||
(rlet ((vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
(vf3 :class vf)
|
||||
@@ -420,10 +420,10 @@ Otherwise, simply returns an address to the resource binary."
|
||||
(arg5 pointer)
|
||||
)
|
||||
"Returns an address to a given property's data at a specific time stamp, or default on error.
|
||||
@param name is the name of the property you want, mode is its lookup mode ('interp 'base 'exact), time is the timestamp.
|
||||
@param default is the default result returned in the case of an error.
|
||||
@param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if tag-addr is #f
|
||||
@param buf-addr is an address to the data buffer used to write interpolated data to. It must have enough space! Only necessary for 'interp mode."
|
||||
@param name is the name of the property you want, mode is its lookup mode ('interp 'base 'exact), time is the timestamp.
|
||||
@param default is the default result returned in the case of an error.
|
||||
@param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if tag-addr is #f
|
||||
@param buf-addr is an address to the data buffer used to write interpolated data to. It must have enough space! Only necessary for 'interp mode."
|
||||
(let ((s3-0 (lookup-tag-idx this arg0 arg1 arg2)))
|
||||
(cond
|
||||
((< (the-as int s3-0) 0)
|
||||
@@ -452,11 +452,11 @@ Otherwise, simply returns an address to the resource binary."
|
||||
(arg5 pointer)
|
||||
)
|
||||
"Returns a given struct property's value at a specific time stamp, or default on error.
|
||||
@param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp.
|
||||
@param default is the default result returned in the case of an error.
|
||||
@param tag-addr is an address to a [[res-tag]]. The current base tag is written to this. Ignored if tag-addr is #f.
|
||||
@param buf-addr is an address to the data buffer used to write interpolated data to.
|
||||
It must have enough space! Only necessary for 'interp mode."
|
||||
@param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp.
|
||||
@param default is the default result returned in the case of an error.
|
||||
@param tag-addr is an address to a [[res-tag]]. The current base tag is written to this. Ignored if tag-addr is #f.
|
||||
@param buf-addr is an address to the data buffer used to write interpolated data to.
|
||||
It must have enough space! Only necessary for 'interp mode."
|
||||
(let ((s3-0 (lookup-tag-idx this arg0 arg1 arg2)))
|
||||
(cond
|
||||
((< (the-as int s3-0) 0)
|
||||
@@ -491,11 +491,11 @@ It must have enough space! Only necessary for 'interp mode."
|
||||
(arg5 pointer)
|
||||
)
|
||||
"Returns a given value property's value at a specific time stamp, or default on error.
|
||||
@param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp.
|
||||
@param default is the default result returned in the case of an error.
|
||||
@param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if `tag-addr` is #f.
|
||||
@param buf-addr is an address to the data buffer used to write interpolated data to.
|
||||
It must have enough space! Only necessary for 'interp mode."
|
||||
@param name is the name of the property you want, `mode` is its lookup mode ('interp 'base 'exact), `time` is the timestamp.
|
||||
@param default is the default result returned in the case of an error.
|
||||
@param tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if `tag-addr` is #f.
|
||||
@param buf-addr is an address to the data buffer used to write interpolated data to.
|
||||
It must have enough space! Only necessary for 'interp mode."
|
||||
(let ((a2-1 (lookup-tag-idx this arg0 arg1 arg2)))
|
||||
(cond
|
||||
((< (the-as int a2-1) 0)
|
||||
@@ -677,10 +677,10 @@ It must have enough space! Only necessary for 'interp mode."
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod allocate-data-memory-for-tag! ((this res-lump) (arg0 res-tag))
|
||||
"Find space for the data described by arg0 in this.
|
||||
Returns a tag with data-offset set correctly for this res-lump.
|
||||
If the lump already contains memory for the given tag, and it is big enough,
|
||||
it will be reused. Alignment will be at least 8 bytes.
|
||||
If the input tag has elt-count = 0, it will return a tag for elt-count = 1."
|
||||
Returns a tag with data-offset set correctly for this res-lump.
|
||||
If the lump already contains memory for the given tag, and it is big enough,
|
||||
it will be reused. Alignment will be at least 8 bytes.
|
||||
If the input tag has elt-count = 0, it will return a tag for elt-count = 1."
|
||||
(local-vars (resource-mem pointer))
|
||||
(let* ((tag-pair (lookup-tag-idx this (-> arg0 name) 'exact (-> arg0 key-frame)))
|
||||
(existing-tag (-> this tag (-> tag-pair lo)))
|
||||
@@ -746,8 +746,8 @@ If the input tag has elt-count = 0, it will return a tag for elt-count = 1."
|
||||
;; definition for method 17 of type res-lump
|
||||
(defmethod add-data! ((this res-lump) (tag res-tag) (arg2 pointer))
|
||||
"Given a tag and a pointer to its data, copy it to this res-lump.
|
||||
This doesn't seem to do the right thing if the given tag is a non-inline tag
|
||||
with > 1 element."
|
||||
This doesn't seem to do the right thing if the given tag is a non-inline tag
|
||||
with > 1 element."
|
||||
(let ((a0-2 (allocate-data-memory-for-tag! this tag)))
|
||||
(when a0-2
|
||||
(let* ((v1-2 this)
|
||||
@@ -787,7 +787,7 @@ with > 1 element."
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod get-curve-data! ((this res-lump) (arg0 curve) (arg1 symbol) (arg2 symbol) (arg3 float))
|
||||
"Read curve data and write it to curve-target. Return #t if both
|
||||
control points and knots data was succesfully read, #f otherwise."
|
||||
control points and knots data was succesfully read, #f otherwise."
|
||||
(local-vars (sv-16 res-tag) (sv-32 res-tag))
|
||||
(let ((s5-0 #f))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@
|
||||
;; WARN: disable def twice: 23. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
(defmethod intersects-line-segment? ((this bounding-box) (arg0 vector) (arg1 vector))
|
||||
"Check intersection in xz plane, using liang-barsky. Not sure if this actually
|
||||
a useful check or not..."
|
||||
a useful check or not..."
|
||||
(let ((f28-0 (- (-> arg1 x) (-> arg0 x)))
|
||||
(f30-0 (- (-> arg1 z) (-> arg0 z)))
|
||||
)
|
||||
|
||||
+27
-27
@@ -4,7 +4,7 @@
|
||||
;; definition for function vector-flatten!
|
||||
(defun vector-flatten! ((arg0 vector) (arg1 vector) (arg2 vector))
|
||||
"Get the projection of src onto a plane with the given normal
|
||||
The normal should have magnitude 1.0."
|
||||
The normal should have magnitude 1.0."
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
@@ -51,11 +51,11 @@ The normal should have magnitude 1.0."
|
||||
;; definition for function vector-reflect-flat!
|
||||
(defun vector-reflect-flat! ((arg0 vector) (arg1 vector) (arg2 vector))
|
||||
"This is a weird one. It doesn't care about the value of src dot normal
|
||||
and it effectively replaces the component of src normal to the plane with
|
||||
the plane's normal. I think this requires src/normal to both be unit vectors
|
||||
in order to make sense.
|
||||
NOTE: src should point from positive halfspace to negative otherwise it
|
||||
doesn't work."
|
||||
and it effectively replaces the component of src normal to the plane with
|
||||
the plane's normal. I think this requires src/normal to both be unit vectors
|
||||
in order to make sense.
|
||||
NOTE: src should point from positive halfspace to negative otherwise it
|
||||
doesn't work."
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
@@ -130,8 +130,8 @@ doesn't work."
|
||||
;; definition for function vector-segment-distance-point!
|
||||
(defun vector-segment-distance-point! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
"Compute the distance from a point to the closest point on the line segment.
|
||||
arg0 is the point. arg1/arg2 are the endpoints of the line segment.
|
||||
arg3 is an optional output closest point."
|
||||
arg0 is the point. arg1/arg2 are the endpoints of the line segment.
|
||||
arg3 is an optional output closest point."
|
||||
(local-vars (v0-0 float) (v1-0 float) (v1-1 float))
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
@@ -204,7 +204,7 @@ arg3 is an optional output closest point."
|
||||
;; INFO: Used lq/sq
|
||||
(defun vector-line-distance ((arg0 vector) (arg1 vector) (arg2 vector))
|
||||
"Weird function: given a point arg1, and an infinite line connecting arg2 and arg1, compute the distance
|
||||
from arg0 to that line."
|
||||
from arg0 to that line."
|
||||
(let* ((a1-3 (vector-normalize! (vector-! (new-stack-vector0) arg2 arg1) 1.0))
|
||||
(gp-1 (vector-! (new-stack-vector0) arg0 arg1))
|
||||
(f0-1 (vector-dot a1-3 gp-1))
|
||||
@@ -405,7 +405,7 @@ from arg0 to that line."
|
||||
;; definition for function forward-up->inv-matrix
|
||||
(defun forward-up->inv-matrix ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
"Create a matrix representing an inverse transform where arg1 is forward (+z)
|
||||
and arg2 is up (+y). Will use the pitch of forward."
|
||||
and arg2 is up (+y). Will use the pitch of forward."
|
||||
(forward-down->inv-matrix arg0 arg1 (vector-negate! (new 'stack-no-clear 'vector) arg2))
|
||||
)
|
||||
|
||||
@@ -413,7 +413,7 @@ and arg2 is up (+y). Will use the pitch of forward."
|
||||
;; INFO: Used lq/sq
|
||||
(defun forward-up-nopitch->inv-matrix ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
"Create a matrix representing an inverse transform where arg1 is forward (+z)
|
||||
and arg2 is up (+y). Will not use the pitch of forward."
|
||||
and arg2 is up (+y). Will not use the pitch of forward."
|
||||
(forward-down-nopitch->inv-matrix arg0 arg1 (vector-negate! (new-stack-vector0) arg2))
|
||||
)
|
||||
|
||||
@@ -454,7 +454,7 @@ and arg2 is up (+y). Will not use the pitch of forward."
|
||||
;; INFO: Used lq/sq
|
||||
(defun quaternion-from-two-vectors-partial! ((arg0 quaternion) (arg1 vector) (arg2 vector) (arg3 float))
|
||||
"Create a quaternion representing the rotation between two vectors,
|
||||
doing arg3 fraction of the total rotation."
|
||||
doing arg3 fraction of the total rotation."
|
||||
(let* ((s5-0 (vector-cross! (new-stack-vector0) arg1 arg2))
|
||||
(f0-0 (vector-length s5-0))
|
||||
(f1-1 (+ 1.0 (* arg3 (+ -1.0 (vector-dot arg1 arg2)))))
|
||||
@@ -543,7 +543,7 @@ doing arg3 fraction of the total rotation."
|
||||
;; INFO: Used lq/sq
|
||||
(defun matrix-from-two-vectors-max-angle! ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 float))
|
||||
"Create a rotation matrix representing the rotation between two vectors,
|
||||
allowing at most a rotation of arg3 degrees."
|
||||
allowing at most a rotation of arg3 degrees."
|
||||
(let ((s4-1 (vector-normalize! (vector-cross! (new-stack-vector0) arg2 arg1) 1.0))
|
||||
(f30-0 (vector-dot arg1 arg2))
|
||||
(f28-0 (cos arg3))
|
||||
@@ -569,10 +569,10 @@ allowing at most a rotation of arg3 degrees."
|
||||
;; definition for function matrix-from-two-vectors-smooth!
|
||||
(defun matrix-from-two-vectors-smooth! ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 float) (arg4 int))
|
||||
"This function can help smoothly rotate from a current heading vector to a target one.
|
||||
It returns a rotation to move arg1 closer to arg2, subject to two different speed limits.
|
||||
arg3 is a rotations-per-frame rate. This limit takes frame rate into account (when lagging, the rotation is larger)
|
||||
arg4 is a 'slow down when getting close to the end' limit.
|
||||
This is used in rotate-toward-orientation, which is much improved from jak 1."
|
||||
It returns a rotation to move arg1 closer to arg2, subject to two different speed limits.
|
||||
arg3 is a rotations-per-frame rate. This limit takes frame rate into account (when lagging, the rotation is larger)
|
||||
arg4 is a 'slow down when getting close to the end' limit.
|
||||
This is used in rotate-toward-orientation, which is much improved from jak 1."
|
||||
(let* ((s5-1 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) arg2 arg1) 1.0))
|
||||
(f0-1 (vector-dot arg1 arg2))
|
||||
(f0-2 (acos f0-1))
|
||||
@@ -587,7 +587,7 @@ This is used in rotate-toward-orientation, which is much improved from jak 1."
|
||||
;; definition for function matrix-from-two-vectors-the-long-way-smooth!
|
||||
(defun matrix-from-two-vectors-the-long-way-smooth! ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 float) (arg4 int))
|
||||
"Same as above, but rotates you away from the target.
|
||||
Note that the 'near the end' smoothing will apply when you're near the target."
|
||||
Note that the 'near the end' smoothing will apply when you're near the target."
|
||||
(let* ((s5-1 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) arg2 arg1) 1.0))
|
||||
(f0-1 (vector-dot arg1 arg2))
|
||||
(f0-3 (- (acos f0-1)))
|
||||
@@ -610,7 +610,7 @@ Note that the 'near the end' smoothing will apply when you're near the target."
|
||||
;; definition for function matrix-from-two-vectors-max-angle-partial!
|
||||
(defun matrix-from-two-vectors-max-angle-partial! ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 float) (arg4 float))
|
||||
"Create a rotation matrix representing the given fraction of the rotation between two heading vectors,
|
||||
rotating by at most the given angle."
|
||||
rotating by at most the given angle."
|
||||
(let* ((s4-1 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) arg2 arg1) 1.0))
|
||||
(f28-0 (vector-dot arg1 arg2))
|
||||
(f30-0 (cos arg3))
|
||||
@@ -1049,8 +1049,8 @@ rotating by at most the given angle."
|
||||
;; definition for function point-in-plane-<-point+normal!
|
||||
(defun point-in-plane-<-point+normal! ((arg0 vector) (arg1 vector) (arg2 vector))
|
||||
"Very strange function. Takes a plane, in point-normal form, then returns some other point on that plane.
|
||||
It will move 1m in two of {x, y, z} directions. The direction not moved in is the one which is closest to point-in-triangle-cross
|
||||
in the same direction of the normal (this prevent moving huge distances for nearly vertical planes for example)."
|
||||
It will move 1m in two of {x, y, z} directions. The direction not moved in is the one which is closest to point-in-triangle-cross
|
||||
in the same direction of the normal (this prevent moving huge distances for nearly vertical planes for example)."
|
||||
(let ((f0-3 (+ (* (-> arg2 x) (-> arg1 x)) (* (-> arg2 y) (-> arg1 y)) (* (-> arg2 z) (-> arg1 z)))))
|
||||
(set! (-> arg0 w) 1.0)
|
||||
(let ((f1-7 (fabs (-> arg2 x)))
|
||||
@@ -1509,12 +1509,12 @@ in the same direction of the normal (this prevent moving huge distances for near
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [sll v1, v1, 4]
|
||||
(defun curve-evaluate! ((arg0 vector) (arg1 float) (arg2 (inline-array vector)) (arg3 int) (arg4 (pointer float)) (arg5 int))
|
||||
"Evaluate a curve.
|
||||
arg0 is the output
|
||||
arg1 is the input.
|
||||
arg2 is control vertices.
|
||||
arg3 is the number of control vertices.
|
||||
arg4 is the knot points.
|
||||
arg5 is the number of knots."
|
||||
arg0 is the output
|
||||
arg1 is the input.
|
||||
arg2 is control vertices.
|
||||
arg3 is the number of control vertices.
|
||||
arg4 is the knot points.
|
||||
arg5 is the number of knots."
|
||||
(local-vars (v1-7 int) (v1-8 int) (v1-10 float) (s3-0 int))
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
|
||||
+75
-75
@@ -73,8 +73,8 @@
|
||||
;; definition for method 18 of type curve-control
|
||||
(defmethod total-distance ((this curve-control))
|
||||
"Will lazily calculate and set the [[curve]]'s `length`
|
||||
@returns total path length of the [[curve]]
|
||||
@see [[curve-length]]"
|
||||
@returns total path length of the [[curve]]
|
||||
@see [[curve-length]]"
|
||||
(let ((f0-0 (-> this curve length)))
|
||||
(when (= f0-0 0.0)
|
||||
(set! f0-0 (curve-length (-> this curve)))
|
||||
@@ -88,16 +88,16 @@
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod get-point-in-path! ((this path-control) (ret vector) (idx float) (search-type symbol))
|
||||
"Depending on the value of `idx`, the result can be quite different:
|
||||
- if `idx` is less than `0.0` - return the first vertex in the path
|
||||
- if `idx` is greater than the number of vertices in the path, return the last vertex
|
||||
- if `search-type` is equal to `exact` OR `idx` is an integral number (ex 1.0), return that vertex
|
||||
- otherwise, do a linear interpolation between the vertex at `idx` (truncated) and the next vertex
|
||||
using the fractional component of `idx` as the interpolant, return this result
|
||||
|
||||
@param! ret The [[vector]] that is used to hold the return value
|
||||
@param idx Either the vertex index or also partially the interpolant in a LERP
|
||||
@param search-type The only recognized value is `exact`
|
||||
@returns Either a distinct vertex along the path, or some fractional point between two vertices"
|
||||
- if `idx` is less than `0.0` - return the first vertex in the path
|
||||
- if `idx` is greater than the number of vertices in the path, return the last vertex
|
||||
- if `search-type` is equal to `exact` OR `idx` is an integral number (ex 1.0), return that vertex
|
||||
- otherwise, do a linear interpolation between the vertex at `idx` (truncated) and the next vertex
|
||||
using the fractional component of `idx` as the interpolant, return this result
|
||||
|
||||
@param! ret The [[vector]] that is used to hold the return value
|
||||
@param idx Either the vertex index or also partially the interpolant in a LERP
|
||||
@param search-type The only recognized value is `exact`
|
||||
@returns Either a distinct vertex along the path, or some fractional point between two vertices"
|
||||
(let ((num-vertices (-> this curve num-cverts))
|
||||
(vert-idx (the float (the int idx)))
|
||||
)
|
||||
@@ -148,20 +148,20 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
;; definition for method 14 of type path-control
|
||||
(defmethod get-point-at-percent-along-path! ((this path-control) (ret vector) (percent float) (search-type symbol))
|
||||
"@param! ret The [[vector]] that is used to hold the return value
|
||||
@param percent The percentage along the path
|
||||
@param search-type The only recognized value is `exact`
|
||||
@returns the point closest to some arbitrary percentage along the path
|
||||
@see [[path-control::10]]"
|
||||
@param percent The percentage along the path
|
||||
@param search-type The only recognized value is `exact`
|
||||
@returns the point closest to some arbitrary percentage along the path
|
||||
@see [[path-control::10]]"
|
||||
(get-point-in-path! this ret (* percent (the float (+ (-> this curve num-cverts) -1))) search-type)
|
||||
)
|
||||
|
||||
;; definition for method 14 of type curve-control
|
||||
(defmethod get-point-at-percent-along-path! ((this curve-control) (arg0 vector) (arg1 float) (arg2 symbol))
|
||||
"@param! ret The [[vector]] that is used to hold the return value
|
||||
@param percent The percentage along the path
|
||||
@param search-type The only recognized value is `exact`
|
||||
@returns the point closest to some arbitrary percentage along the path
|
||||
@see [[path-control::10]]"
|
||||
@param percent The percentage along the path
|
||||
@param search-type The only recognized value is `exact`
|
||||
@returns the point closest to some arbitrary percentage along the path
|
||||
@see [[path-control::10]]"
|
||||
(if (not (logtest? (-> this flags) (path-control-flag not-found)))
|
||||
(curve-evaluate!
|
||||
arg0
|
||||
@@ -178,16 +178,16 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
;; definition for method 10 of type curve-control
|
||||
(defmethod get-point-in-path! ((this curve-control) (arg0 vector) (arg1 float) (arg2 symbol))
|
||||
"Depending on the value of `idx`, the result can be quite different:
|
||||
- if `idx` is less than `0.0` - return the first vertex in the path
|
||||
- if `idx` is greater than the number of vertices in the path, return the last vertex
|
||||
- if `search-type` is equal to `exact` OR `idx` is an integral number (ex 1.0), return that vertex
|
||||
- otherwise, do a linear interpolation between the vertex at `idx` (truncated) and the next vertex
|
||||
using the fractional component of `idx` as the interpolant, return this result
|
||||
|
||||
@param! ret The [[vector]] that is used to hold the return value
|
||||
@param idx Either the vertex index or also partially the interpolant in a LERP
|
||||
@param search-type The only recognized value is `exact`
|
||||
@returns Either a distinct vertex along the path, or some fractional point between two vertices"
|
||||
- if `idx` is less than `0.0` - return the first vertex in the path
|
||||
- if `idx` is greater than the number of vertices in the path, return the last vertex
|
||||
- if `search-type` is equal to `exact` OR `idx` is an integral number (ex 1.0), return that vertex
|
||||
- otherwise, do a linear interpolation between the vertex at `idx` (truncated) and the next vertex
|
||||
using the fractional component of `idx` as the interpolant, return this result
|
||||
|
||||
@param! ret The [[vector]] that is used to hold the return value
|
||||
@param idx Either the vertex index or also partially the interpolant in a LERP
|
||||
@param search-type The only recognized value is `exact`
|
||||
@returns Either a distinct vertex along the path, or some fractional point between two vertices"
|
||||
(if (not (logtest? (-> this flags) (path-control-flag not-found)))
|
||||
(curve-evaluate!
|
||||
arg0
|
||||
@@ -204,15 +204,15 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
;; definition for method 26 of type path-control
|
||||
(defmethod displacement-between-two-points! ((this path-control) (ret vector) (idx float) (mag float))
|
||||
"Return value can differ quite a bit:
|
||||
- If [[path-control-flag::4]] is set OR there are less than 2 vertices OR `idx` is less than `0.0` - return [[*null-vector*]]
|
||||
- Otherwise, find the scaled (by `mag`) displacement vector between two points in the path:
|
||||
- If `idx` is not beyond the second last vertex, the result is between vertex `idx` and `idx+1`
|
||||
- else, the result is between the second last vertex and the last
|
||||
|
||||
@param! ret The [[vector]] that is used to hold the return value
|
||||
@param idx The vertex index
|
||||
@param mag The magnitude to scale the resulting displacement vector by
|
||||
@returns The displacement [[vector]] between two points in the path, the last 2, or the [[*null-vector*]]"
|
||||
- If [[path-control-flag::4]] is set OR there are less than 2 vertices OR `idx` is less than `0.0` - return [[*null-vector*]]
|
||||
- Otherwise, find the scaled (by `mag`) displacement vector between two points in the path:
|
||||
- If `idx` is not beyond the second last vertex, the result is between vertex `idx` and `idx+1`
|
||||
- else, the result is between the second last vertex and the last
|
||||
|
||||
@param! ret The [[vector]] that is used to hold the return value
|
||||
@param idx The vertex index
|
||||
@param mag The magnitude to scale the resulting displacement vector by
|
||||
@returns The displacement [[vector]] between two points in the path, the last 2, or the [[*null-vector*]]"
|
||||
(let ((num-vertices (-> this curve num-cverts))
|
||||
(vert-idx (the float (the int idx)))
|
||||
)
|
||||
@@ -234,17 +234,17 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
;; definition for method 12 of type path-control
|
||||
(defmethod displacement-between-two-points-copy! ((this path-control) (ret vector) (idx float) (mag float))
|
||||
"Calls [[path-control::26]] with the provided args
|
||||
@see [[path-control::26]]"
|
||||
@see [[path-control::26]]"
|
||||
(displacement-between-two-points! this ret idx mag)
|
||||
)
|
||||
|
||||
;; definition for method 15 of type path-control
|
||||
(defmethod displacement-between-points-at-percent-scaled! ((this path-control) (ret vector) (percent float) (mag float))
|
||||
"Calls [[path-control::12], with the `idx` at a given percent along the path
|
||||
@param ret The [[vector]] that is used to hold the return value
|
||||
@param percent The percentage along the path to find the first index
|
||||
@param mag Multiplied by the number of points in the path and scales the resulting vector
|
||||
@returns The displacement between the last two points of the path scaled to the magnitude equal to the number of points in the path"
|
||||
@param ret The [[vector]] that is used to hold the return value
|
||||
@param percent The percentage along the path to find the first index
|
||||
@param mag Multiplied by the number of points in the path and scales the resulting vector
|
||||
@returns The displacement between the last two points of the path scaled to the magnitude equal to the number of points in the path"
|
||||
(displacement-between-two-points-copy!
|
||||
this
|
||||
ret
|
||||
@@ -256,10 +256,10 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
;; definition for method 13 of type path-control
|
||||
(defmethod displacement-between-two-points-normalized! ((this path-control) (ret vector) (idx float))
|
||||
"Calls [[path-control::26], with the provided `idx`
|
||||
@param! ret The [[vector]] the result is stored within
|
||||
@param idx The vertex index
|
||||
@returns The resulting displacement vector, normalized
|
||||
@see [[path-control::26]]"
|
||||
@param! ret The [[vector]] the result is stored within
|
||||
@param idx The vertex index
|
||||
@returns The resulting displacement vector, normalized
|
||||
@see [[path-control::26]]"
|
||||
(displacement-between-two-points! this ret idx 1.0)
|
||||
(vector-normalize! ret 1.0)
|
||||
)
|
||||
@@ -267,11 +267,11 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
;; definition for method 16 of type path-control
|
||||
(defmethod displacement-between-points-at-percent-normalized! ((this path-control) (ret vector) (percent float))
|
||||
"Calls [[path-control::13], with the `idx` at a given percent along the path
|
||||
@param! ret The [[vector]] the result is stored within
|
||||
@param percent The percentage along the path
|
||||
@returns The resulting displacement vector, normalized
|
||||
@see [[path-control::13]]
|
||||
@see [[path-control::14]]"
|
||||
@param! ret The [[vector]] the result is stored within
|
||||
@param percent The percentage along the path
|
||||
@returns The resulting displacement vector, normalized
|
||||
@see [[path-control::13]]
|
||||
@see [[path-control::14]]"
|
||||
(displacement-between-two-points-normalized!
|
||||
this
|
||||
ret
|
||||
@@ -282,15 +282,15 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
;; definition for method 26 of type curve-control
|
||||
(defmethod displacement-between-two-points! ((this curve-control) (arg0 vector) (arg1 float) (arg2 float))
|
||||
"Return value can differ quite a bit:
|
||||
- If [[path-control-flag::4]] is set OR there are less than 2 vertices OR `idx` is less than `0.0` - return [[*null-vector*]]
|
||||
- Otherwise, find the scaled (by `mag`) displacement vector between two points in the path:
|
||||
- If `idx` is not beyond the second last vertex, the result is between vertex `idx` and `idx+1`
|
||||
- else, the result is between the second last vertex and the last
|
||||
|
||||
@param! ret The [[vector]] that is used to hold the return value
|
||||
@param idx The vertex index
|
||||
@param mag The magnitude to scale the resulting displacement vector by
|
||||
@returns The displacement [[vector]] between two points in the path, the last 2, or the [[*null-vector*]]"
|
||||
- If [[path-control-flag::4]] is set OR there are less than 2 vertices OR `idx` is less than `0.0` - return [[*null-vector*]]
|
||||
- Otherwise, find the scaled (by `mag`) displacement vector between two points in the path:
|
||||
- If `idx` is not beyond the second last vertex, the result is between vertex `idx` and `idx+1`
|
||||
- else, the result is between the second last vertex and the last
|
||||
|
||||
@param! ret The [[vector]] that is used to hold the return value
|
||||
@param idx The vertex index
|
||||
@param mag The magnitude to scale the resulting displacement vector by
|
||||
@returns The displacement [[vector]] between two points in the path, the last 2, or the [[*null-vector*]]"
|
||||
(when (not (logtest? (-> this flags) (path-control-flag not-found)))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(curve-evaluate!
|
||||
@@ -338,21 +338,21 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
;; definition for method 15 of type curve-control
|
||||
(defmethod displacement-between-points-at-percent-scaled! ((this curve-control) (ret vector) (idx float) (mag float))
|
||||
"Calls [[path-control::12], with the `idx` at a given percent along the path
|
||||
@param ret The [[vector]] that is used to hold the return value
|
||||
@param percent The percentage along the path to find the first index
|
||||
@param mag Multiplied by the number of points in the path and scales the resulting vector
|
||||
@returns The displacement between the last two points of the path scaled to the magnitude equal to the number of points in the path"
|
||||
@param ret The [[vector]] that is used to hold the return value
|
||||
@param percent The percentage along the path to find the first index
|
||||
@param mag Multiplied by the number of points in the path and scales the resulting vector
|
||||
@returns The displacement between the last two points of the path scaled to the magnitude equal to the number of points in the path"
|
||||
(displacement-between-two-points! this ret idx mag)
|
||||
)
|
||||
|
||||
;; definition for method 16 of type curve-control
|
||||
(defmethod displacement-between-points-at-percent-normalized! ((this curve-control) (ret vector) (percent float))
|
||||
"Calls [[path-control::13], with the `idx` at a given percent along the path
|
||||
@param! ret The [[vector]] the result is stored within
|
||||
@param percent The percentage along the path
|
||||
@returns The resulting displacement vector, normalized
|
||||
@see [[path-control::13]]
|
||||
@see [[path-control::14]]"
|
||||
@param! ret The [[vector]] the result is stored within
|
||||
@param percent The percentage along the path
|
||||
@returns The resulting displacement vector, normalized
|
||||
@see [[path-control::13]]
|
||||
@see [[path-control::14]]"
|
||||
(displacement-between-two-points! this ret percent 0.01)
|
||||
(vector-normalize! ret 1.0)
|
||||
)
|
||||
@@ -371,8 +371,8 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod get-furthest-point-on-path ((this path-control) (point vector))
|
||||
"@param point The point to calculate distance from
|
||||
@returns the `vertex-idx.interpolant` value to the point on the path furthest away from the `point`
|
||||
@see [[path-control::10]]"
|
||||
@returns the `vertex-idx.interpolant` value to the point on the path furthest away from the `point`
|
||||
@see [[path-control::10]]"
|
||||
(let ((curr-point (new 'stack-no-clear 'vector))
|
||||
(next-point (new 'stack-no-clear 'vector))
|
||||
(given-point (new 'stack-no-clear 'vector))
|
||||
@@ -407,8 +407,8 @@ using the fractional component of `idx` as the interpolant, return this result
|
||||
;; definition for method 23 of type path-control
|
||||
(defmethod get-path-percentage-at-furthest-point ((this path-control) (point vector))
|
||||
"@param point The point to calculate distance from
|
||||
@returns the percentage of path completion from the point on the path furthest away from the `point`
|
||||
@see [[path-control::14]]"
|
||||
@returns the percentage of path completion from the point on the path furthest away from the `point`
|
||||
@see [[path-control::14]]"
|
||||
(/ (get-furthest-point-on-path this point) (the float (+ (-> this curve num-cverts) -1)))
|
||||
)
|
||||
|
||||
|
||||
+25
-25
@@ -7,11 +7,11 @@
|
||||
;; definition for function light-slerp
|
||||
(defun light-slerp ((light-out light) (light-a light) (light-b light) (alpha float))
|
||||
"Linearly interpolate between two [[light]]s
|
||||
@param! light-out The resultant
|
||||
@param light-a One of the two lights
|
||||
@param light-b One of the two lights
|
||||
@param alpha Clamped to between `0.0` and `1.0`
|
||||
@returns The interpolated [[light]]"
|
||||
@param! light-out The resultant
|
||||
@param light-a One of the two lights
|
||||
@param light-b One of the two lights
|
||||
@param alpha Clamped to between `0.0` and `1.0`
|
||||
@returns The interpolated [[light]]"
|
||||
(let ((clamped-alpha (fmax 0.0 (fmin 1.0 alpha))))
|
||||
(vector-lerp! (-> light-out color) (-> light-a color) (-> light-b color) clamped-alpha)
|
||||
(vector-deg-slerp (-> light-out direction) (-> light-a direction) (-> light-b direction) clamped-alpha)
|
||||
@@ -27,11 +27,11 @@
|
||||
;; definition for function light-group-slerp
|
||||
(defun light-group-slerp ((light-group-out light-group) (light-group-a light-group) (light-group-b light-group) (alpha float))
|
||||
"Linearly interpolate between two [[light-groups]]s by calling [[light-slerp]] on each respective collection of lights
|
||||
@param light-group-out The resultant
|
||||
@param light-group-a One of the two [[light-group]]s
|
||||
@param light-group-b One of the two [[light-group]]s
|
||||
@param alpha
|
||||
@returns The linearly interpolated [[light-group]]"
|
||||
@param light-group-out The resultant
|
||||
@param light-group-a One of the two [[light-group]]s
|
||||
@param light-group-b One of the two [[light-group]]s
|
||||
@param alpha
|
||||
@returns The linearly interpolated [[light-group]]"
|
||||
(dotimes (group-idx 4)
|
||||
(light-slerp
|
||||
(-> light-group-out lights group-idx)
|
||||
@@ -46,11 +46,11 @@
|
||||
;; definition for function light-group-process!
|
||||
(defun light-group-process! ((vu-lights vu-lights) (light-group light-group) (vec1 vector) (vec2 vector))
|
||||
"Unused, needlessly calls [[rotate-y<-vector+vector]] on the two [[vector]]s and calls [[vu-lights<-light-group!]]
|
||||
@param vu-lights
|
||||
@param light-group
|
||||
@param vec1
|
||||
@param vec2
|
||||
@returns [[none]]"
|
||||
@param vu-lights
|
||||
@param light-group
|
||||
@param vec1
|
||||
@param vec2
|
||||
@returns [[none]]"
|
||||
(rotate-y<-vector+vector vec2 vec1)
|
||||
(vu-lights<-light-group! vu-lights light-group)
|
||||
(none)
|
||||
@@ -62,8 +62,8 @@
|
||||
;; definition for function vu-lights-default!
|
||||
(defun vu-lights-default! ((lights vu-lights))
|
||||
"Setups up a default [[vu-lights]] instance
|
||||
@param! lights
|
||||
@returns [[vu-lights]]"
|
||||
@param! lights
|
||||
@returns [[vu-lights]]"
|
||||
(set-vector! (-> lights ambient) 0.3 0.3 0.3 1.0)
|
||||
(set-vector! (-> lights color 0) 1.0 1.0 1.0 1.0)
|
||||
(set-vector! (-> lights color 1) 0.2 0.2 0.2 1.0)
|
||||
@@ -78,10 +78,10 @@
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
(defun-debug init-light-hash ()
|
||||
"Initializes the global [[*light-hash*]].
|
||||
- Bucket array allocates `4096` bytes. (enough for 16,384 entries)
|
||||
- Index array allocates `65536` bytes.
|
||||
- Light sphere array allocates `16384` bytes. (enough for 256 light spheres)
|
||||
@returns [[light-hash]]"
|
||||
- Bucket array allocates `4096` bytes. (enough for 16,384 entries)
|
||||
- Index array allocates `65536` bytes.
|
||||
- Light sphere array allocates `16384` bytes. (enough for 256 light spheres)
|
||||
@returns [[light-hash]]"
|
||||
(when (not *light-hash*)
|
||||
(set! *light-hash* (new 'loading-level 'light-hash))
|
||||
(set! (-> *light-hash* num-lights) (the-as uint 0))
|
||||
@@ -111,7 +111,7 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun-debug reset-light-hash ((arg0 light-hash))
|
||||
"Resets the global [[*light-hash*]] back to having `0` lights, indicies, and buckets.
|
||||
@returns [[none]]"
|
||||
@returns [[none]]"
|
||||
(set! (-> *light-hash* num-lights) (the-as uint 0))
|
||||
(set! (-> *light-hash* num-indices) (the-as uint 0))
|
||||
(set! (-> *light-hash* num-buckets) (the-as uint 0))
|
||||
@@ -201,9 +201,9 @@
|
||||
;; definition for function lookup-light-sphere-by-name
|
||||
(defun lookup-light-sphere-by-name ((name string) (hash light-hash))
|
||||
"Search through a given [[light-hash]]'s lights to find the one that matches the given name
|
||||
@param name The name to look for
|
||||
@param hash The hash to search through
|
||||
@returns Either the [[light]] or [[#f]]"
|
||||
@param name The name to look for
|
||||
@param hash The hash to search through
|
||||
@returns Either the [[light]] or [[#f]]"
|
||||
(when (and hash (nonzero? hash))
|
||||
(dotimes (num-lights (the-as int (-> hash num-lights)))
|
||||
(let ((light (-> hash light-sphere-array num-lights)))
|
||||
|
||||
+7
-7
@@ -49,9 +49,9 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun ripple-make-request ((waveform ripple-wave) (effect merc-effect))
|
||||
"Iterate through [[*ripple-globals*]] `requests` looking for the one that matches the provided `effect`
|
||||
If NOT found, append a new [[ripple-request]] with the providded `effect` and `waveform` to the end of the `requests`.
|
||||
|
||||
NOTE: There can only be 16 effects at a given time, NOOP if already at that limit!"
|
||||
If NOT found, append a new [[ripple-request]] with the providded `effect` and `waveform` to the end of the `requests`.
|
||||
|
||||
NOTE: There can only be 16 effects at a given time, NOOP if already at that limit!"
|
||||
(let ((v1-1 (-> *ripple-globals* count))
|
||||
(a2-1 (-> *ripple-globals* requests))
|
||||
(a3-0 0)
|
||||
@@ -107,10 +107,10 @@ NOTE: There can only be 16 effects at a given time, NOOP if already at that limi
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun ripple-execute ()
|
||||
"Iterate through [[*ripple-globals*]] requests, from the end to index `0`
|
||||
For each request, if it has a `waveform` create the wave-table via `ripple-create-wave-table`
|
||||
Then for each `waveform` apply the `effect` using `ripple-apply-wave-table`
|
||||
|
||||
Once completed, all `requests` have been processed and the `count` is reset to `0`"
|
||||
For each request, if it has a `waveform` create the wave-table via `ripple-create-wave-table`
|
||||
Then for each `waveform` apply the `effect` using `ripple-apply-wave-table`
|
||||
|
||||
Once completed, all `requests` have been processed and the `count` is reset to `0`"
|
||||
(when (-> *ripple-globals* count)
|
||||
(ripple-execute-init)
|
||||
(let ((gp-0 0)
|
||||
|
||||
+7
-7
@@ -5,11 +5,11 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun set-video-mode ((tv-format symbol))
|
||||
"Set related settings to the video mode in the settings, [[*video-params*]] and the [[*video-mode*]]
|
||||
`ntsc` has a [[*video-mode*]] value of `0`, where as `pal` has a value of `1`
|
||||
|
||||
Will also set a bunch of common settings related to profiling and the camera to finalize the switch
|
||||
|
||||
@param tv-format Recognizes `ntsc` and `pal`"
|
||||
`ntsc` has a [[*video-mode*]] value of `0`, where as `pal` has a value of `1`
|
||||
|
||||
Will also set a bunch of common settings related to profiling and the camera to finalize the switch
|
||||
|
||||
@param tv-format Recognizes `ntsc` and `pal`"
|
||||
(case tv-format
|
||||
(('ntsc)
|
||||
(set! (-> *setting-control* user-default display-dx) 0)
|
||||
@@ -49,7 +49,7 @@ Will also set a bunch of common settings related to profiling and the camera to
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun set-aspect-ratio ((aspect symbol))
|
||||
"Set [[*video-params*]] aspect-ratio related settings based on the mode provided.
|
||||
@param aspect Recognizes `aspect4x3` and `aspect16x9`"
|
||||
@param aspect Recognizes `aspect4x3` and `aspect16x9`"
|
||||
(case aspect
|
||||
(('aspect4x3)
|
||||
(set! (-> *video-params* relative-x-scale) 1.0)
|
||||
@@ -74,7 +74,7 @@ Will also set a bunch of common settings related to profiling and the camera to
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun set-progressive-scan ((val symbol))
|
||||
"Flip the progressive scan setting flag depending on the value provided
|
||||
@param val The value to set the progressive scan flag to"
|
||||
@param val The value to set the progressive scan flag to"
|
||||
(set! (-> *setting-control* user-default use-progressive-scan) val)
|
||||
0
|
||||
(none)
|
||||
|
||||
+8
-8
@@ -53,7 +53,7 @@ Without this corrector, the fogginess of the world would change as the FOV chang
|
||||
;; ERROR: Failed store: (s.w! (+ a0-43 12) a1-11) at op 465
|
||||
(defun update-math-camera ((arg0 math-camera) (arg1 symbol) (arg2 symbol) (arg3 float))
|
||||
"Compute some one-time camera constants.
|
||||
These should only change when changing aspect ratio."
|
||||
These should only change when changing aspect ratio."
|
||||
(local-vars (sv-16 float))
|
||||
(set! (-> arg0 x-ratio) (tan (* 0.5 arg3)))
|
||||
(if (= arg2 'aspect4x3)
|
||||
@@ -285,8 +285,8 @@ These should only change when changing aspect ratio."
|
||||
;; INFO: Used lq/sq
|
||||
(defun move-target-from-pad ((arg0 transform) (arg1 int))
|
||||
"Unused function to adjust trans based on inputs from the pad.
|
||||
This function must be extremely old because it takes a non-quaternion transform,
|
||||
and all [[target]] stuff uses quaternions."
|
||||
This function must be extremely old because it takes a non-quaternion transform,
|
||||
and all [[target]] stuff uses quaternions."
|
||||
(let ((s4-0 (new-stack-vector0)))
|
||||
(set! (-> s4-0 x) (cond
|
||||
((cpad-hold? arg1 circle)
|
||||
@@ -350,8 +350,8 @@ and all [[target]] stuff uses quaternions."
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [cfc2.i v1, Clipping]
|
||||
(defun transform-point-vector! ((arg0 vector) (arg1 vector))
|
||||
"Apply camera transformation to a point. Return true if it is visible or not.
|
||||
This returns the point in GS coords, but as float instead of int, so it's
|
||||
not really useful. See [[transform-point-qword!]] for more details."
|
||||
This returns the point in GS coords, but as float instead of int, so it's
|
||||
not really useful. See [[transform-point-qword!]] for more details."
|
||||
(local-vars (v1-2 int))
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
@@ -401,7 +401,7 @@ not really useful. See [[transform-point-qword!]] for more details."
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [cfc2.i v1, Clipping]
|
||||
(defun transform-point-qword! ((arg0 vector4w) (arg1 vector))
|
||||
"Apply camera transformation to point, returning fixed point 28.4 position
|
||||
that can be given to the GS directly."
|
||||
that can be given to the GS directly."
|
||||
(local-vars (v1-2 int))
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
@@ -532,8 +532,8 @@ that can be given to the GS directly."
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun init-for-transform ((arg0 matrix))
|
||||
"Sets up VU0 registers with camera info.
|
||||
This is probably a very old function and it's only used by camera debug.
|
||||
It stashes some data in vector float registers that must be there before calling transform-float-point."
|
||||
This is probably a very old function and it's only used by camera debug.
|
||||
It stashes some data in vector float registers that must be there before calling transform-float-point."
|
||||
(local-vars (v1-14 float))
|
||||
(rlet ((vf1 :class vf)
|
||||
(vf17 :class vf)
|
||||
|
||||
+4
-4
@@ -94,8 +94,8 @@
|
||||
;; WARN: Return type mismatch pointer vs none.
|
||||
(defun init-overide-table ((table mood-table))
|
||||
"Similar to [[init-mood-table]], does the bare minimum to setup the given [[mood-table]]
|
||||
@param! table The table to initialize
|
||||
@returns [[none]]"
|
||||
@param! table The table to initialize
|
||||
@returns [[none]]"
|
||||
(set! (-> table mood-fog-table) (new 'debug 'mood-fog-table))
|
||||
(set! (-> table mood-color-table) (new 'debug 'mood-color-table))
|
||||
(set! (-> table mood-channel-group) *no-cloud-mood-channel-group*)
|
||||
@@ -260,7 +260,7 @@
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defun desaturate-mood-colors ((arg0 float) (arg1 float) (arg2 float))
|
||||
"Unused - Generate GOAL code for a new [[*overide-mood-color-table*]] definition that desaturates the color
|
||||
Apply said overrides to the [[*overide-table*]]"
|
||||
Apply said overrides to the [[*overide-table*]]"
|
||||
(mem-copy!
|
||||
(the-as pointer (-> *overide-table* mood-color-table))
|
||||
(the-as pointer *no-cloud-mood-color-table*)
|
||||
@@ -366,7 +366,7 @@ Apply said overrides to the [[*overide-table*]]"
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defun desaturate-mood-fog ((arg0 (pointer mood-fog-table)) (arg1 float) (arg2 float))
|
||||
"Unused - Generate GOAL code for a new [[*overide-mood-fog-table*]] definition that desaturates the fog color
|
||||
Apply said overrides to the [[*overide-table*]]"
|
||||
Apply said overrides to the [[*overide-table*]]"
|
||||
(mem-copy! (the-as pointer (-> *overide-table* mood-fog-table)) arg0 384)
|
||||
(dotimes (data-idx 8)
|
||||
(let ((fog-data (-> *overide-table* mood-fog-table data data-idx)))
|
||||
|
||||
+2
-2
@@ -827,8 +827,8 @@
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun init-mood-control ((ctrl mood-control))
|
||||
"Given a [[mood-control]] initialize and set it up with default settings
|
||||
@param! ctrl The [[mood-control]]
|
||||
@returns [[none]]"
|
||||
@param! ctrl The [[mood-control]]
|
||||
@returns [[none]]"
|
||||
(set! (-> ctrl mood-fog-table) (new 'global 'mood-fog-table))
|
||||
(set! (-> ctrl mood-color-table) (new 'global 'mood-color-table))
|
||||
(set! (-> ctrl mood-channel-group) (new 'global 'mood-channel-group))
|
||||
|
||||
+7
-7
@@ -1269,9 +1269,9 @@
|
||||
;; WARN: Return type mismatch int vs sound-id.
|
||||
(defmethod play-or-stop-lightning! ((this mood-control) (arg0 sound-spec) (arg1 vector))
|
||||
"Handles playing/stopping of the lightning sound
|
||||
- Plays the lightning sound if we are not loading and `lightning-id` is zero
|
||||
- Stops the lightning sound first if `lightning-id` is non-zero
|
||||
Returns the current value of `lightning-id`"
|
||||
- Plays the lightning sound if we are not loading and `lightning-id` is zero
|
||||
- Stops the lightning sound first if `lightning-id` is non-zero
|
||||
Returns the current value of `lightning-id`"
|
||||
(vector+! (new 'stack-no-clear 'vector) arg1 (math-camera-pos))
|
||||
(the-as sound-id (cond
|
||||
((or (load-in-progress? *level*) (movie?))
|
||||
@@ -1684,8 +1684,8 @@ Returns the current value of `lightning-id`"
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod update-mood-weather! ((this mood-control) (cloud-target float) (fog-target float) (cloud-speed float) (fog-speed float))
|
||||
"Set the `target-interp` and `speed-interp` for the clouds and fog
|
||||
If `*-speed` is 0.0, use the `*-target` args to set `current-interp`
|
||||
See [[mood-weather]]"
|
||||
If `*-speed` is 0.0, use the `*-target` args to set `current-interp`
|
||||
See [[mood-weather]]"
|
||||
(set! (-> this target-interp cloud) cloud-target)
|
||||
(set! (-> this target-interp fog) fog-target)
|
||||
(set! (-> this speed-interp cloud) cloud-speed)
|
||||
@@ -1704,7 +1704,7 @@ See [[mood-weather]]"
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod update-mood-range! ((this mood-control) (min-cloud float) (max-cloud float) (min-fog float) (max-fog float))
|
||||
"Set the minimum and maximum ranges of clouds and fog
|
||||
See [[mood-range]]"
|
||||
See [[mood-range]]"
|
||||
(set! (-> this range min-cloud) min-cloud)
|
||||
(set! (-> this range max-cloud) max-cloud)
|
||||
(set! (-> this range min-fog) min-fog)
|
||||
@@ -1717,7 +1717,7 @@ See [[mood-range]]"
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod set-time-for-random-weather! ((this mood-control) (arg0 float) (arg1 float))
|
||||
"Set the `time-until-random`'s cloud and fog values
|
||||
See [[mood-weather]]"
|
||||
See [[mood-weather]]"
|
||||
(set! (-> this time-until-random cloud) arg0)
|
||||
(set! (-> this time-until-random fog) arg1)
|
||||
0
|
||||
|
||||
+2
-2
@@ -265,8 +265,8 @@ Each texture page has 3 segments - smaller number segments have higher detail mi
|
||||
;; definition for function texture-mip->segment
|
||||
(defun texture-mip->segment ((arg0 int) (arg1 int))
|
||||
"Figure out which segment of a tpage a given mip level of a texture will be in.
|
||||
arg0 is the mip level, arg1 is the total number of mips.
|
||||
Higher mip level is lower detail."
|
||||
arg0 is the mip level, arg1 is the total number of mips.
|
||||
Higher mip level is lower detail."
|
||||
(if (>= 2 arg1)
|
||||
(+ (- -1 arg0) arg1)
|
||||
(max 0 (- 2 arg0))
|
||||
|
||||
+43
-43
@@ -65,7 +65,7 @@
|
||||
;; definition for function texture-qwc
|
||||
(defun texture-qwc ((w int) (h int) (tex-format gs-psm))
|
||||
"Get the number of quadwords needed for a given texture size and format.
|
||||
Does not consider weird PS2 memory layout stuff."
|
||||
Does not consider weird PS2 memory layout stuff."
|
||||
(let ((v1-0 (texture-bpp tex-format)))
|
||||
(/ (+ (* (* w h) v1-0) 127) 128)
|
||||
)
|
||||
@@ -74,7 +74,7 @@ Does not consider weird PS2 memory layout stuff."
|
||||
;; definition for function physical-address
|
||||
(defun physical-address ((addr pointer))
|
||||
"Strip off high 8-bits of a pointer, to bypass the uncached memory mappings.
|
||||
This gives an address suitable for DMAing from main memory."
|
||||
This gives an address suitable for DMAing from main memory."
|
||||
(logand #xfffffff addr)
|
||||
)
|
||||
|
||||
@@ -82,8 +82,8 @@ This gives an address suitable for DMAing from main memory."
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defun dma-buffer-add-ref-texture ((dma-buf dma-buffer) (tex-data-ptr pointer) (width int) (height int) (tex-fmt gs-psm))
|
||||
"Upload a texture, by reference. Doesn't copy the texture into the DMA buffer - just a reference,
|
||||
so it is up to the user to make sure the texture is valid during DMA time.
|
||||
Doesn't set up GIF for receiving textures."
|
||||
so it is up to the user to make sure the texture is valid during DMA time.
|
||||
Doesn't set up GIF for receiving textures."
|
||||
(let ((padr (physical-address tex-data-ptr))
|
||||
(qwc-remaining (texture-qwc width height tex-fmt))
|
||||
)
|
||||
@@ -295,9 +295,9 @@ Doesn't set up GIF for receiving textures."
|
||||
;; definition for function gs-blocks-used
|
||||
(defun gs-blocks-used ((w int) (h int) (tex-format gs-psm))
|
||||
"Get the number of blocks used by a texture.
|
||||
If the texture isn't an even number of pages, the partially completed
|
||||
page will be counted as the largest used block.
|
||||
(gaps in this page are counted as used)"
|
||||
If the texture isn't an even number of pages, the partially completed
|
||||
page will be counted as the largest used block.
|
||||
(gaps in this page are counted as used)"
|
||||
(let* ((s4-0 (gs-page-width tex-format))
|
||||
(v1-0 (gs-page-height tex-format))
|
||||
(a0-6 (* (/ (+ s4-0 -1 w) s4-0) s4-0))
|
||||
@@ -435,7 +435,7 @@ page will be counted as the largest used block.
|
||||
;; definition for method 9 of type texture-page
|
||||
(defmethod remove-data-from-heap ((this texture-page) (heap kheap))
|
||||
"Bump the kheap pointer to discard this texture data. All metadata is kept.
|
||||
This is only safe to use if the last thing on the kheap is this texture."
|
||||
This is only safe to use if the last thing on the kheap is this texture."
|
||||
(set! (-> heap current) (-> this segment 0 block-data))
|
||||
this
|
||||
)
|
||||
@@ -443,8 +443,8 @@ This is only safe to use if the last thing on the kheap is this texture."
|
||||
;; definition for function texture-page-default-allocate
|
||||
(defun texture-page-default-allocate ((pool texture-pool) (tpage texture-page) (heap kheap) (tpage-id int))
|
||||
"Texture allocation function for textures that permanently live in VRAM.
|
||||
The texture data is immediately uploaded, then discarded from the heap.
|
||||
This should only be called during startup."
|
||||
The texture data is immediately uploaded, then discarded from the heap.
|
||||
This should only be called during startup."
|
||||
(dotimes (seg 3)
|
||||
(let ((vram-loc (allocate-vram-words! pool (the-as int (-> tpage segment seg size)))))
|
||||
(relocate-dests! tpage vram-loc seg)
|
||||
@@ -470,8 +470,8 @@ This should only be called during startup."
|
||||
;; definition for function texture-page-common-allocate
|
||||
(defun texture-page-common-allocate ((pool texture-pool) (page texture-page) (heap kheap) (page-id int))
|
||||
"Texture allocation function for textures that share the common segment.
|
||||
The texture remains in RAM, and is uploaded to VRAM as needed as part
|
||||
of the main drawing DMA chain."
|
||||
The texture remains in RAM, and is uploaded to VRAM as needed as part
|
||||
of the main drawing DMA chain."
|
||||
(let ((s5-0 (-> pool segment-common dest)))
|
||||
(dotimes (s4-0 3)
|
||||
(relocate-dests! page (the-as int s5-0) s4-0)
|
||||
@@ -485,8 +485,8 @@ of the main drawing DMA chain."
|
||||
;; definition for function texture-page-font-allocate
|
||||
(defun texture-page-font-allocate ((pool texture-pool) (tpage texture-page) (heap kheap) (tpage-id int))
|
||||
"Texture allocation function for font. This temporarily stores them in the common segment,
|
||||
removes them from RAM. This is a bit of hack. Later font setup code expects the font texture
|
||||
to be in common, and they will eventually be moved into the upper 8-bits of the depth buffer."
|
||||
removes them from RAM. This is a bit of hack. Later font setup code expects the font texture
|
||||
to be in common, and they will eventually be moved into the upper 8-bits of the depth buffer."
|
||||
(texture-page-common-allocate pool tpage heap tpage-id)
|
||||
(upload-now! tpage (tex-upload-mode seg0-1-2))
|
||||
(remove-data-from-heap tpage heap)
|
||||
@@ -668,7 +668,7 @@ to be in common, and they will eventually be moved into the upper 8-bits of the
|
||||
;; definition for function texture-page-common-boot-allocate
|
||||
(defun texture-page-common-boot-allocate ((pool texture-pool) (tpage texture-page) (heap kheap) (tpage-id int))
|
||||
"Allocator function for texture loaded at startup time.
|
||||
For jak 3, this seems to always do default-allocate (permanently in vram?)"
|
||||
For jak 3, this seems to always do default-allocate (permanently in vram?)"
|
||||
(let ((common-page-slot-id (get-common-page-slot-by-id pool tpage-id)))
|
||||
(cond
|
||||
((>= common-page-slot-id 0)
|
||||
@@ -753,9 +753,9 @@ For jak 3, this seems to always do default-allocate (permanently in vram?)"
|
||||
(bucket bucket-id)
|
||||
)
|
||||
"Add DMA to upload a texture page. Will only upload the portion of data that is not already present in VRAM.
|
||||
This is the old Jak 1 background texture uploading system, which had this near/far concept
|
||||
for different mip levels. By jak 2, the background system switched to masks and uses
|
||||
the -pris variant of this function."
|
||||
This is the old Jak 1 background texture uploading system, which had this near/far concept
|
||||
for different mip levels. By jak 2, the background system switched to masks and uses
|
||||
the -pris variant of this function."
|
||||
(local-vars
|
||||
(data-ptr pointer)
|
||||
(vram-ptr uint)
|
||||
@@ -903,10 +903,10 @@ the -pris variant of this function."
|
||||
(arg4 (pointer int32))
|
||||
)
|
||||
"Similar to upload-vram-pages, but skips the near/far mode and instead uses masks.
|
||||
The foreground/background renderers will generate masks telling us which textures are used.
|
||||
This lets us skip uploading entire textures, or mip levels that won't need.
|
||||
(side note: this optimization is what causes many of the texturing issues in pcsx2,
|
||||
where the ps2 and pcsx2 disagree on the mip level to use.)"
|
||||
The foreground/background renderers will generate masks telling us which textures are used.
|
||||
This lets us skip uploading entire textures, or mip levels that won't need.
|
||||
(side note: this optimization is what causes many of the texturing issues in pcsx2,
|
||||
where the ps2 and pcsx2 disagree on the mip level to use.)"
|
||||
(local-vars
|
||||
(data-ptr pointer)
|
||||
(vram-ptr uint)
|
||||
@@ -1614,8 +1614,8 @@ where the ps2 and pcsx2 disagree on the mip level to use.)"
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod setup-font-texture ((this texture-pool))
|
||||
"Set up the font texture. In normal use, the font texture is allocated, and currently uploaded to, the common segment.
|
||||
This function copies that to the unused upper 8-bits of the depth buffer, and sets up the font
|
||||
renderer to point to that address."
|
||||
This function copies that to the unused upper 8-bits of the depth buffer, and sets up the font
|
||||
renderer to point to that address."
|
||||
(local-vars (sv-16 int) (sv-20 int))
|
||||
(let ((s3-0 (-> this font-palette)))
|
||||
(set! sv-16 (-> this cur))
|
||||
@@ -1762,9 +1762,9 @@ renderer to point to that address."
|
||||
;; definition for method 7 of type texture-page
|
||||
(defmethod relocate ((this texture-page) (loading-heap kheap) (name (pointer uint8)))
|
||||
"Handle a texture page that has been loaded by the linker.
|
||||
This must run in the linker, since we sometimes kick out textures from the loading heap, which
|
||||
requires no more allocations made after the texture, and the only time is right after the linker
|
||||
does the allocation for this GOAL object file."
|
||||
This must run in the linker, since we sometimes kick out textures from the loading heap, which
|
||||
requires no more allocations made after the texture, and the only time is right after the linker
|
||||
does the allocation for this GOAL object file."
|
||||
(cond
|
||||
((or (not this) (not (file-info-correct-version? (-> this info) (file-kind tpage) 0)))
|
||||
(the-as texture-page #f)
|
||||
@@ -1811,9 +1811,9 @@ does the allocation for this GOAL object file."
|
||||
;; definition for function relocate-later
|
||||
(defun relocate-later ()
|
||||
"Unused in jak 2 and likely unsed in jak 3. Feature to postpone some texture copying until
|
||||
a later frame. This is only used in cases when texture data must be memcpy'd in RAM, to patch up a hole left
|
||||
by some data that is now permanently in VRAM, and no longer needed.
|
||||
Note that Jak2/Jak3 don't have this problem since level textures are now never permanent"
|
||||
a later frame. This is only used in cases when texture data must be memcpy'd in RAM, to patch up a hole left
|
||||
by some data that is now permanently in VRAM, and no longer needed.
|
||||
Note that Jak2/Jak3 don't have this problem since level textures are now never permanent"
|
||||
(let ((gp-0 *texture-relocate-later*))
|
||||
(let ((s5-0 (-> gp-0 entry))
|
||||
(s4-0 (-> gp-0 page))
|
||||
@@ -1834,9 +1834,9 @@ Note that Jak2/Jak3 don't have this problem since level textures are now never p
|
||||
;; definition for function texture-page-login
|
||||
(defun texture-page-login ((id texture-id) (alloc-func (function texture-pool texture-page kheap int texture-page)) (heap kheap))
|
||||
"'Login' (initialize) a texture page with the pool.
|
||||
This has a trick - it doesn't actually require you to pass a texture-page object - instead you pass an ID.
|
||||
If the texture was loaded at all, it will already be known to the texture pool, and this function will do nothing.
|
||||
However, if the texture is not present, it will be loaded through a call to `loado`, for use in development."
|
||||
This has a trick - it doesn't actually require you to pass a texture-page object - instead you pass an ID.
|
||||
If the texture was loaded at all, it will already be known to the texture pool, and this function will do nothing.
|
||||
However, if the texture is not present, it will be loaded through a call to `loado`, for use in development."
|
||||
(when (and (nonzero? (-> id page)) (< (-> id page) (the-as uint (-> *texture-page-dir* length))))
|
||||
(let ((s5-0 (-> *texture-page-dir* entries (-> id page))))
|
||||
(when (not (-> s5-0 page))
|
||||
@@ -1984,7 +1984,7 @@ However, if the texture is not present, it will be loaded through a call to `loa
|
||||
;; definition for function link-texture-by-id
|
||||
(defun link-texture-by-id ((id texture-id) (shader adgif-shader))
|
||||
"Add this adgif shader to the linked list of shaders associated with the given texture ID.
|
||||
Will allocate the link array if it's not already."
|
||||
Will allocate the link array if it's not already."
|
||||
(when (not (or (zero? (-> id page)) (>= (-> id page) (the-as uint (-> *texture-page-dir* length)))))
|
||||
(let ((s4-0 (-> *texture-page-dir* entries (-> id page))))
|
||||
(if (not (-> s4-0 link))
|
||||
@@ -2082,8 +2082,8 @@ Will allocate the link array if it's not already."
|
||||
;; definition for function adgif-shader-login
|
||||
(defun adgif-shader-login ((shader adgif-shader))
|
||||
"set up an adgif shader with the texture-pool, so it points to the right vram address.
|
||||
Will remap textures through the level remap table.
|
||||
If texture is missing, will load it on debug hardware."
|
||||
Will remap textures through the level remap table.
|
||||
If texture is missing, will load it on debug hardware."
|
||||
(when (logtest? (-> shader link-test) (link-test-flags needs-log-in))
|
||||
(logclear! (-> shader link-test) (link-test-flags needs-log-in bit-9))
|
||||
(set! (-> shader texture-id) (level-remap-texture (-> shader texture-id)))
|
||||
@@ -2119,7 +2119,7 @@ If texture is missing, will load it on debug hardware."
|
||||
;; definition for function adgif-shader-login-no-remap
|
||||
(defun adgif-shader-login-no-remap ((shader adgif-shader))
|
||||
"Set up an adgif shader with the texture-pool, so it points to the right vram adress.
|
||||
This does not do level tpage remapping, so the texture should be one that's not loaded in a combine level tpage."
|
||||
This does not do level tpage remapping, so the texture should be one that's not loaded in a combine level tpage."
|
||||
(when (logtest? (-> shader link-test) (link-test-flags needs-log-in))
|
||||
(logclear! (-> shader link-test) (link-test-flags needs-log-in bit-9))
|
||||
(link-texture-by-id (-> shader texture-id) shader)
|
||||
@@ -2149,9 +2149,9 @@ This does not do level tpage remapping, so the texture should be one that's not
|
||||
;; definition for function adgif-shader-login-fast
|
||||
(defun adgif-shader-login-fast ((shader adgif-shader))
|
||||
"Set up an adgif shader with the texture-pool, so it points to the right vram address.
|
||||
Will remap through the level table, so can be used to refer to textures inside 'squashed'
|
||||
level tpages.
|
||||
Will not load texture if it is missing."
|
||||
Will remap through the level table, so can be used to refer to textures inside 'squashed'
|
||||
level tpages.
|
||||
Will not load texture if it is missing."
|
||||
(when (logtest? (-> shader link-test) (link-test-flags needs-log-in))
|
||||
(logclear! (-> shader link-test) (link-test-flags needs-log-in bit-9))
|
||||
(set! (-> shader texture-id) (level-remap-texture (-> shader texture-id)))
|
||||
@@ -2182,8 +2182,8 @@ Will not load texture if it is missing."
|
||||
;; definition for function adgif-shader-login-no-remap-fast
|
||||
(defun adgif-shader-login-no-remap-fast ((shader adgif-shader))
|
||||
"Set up an adgif shader with the texture-pool, so it points to the right vram address.
|
||||
Will not remap through the level tpage table.
|
||||
Will not load texture if it is missing."
|
||||
Will not remap through the level tpage table.
|
||||
Will not load texture if it is missing."
|
||||
(when (logtest? (-> shader link-test) (link-test-flags needs-log-in))
|
||||
(logclear! (-> shader link-test) (link-test-flags needs-log-in bit-9))
|
||||
(let ((v1-4 (-> shader texture-id)))
|
||||
@@ -2219,7 +2219,7 @@ Will not load texture if it is missing."
|
||||
;; definition for function adgif-shader<-texture-simple!
|
||||
(defun adgif-shader<-texture-simple! ((shader adgif-shader) (tex texture))
|
||||
"Simple adgif-shader to texture, just sets vram address and format stuff.
|
||||
Intended for use with fancy texture stuff that will later set the other regs."
|
||||
Intended for use with fancy texture stuff that will later set the other regs."
|
||||
(set! (-> shader tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(set! (-> shader tex0 tfx) 0)
|
||||
(if tex
|
||||
|
||||
+4
-4
@@ -496,10 +496,10 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod collect-regions ((this bsp-header) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
|
||||
"Determines the number of [[drawable]]s in the `obj` that overlap the given `area-of-interest` this number is stored in the `region-list`'s item count
|
||||
@param area-of-interest The area defined by a sphere that we care about overlaps
|
||||
@param _count The amount of [[drawable]]s in the object to enumerate through
|
||||
@param! region-list Stores the overlapping regions and a count for how many were found
|
||||
@returns none"
|
||||
@param area-of-interest The area defined by a sphere that we care about overlaps
|
||||
@param _count The amount of [[drawable]]s in the object to enumerate through
|
||||
@param! region-list Stores the overlapping regions and a count for how many were found
|
||||
@returns none"
|
||||
(let ((s3-0 (-> this region-trees)))
|
||||
(dotimes (s2-0 (-> s3-0 length))
|
||||
(collect-regions (-> s3-0 s2-0) arg0 arg1 arg2)
|
||||
|
||||
+28
-28
@@ -47,10 +47,10 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod collect-regions ((this drawable-region-prim) (area-of-interest sphere) (_count int) (region-list region-prim-list))
|
||||
"Determines the number of [[drawable]]s in the `obj` that overlap the given `area-of-interest` this number is stored in the `region-list`'s item count
|
||||
@param area-of-interest The area defined by a sphere that we care about overlaps
|
||||
@param _count The amount of [[drawable]]s in the object to enumerate through
|
||||
@param! region-list Stores the overlapping regions and a count for how many were found
|
||||
@returns none"
|
||||
@param area-of-interest The area defined by a sphere that we care about overlaps
|
||||
@param _count The amount of [[drawable]]s in the object to enumerate through
|
||||
@param! region-list Stores the overlapping regions and a count for how many were found
|
||||
@returns none"
|
||||
(dotimes (count _count)
|
||||
(when (spheres-overlap? area-of-interest (the-as sphere (-> this bsphere)))
|
||||
(set! (-> region-list items (-> region-list num-items)) this)
|
||||
@@ -66,10 +66,10 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod collect-regions ((this drawable-inline-array-region-prim) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
|
||||
"Determines the number of [[drawable]]s in the `obj` that overlap the given `area-of-interest` this number is stored in the `region-list`'s item count
|
||||
@param area-of-interest The area defined by a sphere that we care about overlaps
|
||||
@param _count The amount of [[drawable]]s in the object to enumerate through
|
||||
@param! region-list Stores the overlapping regions and a count for how many were found
|
||||
@returns none"
|
||||
@param area-of-interest The area defined by a sphere that we care about overlaps
|
||||
@param _count The amount of [[drawable]]s in the object to enumerate through
|
||||
@param! region-list Stores the overlapping regions and a count for how many were found
|
||||
@returns none"
|
||||
(collect-regions (the-as drawable-region-prim (-> this data)) arg0 (-> this length) arg2)
|
||||
0
|
||||
(none)
|
||||
@@ -79,10 +79,10 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod collect-regions ((this drawable-tree-region-prim) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
|
||||
"Determines the number of [[drawable]]s in the `obj` that overlap the given `area-of-interest` this number is stored in the `region-list`'s item count
|
||||
@param area-of-interest The area defined by a sphere that we care about overlaps
|
||||
@param _count The amount of [[drawable]]s in the object to enumerate through
|
||||
@param! region-list Stores the overlapping regions and a count for how many were found
|
||||
@returns none"
|
||||
@param area-of-interest The area defined by a sphere that we care about overlaps
|
||||
@param _count The amount of [[drawable]]s in the object to enumerate through
|
||||
@param! region-list Stores the overlapping regions and a count for how many were found
|
||||
@returns none"
|
||||
(collect-regions (-> this data2 0) arg0 (-> this length) arg2)
|
||||
0
|
||||
(none)
|
||||
@@ -162,10 +162,10 @@
|
||||
;; WARN: Function (method 9 region-prim-area) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod track-entered-region! ((this region-prim-area) (region-sphere drawable-region-sphere))
|
||||
"Enumerates through the objects `region-enter-list`, if we find the provided `region`, do nothing and exit
|
||||
otherwise, add the [[drawable-region-sphere]] to `region-enter-prim-list` and increment `region-enter-count`
|
||||
|
||||
@param region-sphere Defines the region in question
|
||||
@returns nothing"
|
||||
otherwise, add the [[drawable-region-sphere]] to `region-enter-prim-list` and increment `region-enter-count`
|
||||
|
||||
@param region-sphere Defines the region in question
|
||||
@returns nothing"
|
||||
(let ((regions-entered (-> this region-enter-count)))
|
||||
(let ((region (-> region-sphere region)))
|
||||
(countdown (idx regions-entered)
|
||||
@@ -187,10 +187,10 @@ otherwise, add the [[drawable-region-sphere]] to `region-enter-prim-list` and in
|
||||
;; WARN: Function (method 10 region-prim-area) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod track-exited-region! ((this region-prim-area) (arg0 drawable-region-sphere))
|
||||
"Enumerates through the objects `region-exit-list`, if we find the provided `region`, do nothing and exit
|
||||
otherwise, add the [[drawable-region-sphere]] to `region-exit-prim-list` and increment `region-exit-count`
|
||||
|
||||
@param region-sphere Defines the region in question
|
||||
@returns nothing"
|
||||
otherwise, add the [[drawable-region-sphere]] to `region-exit-prim-list` and increment `region-exit-count`
|
||||
|
||||
@param region-sphere Defines the region in question
|
||||
@returns nothing"
|
||||
(let ((regions-exited (-> this region-exit-count)))
|
||||
(let ((region (-> arg0 region)))
|
||||
(countdown (idx regions-exited)
|
||||
@@ -212,10 +212,10 @@ otherwise, add the [[drawable-region-sphere]] to `region-exit-prim-list` and inc
|
||||
;; WARN: Function (method 11 region-prim-area) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod track-inside-region! ((this region-prim-area) (arg0 drawable-region-sphere))
|
||||
"Enumerates through the objects `region-inside-list`, if we find the provided `region`, do nothing and exit
|
||||
otherwise, add the [[drawable-region-sphere]] to `region-inside-prim-list` and increment `region-inside-count`
|
||||
|
||||
@param region-sphere Defines the region in question
|
||||
@returns nothing"
|
||||
otherwise, add the [[drawable-region-sphere]] to `region-inside-prim-list` and increment `region-inside-count`
|
||||
|
||||
@param region-sphere Defines the region in question
|
||||
@returns nothing"
|
||||
(let ((regions-inside (-> this region-inside-count)))
|
||||
(let ((region (-> arg0 region)))
|
||||
(countdown (idx regions-inside)
|
||||
@@ -237,10 +237,10 @@ otherwise, add the [[drawable-region-sphere]] to `region-inside-prim-list` and i
|
||||
;; WARN: Function (method 12 region-prim-area) has a return type of none, but the expression builder found a return statement.
|
||||
(defmethod track-start-region! ((this region-prim-area) (arg0 drawable-region-sphere))
|
||||
"Enumerates through the objects `region-start-list`, if we find the provided `region`, do nothing and exit
|
||||
otherwise, add the [[drawable-region-sphere]] to `region-start-prim-list` and increment `region-start-count`
|
||||
|
||||
@param region-sphere Defines the region in question
|
||||
@returns nothing"
|
||||
otherwise, add the [[drawable-region-sphere]] to `region-start-prim-list` and increment `region-start-count`
|
||||
|
||||
@param region-sphere Defines the region in question
|
||||
@returns nothing"
|
||||
(let ((regions-started (-> this region-start-count)))
|
||||
(let ((region (-> arg0 region)))
|
||||
(countdown (idx regions-started)
|
||||
|
||||
+10
-10
@@ -41,7 +41,7 @@
|
||||
;; definition for function file-stream-read-string
|
||||
(defun file-stream-read-string ((fs file-stream) (str string))
|
||||
"Fill a string with data from a file stream.
|
||||
Note: this function does not work."
|
||||
Note: this function does not work."
|
||||
(clear str)
|
||||
(file-stream-read fs (-> str data) (length fs))
|
||||
str
|
||||
@@ -97,13 +97,13 @@ Note: this function does not work."
|
||||
;; definition for function make-file-name
|
||||
(defun make-file-name ((arg0 file-kind) (arg1 string) (arg2 int) (arg3 symbol))
|
||||
"Get a file name to open a file with the given kind and name.
|
||||
The art-group-version argument can be used to override the version
|
||||
of the art-group. Set it to 0 or less to use the default version.
|
||||
Similar to MakeFileName in C.
|
||||
Note: file type enum is different between C and GOAL.
|
||||
File versions should match those in versions.h.
|
||||
Uses a single *file-temp-string* buffer, shared with make-vfile-name.
|
||||
arg3 is unused."
|
||||
The art-group-version argument can be used to override the version
|
||||
of the art-group. Set it to 0 or less to use the default version.
|
||||
Similar to MakeFileName in C.
|
||||
Note: file type enum is different between C and GOAL.
|
||||
File versions should match those in versions.h.
|
||||
Uses a single *file-temp-string* buffer, shared with make-vfile-name.
|
||||
arg3 is unused."
|
||||
(clear *file-temp-string*)
|
||||
(cond
|
||||
((= arg0 (file-kind dir-tpage))
|
||||
@@ -150,7 +150,7 @@ arg3 is unused."
|
||||
;; definition for function make-vfile-name
|
||||
(defun make-vfile-name ((kind file-kind) (name string))
|
||||
"Make virtual? file name. This makes a name that the kernel knows how to
|
||||
handle in a specific way. This function is not used."
|
||||
handle in a specific way. This function is not used."
|
||||
(clear *file-temp-string*)
|
||||
(cond
|
||||
((= kind (file-kind level-bt))
|
||||
@@ -166,7 +166,7 @@ handle in a specific way. This function is not used."
|
||||
;; definition for function file-info-correct-version?
|
||||
(defun file-info-correct-version? ((arg0 file-info) (arg1 file-kind) (arg2 int))
|
||||
"Check if the version and kind in the info is valid. The `version-override` can specify a
|
||||
non-default version, or set to 0 for the default version."
|
||||
non-default version, or set to 0 for the default version."
|
||||
(let* ((s5-0 (cond
|
||||
((zero? arg2)
|
||||
(case arg1
|
||||
|
||||
+3
-3
@@ -147,8 +147,8 @@
|
||||
;; definition for function str-load-status
|
||||
(defun str-load-status ((maxlen-out (pointer int32)))
|
||||
"Get the status of the most recent load.
|
||||
Return 'busy if in progress, 'error if failed, or 'complete.
|
||||
If 'complete, returns the maxlen value from the IOP."
|
||||
Return 'busy if in progress, 'error if failed, or 'complete.
|
||||
If 'complete, returns the maxlen value from the IOP."
|
||||
(if (check-busy *load-str-rpc*)
|
||||
(return 'busy)
|
||||
)
|
||||
@@ -372,7 +372,7 @@ If 'complete, returns the maxlen value from the IOP."
|
||||
;; definition for function find-temp-buffer
|
||||
(defun find-temp-buffer ((size int))
|
||||
"Unused function to find some temporary leftover space in DMA buffer.
|
||||
Unused since jak 1, and checks the same buffer twice??"
|
||||
Unused since jak 1, and checks the same buffer twice??"
|
||||
(let ((gp-0 (+ (/ size 16) 2)))
|
||||
(cond
|
||||
((< (the-as uint gp-0)
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@
|
||||
;; definition for function matrix->eul
|
||||
(defun matrix->eul ((arg0 euler-angles) (arg1 matrix) (arg2 int))
|
||||
"Convert matrix to euler angles with given order flag.
|
||||
Not clear how this works if the matrix has more than just a rotation."
|
||||
Not clear how this works if the matrix has more than just a rotation."
|
||||
0
|
||||
0
|
||||
0
|
||||
|
||||
+16
-16
@@ -4,7 +4,7 @@
|
||||
;; definition for function truncate
|
||||
(defun truncate ((arg0 float))
|
||||
"Round (toward zero) to an integer.
|
||||
@param arg0 float to truncate"
|
||||
@param arg0 float to truncate"
|
||||
(the float (the int arg0))
|
||||
)
|
||||
|
||||
@@ -324,8 +324,8 @@
|
||||
;; definition for function seek-ease
|
||||
(defun seek-ease ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
||||
"Move arg0 toward arg1, and slow down before reaching the end.
|
||||
When farther than arg3 away, move by at most arg2.
|
||||
When closer than arg3, linearly ramp down the movement amount from arg2 to 0 but no lower than arg4."
|
||||
When farther than arg3 away, move by at most arg2.
|
||||
When closer than arg3, linearly ramp down the movement amount from arg2 to 0 but no lower than arg4."
|
||||
(let ((f2-0 (- arg1 arg0)))
|
||||
(when (>= arg3 (fabs f2-0))
|
||||
(set! arg2 (* arg2 (- 1.0 (/ (- arg3 (fabs f2-0)) arg3))))
|
||||
@@ -350,9 +350,9 @@ When closer than arg3, linearly ramp down the movement amount from arg2 to 0 but
|
||||
;; definition for function seek-ease-in-out
|
||||
(defun seek-ease-in-out ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float) (arg5 float) (arg6 float))
|
||||
"Move arg0 toward arg2, and slow down at the start and end.
|
||||
When within arg4 of arg1 (at the beginning of movement), ramp up speed, with a minimum speed of arg6
|
||||
When within arg5 of arg2 (at the end of movement), ramp down speed, with a minimum speed of arg5
|
||||
Normally, move at most arg3"
|
||||
When within arg4 of arg1 (at the beginning of movement), ramp up speed, with a minimum speed of arg6
|
||||
When within arg5 of arg2 (at the end of movement), ramp down speed, with a minimum speed of arg5
|
||||
Normally, move at most arg3"
|
||||
(let ((f2-0 (- arg2 arg0)))
|
||||
(let ((f4-1 (- arg0 arg1)))
|
||||
(when (>= arg4 (fabs f4-1))
|
||||
@@ -391,7 +391,7 @@ Normally, move at most arg3"
|
||||
;; definition (debug) for function lerp-scale-old
|
||||
(defun-debug lerp-scale-old ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
||||
"Linearly remap arg2 in [arg3, arg4] to [arg0, arg1].
|
||||
This is the jak 1 implementation, which I claimed was a bad implementation..."
|
||||
This is the jak 1 implementation, which I claimed was a bad implementation..."
|
||||
(let ((f0-1 (fmax 0.0 (fmin 1.0 (/ (- arg2 arg3) (- arg4 arg3))))))
|
||||
(+ (* (- 1.0 f0-1) arg0) (* f0-1 arg1))
|
||||
)
|
||||
@@ -497,8 +497,8 @@ This is the jak 1 implementation, which I claimed was a bad implementation..."
|
||||
;; ERROR: Inline assembly instruction marked with TODO - [TODO.VRGET]
|
||||
(defun rand-vu-nostep ()
|
||||
"Get the number currently in the random generator.
|
||||
This will be equal to the last call of (rand-vu).
|
||||
This will not update the random generator."
|
||||
This will be equal to the last call of (rand-vu).
|
||||
This will not update the random generator."
|
||||
(local-vars (v0-0 float))
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
@@ -548,7 +548,7 @@ This will not update the random generator."
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defun rand-vu-int-count-excluding ((arg0 int) (arg1 int))
|
||||
"Get an integer in the range [0, arg0).
|
||||
If bit n is set in arg1, exclude this value from being returned."
|
||||
If bit n is set in arg1, exclude this value from being returned."
|
||||
(let ((s4-0 0)
|
||||
(s5-0 0)
|
||||
)
|
||||
@@ -591,7 +591,7 @@ If bit n is set in arg1, exclude this value from being returned."
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defun rand-vu-int-range-exclude ((arg0 int) (arg1 int) (arg2 int))
|
||||
"Get an integer in the range [0, arg0), excluding arg2.
|
||||
Note that this doesn't use bits like rand-vu-int-count-excluding."
|
||||
Note that this doesn't use bits like rand-vu-int-count-excluding."
|
||||
(until #f
|
||||
(let ((v1-0 (rand-vu-int-range arg0 arg1)))
|
||||
(if (!= v1-0 arg2)
|
||||
@@ -676,7 +676,7 @@ Note that this doesn't use bits like rand-vu-int-count-excluding."
|
||||
;; definition for function smooth-step
|
||||
(defun smooth-step ((arg0 float))
|
||||
"Interpolate between 0, 1 with a cubic polynomial.
|
||||
These are picked so f(0) = 0, f(1) = 1, f'(0) = f'(1) = 0."
|
||||
These are picked so f(0) = 0, f(1) = 1, f'(0) = f'(1) = 0."
|
||||
(cond
|
||||
((>= 0.0 arg0)
|
||||
0.0
|
||||
@@ -693,9 +693,9 @@ These are picked so f(0) = 0, f(1) = 1, f'(0) = f'(1) = 0."
|
||||
;; definition for function smooth-interp
|
||||
(defun smooth-interp ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
||||
"Remap arg2 from (arg3, arg4) to (arg0, arg1), using cubic interpolation.
|
||||
Satisfies:
|
||||
- f(arg3) = arg0
|
||||
- f(arg4) = arg1
|
||||
- f'(arg3) = f'(arg4) = 0"
|
||||
Satisfies:
|
||||
- f(arg3) = arg0
|
||||
- f(arg4) = arg1
|
||||
- f'(arg3) = f'(arg4) = 0"
|
||||
(+ arg0 (* (- arg1 arg0) (smooth-step (/ (- arg2 arg3) (- arg4 arg3)))))
|
||||
)
|
||||
+20
-22
@@ -2,7 +2,6 @@
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 3 of type matrix
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect ((this matrix))
|
||||
(format #t "[~8x] matrix~%" this)
|
||||
(format
|
||||
@@ -34,7 +33,6 @@
|
||||
)
|
||||
|
||||
;; definition for method 3 of type matrix3
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect ((this matrix3))
|
||||
(format #t "[~8x] matrix3~%" this)
|
||||
(format #t "~T[~F] [~F] [~F]~%" (-> this vector 0 x) (-> this vector 0 y) (-> this vector 0 z))
|
||||
@@ -76,7 +74,7 @@
|
||||
;; definition for function matrix+!
|
||||
(defun matrix+! ((arg0 matrix) (arg1 matrix) (arg2 matrix))
|
||||
"Set dst = src1 + src2. It is okay for any arguments to be the same data.
|
||||
This is not an efficient implementation."
|
||||
This is not an efficient implementation."
|
||||
(dotimes (v1-0 16)
|
||||
(set! (-> arg0 data v1-0) (+ (-> arg1 data v1-0) (-> arg2 data v1-0)))
|
||||
)
|
||||
@@ -86,7 +84,7 @@ This is not an efficient implementation."
|
||||
;; definition for function matrix-!
|
||||
(defun matrix-! ((arg0 matrix) (arg1 matrix) (arg2 matrix))
|
||||
"Set dst = src1 - src1. It is okay for any arugments to be the same data.
|
||||
This is not an efficient implementation."
|
||||
This is not an efficient implementation."
|
||||
(dotimes (v1-0 16)
|
||||
(set! (-> arg0 data v1-0) (- (-> arg1 data v1-0) (-> arg2 data v1-0)))
|
||||
)
|
||||
@@ -96,7 +94,7 @@ This is not an efficient implementation."
|
||||
;; definition for function matrix*!
|
||||
(defun matrix*! ((arg0 matrix) (arg1 matrix) (arg2 matrix))
|
||||
"Set dst = src1 * src2. It is okay for any arguments to be the same data.
|
||||
This is a moderately efficient implementation."
|
||||
This is a moderately efficient implementation."
|
||||
(rlet ((acc :class vf)
|
||||
(vf10 :class vf)
|
||||
(vf11 :class vf)
|
||||
@@ -147,8 +145,8 @@ This is a moderately efficient implementation."
|
||||
;; INFO: Used lq/sq
|
||||
(defun matrixp*! ((arg0 matrix) (arg1 matrix) (arg2 matrix))
|
||||
"Set dst = src1 * src2. NOTE: this function is a wrapper around matrix*!
|
||||
that adds no additional functionality. It seems to be a leftover from
|
||||
a time when matrix*! wasn't safe to use in place. This is unused."
|
||||
that adds no additional functionality. It seems to be a leftover from
|
||||
a time when matrix*! wasn't safe to use in place. This is unused."
|
||||
(let ((s5-0 (new-stack-matrix0)))
|
||||
(matrix*! s5-0 arg1 arg2)
|
||||
(set! (-> arg0 quad 0) (-> s5-0 quad 0))
|
||||
@@ -215,7 +213,7 @@ a time when matrix*! wasn't safe to use in place. This is unused."
|
||||
;; INFO: Used lq/sq
|
||||
(defun vector3s-matrix*! ((arg0 vector3s) (arg1 vector3s) (arg2 matrix))
|
||||
"Set dst to be ([src 1.0] * mat).xyz. Doesn't touch the w of dst.
|
||||
dst and vec can be the same memory"
|
||||
dst and vec can be the same memory"
|
||||
(let ((s5-0 (new-stack-vector0)))
|
||||
(set-vector! s5-0 (-> arg1 x) (-> arg1 y) (-> arg1 z) 1.0)
|
||||
(vector-matrix*! s5-0 s5-0 arg2)
|
||||
@@ -230,7 +228,7 @@ dst and vec can be the same memory"
|
||||
;; INFO: Used lq/sq
|
||||
(defun vector3s-rotate*! ((arg0 vector3s) (arg1 vector3s) (arg2 matrix))
|
||||
"Set dst to vec rotated by the rotation in the homogeneous transform mat.
|
||||
mat should not have a scale/shear (the upper 3x3 should be a pure rotation)."
|
||||
mat should not have a scale/shear (the upper 3x3 should be a pure rotation)."
|
||||
(let ((s5-0 (new-stack-vector0)))
|
||||
(set-vector! s5-0 (-> arg1 x) (-> arg1 y) (-> arg1 z) 1.0)
|
||||
(vector-rotate*! s5-0 s5-0 arg2)
|
||||
@@ -283,7 +281,7 @@ mat should not have a scale/shear (the upper 3x3 should be a pure rotation)."
|
||||
;; definition for function matrix-inverse-of-rot-trans!
|
||||
(defun matrix-inverse-of-rot-trans! ((arg0 matrix) (arg1 matrix))
|
||||
"Set dst = src^-1, assuming src is a homogeneous tranform with only rotation/translation.
|
||||
NOTE: THIS FUNCTION REQUIRES dst != src"
|
||||
NOTE: THIS FUNCTION REQUIRES dst != src"
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
@@ -320,7 +318,7 @@ NOTE: THIS FUNCTION REQUIRES dst != src"
|
||||
;; ERROR: Bad vector register dependency: vf5
|
||||
(defun matrix-4x4-inverse! ((arg0 matrix) (arg1 matrix))
|
||||
"Invert a 4x4 matrix. This assumes that the input is a homogeneous transform.
|
||||
Src and dst can be the same."
|
||||
Src and dst can be the same."
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
(vf0 :class vf)
|
||||
@@ -484,7 +482,7 @@ Src and dst can be the same."
|
||||
;; INFO: Used lq/sq
|
||||
(defun matrix-translate+! ((arg0 matrix) (arg1 matrix) (arg2 vector))
|
||||
"Add the given translation to the translation of homogenous transform mat src
|
||||
and store in dst. It is okay for dst = src."
|
||||
and store in dst. It is okay for dst = src."
|
||||
(set! (-> arg0 trans x) (+ (-> arg1 trans x) (-> arg2 x)))
|
||||
(set! (-> arg0 trans y) (+ (-> arg1 trans y) (-> arg2 y)))
|
||||
(set! (-> arg0 trans z) (+ (-> arg1 trans z) (-> arg2 z)))
|
||||
@@ -500,7 +498,7 @@ and store in dst. It is okay for dst = src."
|
||||
;; INFO: Used lq/sq
|
||||
(defun matrix-scale! ((arg0 matrix) (arg1 vector))
|
||||
"Set dst to a homogenous transform with only a scale. The x,y,z components
|
||||
of scale become the x,y,z scaling factors"
|
||||
of scale become the x,y,z scaling factors"
|
||||
(set! (-> arg0 quad 0) (the-as uint128 0))
|
||||
(set! (-> arg0 quad 1) (the-as uint128 0))
|
||||
(set! (-> arg0 quad 2) (the-as uint128 0))
|
||||
@@ -515,8 +513,8 @@ of scale become the x,y,z scaling factors"
|
||||
;; definition for function scale-matrix!
|
||||
(defun scale-matrix! ((arg0 matrix) (arg1 vector) (arg2 matrix))
|
||||
"Scale an existing matrix. Okay for dst = src. The scaling is applied per row.
|
||||
This means the x component of scale is used to scale the first row of src.
|
||||
The w component of scale is used."
|
||||
This means the x component of scale is used to scale the first row of src.
|
||||
The w component of scale is used."
|
||||
(rlet ((vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
@@ -544,7 +542,7 @@ The w component of scale is used."
|
||||
;; INFO: Used lq/sq
|
||||
(defun matrix-inv-scale! ((arg0 matrix) (arg1 vector))
|
||||
"Set dst to a homogeneous transform with only a scale.
|
||||
The x,y,z components of scale are inverted and used as the x,y,z scaling factors"
|
||||
The x,y,z components of scale are inverted and used as the x,y,z scaling factors"
|
||||
(set! (-> arg0 quad 0) (the-as uint128 0))
|
||||
(set! (-> arg0 quad 1) (the-as uint128 0))
|
||||
(set! (-> arg0 quad 2) (the-as uint128 0))
|
||||
@@ -559,7 +557,7 @@ The x,y,z components of scale are inverted and used as the x,y,z scaling factors
|
||||
;; definition for function column-scale-matrix!
|
||||
(defun column-scale-matrix! ((arg0 matrix) (arg1 vector) (arg2 matrix))
|
||||
"Scale an existing matrix. Okay for dst = src. The scaling is applied column-wise.
|
||||
Meaning the x component of scale will scale the first column of src."
|
||||
Meaning the x component of scale will scale the first column of src."
|
||||
(rlet ((vf4 :class vf)
|
||||
(vf5 :class vf)
|
||||
(vf6 :class vf)
|
||||
@@ -768,7 +766,7 @@ Meaning the x component of scale will scale the first column of src."
|
||||
;; definition for function matrix-rotate-yxy!
|
||||
(defun matrix-rotate-yxy! ((arg0 matrix) (arg1 vector))
|
||||
"Rotate. I believe in yxy order? Compared to the other rotations, this one
|
||||
is quite a bit more optimized and avoid repeated trig operations."
|
||||
is quite a bit more optimized and avoid repeated trig operations."
|
||||
(let ((a2-0 (new 'stack-no-clear 'vector))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
@@ -1139,7 +1137,7 @@ is quite a bit more optimized and avoid repeated trig operations."
|
||||
;; definition for function matrix-3x3-inverse!
|
||||
(defun matrix-3x3-inverse! ((arg0 matrix) (arg1 matrix))
|
||||
"Compute the inverse of a 3x3 matrix. Not very efficient.
|
||||
Requires src != dst."
|
||||
Requires src != dst."
|
||||
(let ((f0-0 (matrix-3x3-determinant arg1)))
|
||||
(set! (-> arg0 vector 0 x)
|
||||
(/ (- (* (-> arg1 vector 1 y) (-> arg1 vector 2 z)) (* (-> arg1 vector 1 z) (-> arg1 vector 2 y))) f0-0)
|
||||
@@ -1175,7 +1173,7 @@ Requires src != dst."
|
||||
;; definition for function matrix-3x3-inverse-transpose!
|
||||
(defun matrix-3x3-inverse-transpose! ((arg0 matrix) (arg1 matrix))
|
||||
"Invert and transpose.
|
||||
Requires dst != src."
|
||||
Requires dst != src."
|
||||
(let ((f0-0 (matrix-3x3-determinant arg1)))
|
||||
(set! (-> arg0 vector 0 x)
|
||||
(/ (- (* (-> arg1 vector 1 y) (-> arg1 vector 2 z)) (* (-> arg1 vector 1 z) (-> arg1 vector 2 y))) f0-0)
|
||||
@@ -1371,7 +1369,7 @@ Requires dst != src."
|
||||
;; definition for function matrix-4x4-inverse-transpose!
|
||||
(defun matrix-4x4-inverse-transpose! ((arg0 matrix) (arg1 matrix))
|
||||
"Invert and transpose an entire 4x4. I think has no restrictions, other than dst != src. Unused.
|
||||
The answer is wrong. The determinant function is wrong."
|
||||
The answer is wrong. The determinant function is wrong."
|
||||
(let ((f0-0 (matrix-4x4-determinant arg1)))
|
||||
(let ((f9-0 (-> arg1 vector 1 y))
|
||||
(f2-0 (-> arg1 vector 1 z))
|
||||
@@ -1716,7 +1714,7 @@ The answer is wrong. The determinant function is wrong."
|
||||
;; INFO: Used lq/sq
|
||||
(defun matrix->quat ((arg0 matrix) (arg1 quaternion))
|
||||
"Convert matrix to quaternion, works for matrix with scale.
|
||||
unlike matrix->quaternion."
|
||||
unlike matrix->quaternion."
|
||||
(let ((s5-0 (new 'stack-no-clear 'matrix)))
|
||||
(let* ((a2-0 arg0)
|
||||
(v1-0 (-> a2-0 quad 0))
|
||||
|
||||
+10
-11
@@ -2,7 +2,6 @@
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 3 of type quaternion
|
||||
;; INFO: this function exists in multiple non-identical object files
|
||||
(defmethod inspect ((this quaternion))
|
||||
(format #t "[~8x] quaternion~%" this)
|
||||
(format #t "~T[~F] [~F] [~F] [~F]~%" (-> this x) (-> this y) (-> this z) (-> this w))
|
||||
@@ -184,8 +183,8 @@
|
||||
;; ERROR: Bad vector register dependency: vf2
|
||||
(defun quaternion-conjugate! ((arg0 quaternion) (arg1 quaternion))
|
||||
"Set arg0 to the conjugate of arg1 (negate only ijk).
|
||||
If arg1 is normalized, this is equivalent to the inverse
|
||||
NOTE: this gives you the inverse rotation."
|
||||
If arg1 is normalized, this is equivalent to the inverse
|
||||
NOTE: this gives you the inverse rotation."
|
||||
(rlet ((vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
)
|
||||
@@ -290,7 +289,7 @@ NOTE: this gives you the inverse rotation."
|
||||
;; ERROR: Bad vector register dependency: vf3
|
||||
(defun quaternion-inverse! ((arg0 quaternion) (arg1 quaternion))
|
||||
"Invert a quaternion. The inverse will satisfy q * q^-1 = identity, even if q is not normalized.
|
||||
If your quaternion is normalized, it is faster/more accurate to do quaternion-conjugate!"
|
||||
If your quaternion is normalized, it is faster/more accurate to do quaternion-conjugate!"
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
(vf0 :class vf)
|
||||
@@ -371,9 +370,9 @@ If your quaternion is normalized, it is faster/more accurate to do quaternion-co
|
||||
;; definition for function quaternion-right-mult-matrix!
|
||||
(defun quaternion-right-mult-matrix! ((arg0 matrix) (arg1 quaternion))
|
||||
"Place quaternion coefficients into a matrix.
|
||||
You can convert a quaternion to a matrix by taking the product of this
|
||||
right-mult and left-mult matrix, but this method is not used.
|
||||
Instead, quaternion->matrix is a more efficient implementation."
|
||||
You can convert a quaternion to a matrix by taking the product of this
|
||||
right-mult and left-mult matrix, but this method is not used.
|
||||
Instead, quaternion->matrix is a more efficient implementation."
|
||||
(let ((f3-0 (-> arg1 x))
|
||||
(f2-0 (-> arg1 y))
|
||||
(f1-0 (-> arg1 z))
|
||||
@@ -659,7 +658,7 @@ Instead, quaternion->matrix is a more efficient implementation."
|
||||
;; definition for function quaternion-slerp!
|
||||
(defun quaternion-slerp! ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float))
|
||||
"Real quaternion slerp. Spherical-linear interpolation is a nice way to interpolate
|
||||
between quaternions."
|
||||
between quaternions."
|
||||
(local-vars (v1-15 float))
|
||||
(rlet ((acc :class vf)
|
||||
(vf1 :class vf)
|
||||
@@ -725,8 +724,8 @@ between quaternions."
|
||||
;; definition for function quaternion-pseudo-slerp!
|
||||
(defun quaternion-pseudo-slerp! ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float))
|
||||
"This is a bad interpolation between quaternions. It lerps then normalizes.
|
||||
It will behave extremely poorly for 180 rotations.
|
||||
It is unused."
|
||||
It will behave extremely poorly for 180 rotations.
|
||||
It is unused."
|
||||
(rlet ((acc :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
@@ -760,7 +759,7 @@ It is unused."
|
||||
;; definition for function quaternion-pseudo-seek
|
||||
(defun quaternion-pseudo-seek ((arg0 quaternion) (arg1 quaternion) (arg2 quaternion) (arg3 float))
|
||||
"Seek one quaternion toward another. Not using real slerp, so this is only good if the quaternions
|
||||
are pretty similar."
|
||||
are pretty similar."
|
||||
(let ((s3-0 (new 'stack-no-clear 'quaternion)))
|
||||
(let ((s5-0 (new 'stack-no-clear 'quaternion)))
|
||||
(quaternion-copy! s3-0 arg2)
|
||||
|
||||
+2
-2
@@ -112,14 +112,14 @@ As a result, this type has a lot of weird methods and extra stuff hidden in it."
|
||||
;; definition for method 23 of type trsqv
|
||||
(defmethod global-y-angle-to-point ((this trsqv) (arg0 vector))
|
||||
"Get the angle in the xz plane from the position of this trsqv to the point arg0
|
||||
(ignores our current yaw)."
|
||||
(ignores our current yaw)."
|
||||
(vector-y-angle (vector-! (new 'stack-no-clear 'vector) arg0 (-> this trans)))
|
||||
)
|
||||
|
||||
;; definition for method 24 of type trsqv
|
||||
(defmethod relative-y-angle-to-point ((this trsqv) (arg0 vector))
|
||||
"Get the y angle between the current orientation and arg0
|
||||
(how much we'd have to yaw to point at arg0)."
|
||||
(how much we'd have to yaw to point at arg0)."
|
||||
(deg-diff (y-angle this) (vector-y-angle (vector-! (new 'stack-no-clear 'vector) arg0 (-> this trans))))
|
||||
)
|
||||
|
||||
|
||||
+10
-10
@@ -15,7 +15,7 @@
|
||||
;; definition for function deg-
|
||||
(defun deg- ((arg0 float) (arg1 float))
|
||||
"Compute arg0-arg1, unwrapped, using rotation units.
|
||||
Result should be in the range (-180, 180)"
|
||||
Result should be in the range (-180, 180)"
|
||||
(the float (sar (- (shl (the int arg0) 48) (shl (the int arg1) 48)) 48))
|
||||
)
|
||||
|
||||
@@ -195,9 +195,9 @@ Result should be in the range (-180, 180)"
|
||||
;; definition for function vector-sin-rad!
|
||||
(defun vector-sin-rad! ((arg0 vector) (arg1 vector))
|
||||
"Taylor series approximation of sine on all 4 elements in a vector.
|
||||
Inputs should be in radians, in -pi to pi.
|
||||
Somehow their coefficients are a little bit off.
|
||||
Like the first coefficient, which should obviously be 1, is not quite 1."
|
||||
Inputs should be in radians, in -pi to pi.
|
||||
Somehow their coefficients are a little bit off.
|
||||
Like the first coefficient, which should obviously be 1, is not quite 1."
|
||||
(rlet ((acc :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf10 :class vf)
|
||||
@@ -239,7 +239,7 @@ Like the first coefficient, which should obviously be 1, is not quite 1."
|
||||
;; ERROR: Bad vector register dependency: vf2
|
||||
(defun vector-cos-rad! ((arg0 vector) (arg1 vector))
|
||||
"Compute the cosine of all 4 vector elements.
|
||||
Radians, with no wrapping. Uses taylor series with 4 coefficients."
|
||||
Radians, with no wrapping. Uses taylor series with 4 coefficients."
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
@@ -272,8 +272,8 @@ Radians, with no wrapping. Uses taylor series with 4 coefficients."
|
||||
;; ERROR: Bad vector register dependency: vf14
|
||||
(defun vector-sincos-rad! ((arg0 vector) (arg1 vector) (arg2 vector))
|
||||
"Compute the sine and cosine of each element of src, storing it in dst-sin and dst-cos.
|
||||
This is more efficient than separate calls to sin and cos.
|
||||
Inputs should be radians in -pi to pi."
|
||||
This is more efficient than separate calls to sin and cos.
|
||||
Inputs should be radians in -pi to pi."
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
@@ -331,7 +331,7 @@ Inputs should be radians in -pi to pi."
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defun vector-rad<-vector-deg! ((out vector) (in vector))
|
||||
"Convert a vector in rotation units to radians, and unwrap.
|
||||
Input can be anything, output will be -2pi to pi."
|
||||
Input can be anything, output will be -2pi to pi."
|
||||
(local-vars (v0-0 float) (v1-1 uint128) (v1-2 uint128) (v1-3 uint128))
|
||||
(rlet ((vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
@@ -357,7 +357,7 @@ Input can be anything, output will be -2pi to pi."
|
||||
;; WARN: Return type mismatch float vs int.
|
||||
(defun vector-rad<-vector-deg/2! ((out vector) (in vector))
|
||||
"Divide the input by two, and then convert from rotation units to radians, unwrapping.
|
||||
Not sure why this really needs to be separate the from previous function..."
|
||||
Not sure why this really needs to be separate the from previous function..."
|
||||
(local-vars (v0-0 float) (v1-1 uint128) (v1-2 uint128) (v1-3 uint128))
|
||||
(rlet ((vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
@@ -438,7 +438,7 @@ Not sure why this really needs to be separate the from previous function..."
|
||||
;; definition for function sign
|
||||
(defun sign ((arg0 float))
|
||||
"Similar to above, but returns 0 if input is 0.
|
||||
But is more complicated."
|
||||
But is more complicated."
|
||||
(cond
|
||||
((< 0.0 arg0)
|
||||
1.0
|
||||
|
||||
+3
-3
@@ -978,8 +978,8 @@
|
||||
;; definition for function vector-dot
|
||||
(defun vector-dot ((arg0 vector) (arg1 vector))
|
||||
"Take the dot product of two vectors.
|
||||
Only does the x, y, z compoments.
|
||||
Originally handwritten assembly to space out loads and use FPU accumulator"
|
||||
Only does the x, y, z compoments.
|
||||
Originally handwritten assembly to space out loads and use FPU accumulator"
|
||||
(vector-dot arg0 arg1)
|
||||
)
|
||||
|
||||
@@ -1003,7 +1003,7 @@ Originally handwritten assembly to space out loads and use FPU accumulator"
|
||||
;; definition for function vector4-dot
|
||||
(defun vector4-dot ((arg0 vector) (arg1 vector))
|
||||
"Take the dot product of two vectors.
|
||||
Does the x, y, z, and w compoments"
|
||||
Does the x, y, z, and w compoments"
|
||||
(vector4-dot arg0 arg1)
|
||||
)
|
||||
|
||||
|
||||
+36
-36
@@ -111,7 +111,7 @@
|
||||
;; definition for function vector/!
|
||||
(defun vector/! ((arg0 vector) (arg1 vector) (arg2 vector))
|
||||
"Set arg0 = arg1 / arg2. The w component will be set to 1.
|
||||
The implementation is kind of crazy."
|
||||
The implementation is kind of crazy."
|
||||
(rlet ((Q :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
@@ -208,7 +208,7 @@ The implementation is kind of crazy."
|
||||
;; definition for function vector--float*!
|
||||
(defun vector--float*! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float))
|
||||
"Set arg0 = arg1 - (arg2 * arg3). The w component will be set to 1.
|
||||
Is this different from vector-*!"
|
||||
Is this different from vector-*!"
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
@@ -311,7 +311,7 @@ Is this different from vector-*!"
|
||||
;; definition for function vector-seek!
|
||||
(defun vector-seek! ((arg0 vector) (arg1 vector) (arg2 float))
|
||||
"Seek arg0 toward arg1. The arg0 is both read and written.
|
||||
arg2 is saturated to (0, 1)"
|
||||
arg2 is saturated to (0, 1)"
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
@@ -337,9 +337,9 @@ arg2 is saturated to (0, 1)"
|
||||
;; definition for function vector-smooth-seek!
|
||||
(defun vector-smooth-seek! ((arg0 vector) (arg1 vector) (arg2 float))
|
||||
"Smoothly seek vec toward target.
|
||||
The step always points toward the target and has length (dist * alpha).
|
||||
If the step is longer than max-step, the step is projected onto a _square_ with side length arg2.
|
||||
Note that this doesn't project to a circle like the function below..."
|
||||
The step always points toward the target and has length (dist * alpha).
|
||||
If the step is longer than max-step, the step is projected onto a _square_ with side length arg2.
|
||||
Note that this doesn't project to a circle like the function below..."
|
||||
(rlet ((acc :class vf)
|
||||
(vf0 :class vf)
|
||||
(vf4 :class vf)
|
||||
@@ -369,9 +369,9 @@ Note that this doesn't project to a circle like the function below..."
|
||||
;; definition for function vector-seek-2d-xz-smooth!
|
||||
(defun vector-seek-2d-xz-smooth! ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
|
||||
"Smoothly seek vec's x and z components toward target.
|
||||
The step always points toward the target and has length (dist * alpha).
|
||||
If the step is longer than max-step, the step is projected onto a circle of radius max-step.
|
||||
Doesn't touch y or w."
|
||||
The step always points toward the target and has length (dist * alpha).
|
||||
If the step is longer than max-step, the step is projected onto a circle of radius max-step.
|
||||
Doesn't touch y or w."
|
||||
(let ((f0-1 (- (-> arg1 x) (-> arg0 x)))
|
||||
(f2-1 (- (-> arg1 z) (-> arg0 z)))
|
||||
)
|
||||
@@ -401,9 +401,9 @@ Doesn't touch y or w."
|
||||
;; definition for function vector-seek-2d-yz-smooth!
|
||||
(defun vector-seek-2d-yz-smooth! ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
|
||||
"Smoothly seek vec's y and z components toward target.
|
||||
The step always points toward the target and has length (dist * alpha).
|
||||
If the step is longer than max-step, the step is projected onto a circle of radius max-step.
|
||||
Doesn't touch x or w."
|
||||
The step always points toward the target and has length (dist * alpha).
|
||||
If the step is longer than max-step, the step is projected onto a circle of radius max-step.
|
||||
Doesn't touch x or w."
|
||||
(let ((f0-1 (- (-> arg1 y) (-> arg0 y)))
|
||||
(f2-1 (- (-> arg1 z) (-> arg0 z)))
|
||||
)
|
||||
@@ -433,9 +433,9 @@ Doesn't touch x or w."
|
||||
;; definition for function vector-seek-3d-smooth!
|
||||
(defun vector-seek-3d-smooth! ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float))
|
||||
"Smoothly seek vec's x, y, and z components toward target.
|
||||
The step always points toward the target and has length (dist * alpha).
|
||||
If the step is longer than max-step, the step is projected onto a circle of radius max-step.
|
||||
Doesn't touch w."
|
||||
The step always points toward the target and has length (dist * alpha).
|
||||
If the step is longer than max-step, the step is projected onto a circle of radius max-step.
|
||||
Doesn't touch w."
|
||||
(let ((f0-1 (- (-> arg1 x) (-> arg0 x)))
|
||||
(f1-2 (- (-> arg1 y) (-> arg0 y)))
|
||||
(f3-1 (- (-> arg1 z) (-> arg0 z)))
|
||||
@@ -469,8 +469,8 @@ Doesn't touch w."
|
||||
;; definition for function seek-with-smooth
|
||||
(defun seek-with-smooth ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
||||
"Move value closer to target.
|
||||
If we are within deadband, just go straight to target.
|
||||
If not, try to go alpha*err. If that is a larger step than max-step, limit to max-step"
|
||||
If we are within deadband, just go straight to target.
|
||||
If not, try to go alpha*err. If that is a larger step than max-step, limit to max-step"
|
||||
(let ((f0-1 (- arg1 arg0)))
|
||||
(cond
|
||||
((>= arg4 (fabs f0-1))
|
||||
@@ -526,7 +526,7 @@ If not, try to go alpha*err. If that is a larger step than max-step, limit to ma
|
||||
;; definition for function vector-v!
|
||||
(defun vector-v! ((arg0 vector))
|
||||
"Convert a velocity to a displacement per frame. The velocity should be in X/actual_second.
|
||||
Uses the current process clock."
|
||||
Uses the current process clock."
|
||||
(vector-float*! arg0 arg0 (seconds-per-frame))
|
||||
arg0
|
||||
)
|
||||
@@ -806,7 +806,7 @@ Uses the current process clock."
|
||||
;; definition for function vector-normalize-ret-len!
|
||||
(defun vector-normalize-ret-len! ((arg0 vector) (arg1 float))
|
||||
"Modify arg0 in place to have length arg1 for its xyz components.
|
||||
The w part isn't changed and the _original_ length is returned."
|
||||
The w part isn't changed and the _original_ length is returned."
|
||||
(local-vars (v1-1 float))
|
||||
(rlet ((acc :class vf)
|
||||
(Q :class vf)
|
||||
@@ -843,8 +843,8 @@ The w part isn't changed and the _original_ length is returned."
|
||||
;; INFO: Used lq/sq
|
||||
(defun vector-normalize-copy! ((arg0 vector) (arg1 vector) (arg2 float))
|
||||
"Normalize, but not in place.
|
||||
This implementation is very good compared to the vector-normalize! one.
|
||||
The w component is set to 1."
|
||||
This implementation is very good compared to the vector-normalize! one.
|
||||
The w component is set to 1."
|
||||
(let ((f0-0 (vector-length arg1)))
|
||||
(cond
|
||||
((= f0-0 0.0)
|
||||
@@ -906,8 +906,8 @@ The w component is set to 1."
|
||||
;; definition for function vector-length-max!
|
||||
(defun vector-length-max! ((arg0 vector) (arg1 float))
|
||||
"Make vector at most arg1 length (xyz only).
|
||||
If it is larger, project onto sphere.
|
||||
Doesn't touch w"
|
||||
If it is larger, project onto sphere.
|
||||
Doesn't touch w"
|
||||
(let ((f0-0 (vector-length arg0)))
|
||||
(when (not (or (= f0-0 0.0) (< f0-0 arg1)))
|
||||
(let ((f0-1 (/ f0-0 arg1)))
|
||||
@@ -925,8 +925,8 @@ Doesn't touch w"
|
||||
;; definition for function vector-xz-length-max!
|
||||
(defun vector-xz-length-max! ((arg0 vector) (arg1 float))
|
||||
"Make vector at most arg1 length (xz only).
|
||||
It it is larger, project onto circle.
|
||||
Doesn't touch w or y."
|
||||
It it is larger, project onto circle.
|
||||
Doesn't touch w or y."
|
||||
(let* ((v1-0 arg0)
|
||||
(f0-4 (sqrtf (+ (* (-> v1-0 x) (-> v1-0 x)) (* (-> v1-0 z) (-> v1-0 z)))))
|
||||
)
|
||||
@@ -1046,7 +1046,7 @@ Doesn't touch w or y."
|
||||
;; definition for function rot-zxy-from-vector!
|
||||
(defun rot-zxy-from-vector! ((arg0 vector) (arg1 vector))
|
||||
"I think this gives you a vector of euler angles to rotate some unit vector
|
||||
to arg1."
|
||||
to arg1."
|
||||
(let* ((f28-0 (-> arg1 z))
|
||||
(f30-0 (-> arg1 x))
|
||||
(f0-0 (atan f30-0 f28-0))
|
||||
@@ -1065,7 +1065,7 @@ to arg1."
|
||||
;; definition for function rot-zyx-from-vector!
|
||||
(defun rot-zyx-from-vector! ((arg0 vector) (arg1 vector))
|
||||
"I think this gives you a vector of euler angles to rotate some unit vector
|
||||
to arg1."
|
||||
to arg1."
|
||||
(let* ((f28-0 (-> arg1 z))
|
||||
(f30-0 (- (-> arg1 y)))
|
||||
(f0-1 (atan f30-0 f28-0))
|
||||
@@ -1084,7 +1084,7 @@ to arg1."
|
||||
;; definition for function vector-lerp!
|
||||
(defun vector-lerp! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float))
|
||||
"Linearly interpolate between two vectors. Alpha isn't clamped.
|
||||
w will be set to 1."
|
||||
w will be set to 1."
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
@@ -1108,7 +1108,7 @@ w will be set to 1."
|
||||
;; INFO: Used lq/sq
|
||||
(defun vector-lerp-clamp! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float))
|
||||
"Linearly interpolate between two vectors, clamping alpha to 0, 1.
|
||||
w will be set to 1."
|
||||
w will be set to 1."
|
||||
(rlet ((vf0 :class vf)
|
||||
(vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
@@ -1203,9 +1203,9 @@ w will be set to 1."
|
||||
;; INFO: Used lq/sq
|
||||
(defun vector-degi ((arg0 vector) (arg1 vector))
|
||||
"Convert a vector (in _rotations_) to degrees units, stored in an int.
|
||||
Truncates to the nearest _rotation_.
|
||||
Neither the input or output is a commonly used form.
|
||||
Unsurprisingly, this strange function is never used."
|
||||
Truncates to the nearest _rotation_.
|
||||
Neither the input or output is a commonly used form.
|
||||
Unsurprisingly, this strange function is never used."
|
||||
(local-vars (v1-0 uint128) (v1-1 uint128))
|
||||
(rlet ((vf1 :class vf))
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
@@ -1221,8 +1221,8 @@ Unsurprisingly, this strange function is never used."
|
||||
;; INFO: Used lq/sq
|
||||
(defun vector-degf ((arg0 vector) (arg1 vector))
|
||||
"Convert a vector (in integer degree units) to floating point rotations.
|
||||
Truncates to the nearest _rotation_.
|
||||
Like the previous function, this is stupid and unused."
|
||||
Truncates to the nearest _rotation_.
|
||||
Like the previous function, this is stupid and unused."
|
||||
(local-vars (v1-1 uint128))
|
||||
(rlet ((vf1 :class vf))
|
||||
(let ((v1-0 (-> arg1 quad)))
|
||||
@@ -1238,7 +1238,7 @@ Like the previous function, this is stupid and unused."
|
||||
;; definition for function vector-degmod
|
||||
(defun vector-degmod ((arg0 vector) (arg1 vector))
|
||||
"This one is actually right. Wraps degrees units (in floats, like they should be)
|
||||
to +/- half a rotation."
|
||||
to +/- half a rotation."
|
||||
(local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128))
|
||||
(rlet ((vf1 :class vf))
|
||||
(.lvf vf1 (&-> arg1 quad))
|
||||
@@ -1617,7 +1617,7 @@ to +/- half a rotation."
|
||||
;; definition for function rand-vu-sphere-point!
|
||||
(defun rand-vu-sphere-point! ((arg0 vector) (arg1 float))
|
||||
"Get a random point on the sphere at the origin with radius arg1.
|
||||
The point is on the surface of the sphere."
|
||||
The point is on the surface of the sphere."
|
||||
(set-vector!
|
||||
arg0
|
||||
(rand-vu-float-range -1.0 1.0)
|
||||
|
||||
+5
-5
@@ -222,10 +222,10 @@
|
||||
;; WARN: Function get-nav-control has a return type of none, but the expression builder found a return statement.
|
||||
(defun get-nav-control ((arg0 process-drawable) (arg1 nav-mesh))
|
||||
"Given a [[process-drawable]] get the associated [[nav-control]] using either:
|
||||
- the provided `nav-mesh` arg
|
||||
- the `nav-mesh` associated with the [[process-drawable]]'s [[entity]]
|
||||
If no [[nav-mesh]] is set or found, set the [[entity]]'s [[entity-perm-status]] to TODO and return an error.
|
||||
Note that this doesn't actually return the nav-control, but instead adds this process-drawable to the nav-mesh."
|
||||
- the provided `nav-mesh` arg
|
||||
- the `nav-mesh` associated with the [[process-drawable]]'s [[entity]]
|
||||
If no [[nav-mesh]] is set or found, set the [[entity]]'s [[entity-perm-status]] to TODO and return an error.
|
||||
Note that this doesn't actually return the nav-control, but instead adds this process-drawable to the nav-mesh."
|
||||
(if (not arg1)
|
||||
(set! arg1 (nav-mesh-from-res-tag (-> arg0 entity) 'nav-mesh-actor 0))
|
||||
)
|
||||
@@ -397,7 +397,7 @@ Note that this doesn't actually return the nav-control, but instead adds this pr
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun add-nav-sphere ((nav nav-control) (sphere sphere) (max-spheres int))
|
||||
"Adds the given [[sphere]] to the [[nav-control]]'s `sphere-array` so long as
|
||||
`max-spheres` is less than [[nav-control]]'s `sphere-count`"
|
||||
`max-spheres` is less than [[nav-control]]'s `sphere-count`"
|
||||
(local-vars (a2-4 float))
|
||||
(rlet ((vf1 :class vf)
|
||||
(vf2 :class vf)
|
||||
|
||||
+14
-14
@@ -25,7 +25,7 @@
|
||||
;; definition for method 74 of type nav-enemy
|
||||
(defmethod general-event-handler ((this nav-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
"Handles various events for the enemy
|
||||
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
|
||||
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
|
||||
(case arg2
|
||||
(('nav-mesh-kill)
|
||||
(deactivate this)
|
||||
@@ -207,9 +207,9 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod common-post ((self nav-enemy))
|
||||
"Does a lot of various things relating to interacting with the target
|
||||
- tracks when the enemy was last drawn
|
||||
- looks at the target and handles attacking
|
||||
@TODO Not extremely well understood yet"
|
||||
- tracks when the enemy was last drawn
|
||||
- looks at the target and handles attacking
|
||||
@TODO Not extremely well understood yet"
|
||||
(if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) (draw-control-status on-screen)))
|
||||
(set-time! (-> self last-draw-time))
|
||||
)
|
||||
@@ -968,10 +968,10 @@
|
||||
;; definition for method 98 of type nav-enemy
|
||||
(defmethod in-aggro-range? ((this nav-enemy) (arg0 process-focusable) (arg1 vector))
|
||||
"Should the enemy activate.
|
||||
- if `activate-distance` is `0.0`, always true
|
||||
- otherwise, check if the provided process is close enough
|
||||
@param proc The process used to distance check
|
||||
@returns true/false"
|
||||
- if `activate-distance` is `0.0`, always true
|
||||
- otherwise, check if the provided process is close enough
|
||||
@param proc The process used to distance check
|
||||
@returns true/false"
|
||||
(if (and arg0 (not arg1))
|
||||
(set! arg1 (get-trans arg0 1))
|
||||
)
|
||||
@@ -1120,7 +1120,7 @@
|
||||
;; WARN: Return type mismatch float vs none.
|
||||
(defmethod set-enemy-info! ((this nav-enemy) (arg0 nav-enemy-info))
|
||||
"In addition to setting the `enemy-info`, also init the `neck-joint` if applicable from it
|
||||
@param info Set `enemy-info` accordingly"
|
||||
@param info Set `enemy-info` accordingly"
|
||||
(set! (-> this enemy-info) arg0)
|
||||
(set! (-> arg0 callback-info) *nav-enemy-callback-info*)
|
||||
(when (and (!= (-> this enemy-info neck-joint) -1) (zero? (-> this neck)))
|
||||
@@ -1315,11 +1315,11 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-from-entity! ((this nav-enemy) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(init-enemy-collision! this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(init-enemy! this)
|
||||
|
||||
+5
-5
@@ -1099,11 +1099,11 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod init-from-entity! ((this rigid-body-object) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(allocate-and-init-cshape this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
(init-skel-and-rigid-body this)
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@
|
||||
;; definition for method 10 of type focus
|
||||
(defmethod collide-check? ((this focus) (proc process-focusable))
|
||||
"If the focused process is not dead,
|
||||
check that the [[collide-spec]] of the focus and the process match."
|
||||
check that the [[collide-spec]] of the focus and the process match."
|
||||
(when (and proc (not (logtest? (-> proc focus-status) (focus-status disable dead))))
|
||||
(let* ((root (-> proc root))
|
||||
(cshape (if (type? root collide-shape)
|
||||
|
||||
+8
-8
@@ -14,8 +14,8 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defbehavior process-taskable-anim-loop process-taskable ((arg0 (function process-taskable object)))
|
||||
"Takes in a function and loops as long as it's return value is truthy
|
||||
Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
- a `(process-taskable process) lambda"
|
||||
Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
- a `(process-taskable process) lambda"
|
||||
(while (arg0 self)
|
||||
(let ((s5-0 (get-art-elem self)))
|
||||
(when (!= (ja-group) s5-0)
|
||||
@@ -42,7 +42,7 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
;; WARN: Return type mismatch art-joint-anim vs art-element.
|
||||
(defmethod get-art-elem ((this process-taskable))
|
||||
"Checks various things such the current actor, task status, etc to determine the right art-group data to use
|
||||
@returns the appropriate [[art-element]] for the given NPC"
|
||||
@returns the appropriate [[art-element]] for the given NPC"
|
||||
(the-as art-element (if (> (-> this skel active-channels) 0)
|
||||
(-> this skel root-channel 0 frame-group)
|
||||
)
|
||||
@@ -430,11 +430,11 @@ Seen take in - `true-func` which takes no args TODO - seems fishy
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod init-from-entity! ((this process-taskable) (arg0 entity-actor))
|
||||
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
This commonly includes things such as:
|
||||
- stack size
|
||||
- collision information
|
||||
- loading the skeleton group / bones
|
||||
- sounds"
|
||||
(stack-size-set! (-> this main-thread) 512)
|
||||
(process-taskable-method-31 this)
|
||||
(process-drawable-from-entity! this arg0)
|
||||
|
||||
+4
-4
@@ -222,7 +222,7 @@ It's 32 bytes + type tag (ignored by C kernel)."
|
||||
;; definition for method 0 of type cpad-list
|
||||
(defmethod new cpad-list ((allocation symbol) (type-to-make type))
|
||||
"Create a cpad-list for 2 controllers. It's fine to do this even if one or both controllers
|
||||
aren't connected yet."
|
||||
aren't connected yet."
|
||||
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> gp-0 num-cpads) 2)
|
||||
(set! (-> gp-0 cpads 0) (new 'global 'cpad-info 0))
|
||||
@@ -234,9 +234,9 @@ aren't connected yet."
|
||||
;; definition for function analog-input
|
||||
(defun analog-input ((arg0 int) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
||||
"Convert integer input from pad into a float between -out-range and +out-range.
|
||||
The offset is applied directly to the input.
|
||||
The center val is the expected value for 0, after applying offset.
|
||||
The max val is the expected value with the stick pushed all the way."
|
||||
The offset is applied directly to the input.
|
||||
The center val is the expected value for 0, after applying offset.
|
||||
The max val is the expected value with the stick pushed all the way."
|
||||
(let* ((f1-1 (- (the float arg0) arg1))
|
||||
(f0-3 (- (fabs f1-1) arg2))
|
||||
(v1-0 (- arg3 arg2))
|
||||
|
||||
+3
-3
@@ -114,8 +114,8 @@
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 a1, Count]
|
||||
(defun stopwatch-end ((arg0 stopwatch))
|
||||
"End a stopwatch level. Stops the stopwatch if it's back to level zero.
|
||||
There is no guard against ending a stopwatch too many times, and a negative level
|
||||
will cause errors!"
|
||||
There is no guard against ending a stopwatch too many times, and a negative level
|
||||
will cause errors!"
|
||||
(local-vars (a1-0 int))
|
||||
(+! (-> arg0 begin-level) -1)
|
||||
(when (zero? (-> arg0 begin-level))
|
||||
@@ -180,7 +180,7 @@ will cause errors!"
|
||||
;; definition for method 10 of type clock
|
||||
(defmethod advance-by! ((this clock) (arg0 float))
|
||||
"Advance the clock by arg0 timeframes (as a float).
|
||||
Both counters keep a separate fractional and integer counter."
|
||||
Both counters keep a separate fractional and integer counter."
|
||||
(the int (+ arg0 (-> this accum)))
|
||||
(+! (-> this integral-accum) arg0)
|
||||
(set! (-> this old-integral-frame-counter) (-> this integral-frame-counter))
|
||||
|
||||
+1
@@ -687,6 +687,7 @@
|
||||
(shutdown sound-rpc-shutdown :overlay-at (-> data 0))
|
||||
(list-sounds sound-rpc-list-sounds :overlay-at (-> data 0))
|
||||
(unload-music sound-rpc-unload-music :overlay-at (-> data 0))
|
||||
(mirror-mode sound-rpc-set-mirror-mode :overlay-at (-> data 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+2
-2
@@ -715,8 +715,8 @@
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior sound-play-by-name process-drawable ((arg0 sound-name) (arg1 sound-id) (arg2 int) (arg3 int) (arg4 int) (arg5 sound-group) (arg6 object))
|
||||
"Send play rpc to play a sound!
|
||||
Last arg can by a symbol with value [[#t]], in which case it will pull `trans` [[vector]] off the current [[process-drawable]]
|
||||
otherwise, an explicit [[vector]] can be provided"
|
||||
Last arg can by a symbol with value [[#t]], in which case it will pull `trans` [[vector]] off the current [[process-drawable]]
|
||||
otherwise, an explicit [[vector]] can be provided"
|
||||
(local-vars (sv-16 sound-group))
|
||||
(set! sv-16 arg5)
|
||||
(let ((s4-0 arg6))
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@
|
||||
;; definition for method 10 of type carry-info
|
||||
(defmethod distance-from-destination ((this carry-info) (arg0 carry-info))
|
||||
"Returns the distance from the current `point` and the provided [[carry-info]]'s `point`.
|
||||
Returns `-1.0` if it exceeds the maximum allowed"
|
||||
Returns `-1.0` if it exceeds the maximum allowed"
|
||||
(let* ((f28-0 (vector-y-angle (vector-! (new 'stack-no-clear 'vector) (-> arg0 point) (-> this point))))
|
||||
(f30-0 (fabs (deg-diff f28-0 (vector-y-angle (-> this normal)))))
|
||||
(f28-1 (fabs (deg-diff (+ 32768.0 f28-0) (vector-y-angle (-> arg0 normal)))))
|
||||
|
||||
+3
-3
@@ -230,9 +230,9 @@
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod common-post ((this grunt-mech))
|
||||
"Does a lot of various things relating to interacting with the target
|
||||
- tracks when the enemy was last drawn
|
||||
- looks at the target and handles attacking
|
||||
@TODO Not extremely well understood yet"
|
||||
- tracks when the enemy was last drawn
|
||||
- looks at the target and handles attacking
|
||||
@TODO Not extremely well understood yet"
|
||||
((method-of-type grunt common-post) this)
|
||||
0
|
||||
(none)
|
||||
|
||||
Loaded 100 of 275 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user