made the join game screen to get ready for attaching to host and also made a protocol doc
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
#ifndef __game_h__
|
||||
#define __game_h__
|
||||
|
||||
void init_start_game();
|
||||
void render_start_game();
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
extern SDL_Point mouse_pos;
|
||||
@@ -17,10 +20,7 @@ extern SDL_Point mouse_pos;
|
||||
extern int state;
|
||||
|
||||
void start_battle();
|
||||
void start_game();
|
||||
void show_options();
|
||||
void host_game();
|
||||
void join_game();
|
||||
|
||||
#define GRAB_NEW 2
|
||||
#define GRAB_OLD 1
|
||||
|
||||
@@ -3,17 +3,31 @@
|
||||
#define __host_h__
|
||||
|
||||
#define NO_OBJECT 0
|
||||
//host view
|
||||
#define SET_NAME_BUTTON 1
|
||||
#define START_GAME_BUTTON 2
|
||||
//join view
|
||||
#define JOIN_GAME_BUTTON 1
|
||||
#define PLAYER_NAME_BOX 2
|
||||
#define LOBBY_NAME_BOX 3
|
||||
#define PLAYER_NAME_SEL 0
|
||||
#define LOBBY_NAME_SEL 1
|
||||
|
||||
//host
|
||||
void render_host_game();
|
||||
void init_host();
|
||||
extern int over_object;
|
||||
extern int lobby_has_name;
|
||||
|
||||
|
||||
char *get_this_name(int i);
|
||||
|
||||
//join
|
||||
|
||||
|
||||
char *join_get_name_ptr();
|
||||
void render_join_game();
|
||||
void init_join();
|
||||
int join_over_object();
|
||||
void join_set_selected(int);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#define DEF_WINDOW_WIDTH 1920
|
||||
#define DEF_WINDOW_HEIGHT 1080
|
||||
#define DEF_WINDOW_WIDTH 1024
|
||||
#define DEF_WINDOW_HEIGHT 768
|
||||
|
||||
|
||||
|
||||
@@ -25,5 +25,7 @@ extern int selected_index;
|
||||
extern SDL_Window* window;
|
||||
extern SDL_Renderer* renderer;
|
||||
extern SDL_Event event;
|
||||
extern SDL_Color white;
|
||||
extern SDL_Point mouse_pos;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
void start_overworld();
|
||||
|
||||
void init_overworld();
|
||||
void render_overworld();
|
||||
|
||||
#define OW_GRIDSZ 128
|
||||
|
||||
|
||||
Reference in New Issue
Block a user