gfx/bytecode.h header reference
[Lightweight 2d graphic module]

The source code of this header can be browsed online.

Members [link] 

Types [link] 

Functions [link] 

  • void gfx_bc_init(struct gfx_bc_context_s *ctx)
  • error_t gfx_bc_run(struct bc_context_s *vm, struct gfx_bc_context_s *ctx, uint16_t op)

Macros [link] 

Members detail [link] 

#define GFX_BC_IS_GFX_OP(op) [link] 

This macro is declared in gfx/bytecode.h source file, line 197.

This macro tests if the return status of bc_run is gfx opcode.

#define GFX_SURFACE(width, height, fmt) [link] 

This macro is declared in gfx/bytecode.h source file, line 61.

This macro packs surface attributes as a 32 bits value for use in a bytecode programm.

#define GFX_TILEMAP(width, height, offset) [link] 

This macro is declared in gfx/bytecode.h source file, line 66.

This macro packs tilemap attributes as a 32 bits value for use in a bytecode programm.

#define GFX_XY(x, y) [link] 

This macro is declared in gfx/bytecode.h source file, line 46.

This macro packs 11 bits integer coordinates as a 32 bits value.

in: XXX XXXXXXXX
YYY YYYYYYYY
out: xxxxxyyy yyXXXYYY YYYYYYYY XXXXXXXX

#define GFX_XYF(x, y) [link] 

This macro is declared in gfx/bytecode.h source file, line 56.

This macro packs Q11.5 fixed point coordinates as a 32 bits value for use in a bytecode programm.

in: XXXXXXXXXXXxxxxx
YYYYYYYYYYYyyyyy
out: xxxxxyyy yyXXXYYY YYYYYYYY XXXXXXXX

#define _GFX_BYTECODE_H_ [link] 

This macro is declared in gfx/bytecode.h source file, line 29.

typedef uint32_t gfx_2dvector_t [link] 

This typedef is declared in gfx/bytecode.h source file, line 38.

struct gfx_bc_context_s [link] 

This struct is declared in gfx/bytecode.h source file, line 178.

This struct contains the fours surfaces and the single tilemap available to the bytecode program.

FieldDescription
struct gfx_surface_s s[4];surface pool
struct gfx_tilemap_s tilemap;currently selected tilemap
gfx_pixel_t attr;current drawing attribute

void gfx_bc_init(struct gfx_bc_context_s *ctx) [link] 

This function is declared in gfx/bytecode.h source file, line 190.

This function initializes a gfx bytecode context.

error_t gfx_bc_run(struct bc_context_s *vm, struct gfx_bc_context_s *ctx, uint16_t op) [link] 

This function is declared in gfx/bytecode.h source file, line 195.

This function executes a single gfx bytecode operation.

typedef uint32_t gfx_bc_surface_desc_t [link] 

This typedef is declared in gfx/bytecode.h source file, line 36.

typedef uint32_t gfx_bc_tilemap_desc_t [link] 

This typedef is declared in gfx/bytecode.h source file, line 37.

Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:06 2022 using MkDoc