Commit graph

1882 commits

Author SHA1 Message Date
Tyler Wilding 6d99f1bfc1
d/config: re-organize decompiler/config and eliminate most of the duplication (#2185)
Reasons for doing so include:
1. This should stop the confusion around editing the wrong config file's
flags -- when for example, extracting a level. Common settings can be in
one central place, with bespoke overrides being provided for each
version
2. Less verbose way of supporting multiple game versions. You don't have
to duplicate the entire `type_casts` file for example, just add or
override the json objects required.
3. Makes the folder structure consistent, Jak 1's `all-types` is now in
a `jak1` folder, etc.
2023-03-08 20:07:26 -05:00
water111 0b8b927315
[merc] support eyes through merc (#2300)
Support rendering eyes with merc for both jak 1 and jak 2.

For jak 1, everything should look the same, but merc will be used to
draw eyes. This means that jak is now fully drawn with merc!

For jak 2, eyes should draw, but there are still a few issues:
- the tbp/clut ptr trick is used a lot for these eye textures, so
there's a lot that use the wrong texture
- I had to enable a bunch more "texture uploads" (basically emulating
the ps2 texture system) in order to get the eyes to upload. It would be
much better if the eye renderer could somehow grab the texture from the
merc model info, skipping the vram addressing stuff entirely. I plan to
return to this.
- I disabled some sky draws in `sky-tng`. After turning on pris2
uploads, the sky flashed in a really annoying way.
2023-03-08 18:18:35 -05:00
Tyler Wilding 00d7065790
goalc: remove deprecated CLI args from goalc and remove empty repo folders (#2301)
This gets rid of the `auto-lt` and `auto-dbg` CLI args to `goalc` that
have been marked deprecated for a month or so at this point. The
behaviour can be replicated via the `startup.gc` file.

I also removed `decompiler_out/` and `log/` from the repo, as our C++
code is smart enough to create these directories if they are missing now
so they are superfluous
2023-03-08 18:18:24 -05:00
OpenGOAL Bot 0424cd1f7f
CI: Periodic Controller Database Update (#2302)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-03-06 16:55:37 -05:00
Tyler Wilding bc40fc5d2f
util/file: cleanup log initialization and some file-util functions (#2299)
Fixes both issues mentioned in #2297
2023-03-01 17:52:33 -05:00
ZedB0T 43da4088e6
Fix Bombbot crash (#2296) 2023-02-28 20:39:57 +01:00
water111 d6bd437ea1
[merc] support up to 64 effects (#2292) 2023-02-27 21:02:47 -05:00
water111 2c12a4e00b
[jak2] WIP minimap (#2280)
Work in progress minimap. Known issues:
- "path finding" doesn't appear to work - it gets stuck forever in many
cases
- some nasty patches around timer-based code
- jak arrow blending issues
- would be nice to make it higher resolution

if the search is forced to terminate due to iteration/time limits, the
icon is not in the right place

![image](https://user-images.githubusercontent.com/48171810/221432792-678d6124-a6a6-4875-a91f-7eceedbfec98.png)
2023-02-27 19:51:14 -05:00
ManDude 1d0a5ade8d
[jak2] minor decomp cleanup + add force actors and sprite pc hacks (#2291)
I didn't actually visually notice much of a difference with these hacks
unlike in Jak 1, but I also avoided checking the missions thoroughly
since the game crashes very often right now.
2023-02-28 00:35:57 +00:00
Tyler Wilding c3310e1833
docs: fix method docstrings and grab @file comment blocks to use as a file description (#2289) 2023-02-27 18:58:01 -05:00
Tyler Wilding 87ff182332
dbgr: allow dumping the backtrace to a file (#2284)
Some backtraces are quite large, an option is to increase your terminal
buffer -- but dumping to a file is also useful if you want to share the
crash.

I'm not crazy about the way I hacked this in, but it felt like the least
invasive way for now and I don't want to cause a regression with the
debugger. It's also nice that it dumps with ansi colors as then you can
view the backtrace with the original coloring:


![image](https://user-images.githubusercontent.com/13153231/221460358-991916ad-90f0-445d-ba81-7bc3dbc42eb4.png)

Usage:
```clj
(:di "./stacktrace.log")
```
2023-02-27 18:54:23 -05:00
Hat Kid adf929d18d
decomp: ruf-*, jinx-*, mog-*, grim-*, hosehead-* files, gun-buoy (#2279) 2023-02-27 18:53:57 -05:00
ManDude e1e6695e92
[jak2] merc lod hacks + region debugger + make level heap less massive (#2285) 2023-02-27 18:45:32 +00:00
OpenGOAL Bot 3c6446f641
CI: Periodic Controller Database Update (#2287)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-02-27 13:08:25 -05:00
ManDude fb20bf34df
rotate log files (#2283)
Fixes #1228 (wow only took 1 year)
2023-02-26 22:56:25 +00:00
Hat Kid 736a3a8b7c
jak2: fix jellyfish crash and temporarily disable underwater warp (#2270)
Fix crash when the game tries to spawn `jellyfish` in Underport and
temporarily disable the rendering of the warp effect until it's properly
implemented.
2023-02-26 17:24:05 -05:00
ManDude 63ff337169
[jak2] fix crash with *print-column* loading the wrong memory (#2281)
`inspect` also prints with the correct indent now as a result.
2023-02-26 21:04:05 +00:00
Matt Dallmeyer 9b80bca589
Add Speedrun Category Extensions (#2195) 2023-02-26 13:42:24 -05:00
water111 e48ae247c4
[jak2] fix palace rotation and sprite glow depth test (#2269)
- Disable depth test for sprite glow (VU1 programs only `sq.xy` and
leaves `z` alone, which has Z_MAX from the template)
- Fix tfrag/tie/shrub issues when `use-camera-other` is set.
2023-02-26 09:52:04 -05:00
Tyler Wilding 90d5e83d9e
d/jak2: finish forest-obs (#2266) 2023-02-26 09:49:16 -05:00
ManDude 190fa4bbe8
[windows] make the games start up in the user's preferred system UI language (#2267)
Where applicable, of course.

My system language is set to English so I actually can't test this. If
anyone has their Windows language (NOT LOCALE) set to Spanish, German,
French, Italian or Japanese please test this.

Fixes #1734 

Also fixes the opengoal debugger on Windows and fixes the decomp for
`menu` which was causing some crashes related to input handling.
2023-02-26 09:46:57 -05:00
water111 928dbebee4
[jak2] fix highly aggressive guard zoomer ambush (#2264)
`*alert-level-settings*` was actually an inline array and we were
indexing past the end of it.
I think this will fix some of the strange on-foot guard behavior too.
2023-02-26 01:31:21 -05:00
water111 41fabd43f7
[sprite glow] fix crashes (#2256)
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-02-25 20:21:42 -05:00
ManDude 618455500d
Fix Jak 2 scissoring (#2257)
fixes #2255 and hopefully didn't break Jak 1
2023-02-26 00:09:35 +00:00
water111 8a363c2fc9
[jak2] fix foreground light calculation (#2254)
Fixes the abrupt change in lighting when walking around here

![image](https://user-images.githubusercontent.com/48171810/221382856-17f0ec18-1ce8-40f9-b65c-a59cf2d7d93f.png)
2023-02-25 17:55:55 -05:00
water111 3f1f443d58
[jak 2] fix boot, increase level heap sizes (#2252)
Increase level heaps and borrow heaps. The level heap increase was
likely not needed, but better safe than sorry. We allocate the 128 MB
main heap anyway so there's no harm.

Also fix the crash when using `-boot`. As I thought it was just a
one-line typo in the kernel.
2023-02-25 15:20:17 -05:00
ManDude ad9a532ff9
[jak2] text aspect ratio fixes (#2251)
Fixes the aspect ratio of the font renderer (Jak 2 does not need the
same hacks as Jak 1), the custom letterbox/pillarbox sizes and fixes the
heap display.

---------

Co-authored-by: water <awaterford111445@gmail.com>
2023-02-25 19:27:58 +00:00
water111 909da024fc
[decomp] ctywide-obs (#2250)
finish this up
2023-02-25 14:00:16 -05:00
ManDude 4b8b2abbed
port pckernel to Jak 2 (#2248)
Adds the `pckernel` system to Jak 2, allowing you to do the PC-specific
things that Jak 1 lets you do like change game resolution, etc.

In other to reduce the amount of code duplication for something that
we're gonna be changing a lot over time, I split it into a few more code
files. In this new system, `pckernel-h.gc`, `pckernel-common.gc`
(previously `pckernel.gc`) and `pc-debug-common.gc` are the files that
should be shared across all games (I hacked the Jak 2 project to pull
these files from the Jak 1 folder), while `pckernel-impl.gc`,
`pckernel.gc` and `pc-debug-methods.gc` are their respective
game-specific counterparts that should be loaded after. I'm not fully
happy with this, I think it's slightly messy, but it cleanly separates
code that should be game-specific and not accidentally copied around and
code that should be the same for all games anyway.
2023-02-25 10:19:32 -05:00
water111 e2b7e5c001
[goalc] reduce compiler memory usage (#2247) 2023-02-24 18:32:30 -05:00
Tyler Wilding e10ca97891
repl: prevent REPL crash when running (reload) (#2243)
Stops the REPL crashing with `device or resource busy` when running
`(reload)`

However I think this is indicative of a bigger problem where either the
`Compiler` or prompt is not ready to handle input immediately after
creation and setting the status to `OK`.
2023-02-24 18:04:10 -05:00
Matt Dallmeyer e89f0770dc
Fix Jak 2 warp gates (#2244) 2023-02-24 19:33:27 +01:00
Hat Kid 2d8ad39fea
jak2: add back some pc port debugging tools and add palace-scenes to gsrc (#2240)
Ports some of the custom PC port debugging code from Jak 1, such as the
entity debugger, Anim Tester X and part tester, to Jak 2 and gives the
PC menu code the same treatment Jak 1 received recently in #2216.
Some adjustments have been made to make things work in Jak 2 and some
stuff is still incomplete.
The majority of the default PC menu code has been left commented out in
preparation for @ManDude's plan to port the rest of the Jak 1 `pckernel`
features to Jak 2.

Also adds the code for `palace-scenes` to gsrc as that seems to have
been missed.
2023-02-23 21:39:02 +00:00
Dillon Pentz 66c680e8a3
[jak2] fix rare civilian flee crash (#2230)
Fixes a rare crash that can sometimes happen when civilians are picking
a direction to flee in, where a branch count may be 0, causing a divide
by 0 MATH_EXCEPTION.
2023-02-21 01:30:09 -05:00
Tyler Wilding a76f558537
ci: gen-docs propagate the runId since thats the best we can do (#2238) 2023-02-20 22:52:33 -05:00
Tyler Wilding 3c3d45d497
ci: set cmake preset in informing workflow (#2237) 2023-02-20 22:14:47 -05:00
water111 08ce65fd9b
[jak2] add sprite glow renderer (#2232)
Adds the "sprite glow" renderer, which is responsible for the glowing
lights.
2023-02-20 20:25:45 -05:00
Matt Dallmeyer f388898d7b
Speedrun verification text cleanup (#2229)
We only draw this text to the screen if we're in speedrunner mode
anyway, so the `#t` flag on this line doesn't really add any value imo

b130b2eac2/goal_src/jak1/pc/features/speedruns.gc (L248-L255)


![image](https://user-images.githubusercontent.com/2515356/220177466-4ecb8376-7953-4161-a6ca-a300b6978d3e.png)
2023-02-20 19:49:57 -05:00
Tyler Wilding 39658dfd71
docs: Automatically generate documentation from goal_src code (#2214)
This automatically generates documentation from goal_src docstrings,
think doxygen/java-docs/rust docs/etc. It mostly supports everything
already, but here are the following things that aren't yet complete:
- file descriptions
- high-level documentation to go along with this (think pure markdown
docs describing overall systems that would be co-located in goal_src for
organizational purposes)
- enums
- states
- std-lib functions (all have empty strings right now for docs anyway)

The job of the new `gen-docs` function is solely to generate a bunch of
JSON data which should give you everything you need to generate some
decent documentation (outputting markdown/html/pdf/etc). It is not it's
responsibility to do that nice formatting -- this is by design to
intentionally delegate that responsibility elsewhere. Side-note, this is
about 12-15MB of minified json for jak 2 so far :)

In our normal "goal_src has changed" action -- we will generate this
data, and the website can download it -- use the information to generate
the documentation at build time -- and it will be included in the site.
Likewise, if we wanted to include docs along with releases for offline
viewing, we could do so in a similar fashion (just write a formatting
script to generate said documentation).

Lastly this work somewhat paves the way for doing more interesting
things in the LSP like:
- whats the docstring for this symbol?
- autocompleting function arguments
- type checking function arguments
- where is this symbol defined?
- etc

Fixes #2215
2023-02-20 19:49:37 -05:00
OpenGOAL Bot 65f2146d73
CI: Periodic Controller Database Update (#2231)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-02-20 16:39:41 -05:00
Matt Dallmeyer b130b2eac2
Redundant (declare-file (debug)) (#2226)
Just noticed this while looking into #2225 , this line is repeated a few
lines later

b9cd17b20a/goal_src/jak1/engine/camera/cam-layout.gc (L8-L13)
2023-02-18 17:26:33 -05:00
water111 b9cd17b20a
[jak1] fix crash on startup (#2225) 2023-02-18 17:19:22 -05:00
Hat Kid d946a09a99
decomp: palcab-obs (#2222)
Co-authored-by: water <awaterford111445@gmail.com>
2023-02-18 15:59:34 -05:00
water111 b7cfd80b14
set up fog for jak 2 (#2223)
![image](https://user-images.githubusercontent.com/48171810/219878142-8ad7c154-9f52-4ad8-a315-1c932e24cd4b.png)
2023-02-18 15:45:13 -05:00
Hat Kid f452a504e6
decomp: race-* files (#2224) 2023-02-18 15:45:00 -05:00
OpenGOAL Bot 466ef6af3d
CI: Periodic Controller Database Update (#2217)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-02-18 11:01:47 -05:00
Hat Kid d65d6233d9
decomp: kidesc-*|crocesc-* files, ash4-course (#2219)
Co-authored-by: water <awaterford111445@gmail.com>
2023-02-18 11:01:24 -05:00
Hat Kid 7a2575fd23
decomp: meet-brutter (#2218) 2023-02-18 10:30:29 -05:00
Matt Dallmeyer 4c812658f1
Easier combo for Speedrun Options (#2196)
Some people have complained about the button combo for entering the
speedrun menu, saying it's awkward to press Start.

This change lets you press Select instead (while holding L1+R1+X). The
old combo (pressing Start) still works as well.
2023-02-18 09:51:26 -05:00
ManDude ee3bc182e1
[jak1] force credits to use audio language instead of text language (#2220) 2023-02-14 20:12:45 +00:00