Commit Graph

4 Commits (master)

Author SHA1 Message Date
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 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
kts 1f973fc865 Added basic player movement through playerMove(direction, distance). Also added an interface through which player commands are attached to a command id, so as to allow for functions to be called via a command id or, if later implemented, a string. Finally, implemented the moving of an @ in curses or a square in SDL via the arrow keys. 2013-09-19 22:45:19 -07:00
kts 0c5dc4c822 Initial commit, contains a barebones structure with the interface for both (x)curses and SDL. Can be built via the Makefile or via the XCode project in the xcode/ subdirectory 2013-09-17 22:37:36 -07:00