diff --git a/Makefile b/Makefile index 3d877dc..bfebd38 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ CC = gcc PREFIX = ./ BINARY=timesynk -OBJS = main.o net/sockets.o +OBJS = main.o game.o player.o net/sockets.o CURSES_OBJS = interface/curses.o SDL_OBJS = interface/sdl.o DEBUG = -g @@ -17,15 +17,12 @@ $(BINARY): $(OBJS) $(CURSES_OBJS) sdl: $(OBJS) $(SDL_OBJS) $(CC) $(OBJS) $(SDL_OBJS) $(SDL_LFLAGS) -o $(BINARY) - curses: $(OBJS) $(CURSES_OBJS) $(CC) $(OBJS) $(CURSES_OBJS) $(CURSES_LFLAGS) -o $(BINARY) xcurses: $(OBJS) $(CURSES_OBJS) $(CC) $(OBJS) $(CURSES_OBJS) $(XCURSES_LFLAGS) -o $(BINARY) - - all: $(BINARY) clean: @@ -34,6 +31,12 @@ clean: main.o: main.c stubs.h interface/curses.c net/sockets.c $(CC) $(CFLAGS) -c main.c +game.o: game.h game.c + $(CC) $(CFLAGS) -c game.c + +player.o: game.h player.h player.c + $(CC) $(CFLAGS) -c player.c + sockets.o: net/sockets.c stubs.h $(CC) $(CFLAGS) -c net/sockets.c diff --git a/game.c b/game.c new file mode 100644 index 0000000..65378d4 --- /dev/null +++ b/game.c @@ -0,0 +1,13 @@ +/**** + +***/ +#include "main.h" +#include "common.h" +#include "game.h" + +void drawMap() { +// int i; +// for(i = updated_live_map_length;i > 0;i++) { +// interfaceDrawTile(updated_live_map[i].x, updated_live_map[i].y); +// } +} diff --git a/game.h b/game.h new file mode 100644 index 0000000..76704ae --- /dev/null +++ b/game.h @@ -0,0 +1,14 @@ +#ifndef GAME_H +#define GAME_H + +/* The Eight Holy Directions */ +#define NORTH 8 +#define SOUTH 2 +#define EAST 6 +#define WEST 4 +#define NORTHEAST 7 +#define NORTHWEST 9 +#define SOUTHEAST 1 +#define SOUTHWEST 3 + +#endif diff --git a/interface/curses.c b/interface/curses.c index ffc2a96..1dbebdc 100644 --- a/interface/curses.c +++ b/interface/curses.c @@ -1,5 +1,7 @@ #include #include "curses.h" +#include "../player.h" +#include "../game.h" #include "../main.h" #include "../common.h" @@ -34,11 +36,25 @@ void interfaceLoop() { case 'Q': is_running = 0; break; + case KEY_UP: + (*player_commands[PLAYER_MOVE])(NORTH, 1); + break; + case KEY_DOWN: + (*player_commands[PLAYER_MOVE])(SOUTH, 1); + break; + case KEY_RIGHT: + (*player_commands[PLAYER_MOVE])(EAST, 1); + break; + case KEY_LEFT: + (*player_commands[PLAYER_MOVE])(WEST, 1); + break; } } void interfaceDraw() { - + clear(); + mvwaddstr(screen, player.y, player.x, "@"); + refresh(); } void interfaceClose() { diff --git a/interface/sdl.c b/interface/sdl.c index dfeccab..3e9fd2b 100644 --- a/interface/sdl.c +++ b/interface/sdl.c @@ -5,6 +5,8 @@ #include "sdl.h" #include "../main.h" #include "../common.h" +#include "../player.h" +#include "../game.h" int interfaceInit() { // Load it up! @@ -30,15 +32,28 @@ void interfaceLoop() { is_running = 0; break; case SDL_KEYDOWN: - if (event.key.keysym.sym == SDLK_q) + if (event.key.keysym.sym == SDLK_q) { is_running = 0; + } else if (event.key.keysym.sym == SDLK_UP) { + (*player_commands[PLAYER_MOVE])(NORTH, 1); + } else if (event.key.keysym.sym == SDLK_DOWN) { + (*player_commands[PLAYER_MOVE])(SOUTH, 1); + } else if (event.key.keysym.sym == SDLK_RIGHT) { + (*player_commands[PLAYER_MOVE])(EAST, 1); + } else if (event.key.keysym.sym == SDLK_LEFT) { + (*player_commands[PLAYER_MOVE])(WEST, 1); + } break; } } } void interfaceDraw() { - + // TODO: instead of redrawing whole screen, redraw last positions of tiles + SDL_FillRect(screen, NULL, SDL_MapRGB(screen->format, 0, 0, 0)); + SDL_Rect player_rect = {player.x*16, player.y*16, 16, 16}; + SDL_FillRect(screen, &player_rect, SDL_MapRGB(screen->format, 255, 255, 255)); + SDL_Flip(screen); // redraw! } void interfaceClose() { diff --git a/main.c b/main.c index 59a4a2c..97b832a 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,8 @@ #include "main.h" #include "common.h" #include "stubs.h" +#include "game.h" +#include "player.h" // TODO: add arguments, so user can connect to server via cmdline option int main(int argc, char *argv[]) { // initialize our interface system (ncurses, SDL, etc.) @@ -12,6 +14,10 @@ int main(int argc, char *argv[]) { return ERROR; } is_running = 1; + + // h'okay, let's add our default player commands + playerSetCommand(PLAYER_MOVE, playerMove); + // start our program loop! while(is_running) { if (is_networking) diff --git a/player.c b/player.c new file mode 100644 index 0000000..d5a4b89 --- /dev/null +++ b/player.c @@ -0,0 +1,28 @@ +/**** player.c - player creation, movement, etc. functions +This file contains the functions for initializing and commanding the player. + +****/ +#include "player.h" +#include "game.h" + +void playerSetCommand(int command_id, void(*function)) { + player_commands[command_id] = function; +} + +/* in-game movement stuff */ +void playerMove(int direction, int distance) { + switch(direction) { + case NORTH: + player.y -= distance; + break; + case SOUTH: + player.y += distance; + break; + case EAST: + player.x += distance; + break; + case WEST: + player.x -= distance; + break; + } +} diff --git a/player.h b/player.h new file mode 100644 index 0000000..6830ed1 --- /dev/null +++ b/player.h @@ -0,0 +1,28 @@ +#ifndef PLAYER_H +#define PLAYER_H + +#define MAX_PLAYER_COMMANDS 128 +/* list of standard command ids */ +#define PLAYER_MOVE 1 +#define PLAYER_KICK 2 +#define PLAYER_TUMBLE 3 + +typedef struct { + int x; + int y; +} player_struct; +player_struct player; + +void (*player_commands[128]) (); // pointer to array of command functions + +/** playerSetCommand +This function ties a command function to a command id, as contained within the player_commands array. After tying a command to a function, a command can be directly called with the following syntax: + (*player_commands[PLAYER_MOVE])(argument_1, argument_2, ...) +or via the playerCommand helper function: + playerCommand(PLAYER_MOVE, argument_1, argument_2, ...) +**/ +void playerSetCommand(int command_id, void(*function)); + +void playerMove(int direction, int distance); + +#endif diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/categories.pbxbtree b/xcode/build/timesynk.build/timesynk.pbxindex/categories.pbxbtree index 8d47c70..b10b89b 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/categories.pbxbtree and b/xcode/build/timesynk.build/timesynk.pbxindex/categories.pbxbtree differ diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/cdecls.pbxbtree b/xcode/build/timesynk.build/timesynk.pbxindex/cdecls.pbxbtree index 097dbcd..bdce005 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/cdecls.pbxbtree and b/xcode/build/timesynk.build/timesynk.pbxindex/cdecls.pbxbtree differ diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/decls.pbxbtree b/xcode/build/timesynk.build/timesynk.pbxindex/decls.pbxbtree index 8e77cf4..3bd2bfc 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/decls.pbxbtree and b/xcode/build/timesynk.build/timesynk.pbxindex/decls.pbxbtree differ diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/files.pbxbtree b/xcode/build/timesynk.build/timesynk.pbxindex/files.pbxbtree index cc192f0..67744a2 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/files.pbxbtree and b/xcode/build/timesynk.build/timesynk.pbxindex/files.pbxbtree differ diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/imports.pbxbtree b/xcode/build/timesynk.build/timesynk.pbxindex/imports.pbxbtree index a26669d..6d1fc6f 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/imports.pbxbtree and b/xcode/build/timesynk.build/timesynk.pbxindex/imports.pbxbtree differ diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/pbxindex.header b/xcode/build/timesynk.build/timesynk.pbxindex/pbxindex.header index f9db5e1..536b12c 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/pbxindex.header and b/xcode/build/timesynk.build/timesynk.pbxindex/pbxindex.header differ diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/refs.pbxbtree b/xcode/build/timesynk.build/timesynk.pbxindex/refs.pbxbtree index 1179f3c..bb85351 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/refs.pbxbtree and b/xcode/build/timesynk.build/timesynk.pbxindex/refs.pbxbtree differ diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/strings.pbxstrings/control b/xcode/build/timesynk.build/timesynk.pbxindex/strings.pbxstrings/control index 938e539..03553ed 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/strings.pbxstrings/control and b/xcode/build/timesynk.build/timesynk.pbxindex/strings.pbxstrings/control differ diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/strings.pbxstrings/strings b/xcode/build/timesynk.build/timesynk.pbxindex/strings.pbxstrings/strings index 32d7e46..456adee 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/strings.pbxstrings/strings and b/xcode/build/timesynk.build/timesynk.pbxindex/strings.pbxstrings/strings differ diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/subclasses.pbxbtree b/xcode/build/timesynk.build/timesynk.pbxindex/subclasses.pbxbtree index 5e62c47..e5268df 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/subclasses.pbxbtree and b/xcode/build/timesynk.build/timesynk.pbxindex/subclasses.pbxbtree differ diff --git a/xcode/build/timesynk.build/timesynk.pbxindex/symbols0.pbxsymbols b/xcode/build/timesynk.build/timesynk.pbxindex/symbols0.pbxsymbols index e1f9d01..4cf6df7 100644 Binary files a/xcode/build/timesynk.build/timesynk.pbxindex/symbols0.pbxsymbols and b/xcode/build/timesynk.build/timesynk.pbxindex/symbols0.pbxsymbols differ diff --git a/xcode/timesynk.xcodeproj/kts.mode1v3 b/xcode/timesynk.xcodeproj/kts.mode1v3 index bde76b6..bcb32e9 100644 --- a/xcode/timesynk.xcodeproj/kts.mode1v3 +++ b/xcode/timesynk.xcodeproj/kts.mode1v3 @@ -308,7 +308,7 @@ PBXProjectModuleGUID 1CE0B20306471E060097A5F4 PBXProjectModuleLabel - sdl.c + player.c PBXSplitModuleInNavigatorKey Split0 @@ -316,25 +316,26 @@ PBXProjectModuleGUID 1CE0B20406471E060097A5F4 PBXProjectModuleLabel - sdl.c + player.c _historyCapacity 0 bookmark - 2002F0DC17E972B3003CF277 + 20568DFA17EC16C60022F314 history - 20F6A21417E95C1200BAD261 20567ECA17E95DEC0002B1A9 20567ECF17E95DEC0002B1A9 20567EE317E95E0D0002B1A9 2090289817E95F9E0051A253 - 2090289B17E95F9E0051A253 - 2090289C17E95F9E0051A253 2090289D17E95F9E0051A253 20D2707917E962A1005B3EA0 20D2707A17E962A1005B3EA0 2002F0D917E972B3003CF277 - 2002F0D417E972A4003CF277 + 20568DE617EC16C60022F314 + 20568DE717EC16C60022F314 + 20568DE817EC16C60022F314 + 20568DE917EC16C60022F314 + 20568DEA17EC16C60022F314 prevStack @@ -350,7 +351,10 @@ 2090289E17E95F9E0051A253 2090289F17E95F9E0051A253 209028A517E95F9E0051A253 - 2002F0DA17E972B3003CF277 + 20568DEB17EC16C60022F314 + 20568DEC17EC16C60022F314 + 20568DED17EC16C60022F314 + 20568DEE17EC16C60022F314 SplitCount @@ -410,9 +414,9 @@ TableOfContents - 2002F0C517E9705F003CF277 + 20568DF017EC16C60022F314 1CE0B1FE06471DED0097A5F4 - 2002F0C617E9705F003CF277 + 20568DF117EC16C60022F314 1CE0B20306471E060097A5F4 1CE0B20506471E060097A5F4 @@ -568,14 +572,12 @@ Dock - BecomeActive - ContentConfiguration PBXProjectModuleGUID 1CD0528F0623707200166675 PBXProjectModuleLabel - sdl.c + StatusBarVisibility @@ -631,7 +633,7 @@ TableOfContents 20F6A1B417E95A6200BAD261 - 2002F0C717E9705F003CF277 + 20568DF217EC16C60022F314 1CD0528F0623707200166675 XCMainBuildResultsModuleGUID @@ -751,13 +753,13 @@ TableOfContents 1CD10A99069EF8BA00B06720 - 2002F0C817E9705F003CF277 + 20568DF317EC16C60022F314 1C162984064C10D400B95A72 - 2002F0C917E9705F003CF277 - 2002F0CA17E9705F003CF277 - 2002F0CB17E9705F003CF277 - 2002F0CC17E9705F003CF277 - 2002F0CD17E9705F003CF277 + 20568DF417EC16C60022F314 + 20568DF517EC16C60022F314 + 20568DF617EC16C60022F314 + 20568DF717EC16C60022F314 + 20568DF817EC16C60022F314 ToolbarConfiguration xcode.toolbar.config.debugV3 @@ -919,7 +921,7 @@ TableOfContents 1C78EAAD065D492600B07095 - 2002F0CE17E9705F003CF277 + 20568DF917EC16C60022F314 1C78EAAC065D492600B07095 ToolbarConfiguration diff --git a/xcode/timesynk.xcodeproj/kts.pbxuser b/xcode/timesynk.xcodeproj/kts.pbxuser index d15a24e..7b4dd48 100644 --- a/xcode/timesynk.xcodeproj/kts.pbxuser +++ b/xcode/timesynk.xcodeproj/kts.pbxuser @@ -21,14 +21,6 @@ sepNavVisRange = "{0, 272}"; }; }; - 2002F0D417E972A4003CF277 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - comments = "error: ‘false’ undeclared (first use in this function)"; - fRef = 20F6A1F017E95B6F00BAD261 /* sdl.c */; - rLen = 1; - rLoc = 29; - rType = 1; - }; 2002F0D917E972B3003CF277 /* PlistBookmark */ = { isa = PlistBookmark; fRef = 8D1107310486CEB800E47090 /* Info.plist */; @@ -40,27 +32,6 @@ rLen = 0; rLoc = 2147483647; }; - 2002F0DA17E972B3003CF277 /* PlistBookmark */ = { - isa = PlistBookmark; - fRef = 8D1107310486CEB800E47090 /* Info.plist */; - fallbackIsa = PBXBookmark; - isK = 0; - kPath = ( - ); - name = /Users/kts/Devel/timesynk/xcode/Info.plist; - rLen = 0; - rLoc = 2147483647; - }; - 2002F0DC17E972B3003CF277 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 20F6A1F017E95B6F00BAD261 /* sdl.c */; - name = "sdl.c: 47"; - rLen = 0; - rLoc = 833; - rType = 0; - vrLen = 422; - vrLoc = 314; - }; 20567ECA17E95DEC0002B1A9 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 20F6A1C417E95AD300BAD261 /* common.h */; @@ -111,10 +82,111 @@ vrLen = 332; vrLoc = 0; }; + 20568DD417EBE9490022F314 /* player.c */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 392}}"; + sepNavSelRange = "{614, 0}"; + sepNavVisRange = "{0, 483}"; + }; + }; + 20568DE617EC16C60022F314 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 20F6A1F017E95B6F00BAD261 /* sdl.c */; + name = "sdl.c: 37"; + rLen = 0; + rLoc = 833; + rType = 0; + vrLen = 401; + vrLoc = 355; + }; + 20568DE717EC16C60022F314 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 20F6A1CF17E95AD300BAD261 /* main.h */; + name = "main.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 73; + vrLoc = 0; + }; + 20568DE817EC16C60022F314 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2090287B17E95E780051A253 /* timesynk_Prefix.pch */; + name = "timesynk_Prefix.pch: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 179; + vrLoc = 0; + }; + 20568DE917EC16C60022F314 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 002F3A2B09D0888800EBEB88 /* SDLMain.h */; + name = "SDLMain.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 374; + vrLoc = 0; + }; + 20568DEA17EC16C60022F314 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 20568DD417EBE9490022F314 /* player.c */; + }; + 20568DEB17EC16C60022F314 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 20F6A1F017E95B6F00BAD261 /* sdl.c */; + name = "sdl.c: 37"; + rLen = 0; + rLoc = 833; + rType = 0; + vrLen = 401; + vrLoc = 355; + }; + 20568DEC17EC16C60022F314 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 20F6A1CF17E95AD300BAD261 /* main.h */; + name = "main.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 73; + vrLoc = 0; + }; + 20568DED17EC16C60022F314 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2090287B17E95E780051A253 /* timesynk_Prefix.pch */; + name = "timesynk_Prefix.pch: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 179; + vrLoc = 0; + }; + 20568DEE17EC16C60022F314 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 002F3A2B09D0888800EBEB88 /* SDLMain.h */; + name = "SDLMain.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 374; + vrLoc = 0; + }; + 20568DFA17EC16C60022F314 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 20568DD417EBE9490022F314 /* player.c */; + name = "player.c: 29"; + rLen = 0; + rLoc = 614; + rType = 0; + vrLen = 483; + vrLoc = 0; + }; 2090287B17E95E780051A253 /* timesynk_Prefix.pch */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {600, 163}}"; - sepNavSelRange = "{126, 0}"; + sepNavIntBoundsRect = "{{0, 0}, {600, 253}}"; + sepNavSelRange = "{0, 0}"; sepNavVisRange = "{0, 179}"; sepNavWindowFrame = "{{15, 183}, {750, 558}}"; }; @@ -129,26 +201,6 @@ vrLen = 272; vrLoc = 0; }; - 2090289B17E95F9E0051A253 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 002F3A2B09D0888800EBEB88 /* SDLMain.h */; - name = "SDLMain.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 374; - vrLoc = 0; - }; - 2090289C17E95F9E0051A253 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2090287B17E95E780051A253 /* timesynk_Prefix.pch */; - name = "timesynk_Prefix.pch: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 175; - vrLoc = 0; - }; 2090289D17E95F9E0051A253 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 20F6A1F117E95B6F00BAD261 /* sdl.h */; @@ -293,7 +345,7 @@ uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {519, 253}}"; sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{0, 107}"; + sepNavVisRange = "{0, 73}"; }; }; 20F6A1D417E95AD300BAD261 /* stubs.h */ = { @@ -320,14 +372,14 @@ rLen = 0; rLoc = 0; rType = 0; - vrLen = 107; + vrLen = 73; vrLoc = 0; }; 20F6A1F017E95B6F00BAD261 /* sdl.c */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {450, 588}}"; + sepNavIntBoundsRect = "{{0, 0}, {519, 798}}"; sepNavSelRange = "{833, 0}"; - sepNavVisRange = "{378, 332}"; + sepNavVisRange = "{355, 401}"; }; }; 20F6A1F117E95B6F00BAD261 /* sdl.h */ = { @@ -344,16 +396,6 @@ sepNavVisRange = "{0, 62}"; }; }; - 20F6A21417E95C1200BAD261 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 20F6A1CF17E95AD300BAD261 /* main.h */; - name = "main.h: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 107; - vrLoc = 0; - }; 20F6A21A17E95C1200BAD261 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 20F6A1D417E95AD300BAD261 /* stubs.h */; @@ -408,22 +450,27 @@ PBXFileDataSource_Target_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 401174600; - PBXWorkspaceStateSaveDate = 401174600; + PBXPerProjectTemplateStateSaveDate = 401336609; + PBXWorkspaceStateSaveDate = 401336609; }; perUserProjectItems = { - 2002F0D417E972A4003CF277 /* PBXTextBookmark */ = 2002F0D417E972A4003CF277 /* PBXTextBookmark */; 2002F0D917E972B3003CF277 /* PlistBookmark */ = 2002F0D917E972B3003CF277 /* PlistBookmark */; - 2002F0DA17E972B3003CF277 /* PlistBookmark */ = 2002F0DA17E972B3003CF277 /* PlistBookmark */; - 2002F0DC17E972B3003CF277 /* PBXTextBookmark */ = 2002F0DC17E972B3003CF277 /* PBXTextBookmark */; 20567ECA17E95DEC0002B1A9 /* PBXTextBookmark */ = 20567ECA17E95DEC0002B1A9 /* PBXTextBookmark */; 20567ECF17E95DEC0002B1A9 /* PBXTextBookmark */ = 20567ECF17E95DEC0002B1A9 /* PBXTextBookmark */; 20567ED217E95DEC0002B1A9 /* PBXTextBookmark */ = 20567ED217E95DEC0002B1A9 /* PBXTextBookmark */; 20567ED517E95DEC0002B1A9 /* PBXTextBookmark */ = 20567ED517E95DEC0002B1A9 /* PBXTextBookmark */; 20567EE317E95E0D0002B1A9 /* PBXTextBookmark */ = 20567EE317E95E0D0002B1A9 /* PBXTextBookmark */; + 20568DE617EC16C60022F314 /* PBXTextBookmark */ = 20568DE617EC16C60022F314 /* PBXTextBookmark */; + 20568DE717EC16C60022F314 /* PBXTextBookmark */ = 20568DE717EC16C60022F314 /* PBXTextBookmark */; + 20568DE817EC16C60022F314 /* PBXTextBookmark */ = 20568DE817EC16C60022F314 /* PBXTextBookmark */; + 20568DE917EC16C60022F314 /* PBXTextBookmark */ = 20568DE917EC16C60022F314 /* PBXTextBookmark */; + 20568DEA17EC16C60022F314 /* PBXBookmark */ = 20568DEA17EC16C60022F314 /* PBXBookmark */; + 20568DEB17EC16C60022F314 /* PBXTextBookmark */ = 20568DEB17EC16C60022F314 /* PBXTextBookmark */; + 20568DEC17EC16C60022F314 /* PBXTextBookmark */ = 20568DEC17EC16C60022F314 /* PBXTextBookmark */; + 20568DED17EC16C60022F314 /* PBXTextBookmark */ = 20568DED17EC16C60022F314 /* PBXTextBookmark */; + 20568DEE17EC16C60022F314 /* PBXTextBookmark */ = 20568DEE17EC16C60022F314 /* PBXTextBookmark */; + 20568DFA17EC16C60022F314 /* PBXTextBookmark */ = 20568DFA17EC16C60022F314 /* PBXTextBookmark */; 2090289817E95F9E0051A253 /* PBXTextBookmark */ = 2090289817E95F9E0051A253 /* PBXTextBookmark */; - 2090289B17E95F9E0051A253 /* PBXTextBookmark */ = 2090289B17E95F9E0051A253 /* PBXTextBookmark */; - 2090289C17E95F9E0051A253 /* PBXTextBookmark */ = 2090289C17E95F9E0051A253 /* PBXTextBookmark */; 2090289D17E95F9E0051A253 /* PBXTextBookmark */ = 2090289D17E95F9E0051A253 /* PBXTextBookmark */; 2090289E17E95F9E0051A253 /* PBXTextBookmark */ = 2090289E17E95F9E0051A253 /* PBXTextBookmark */; 2090289F17E95F9E0051A253 /* PBXTextBookmark */ = 2090289F17E95F9E0051A253 /* PBXTextBookmark */; @@ -435,7 +482,6 @@ 20F6A1B117E95A6200BAD261 /* PlistBookmark */ = 20F6A1B117E95A6200BAD261 /* PlistBookmark */; 20F6A1E917E95B5200BAD261 /* PBXTextBookmark */ = 20F6A1E917E95B5200BAD261 /* PBXTextBookmark */; 20F6A1EA17E95B5200BAD261 /* PBXTextBookmark */ = 20F6A1EA17E95B5200BAD261 /* PBXTextBookmark */; - 20F6A21417E95C1200BAD261 /* PBXTextBookmark */ = 20F6A21417E95C1200BAD261 /* PBXTextBookmark */; 20F6A21A17E95C1200BAD261 /* PBXTextBookmark */ = 20F6A21A17E95C1200BAD261 /* PBXTextBookmark */; 20F6A21E17E95C1200BAD261 /* PBXTextBookmark */ = 20F6A21E17E95C1200BAD261 /* PBXTextBookmark */; }; diff --git a/xcode/timesynk.xcodeproj/project.pbxproj b/xcode/timesynk.xcodeproj/project.pbxproj index b69abdb..4ee7fad 100644 --- a/xcode/timesynk.xcodeproj/project.pbxproj +++ b/xcode/timesynk.xcodeproj/project.pbxproj @@ -11,6 +11,8 @@ 002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; }; 002F3A2E09D0888800EBEB88 /* SDLMain.m in Sources */ = {isa = PBXBuildFile; fileRef = 002F3A2C09D0888800EBEB88 /* SDLMain.m */; }; 002F3AF109D08F1000EBEB88 /* SDLMain.nib in Resources */ = {isa = PBXBuildFile; fileRef = 002F3AEF09D08F1000EBEB88 /* SDLMain.nib */; }; + 20568DD617EBE9490022F314 /* game.c in Sources */ = {isa = PBXBuildFile; fileRef = 20568DD217EBE9490022F314 /* game.c */; }; + 20568DD717EBE9490022F314 /* player.c in Sources */ = {isa = PBXBuildFile; fileRef = 20568DD417EBE9490022F314 /* player.c */; }; 20F6A1C317E95AAA00BAD261 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 20F6A1C217E95AAA00BAD261 /* main.c */; }; 20F6A1D517E95AD300BAD261 /* interface in Resources */ = {isa = PBXBuildFile; fileRef = 20F6A1C517E95AD300BAD261 /* interface */; }; 20F6A1D617E95AD300BAD261 /* net in Resources */ = {isa = PBXBuildFile; fileRef = 20F6A1D017E95AD300BAD261 /* net */; }; @@ -41,6 +43,10 @@ 002F3AF009D08F1000EBEB88 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/SDLMain.nib; sourceTree = ""; }; 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 20568DD217EBE9490022F314 /* game.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = game.c; path = ../game.c; sourceTree = SOURCE_ROOT; }; + 20568DD317EBE9490022F314 /* game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = game.h; path = ../game.h; sourceTree = SOURCE_ROOT; }; + 20568DD417EBE9490022F314 /* player.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = player.c; path = ../player.c; sourceTree = SOURCE_ROOT; }; + 20568DD517EBE9490022F314 /* player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = player.h; path = ../player.h; sourceTree = SOURCE_ROOT; }; 2090287B17E95E780051A253 /* timesynk_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timesynk_Prefix.pch; sourceTree = ""; }; 20F6A1C217E95AAA00BAD261 /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../main.c; sourceTree = SOURCE_ROOT; }; 20F6A1C417E95AD300BAD261 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../common.h; sourceTree = SOURCE_ROOT; }; @@ -74,6 +80,10 @@ isa = PBXGroup; children = ( 002F3A2B09D0888800EBEB88 /* SDLMain.h */, + 20568DD217EBE9490022F314 /* game.c */, + 20568DD317EBE9490022F314 /* game.h */, + 20568DD417EBE9490022F314 /* player.c */, + 20568DD517EBE9490022F314 /* player.h */, 002F3A2C09D0888800EBEB88 /* SDLMain.m */, ); name = Classes; @@ -215,6 +225,8 @@ 20F6A1C317E95AAA00BAD261 /* main.c in Sources */, 20F6A1F317E95B6F00BAD261 /* sdl.c in Sources */, 20F6A20317E95BC400BAD261 /* sockets.c in Sources */, + 20568DD617EBE9490022F314 /* game.c in Sources */, + 20568DD717EBE9490022F314 /* player.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };