Commit Graph

12 Commits

Author SHA1 Message Date
Tyler Wilding 2b1876f862 formatter: Add support for a few common functions and fix an LSP startup issue (#3190) 2023-11-11 17:51:55 -05:00
water111 85725401d2 [jak2] Hopefully improve sky performance (#3130)
Switches the slime look up table to be a texture, since I guess intel
drivers are terrible and putting the array in the shader makes it
extremely slow.

Also, a few minor changes:
- removed art-groups from the test-zone levels since this causes the
compiler to re-decompile the game, and makes the launcher slower. (left
it in commented out)
- Switched `decompile_code` to false by default in jak 2, in case people
run the decompiler and don't want to wait forever
- Fixed build warnings
2023-11-04 09:33:16 -04:00
Tyler Wilding dccc3da1b3 formatter: rewrite and refactor, address more edge-cases, begin documenting my work (#3096) 2023-10-20 21:24:31 -04:00
water111 0e31a9c407 [decompiler] Handle find-parent-method (#3018)
This change adds a few new features:
- Decompiler automatically knows the type of `find-parent-method` use in
jak 1 and jak2 when used in a method or virtual state handler.
- Decompiler inserts a call to `call-parent-method` or
`find-parent-state`
- Removed most casts related to these functions

There are still a few minor issues around this:
- There are still some casts needed when using `post` methods, as `post`
is just a `function`, and needs a cast to `(function none)` or similar.
It didn't seem easy to change the type of `post`, so I'm not going to
worry about it for this PR. It only shows up in like 3 places in jak 2.
(and 0 in jak 1)
- If "call the handler if it's not #f" logic should probably be another
macro.

Fixes #805
2023-09-30 11:06:09 -04:00
Tyler Wilding a7cf66fda6 formatter: support formatting bindings, for example in a let (#2883) 2023-08-05 15:23:09 -04:00
Tyler Wilding 533d2f6f2b formatter: new approach for indentation that doesn't depend on original formatting (#2764) 2023-06-22 00:16:18 -04:00
Tyler Wilding a8a5f1e745 formatter: support comments better (including block comments) and constant pair formatting (#2745) 2023-06-18 17:19:35 -04:00
Tyler Wilding 3dbaee1ecc formatter: handle top level blank lines and better handle comments (#2702) 2023-06-06 20:34:50 -04:00
Tyler Wilding 6d620a9289 formatter: extract formatting into a rules abstraction, add inner formatting (body vs argument functions) (#2684) 2023-06-04 13:19:29 -04:00
Tyler Wilding 4c6982b0ec formatter: initial and basic indentation/alignment and expose the formatting via the LSP (#2673) 2023-05-28 13:22:00 -04:00
Tyler Wilding 5e987cc0e2 jak2: overlord rework (#2544)
Fixes #2545
Fixes #2546
Fixes #2547
Fixes #2548
Fixes #2549
Fixes #2550
Fixes #2551
Fixes #2552
Fixes #2553
Fixes #2554
Fixes #2555
Fixes #2556
Fixes #2557
Fixes #2558
Fixes #2559
Fixes #2560
Fixes #2561
Fixes #2562
Fixes #2563
Fixes #2564
Fixes #2565
Fixes #2567
Fixes #2566
Fixes #2568
Fixes #2569
Fixes #2570
Fixes #2522
Fixes #2571

---------

Co-authored-by: water <awaterford111445@gmail.com>
Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-04-29 16:13:57 -04:00
Tyler Wilding 0ffb912a04 formatter: add tree-sitter dependency and commit early draft work on a proper code formatter (#2536) 2023-04-24 23:46:55 -04:00