diff options
author | Tobias Kortkamp <tobik@FreeBSD.org> | 2019-02-04 06:48:33 +0000 |
---|---|---|
committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2019-02-04 06:48:33 +0000 |
commit | b7d53da3c4360c0a5eb7378447ef1ddec97c843d (patch) | |
tree | 813965dd94845cf2dd2ffbebb07170c8fe2c045b /games/alex4/files/patch-shooter.c | |
parent | games/ags: Backport some patches to fix build with Allegro 4.4.3 (diff) |
games/alex4: Prepare for Allegro 4.4.3
Allegro 4.4.3 removed aliases for fsin, fcos, etc. They are also
available as fixsin, fixcos, etc., so use them instead.
PR: 235477
Notes
Notes:
svn path=/head/; revision=492100
Diffstat (limited to 'games/alex4/files/patch-shooter.c')
-rw-r--r-- | games/alex4/files/patch-shooter.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/games/alex4/files/patch-shooter.c b/games/alex4/files/patch-shooter.c index d2ab8de98528..f37d25dfb3b7 100644 --- a/games/alex4/files/patch-shooter.c +++ b/games/alex4/files/patch-shooter.c @@ -1,5 +1,40 @@ ---- shooter.c.orig 2016-06-14 16:25:53 UTC +--- shooter.c.orig 2019-02-04 06:12:31 UTC +++ shooter.c +@@ -500,12 +500,12 @@ void s_update_object(Tspace_object *o) { + break; + case SM_SIN_WAVE: + o->x += o->vx; +- o->y = o->d2 + fixtoi(fmul(ftofix(o->vy), fsin(itofix(o->t)))); ++ o->y = o->d2 + fixtoi(fixmul(ftofix(o->vy), fixsin(itofix(o->t)))); + o->t += o->d1; + break; + case SM_COS_WAVE: + o->x += o->vx; +- o->y = o->d2 + fixtoi(fmul(ftofix(o->vy), fcos(itofix(o->t)))); ++ o->y = o->d2 + fixtoi(fixmul(ftofix(o->vy), fixcos(itofix(o->t)))); + o->t += o->d1; + break; + case SM_BOSS_1: +@@ -516,8 +516,8 @@ void s_update_object(Tspace_object *o) { + o->tx = o->x; + } + else { +- o->y = o->ty + fixtoi(fmul(ftofix(o->vy), fsin(itofix(o->t)))); +- o->x = o->tx - fixtoi(10 * fsin(itofix(o->t >> 1))); ++ o->y = o->ty + fixtoi(fixmul(ftofix(o->vy), fixsin(itofix(o->t)))); ++ o->x = o->tx - fixtoi(10 * fixsin(itofix(o->t >> 1))); + o->t ++; + } + break; +@@ -573,7 +573,7 @@ void s_update_object(Tspace_object *o) { + else if (o->image == ENEMY15) { + int i; + for(i = 0; i < 256; i += 32) +- s_make_enemy_bullet((int)o->x + o->bw / 2, (int)o->y + o->bh, fixtof(1 * fcos(itofix(i - 6))), fixtof(1 * fsin(itofix(i - 6)))); ++ s_make_enemy_bullet((int)o->x + o->bw / 2, (int)o->y + o->bh, fixtof(1 * fixcos(itofix(i - 6))), fixtof(1 * fixsin(itofix(i - 6)))); + o->fire_counter = 200 + rand()%50; + } + @@ -1372,7 +1372,7 @@ int s_init_shooter() { // load data log2file(" loading shooter data"); |