mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-26 05:24:21 +01:00
Add C64 mock and implement network connecting
This commit is contained in:
parent
c9c6b0f365
commit
8aaeee4327
5
main.cpp
5
main.cpp
@ -3,8 +3,10 @@
|
|||||||
|
|
||||||
#include "gui.hh"
|
#include "gui.hh"
|
||||||
#include "utils.hh"
|
#include "utils.hh"
|
||||||
|
#include <C64.h>
|
||||||
|
|
||||||
SDL_Surface *screen;
|
SDL_Surface *screen;
|
||||||
|
C64 *TheC64;
|
||||||
|
|
||||||
static void run(void)
|
static void run(void)
|
||||||
{
|
{
|
||||||
@ -28,6 +30,9 @@ static void run(void)
|
|||||||
|
|
||||||
static void init(void)
|
static void init(void)
|
||||||
{
|
{
|
||||||
|
/* Creation of the mocks */
|
||||||
|
TheC64 = new C64();
|
||||||
|
|
||||||
screen = SDL_SetVideoMode(640, 480, 16,
|
screen = SDL_SetVideoMode(640, 480, 16,
|
||||||
SDL_DOUBLEBUF);
|
SDL_DOUBLEBUF);
|
||||||
panic_if(!screen, "Cannot initialize video: %s\n", SDL_GetError());
|
panic_if(!screen, "Cannot initialize video: %s\n", SDL_GetError());
|
||||||
|
21
mocks/C64.h
Normal file
21
mocks/C64.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#ifndef __MOCKS_C64_H__
|
||||||
|
#define __MOCKS_C64_H__
|
||||||
|
|
||||||
|
/* Network connection type */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
NONE,
|
||||||
|
CONNECT,
|
||||||
|
MASTER,
|
||||||
|
CLIENT
|
||||||
|
};
|
||||||
|
|
||||||
|
class C64
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
int network_connection_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern C64 *TheC64;
|
||||||
|
|
||||||
|
#endif /*__MOCKS_C64_H__ */
|
9
mocks/Network.h
Normal file
9
mocks/Network.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#ifndef __MOCKS_NETWORK_H__
|
||||||
|
#define __MOCKS_NETWORK_H__
|
||||||
|
|
||||||
|
class Network
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /*__MOCKS_NETWORK_H__ */
|
@ -2,6 +2,7 @@
|
|||||||
#include "menu.hh"
|
#include "menu.hh"
|
||||||
#include "help_box.hh"
|
#include "help_box.hh"
|
||||||
#include "virtual_keyboard.hh"
|
#include "virtual_keyboard.hh"
|
||||||
|
#include <C64.h>
|
||||||
|
|
||||||
class NetworkView;
|
class NetworkView;
|
||||||
|
|
||||||
@ -67,7 +68,7 @@ public:
|
|||||||
if ( strncmp(Gui::gui->np->NetworkName, "Unset", strlen("Unset")) == 0)
|
if ( strncmp(Gui::gui->np->NetworkName, "Unset", strlen("Unset")) == 0)
|
||||||
Gui::gui->pushDialogueBox(new DialogueBox(network_unset_name_dlg));
|
Gui::gui->pushDialogueBox(new DialogueBox(network_unset_name_dlg));
|
||||||
else
|
else
|
||||||
printf("Connect NYI\n"); // FIXME! Do the actual connect
|
TheC64->network_connection_type = CONNECT;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
printf("Send message NYI\n"); // FIXME! Send message
|
printf("Send message NYI\n"); // FIXME! Send message
|
||||||
|
Loading…
Reference in New Issue
Block a user