X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fclient%2Fclientevent.h;h=17d3aedd6acc30cd5f9b5b1be0091200c110c3c5;hb=a4ef62f5b215fe0f23e3e50672f1538854db4ed9;hp=f0f1dc9e0b7fd61f8ee7a2190d2449106a58bc6f;hpb=4f688d5616268f0d077b7e925933f54920120da4;p=minetest.git diff --git a/src/client/clientevent.h b/src/client/clientevent.h index f0f1dc9e0..17d3aedd6 100644 --- a/src/client/clientevent.h +++ b/src/client/clientevent.h @@ -21,7 +21,13 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "irrlichttypes_bloated.h" -#include "hud.h" + +struct ParticleParameters; +struct ParticleSpawnerParameters; +struct SkyboxParams; +struct SunParams; +struct MoonParams; +struct StarParams; enum ClientEventType : u8 { @@ -38,11 +44,39 @@ enum ClientEventType : u8 CE_HUDRM, CE_HUDCHANGE, CE_SET_SKY, + CE_SET_SUN, + CE_SET_MOON, + CE_SET_STARS, CE_OVERRIDE_DAY_NIGHT_RATIO, CE_CLOUD_PARAMS, CLIENTEVENT_MAX, }; +struct ClientEventHudAdd +{ + u32 server_id; + u8 type; + v2f pos, scale; + std::string name; + std::string text, text2; + u32 number, item, dir, style; + v2f align, offset; + v3f world_pos; + v2s32 size; + s16 z_index; +}; + +struct ClientEventHudChange +{ + u32 id; + HudElementStat stat; + v2f v2fdata; + std::string sdata; + u32 data; + v3f v3fdata; + v2s32 v2s32data; +}; + struct ClientEvent { ClientEventType type; @@ -73,84 +107,24 @@ struct ClientEvent } show_formspec; // struct{ //} textures_updated; + ParticleParameters *spawn_particle; struct { - v3f *pos; - v3f *vel; - v3f *acc; - f32 expirationtime; - f32 size; - bool collisiondetection; - bool collision_removal; - bool vertical; - std::string *texture; - struct TileAnimationParams animation; - u8 glow; - } spawn_particle; - struct - { - u16 amount; - f32 spawntime; - v3f *minpos; - v3f *maxpos; - v3f *minvel; - v3f *maxvel; - v3f *minacc; - v3f *maxacc; - f32 minexptime; - f32 maxexptime; - f32 minsize; - f32 maxsize; - bool collisiondetection; - bool collision_removal; + ParticleSpawnerParameters *p; u16 attached_id; - bool vertical; - std::string *texture; - u32 id; - struct TileAnimationParams animation; - u8 glow; + u64 id; } add_particlespawner; struct { u32 id; } delete_particlespawner; - struct - { - u32 server_id; - u8 type; - v2f *pos; - std::string *name; - v2f *scale; - std::string *text; - u32 number; - u32 item; - u32 dir; - v2f *align; - v2f *offset; - v3f *world_pos; - v2s32 *size; - } hudadd; + ClientEventHudAdd *hudadd; struct { u32 id; } hudrm; - struct - { - u32 id; - HudElementStat stat; - v2f *v2fdata; - std::string *sdata; - u32 data; - v3f *v3fdata; - v2s32 *v2s32data; - } hudchange; - struct - { - video::SColor *bgcolor; - std::string *type; - std::vector *params; - bool clouds; - } set_sky; + ClientEventHudChange *hudchange; + SkyboxParams *set_sky; struct { bool do_override; @@ -166,5 +140,8 @@ struct ClientEvent f32 speed_x; f32 speed_y; } cloud_params; + SunParams *sun_params; + MoonParams *moon_params; + StarParams *star_params; }; };