Skip to content

Commit

Permalink
updates for 1.0 (#81)
Browse files Browse the repository at this point in the history
* first pass for collision viewer implementation

* fix Cc collider viewer?

* add capsule collider view

* fix: freestanding lib

* fix: wii compilation

* trigger view menu initial setup

* implement viewing a couple trigger types

* make actor spawn menu state permanent

* add option to change trigger opacity

* simplify some file names to avoid corruption bug

* collider opacity option

* free cam collision view

* add disable item timer cheat

* fix stallord 2 save to work better

* implement evt area view

* fix: wii compilation

* fix gorge void tool

* add actor delete button to list menu

* add button mash checker tool

* add mash checker position setting

* add freeze actor option

* fix wii proc enum

* improve event area trigger draw

* better? evt area height calculation

* fix stallord2 and timer tools

* fix rupee cutscene flag toggle

* Add Path View

* Use correct loop check and small formatting fixes

* update readme / docs to reflect changes

* fix: modules documentation

* fix path draw nullptr crash

* fix wii actor struct size

* add restart change trigger view

* add sOldVcdVatCmd symbol for wii jp / pal

* fix proc enum again

* fix rollchecker

* cleanup

* add view plumm tags

* sort warping menu type and room names

* sort item wheel

* proc name list WIP

* actor list menu revamp

* continue fixing actor viewer menu

* more cleanup from testing

* fix proc names issue

* tools menu fast scroll, actor viewer negative wrap around

* fix build

* add actor transform block distance view

* add plumm cs trigger view

* fix any% bit save

* fix hundo aeralfos save

* update movelink, taka fixes for actor viewer

* fix a couple more saves

* fix movelink bug

* fix minor bug in GZ_getButtonRepeat

* add crrpos hook, fix another movelink bug

* movelink -> moveactor, actor viewer improvements

* add credits page, bump to 1.0.0

* move heart slightly

* rm ferdi

* add mist avoid draw

* projection lines WIP

* midna charge projection updates (WIP)

* fix move actor event state

* add basic attention viewer / flat terrain display

* decouple poly draw into individual toggles

* add polygon edge view

* add collision range/raise options

* add missing addrs for other versions

* add menu options for lja and midna charge projection

* split projection viewer out

* trigger/collision menu sorting

* fix most move actor issues

* add new menu item descriptions

* fix projection view linking / crash

* fix any% save inaccuracies

* fix no sand sink tool

* better implementation of invincible cheat

* fix hide hud toggle

* fix wii daalink alignment

* Adds transform indicator

* updated tool menu order

* refactored REL features management

* made commands dynamic

* made gz_flgas dynamic

* extracted umd feature

* extracted BiT

* extracted corotd checker

* extracted default position initialization

* fix memory leak

* extracted mash checker

* extracted gorge checker

* extracted rollcheck

* updated deque

* modified settings saving process

* updated settings menu & tools for new save system

* updated sprite offsets for new save system

* updated scene items for new save system

* fixed unloaded init function pointers

* updated watches to use new save system

* Added scrolling to watches menu & minor setting fixes

* removed useless macro

* fix bit command

* minor tools menu fix

* fixing tools not working when loading saved settings

* fix move link tool speed for wii

* fix teleport tool

* optimized line rendering

* Added indication of more lines to display

* fixed actor spawner param offset

* updated menu offsets for wii & added indicator for watches menu

* fix top line indication y offset

* minor line fix

* Added text view for the memory editor

* fixed checkbox sizing with non uniform fonts

* removed transform indicator from menu

* moved menu.h/.cpp to the `menus` dir

* checkpoint

* removed `addrs.h`

* enable projection menu, fix actor viewer

* Fixed projection not being enabling

* fix crash on projection menu.

* fix proj viewers, update more proc names

* fix potential crash.

* fix wii crash on capsule rendering

* moved one time patch code to init module

* future proofing module loading

* optimised cursor movement & added memfile existence check

* optimizations

* display actor id

* Adding kytag09 to wii GV checker

* Add manual check for transform indicator

* added user defined button combos

* Changed description text to match custom combos

* minor fixes

* update command with new combos

* updated settings funcion names

* some small menu / free cam adjustments

* fix plumm tag view

* fix fast bonk

* added reset option to item wheel menu

* move spawning to preloop listener

* fix last file reload

* fix area reload

* memory editor optimization

* added expanded view for mem editor

* optimisation + cosmetic change for mem edit

* undo actor spawner changes, add more stored fields for projections

* hook cleanup

* removed unnecessary osreports

---------

Co-authored-by: kipcode66 <[email protected]>
Co-authored-by: jdflyer <[email protected]>
Co-authored-by: Pheenoh <[email protected]>
  • Loading branch information
4 people authored Jun 27, 2024
1 parent b179b4a commit 29d38aa
Show file tree
Hide file tree
Showing 635 changed files with 12,843 additions and 5,164 deletions.
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
"runArgs": [
"--network=host"
],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",
Expand Down
42 changes: 42 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Attach",
"type": "cppdbg",
"request": "attach",
"MIMode": "gdb",
"miDebuggerServerAddress": "0.0.0.0:2159",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
},
{
"type": "lldb",
"debugServer": 2159,
"request": "custom",
"name": "Custom launch",
"initCommands": [
"target remote localhost:2159"
],
"targetCreateCommands": [
],
"processCreateCommands": [
// "settings set target.run-args value1 value2 value3",
// "process launch"
]
}
]
}
24 changes: 10 additions & 14 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ git clone https://github.com/zsrtp/tpgz.git
git submodule update --init --recursive
```

3. Copy your Twilight Princess ISO into the root `tpgz` folder. You will need to rename the ISO based on which platform and region you're building for.
3. Copy your Twilight Princess ISO into the `isos` folder. You will need to rename the ISO based on which platform and region you're building for.

| Game Version | ISO Name |
|--------------|------------|
Expand All @@ -33,29 +33,25 @@ git submodule update --init --recursive

- This is used to add our compiled code into the ISO.
- It is recommended that you add romhack.exe to your PATH.
- (For compiling the GameCube version, ensure you download the `-gc` version)

6. Set the **PLATFORM** and **REGION** environment variables to build your specific version of the game.

Linux:

6. Create a `build` directory and navigate to it
```bash
export PLATFORM="GCN"
export REGION="NTSCU"
mkdir build
cd build/
```

Windows (PowerShell):

```powershell
$env:PLATFORM = "GCN"
$env:REGION = "NTSCU"
7. Configure CMake from the `build` directory
```bash
#Example:
cmake .. -D PLATFORM=GCN -D REGION=NTSCU
```

