mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-28 04:23:36 +01:00
small cleanup
This commit is contained in:
parent
240f29f9d5
commit
078edb50b2
6 changed files with 25 additions and 42 deletions
1
TODO
1
TODO
|
@ -1,4 +1,5 @@
|
|||
Extensions on existing code:
|
||||
* project: add license file
|
||||
* kernel: group linker script symbols in a single header file
|
||||
* kernel: be consistent about *tlb_mapped_memory() in hw_detect()
|
||||
* bopti: try to display fullscreen images with TLB access + DMA on fxcg50
|
||||
|
|
|
@ -248,10 +248,10 @@ void getkey_repeat(int first, int next);
|
|||
|
||||
/* getkey_repeat_filter(): Set the repeat filter function
|
||||
|
||||
This function is called by getkey() and getkey_opt() every time a repeat
|
||||
event occurs when GETKEY_REPEAT_FILTER. The function can decide whether to
|
||||
keep, delay it or drop it entirely. It can also change the repeat delays
|
||||
with getkey_repeat() for fully custom repeat delay curves.
|
||||
The repeat filter is called by getkey() and getkey_opt() every time a repeat
|
||||
event occurs when GETKEY_REP_FILTER is set. The filter can decide whether to
|
||||
keep, delay or drop the event. It can also change the repeat delays with
|
||||
getkey_repeat() for fully custom repeat delay curves.
|
||||
|
||||
The time elapsed since the last accepted repeat is passed to the filter
|
||||
function; this time must be larger than the repeat time set with
|
||||
|
|
|
@ -126,7 +126,7 @@ int start(int isappli, int optnum)
|
|||
|
||||
while(loaded < (uint32_t)&srom)
|
||||
{
|
||||
volatile uint8_t y = *x;
|
||||
GUNUSED volatile uint8_t y = *x;
|
||||
loaded += 1024;
|
||||
x += 1024;
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ int start(int isappli, int optnum)
|
|||
}
|
||||
|
||||
#ifdef FX9860G
|
||||
/* Copy permanentely-mapped code to start of user RAM (on fx-CG 50 it
|
||||
/* Copy permanently-mapped code to start of user RAM (on fx-CG 50 it
|
||||
is loaded along ILRAM contents) */
|
||||
void *rgmapped = mmu_uram();
|
||||
regcpy(&lgmapped, &sgmapped, rgmapped);
|
||||
|
@ -184,6 +184,7 @@ int start(int isappli, int optnum)
|
|||
}
|
||||
|
||||
callarray(&bdtors, &edtors);
|
||||
|
||||
/* Before leaving the application, we need to clean everything we
|
||||
changed to hardware settings and peripheral modules. The OS is bound
|
||||
to be confused (and hang, or crash, or any other kind of giving up)
|
||||
|
|
|
@ -291,24 +291,3 @@ int bopti_clip(bopti_image_t const *img, struct rbox *r)
|
|||
/* Return non-zero if the result is empty */
|
||||
return (width <= 0 || height <= 0);
|
||||
}
|
||||
|
||||
void bopti_render_noclip(bopti_image_t const *img, struct rbox *r,
|
||||
uint32_t *v1, uint32_t *v2)
|
||||
{
|
||||
int left = r->left;
|
||||
|
||||
/* Start column and end column (both included) */
|
||||
r->left >>= 5;
|
||||
|
||||
if(r->columns == 1 && (r->visual_x & 31) + r->width <= 32)
|
||||
{
|
||||
r->x = (left & 31) - (r->visual_x & 31);
|
||||
bopti_render_scsp(img, r, v1, v2);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* x-coordinate of the first pixel of the first column */
|
||||
r->x = r->visual_x - (left & 31);
|
||||
bopti_render(img, r, v1, v2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,18 +30,24 @@ void masks(int x1, int x2, uint32_t *masks);
|
|||
@rbox Rendering box */
|
||||
int bopti_clip(bopti_image_t const *img, struct rbox *rbox);
|
||||
|
||||
/* bopti_render_noclip(): Render a bopti image without clipping
|
||||
This function is only ever slightly faster than bopti_render_clip(),
|
||||
eliminating two types of coordinate checks:
|
||||
1. The bounding box does not overflow from the image
|
||||
2. The final rendering does not overflow from the screen
|
||||
/* bopti_render(): Render a bopti image
|
||||
Copies an image into the VRAM. This function does not perform clipping;
|
||||
use bopti_clip() on the rbox before calling it if needed.
|
||||
|
||||
@x @y Location of the top-left corner
|
||||
@img Image encoded by [fxconv]
|
||||
@left @top @w @h Bounding box to render
|
||||
@v1 @v2 VRAMs (gray rendering is used if v2 != NULL) */
|
||||
void bopti_render_noclip(bopti_image_t const *img, struct rbox *rbox,
|
||||
uint32_t *v1, uint32_t *v2);
|
||||
@img Image encoded by [fxconv]
|
||||
@rbox Rendering box (may or may not be clipped)
|
||||
@v1 @v2 VRAMs (gray rendering is used if v2 != NULL) */
|
||||
void bopti_render(bopti_image_t const *img, struct rbox *rbox, uint32_t *v1,
|
||||
uint32_t *v2);
|
||||
|
||||
/* bopti_render_scsp(): Single-column single-position image renderer
|
||||
This function is a specialized version of bopti_render() that can be used
|
||||
when only a single column of the source image is used (all pixels to be
|
||||
rendered are in a single 32-aligned 32-wide pixel column of the source) and
|
||||
a single position of the VRAM is used (all pixels to be rendered end up in a
|
||||
single 32-aligned 32-wide pixel column of the VRAM). */
|
||||
void bopti_render_scsp(bopti_image_t const *img, struct rbox *rbox,
|
||||
uint32_t *v1, uint32_t *v2);
|
||||
|
||||
//---
|
||||
// Alternate rendering modes
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
|
||||
#include "../render/render.h"
|
||||
|
||||
/* TODO: These parameters will eventually be specified by the font */
|
||||
#define CHAR_SPACING 1
|
||||
#define PROP_SPACING 5
|
||||
|
||||
/* dfont(): Set the default font for text rendering */
|
||||
font_t const *dfont(font_t const * font)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue