Reconstruct readable C++ and organize cohesive source subsystems

Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.

Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
This commit is contained in:
ragnarok-clanker 2026-10-25 07:42:41 +00:00
commit a47d20f8be
890 changed files with 11796 additions and 16664 deletions

View file

@ -1,41 +0,0 @@
#include "Contents/BinkMovies.h"
#include "Render/ClientTextureSources.h"
#include "Render/RenderSystemBase.h"
#include "Resource/TextureNames.h"
ClientTextureSources::ClientTextureSources(
TextureNames& names,
const int& modeType,
BinkMovies* const& movies,
CRenderSystemBase*& system,
IDirectDraw7* const& directDraw
)
: m_names(names), m_modeType(modeType), m_movies(movies), m_system(system), m_directDraw(directDraw) {
}
const char* ClientTextureSources::Resolve(const char* name) {
return this->m_names.Resolve(name);
}
bool ClientTextureSources::MovieSize(const char* name, int& width, int& height) {
if (this->m_modeType != 1 || !this->m_movies) {
return false;
}
NamedBinkMovie* movie = this->m_movies->Get(name, 1);
if (!movie) {
return false;
}
width = movie->decoder->Handle()->width;
height = movie->decoder->Handle()->height;
return true;
}
void ClientTextureSources::CleanupTextures() {
// DX7 slot compacts IDirectDraw; DX9 slot is empty.
if (this->m_system && this->m_system->Backend() == 1 && this->m_directDraw) {
this->m_directDraw->Compact();
}
}