diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.Client/ParticleEngine.h | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a43994725008e35fceb984d5549df9c8cea470.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.Client/ParticleEngine.h')
| -rw-r--r-- | Minecraft.Client/ParticleEngine.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/Minecraft.Client/ParticleEngine.h b/Minecraft.Client/ParticleEngine.h index 09e3685b..2a9aa058 100644 --- a/Minecraft.Client/ParticleEngine.h +++ b/Minecraft.Client/ParticleEngine.h @@ -11,8 +11,10 @@ using namespace std; class ParticleEngine { private: + static ResourceLocation PARTICLES_LOCATION; static const int MAX_PARTICLES_PER_LAYER = 200; // 4J - reduced from 4000 static const int MAX_DRAGON_BREATH_PARTICLES = 1000; + static const int MAX_FIREWORK_SPARK_PARTICLES = 2000; public: static const int MISC_TEXTURE = 0; @@ -20,13 +22,17 @@ public: static const int ITEM_TEXTURE = 2; static const int ENTITY_PARTICLE_TEXTURE = 3; static const int DRAGON_BREATH_TEXTURE = 4; // 4J Added - static const int TEXTURE_COUNT = 5; + // Brought forward from Java 1.8 + static const int TRANSLUCENT_LIST = 0; + static const int OPAQUE_LIST = 1; + static const int LIST_COUNT = 2; + protected: Level *level; private: - deque<shared_ptr<Particle> > particles[3][TEXTURE_COUNT]; // 4J made two arrays to cope with simultaneous two dimensions + deque<shared_ptr<Particle> > particles[3][TEXTURE_COUNT][LIST_COUNT]; // 4J made three arrays to cope with simultaneous two dimensions Textures *textures; Random *random; @@ -35,10 +41,16 @@ public: ~ParticleEngine(); void add(shared_ptr<Particle> p); void tick(); - void render(shared_ptr<Entity> player, float a); - void renderLit(shared_ptr<Entity> player, float a); + void render(shared_ptr<Entity> player, float a, int list); + void renderLit(shared_ptr<Entity> player, float a, int list); void setLevel(Level *level); void destroy(int x, int y, int z, int tid, int data); void crack(int x, int y, int z, int face); - wstring countParticles(); + + // 4J - Brought forward from Java 1.8 + void markTranslucent(shared_ptr<Particle> particle); + void markOpaque(shared_ptr<Particle> particle); + void moveParticleInList(shared_ptr<Particle> particle, int source, int destination); + + wstring countParticles(); };
\ No newline at end of file |
