mirror of
https://github.com/open-goal/jak-project
synced 2026-06-15 22:40:34 -04:00
2c12a4e00b
Work in progress minimap. Known issues: - "path finding" doesn't appear to work - it gets stuck forever in many cases - some nasty patches around timer-based code - jak arrow blending issues - would be nice to make it higher resolution if the search is forced to terminate due to iteration/time limits, the icon is not in the right place 
28 lines
1010 B
C++
28 lines
1010 B
C++
#pragma once
|
|
|
|
#include "game/graphics/opengl_renderer/BucketRenderer.h"
|
|
#include "game/graphics/opengl_renderer/DirectRenderer.h"
|
|
#include "game/graphics/opengl_renderer/opengl_utils.h"
|
|
|
|
/*!
|
|
* Renderer for the "Progress Bucket" of Jak 2.
|
|
*/
|
|
class ProgressRenderer : public DirectRenderer {
|
|
public:
|
|
static constexpr int kMinimapVramAddr = 4032;
|
|
static constexpr int kMinimapWidth = 128;
|
|
static constexpr int kMinimapHeight = 128;
|
|
static constexpr int kScreenFbp = 408;
|
|
static constexpr int kMinimapFbp = 126;
|
|
ProgressRenderer(const std::string& name, int my_id, int batch_size);
|
|
void init_textures(TexturePool& texture_pool, GameVersion) override;
|
|
void handle_frame(u64 val, SharedRenderState* render_state, ScopedProfilerNode& prof) override;
|
|
void pre_render() override;
|
|
void post_render() override;
|
|
|
|
private:
|
|
GpuTexture* m_minimap_gpu_tex = nullptr;
|
|
FramebufferTexturePair m_minimap_fb;
|
|
std::optional<FramebufferTexturePairContext> m_fb_ctxt;
|
|
u32 m_current_fbp = kScreenFbp;
|
|
}; |