Mercurial > touhou
changeset 733:770e5057f6bc
ecl_vm: time stop/random sakuya bullets impl
author | Gauvain "GovanifY" Roussel-Tarbouriech <gauvain@govanify.com> |
---|---|
date | Sun, 03 Nov 2019 03:04:41 +0100 |
parents | 5f00b2e0c06a |
children | 7886a1a5d226 |
files | src/th06/ecl_vm.rs |
diffstat | 1 files changed, 34 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs +++ b/src/th06/ecl_vm.rs @@ -1007,6 +1007,40 @@ impl EclRunner { self.frame.ints1[i] = knowledge[character][i]; } } + 4 => { // Sakuya random daggers and time stop + /* + if arg < 2 { + drop_particle(&PARTICLES_ARRAY,0xc,enemy->pos,1,0xffffffff); + //TODO: is that the timestop? + LEVEL.field_0x2c = arg; + return; + } + // this changes the orientation of random bullets + let mut max_bullets = 0xe; + if (LEVEL.rank >= 2) {max_bullets = 0x34;} + i = 0; + for bullet in game.bullets { + if bullet->state != 0 && bullet->state != 5 && 30. <= (bullet->sprites[0].additional_infos)->height && bullet->field_0x5ba != 5 && (uVar3 = prng16(&PRNG_STATE), (uVar3 & 3) == 0) { + bullet->field_0x5ba = 5; + new_effect(GAME_OBJECT,(sprite *)bullet, (int)bullet->sprites[0].sometimes_copy_of_UNK1 + (int)bullet->field_0x5ba); + x = bullet->pos[0] - PLAYER.pos[0]; + y = bullet->pos[1] - PLAYER.pos[1]; + if sqrt(x*x+y*y) > 128. { + if LEVEL.rank >= 2 {bullet->automatic_angle = prng_double() * 2*pi;} + else{bullet->automatic_angle = (prng_double() * ((pi/8)*6) + pi/4);} + else { + // TODO: check player_get_angle, might be what ST0 is + player_get_angle_to(&PLAYER,bullet->pos,local_38); + bullet->automatic_angle = (extraout_ST0_00 + pi/2 + (prng_double() * pi*2)); + } + bullet->dpos[0] = cos(bullet->automatic_angle) * bullet->speed; + bullet->dpos[1] = sin(bullet->automatic_angle) * bullet->speed; + max_bullets -= 1; + if (max_bullets == 0) break; + } + } + (enemy->ecl_frame).var_ints_1[2] = 0;*/ + } 7 => { // Remilia's lazer maze // so what this does is kinda complex: 2 rounds of 3 subrounds of 8 shots, either // laser or standard bullets depending on the argument passed.