- Supported values for PLATFORM are `GCN` and `WII`
- Supported values for REGION are `NTSCU`, `NTSCU_10`, `NTSCJ` and `PAL`
- If you don't set these, the default values of `GCN` and `NTSCU` will be assumed when building.
7. Run `make` in the root `tpgz` folder to compile the code.
8. Run `make` in the `build` directory to compile the code.
8. Run `romhack build --raw` to create a new ISO with our changes applied.
Expand Down
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ if(DEFINED PR_TEST)
set(RUN_PR_TEST "-DPR_TEST=1")
endif()

if(DEFINED DEBUG)
set(DEBUG "-DDEBUG=1")
endif()

# Start configuring the build directory
message(STATUS "Configuring for ${PLATFORM}_${REGION}...")

Expand All @@ -60,7 +64,7 @@ include(cmake/relmapper.cmake)
include(cmake/fonts.cmake)

project(TPGZ
VERSION 0.6.1
VERSION 1.0.0
DESCRIPTION "Twilight Princess speedrunning practice and testing tool"
HOMEPAGE_URL "tpgz.io"
LANGUAGES C CXX ASM)
Expand All @@ -70,7 +74,7 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)

# Set compiler stuff
include_directories(include external)
add_definitions(-D${PLATFORM}_${REGION} -D${PLATFORM}_PLATFORM -DGZ_VERSION=${CMAKE_PROJECT_VERSION} -D_PROJECT_NAME="${CMAKE_PROJECT_NAME}" -D_VERSION="${CMAKE_PROJECT_VERSION}" -D_VARIANT="public" -D_BUILDID="${CMAKE_PROJECT_VERSION}" ${RUN_PR_TEST})
add_definitions(-D${PLATFORM}_${REGION} -D${PLATFORM}_PLATFORM -DGZ_VERSION=${CMAKE_PROJECT_VERSION} -D_PROJECT_NAME="${CMAKE_PROJECT_NAME}" -D_VERSION="${CMAKE_PROJECT_VERSION}" -D_VARIANT="public" -D_BUILDID="${CMAKE_PROJECT_VERSION}" ${DEBUG} ${RUN_PR_TEST})
add_compile_options(-fdiagnostics-color=always -fvisibility=hidden)

