kts
|
b3a3831cd2
|
Added EquipTile/EQUIP. This distinguishes equipable items such as weapons, armour, rings, etc., from non-equipables such as keys and the like.
|
2013-11-27 18:31:49 -08:00 |
kts
|
4b7e0db3e0
|
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 |
kts
|
8893eb35d4
|
Did a hack to get transparency working on big endian systems - basically it grabs a portion of the pixel color value and uses that for alpha. This is terrible, but I did not want to waste time trying to figure out what was wrong, as it is more of a tertiary feature. Beyond that, added a new font_mini.png spritesheet that contains an 8x8 ASCII font. This is currently used in the new UI messages system, which is basically a window that is drawn over the map with the current in-games messages. At some point this will be split into two different categories, one from the PC perspective and the other from the player perspective (e.g., 'you bludgeon the nupi' - '4 damage (1d6+1)'). Also added a new Font struct that contains: int width, int height, SDL_Surface *spritesheet, float scale_x, float scale_y, and SDL_Surface *scaled_spritesheet. Helper function added of loadFontFromMemory(struct Font *font, unsigned char *memory, unsigned int length, int font_width, int font_height) - this creates a new SDL_Surface from the passed memory and sets the passed font's surface to it along with the width and height. Also added was a setFontScale(struct Font *font, float scale_x, float scale_y) - this calls interfaceScaleSurface on the font's spritesheet and sets scaled_spritesheet to point to that new surface. For the time being, the new font is used through interfaceDrawStringF and interfaceDrawCharF, two functions that closely match their normal counterparts, but instead use a passed font and its values for drawing. The normal draw char/string functions will likely be replaced with the new ones.
|
2013-11-14 03:03:10 -08:00 |
kts
|
0c24fedfb2
|
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 |
kts
|
29cdd11ec8
|
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 |
kts
|
45ebcfe970
|
Added a temporary font spritesheet and the ability to interfacePrint in SDL with aforementioned font. This simply works by getting the numerical offset of the ASCII character value within the spritesheet (same principle as the rest of the tiles). In the future SDL_ttf will be used, but for the time being this will suffice.
|
2013-10-17 19:38:00 -07:00 |
kts
|
4c204db4f3
|
Added support for doors. A DoorTile is a fairly basic tile - at the moment - sporting a state int to specify its current state via STATE_OPEN, STATE_CLOSED, STATE_BROKEN, or STATE_MISSING. Graphically/ascii-ly, the proper visual appearance is acquired by multiplying the door id by the total door states(4) and adding the current state value to the result. For example, for a door with the id of 0, you would have visual tile 0 for closed, 1 for open, 2 for broken, and 3 for missing. Beyond the doors, the curses tiles were moved from interface/curses.(c/h) to tiles/curses_tiles.(c/h) - they should, at some point, be generated in a similar manner to the tiles for the SDL client (using pack_tiles).
|
2013-10-17 15:11:29 -07:00 |
kts
|
33ab0f2af2
|
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 |
kts
|
6e414d9223
|
Who knows what has been added! As far as I recall, *context(s) were tweaked, added compiled-in graphics for the SDL client, and probably some other stuff.
|
2013-10-14 19:21:33 -07:00 |