diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-02-08 15:39:56 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-03-30 08:20:21 +0200 |
| commit | 98f0d3e026f978d556cc91cfaa815d92a0b182c8 (patch) | |
| tree | bd9f39354da8fcbed0453bf45152c39e803abbf6 /src/camera | |
| parent | 56286a0a962119ddebf26df58d4a7c5d2f6a3fc7 (diff) | |
| download | jancity-98f0d3e026f978d556cc91cfaa815d92a0b182c8.tar.gz | |
Replace x_get functions with macros
The PS1 port relies on a heap for primitives since the GPU renders the
scene asynchronously. However, SDL-based platforms render primitives
synchronously, so structures can be allocated on the stack instead.
Diffstat (limited to 'src/camera')
| -rw-r--r-- | src/camera/src/camera.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/camera/src/camera.c b/src/camera/src/camera.c index 5146108..4f529df 100644 --- a/src/camera/src/camera.c +++ b/src/camera/src/camera.c @@ -73,9 +73,9 @@ static void cursor_update(struct camera *const cam, const struct pad *const p) int cursor_render(const struct cursor *const c) { - struct sprite *const s = sprite_get(); + sprite_get_or_ret(s, -1); - if (!s || sprite_clone(&cursor_sprite, s)) + if (sprite_clone(&cursor_sprite, s)) return -1; s->x = c->x; |
