mirror of https://github.com/nmlgc/ReC98.git
[Maintenance] [th05] Use master.hpp for the character selection menu
6149 LoC with the original master.h, vs. 2524 LoC *and* additional semantic sugar with master.hpp. Nice! (Yes, *semantic* sugar.) Part of P0124, funded by [Anonymous] and Blue Bolt.
This commit is contained in:
parent
30462cc64f
commit
3ee848f456
|
@ -176,7 +176,9 @@ void MASTER_RET grcg_off(void);
|
||||||
void MASTER_RET grcg_round_boxfill(
|
void MASTER_RET grcg_round_boxfill(
|
||||||
int x1, int y1, int x2, int y2, unsigned r
|
int x1, int y1, int x2, int y2, unsigned r
|
||||||
);
|
);
|
||||||
void MASTER_RET grcg_byteboxfill_x(int x1, int y1, int x2, int y2);
|
void MASTER_RET grcg_byteboxfill_x(
|
||||||
|
vram_x_t left, vram_y_t top, vram_x_t right, vram_y_t bottom
|
||||||
|
);
|
||||||
|
|
||||||
// Circles
|
// Circles
|
||||||
void MASTER_RET grcg_circle(int x, int y, unsigned r);
|
void MASTER_RET grcg_circle(int x, int y, unsigned r);
|
||||||
|
@ -289,6 +291,11 @@ void MASTER_RET vsync_end(void);
|
||||||
|
|
||||||
/// Inlined extensions
|
/// Inlined extensions
|
||||||
/// ------------------
|
/// ------------------
|
||||||
|
#define grcg_boxfill_8(left, top, right, bottom) \
|
||||||
|
grcg_byteboxfill_x( \
|
||||||
|
((left) / BYTE_DOTS), top, ((right) / BYTE_DOTS), bottom \
|
||||||
|
)
|
||||||
|
|
||||||
#define palette_entry_rgb_show(fn) \
|
#define palette_entry_rgb_show(fn) \
|
||||||
palette_entry_rgb(fn); \
|
palette_entry_rgb(fn); \
|
||||||
palette_show();
|
palette_show();
|
||||||
|
|
|
@ -6,7 +6,11 @@
|
||||||
#pragma codeseg op_01_TEXT
|
#pragma codeseg op_01_TEXT
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "ReC98.h"
|
#include <dos.h>
|
||||||
|
#include "platform.h"
|
||||||
|
#include "pc98.h"
|
||||||
|
#include "planar.h"
|
||||||
|
#include "master.hpp"
|
||||||
#include "th01/ranks.h"
|
#include "th01/ranks.h"
|
||||||
#include "th02/hardware/frmdelay.h"
|
#include "th02/hardware/frmdelay.h"
|
||||||
#include "th04/formats/cdg.h"
|
#include "th04/formats/cdg.h"
|
||||||
|
@ -112,16 +116,16 @@ void pascal near pic_put(bool16 darkened)
|
||||||
|
|
||||||
// Drop shadow
|
// Drop shadow
|
||||||
grcg_setcolor(GC_RMW, 1);
|
grcg_setcolor(GC_RMW, 1);
|
||||||
grcg_byteboxfill_x(
|
grcg_boxfill_8(
|
||||||
((pic_raised_left + PIC_W) / BYTE_DOTS),
|
(pic_raised_left + PIC_W),
|
||||||
pic_top,
|
pic_top,
|
||||||
((pic_left + PIC_W - 1) / BYTE_DOTS),
|
(pic_left + PIC_W - 1),
|
||||||
(pic_raised_top + PIC_H - 1)
|
(pic_raised_top + PIC_H - 1)
|
||||||
);
|
);
|
||||||
grcg_byteboxfill_x(
|
grcg_boxfill_8(
|
||||||
(pic_left / BYTE_DOTS),
|
pic_left,
|
||||||
(pic_raised_top + PIC_H),
|
(pic_raised_top + PIC_H),
|
||||||
((pic_left + PIC_W - 1) / BYTE_DOTS),
|
(pic_left + PIC_W - 1),
|
||||||
(pic_top + PIC_H - 1)
|
(pic_top + PIC_H - 1)
|
||||||
);
|
);
|
||||||
grcg_off();
|
grcg_off();
|
||||||
|
|
Loading…
Reference in New Issue