From 2899d5c64bf54357c3e045dffe0ee42a5fd40755 Mon Sep 17 00:00:00 2001 From: stm <14291421+stephanmeesters@users.noreply.github.com> Date: Sat, 20 Jun 2026 15:52:17 +0200 Subject: [PATCH] chore(sortingrenderer): Remove unused function Insert_VolumeParticle --- .../Source/WWVegas/WW3D2/sortingrenderer.cpp | 60 ------------------- .../Source/WWVegas/WW3D2/sortingrenderer.h | 8 --- 2 files changed, 68 deletions(-) diff --git a/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp b/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp index 288e4bd9429..51aa8a7f141 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cpp @@ -659,63 +659,3 @@ void SortingRendererClass::Deinit() temp_index_array=nullptr; temp_index_array_count=0; } - - -// ---------------------------------------------------------------------------- -// -// Insert a VolumeParticle triangle into the sorting system. -// -// ---------------------------------------------------------------------------- - -void SortingRendererClass::Insert_VolumeParticle( - const SphereClass& bounding_sphere, - unsigned short start_index, - unsigned short polygon_count, - unsigned short min_vertex_index, - unsigned short vertex_count, - unsigned short layerCount) -{ - if (!WW3D::Is_Sorting_Enabled()) { - DX8Wrapper::Draw_Triangles(start_index,polygon_count,min_vertex_index,vertex_count); - return; - } - - //FOR VOLUME_PARTICLE LOGIC: - // WE MUST MULTIPLY THE VERTCOUNT AND POLYCOUNT BY THE VOLUME_PARTICLE DEPTH - DX8_RECORD_SORTING_RENDER( polygon_count * layerCount,vertex_count * layerCount);//THIS IS VOLUME_PARTICLE SPECIFIC - - SortingNodeStruct* state=Get_Sorting_Struct(); - DX8Wrapper::Get_Render_State(state->sorting_state); - - WWASSERT( - ((state->sorting_state.index_buffer_type==BUFFER_TYPE_SORTING || state->sorting_state.index_buffer_type==BUFFER_TYPE_DYNAMIC_SORTING) && - (state->sorting_state.vertex_buffer_types[0]==BUFFER_TYPE_SORTING || state->sorting_state.vertex_buffer_types[0]==BUFFER_TYPE_DYNAMIC_SORTING))); - - state->bounding_sphere=bounding_sphere; - state->start_index=start_index; - state->min_vertex_index=min_vertex_index; - state->polygon_count=polygon_count * layerCount;//THIS IS VOLUME_PARTICLE SPECIFIC - state->vertex_count=vertex_count * layerCount;//THIS IS VOLUME_PARTICLE SPECIFIC - - SortingVertexBufferClass* vertex_buffer=static_cast(state->sorting_state.vertex_buffers[0]); - WWASSERT(vertex_buffer); - WWASSERT(state->vertex_count<=vertex_buffer->Get_Vertex_Count()); - - // Transform the center point to view space for sorting - - D3DXMATRIX mtx=(D3DXMATRIX&)state->sorting_state.world*(D3DXMATRIX&)state->sorting_state.view; - D3DXVECTOR3 vec=(D3DXVECTOR3&)state->bounding_sphere.Center; - D3DXVECTOR4 transformed_vec; - D3DXVec3Transform( - &transformed_vec, - &vec, - &mtx); - state->transformed_center=Vector3(transformed_vec[0],transformed_vec[1],transformed_vec[2]); - - - // BUT WHAT IS THE DEAL WITH THE VERTCOUNT AND POLYCOUNT BEING N BUT TRANSFORMED CENTER COUNT == 1 - - //THE TRANSFORMED CENTER[2] IS THE ZBUFFER DEPTH - - Insert_To_Sorted_List(state); -} diff --git a/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.h b/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.h index 4cf874bdeba..6e304f0da7d 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.h +++ b/Core/Libraries/Source/WWVegas/WW3D2/sortingrenderer.h @@ -45,14 +45,6 @@ class SortingRendererClass unsigned short min_vertex_index, unsigned short vertex_count); - static void Insert_VolumeParticle( - const SphereClass& bounding_sphere, - unsigned short start_index, - unsigned short polygon_count, - unsigned short min_vertex_index, - unsigned short vertex_count, - unsigned short layerCount); - static void Flush(); static void Deinit();