aboutsummaryrefslogtreecommitdiff
path: root/src/tmonster.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-08 22:35:16 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-08 22:35:16 +0100
commit8871729a65615df0eab213bbbf942abe75771704 (patch)
tree34a4ab0f412c34383799e14816d1dfe288705085 /src/tmonster.c
parent5ae0b6490f5fd138f4cbf5c084680bb03b2fff05 (diff)
downloadgold-mine-run-8871729a65615df0eab213bbbf942abe75771704.tar.gz
gold-mine-run-8871729a65615df0eab213bbbf942abe75771704.zip
Avoid drawing the whole screen on each frame
This allows supporting 386DX "just about" (there will be flickering).
Diffstat (limited to 'src/tmonster.c')
-rw-r--r--src/tmonster.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tmonster.c b/src/tmonster.c
index 30d5714..9f3c618 100644
--- a/src/tmonster.c
+++ b/src/tmonster.c
@@ -34,8 +34,8 @@ static const Rect frames[2 * 4] =
void tmonster_init(Entity *e)
{
- e->y = 16;
- e->x = 32 + (rand() % 256);
+ e->ox = e->y = 16;
+ e->oy = e->x = 32 + (rand() % 256);
e->dir = e->x > 160 ? DIR_LEFT : DIR_RIGHT;
e->frames = (const Rect *)frames;
e->update = tmonster_wait_update;