summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTom Overton <tom-overton@users.noreply.github.com>2024-12-13 03:34:39 -0800
committerGitHub <noreply@github.com>2024-12-13 08:34:39 -0300
commit8efc382b9f9c670063611e32b21cac53345bd3b2 (patch)
tree7e6d97113ab1d795b4c556b9809eb6db7cde0d99 /docs
parentf6d4a8731e4a4385a25d9a6dc42b4c6dfd4a577b (diff)
Remove THIS macro (#1756)
* Remove THIS macro * Revert changes to the documentation * Undo revert to STYLE.md
Diffstat (limited to 'docs')
-rw-r--r--docs/STYLE.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/STYLE.md b/docs/STYLE.md
index 10db9c8e1..ae274dc46 100644
--- a/docs/STYLE.md
+++ b/docs/STYLE.md
@@ -150,19 +150,19 @@ All compound flag lists (e.g. `ACTOR_FLAG_HOSTILE | ACTOR_FLAG_FRIENDLY`) should
## Play2
-In some particular instances, IDO requires the function argument `play` to be cast to a second variable of the same type to match. In these particular instances, the function argument should be renamed to `play2` and than this `play2` just assigned to a stack variable called `play`. This cast should occur before the actor `THIS` cast is made. For example in `z_en_firefly.c`
+In some particular instances, IDO requires the function argument `play` to be cast to a second variable of the same type to match. In these particular instances, the function argument should be renamed to `play2` and than this `play2` just assigned to a stack variable called `play`. This cast should occur before the actor recast is made. For example in `z_en_firefly.c`
```c
void EnFirefly_Update(Actor* thisx, PlayState* play2) {
PlayState* play = play2;
- EnFirefly* this = THIS;
+ EnFirefly* this = (EnFirefly*)thisx;
```
-In other places the cast is actually not explictly needed, but a stack `pad` variable is still needed. For this there should just be a stack variable called `pad` of type `s32` before the actor `THIS` cast. For example in `z_bg_goron_oyu`
+In other places the cast is actually not explictly needed, but a stack `pad` variable is still needed. For this there should just be a stack variable called `pad` of type `s32` before the actor recast. For example in `z_bg_goron_oyu`
```c
void BgGoronOyu_Init(Actor* thisx, PlayState* play) {
s32 pad;
- BgGoronOyu* this = THIS;
+ BgGoronOyu* this = (BgGoronOyu*)thisx;
CollisionHeader* colHeader = NULL;
```