X-Git-Url: http://git.shiar.net/netris.git/blobdiff_plain/406e72f6bc3be827e1202d817677e8af093231dc..HEAD:/curses.h diff --git a/curses.h b/curses.h index 84ff19b..7228ec1 100644 --- a/curses.h +++ b/curses.h @@ -1,24 +1,31 @@ #ifndef __CURSES_H #define __CURSES_H -extern int PlayerDisp[MAX_SCREENS]; +typedef struct { + // local player settings + int shown; // visible + int posx; // starting column + int posy; // position of first (bottom) row + int size; // characters per block +} window_t; +extern window_t window[MAX_SCREENS]; extern void InitScreens(void); extern void CleanupScreens(void); static void GetTermcapInfo(void); static void OutputTermStr(char *str, int flush); -extern void DrawBox(int x1, int y1, int x2, int y2); -extern void DrawField(int scr); -extern void InitFields(void); -static void DisplayMessage(char *p); -extern void Messagef(char *fmt, ...); -extern void Messagetype(char c, int x, char *s); -extern void PlotBlock(int scr, int y, int x, unsigned char type); -extern void PlotBlockXY(int y, int x, unsigned char type); -extern void ShowScore(int scr, struct _Score score); -extern void FieldMessage(int playa, char *message); -extern void ShowPause(int playa); -extern void ShowTime(void); +static void window_border(int x1, int y1, int x2, int y2); +extern void window_draw(int player); +extern void screen_setup(void); +static void msg_draw(char *p); +extern void msg_add(char *fmt, ...); +extern void msg_add_char(char c, int x, char *s); +extern void block_draw_window(int player, int y, int x, unsigned char type); +extern void block_draw_status(int y, int x, unsigned char type); +extern void status_draw(int player, struct score_t score); +extern void window_msg(int player, char *message); +extern void window_msg_status(int player); +extern void status_tick(void); extern void ScheduleFullRedraw(void); static void CatchWinCh(int sig);