summaryrefslogtreecommitdiff
path: root/games/alex4/files/patch-shooter.c
diff options
context:
space:
mode:
Diffstat (limited to 'games/alex4/files/patch-shooter.c')
-rw-r--r--games/alex4/files/patch-shooter.c37
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");