mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2025-02-21 06:42:02 +01:00
Rearrange the files a bit: Move timer/utils to Src and fix a few small
issues
This commit is contained in:
parent
7619e36910
commit
9d1d6190c8
@ -36,7 +36,7 @@ CPP_SRCS=Src/C64_SC.cpp Src/main.cpp Src/Display.cpp Src/Prefs.cpp Src/SID.cpp \
|
|||||||
Src/CIA_SC.cpp Src/CPU1541_SC.cpp Src/CPU_common.cpp Src/Network.cpp \
|
Src/CIA_SC.cpp Src/CPU1541_SC.cpp Src/CPU_common.cpp Src/Network.cpp \
|
||||||
Src/gui/menu_messages.cpp Src/gui/dialogue_box.cpp Src/gui/widget.cpp \
|
Src/gui/menu_messages.cpp Src/gui/dialogue_box.cpp Src/gui/widget.cpp \
|
||||||
Src/gui/game_info.cpp Src/gui/status_bar.cpp Src/gui/gui.cpp Src/gui/listener.cpp \
|
Src/gui/game_info.cpp Src/gui/status_bar.cpp Src/gui/gui.cpp Src/gui/listener.cpp \
|
||||||
Src/gui/timer.cpp Src/gui/utils.cpp Src/gui/virtual_keyboard.cpp Src/gui/menu.cpp
|
Src/timer.cpp Src/utils.cpp Src/gui/virtual_keyboard.cpp Src/gui/menu.cpp
|
||||||
|
|
||||||
C_SRCS=Src/d64-read.c
|
C_SRCS=Src/d64-read.c
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
#include <unistd.h> /* unlink */
|
#include <unistd.h> /* unlink */
|
||||||
|
|
||||||
#include <C64.h>
|
#include <C64.h>
|
||||||
|
#include <utils.hh>
|
||||||
|
|
||||||
#include "menu.hh"
|
#include "menu.hh"
|
||||||
#include "file_browser.hh"
|
#include "file_browser.hh"
|
||||||
#include "game_info.hh"
|
#include "game_info.hh"
|
||||||
#include "game_info_box.hh"
|
#include "game_info_box.hh"
|
||||||
#include "utils.hh"
|
|
||||||
|
|
||||||
static const char *game_exts[] = {".d64", ".D64", ".t64", ".T64",
|
static const char *game_exts[] = {".d64", ".D64", ".t64", ".T64",
|
||||||
".prg",".PRG", ".p00", ".P00", NULL};
|
".prg",".PRG", ".p00", ".P00", NULL};
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include <SDL_image.h>
|
#include <SDL_image.h>
|
||||||
|
|
||||||
|
#include <utils.hh>
|
||||||
|
|
||||||
#include "game_info.hh"
|
#include "game_info.hh"
|
||||||
#include "utils.hh"
|
|
||||||
|
|
||||||
#define VERSION_BASE (0x1978)
|
#define VERSION_BASE (0x1978)
|
||||||
#define VERSION_MAGIC (VERSION_BASE + 0)
|
#define VERSION_MAGIC (VERSION_BASE + 0)
|
||||||
|
@ -2,13 +2,14 @@
|
|||||||
#include <SDL_ttf.h>
|
#include <SDL_ttf.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
#include <utils.hh>
|
||||||
|
|
||||||
#include "menu.hh"
|
#include "menu.hh"
|
||||||
#include "gui.hh"
|
#include "gui.hh"
|
||||||
#include "menu_messages.hh"
|
#include "menu_messages.hh"
|
||||||
#include "help_box.hh"
|
#include "help_box.hh"
|
||||||
#include "dialogue_box.hh"
|
#include "dialogue_box.hh"
|
||||||
#include "sdl_ttf_font.hh"
|
#include "sdl_ttf_font.hh"
|
||||||
#include "utils.hh"
|
|
||||||
#include "virtual_keyboard.hh"
|
#include "virtual_keyboard.hh"
|
||||||
|
|
||||||
extern SDL_Surface *screen;
|
extern SDL_Surface *screen;
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
#define __GUI_HH__
|
#define __GUI_HH__
|
||||||
|
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
#include <timer.hh>
|
||||||
|
|
||||||
#include "menu.hh"
|
#include "menu.hh"
|
||||||
#include "font.hh"
|
#include "font.hh"
|
||||||
#include "timer.hh"
|
|
||||||
#include "gui_view.hh"
|
#include "gui_view.hh"
|
||||||
|
|
||||||
/* Frodo stuff */
|
/* Frodo stuff */
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
#include <utils.hh>
|
||||||
|
|
||||||
#include "listener.hh"
|
#include "listener.hh"
|
||||||
#include "utils.hh"
|
|
||||||
|
|
||||||
ListenerManager::ListenerManager()
|
ListenerManager::ListenerManager()
|
||||||
{
|
{
|
||||||
|
@ -12,9 +12,10 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <utils.hh>
|
||||||
|
|
||||||
#include "menu.hh"
|
#include "menu.hh"
|
||||||
#include "font.hh"
|
#include "font.hh"
|
||||||
#include "utils.hh"
|
|
||||||
#include "gui.hh"
|
#include "gui.hh"
|
||||||
|
|
||||||
#define IS_SUBMENU(p_msg) ( (p_msg)[0] == '^' )
|
#define IS_SUBMENU(p_msg) ( (p_msg)[0] == '^' )
|
||||||
|
@ -2,11 +2,12 @@
|
|||||||
|
|
||||||
#include <C64.h>
|
#include <C64.h>
|
||||||
|
|
||||||
|
#include <utils.hh>
|
||||||
|
|
||||||
#include "menu.hh"
|
#include "menu.hh"
|
||||||
#include "file_browser.hh"
|
#include "file_browser.hh"
|
||||||
#include "game_info.hh"
|
#include "game_info.hh"
|
||||||
#include "game_info_box.hh"
|
#include "game_info_box.hh"
|
||||||
#include "utils.hh"
|
|
||||||
|
|
||||||
static const char *save_exts[] = {".sav", ".SAV", NULL};
|
static const char *save_exts[] = {".sav", ".SAV", NULL};
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#include <SDL_ttf.h>
|
#include <SDL_ttf.h>
|
||||||
|
|
||||||
|
#include <utils.hh>
|
||||||
#include "font.hh"
|
#include "font.hh"
|
||||||
#include "utils.hh"
|
|
||||||
|
|
||||||
#ifndef __SDL_TTF_FONT_HH__
|
#ifndef __SDL_TTF_FONT_HH__
|
||||||
#define __SDL_TTF_FONT_HH__
|
#define __SDL_TTF_FONT_HH__
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#ifndef __STATUS_BAR_HH__
|
#ifndef __STATUS_BAR_HH__
|
||||||
#define __STATUS_BAR_HH__
|
#define __STATUS_BAR_HH__
|
||||||
|
|
||||||
|
#include <timer.hh>
|
||||||
|
|
||||||
#include "menu.hh"
|
#include "menu.hh"
|
||||||
#include "gui.hh"
|
#include "gui.hh"
|
||||||
#include "timer.hh"
|
|
||||||
|
|
||||||
#define N_STATUS_MESSAGES 8
|
#define N_STATUS_MESSAGES 8
|
||||||
|
|
||||||
|
@ -11,8 +11,9 @@
|
|||||||
********************************************************************/
|
********************************************************************/
|
||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
|
|
||||||
|
#include <utils.hh>
|
||||||
|
|
||||||
#include "virtual_keyboard.hh"
|
#include "virtual_keyboard.hh"
|
||||||
#include "utils.hh"
|
|
||||||
#include "gui.hh"
|
#include "gui.hh"
|
||||||
|
|
||||||
typedef struct virtkey
|
typedef struct virtkey
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
#include "sysdeps.h"
|
||||||
|
#include "Prefs.h"
|
||||||
|
|
||||||
#include "timer.hh"
|
#include "timer.hh"
|
||||||
#include "utils.hh"
|
#include "utils.hh"
|
||||||
#include "gui.hh"
|
|
||||||
|
|
||||||
#define MS_TO_TICKS(x) ((x) / Gui::gui->np->MsPerFrame)
|
#define MS_TO_TICKS(x) ((x) / ThePrefs.MsPerFrame)
|
||||||
|
|
||||||
TimerController::TimerController()
|
TimerController::TimerController()
|
||||||
{
|
{
|
@ -5,8 +5,8 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <SDL_ttf.h>
|
#include <SDL_ttf.h>
|
||||||
|
|
||||||
|
#include "gui/font.hh"
|
||||||
#include "utils.hh"
|
#include "utils.hh"
|
||||||
#include "font.hh"
|
|
||||||
|
|
||||||
TTF_Font *read_and_alloc_font(const char *path, int pt_size)
|
TTF_Font *read_and_alloc_font(const char *path, int pt_size)
|
||||||
{
|
{
|
||||||
@ -14,13 +14,19 @@ TTF_Font *read_and_alloc_font(const char *path, int pt_size)
|
|||||||
SDL_RWops *rw;
|
SDL_RWops *rw;
|
||||||
Uint8 *data;
|
Uint8 *data;
|
||||||
FILE *fp = fopen(path, "r");
|
FILE *fp = fopen(path, "r");
|
||||||
|
size_t r;
|
||||||
|
|
||||||
if (!fp) {
|
if (!fp) {
|
||||||
fprintf(stderr, "Could not open font %s\n", path);
|
fprintf(stderr, "Could not open font %s\n", path);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
data = (Uint8*)xmalloc(1 * 1024*1024);
|
data = (Uint8*)xmalloc(1 * 1024*1024);
|
||||||
fread(data, 1, 1 * 1024 * 1024, fp);
|
r = fread(data, 1, 1 * 1024 * 1024, fp);
|
||||||
|
if (r == 0 || ferror(fp))
|
||||||
|
{
|
||||||
|
free(data);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
rw = SDL_RWFromMem(data, 1 * 1024 * 1024);
|
rw = SDL_RWFromMem(data, 1 * 1024 * 1024);
|
||||||
if (!rw)
|
if (!rw)
|
||||||
{
|
{
|
Loading…
x
Reference in New Issue
Block a user