include(cmake/tp_c.cmake)
Expand Down
41 changes: 31 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Include the following in your request, with as much detail as possible:

## Development

We first recommend reading the [Dev Overview](./docs/DevOverview.md) to get an idea of how the project is setup.

Visit the [issue tracker](https://github.com/zsrtp/tpgz/issues) to find a list of open issues that need attention.

Fork, then clone the repo:
Expand All @@ -40,8 +42,15 @@ git clone https://github.com/your-username/tpgz.git

```
tpgz
├───.devcontainer // Docker container environment files
├───.github
│ └───workflows // github action(s) used to test code compilation
├───bin // binaries used in the compilation process
│ ├───gcn // gcn specific binaries
│ └───wii // wii specific binaries
├───cmake // cmake build rule files
├───common // common files
├───docs // various documentation
├───external // external libraries and programs consumed by tpgz
│ ├───fonts // small rust program to generate raw bytes and c code for utilizing true-type fonts in game
│ │ ├───fonts // ttf files
Expand All @@ -50,22 +59,34 @@ tpgz
│ │ ├───include // header files for gcn_c
│ │ └───src // source code for gcn_c
│ ├───libtp_c // game bindings for twilight princess
│ | ├───.github
│ | │ └───workflows // github action(s) used to test code compilation
│ | ├───include // header files for libtp_c
│ | └───src // source code for libtp_c
| └───misc // misc tools/scripts
├───include // header files for tpgz
│ ├───menus // menu header files
| └───utils // utility header files
├───isos // original game isos
├───modules // tpgz module source code
│ ├───boot // permanently loaded module source code
│ │ ├───include // module header files
│ │ └───src // module source code
│ ├───features // feature-specific modules source code
| | └───* // feature module
│ │ │ ├───include // feature header files
│ │ │ └───src // feature source code
│ ├───init // tpgz initialization source code
│ │ ├───include // initialization header files
│ │ └───src // initialization source code
│ └───menus // menu modules source code
| └───* // menu module
│ ├───include // menu header files
│ └───src // menu source code
├───res // external resources to be consumed
│ ├───bin // region specific binary data
│ ├───fonts // raw font data
│ ├───icons // icon resources
│ ├───save_files // practice file metadata and raw quest log bytes to be injected at compile time
│ ├───save_files_wii // wii specific practice file metadata
| ├───stage_info // stage info data for warping menu
| └───tex // custom textures
├───src // source code for tpgz
| ├───menus // menu source code
| └───utils // utility source code
| └───tex // custom textures processed for tpgz
└───src // stub for compilation purposes
```

### Building
Expand All @@ -74,7 +95,7 @@ See [BUILDING.md](./BUILDING.md).

### Linting

Please format your files using the .clang-format file. Submodules should **not** be included when formatting, as these will have their own clang-format files.
Please format your files using the .clang-format file

Example clang-format usage (Ubuntu):

Expand Down
Loading

0 comments on commit 29d38aa

Please sign in to comment.