1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-16 02:04:48 +00:00

gp:: correct particle scaling

This commit is contained in:
Zeno Rogue 2018-04-14 10:27:49 +02:00
parent d9381c7284
commit 71d50015ff
2 changed files with 13 additions and 10 deletions

View File

@ -5151,13 +5151,15 @@ void drawMarkers() {
void drawFlashes() { void drawFlashes() {
for(int k=0; k<size(flashes); k++) { for(int k=0; k<size(flashes); k++) {
flashdata& f = flashes[k]; flashdata& f = flashes[k];
transmatrix V = shmup::ggmatrix(f.where); transmatrix V;
/*
try { V = gmatrix.at(f.where); } catch(out_of_range) { if(f.spd) try { V = gmatrix.at(f.where); } catch(out_of_range) {
f = flashes[size(flashes)-1]; f = flashes[size(flashes)-1];
flashes.pop_back(); k--; flashes.pop_back(); k--;
continue; continue;
} */ }
else V = shmup::ggmatrix(f.where);
int tim = ticks - f.t; int tim = ticks - f.t;
bool kill = tim > f.size; bool kill = tim > f.size;
@ -5166,7 +5168,8 @@ void drawFlashes() {
kill = tim > 300; kill = tim > 300;
int partcol = darkena(f.color, 0, max(255 - tim*255/300, 0)); int partcol = darkena(f.color, 0, max(255 - tim*255/300, 0));
poly_outline = OUTLINE_DEFAULT; poly_outline = OUTLINE_DEFAULT;
queuepoly(V * spin(f.angle) * xpush(f.spd * tim / 50000.), shParticle[f.size], partcol); ld gps = gp::on ? gp::scale * 1.6 : 1;
queuepoly(V * spin(f.angle) * xpush(f.spd * tim * gps / 50000.), shParticle[f.size], partcol);
} }
else if(f.size == 1000) { else if(f.size == 1000) {

View File

@ -1840,10 +1840,14 @@ void buildpolys() {
for(int t=0; t<=60; t++) for(int t=0; t<=60; t++)
hpcpush(spin(M_PI * t / 30.0) * xpush(crossf * ((t&1) ? 0.3 : 0.6)) * C0); hpcpush(spin(M_PI * t / 30.0) * xpush(crossf * ((t&1) ? 0.3 : 0.6)) * C0);
ld goldbf = 1;
if(gp::on) goldbf = gp::scale * 1.6;
for(int i=0; i<16; i++) { for(int i=0; i<16; i++) {
bshape(shParticle[i], PPR_PARTICLE); bshape(shParticle[i], PPR_PARTICLE);
for(int t=0; t<6; t++) for(int t=0; t<6; t++)
hpcpush(spin(M_PI * t * 2 / 6 + M_PI * 2/6 * hrand(100) / 150.) * xpush(0.03 + hrand(100) * 0.0003) * C0); hpcpush(spin(M_PI * t * 2 / 6 + M_PI * 2/6 * hrand(100) / 150.) * xpush((0.03 + hrand(100) * 0.0003) * goldbf) * C0);
hpc[qhpc++] = hpc[last->s]; hpc[qhpc++] = hpc[last->s];
} }
@ -1855,10 +1859,6 @@ void buildpolys() {
if(a46 && !nonbitrunc) spzoom6 *= .9; if(a46 && !nonbitrunc) spzoom6 *= .9;
if(a47 && !nonbitrunc) spzoom6 *= .85; if(a47 && !nonbitrunc) spzoom6 *= .85;
ld goldbf = 1;
if(gp::scale != 1) goldbf = gp::scale * 1.6;
ld goldbf2 = gp::scale; ld goldbf2 = gp::scale;
double espzoom6 = spzoom6, espzoomd7 = spzoomd7; double espzoom6 = spzoom6, espzoomd7 = spzoomd7;