Fixes #101 Fix compilation issues on Linux

This commit is contained in:
Stefan Arentz 2016-12-26 17:03:12 -05:00
parent 2aef5568fa
commit 49b27372f2
4 changed files with 6 additions and 6 deletions

View File

@ -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: {

View File

@ -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);

View File

@ -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());
}
}

View File

@ -516,7 +516,7 @@ int ewm_two_main(int argc, char **argv) {
int fps = EWM_TWO_FPS_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_TWO_OPT_DRIVE1: