You've already forked Diddy-Kong-Racing
mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-03-10 11:36:09 -07:00
* Removed old unused files * Added gltf support * Reverted dkr_assets_tool_settings.json to previous * Added animated model example * document audio_vehicle.c (#588) * wip * wip * wip * wip * document audio_vehicle.c * update score once again * unify function prefix * small tweaks * match func_80060910 and func_80060AC8 (#589) * match func_80060AC8 * reworked func_80060C58 * match func_80060910 * non equivalent func_8006017C * format * match calc_env_mapping_for_object * Homogenate batch flags and render flags and begin the painful task of documenting waves. (#590) * part one of wave pain * 2 * littel bit more * m * h * l * aagghh * yeah * :) * bruh * b * m * faith * z * b * rename batch flags * Update waves.c * fix conflicts * match func_8000B38C (#592) * match func_8000B38C * format code * update score * match calc_dynamic_lighting_for_object_1 (#594) * match calc_dynamic_lighting_for_object_1 * format and score * update score * update score again * Document some Boost data (#593) * Run formatter * Document some boost info * decompile and document math_util.c (#595) * Match func_8002F440 (#596) * Add a WIP attempt of func_8004447C, and add some scratch links * match func_8002F440 and run formatter * Cleanup some comments * Update score, fix warnings, and run formatter again * Remove some bad comments * match: func_8007FFEC (#599) * feat: allow score script to generate treemap file for decomp progress (#598) * Various touchups here and there, some renames in camera.c (#597) * the beginning of the void * update asset tool * void :) * there * cam * model * more * fix warns * ok * whoops missed a rename * Add a few NON_EQUIVALENT functions from scratches to keep them up to date (#602) * WIP func_800101AC * WIP func_800452A0 * cleanup * Formatter and func_8004CC20 near match * func_8004CC20 better score and documentation * func_80049794 WIP and compilable * Major cleanup of func_80049794 * Formatter * Update scratch * Add func_80019808 from scratch * Cleanup func_80019808 * func_80019808 score improvment * Improve func_80049794 score (Thanks Dominik!) * func_8001C6C4 WIP * func_8001E93C WIP * small documenting * Eliminate a lot of Obj64 casts. * fix: do not pass default to treemap arg (#604) * Quick fix for score script (#606) * WIP func_80060EA8 * Quick fix for score script * name and document lights, CC modes and textures (#607) * improve match for func_800BDC80 & match func_80060EA8, func_8002F2AC (#609) * improve match for func_800BDC80 & match func_80060EA8 * match: func_8002F2AC * match: func_800452A0 & func_80042D20 (#611) * partial match: func_800452A0, improve from non equiv to non matching * match: func_800452A0 & func_80042D20 * document: remaining funcs, add decomp.me links (#612) * match func_8004447C (#615) * Document camera and sprites (#614) * Cleanup, and use constants where possible (#617) * Update func_80060EA8 WIP * formatter * More func_80060EA8 * More func_80060EA8 * WIP func_80060EA8 * Minor cleanups and documenting * minot cleanup * Define some constant flags properly * Misc documenting and cleanup * formatter * Fix the scratch link for vsprintf (It was DP's) * Add the WIP version of vsprintf that's 95.82% matching. * Fix score script (#619) * Added gltf support * Allow either commas or vertical pipes for splitting render flags --------- Co-authored-by: Unnunu <serge_zorkin@mail.ru> Co-authored-by: Fazana <52551480+FazanaJ@users.noreply.github.com> Co-authored-by: Ryan Myers <ryan.p.myers@gmail.com> Co-authored-by: Dominik Peters <github@d-peters.com>
27 lines
778 B
C++
27 lines
778 B
C++
#include "textureCache.h"
|
|
|
|
#include "misc/globalSettings.h"
|
|
|
|
using namespace DkrAssetsTool;
|
|
|
|
std::optional<size_t> BuildTextureCache::get_index_of_texture_hash(std::string textureSha1) {
|
|
_mutex.lock();
|
|
if(_textureCache.find(textureSha1) == _textureCache.end()) {
|
|
_mutex.unlock();
|
|
return std::nullopt;
|
|
}
|
|
size_t result = _textureCache.at(textureSha1);
|
|
_mutex.unlock();
|
|
return result;
|
|
}
|
|
|
|
void BuildTextureCache::add_texture_to_sha1_cache(std::string textureSha1, size_t index) {
|
|
_mutex.lock();
|
|
if(_textureCache.find(textureSha1) != _textureCache.end()) {
|
|
_mutex.unlock();
|
|
return; // If an entry already exists, then exit early to not overwrite it.
|
|
}
|
|
_textureCache[textureSha1] = index;
|
|
_mutex.unlock();
|
|
}
|