Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37559138
en ru br
Репозитории ALT

Группа :: Игры/Прочее
Пакет: alex4

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: alex4-alt-allegro-4.4.patch
Скачать


diff -ru alex4/src/main.c alex4src/src/main.c
--- alex4/src/main.c	2021-11-27 17:39:14.815814702 +0000
+++ alex4src/src/main.c	2021-11-27 17:40:01.852115367 +0000
@@ -1210,9 +1210,9 @@
 
 	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);
@@ -2537,7 +2537,7 @@
 	textout_ex(bmp, data[THE_FONT].dat, "QUIT", x+1, y+1, 1, -1);
 	textout_ex(bmp, data[THE_FONT].dat, "QUIT", x, y, 4, -1);
 
-	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);
 }
 
 
diff -ru alex4/src/shooter.c alex4src/src/shooter.c
--- alex4/src/shooter.c	2021-11-27 17:39:14.815814702 +0000
+++ alex4src/src/shooter.c	2021-11-27 17:40:01.853115331 +0000
@@ -500,12 +500,12 @@
 			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(fmul(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(fmul(ftofix(o->vy), fixcos(itofix(o->t))));
 			o->t += o->d1;
 			break;
 		case SM_BOSS_1:
@@ -516,8 +516,8 @@
 				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(fmul(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 @@
 		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;
 		}
 	
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin