SprPoP: HDD-раскладка и пути от каталога EXE
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "pop_ui.h"
|
||||
#include "pop_status.h"
|
||||
#include "pop_music.h" /* pop_music_service — подкачка кольца в долгих фейдах */
|
||||
#include "_pop_file.h"
|
||||
|
||||
typedef struct {
|
||||
uint8_t base;
|
||||
@@ -54,8 +55,10 @@ static uint8_t text_index(const pop_font_desc_t *font, uint8_t ch)
|
||||
|
||||
int pop_ui_init(void) __banked
|
||||
{
|
||||
int rc;
|
||||
if (font_ready) return 0;
|
||||
if (atlas_load(&font_at, "FONT\\font.atl") != 0) return -1;
|
||||
POP_PATH_CALL(rc, atlas_load(&font_at, "FONT\\font.atl"));
|
||||
if (rc != 0) return -1;
|
||||
font_ready = 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -242,8 +245,10 @@ void pop_ui_palette_black(void) __banked
|
||||
uint8_t *black = pop_pal_buf;
|
||||
|
||||
/* BIOS принимает максимум 64 записи за вызов; одним буфером покрываем
|
||||
* все четыре четверти палитры, не занимая постоянную память. */
|
||||
for (i = 0; i < sizeof(black); i++) black[i] = 0;
|
||||
* все четыре четверти палитры, не занимая постоянную память.
|
||||
* sizeof(black) здесь нельзя: black — 16-битный указатель, и тогда
|
||||
* обнулятся лишь первые два байта, а цвет заливки останется случайным. */
|
||||
for (i = 0; i < sizeof(pop_pal_buf); i++) black[i] = 0;
|
||||
for (chunk = 0; chunk < 4; chunk++) {
|
||||
uint8_t start = (uint8_t)(chunk << 6);
|
||||
gfx_pal_load(0, start, 64, black);
|
||||
@@ -468,8 +473,10 @@ int pop_screen_blit_atlas_strips(const char * const *parts,
|
||||
gfx_set_bank(GFX_BANK_NORMAL);
|
||||
for (part = 0; part < count; part++) {
|
||||
atlas_t at;
|
||||
int rc;
|
||||
|
||||
if (atlas_load(&at, parts[part]) != 0) return -1;
|
||||
POP_PATH_CALL(rc, atlas_load(&at, parts[part]));
|
||||
if (rc != 0) return -1;
|
||||
strip_blit(&at, x, &y);
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user