Commit graph

222 commits

Author SHA1 Message Date
water111 f142f46045
add more comments/docstrings on first 58 files, try new windows-specific framelimiting (#1134)
* cleanup

* type

* link against a library
2022-02-05 16:30:50 -05:00
water111 2342b6fb0f
[graphics] MERC (#1124)
* merc dma generation

* wip very early version of merc

* small fixes

* fix

* fix more merc bugs

* derp fixed min

* oops we did need something weird on max

* merc for everything

* program optimization 1

* more optimization

* windows

* windows 2

* clean up

* fix test

* BLERC
2022-02-03 22:45:41 -05:00
ManDude bd1718dc9c
A lot of fixes (game is 100%'able!) (#1118)
* a crapton of fixes

* Update cavecrystal-light.gc

* damn you

* fix bunnies

* change codegen for int -> float cast (just add sign extension now)

* fix test

* this file is tagged anyway

* fix some stack types

* remove bad camera debug funcs

* add more heap bars and entity pick menu

* finish entity menu and make `music-flava` enum

* fix some `process-taskable` fields

* citadel sage crash fix

* fix citadel drop plats

* fix tests

* fix some casts

* update refs

* finish `village3-obs` and `snow-ball`

* Update README.md

* fix sidekick too

* fix issue?

* more entity inspect hardcoded checks

* more

* use `*display-actor-anim*` for something!

* CRAP

* also clear actor anim when deselecting entity

* *display-actor-anim* already renders this!

* do not display `path` tag info

* entity debug inspect tool

* one more

* make debug string even larger

* missing res tag types

* more polish and more known tags

* last few
2022-01-31 20:44:54 -05:00
water111 8f4dd59b7a
[game] clean up texture stuff (#1120)
* better texture loading

* remove old and bad tfrag renderers
2022-01-28 23:44:03 -05:00
water111 57649d243f
[bones] Part 1: Joint (#1110)
* joints

* bones

* align spr to 16k

* fix bug

* lack of sound hack

* clean up
2022-01-28 21:32:03 -05:00
ManDude eb53f410e5
test game actors and fix up/disable broken ones (#1103)
* test village1, beach, jungle actors

* fix jungle actors

* more anims and fixes

* Update launch.vs.json

* fix bad `robotboss` decomp

* fix `robotboss`

* Update robotboss.gc

* fix `mother-spider-proj`

* fix detach (windows)

* update refs

* village2 spools

* type fixes + a few more spols + add append/not-append to goos

* fix beach, misty, village1, village3, lavatube

* fix snow entities

* fix `target-flut`

* update refs

* forgot one

* fail

* sound fixes

* fix test

* complain if `heap-base` is bad

* correct `add-spheres!` decomp errors

* fix citadel

* fix target `change-state` handler

* fix `final-door` state

* fix `target-flut-falling`

* fix deftypes

* oopsie

* move heap memory display behind a toggle and make it fancy

* Update gstate.gc
2022-01-27 19:33:34 -05:00
water111 35bdc9b1d3
add an optional, less-accurate-but-faster sprite render and fix silly math bug (#1102)
* also add a new sprite renderer

* claaaang

* goal build fix

* fix tests, add stack singleton option

* make all event-message-blocks the same

* diskboot
2022-01-21 21:11:57 -05:00
water111 4648f78733
add vis data to tie/tfrag and better framelimiting/lag (#1100)
* add vis data to tie/tfrag and better fps stuff

* better default
2022-01-20 00:22:03 -05:00
water111 a66eef6034
more small fixes (#1094)
* more small fixes

* better bones fix

* type fix
2022-01-19 19:39:36 -05:00
water111 dc663d8a1f
[game] edge grab, small fixes, add zoomer (#1083)
* fix a few small things

* fix tests

* another fix

* fix tests
2022-01-17 14:36:29 -05:00
water111 e84b5a2346
[collision] implement most of background collision, spawn target! (#1076)
* fill collide cache with bounding box working

* yprobe fully working for background at least

* target

* final cleanup, add a bit more foreground mesh stuff that is untested

* warnings, merge issues

* tests

* revert debug changes, format'

* rendering perf
2022-01-15 16:52:47 -05:00
ManDude 67bb1193a8
[runtime] GPU sprite renderer (#1075)
* sprite_3d first attempt

* fixs

* fix Q usage

* ??

* attempt 2

* Update sprite_3d.vert

* works-ish

* works properly!

* scissor fix

* simplify shader

* texture support except everything is broken for some reason

* stuff

* Update SpriteRenderer.cpp

* meltdown

* Revert "simplify shader"

This reverts commit 97bd9b77be.

* Revert "Revert "simplify shader""

This reverts commit 32fb46ce90.

* fix blend

* fix blend and prim

* fix depth write and texture rendering

* fix bugs

* remove noperspective

* fix and finalize sprite 3D vert shader

* optimize 3D program

* 2D sprites! almost first try

* fixes + merge shader code

* HUD sprite support and clean up code

* oopsie

* fix 3d sprites

* minor cleanup and increase sprite buffer to 8k sprites

* clang

* replace some uses of `glBufferSubData` with `glBufferData`
2022-01-15 12:31:38 -05:00
water111 f6f1cadb8e
collide probe works, amazingly (#1072)
* collide probe works, amazingly

* add ref test
2022-01-10 19:28:17 -05:00
water111 38c805ca7c
unused version of collide line sphere collide list (#1071) 2022-01-09 17:45:19 -05:00
ManDude 76a819b98f
[game] revise build order and add remaining levels + add part-tester to menu (#1069)
* Add remaining levels to build system

* add a particles menu

* Update default-menu.gc

* Update part-tester.gc

* make part tester non-destructive

* Make the "ps2 particles" toggle work!

* Update kmachine.h

* fix test

* fix test
2022-01-09 17:43:13 -05:00
water111 a96396e140
[collision] add notes on -h files, add some enums (#1068)
* temp

* add enums
2022-01-08 20:57:57 -05:00
ManDude 701108a1b6
[runtime] Fix progress menu aspect ratios (#1055)
* update progress code and fix our frame "scissoring"

* aspect ratio hacks

* expand progress tint for widescreen

* give up and comment things properly

* properly undo hacks
2022-01-08 13:39:17 -05:00
water111 ab6f41d0c6
[gfx] sprite 3d hack and fix graphics dumps (#1057)
* add sprite 3d

* cleanup
2022-01-07 16:13:19 -05:00
water111 5b3098d617
fix sky and tfrag bugs (#1058) 2022-01-07 14:43:43 -05:00
water111 3c42d222cb
[game] improve loading (#1049)
* better load

* fix sky, cleanup
2022-01-07 11:52:24 -05:00
ManDude 2e18cb605a
[runtime] optimize DirectRenderer for multiple textures + optimize sprite renderer (#1054)
* optimize sprite texture flush + update shaders

* fix bugs

* change logic a bit

* crunch PNGs

* hud size fix

* clang

* remove shaders from list

* use really small alpha cut-off point for sprites

* ad `flat` to vertex shaders too

* increase cut-off very slightly

* take *2 into account

* ok for real this should be good enough
2022-01-06 18:47:20 -05:00
water111 474a8494d8
remove gd files, simplify fakeiso (#1053)
* remove gd files, simplify fakeiso

* fix bug in decompiler mistakenly marking functions as asm
2022-01-04 23:36:39 -05:00
ManDude 62c14631af
[files] merge fake duplicate files (#1048)
* merge `orb-cache-top`

* hopefully fix random TIE extractor crash

* merge `ecovalve-ag`

* expand debug gfx buckets

* merge `barrel-ag`, `sack-ag`, `sharkey-ag`

* merge `warp-gate-switch-ag`

* merge everything else

* Update extract_tie.cpp

* add misty level

* oops

* properly add it this time
2022-01-04 20:32:34 -05:00
water111 b999422305
[tie] add wind effect (#1046)
* wip tie wind stuff

* wind

* clang
2022-01-02 19:02:28 -05:00
ManDude c9204f2a9b
Fix Windows asserts (#1045)
* fix release mode asserts

* clang

* dummy
2022-01-02 18:02:10 -05:00
water111 6e4b34be0b
fix goal build error and a few c++ warnings (#1044) 2022-01-02 16:10:09 -05:00
water111 cd9e74819c
improve performance on intel graphics (#1041)
* improve performance on intel graphics

* more tweaks, add a glfinish button

* remove divide in fragment shader

* temp

* add cpu sky blend

* use vao

* change format

* use floats in direct renderer

* format

* format again

* tfrag ice
2021-12-30 19:38:18 -05:00
ManDude 9ff71412e5
[runtime] pckernel implementation (#1032)
* toggle for ripping level models

* Create pckernel.gc

* builds and works

* fix defs

* resolution info works

* native letterboxing

* menu

* Fullscreen buttons

* Update glfw

* fix fullscreen taking over everything for some reason

* fix screenshots and add more menu options

* Cleanup DMA mess in load boundary render code (first try!!)

* Update default-menu.gc

* clang

* fix accidental macros in pairs

* refs

* fix null reference bugs

* add lavatube

* custom aspect ratios work (3D only)

* custom aspect ratios work (3D only)

* fix aspect ratio and non-4x3 debug text

* change `sceOpen`

* deadzone setting

* merge fixes

* check out `debug-pad-display`

* update readme imgs

* settings save works

* oops

* settings read/load (incomplete)

* add `:stop` to debugger and fix detach on Windows

* settings load works

* fullscreen and aspect ratio setting fixes

* swap menu options for convenience

* settings loads automatically properly

* fix panic and font hack edge case

* add rolling, ogre, snow, swamp, sunken b, jungle b

* Fixed borderless on windows please work

* Update fake_iso.txt

* remove error from opengl debug filter

* update refs

* minor tfrag tod palette lookup change

* accidentally nuked all opengl errors
2021-12-30 18:48:37 -05:00
water111 e8db0583c9
fix flashing lava in firecanyon (#1036) 2021-12-28 22:22:19 -05:00
water111 9b0ae373f0
[decomp] collide-func (#1034)
* add mips2c collide functions

* add ref test for collide-func

* fix test
2021-12-28 16:43:13 -05:00
water111 798356802b
[game] make visibility work (#1031)
* make vis work

* update comments
2021-12-28 15:13:46 -05:00
water111 a8342aef31
[graphics] TIE extractor (#1026)
* temp

* temp

* wip

* more progress on the instance asm

* first half of tie extraction, up to dma lists

* more tie extraction

* first part figured out maybe

* bp1 loop seems to work, bp2 loop does not

* bp1 and bp2 appear working. sadly ip is needed

* ip1 outline, not working ip2

* just kidding, ip2 seems to work

* extraction seems to work

* basic rendering working

* tie fixes

* performance optimization of tie renderer

* hook up tie to engine

* fix more bugs

* cleanup and perf improvements

* fix tests

* ref tests

* mm256i for gcc

* CLANG

* windows

* more compile fixes

* fix fast time of day

* small fixes

* fix after merge

* clang
2021-12-26 12:33:51 -05:00
ManDude 59a12029a0
[decomp] cleanup default-menu, fix dangerous IOP bug, autoconvert ints in pairs to/from bintegers (#997)
* fix a couple macros in ref tests

* `default-menu` cleanup

* add `find-instance-by-name` func

* improve debugger slightly hopefully

* fix IOP PLAY buffer overrun bug

* fix `default-menu` more

* automatically convert ints in static pairs to/from bintegers

* fix test

* clang

* fix a few more lambdas

* update refs

* add custom menu cuz cool

* oopsie! also make `default-level` and `halfpipe` go away

* add camera teleport menu

* update types in debug menu
2021-12-09 18:39:40 -05:00
ManDude e69266bc95
[runtime] fix gamepad race condition, only allow gamepad for pad 0, fix defstatehandler, allow mapping any pad w/ keyboard (#993)
* fix gamepad race condition, only allow gamepad for pad 0, fix `defstatehandler`, allow mapping any pad w/ keyboard

* dont render debug stuff with manylevel hack
2021-12-04 15:34:03 -05:00
water111 28b6584cd4
add ref tests for tfrag (#989) 2021-12-04 13:14:40 -05:00
water111 083202929c
[graphics] tfrag3 renderer (#978)
* begin work

* work

* working objs

* exporting

* it works

* before some time of day fixes

* add time of day interp and also fix zbuffer

* some small blending fixes

* improve randomess

* clean up extraction and missing blend mode

* culling, time of day, more level fixes

* more cleanup

* cleanup memory usage

* windows fix
2021-12-04 12:33:18 -05:00
ManDude 25b0e1be7d
[decomp] collectables + works ingame! (#971)
* decomp: `collectables`

* fix types

* `powerups` and fixes

* fixes

* Merge branch 'pr/929' into d/temp/collectables

* fix collide stuff

* update things...

* update

* update

* temp bump global heap mem

* fix `defstate` hooks wrong/unnecessary sets & collide stuff for collectables

* dumb mistakes :)

* stub out broken process-drawable stuff

* update refs

* add `:no-inspect` key and save some memory & remove birth logs

* Update kmachine.h

* clang

* add citadel

* fix no-inspect key

* fix tests!!

* fix stupid mistake in `collide-shape-prim-sphere` alloc

* comment annoying print

* feedback

* fix edge-case probably

* remove `:no-inspect`s
2021-11-23 18:25:57 -05:00
water111 7292cb5765
tfrag improvements (#970)
* tfrag improvements

* cleanup

* one last fix

* clang
2021-11-15 20:07:10 -05:00
ManDude 80a002f8c0
[decomp] entity birth (#964)
* make birthing work

* fix float representation on defskelgroup

* test

* update

* debugger improvements & dont upload aux sprites

* ?

* fix progress

* fixes

* fixes

* Create bea.gd

* fix test

* fix xmm reg clobbering in kernel (water)

* cleanup cam-start

* clear gamepad state every frame

* allow controller connects and disconnects while running
2021-11-15 19:05:28 -05:00
water111 380e7b3580
clean up a few small things (#968) 2021-11-14 12:45:47 -05:00
Tyler Wilding 44c43610ce
game: Get camera code working (#965)
* cmake: disable edit&continue flags

* goos: make the build system work for alternate file paths nicely

* vs: update vs config

* vscode: extend terminal buffer!

* vs: fix presets

* debugger: fix exception handler

* game: add logo to application

* decomp: get `cam-master` to "work" -- manually changed return type

* debugger: fix printing issue

* game: get the camera actually working

* game: neutralize the analog sticks

* game: support analog sticks

* tests: update ref tests

* temp commit - inprogress stuff

* fix `send-macro`

* turn camera stuff back on, seems to work.  Still kernel-dispatch problem though

* address feedback

* formatting
2021-11-13 22:41:15 -05:00
water111 3afd99a8e3
[graphics] partial tfrag implementation (#958)
* temp

* some decomp

* tfrag dma setup

* fix negative label bug

* tfrag dma setup

* tfrag, with pipeline tricks

* kinda works

* cleanup before trying some color stuff

* time of day works

* clean up

* temp before render changes

* a few more fixes

* fix up tests

* clean up

* fix

* fix alignment

* one more cleanup
2021-11-13 20:44:17 -05:00
ManDude ff50cf2552
improve debugger disasm, :sym-name and fix Windows builds (#959)
* improve debugger disasm, `:sym-name` and fix Windows builds

* >:(

* use this inline constexpr thing??

* fine use strings then

* please.... please work...

* fix windows debugger oopsie

* display rip as goal addr as well

* [debugger] attempt to backtrace even if landed on some garbage memory

* Update CMakePresets.json
2021-11-12 22:00:41 -05:00
water111 6a606d7222
Start a debug tool for looking through level data (#954)
* temp

* temp

* level inspection tool

* docs

* windows fix
2021-10-31 13:12:50 -04:00
water111 d6e82eedb0
[decomp] fix and decomp part tester (#935)
* temp

* update tests
2021-10-23 20:15:31 -04:00
water111 d6f631383e
decomp more level stuff (#932)
* more level stuff

* vi1 to jun load working, with multiple skies

* small fixes

* add level ref test

* clang
2021-10-23 16:00:49 -04:00
water111 44626cfedd
fix issues and decompile racer-states (#924)
* fix issues and decompile racer-states

* type fix
2021-10-21 22:38:39 -04:00
water111 b7fe8447e2
[decomp] improve types around enter-state (#923)
* clean up

* restore hack
2021-10-20 20:55:25 -04:00
water111 18714ba536
[decomp] load boundaries (#922)
* mostly working

* fixes

* very small fixes

* fix tests

* clang
2021-10-20 19:49:32 -04:00
water111 b2052016e2
[decomp] sky/time of day (#883)
* time of day

* goal code seems to work

* stars at wrong spot

* stars and sun work

* debugging clouds

* fix texture correction

* sky works

* cleanup, add profiler

* clean up

* final clean up

* offline tests

* missing include
2021-10-10 20:07:03 -04:00