Skip to content

Commit

Permalink
Import from neverball-1.2.6a.tar.gz
Browse files Browse the repository at this point in the history
  • Loading branch information
rlk committed May 19, 2004
1 parent ad2a72f commit 81ac775
Show file tree
Hide file tree
Showing 19 changed files with 77 additions and 3,722 deletions.
1 change: 0 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ New in 1.2.6
* Changed image loading policy to support non-power-of-two images.
* Replaced Win32 makefile with VS.Net solution.
* Rewrote HUD to use new GUI handler.
* Removed obsolete text module and menu module.
* Added billboard objects to .SOL file.
* Policy change: .SOL files now go in same directory as .MAP files.
* Changed mapc to derive .SOL file name from .MAP file name.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ data/map-misc/%.sol : data/map-misc/%.map $(MAPC_TARG)

#------------------------------------------------------------------------------

#all : $(BALL_TARG) $(PUTT_TARG) $(MAPC_TARG) $(SOLS)
all : $(BALL_TARG) $(MAPC_TARG) $(SOLS)
all : $(BALL_TARG) $(PUTT_TARG) $(MAPC_TARG) $(SOLS)
#all : $(BALL_TARG) $(MAPC_TARG) $(SOLS)

$(BALL_TARG) : $(BALL_OBJS)
$(CC) $(CFLAGS) -o $(BALL_TARG) $(BALL_OBJS) $(BALL_LIBS)
Expand Down
16 changes: 11 additions & 5 deletions ball/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ static void game_draw_light(void)
glLightfv(GL_LIGHT1, GL_SPECULAR, light_c[1]);
}

static void game_draw_all(int pose, float rx, float ry, int d)
static void game_draw_all(int pose, float rx, float ry, int d, const float p[3])
{
const float *ball_p = file.uv->p;

Expand Down Expand Up @@ -391,7 +391,7 @@ static void game_draw_all(int pose, float rx, float ry, int d)
e[0] = +0;
e[1] = +1;
e[2] = +0;
e[3] = -0.001;
e[3] = -0.00001;

glEnable(GL_CLIP_PLANE0);
glClipPlane(GL_CLIP_PLANE0, e);
Expand All @@ -400,7 +400,7 @@ static void game_draw_all(int pose, float rx, float ry, int d)
/* Draw the floor. */

if (pose == 0) game_set_shadow(&file);
sol_draw(&file, config_get(CONFIG_SHADOW));
sol_draw(&file, config_get(CONFIG_SHADOW), p);
if (pose == 0) game_clr_shadow();

/* Draw the game elements. */
Expand Down Expand Up @@ -436,6 +436,12 @@ void game_draw(int pose, float st)
glPushMatrix();
{
float v[3], rx, ry;
float pup[3];
float pdn[3];

v_cpy(pup, view_p);
v_cpy(pdn, view_p);
pdn[1] = -pdn[1];

/* Compute and apply the view. */

Expand Down Expand Up @@ -470,7 +476,7 @@ void game_draw(int pose, float st)
glScalef(+1.f, -1.f, +1.f);

game_draw_light();
game_draw_all(pose, rx, ry, -1);
game_draw_all(pose, rx, ry, -1, pdn);
}
glPopMatrix();
glFrontFace(GL_CCW);
Expand All @@ -481,7 +487,7 @@ void game_draw(int pose, float st)
/* Draw the scene normally. */

game_draw_light();
game_draw_all(pose, rx, ry, +1);
game_draw_all(pose, rx, ry, +1, pup);
}
glPopMatrix();
config_pop_matrix();
Expand Down
156 changes: 0 additions & 156 deletions data/.neverballhs-easy

This file was deleted.

156 changes: 0 additions & 156 deletions data/.neverballhs-hard

This file was deleted.

0 comments on commit 81ac775

Please sign in to comment.