diff --git a/rogueviz/snow.cpp b/rogueviz/snow.cpp index c9f09199..35d6dc65 100644 --- a/rogueviz/snow.cpp +++ b/rogueviz/snow.cpp @@ -20,6 +20,11 @@ namespace rogueviz { namespace snow { +using rogueviz::objmodels::model; +using rogueviz::objmodels::tf_result; + +vector models; + ld snow_lambda = 0; color_t snow_color = 0xFFFFFFFF; @@ -37,7 +42,12 @@ bool snow_texture = true; int snow_shape = 0; -map > matrices_at; +struct snowball { + transmatrix T; + int model_id; + }; + +map> snowballs_at; hpcshape& shapeid(int i) { switch(i) { @@ -104,8 +114,8 @@ transmatrix random_snow_matrix(cell *c) { bool draw_snow(cell *c, const shiftmatrix& V) { - if(!matrices_at.count(c)) { - auto& v = matrices_at[c]; + if(!snowballs_at.count(c)) { + auto& v = snowballs_at[c]; int cnt = 0; ld prob = randd(); ld poisson = exp(-snow_lambda); @@ -125,14 +135,19 @@ bool draw_snow(cell *c, const shiftmatrix& V) { } for(int t=0; t