Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bugfixing:

 * SDL initialisation was broken (but worked)
 * Attacking other creatures was broken (and didn't work) since 205. 


git-svn-id: http://infon.googlecode.com/svn/trunk@214 8171fb75-e542-0410-96e4-03d5dd800671
  • Loading branch information...
commit 81aa364afa6f1fb30b50cc038233ddb419bb96df 1 parent 86b2891
@dividuum authored
Showing with 2 additions and 4 deletions.
  1. +1 −1  creature.c
  2. +0 −1  gl_video.c
  3. +1 −2  sdl_video.c
View
2  creature.c
@@ -306,7 +306,7 @@ static int attack_distance[CREATURE_TYPES][CREATURE_TYPES] = {
};
int creature_attack_distance(const creature_t *creature, const creature_t *target) {
- return attack_distance[creature->type][CREATURE_TYPES];
+ return attack_distance[creature->type][target->type];
}
void creature_do_attack(creature_t *creature, int delta) {
View
1  gl_video.c
@@ -77,7 +77,6 @@ void video_setup_opengl(int width, int height) {
void video_init(int w, int h, int fs) {
if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1)
- if (SDL_Init(0) == -1)
die("Couldn't initialize SDL: %s", SDL_GetError());
if (fs)
View
3  sdl_video.c
@@ -39,8 +39,7 @@ static sge_bmpFont *font;
static char tiny_font[1792]; // XXX Hardcoded
void video_init(int w, int h, int fs) {
- if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1)
- if (SDL_Init(0) == -1)
+ if (SDL_Init(SDL_INIT_VIDEO) == -1)
die("Couldn't initialize SDL: %s", SDL_GetError());
const SDL_VideoInfo *vi = SDL_GetVideoInfo();
Please sign in to comment.
Something went wrong with that request. Please try again.