diff --git a/.agent/plans/eepp_superluminal_gui_html_optimization_plan_2026_07_09.md b/.agent/plans/eepp_superluminal_gui_html_optimization_plan.md similarity index 100% rename from .agent/plans/eepp_superluminal_gui_html_optimization_plan_2026_07_09.md rename to .agent/plans/eepp_superluminal_gui_html_optimization_plan.md diff --git a/.agent/plans/subpixel_text_rendering_plan.md b/.agent/plans/subpixel_text_rendering_plan.md deleted file mode 100644 index f9801b3c0..000000000 --- a/.agent/plans/subpixel_text_rendering_plan.md +++ /dev/null @@ -1,388 +0,0 @@ -# Subpixel Text Rendering Plan - -Status: implemented after maintainer approval; review fixes completed on 2026-07-25. - -Date: 2026-07-25 - -## Goal - -Make `FontAntialiasing::Subpixel` render useful horizontal RGB LCD text in eepp and ecode, -using the coverage filter and per-channel compositing model used by lite-xl while preserving -eepp's renderer portability, mixed-font behavior, transparent framebuffers, and hot text paths. - -The public option is historically named “subpixel hinting”, but the work here is principally -**LCD subpixel antialiasing and compositing**. `FontHinting` continues to control FreeType outline -hinting independently. - -## Evidence and current-state analysis - -### The FreeType half is already present - -`FontTrueType::fontSetRenderOptions()` already performs the important rasterization setup: - -- `FontAntialiasing::Subpixel` selects `FT_RENDER_MODE_LCD`. -- The LCD filter weights are `{ 0x10, 0x40, 0x70, 0x40, 0x10 }`, exactly the weights used by - the supplied lite-xl renderer. -- LCD bitmaps are interpreted at one logical pixel per three FreeType bitmap bytes. -- Each glyph atlas pixel stores the three LCD coverages in RGB. - -The atlas alpha is currently set to the arithmetic mean of those coverages. Normal eepp texture -blending then treats that one alpha value as the coverage for all destination channels. That loses -the information LCD rendering needs and is the direct reason the option does not work correctly. - -Repository history confirms this is deliberately unfinished rather than dead code. Commit -`7425b77f9` introduced the settings with the note that subpixel support still needed a fragment -shader. The ecode menu later exposed that state as “SubPixel (not working)”. - -### What lite-xl does - -The supplied `ren_draw_text()` path has two separable behaviors: - -1. It rasterizes horizontal LCD masks using the same five FreeType filter weights already used by - eepp. -2. Its software compositor blends each destination color channel with its corresponding LCD - coverage: - - ```text - out[c] = text[c] * text_alpha * coverage[c] - + dst[c] * (1 - text_alpha * coverage[c]) - ``` - -lite-xl also caches three glyph masks translated by 0, 1/3, and 2/3 pixel and selects one from the -fractional pen position. That is an additional positioning-quality refinement, not the missing -compositor itself. eepp currently quantizes some shaped positions and its retained `Text` path does -not know the final fractional screen position while building the glyph cache/vertices, so adopting -that part requires a larger cache and layout change. It is explicitly separated into a follow-up -scope below. - -### A whole-scene framebuffer is not the required mechanism - -`SceneNode` already has an optional framebuffer path (`enableFrameBuffer()`), using a texture-backed -RGBA framebuffer. Enabling it does not restore the three coverages after ordinary alpha blending: -once RGB coverage has been reduced to the atlas's average alpha, a post-process shader cannot infer -the original channel masks. - -A destination-sampling implementation could use ping-pong framebuffers, but reading and writing the -same color attachment is not a valid general solution, and ping-pong rendering would add full-screen -copies/bandwidth and nested-FBO complexity. It is unnecessary here. The correct ownership boundary -is the glyph draw operation while both the LCD mask and destination blend are still available. - -Therefore this plan makes **no change to `SceneNode` and does not force the application framebuffer -on**. The result must work equally when a scene framebuffer is enabled for an independent reason. - -### All render paths that must be covered - -`Text` has two materially different pipelines: - -- The static/high-throughput `Text::draw()` path emits glyphs through `GlobalBatchRenderer`. This is - ecode's main editor path and batches across calls. -- Retained `Text` objects build vertex/color arrays and later draw them directly. They support - per-character colors and their own transforms. - -Both paths can mix LCD glyphs, grayscale fallback glyphs, color emoji, effects, and solid atlas -quads for underline/strike-through. A global `FontAntialiasing` check is consequently not a safe -draw discriminator. The actual rasterized glyph format must travel with the cached glyph/drawable. - -### Scope-level policy issue in ecode startup - -`FontService` is correctly a `ResourceScope`-level policy owner, and changing its hinting or -antialiasing clears associated `FontTrueType` caches. ecode's menu updates that service at runtime. - -At startup, however, ecode applies the loaded policy to individually loaded primary fonts without -first updating `defaultResourceScope().getFontService()`. System fallback fonts created later can -therefore inherit the service's default grayscale policy until the user changes the menu. The -implementation needs to establish both loaded policies on the owning service before asynchronous -font/fallback loading starts. - -## Proposed architecture - -### 1. Describe what each cached glyph contains - -Add a compact internal render-kind enum, conceptually: - -- `Mask`: monochrome/grayscale coverage and solid decoration texels. -- `LCDMask`: three horizontal RGB coverages. -- `Color`: BGRA/color emoji or another intrinsically colored glyph. - -Determine it from the actual FreeType bitmap/pixel mode after rendering, not merely from the font's -requested policy. Store it on the cached `Glyph`, propagate it through `GlyphDrawable`, and preserve -it in text draw ranges. This correctly handles fallback fonts and formats that cannot produce LCD -bitmaps. - -This should remain internal rendering metadata; no public API is needed unless implementation shows -that an external renderer consumer genuinely needs it. - -### 2. Add a renderer-owned LCD compositor - -The built-in renderer, rather than `Text`, `FontService`, or `ResourceScope`, should own the shader -program and cached uniform/attribute locations. GL programs are context/render-pipeline resources, -and renderer lifetime already governs the other built-in programs. - -The shader samples the existing atlas RGB mask. To reproduce lite-xl's per-channel equation with -arbitrary vertex colors and ordinary OpenGL blending, render each contiguous LCD text range once per -destination color channel: - -1. Select the red mask component in the fragment shader and enable only red in `glColorMask()`. -2. Repeat for green and blue. -3. Use eepp's normal source-over RGB blend factors for every channel pass. -4. Perform an alpha-only pass using the existing mean coverage and source-over alpha factors. - -The alpha-only pass is needed because eepp frequently renders into transparent RGBA framebuffers; -lite-xl's software surface simply preserves destination alpha. Omitting a meaningful alpha update -would make correctly colored text disappear or composite incorrectly when that framebuffer is drawn -later. The alpha pass must use eepp's `BlendMode::Alpha()` alpha factors (`One`, -`OneMinusSrcAlpha`), not square the source alpha. - -This four-pass strategy is local to LCD ranges, uses no destination texture reads, supports -per-character/vertex text colors, and preserves ordering. It costs additional glyph fragments and -draw calls, so ranges and state transitions must be coarse, cached, and benchmarked. Normal -grayscale and color-glyph paths remain single-pass and unchanged. - -The compositor must: - -- have shader sources for the supported programmable renderer variants (GL2, GL3/core, and GLES2, - following the existing renderer conventions); -- compile once per renderer/context, cache all locations, and never do string lookup or shader - compilation per text draw; -- preserve clipping and the existing model-view/projection conventions; -- save/restore the prior program, color mask, blend mode/equation, texture state, and batch state; -- coexist with externally selected shaders rather than silently replacing unrelated application - drawing state; -- fail softly and log once if the LCD program is unavailable. - -For shaderless/unsupported contexts, an LCD request must fall back to a neutral grayscale mask -(white RGB plus the mean coverage alpha, or grayscale rasterization before upload). It must never -fall through to today's colored-mask-with-average-alpha output. - -### 3. Integrate the static batch path without per-glyph overhead - -Extend `BatchRenderer` with an internal text coverage mode (`normal` or `LCD`) and flush only when -that mode actually changes. `Text::drawGlyph()` selects the mode from `GlyphDrawable` metadata. - -The batch flush delegates an LCD range to the renderer compositor; the batcher must not own or -compile GL programs. Consecutive editor glyphs then stay in one large LCD batch, while transitions -to color emoji, grayscale fallback, or decoration quads produce the minimum necessary flushes. - -Shadows and outline glyphs use the glyph's LCD mode. Underline and strike-through atlas quads always -use normal scalar-alpha rendering. - -No callback, heap allocation, dynamic cast, or program lookup is permitted per glyph in this hot -path. - -### 4. Integrate retained `Text` with compact ordered ranges - -While rebuilding retained geometry, record contiguous `(first vertex, vertex count, render kind)` -ranges alongside the existing fill and outline arrays. Draw those ranges in original order: - -- normal masks and colored glyphs use their current single draw; -- LCD ranges use the renderer compositor; -- decoration ranges remain normal. - -Prefer an inline/small-vector representation because the common case has one range. Do not add a -render-mode field to every vertex: that would increase persistent text memory and GPU bandwidth for -all text to solve a range-level state problem. - -Preserve existing character-color behavior, emoji whitening rules, clipping, shadows, outlines, -underline/strike-through, and fallback texture/page changes. - -### 5. Apply LCD rendering only where the pixel geometry is valid - -This first implementation defines the existing `Subpixel` option as horizontal **RGB** stripes, -matching the supplied lite-xl code and FreeType LCD mode. The current API has no RGB/BGR or vertical -panel-order selection. - -LCD masks are only valid when their horizontal samples reach physical framebuffer pixels at a 1:1, -axis-aligned transform. At each LCD range/batch—not per glyph—check the effective 2D transform. Use -the LCD compositor only for unit-scale, non-rotated output; use the neutral average-coverage -grayscale path for rotation, non-unit scaling, shear, or otherwise unsuitable transforms. - -This protects retained text transformations and scene/world text. An independently enabled scene -FBO remains eligible only when it is finally presented 1:1 without scaling/filtering that would mix -the RGB samples. - -BGR/vertical stripe layouts and transformed-output reconstruction are deferred rather than guessed. - -### 6. Correct policy initialization and ecode presentation - -After ecode loads font settings and before it starts asynchronous main/fallback font loading: - -- set the loaded hinting and antialiasing values on the default scope's `FontService`; -- keep per-font setup only where it is still needed for ownership/thread timing; -- verify local scene-scope fonts and imported/default fonts retain the intended owning-service - semantics; -- leave runtime policy changes cache-invalidating and immediately visible; -- rename the menu item from “SubPixel (not working)” to “SubPixel” only after the renderer path is - complete and tested. - -## Expected file areas - -Exact signatures should follow local conventions discovered during implementation, but the expected -touch points are: - -- `include/eepp/graphics/font.hpp` and/or internal font/glyph headers: glyph render-kind metadata. -- `src/eepp/graphics/fonttruetype.cpp`: derive the actual kind and provide neutral fallback data. -- `include/eepp/graphics/glyphdrawable.hpp`, `src/eepp/graphics/glyphdrawable.cpp`: propagate kind. -- `include/eepp/graphics/batchrenderer.hpp`, `src/eepp/graphics/batchrenderer.cpp`: range mode and - transition flushes. -- renderer headers/implementations and built-in shader source area: context-owned LCD compositor, - capability detection, and full state restoration. -- `include/eepp/graphics/text.hpp`, `src/eepp/graphics/text.cpp`: both static and retained paths, - ordered mode ranges, effects, and transform eligibility. -- ecode application/font setup and `src/tools/ecode/settingsmenu.cpp`: service initialization and - final menu label. -- `src/tests/unit_tests/fontrendering_tests.cpp`: focused coverage and regression tests. - -`src/eepp/scene/scenenode.cpp` is deliberately not an expected implementation file. - -## Implementation sequence - -### Phase A — establish a measurable baseline - -1. Add a small diagnostic/test scene that renders the same colored edge onto opaque and transparent - contrasting backgrounds using grayscale and current subpixel policies. -2. Record baseline pixels and batch/draw counts for the static editor-like path and retained path. -3. Confirm active test renderers and framebuffer formats so shader variants and alpha behavior are - exercised deliberately. - -### Phase B — metadata and safe fallback - -1. Introduce glyph render-kind metadata derived from the actual rasterized bitmap. -2. Propagate it through `GlyphDrawable` without changing layout metrics or cache keys unnecessarily. -3. Make unsupported LCD compositing neutral and grayscale instead of colored. -4. Add unit coverage for bitmap-mode classification and policy-driven cache invalidation. - -### Phase C — renderer compositor - -1. Add and validate built-in shader variants. -2. Add the RGB channel passes and alpha-only pass with scoped state restoration. -3. Add transform/capability gating and the grayscale fallback path. -4. Exercise opaque and transparent targets before wiring the main editor path. - -### Phase D — both `Text` paths - -1. Add mode-aware static batching and transition flushes. -2. Add compact ordered ranges to retained fill/outline geometry. -3. Audit shadows, outlines, decorations, fallback texture pages, color emoji, clipping, and - per-character colors. -4. Compare both paths pixel-for-pixel where their geometry is otherwise identical. - -### Phase E — service and ecode integration - -1. Initialize the default `FontService` policy before font work starts. -2. Verify live option changes and cache rebuilds. -3. Remove the “not working” suffix. -4. Manually inspect editor text on dark/light themes and layered/transparent UI surfaces. - -### Phase F — performance and correctness validation - -1. Ensure LCD text is range-batched and no new allocation occurs per glyph or per frame. -2. Compare frame time, draw calls, flush count, atlas memory, and glyph rebuild behavior in a large - syntax-highlighted ecode document. -3. If four-pass LCD ranges regress the editor materially, optimize range coalescing/state caching - before considering a destination-sampling/FBO design. -4. Run formatting, the focused unit tests, the complete suite, and an ASan/debug build according to - the project rules. - -## Test plan and acceptance criteria - -### Automated rendering tests - -- Render colored LCD text over a non-neutral opaque background and inspect edge pixels. Each output - channel must follow its own atlas coverage rather than the mean coverage. -- Render the same case through static `Text::draw()` and retained `Text`; tolerate only documented - geometry differences. -- Render into a transparent RGBA framebuffer, composite that texture onto another background, and - verify text remains visible with correct alpha and RGB behavior. -- Exercise LCD text adjacent to grayscale/system fallback glyphs, color emoji, underline, - strike-through, shadow, and outline without mode leakage or tinting. -- Exercise per-character colors and syntax-style runs in a single batch. -- Change `FontService` between grayscale and subpixel at runtime and verify cache invalidation, - render-kind changes, and stable metrics. -- Verify rotated/scaled text and unsupported shader contexts take the neutral grayscale fallback. -- Compare scene-FBO off/on at a 1:1 presentation within a small pixel tolerance; enabling the FBO - must not be a prerequisite. -- Compile/link every applicable built-in shader variant covered by the test environment. - -### Manual ecode checks - -- Toggle None, Grayscale, and SubPixel live and restart with each persisted selection. -- Inspect small editor fonts, syntax colors, selection/search overlays, terminal text, popups, light - and dark themes, fallback scripts, and emoji. -- Check secondary windows and UI opacity/layering paths. -- Check normal and HiDPI configurations, and verify non-1:1 transforms fall back cleanly rather than - showing colored fringes in the wrong geometry. - -### Performance acceptance - -- No shader construction, uniform lookup, heap allocation, or glyph-cache lookup added per glyph - beyond the existing lookup. -- Ordinary grayscale/color text retains its current one-pass path and batching behavior. -- LCD draw calls scale with contiguous batches/ranges, not with glyph count. -- Editor frame-time and batch counters are documented before/after; a material regression blocks - completion until understood and reduced. - -### Project validation commands for the implementation phase - -Follow `.agent/rules/build-project.md` and `.agent/rules/unit-tests.md` exactly: - -1. Regenerate the Linux project with debug symbols and ASan, retaining the current graphics backend - and using mold when available. -2. Format only changed C/C++ files with the repository format. -3. Build with `make -C make/linux -j$(nproc)`. -4. Run focused `FontRendering.Subpixel*` tests through `projects/scripts/xvfb-run-eepp`. -5. Run the full test binary through the same wrapper. -6. Run `git diff --check` and inspect the complete diff for accidental public API/ABI or unrelated - changes. - -## Deliberately deferred work - -### Three fractional glyph phases - -lite-xl caches three horizontally translated LCD bitmaps for every glyph and selects a phase from the -fractional pen position. Adding this in the initial patch would: - -- multiply LCD bitmap/cache variants by three; -- require phase-aware glyph keys and drawables; -- require retaining fractional shaped positions now truncated in part of `Text::draw()`; -- require the retained path to select or rebuild phases using the eventual screen-space origin; -- complicate transformed and fallback text behavior. - -Recommendation: land and measure the correct LCD compositor first. Then add the three-phase cache as -a separately reviewed quality improvement using the same pixel tests and memory/performance -benchmarks. This still follows lite-xl's essential visual algorithm in the first patch: identical -filter weights and independent per-channel blending. - -### Other deferred extensions - -- Configurable RGB versus BGR panel order and vertical subpixel layouts. -- Gamma-linearized coverage/compositing; lite-xl's cited implementation blends byte-space values, so - changing color space would no longer be a direct match. -- Enabling the scene framebuffer for unrelated post-processing. - -## Risks and mitigations - -- **Four-pass LCD cost:** batch contiguous ranges, cache all state/program data, benchmark ecode's - actual editor workload, and keep all non-LCD text on the original path. -- **GL state leakage:** use a single renderer-owned entry point with explicit scoped restoration and - regression tests that draw other primitives immediately before/after LCD text. -- **Mixed atlas content:** classify actual glyph bitmap formats and ordered ranges; never infer the - whole draw mode solely from the font setting. -- **Transparent FBO alpha:** retain the explicit alpha-only coverage pass and test the final - framebuffer composition, not just its RGB attachment. -- **Transforms/panel assumptions:** gate LCD at range granularity and fall back neutrally when the - physical pixel mapping is unsuitable. -- **Startup fallback mismatch:** initialize the owning `FontService` before asynchronous font loads. -- **Legacy renderer support:** compile per-renderer variants and provide a neutral non-LCD fallback; - do not make subpixel support a requirement for eepp to render text. - -## Approval decisions - -The recommended initial implementation assumes: - -1. Direct per-glyph-range compositing; no forced `SceneNode` framebuffer. -2. Correct RGB and alpha output via three color-channel passes plus one alpha-only pass. -3. Horizontal RGB order only, with neutral grayscale fallback for unsuitable transforms/contexts. -4. Matching lite-xl's existing filter weights and per-channel blend equation now. -5. Deferring lite-xl's three fractional-position glyph phases to a follow-up patch. - -Implementation should begin only after these scope decisions are approved or revised. diff --git a/include/eepp/graphics.hpp b/include/eepp/graphics.hpp index 9558f5751..d24df1788 100644 --- a/include/eepp/graphics.hpp +++ b/include/eepp/graphics.hpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -50,7 +50,7 @@ #include #include #include -#include +#include #include #include #include @@ -72,8 +72,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/include/eepp/graphics/framebuffermanager.hpp b/include/eepp/graphics/framebufferregistry.hpp similarity index 89% rename from include/eepp/graphics/framebuffermanager.hpp rename to include/eepp/graphics/framebufferregistry.hpp index 2464fdb07..7a64905b7 100644 --- a/include/eepp/graphics/framebuffermanager.hpp +++ b/include/eepp/graphics/framebufferregistry.hpp @@ -1,5 +1,5 @@ -#ifndef EE_GRAPHICSCFRAMEBUFFERMANAGER_HPP -#define EE_GRAPHICSCFRAMEBUFFERMANAGER_HPP +#ifndef EE_GRAPHICSCFRAMEBUFFERREGISTRY_HPP +#define EE_GRAPHICSCFRAMEBUFFERREGISTRY_HPP #include #include diff --git a/include/eepp/graphics/shaderprogrammanager.hpp b/include/eepp/graphics/shaderprogramregistry.hpp similarity index 86% rename from include/eepp/graphics/shaderprogrammanager.hpp rename to include/eepp/graphics/shaderprogramregistry.hpp index 4c9e91d62..e35afcdac 100644 --- a/include/eepp/graphics/shaderprogrammanager.hpp +++ b/include/eepp/graphics/shaderprogramregistry.hpp @@ -1,5 +1,5 @@ -#ifndef EE_GRAPHICSSHADERPROGRAMANAGER_HPP -#define EE_GRAPHICSSHADERPROGRAMANAGER_HPP +#ifndef EE_GRAPHICSSHADERPROGRAREGISTRY_HPP +#define EE_GRAPHICSSHADERPROGRAREGISTRY_HPP #include #include diff --git a/include/eepp/graphics/vertexbuffermanager.hpp b/include/eepp/graphics/vertexbufferregistry.hpp similarity index 86% rename from include/eepp/graphics/vertexbuffermanager.hpp rename to include/eepp/graphics/vertexbufferregistry.hpp index 3988793d7..a84a6e34e 100644 --- a/include/eepp/graphics/vertexbuffermanager.hpp +++ b/include/eepp/graphics/vertexbufferregistry.hpp @@ -1,5 +1,5 @@ -#ifndef EE_GRAPHICSCVERTEXBUFFERMANAGER_HPP -#define EE_GRAPHICSCVERTEXBUFFERMANAGER_HPP +#ifndef EE_GRAPHICSCVERTEXBUFFERREGISTRY_HPP +#define EE_GRAPHICSCVERTEXBUFFERREGISTRY_HPP #include #include diff --git a/include/eepp/system.hpp b/include/eepp/system.hpp index 5fb93e7f3..4fb92d49d 100644 --- a/include/eepp/system.hpp +++ b/include/eepp/system.hpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/eepp/system/packmanager.hpp b/include/eepp/system/packregistry.hpp similarity index 88% rename from include/eepp/system/packmanager.hpp rename to include/eepp/system/packregistry.hpp index d7c4f0b9b..44f884c75 100644 --- a/include/eepp/system/packmanager.hpp +++ b/include/eepp/system/packregistry.hpp @@ -7,14 +7,14 @@ namespace EE { namespace System { -/** @brief The Pack Manager keep track of the instantiated Packs. +/** @brief The Pack Registry keep track of the instantiated Packs. It's used to find files from any open pack. */ -class EE_API PackManager : protected Container { - SINGLETON_DECLARE_HEADERS( PackManager ) +class EE_API PackRegistry : protected Container { + SINGLETON_DECLARE_HEADERS( PackRegistry ) public: - virtual ~PackManager(); + virtual ~PackRegistry(); /** @brief Searches for the filepath in the packs, if the file is found it will return the pack *that belongs to. * @return The pack where the file exists. If the file is not found, @@ -45,7 +45,7 @@ class EE_API PackManager : protected Container { bool mFallback; - PackManager(); + PackRegistry(); }; }} // namespace EE::System diff --git a/src/eepp/audio/music.cpp b/src/eepp/audio/music.cpp index 53d5749d7..2232701e1 100644 --- a/src/eepp/audio/music.cpp +++ b/src/eepp/audio/music.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include namespace EE { namespace Audio { @@ -25,10 +25,10 @@ bool Music::openFromFile( const std::string& filename ) { stop(); if ( !FileSystem::fileExists( filename ) ) { - if ( PackManager::instance()->isFallbackToPacksActive() ) { + if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string tPath( filename ); - Pack* tPack = PackManager::instance()->exists( tPath ); + Pack* tPack = PackRegistry::instance()->exists( tPath ); if ( NULL != tPack ) { return openFromPack( tPack, tPath ); diff --git a/src/eepp/audio/soundbuffer.cpp b/src/eepp/audio/soundbuffer.cpp index 99388775d..7ae90b263 100644 --- a/src/eepp/audio/soundbuffer.cpp +++ b/src/eepp/audio/soundbuffer.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include namespace EE { namespace Audio { @@ -49,10 +49,10 @@ SoundBuffer::~SoundBuffer() { bool SoundBuffer::loadFromFile( const std::string& filename ) { if ( !FileSystem::fileExists( filename ) ) { - if ( PackManager::instance()->isFallbackToPacksActive() ) { + if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string tPath( filename ); - Pack* tPack = PackManager::instance()->exists( tPath ); + Pack* tPack = PackRegistry::instance()->exists( tPath ); if ( NULL != tPack ) { return loadFromPack( tPack, tPath ); diff --git a/src/eepp/graphics/fontbmfont.cpp b/src/eepp/graphics/fontbmfont.cpp index 625d3d52f..af375c87e 100644 --- a/src/eepp/graphics/fontbmfont.cpp +++ b/src/eepp/graphics/fontbmfont.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include namespace EE { namespace Graphics { @@ -57,9 +57,9 @@ bool FontBMFont::loadFromFile( const std::string& filename ) { mFilePath = FileSystem::fileRemoveFileName( filename ); IOStreamFile stream( filename ); return loadFromStream( stream ); - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string path( filename ); - Pack* pack = PackManager::instance()->exists( path ); + Pack* pack = PackRegistry::instance()->exists( path ); if ( NULL != pack ) { Log::info( "Loading font from pack: %s", path.c_str() ); diff --git a/src/eepp/graphics/fontsprite.cpp b/src/eepp/graphics/fontsprite.cpp index 211b7debb..55df18689 100644 --- a/src/eepp/graphics/fontsprite.cpp +++ b/src/eepp/graphics/fontsprite.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include namespace EE { namespace Graphics { @@ -58,9 +58,9 @@ bool FontSprite::loadFromFile( const std::string& filename, Color key, Uint32 fi mFilePath = FileSystem::fileRemoveFileName( filename ); IOStreamFile stream( filename ); return loadFromStream( stream, key, firstChar, spacing ); - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string path( filename ); - Pack* pack = PackManager::instance()->exists( path ); + Pack* pack = PackRegistry::instance()->exists( path ); if ( NULL != pack ) { Log::info( "Loading font from pack: %s", path.c_str() ); diff --git a/src/eepp/graphics/fonttruetype.cpp b/src/eepp/graphics/fonttruetype.cpp index 2a5f12308..0496fee99 100644 --- a/src/eepp/graphics/fonttruetype.cpp +++ b/src/eepp/graphics/fonttruetype.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include using namespace EE::Window; @@ -374,9 +374,9 @@ static bool checkHasColrTable( const FT_Face& face ) { bool FontTrueType::loadFromFile( const std::string& filename, Uint32 faceIndex ) { if ( !FileSystem::fileExists( filename ) && - PackManager::instance()->isFallbackToPacksActive() ) { + PackRegistry::instance()->isFallbackToPacksActive() ) { std::string path( filename ); - Pack* pack = PackManager::instance()->exists( path ); + Pack* pack = PackRegistry::instance()->exists( path ); if ( NULL != pack ) { Log::info( "Loading font from pack: %s", path.c_str() ); diff --git a/src/eepp/graphics/framebuffer.cpp b/src/eepp/graphics/framebuffer.cpp index b28294c69..9213ed796 100644 --- a/src/eepp/graphics/framebuffer.cpp +++ b/src/eepp/graphics/framebuffer.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/eepp/graphics/framebuffermanager.cpp b/src/eepp/graphics/framebuffermanager.cpp index 955a08899..4aafe8e6d 100644 --- a/src/eepp/graphics/framebuffermanager.cpp +++ b/src/eepp/graphics/framebuffermanager.cpp @@ -1,4 +1,4 @@ -#include +#include #include namespace EE { namespace Graphics { namespace Private { diff --git a/src/eepp/graphics/image.cpp b/src/eepp/graphics/image.cpp index 400d9b83e..6151942b7 100644 --- a/src/eepp/graphics/image.cpp +++ b/src/eepp/graphics/image.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include @@ -532,9 +532,9 @@ bool Image::getInfo( const std::string& path, int* width, int* height, int* chan *height = info->height; *channels = info->channels; res = true; - } else if ( !res && PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( !res && PackRegistry::instance()->isFallbackToPacksActive() ) { std::string npath( path ); - Pack* tPack = PackManager::instance()->exists( npath ); + Pack* tPack = PackRegistry::instance()->exists( npath ); if ( NULL != tPack ) { ScopedBuffer buffer; @@ -744,8 +744,8 @@ Image::Image( std::string Path, const unsigned int& forceChannels, ScopedBuffer buf; FileSystem::fileGet( Path, buf ); webpLoad( buf.get(), buf.size() ); - } else if ( PackManager::instance()->isFallbackToPacksActive() && - NULL != ( tPack = PackManager::instance()->exists( Path ) ) ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() && + NULL != ( tPack = PackRegistry::instance()->exists( Path ) ) ) { loadFromPack( tPack, Path ); } else { Log::error( "Failed to load image %s. Reason: %s", Path.c_str(), stbi_failure_reason() ); diff --git a/src/eepp/graphics/shader.cpp b/src/eepp/graphics/shader.cpp index 738fa89ce..f370f0526 100644 --- a/src/eepp/graphics/shader.cpp +++ b/src/eepp/graphics/shader.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include namespace EE { namespace Graphics { @@ -39,8 +39,8 @@ Shader::Shader( const Uint32& Type, const std::string& Filename ) { std::string tPath = Filename; Pack* tPack = NULL; - if ( PackManager::instance()->isFallbackToPacksActive() && - NULL != ( tPack = PackManager::instance()->exists( tPath ) ) ) { + if ( PackRegistry::instance()->isFallbackToPacksActive() && + NULL != ( tPack = PackRegistry::instance()->exists( tPath ) ) ) { ScopedBuffer buffer; tPack->extractFileToMemory( tPath, buffer ); diff --git a/src/eepp/graphics/shaderprogram.cpp b/src/eepp/graphics/shaderprogram.cpp index 5e3810834..34ba3124e 100644 --- a/src/eepp/graphics/shaderprogram.cpp +++ b/src/eepp/graphics/shaderprogram.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/shaderprogrammanager.cpp b/src/eepp/graphics/shaderprogrammanager.cpp index f690d779a..178293661 100644 --- a/src/eepp/graphics/shaderprogrammanager.cpp +++ b/src/eepp/graphics/shaderprogrammanager.cpp @@ -1,4 +1,4 @@ -#include +#include namespace EE { namespace Graphics { diff --git a/src/eepp/graphics/textureatlasloader.cpp b/src/eepp/graphics/textureatlasloader.cpp index c6d69a5c4..5624c3fc1 100644 --- a/src/eepp/graphics/textureatlasloader.cpp +++ b/src/eepp/graphics/textureatlasloader.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include @@ -208,10 +208,10 @@ void TextureAtlasLoader::loadFromFile( const std::string& TextureAtlasPath ) { IOStreamFile IOS( mTextureAtlasPath ); loadFromStream( IOS ); - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string tgPath( mTextureAtlasPath ); - Pack* tPack = PackManager::instance()->exists( tgPath ); + Pack* tPack = PackRegistry::instance()->exists( tgPath ); if ( NULL != tPack ) { loadFromPack( tPack, tgPath ); diff --git a/src/eepp/graphics/textureloader.cpp b/src/eepp/graphics/textureloader.cpp index 5b0f6951b..57e9e3ca5 100644 --- a/src/eepp/graphics/textureloader.cpp +++ b/src/eepp/graphics/textureloader.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include using namespace EE::Window; @@ -169,8 +169,8 @@ void TextureLoader::loadFromFile() { mImgHeight = image.getHeight(); mChannels = image.getChannels(); } - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { - mPack = PackManager::instance()->exists( mFilepath ); + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { + mPack = PackRegistry::instance()->exists( mFilepath ); if ( NULL != mPack ) { mLoadType = TEX_LT_PACK; diff --git a/src/eepp/graphics/vertexbuffer.cpp b/src/eepp/graphics/vertexbuffer.cpp index 96b8bdb08..f43d4a0a8 100644 --- a/src/eepp/graphics/vertexbuffer.cpp +++ b/src/eepp/graphics/vertexbuffer.cpp @@ -1,7 +1,7 @@ #include #include -#include #include +#include #include using namespace EE::Graphics::Private; diff --git a/src/eepp/graphics/vertexbuffermanager.cpp b/src/eepp/graphics/vertexbuffermanager.cpp index 4fce728af..7d9161967 100644 --- a/src/eepp/graphics/vertexbuffermanager.cpp +++ b/src/eepp/graphics/vertexbuffermanager.cpp @@ -1,4 +1,4 @@ -#include +#include namespace EE { namespace Graphics { namespace Private { diff --git a/src/eepp/network/ssl/backend/mbedtls/mbedtlssocket.cpp b/src/eepp/network/ssl/backend/mbedtls/mbedtlssocket.cpp index 9117ba4ff..5140268f3 100644 --- a/src/eepp/network/ssl/backend/mbedtls/mbedtlssocket.cpp +++ b/src/eepp/network/ssl/backend/mbedtls/mbedtlssocket.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include namespace EE { namespace Network { namespace SSL { @@ -20,10 +20,10 @@ bool MbedTLSSocket::init() { if ( FileSystem::fileExists( SSLSocket::CertificatesPath ) ) { FileSystem::fileGet( SSLSocket::CertificatesPath, data ); - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string tPath( SSLSocket::CertificatesPath ); - Pack* tPack = PackManager::instance()->exists( tPath ); + Pack* tPack = PackRegistry::instance()->exists( tPath ); if ( NULL != tPack ) { tPack->extractFileToMemory( tPath, data ); diff --git a/src/eepp/network/ssl/backend/openssl/opensslsocket.cpp b/src/eepp/network/ssl/backend/openssl/opensslsocket.cpp index e12c76665..3fcc68fce 100644 --- a/src/eepp/network/ssl/backend/openssl/opensslsocket.cpp +++ b/src/eepp/network/ssl/backend/openssl/opensslsocket.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include namespace EE { namespace Network { namespace SSL { @@ -161,10 +161,10 @@ bool OpenSSLSocket::init() { if ( FileSystem::fileExists( SSLSocket::CertificatesPath ) ) { FileSystem::fileGet( SSLSocket::CertificatesPath, data ); - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string tPath( SSLSocket::CertificatesPath ); - Pack* tPack = PackManager::instance()->exists( tPath ); + Pack* tPack = PackRegistry::instance()->exists( tPath ); if ( NULL != tPack ) { tPack->extractFileToMemory( tPath, data ); diff --git a/src/eepp/system/inifile.cpp b/src/eepp/system/inifile.cpp index 7bbfd8b5a..e1366636a 100644 --- a/src/eepp/system/inifile.cpp +++ b/src/eepp/system/inifile.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #define MAX_KEYNAME 128 #define MAX_VALUENAME 128 @@ -72,10 +72,10 @@ bool IniFile::loadFromFile( const std::string& iniPath ) { if ( FileSystem::fileExists( iniPath ) ) { IOStreamFile f( mPath ); return loadFromStream( f ); - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string tPath( iniPath ); - Pack* tPack = PackManager::instance()->exists( tPath ); + Pack* tPack = PackRegistry::instance()->exists( tPath ); if ( NULL != tPack ) { return loadFromPack( tPack, tPath ); diff --git a/src/eepp/system/pack.cpp b/src/eepp/system/pack.cpp index 58e52284d..673dcf7e5 100644 --- a/src/eepp/system/pack.cpp +++ b/src/eepp/system/pack.cpp @@ -1,15 +1,15 @@ #include -#include +#include #include namespace EE { namespace System { Pack::Pack() : Mutex(), mIsOpen( false ) { - PackManager::instance()->add( this ); + PackRegistry::instance()->add( this ); } Pack::~Pack() { - PackManager::instance()->remove( this ); + PackRegistry::instance()->remove( this ); } bool Pack::isOpen() const { diff --git a/src/eepp/system/packmanager.cpp b/src/eepp/system/packmanager.cpp index ae92496e4..ce7e242e7 100644 --- a/src/eepp/system/packmanager.cpp +++ b/src/eepp/system/packmanager.cpp @@ -1,16 +1,16 @@ #include #include -#include +#include namespace EE { namespace System { -SINGLETON_DECLARE_IMPLEMENTATION( PackManager ) +SINGLETON_DECLARE_IMPLEMENTATION( PackRegistry ) -PackManager::PackManager() : mFallback( true ) {} +PackRegistry::PackRegistry() : mFallback( true ) {} -PackManager::~PackManager() {} +PackRegistry::~PackRegistry() {} -Pack* PackManager::exists( std::string& path ) { +Pack* PackRegistry::exists( std::string& path ) { std::string tpath( path ); FileSystem::filePathRemoveProcessPath( tpath ); @@ -28,7 +28,7 @@ Pack* PackManager::exists( std::string& path ) { return NULL; } -Pack* PackManager::getPackByPath( std::string path ) { +Pack* PackRegistry::getPackByPath( std::string path ) { for ( auto& pack : mResources ) { if ( path == pack->getPackPath() ) { return pack; @@ -38,11 +38,11 @@ Pack* PackManager::getPackByPath( std::string path ) { return NULL; } -const bool& PackManager::isFallbackToPacksActive() const { +const bool& PackRegistry::isFallbackToPacksActive() const { return mFallback; } -void PackManager::setFallbackToPacks( const bool& fallback ) { +void PackRegistry::setFallbackToPacks( const bool& fallback ) { mFallback = fallback; } diff --git a/src/eepp/system/translator.cpp b/src/eepp/system/translator.cpp index a27e1943d..656ced97c 100644 --- a/src/eepp/system/translator.cpp +++ b/src/eepp/system/translator.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #define PUGIXML_HEADER_ONLY #include @@ -104,9 +104,9 @@ bool Translator::loadFromFile( const std::string& path, std::string lang ) { Log::error( "Error description: %s", result.description() ); Log::error( "Error offset: %d", result.offset ); } - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string packPath( path ); - Pack* pack = PackManager::instance()->exists( packPath ); + Pack* pack = PackRegistry::instance()->exists( packPath ); if ( NULL != pack ) { return loadFromPack( pack, packPath, lang ); diff --git a/src/eepp/ui/css/stylesheetparser.cpp b/src/eepp/ui/css/stylesheetparser.cpp index cb6ac3240..42d4075e6 100644 --- a/src/eepp/ui/css/stylesheetparser.cpp +++ b/src/eepp/ui/css/stylesheetparser.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -44,9 +44,9 @@ bool StyleSheetParser::loadFromStream( IOStream& stream ) { bool StyleSheetParser::loadFromFile( const std::string& filename ) { if ( !FileSystem::fileExists( filename ) && - PackManager::instance()->isFallbackToPacksActive() ) { + PackRegistry::instance()->isFallbackToPacksActive() ) { std::string path( filename ); - Pack* pack = PackManager::instance()->exists( path ); + Pack* pack = PackRegistry::instance()->exists( path ); if ( NULL != pack ) { return loadFromPack( pack, path ); @@ -275,8 +275,8 @@ std::string StyleSheetParser::importCSS( std::string path, importedList.push_back( path ); return std::string( reinterpret_cast( buffer.get() ) ); } else { - if ( PackManager::instance()->isFallbackToPacksActive() ) { - Pack* pack = PackManager::instance()->exists( path ); + if ( PackRegistry::instance()->isFallbackToPacksActive() ) { + Pack* pack = PackRegistry::instance()->exists( path ); if ( std::find( importedList.begin(), importedList.end(), path ) == importedList.end() ) { diff --git a/src/eepp/ui/doc/syntaxcolorscheme.cpp b/src/eepp/ui/doc/syntaxcolorscheme.cpp index 6ccc7b314..db699d894 100644 --- a/src/eepp/ui/doc/syntaxcolorscheme.cpp +++ b/src/eepp/ui/doc/syntaxcolorscheme.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include @@ -228,9 +228,9 @@ std::vector SyntaxColorScheme::loadFromStream( IOStream& stre } std::vector SyntaxColorScheme::loadFromFile( const std::string& path ) { - if ( !FileSystem::fileExists( path ) && PackManager::instance()->isFallbackToPacksActive() ) { + if ( !FileSystem::fileExists( path ) && PackRegistry::instance()->isFallbackToPacksActive() ) { std::string pathFix( path ); - Pack* pack = PackManager::instance()->exists( pathFix ); + Pack* pack = PackRegistry::instance()->exists( pathFix ); if ( NULL != pack ) { return loadFromPack( pack, pathFix ); } diff --git a/src/eepp/ui/doc/syntaxdefinitionmanager.cpp b/src/eepp/ui/doc/syntaxdefinitionmanager.cpp index 83190c12a..e6caa7b72 100644 --- a/src/eepp/ui/doc/syntaxdefinitionmanager.cpp +++ b/src/eepp/ui/doc/syntaxdefinitionmanager.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include @@ -1150,10 +1150,10 @@ bool SyntaxDefinitionManager::loadFromFile( const std::string& fpath ) { IOStreamFile IOS( fpath ); return loadFromStream( IOS ); - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string tgPath( fpath ); - Pack* tPack = PackManager::instance()->exists( tgPath ); + Pack* tPack = PackRegistry::instance()->exists( tgPath ); if ( NULL != tPack ) { return loadFromPack( tPack, tgPath ); diff --git a/src/eepp/ui/doc/textdocument.cpp b/src/eepp/ui/doc/textdocument.cpp index d4597b8a0..38685ab46 100644 --- a/src/eepp/ui/doc/textdocument.cpp +++ b/src/eepp/ui/doc/textdocument.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -837,9 +837,9 @@ TextDocument::LoadStatus TextDocument::loadFromFile( const std::string& path ) { mLoading = true; bool fileExists = FileSystem::fileExists( path ); - if ( !fileExists && PackManager::instance()->isFallbackToPacksActive() ) { + if ( !fileExists && PackRegistry::instance()->isFallbackToPacksActive() ) { std::string pathFix( path ); - Pack* pack = PackManager::instance()->exists( pathFix ); + Pack* pack = PackRegistry::instance()->exists( pathFix ); if ( NULL != pack ) { changeFilePath( pathFix, false ); return loadFromPack( pack, pathFix ); diff --git a/src/eepp/ui/uiscenenode.cpp b/src/eepp/ui/uiscenenode.cpp index 9dea0d7dc..3c44514b0 100644 --- a/src/eepp/ui/uiscenenode.cpp +++ b/src/eepp/ui/uiscenenode.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -892,9 +892,9 @@ UIWidget* UISceneNode::loadLayoutFromFile( const std::string& layoutPath, Node* FileSystem::fileGet( layoutPath, data ); Log::error( "Error context: %s", getErrorContext( result.offset, data ) ); } - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string path( layoutPath ); - Pack* pack = PackManager::instance()->exists( path ); + Pack* pack = PackRegistry::instance()->exists( path ); if ( NULL != pack ) { return loadLayoutFromPack( pack, path, parent ); diff --git a/src/eepp/window/backend/SDL2/windowsdl2.cpp b/src/eepp/window/backend/SDL2/windowsdl2.cpp index bf36e2587..57b97806d 100644 --- a/src/eepp/window/backend/SDL2/windowsdl2.cpp +++ b/src/eepp/window/backend/SDL2/windowsdl2.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/eepp/window/backend/SDL3/windowsdl3.cpp b/src/eepp/window/backend/SDL3/windowsdl3.cpp index 7866d11fb..aebc32e5e 100644 --- a/src/eepp/window/backend/SDL3/windowsdl3.cpp +++ b/src/eepp/window/backend/SDL3/windowsdl3.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/eepp/window/engine.cpp b/src/eepp/window/engine.cpp index a53c90572..4acab273f 100644 --- a/src/eepp/window/engine.cpp +++ b/src/eepp/window/engine.cpp @@ -1,19 +1,19 @@ -#include +#include #include #include #include -#include +#include #include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include #include @@ -124,7 +124,7 @@ Engine::~Engine() { Graphics::Renderer::destroySingleton(); - PackManager::destroySingleton(); + PackRegistry::destroySingleton(); #ifdef EE_SSL_SUPPORT Network::SSL::SSLSocket::end(); diff --git a/src/modules/eterm/src/eterm/terminal/terminalcolorscheme.cpp b/src/modules/eterm/src/eterm/terminal/terminalcolorscheme.cpp index cee518272..ec6bab0bd 100644 --- a/src/modules/eterm/src/eterm/terminal/terminalcolorscheme.cpp +++ b/src/modules/eterm/src/eterm/terminal/terminalcolorscheme.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include namespace eterm { namespace Terminal { @@ -45,9 +45,9 @@ std::vector TerminalColorScheme::loadFromStream( IOStream& } std::vector TerminalColorScheme::loadFromFile( const std::string& path ) { - if ( !FileSystem::fileExists( path ) && PackManager::instance()->isFallbackToPacksActive() ) { + if ( !FileSystem::fileExists( path ) && PackRegistry::instance()->isFallbackToPacksActive() ) { std::string pathFix( path ); - Pack* pack = PackManager::instance()->exists( pathFix ); + Pack* pack = PackRegistry::instance()->exists( pathFix ); if ( NULL != pack ) { return loadFromPack( pack, pathFix ); } diff --git a/src/modules/maps/src/eepp/maps/tilemap.cpp b/src/modules/maps/src/eepp/maps/tilemap.cpp index 785cb7101..1829d7dcd 100644 --- a/src/modules/maps/src/eepp/maps/tilemap.cpp +++ b/src/modules/maps/src/eepp/maps/tilemap.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include using namespace EE::Graphics; @@ -1092,9 +1092,9 @@ bool TileMap::loadFromFile( const std::string& path ) { IOStreamFile IOS( mPath ); return loadFromStream( IOS ); - } else if ( PackManager::instance()->isFallbackToPacksActive() ) { + } else if ( PackRegistry::instance()->isFallbackToPacksActive() ) { std::string tPath( path ); - Pack* tPack = PackManager::instance()->exists( tPath ); + Pack* tPack = PackRegistry::instance()->exists( tPath ); if ( NULL != tPack ) { return loadFromPack( tPack, tPath ); diff --git a/src/tests/unit_tests/resource_prerequisite_tests.cpp b/src/tests/unit_tests/resource_prerequisite_tests.cpp index fa9f82020..fa7b5a53e 100644 --- a/src/tests/unit_tests/resource_prerequisite_tests.cpp +++ b/src/tests/unit_tests/resource_prerequisite_tests.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/tools/ecode/ecode.cpp b/src/tools/ecode/ecode.cpp index 67c95f606..3966d1f4a 100644 --- a/src/tools/ecode/ecode.cpp +++ b/src/tools/ecode/ecode.cpp @@ -4251,8 +4251,8 @@ FontTrueType* App::loadFont( const std::string& name, std::string fontPath, if ( FileSystem::isRelativePath( fontPath ) ) fontPath = mResPath + fontPath; #if EE_PLATFORM == EE_PLATFORM_ANDROID - if ( fontPath.empty() || - ( !FileSystem::fileExists( fontPath ) && !PackManager::instance()->exists( fontPath ) ) ) { + if ( fontPath.empty() || ( !FileSystem::fileExists( fontPath ) && + !PackRegistry::instance()->exists( fontPath ) ) ) { #else if ( fontPath.empty() || !FileSystem::fileExists( fontPath ) ) { #endif