Date: Mon, 4 Feb 2019 06:48:33 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r492100 - head/games/alex4/files Message-ID: <201902040648.x146mX30018872@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Mon Feb 4 06:48:33 2019 New Revision: 492100 URL: https://svnweb.freebsd.org/changeset/ports/492100 Log: 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 Modified: head/games/alex4/files/patch-main.c head/games/alex4/files/patch-shooter.c Modified: head/games/alex4/files/patch-main.c ============================================================================== --- head/games/alex4/files/patch-main.c Mon Feb 4 06:45:36 2019 (r492099) +++ head/games/alex4/files/patch-main.c Mon Feb 4 06:48:33 2019 (r492100) @@ -1,4 +1,4 @@ ---- main.c.orig 2016-06-14 16:25:53 UTC +--- main.c.orig 2019-02-04 06:12:31 UTC +++ main.c @@ -38,6 +38,7 @@ #include "main.h" @@ -221,6 +221,18 @@ if (pf) { save_hisc_table(hisc_table, pf); save_hisc_table(hisc_table_space, pf); +@@ -1158,9 +1212,9 @@ void draw_custom_ending(BITMAP *bmp) { + + blit(data[INTRO_BG].dat, bmp, 0, 0, 0, 0, 160, 120); + +- r = 70 + fixtoi(20 * fcos(itofix(game_count >> 1)) + 20 * fsin(itofix((int)(game_count / 2.7))) ); ++ r = 70 + fixtoi(20 * fixcos(itofix(game_count >> 1)) + 20 * fixsin(itofix((int)(game_count / 2.7))) ); + for(i = 0; i < 256; i += 32) +- draw_sprite(bmp, head, 80 - head->w/2 + fixtoi(r * fcos(itofix(game_count + i))), 60 - head->h/2 + fixtoi(r * fsin(itofix(game_count + i)))); ++ draw_sprite(bmp, head, 80 - head->w/2 + fixtoi(r * fixcos(itofix(game_count + i))), 60 - head->h/2 + fixtoi(r * fixsin(itofix(game_count + i)))); + + draw_sprite_h_flip(bmp, data[ALEX].dat, 60, 40); + draw_sprite(bmp, data[LOLA].dat, 84, 40); @@ -1289,7 +1343,7 @@ void show_cutscene(int level) { // poll music machine if (got_sound) al_poll_duh(dp); @@ -230,7 +242,7 @@ mode = 2; } -@@ -1343,7 +1397,7 @@ void show_scores(int space, Thisc *table +@@ -1343,7 +1397,7 @@ void show_scores(int space, Thisc *table) { if (space) { // get space bg packfile_password(init_string); @@ -248,6 +260,15 @@ if (p->actor->status == AC_BALL) { camera_type = 2; +@@ -2485,7 +2539,7 @@ void draw_title(BITMAP *bmp, int tick) { + textout(bmp, data[THE_FONT].dat, "QUIT", x+1, y+1, 1); + textout(bmp, data[THE_FONT].dat, "QUIT", x, y, 4); + +- draw_sprite(bmp, data[POINTER].dat, x - 25 + fixtoi(3 * fcos(itofix(tick << 2))), 44 + menu_choice * step); ++ draw_sprite(bmp, data[POINTER].dat, x - 25 + fixtoi(3 * fixcos(itofix(tick << 2))), 44 + menu_choice * step); + } + + @@ -2841,6 +2895,10 @@ int do_main_menu() { } else { Modified: head/games/alex4/files/patch-shooter.c ============================================================================== --- head/games/alex4/files/patch-shooter.c Mon Feb 4 06:45:36 2019 (r492099) +++ head/games/alex4/files/patch-shooter.c Mon Feb 4 06:48:33 2019 (r492100) @@ -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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902040648.x146mX30018872>