RetroArch
Classes | Macros | Typedefs | Enumerations | Functions | Variables
xdk360_fonts.cpp File Reference
#include <string/stdstring.h>
#include "../common/d3d_common.h"
#include "../common/d3d9_common.h"
#include "../font_driver.h"
#include "../drivers/d3d_shaders/font.hlsl.d3d9.h"
Include dependency graph for xdk360_fonts.cpp:

Classes

struct  XBRESOURCE
 
class  PackedResource
 
struct  GLYPH_ATTR
 
struct  Font_Locals_t
 
struct  xdk360_video_font_t
 
struct  FontFileHeaderImage_t
 
struct  FontFileStrikesImage_t
 

Macros

#define XPR0_MAGIC_VALUE   0x30525058
 
#define XPR1_MAGIC_VALUE   0x31525058
 
#define XPR2_MAGIC_VALUE   0x58505232
 
#define FONT_SCALE(d3d)   ((d3d->resolution_hd_enable) ? 2 : 1)
 
#define CALCFONTFILEHEADERSIZE(x)   ( sizeof(uint32_t) + (sizeof(float)* 4) + sizeof(uint16_t) + (sizeof(wchar_t)*(x)) )
 
#define FONTFILEVERSION   5
 

Typedefs

typedef struct GLYPH_ATTR GLYPH_ATTR
 

Enumerations

enum  {
  RESOURCETYPE_USERDATA = ( ( 'U' << 24 ) | ( 'S' << 16 ) | ( 'E' << 8 ) | ( 'R' ) ), RESOURCETYPE_TEXTURE = ( ( 'T' << 24 ) | ( 'X' << 16 ) | ( '2' << 8 ) | ( 'D' ) ), RESOURCETYPE_VERTEXBUFFER = ( ( 'V' << 24 ) | ( 'B' << 16 ) | ( 'U' << 8 ) | ( 'F' ) ), RESOURCETYPE_INDEXBUFFER = ( ( 'I' << 24 ) | ( 'B' << 16 ) | ( 'U' << 8 ) | ( 'F' ) ),
  RESOURCETYPE_EOF = 0xffffffff
}
 

Functions

static INLINE voidAllocateContiguousMemory (DWORD Size, DWORD Alignment)
 
static INLINE void FreeContiguousMemory (void *pData)
 
static bool xdk360_video_font_create_shaders (xdk360_video_font_t *font, LPDIRECT3DDEVICE9 dev)
 
static voidxdk360_init_font (void *video_data, const char *font_path, float font_size, bool is_threaded)
 
static void xdk360_free_font (void *data, bool is_threaded)
 
static void xdk360_render_msg_post (xdk360_video_font_t *font)
 
static void xdk360_render_msg_pre (xdk360_video_font_t *font)
 
static void xdk360_draw_text (xdk360_video_font_t *font, float x, float y, const wchar_t *strText)
 
static void xdk360_render_msg (video_frame_info_t *video_info, void *data, const char *str_msg, const struct font_params *params)
 

Variables

static PackedResource m_xprResource
 
font_renderer_t d3d_xbox360_font
 

Macro Definition Documentation

◆ CALCFONTFILEHEADERSIZE

#define CALCFONTFILEHEADERSIZE (   x)    ( sizeof(uint32_t) + (sizeof(float)* 4) + sizeof(uint16_t) + (sizeof(wchar_t)*(x)) )

◆ FONT_SCALE

#define FONT_SCALE (   d3d)    ((d3d->resolution_hd_enable) ? 2 : 1)

◆ FONTFILEVERSION

#define FONTFILEVERSION   5

◆ XPR0_MAGIC_VALUE

#define XPR0_MAGIC_VALUE   0x30525058

◆ XPR1_MAGIC_VALUE

#define XPR1_MAGIC_VALUE   0x31525058

◆ XPR2_MAGIC_VALUE

#define XPR2_MAGIC_VALUE   0x58505232

Typedef Documentation

◆ GLYPH_ATTR

typedef struct GLYPH_ATTR GLYPH_ATTR

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
RESOURCETYPE_USERDATA 
RESOURCETYPE_TEXTURE 
RESOURCETYPE_VERTEXBUFFER 
RESOURCETYPE_INDEXBUFFER 
RESOURCETYPE_EOF 

Function Documentation

◆ AllocateContiguousMemory()

static INLINE void* AllocateContiguousMemory ( DWORD  Size,
DWORD  Alignment 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FreeContiguousMemory()

static INLINE void FreeContiguousMemory ( void pData)
static
Here is the caller graph for this function:

◆ xdk360_draw_text()

static void xdk360_draw_text ( xdk360_video_font_t font,
float  x,
float  y,
const wchar_t *  strText 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xdk360_free_font()

static void xdk360_free_font ( void data,
bool  is_threaded 
)
static
Here is the call graph for this function:

◆ xdk360_init_font()

static void* xdk360_init_font ( void video_data,
const char *  font_path,
float  font_size,
bool  is_threaded 
)
static
Here is the call graph for this function:

◆ xdk360_render_msg()

static void xdk360_render_msg ( video_frame_info_t video_info,
void data,
const char *  str_msg,
const struct font_params params 
)
static
Here is the call graph for this function:

◆ xdk360_render_msg_post()

static void xdk360_render_msg_post ( xdk360_video_font_t font)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xdk360_render_msg_pre()

static void xdk360_render_msg_pre ( xdk360_video_font_t font)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xdk360_video_font_create_shaders()

static bool xdk360_video_font_create_shaders ( xdk360_video_font_t font,
LPDIRECT3DDEVICE9  dev 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ d3d_xbox360_font

font_renderer_t d3d_xbox360_font
Initial value:
= {
"xdk360_fonts",
NULL,
NULL,
NULL,
}
static void xdk360_render_msg(video_frame_info_t *video_info, void *data, const char *str_msg, const struct font_params *params)
Definition: xdk360_fonts.cpp:646
static void xdk360_free_font(void *data, bool is_threaded)
Definition: xdk360_fonts.cpp:421
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void * xdk360_init_font(void *video_data, const char *font_path, float font_size, bool is_threaded)
Definition: xdk360_fonts.cpp:347

◆ m_xprResource

PackedResource m_xprResource
static