/* ================================================================================ -------------------------------------------------------------------------------- Horribly Hacky Snow v0.5a -------------------------------------------------------------------------------- Authored by Jonathan "Mblackwell" Strander (c) 2019 Jonathan Strander -------------------------------------------------------------------------------- This code is built for use with Ion Fury, and is meant to serve as an example. You may redistribute this file as-is provided it is packed along with its original contents and this message remains. You may use this file and code format, in your own projects provided credit is given to the author(s). ================================================================================ // EDuke32 is OSS // More information at https://wiki.eduke32.com/wiki/Acquiring_the_EDuke32_Source_Code -------------------------------------------------------------------------------- */ /* @@@@@@@@@@@@@@@@@@@@@ additional information: you may include this file at 'Line 1847' in 'main.con' include snow.con HOWEVER this is also allowed to be run as a "mutator" on top of other CON mods. It should normally be run by using the '-mx' command switch like so [windows] fury.exe -mx snow.con [linux] ./fury.bin -mx snow.con This is meant as a quick and dirty hack. It lacks comments, which may appear in a future version. @@@@@@@@@@@@@@@@@@@@@ */ appendevent EVENT_WORLD for itervar sprofstat STAT_RAIN { ifg sprite[itervar].xrepeat 0 { setu .vm_sprite itervar ifand sprite.cstat 32768 nullop else ife rain_counter 1 { seta .picnum 7070 geta .zvel temp shiftr temp 2 seta .zvel temp rand temp 4 add temp 2 seta .xrepeat temp add temp 2 seta .yrepeat temp ifrnd 64 { rand temp 32 ifrnd 127 inv temp rand temp2 32 ifrnd 127 inv temp2 movesprite THISACTOR temp temp2 0 0 temp } } else ife rain_counter 2 { ife sprite.picnum 7070 seta .picnum A_RAINSPRITE geta .zvel temp shiftr temp 2 seta .zvel temp rand temp 4 add temp 8 seta .xrepeat temp add temp 2 seta .yrepeat temp } } } endevent action AC_RIPPLE_GFY 0 1 1 1 1 appendevent EVENT_WORLD for itervar sprofstat STAT_ACTOR { ife sprite[itervar].picnum A_RAINRIPPLE { setu .vm_sprite itervar seta .blend 129 cstator 2 geta .xrepeat temp ifg temp 2 { sub temp 3 ifand sprite.htg_t 2 2 sub temp 1 else ifand sprite.htg_t 2 4 sub temp 1 add counter 1 ifl counter 300 { set temp2 counter sub temp2 24 shiftr temp2 2 add temp2 12 ifg temp temp2 set temp temp2 ifg temp 24 set temp 24 } else { set temp2 counter sub temp2 276 sub temp2 24 shiftr temp2 2 add temp2 24 ifg temp temp2 set temp temp2 } } seta .xrepeat temp seta .yrepeat temp set temp counter ifl counter 300 { sub temp 32 inv temp clamp temp 10 32 } else { set temp counter sub temp 300 shiftl temp 1 clamp temp 10 32 } seta .shade temp geta .picnum temp ife counter 0 { rand counter2 5 add counter2 7874 } sub temp counter2 action AC_RIPPLE_GFY seta .htg_t 3 -temp } } endevent