Path: blob/main/games/alex4/files/patch-shooter.c
16461 views
--- shooter.c.orig 2019-02-04 06:12:31 UTC1+++ shooter.c2@@ -500,12 +500,12 @@ void s_update_object(Tspace_object *o) {3break;4case SM_SIN_WAVE:5o->x += o->vx;6- o->y = o->d2 + fixtoi(fmul(ftofix(o->vy), fsin(itofix(o->t))));7+ o->y = o->d2 + fixtoi(fixmul(ftofix(o->vy), fixsin(itofix(o->t))));8o->t += o->d1;9break;10case SM_COS_WAVE:11o->x += o->vx;12- o->y = o->d2 + fixtoi(fmul(ftofix(o->vy), fcos(itofix(o->t))));13+ o->y = o->d2 + fixtoi(fixmul(ftofix(o->vy), fixcos(itofix(o->t))));14o->t += o->d1;15break;16case SM_BOSS_1:17@@ -516,8 +516,8 @@ void s_update_object(Tspace_object *o) {18o->tx = o->x;19}20else {21- o->y = o->ty + fixtoi(fmul(ftofix(o->vy), fsin(itofix(o->t))));22- o->x = o->tx - fixtoi(10 * fsin(itofix(o->t >> 1)));23+ o->y = o->ty + fixtoi(fixmul(ftofix(o->vy), fixsin(itofix(o->t))));24+ o->x = o->tx - fixtoi(10 * fixsin(itofix(o->t >> 1)));25o->t ++;26}27break;28@@ -573,7 +573,7 @@ void s_update_object(Tspace_object *o) {29else if (o->image == ENEMY15) {30int i;31for(i = 0; i < 256; i += 32)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))));33+ 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))));34o->fire_counter = 200 + rand()%50;35}3637@@ -1372,7 +1372,7 @@ int s_init_shooter() {38// load data39log2file(" loading shooter data");40packfile_password(get_init_string());41- s_data = load_datafile("data/a45.dat");42+ s_data = load_datafile(DATADIR "a45.dat");43if (!s_data) {44log2file(" *** failed");45return -1;464748