devcpp
|
sockets now work on windows, also discovered that echo is completely broken between timesynk instances running on multiple systems - telnet works fine still tho. Will have to recode netcode to see what's wrong. Also added sendall function which should guarantee the send()ing of a buffer (no waiting).
|
2013-11-07 01:11:49 -08:00 |
interface
|
NULL wasn't declared on non-xcode environment, so string.h was included (over stddef.h, as sprintf was required). Inventory window, such as it is, is created according to the max_slots/slots_per_row properties of the Inventory, thus adjusting for larger inventories. The current item's name is now shown at the center-bottom of the window. Dropping items is also tidier, as the inventory->selected property is adjusted if it is equal to count (i.e., the selected cursor is pushed back when the last item is removed so selected always corresponds to an existing item).
|
2013-11-16 16:15:22 -08:00 |
net
|
sockets now work on windows, also discovered that echo is completely broken between timesynk instances running on multiple systems - telnet works fine still tho. Will have to recode netcode to see what's wrong. Also added sendall function which should guarantee the send()ing of a buffer (no waiting).
|
2013-11-07 01:11:49 -08:00 |
tiles
|
Added rudimentary Inventory display, however we must have some way to keep track of the selected item in inventory offset. Perhaps through a global variable or, if it must be done, through a new Inventory struct that contains pertinent information. It should likely be the latter, so the same system can be expanded to chests and the like. Also added the ITEM type in general.
|
2013-11-16 02:15:03 -08:00 |
xcode
|
We now have a mostly working inventory system. Items can be picked up via ` and dropped using ` within the inventory. Currently using a new playerPickup() function, but it should be abstracted to a tilePickup(struct Tile *tile) function so that npcs, etc., can share in the fun.
|
2013-11-16 04:41:06 -08:00 |
.DS_Store
|
…
|
|
COMPILING.txt
|
Modified the devcpp projects to incorporate the many changes that have occurred since the last devcpp update. Also had to initialize the next and prev properties of Tiles created by newTile, as the generated executable segfaulted due to non-initialized pointers.
|
2013-10-19 23:28:31 -07:00 |
Makefile
|
We now have a mostly working inventory system. Items can be picked up via ` and dropped using ` within the inventory. Currently using a new playerPickup() function, but it should be abstracted to a tilePickup(struct Tile *tile) function so that npcs, etc., can share in the fun.
|
2013-11-16 04:41:06 -08:00 |
NOTES
|
Map now resides on a multidimensional array titled map_matrix. This stores the Tiles in a Stack structure at each cell - I believe this should instead be changed so that each Tile instead has pointers to the previous and next Tiles, so that the map_matrix only holds Tile pointers rather than Stack structs containing some variable amount of Tile pointers. Also added a visible_matrix that denotes what tiles are visible to the player. This is simply a multi-dimensional array of ints that act as bit fields for various flags (such as TILE_VISIBLE, TILE_CAN_SEE, TILE_LIGHT_ONE, TILE_LIGHT_TWO, etc. - multiple light flags can be concatted to provide a broad array of light levels).
|
2013-09-28 20:50:52 -07:00 |
common.h
|
Added much code for the foundation of the netcode. Server automatically starts on port 31337 and runs as a separate thread in the SDL client. This TCP server functions as a basic echo server and can be connected to thru telnet or by typing 'connect 127.0.0.1 31337' in timesynk's console. Once connected, the echo functionality can be tested by using console command 'send my message goes here'. Somewhat buggy and crashses on occasion - suspected cause is consoleLog()ing a string that is not properly nul terminated, resulting in reading memory out of bounds. Curses client does not run the server properly at the moment, probably due to using select on server, clients, and stdin when combined with ncurses - will look into this later.
|
2013-11-06 23:40:19 -08:00 |
console.c
|
Moved a portion of the user messages (e.g., 'You open the %s.') to various #define MESSAGE_* in message.h. Also fixed the bug I never looked into where entries in consoleLog would read past the string into neighboring memory - this was due to using strlen(string) for the byte-length in memcpy, as strlen does not count the terminating character '\0'. Fixed by adding +1 to the return value of strlen
|
2013-11-14 16:21:53 -08:00 |
console.h
|
Added much code for the foundation of the netcode. Server automatically starts on port 31337 and runs as a separate thread in the SDL client. This TCP server functions as a basic echo server and can be connected to thru telnet or by typing 'connect 127.0.0.1 31337' in timesynk's console. Once connected, the echo functionality can be tested by using console command 'send my message goes here'. Somewhat buggy and crashses on occasion - suspected cause is consoleLog()ing a string that is not properly nul terminated, resulting in reading memory out of bounds. Curses client does not run the server properly at the moment, probably due to using select on server, clients, and stdin when combined with ncurses - will look into this later.
|
2013-11-06 23:40:19 -08:00 |
context.c
|
NULL wasn't declared on non-xcode environment, so string.h was included (over stddef.h, as sprintf was required). Inventory window, such as it is, is created according to the max_slots/slots_per_row properties of the Inventory, thus adjusting for larger inventories. The current item's name is now shown at the center-bottom of the window. Dropping items is also tidier, as the inventory->selected property is adjusted if it is equal to count (i.e., the selected cursor is pushed back when the last item is removed so selected always corresponds to an existing item).
|
2013-11-16 16:15:22 -08:00 |
context.h
|
Added some rudimentary UI related stuff: ui.png with the first 32x32 section being a hotbar item; uiDraw(), which draws hotbar_count(value to be controlled by amount of items w/ slots the player has (e.g., belt, slotted glove, etc.)) amount of hotbar item images at partial translucency. Also added hitting 'i' to switch to/draw the inventoryContext - at the moment, it does nothing more than cause an SDL_Rect to be drawn and switch to inventoryContext (which does nothing in itself).
|
2013-11-11 02:35:47 -08:00 |
controller.h
|
interfacePrint is no longer directly called in non-interface contexts, but rather is handled by a messaging system. When one tile wishes to tell another tile a message, whether that be for descriptive purposes such as opening a door or otherwise, messageTile(Tile *sender, Tile *recipient, const char *message) is called. Within that, if the recipient->tid is PLAYER, then it calls interfacePrint. This will later be modified to check if the recipient->data->controller matches the actual user's controller (thus tying messages to particular users only). Also added was the basic struct for controller, but it is thus far unused in actual game code. The Controller will be used once a basic network/game structure is in order.
|
2013-11-03 22:53:13 -08:00 |
display.h
|
As per usual, added a bunch of stuff and remember almost none of them. Most importantly, a console interface has been added that can be summoned by pressing the tilde key. Much of the functionality, including the less-than-stellar associative array (that acts as a function pointer) was ripped from the noirchat project. The only important commands are 'quit' and, for SDL, 'set_video widthxheight 0|1', with 0 representing windowed and 1 representing fullscreen. Both the curses and SDL client now have camera offsets, allowing for the center of the screen to always be centered on the player. There are plans to have the camera offset be relative to the distance from the edges of the map (so if the player is 25% from the left-side of the map, the camera offset would be 25% off center). Really in need of code clean-up and reorganization.
|
2013-10-22 02:49:25 -07:00 |
game.c
|
We now have a mostly working inventory system. Items can be picked up via ` and dropped using ` within the inventory. Currently using a new playerPickup() function, but it should be abstracted to a tilePickup(struct Tile *tile) function so that npcs, etc., can share in the fun.
|
2013-11-16 04:41:06 -08:00 |
game.h
|
Added much code for the foundation of the netcode. Server automatically starts on port 31337 and runs as a separate thread in the SDL client. This TCP server functions as a basic echo server and can be connected to thru telnet or by typing 'connect 127.0.0.1 31337' in timesynk's console. Once connected, the echo functionality can be tested by using console command 'send my message goes here'. Somewhat buggy and crashses on occasion - suspected cause is consoleLog()ing a string that is not properly nul terminated, resulting in reading memory out of bounds. Curses client does not run the server properly at the moment, probably due to using select on server, clients, and stdin when combined with ncurses - will look into this later.
|
2013-11-06 23:40:19 -08:00 |
helper.c
|
Due to various errors on windows, along with much rage, it was decided that it is far more sensible for consoleGetCommand to simply return command[0] as the command string and command[1] as the remainder, leaving the task of distinguishing one argument from another to the function that consoleProcessCommand passes it to. This is, of course, up for remodeling in the future (possibly by using a variable amount of arguments such as in printf), but for now it'll do. Also added C preprocessor conditions for strndup to allow on Win*.
|
2013-10-23 21:05:29 -07:00 |
helper.h
|
Due to various errors on windows, along with much rage, it was decided that it is far more sensible for consoleGetCommand to simply return command[0] as the command string and command[1] as the remainder, leaving the task of distinguishing one argument from another to the function that consoleProcessCommand passes it to. This is, of course, up for remodeling in the future (possibly by using a variable amount of arguments such as in printf), but for now it'll do. Also added C preprocessor conditions for strndup to allow on Win*.
|
2013-10-23 21:05:29 -07:00 |
inventory.c
|
NULL wasn't declared on non-xcode environment, so string.h was included (over stddef.h, as sprintf was required). Inventory window, such as it is, is created according to the max_slots/slots_per_row properties of the Inventory, thus adjusting for larger inventories. The current item's name is now shown at the center-bottom of the window. Dropping items is also tidier, as the inventory->selected property is adjusted if it is equal to count (i.e., the selected cursor is pushed back when the last item is removed so selected always corresponds to an existing item).
|
2013-11-16 16:15:22 -08:00 |
inventory.h
|
We now have a mostly working inventory system. Items can be picked up via ` and dropped using ` within the inventory. Currently using a new playerPickup() function, but it should be abstracted to a tilePickup(struct Tile *tile) function so that npcs, etc., can share in the fun.
|
2013-11-16 04:41:06 -08:00 |
main.c
|
Added tile scaling via interfaceSetScale. This currently modifies the various spritesheet->Surface(s) loaded from tiles.c/pack_tiles, but they should modify live alternatives, so that changes always start from the original surfaces. Also created shading on the rock wall, created a new palisade wall, and also fixed/prettified the current doors.
|
2013-11-10 01:01:07 -08:00 |
main.h
|
Added tile scaling via interfaceSetScale. This currently modifies the various spritesheet->Surface(s) loaded from tiles.c/pack_tiles, but they should modify live alternatives, so that changes always start from the original surfaces. Also created shading on the rock wall, created a new palisade wall, and also fixed/prettified the current doors.
|
2013-11-10 01:01:07 -08:00 |
map.c
|
Fixed some leaks and re-enabled freeMap.
|
2013-11-10 02:06:17 -08:00 |
map.h
|
Some minor tweaks made, majority of which I have forgotten already. DoorTile will soon be migrated to a generic TriggerTile type, in which it will exist as a DOOR subtype.
|
2013-10-23 18:58:17 -07:00 |
message.c
|
NULL wasn't declared on non-xcode environment, so string.h was included (over stddef.h, as sprintf was required). Inventory window, such as it is, is created according to the max_slots/slots_per_row properties of the Inventory, thus adjusting for larger inventories. The current item's name is now shown at the center-bottom of the window. Dropping items is also tidier, as the inventory->selected property is adjusted if it is equal to count (i.e., the selected cursor is pushed back when the last item is removed so selected always corresponds to an existing item).
|
2013-11-16 16:15:22 -08:00 |
message.h
|
We now have a mostly working inventory system. Items can be picked up via ` and dropped using ` within the inventory. Currently using a new playerPickup() function, but it should be abstracted to a tilePickup(struct Tile *tile) function so that npcs, etc., can share in the fun.
|
2013-11-16 04:41:06 -08:00 |
npc.c
|
Added basic NPC/monster functionality as well as a console system. Simply call ConsoleLog(&string) and it'll create a new ConsoleEntry, set the console_last_entry's next to it, set the new entry's prev to console_last_entry, and finally set console_last_entry to point to the new entry (functions very similarly to Tile Chains). This may later be changed to an array form so as to easily pull sections of the log from anywhere.
|
2013-10-19 22:56:46 -07:00 |
npc.h
|
Added basic NPC/monster functionality as well as a console system. Simply call ConsoleLog(&string) and it'll create a new ConsoleEntry, set the console_last_entry's next to it, set the new entry's prev to console_last_entry, and finally set console_last_entry to point to the new entry (functions very similarly to Tile Chains). This may later be changed to an array form so as to easily pull sections of the log from anywhere.
|
2013-10-19 22:56:46 -07:00 |
pack_tiles.c
|
Added rudimentary Inventory display, however we must have some way to keep track of the selected item in inventory offset. Perhaps through a global variable or, if it must be done, through a new Inventory struct that contains pertinent information. It should likely be the latter, so the same system can be expanded to chests and the like. Also added the ITEM type in general.
|
2013-11-16 02:15:03 -08:00 |
player.c
|
We now have a mostly working inventory system. Items can be picked up via ` and dropped using ` within the inventory. Currently using a new playerPickup() function, but it should be abstracted to a tilePickup(struct Tile *tile) function so that npcs, etc., can share in the fun.
|
2013-11-16 04:41:06 -08:00 |
player.h
|
NULL wasn't declared on non-xcode environment, so string.h was included (over stddef.h, as sprintf was required). Inventory window, such as it is, is created according to the max_slots/slots_per_row properties of the Inventory, thus adjusting for larger inventories. The current item's name is now shown at the center-bottom of the window. Dropping items is also tidier, as the inventory->selected property is adjusted if it is equal to count (i.e., the selected cursor is pushed back when the last item is removed so selected always corresponds to an existing item).
|
2013-11-16 16:15:22 -08:00 |
stubs.h
|
Added tile scaling via interfaceSetScale. This currently modifies the various spritesheet->Surface(s) loaded from tiles.c/pack_tiles, but they should modify live alternatives, so that changes always start from the original surfaces. Also created shading on the rock wall, created a new palisade wall, and also fixed/prettified the current doors.
|
2013-11-10 01:01:07 -08:00 |
tile.c
|
NULL wasn't declared on non-xcode environment, so string.h was included (over stddef.h, as sprintf was required). Inventory window, such as it is, is created according to the max_slots/slots_per_row properties of the Inventory, thus adjusting for larger inventories. The current item's name is now shown at the center-bottom of the window. Dropping items is also tidier, as the inventory->selected property is adjusted if it is equal to count (i.e., the selected cursor is pushed back when the last item is removed so selected always corresponds to an existing item).
|
2013-11-16 16:15:22 -08:00 |
tile.h
|
NULL wasn't declared on non-xcode environment, so string.h was included (over stddef.h, as sprintf was required). Inventory window, such as it is, is created according to the max_slots/slots_per_row properties of the Inventory, thus adjusting for larger inventories. The current item's name is now shown at the center-bottom of the window. Dropping items is also tidier, as the inventory->selected property is adjusted if it is equal to count (i.e., the selected cursor is pushed back when the last item is removed so selected always corresponds to an existing item).
|
2013-11-16 16:15:22 -08:00 |
wall.c
|
Added tile scaling via interfaceSetScale. This currently modifies the various spritesheet->Surface(s) loaded from tiles.c/pack_tiles, but they should modify live alternatives, so that changes always start from the original surfaces. Also created shading on the rock wall, created a new palisade wall, and also fixed/prettified the current doors.
|
2013-11-10 01:01:07 -08:00 |
wall.h
|
Renamed binary_to_c to pack_tiles and made it convert tiles/*.png to various char arrays in tiles/tiles.c and tiles/tiles.h. Added fully functional graphical tiles to the SDL client by using the tile's id and tid to point to the appropriate arrays in tiles.c/tiles.h. Also added proper displaying of multiple tiles on a tile chain, tile movement via gameMoveTile, tile line drawing via drawLine, along with other touch-ups
|
2013-10-15 18:54:23 -07:00 |