This is so I can get rid of wgpu from the launcher, where it's only
purpose is to figure out the GPU name for the support package.
The problem with it is that on some environments, it errors, but the
function cannot have it's errors gracefully handled (it panics and
crashes instead).
So I'm tired of it, do it ourselves.
![image](https://github.com/user-attachments/assets/fa8ae365-b3f7-4794-81ed-fde0c2ffc651)
Fixes issue with not handling texture flipping flags in sprite renderer
(new jak 3 feature). As far as I can tell, there is no visible
difference because the textures that use this flag are symmetric.
Fix issue with not adding an `and` with `0xf` on the offset into the xy
table. This is added only in jak 3, where `vi07`'s upper bits are
sometimes nonzero, but doesn't hurt to have in all three games.
```
iaddi vi09, vi00, 0xf | nop
iand vi07, vi07, vi09 | nop
```
![image](https://github.com/user-attachments/assets/559d749a-957a-47dc-af6a-5b4b7d72a65b)
Fix issue with inf/nan causing the tentacle to not appear:
![image](https://github.com/user-attachments/assets/7c316cdf-7ff8-452d-b4af-ddb8d5ba4e44)
---------
Co-authored-by: water111 <awaterford1111445@gmail.com>
I hope this is everything I needed, and nothing I didn't.
## What's Changed
This update adds a command-line parameter to goalc, `--iso-path`.
Providing a path to a directory like
`D:\Files\Repositories\ArchipelaGOAL\iso_data\jak1` will inform the
compiler to use that directory instead.
## Why is this useful?
When combined with `--proj-path`, the compiler can be pointed to a
completely different project folder, given the `(mi)` command, and
immediately begin building from that directory, with everything it
needs. This eliminates the need to copy `iso_data` to multiple `data`
directories.
If a subsequent change to the Launcher is made, each mod could be passed
an --iso-path pointing to a single shared folder, allowing mods to each
run their own REPL _without_ requiring a copy of `iso_data` in a
subfolder.
## Independent testing required!
My local repositories are a little suspect, with a mod, a fork of
mod-base, and a fork of jak-project, all on the same drive. My
decompiler_out and iso_data folders are in the mod repo, not mod-base
nor jak-project. So what I did was make the change in the mod-base fork,
point `--proj-path and --iso-path` to the mod folders, and then ran
`(mi)`. The output showed a build starting with no errors.
Then I had to create this PR, which my fork of mod-base is unable to do,
so I created a patch file, forked jak-project, then applied the patch
there.
All this is to say that it would be preferable if someone could apply
this code to their own installation and see if it works. Even I wouldn't
take my own word for this.
---------
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
Fix https://github.com/open-goal/jak-project/issues/3701, and possibly
other issues where projectiles were invisible/messed up. The use of
`align16` with the -16 was subtracting 16 in cases when the pointer was
already aligned, causing a bad value to be loaded for the quaternion.
I also renamed some variables and did some manual cleanup on a method in
process-drawable, since this one comes up a lot during debugging.
Co-authored-by: water111 <awaterford1111445@gmail.com>
Fixes#3644 which I believe is the same underlying issue as "NG+ glitch"
To reproduce the issue in #3644 you can:
- choose Hub 2 100% in the speedrun fast reset menu
- hit the blue sage warp gate switch
- go deep enough into any adjacent level (e.g. basin) where `village2`
display is turned off
- reset speedrun in the fast reset menu
- tasks are reset but the switch will be pressed, giving the cutscene
early
You can also grab orbs/scout flies in `village2`, and they won't be
reset properly because of this same bug.
It happens because of the way entity perm status is managed across both
`level` vs `game-info` objects.
- when `village2` is deactivated (still loaded but display hidden), its
entity perms are copied to `game-info`'s `perm-list`
- this is how we persist `warp-gate-switch-7` being pressed if village2
is ever unloaded
- during the speedrun reset `reset-actors` is called:
- any active levels (loaded+displayed) have their entity perm statuses
reset
- because `village2` is not displayed yet, its entity perm statuses are
not touched
- `game-info` is re-initialized, clearing out its `perm-list`
- continue is set to `firecanyon-end`
- this unloads `rolling` or whatever to make room for `firecanyon`
- `village2` is already loaded, and just gets displayed
- at this point the game does copy entity perm status from `game-info`
back to the `village2` level
- but we reset the game, so it has no data about the warp-gate-switch,
leaving it pressed!
This adds some new JSON entries to custom levels so they can support
vanilla sky textures and the texture remapping tables, allowing for
proper textures on objects that use `generic`, like dark eco pools or
dying enemies.
The comments explain it in more detail, but the gist is:
For skies:
- `sky` needs to be a vanilla level that has sky textures.
- The alpha tpage (fourth entry in `tpages`) needs to be that vanilla
level's alpha tpage (if `tex_remap` is the same level as `sky`, this
will be handled automatically).
- The tpage needs to be added to the custom level `.gd` and to
`textures` in the JSON.
- In `level-info.gc`, `sky` needs to be `#t`, your level's mood needs to
call `update-mood-sky-texture` (the default mood, `update-mood-default`,
handles this as an example) and `sun-fade` needs to be nonzero for the
sun to show up.
For `generic` textures:
- `tex_remap` needs to be the name of a vanilla level.
- When using a vanilla level's remap table, you need to adhere to the
order of the files in that level's `.gd` in your own level.
- Code files are first.
- Then the tpages (in the order `tfrag`, `pris`, `shrub`, `alpha`,
`water`).
- Then the art groups.
- Lastly, the level file.
- The tpages need to be added to the `textures` in the JSON.
- Fix global heap display in cheat mode
- Fix `tpl-watcher` NaNs after they fire their laser (`vf0` was being
clobbered) (Fixes#3684)
- Fix `artifact-race` talkers (Fixes#3685)
This is basically applying the same fix as `vector<-cspace!`, which
we've been doing since jak 1.
They often make bugs where they use bones before they are properly
initialized. On PS2, it's relatively harmless - it results in stuff
going to the origin for 1 frame (where it collides with nothing, since
the collide cache was filled somewhere else), then going back to normal.
On PC, using these uninitialized bones results in NaNs. This is because
`0 * (1 / w)` where `w = 0` done in the `update-transforms` is `NaN` on
PC, but 0 on PS2. These NaNs propagate to the velocity, and you get
stuck with everything being NaN.
![image](https://github.com/user-attachments/assets/f575fed5-4543-4f72-b7d1-c5c8be8036f8)
Co-authored-by: water111 <awaterford1111445@gmail.com>
This only applies to the background for now:
- support for alpha for vertex colors in custom levels
- switch time of day palette generation from octree to k-d tree
- support for alpha masking in custom levels
- support for transparent textures
- support for envmap in custom levels
---------
Co-authored-by: water111 <awaterford1111445@gmail.com>
Similar to the workaround added in jak 3, if too many sounds are
playing, a sound will be removed. If there are multiple instances of the
same sound being played, those will be removed first. Within that, older
sounds are removed first.
It's not exactly the same as the instance limits of 989snd, but it seems
to work well. It's at least better than what we had before.
Co-authored-by: water111 <awaterford1111445@gmail.com>
`bigmap` and `blit-displays` mostly work. `blit-displays` is still
missing all of the special effects that were added in Jak 3 (brightness
and contrast settings, screen blur effect, etc.).
`bigmap` is missing the player marker texture (`hud-target-marker`) for
some reason, it's part of `tpage-17` which is coming from
`progress-minimap` and should already be included. The icons also
currently stretch when using aspect ratios other than 4:3.
The progress menu now also works for the most part. The draw order is a
bit messed up because some code was initially drawing things with the
ocean bucket, which was changed to use `hud-draw-hud-alpha` instead for
now. The texture for the volume and brightness/contrast sliders still
looks wrong.
Fixes#3653Fixes#3656
A small change that makes the models look a lot better.
Will likely cause a crash if imported model has no normal data, but
that's on the user to fix on their model.
Found out the hard way that the `abutton` array for pressure sensitivity
uses a different order than the `pad-buttons` enum, so I created a new
enum for abutton indexing.
I replaced any magic numbers across the codebase where it made sense,
e.g.
`(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number)
abutton 6)`
becomes
`(-> *cpad-list* cpads (-> self control unknown-cpad-info00 number)
abutton (abutton-idx x))`
Goes with https://github.com/open-goal/speedrunning/pull/21
Based on some of the autosplit points from the [comgold
sheet](https://docs.google.com/spreadsheets/d/1ZtceX0ZxCLkufVFQuCgVxptvmVgp6deHwPYWxUPi258/edit?gid=0#gid=0),
plus one after talking to samos to give a clean split for timing the
deload.
```
(tomb-poles-poles uint8) ;; left tomb/daxter boulder start
(fortress-save-friends-introduction uint8) ;; talk to torn (before rescue friends)
(sewer-escort-get-gun uint8) ;; get peacemaker
(forest-protect-introduction uint8) ;; talk to onin (protect samos)
(forest-protect-meeting uint8) ;; talk to samos (protect samos)
```
e.g. instead of just `beach-foreground.glb` and `beach-background.glb`,
you'd now get:
- `beach/babak-lod0.glb`
- `beach/babak-lod1.glb`
- `beach/babak-lod2.glb`
- `beach/barrel-lod0.glb`
- `beach/beach-background.glb`
- `beach/beachcam-lod0.glb`
- ... (42 other files)
- `beach/windmill-one-lod2.glb`
`common` models are also grouped into their own folder
This adds a feature to `build_actor` to support importing skeletons and
animations from .glb files.
Multiple animations are handled and will use the name in the GLB. The
default `viewer` process will end up playing back the first animation.
There are a few limitations:
- You can only have around 100 bones. It is technically possibly to have
slightly more, but certain animations may fail to compress when there
are more than ~100 bones.
- Currently, all animations have 60 keyframes per second. This is a
higher quality than what is normally used. If animation size becomes
problematic, we could make this customizable somehow.
- There is no support for the `align` bone.
---------
Co-authored-by: water111 <awaterford1111445@gmail.com>
Finnish translations for Jak 2. These include cutscenes and all game
text.
All subtitle timings for cutscenes as well as non-cutscenes have been
edited for a better flow and to fit the 4x3 ratio.
I've been working on these solo for the most part so any input from
other finns would be appreciated.
A few issues in the progress menu I mentioned in #3504 still persist
I couldn't figure out how to add Finnish to the options menu, so I'm
gonna need someone else to do that part. 💀
But I was able to add them to the debug menu.
I also increased subtitle heap so hopefully that doesn't break anything.
Fixes#3620
---------
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>