diff --git a/annotated.html b/annotated.html new file mode 100644 index 000000000..999698f8a --- /dev/null +++ b/annotated.html @@ -0,0 +1,141 @@ + + +
+ + + + +
+ 32blit API
+
+ |
+
▼Nblit | |
CAudioChannel | |
CMP3Stream | |
CSurfaceTemplate | |
CSurfaceInfo | |
CAPI | |
CBufferFile | |
CFileInfo | |
CFile | |
CButtonState | |
▼CMenu | |
CItem | |
CParticle | |
CParticleGenerator | |
▼CProfilerProbe | |
CMetrics | |
CScopedProfilerProbe | |
▼CProfiler | |
CGraphElement | |
CRunningAverage | |
CTimer | |
CTween | |
CGameMetadata | |
CFont | |
CJPEGImage | |
CBMPHeader | |
Cpacked_image | |
CPen | |
CSurface | |
CTMX | Struct header generated by the output_struct option |
CTileMap | |
CMapLayer | |
CMap | |
CMat3 | |
CMat4 | |
CPoint | |
CRect | |
CSize | |
CVec2 | |
CVec3 |
+ 32blit API
+
+ |
+
+ 32blit API
+
+ |
+
+ 32blit API
+
+ |
+
+ 32blit API
+
+ |
+
Audio engine. +More...
+#include "../engine/engine.hpp"
#include "../engine/input.hpp"
#include "../32blit.hpp"
#include "audio.hpp"
+Namespaces | |
blit | |
+Functions | |
+uint32_t | blit::prng_xorshift_next () |
+int32_t | blit::prng_normal () |
+bool | blit::is_audio_playing () |
+uint16_t | blit::get_audio_frame () |
Audio engine.
+
+ 32blit API
+
+ |
+
+ 32blit API
+
+ |
+
+ 32blit API
+
+ |
+
This is the complete list of members for blit::File, including all inherited members.
+add_buffer_file(std::string path, const uint8_t *ptr, uint32_t len) | blit::File | static |
close() | blit::File | |
File()=default (defined in blit::File) | blit::File | |
File(const std::string &filename, int mode=OpenMode::read) (defined in blit::File) | blit::File | inline |
File(const uint8_t *buf, uint32_t buf_len) (defined in blit::File) | blit::File | inline |
File(const File &)=delete (defined in blit::File) | blit::File | |
File(File &&other) noexcept (defined in blit::File) | blit::File | inline |
get_length() | blit::File | |
get_ptr() const | blit::File | inline |
is_open() const | blit::File | inline |
open(const std::string &file, int mode=OpenMode::read) | blit::File | |
open(const uint8_t *buf, uint32_t buf_len) (defined in blit::File) | blit::File | |
operator=(const File &)=delete (defined in blit::File) | blit::File | |
operator=(File &&other) noexcept (defined in blit::File) | blit::File | inline |
read(uint32_t offset, uint32_t length, char *buffer) | blit::File | |
write(uint32_t offset, uint32_t length, const char *buffer) | blit::File | |
~File() (defined in blit::File) | blit::File | inline |
+ 32blit API
+
+ |
+
#include <engine/file.hpp>
+Public Member Functions | |
+ | File (const std::string &filename, int mode=OpenMode::read) |
+ | File (const uint8_t *buf, uint32_t buf_len) |
+ | File (const File &)=delete |
+ | File (File &&other) noexcept |
+File & | operator= (const File &)=delete |
+File & | operator= (File &&other) noexcept |
bool | open (const std::string &file, int mode=OpenMode::read) |
+bool | open (const uint8_t *buf, uint32_t buf_len) |
int32_t | read (uint32_t offset, uint32_t length, char *buffer) |
int32_t | write (uint32_t offset, uint32_t length, const char *buffer) |
void | close () |
uint32_t | get_length () |
bool | is_open () const |
const uint8_t * | get_ptr () const |
+Static Public Member Functions | |
static void | add_buffer_file (std::string path, const uint8_t *ptr, uint32_t len) |
Class for accessing files on the SD card (device), the game directory (SDL) or in memory.
+
+
|
+ +static | +
Creates an in-memory file, which can be used like a regular (read-only) file.
+This is useful for porting code which assumes files, or for transparently moving data to flash for extra performance.
+Example using a packed asset:
Notes: The directory part of the path is not created if it does not exist, so list_files/directory_exists may not work as expected in that case: (Assuming path/to
does not exist on the SD card)
path | Path for the file |
ptr | Pointer to file data |
len | Length of file data |
void blit::File::close | +( | +) | ++ |
Close the file. Also called automatically by the destructor.
+ +uint32_t blit::File::get_length | +( | +) | ++ |
Get file length
+
+
|
+ +inline | +
+
|
+ +inline | +
true
if file is open bool blit::File::open | +( | +const std::string & | +file, | +
+ | + | int | +mode = OpenMode::read |
+
+ | ) | ++ |
int32_t blit::File::read | +( | +uint32_t | +offset, | +
+ | + | uint32_t | +length, | +
+ | + | char * | +buffer | +
+ | ) | ++ |
Read a block of data from the file. Should not be called if the file was not opened for reading.
+offset | Offset to read from |
length | Length to read |
buffer | Pointer to buffer to store data into, should be at least length bytes |
int32_t blit::File::write | +( | +uint32_t | +offset, | +
+ | + | uint32_t | +length, | +
+ | + | const char * | +buffer | +
+ | ) | ++ |
Write a block of data to the file. Should not be called if the file was not opened for writing.
+offset | Offset to write to |
length | Length to write |
buffer | Pointer to data to write, should be at least length bytes |
+ 32blit API
+
+ |
+
This is the complete list of members for blit::MP3Stream, including all inherited members.
+from_start enum value (defined in blit::MP3Stream) | blit::MP3Stream | |
get_current_sample() const (defined in blit::MP3Stream) | blit::MP3Stream | |
get_duration_ms() const (defined in blit::MP3Stream) | blit::MP3Stream | |
get_play_flags() const (defined in blit::MP3Stream) | blit::MP3Stream | |
get_playing() const (defined in blit::MP3Stream) | blit::MP3Stream | |
load(std::string filename, bool do_duration_calc=false) (defined in blit::MP3Stream) | blit::MP3Stream | |
loop enum value (defined in blit::MP3Stream) | blit::MP3Stream | |
MP3Stream() (defined in blit::MP3Stream) | blit::MP3Stream | |
pause() (defined in blit::MP3Stream) | blit::MP3Stream | |
play(int channel, int flags=0) (defined in blit::MP3Stream) | blit::MP3Stream | |
PlayFlags enum name (defined in blit::MP3Stream) | blit::MP3Stream | |
restart() (defined in blit::MP3Stream) | blit::MP3Stream | |
update() (defined in blit::MP3Stream) | blit::MP3Stream | |
~MP3Stream() (defined in blit::MP3Stream) | blit::MP3Stream |
+ 32blit API
+
+ |
+
+Public Types | |
enum | PlayFlags { from_start = (1 << 0) +, loop = (1 << 1) + } |
+ 32blit API
+
+ |
+
This is the complete list of members for blit::Menu, including all inherited members.
+AnyId (defined in blit::Menu) | blit::Menu | static |
background_colour (defined in blit::Menu) | blit::Menu | protected |
current_item (defined in blit::Menu) | blit::Menu | protected |
display_rect (defined in blit::Menu) | blit::Menu | protected |
font (defined in blit::Menu) | blit::Menu | protected |
footer_h (defined in blit::Menu) | blit::Menu | protected |
foreground_colour (defined in blit::Menu) | blit::Menu | protected |
header_background (defined in blit::Menu) | blit::Menu | protected |
header_foreground (defined in blit::Menu) | blit::Menu | protected |
header_h (defined in blit::Menu) | blit::Menu | protected |
item_activated(const Item &item) (defined in blit::Menu) | blit::Menu | inlineprotectedvirtual |
item_adjust_y (defined in blit::Menu) | blit::Menu | protected |
item_h (defined in blit::Menu) | blit::Menu | protected |
item_padding_x (defined in blit::Menu) | blit::Menu | protected |
item_spacing (defined in blit::Menu) | blit::Menu | protected |
items (defined in blit::Menu) | blit::Menu | protected |
margin_y (defined in blit::Menu) | blit::Menu | protected |
Menu(std::string_view title, const Item *items=nullptr, int num_items=0, const Font &font=minimal_font) (defined in blit::Menu) | blit::Menu | inline |
num_items (defined in blit::Menu) | blit::Menu | protected |
render() (defined in blit::Menu) | blit::Menu | inline |
render_footer(int x, int y, int w) (defined in blit::Menu) | blit::Menu | inlineprotectedvirtual |
render_header(int x, int y, int w) (defined in blit::Menu) | blit::Menu | inlineprotectedvirtual |
render_item(const Item &item, int y, int index) const (defined in blit::Menu) | blit::Menu | inlineprotectedvirtual |
render_menu() (defined in blit::Menu) | blit::Menu | inlineprotectedvirtual |
repeat_start_time (defined in blit::Menu) | blit::Menu | protected |
scroll_offset (defined in blit::Menu) | blit::Menu | protected |
selected_item_background (defined in blit::Menu) | blit::Menu | protected |
Separator (defined in blit::Menu) | blit::Menu | static |
set_display_rect(Rect rect) (defined in blit::Menu) | blit::Menu | inline |
set_items(const Item *items, int num_items) (defined in blit::Menu) | blit::Menu | inline |
title (defined in blit::Menu) | blit::Menu | |
update(uint32_t time) (defined in blit::Menu) | blit::Menu | inlinevirtual |
update_item(const Item &item) (defined in blit::Menu) | blit::Menu | inlineprotectedvirtual |
update_menu(uint32_t time) (defined in blit::Menu) | blit::Menu | inlineprotectedvirtual |
~Menu()=default (defined in blit::Menu) | blit::Menu | virtual |
+ 32blit API
+
+ |
+
+Classes | |
struct | Item |
+Public Member Functions | |
+ | Menu (std::string_view title, const Item *items=nullptr, int num_items=0, const Font &font=minimal_font) |
+void | render () |
+virtual void | update (uint32_t time) |
+void | set_items (const Item *items, int num_items) |
+void | set_display_rect (Rect rect) |
+Public Attributes | |
+std::string_view | title |
+Static Public Attributes | |
+static const uint16_t | Separator = 65535 |
+static const uint16_t | AnyId = 65534 |
+Protected Member Functions | |
+virtual void | render_menu () |
+virtual void | render_item (const Item &item, int y, int index) const |
+virtual void | update_menu (uint32_t time) |
+virtual void | update_item (const Item &item) |
+virtual void | item_activated (const Item &item) |
+virtual void | render_header (int x, int y, int w) |
+virtual void | render_footer (int x, int y, int w) |
+Protected Attributes | |
+const Item * | items |
+int | num_items |
+int | current_item = 0 |
+float | scroll_offset = 0.0f |
+uint32_t | repeat_start_time = 0 |
+Rect | display_rect |
+int | header_h = 16 |
+int | footer_h = 16 |
+int | margin_y = 5 |
+int | item_h = 9 |
+int | item_padding_x = 5 |
+int | item_adjust_y = 1 |
+int | item_spacing = 1 |
+const Font & | font |
+Pen | background_colour = Pen(30, 30, 50, 200) |
+Pen | foreground_colour = Pen(255, 255, 255) |
+Pen | selected_item_background = Pen(50, 50, 70) |
+Pen | header_background = Pen(235, 245, 255) |
+Pen | header_foreground = Pen(3, 5, 7) |
+ 32blit API
+
+ |
+
This is the complete list of members for blit::Profiler, including all inherited members.
+add_probe(const char *pszName) (defined in blit::Profiler) | blit::Profiler | |
add_probe(const char *pszName, uint32_t uRunningAverageSize, uint32_t uRunningAverageSpan=1) (defined in blit::Profiler) | blit::Profiler | |
clear_all_probes() (defined in blit::Profiler) | blit::Profiler | |
display_history(bool bDisplayHistory, Pen color=Pen(0, 255, 0)) (defined in blit::Profiler) | blit::Profiler | |
display_probe_overlay(uint8_t uPage) (defined in blit::Profiler) | blit::Profiler | |
DisplayMetric enum name (defined in blit::Profiler) | blit::Profiler | |
dmAvg enum value (defined in blit::Profiler) | blit::Profiler | |
dmCur enum value (defined in blit::Profiler) | blit::Profiler | |
dmMax enum value (defined in blit::Profiler) | blit::Profiler | |
dmMin enum value (defined in blit::Profiler) | blit::Profiler | |
get_graph_element(DisplayMetric metric) (defined in blit::Profiler) | blit::Profiler | |
get_page_count() (defined in blit::Profiler) | blit::Profiler | |
get_probe_count() (defined in blit::Profiler) | blit::Profiler | |
log_probes() (defined in blit::Profiler) | blit::Profiler | |
Profiler(uint32_t uRunningAverageSize=0, uint32_t uRunningAverageSpan=1) (defined in blit::Profiler) | blit::Profiler | |
ProfilerProbes typedef (defined in blit::Profiler) | blit::Profiler | |
remove_probe(ProfilerProbe *pProbe) (defined in blit::Profiler) | blit::Profiler | |
set_alpha(uint8_t uAlpha) (defined in blit::Profiler) | blit::Profiler | |
set_display_size(uint16_t uWidth, uint32_t uHeight) (defined in blit::Profiler) | blit::Profiler | |
set_graph_time(uint32_t uTimeUs) (defined in blit::Profiler) | blit::Profiler | |
set_rows(uint8_t uRows) (defined in blit::Profiler) | blit::Profiler | |
setup_graph_element(DisplayMetric metric, bool bDisplayLabel, bool bDisplayGraph, Pen color) (defined in blit::Profiler) | blit::Profiler | |
start_all_probes() (defined in blit::Profiler) | blit::Profiler | |
~Profiler() (defined in blit::Profiler) | blit::Profiler | virtual |
+ 32blit API
+
+ |
+
+Classes | |
struct | GraphElement |
+Public Types | |
enum | DisplayMetric { dmMin +, dmCur +, dmAvg +, dmMax + } |
+using | ProfilerProbes = std::vector< ProfilerProbe * > |
+Public Member Functions | |
+ | Profiler (uint32_t uRunningAverageSize=0, uint32_t uRunningAverageSpan=1) |
+ProfilerProbe * | add_probe (const char *pszName) |
+ProfilerProbe * | add_probe (const char *pszName, uint32_t uRunningAverageSize, uint32_t uRunningAverageSpan=1) |
+void | remove_probe (ProfilerProbe *pProbe) |
+void | start_all_probes () |
+void | clear_all_probes () |
+void | log_probes () |
+size_t | get_probe_count () |
+size_t | get_page_count () |
+void | set_display_size (uint16_t uWidth, uint32_t uHeight) |
+void | set_graph_time (uint32_t uTimeUs) |
+void | set_rows (uint8_t uRows) |
+void | set_alpha (uint8_t uAlpha) |
+void | display_probe_overlay (uint8_t uPage) |
+void | display_history (bool bDisplayHistory, Pen color=Pen(0, 255, 0)) |
+void | setup_graph_element (DisplayMetric metric, bool bDisplayLabel, bool bDisplayGraph, Pen color) |
+GraphElement & | get_graph_element (DisplayMetric metric) |
+ 32blit API
+
+ |
+
This is the complete list of members for blit::ProfilerProbe, including all inherited members.
+clear() (defined in blit::ProfilerProbe) | blit::ProfilerProbe | inline |
elapsed_metrics() (defined in blit::ProfilerProbe) | blit::ProfilerProbe | inline |
get_graph_time_us() (defined in blit::ProfilerProbe) | blit::ProfilerProbe | inline |
get_running_average() (defined in blit::ProfilerProbe) | blit::ProfilerProbe | inline |
name() (defined in blit::ProfilerProbe) | blit::ProfilerProbe | inline |
ProfilerProbe(const char *pszName, uint32_t uRunningAverageSize=0, uint32_t uRunningAverageSpan=1) (defined in blit::ProfilerProbe) | blit::ProfilerProbe | inline |
set_graph_time_us(uint32_t uGraphTimeUs) (defined in blit::ProfilerProbe) | blit::ProfilerProbe | inline |
set_graph_time_us_to_max() (defined in blit::ProfilerProbe) | blit::ProfilerProbe | inline |
start() (defined in blit::ProfilerProbe) | blit::ProfilerProbe | |
store_elapsed_us(bool bRestart=false) (defined in blit::ProfilerProbe) | blit::ProfilerProbe |
+ 32blit API
+
+ |
+
+Classes | |
struct | Metrics |
+Public Member Functions | |
+ | ProfilerProbe (const char *pszName, uint32_t uRunningAverageSize=0, uint32_t uRunningAverageSpan=1) |
+void | start () |
+void | clear () |
+uint32_t | store_elapsed_us (bool bRestart=false) |
+const Metrics & | elapsed_metrics () |
+const char * | name () |
+const RunningAverage< float > * | get_running_average () |
+void | set_graph_time_us (uint32_t uGraphTimeUs) |
+void | set_graph_time_us_to_max () |
+uint32_t | get_graph_time_us () |
+ 32blit API
+
+ |
+
This is the complete list of members for blit::RunningAverage< T >, including all inherited members.
+add(T value) (defined in blit::RunningAverage< T >) | blit::RunningAverage< T > | inline |
add_all(T value) (defined in blit::RunningAverage< T >) | blit::RunningAverage< T > | inline |
average() (defined in blit::RunningAverage< T >) | blit::RunningAverage< T > | inline |
count() const (defined in blit::RunningAverage< T >) | blit::RunningAverage< T > | inline |
Data typedef (defined in blit::RunningAverage< T >) | blit::RunningAverage< T > | |
data_count() (defined in blit::RunningAverage< T >) | blit::RunningAverage< T > | inline |
operator[](std::size_t i) const (defined in blit::RunningAverage< T >) | blit::RunningAverage< T > | inline |
reset() (defined in blit::RunningAverage< T >) | blit::RunningAverage< T > | inline |
RunningAverage(std::size_t uSize) (defined in blit::RunningAverage< T >) | blit::RunningAverage< T > | inline |
size() const (defined in blit::RunningAverage< T >) | blit::RunningAverage< T > | inline |
+ 32blit API
+
+ |
+
+Public Types | |
+using | Data = std::vector< T > |
+ 32blit API
+
+ |
+
This is the complete list of members for blit::ScopedProfilerProbe, including all inherited members.
+operator=(ScopedProfilerProbe &)=delete (defined in blit::ScopedProfilerProbe) | blit::ScopedProfilerProbe | |
ScopedProfilerProbe(ProfilerProbe *pProbe) (defined in blit::ScopedProfilerProbe) | blit::ScopedProfilerProbe | inlineexplicit |
ScopedProfilerProbe(ScopedProfilerProbe &)=delete (defined in blit::ScopedProfilerProbe) | blit::ScopedProfilerProbe | |
~ScopedProfilerProbe() (defined in blit::ScopedProfilerProbe) | blit::ScopedProfilerProbe | inline |
+ 32blit API
+
+ |
+
+Public Member Functions | |
+ | ScopedProfilerProbe (ProfilerProbe *pProbe) |
+ | ScopedProfilerProbe (ScopedProfilerProbe &)=delete |
+void | operator= (ScopedProfilerProbe &)=delete |
+ 32blit API
+
+ |
+
+ 32blit API
+
+ |
+
Functions for managing colour. +More...
+#include "color.hpp"
+Namespaces | |
blit | |
+Functions | |
Pen | blit::hsv_to_rgba (float h, float s, float v) |
Functions for managing colour.
+
+ 32blit API
+
+ |
+
+ 32blit API
+
+ |
+
+ 32blit API
+
+ |
+
+Files | |
file | geometry.cpp |
Geometry helper functions. | |
file | interpolation.cpp |
+ 32blit API
+
+ |
+
+ 32blit API
+
+ |
+
+Files | |
file | engine.cpp |
file | input.cpp |
Input handlers. | |
file | output.cpp |
Output handlers. | |
file | particle.cpp |
Particle system. | |
file | timer.cpp |
+ 32blit API
+
+ |
+
+Files | |
file | audio.cpp |
Audio engine. | |
+ 32blit API
+
+ |
+
+Files | |
file | color.cpp |
Functions for managing colour. | |
file | mode7.cpp |
Emulate mode7 graphics effects. | |
file | primitive.cpp |
Drawing routines for primitive shapes. | |
file | sprite.cpp |
Functions for drawing sprites. | |
file | surface.cpp |
file | tilemap.cpp |
+ 32blit API
+
+ |
+
#include <cstdarg>
#include "engine.hpp"
#include "api_private.hpp"
#include "timer.hpp"
#include "tweening.hpp"
+Namespaces | |
blit | |
+ 32blit API
+
+ |
+