libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
interpreter.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <unordered_map>
#include <map>
#include <list>
#include <cstddef>
#include <vector>
#include <stack>
#include <string>
#include <string_view>
#include <memory>
#include "fast/lus_gbi.h"
#include "fast/types.h"
#include "fast/ucodehandlers.h"
#include "backends/gfx_rendering_api.h"
#include "fast/debug/GfxDebugger.h"
#include "fast/resource/type/Texture.h"
#include "ship/resource/Resource.h"
#include <compare>
Include dependency graph for interpreter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Fast::GfxExecStack
 
struct  Fast::GfxExecStack::CodeDisp
 
struct  Fast::XYWidthHeight
 
struct  Fast::GfxDimensions
 
struct  Fast::TextureCacheKey
 
struct  Fast::TextureCacheKey::Hasher
 
struct  Fast::TextureCacheValue
 
struct  Fast::TextureCacheMapIter
 
struct  Fast::RGBA
 
struct  Fast::LoadedVertex
 
struct  Fast::RawTexMetadata
 
struct  Fast::RSP
 
struct  Fast::RDP
 
struct  Fast::GfxTextureCache
 
struct  Fast::ColorCombiner
 
struct  Fast::RenderingState
 
struct  Fast::FBInfo
 
struct  Fast::MaskedTextureEntry
 
class  Fast::Interpreter
 

Namespaces

namespace  Ship
 Core namespace for the libultraship engine framework.
 
namespace  Fast
 

Macros

#define SCREEN_WIDTH   320
 
#define SCREEN_HEIGHT   240
 
#define SHADER_OPT(opt)   ((uint64_t)(1 << static_cast<int>(ShaderOpts::opt)))
 
#define SHADER_MAX_TEXTURES   6
 
#define SHADER_FIRST_TEXTURE   0
 
#define SHADER_FIRST_MASK_TEXTURE   2
 
#define SHADER_FIRST_REPLACEMENT_TEXTURE   4
 
#define MAX_LIGHTS   32
 
#define MAX_VERTICES   64
 

Typedefs

typedef std::unordered_map< TextureCacheKey, struct TextureCacheValue, TextureCacheKey::HasherFast::TextureCacheMap
 
typedef std::pair< const TextureCacheKey, struct TextureCacheValueFast::TextureCacheNode
 
typedef enum Fast::Attribute Fast::Attribute
 

Enumerations

enum  {
  SHADER_0 , SHADER_INPUT_1 , SHADER_INPUT_2 , SHADER_INPUT_3 ,
  SHADER_INPUT_4 , SHADER_INPUT_5 , SHADER_INPUT_6 , SHADER_INPUT_7 ,
  SHADER_TEXEL0 , SHADER_TEXEL0A , SHADER_TEXEL1 , SHADER_TEXEL1A ,
  SHADER_1 , SHADER_COMBINED , SHADER_NOISE
}
 
enum  Fast::Attribute {
  Fast::MTX_PROJECTION , Fast::MTX_LOAD , Fast::MTX_PUSH , Fast::MTX_NOPUSH ,
  Fast::CULL_FRONT , Fast::CULL_BACK , Fast::CULL_BOTH , Fast::MV_VIEWPORT ,
  Fast::MV_LIGHT
}
 

Functions

void gfx_cc_get_features (uint64_t shader_id0, uint64_t shader_id1, struct CCFeatures *cc_features)
 
constexpr int16_t Fast::ShaderIdUnmask (int id)
 
void Fast::gfx_set_target_ucode (UcodeHandlers ucode)
 
void Fast::gfx_push_current_dir (char *path)
 
int32_t Fast::gfx_check_image_signature (const char *imgData)
 
const char * Fast::gfx_get_shader (int16_t id)
 
const char * Fast::GfxGetOpcodeName (int8_t opcode)
 
void gfx_texture_cache_clear ()
 
void gfx_shader_cache_clear ()
 
int gfx_create_framebuffer (uint32_t width, uint32_t height, uint32_t native_width, uint32_t native_height, uint8_t resize, bool forceFixedAspect=false)
 

Variables

constexpr size_t Fast::MAX_SEGMENT_POINTERS = 16
 
constexpr size_t Fast::SHADER_ID_SHIFT = 17
 
GfxExecStack Fast::g_exec_stack
 

Macro Definition Documentation

◆ MAX_LIGHTS

#define MAX_LIGHTS   32

◆ MAX_VERTICES

#define MAX_VERTICES   64

◆ SCREEN_HEIGHT

#define SCREEN_HEIGHT   240

◆ SCREEN_WIDTH

#define SCREEN_WIDTH   320

◆ SHADER_FIRST_MASK_TEXTURE

#define SHADER_FIRST_MASK_TEXTURE   2

◆ SHADER_FIRST_REPLACEMENT_TEXTURE

#define SHADER_FIRST_REPLACEMENT_TEXTURE   4

◆ SHADER_FIRST_TEXTURE

#define SHADER_FIRST_TEXTURE   0

◆ SHADER_MAX_TEXTURES

#define SHADER_MAX_TEXTURES   6

◆ SHADER_OPT

#define SHADER_OPT (   opt)    ((uint64_t)(1 << static_cast<int>(ShaderOpts::opt)))

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SHADER_0 
SHADER_INPUT_1 
SHADER_INPUT_2 
SHADER_INPUT_3 
SHADER_INPUT_4 
SHADER_INPUT_5 
SHADER_INPUT_6 
SHADER_INPUT_7 
SHADER_TEXEL0 
SHADER_TEXEL0A 
SHADER_TEXEL1 
SHADER_TEXEL1A 
SHADER_1 
SHADER_COMBINED 
SHADER_NOISE 

Function Documentation

◆ gfx_cc_get_features()

void gfx_cc_get_features ( uint64_t  shader_id0,
uint64_t  shader_id1,
struct CCFeatures *  cc_features 
)

◆ gfx_create_framebuffer()

int gfx_create_framebuffer ( uint32_t  width,
uint32_t  height,
uint32_t  native_width,
uint32_t  native_height,
uint8_t  resize,
bool  forceFixedAspect = false 
)

◆ gfx_shader_cache_clear()

void gfx_shader_cache_clear ( )

◆ gfx_texture_cache_clear()

void gfx_texture_cache_clear ( )