mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-28 08:49:30 +00:00
Support for special characters in gfx.text; added scrolling to the default shell; updated sftdlib.
There is a known bug with different text size in sftdlib.
This commit is contained in:
parent
56b47153b7
commit
2a5513473d
10 changed files with 516 additions and 39 deletions
36
libs/sftdlib/libsftd/include/bin_packing_2d.h
Normal file
36
libs/sftdlib/libsftd/include/bin_packing_2d.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef BIN_PACKING_2D_H
|
||||
#define BIN_PACKING_2D_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct bp2d_position {
|
||||
int x, y;
|
||||
} bp2d_position;
|
||||
|
||||
typedef struct bp2d_size {
|
||||
int w, h;
|
||||
} bp2d_size;
|
||||
|
||||
typedef struct bp2d_rectangle {
|
||||
int x, y, w, h;
|
||||
} bp2d_rectangle;
|
||||
|
||||
typedef struct bp2d_node {
|
||||
struct bp2d_node *left;
|
||||
struct bp2d_node *right;
|
||||
bp2d_rectangle rect;
|
||||
int filled;
|
||||
} bp2d_node;
|
||||
|
||||
bp2d_node *bp2d_create(const bp2d_rectangle *rect);
|
||||
void bp2d_free(bp2d_node *node);
|
||||
// 1 success, 0 failure
|
||||
int bp2d_insert(bp2d_node *node, const bp2d_size *in_size, bp2d_position *out_pos);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue