mirror of
https://github.com/st3fan/ewm.git
synced 2024-06-01 12:41:27 +00:00
Fixes #101 Fix compilation issues on Linux
This commit is contained in:
parent
2aef5568fa
commit
49b27372f2
|
@ -192,7 +192,7 @@ int ewm_one_main(int argc, char **argv) {
|
|||
int model = EWM_ONE_MODEL_DEFAULT;
|
||||
struct ewm_memory_option_t *extra_memory = NULL;
|
||||
|
||||
char ch;
|
||||
int ch;
|
||||
while ((ch = getopt_long_only(argc, argv, "", one_options, NULL)) != -1) {
|
||||
switch (ch) {
|
||||
case EWM_ONE_OPT_MODEL: {
|
||||
|
|
|
@ -107,7 +107,7 @@ static inline void scr_render_lores_block(struct scr_t *scr, int row, int column
|
|||
dst.w = 21;
|
||||
dst.h = 12;
|
||||
|
||||
uint c = block & 0x0f;
|
||||
uint8_t c = block & 0x0f;
|
||||
if (c != 0) {
|
||||
SDL_SetRenderDrawColor(scr->renderer, lores_colors[c].r, lores_colors[c].g, lores_colors[c].b, lores_colors[c].a);
|
||||
SDL_RenderFillRect(scr->renderer, &dst);
|
||||
|
|
|
@ -37,7 +37,7 @@ void txt_full_refresh_setup(struct scr_t *scr) {
|
|||
scr->two->screen_page = EWM_A2P_SCREEN_PAGE1;
|
||||
|
||||
for (uint16_t a = 0x0400; a <= 0x0bff; a++) {
|
||||
uint8_t v = 0xa0 + (random() % 64);
|
||||
uint8_t v = 0xa0 + (rand() % 64);
|
||||
mem_set_byte(scr->two->cpu, a, v);
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ void lgr_full_refresh_setup(struct scr_t *scr) {
|
|||
scr->two->screen_graphics_style = EWM_A2P_SCREEN_GRAPHICS_STYLE_FULL;
|
||||
|
||||
for (uint16_t a = 0x0400; a <= 0x0bff; a++) {
|
||||
uint8_t v = ((random() % 16) << 4) | (random() % 16);
|
||||
uint8_t v = ((rand() % 16) << 4) | (rand() % 16);
|
||||
mem_set_byte(scr->two->cpu, a, v);
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ void hgr_full_refresh_setup(struct scr_t *scr) {
|
|||
scr->two->screen_graphics_style = EWM_A2P_SCREEN_GRAPHICS_STYLE_FULL;
|
||||
|
||||
for (uint16_t a = 0x2000; a <= 0x5fff; a++) {
|
||||
mem_set_byte(scr->two->cpu, a, random());
|
||||
mem_set_byte(scr->two->cpu, a, rand());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user