made min global, changes for mingw builds
This commit is contained in:
parent
19b467443b
commit
45dc909b4b
4 changed files with 7 additions and 7 deletions
|
@ -35,6 +35,9 @@
|
|||
#define FILE_PREFIX PREFIX "/share/taisei/"
|
||||
#define CONFIG_FILE "config"
|
||||
|
||||
#undef min
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
enum {
|
||||
RESX = 800,
|
||||
RESY = 600,
|
||||
|
|
|
@ -209,9 +209,8 @@ int collision_line(complex a, complex b, complex c, float r) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static float min(float a, float b) {
|
||||
return a < b ? a : b;
|
||||
}
|
||||
#undef min
|
||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||
|
||||
int collision_laser_curve(Laser *l) {
|
||||
float s = (global.frames - l->birthtime)*l->speed + l->timeshift;
|
||||
|
|
|
@ -33,8 +33,6 @@ void create_stage_menu(MenuData *m) {
|
|||
add_menu_entry(m, "Back", backtomain, m);
|
||||
}
|
||||
|
||||
float min(float a, float b) { return a < b? a : b; }
|
||||
|
||||
void draw_stage_menu(MenuData *m) {
|
||||
draw_options_menu_bg(m);
|
||||
|
||||
|
|
|
@ -25,12 +25,12 @@ void add_model(Stage3D *s, SegmentDrawRule draw, SegmentPositionRule pos) {
|
|||
s->models[s->msize - 1].pos = pos;
|
||||
}
|
||||
|
||||
void set_perspective(Stage3D *s, float near, float far) {
|
||||
void set_perspective(Stage3D *s, float n, float f) {
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
|
||||
glLoadIdentity();
|
||||
glTranslatef(-(VIEWPORT_W/2.0)/SCREEN_W, 0, 0);
|
||||
gluPerspective(s->projangle, 1, near, far);
|
||||
gluPerspective(s->projangle, 1, n, f);
|
||||
glTranslatef(VIEWPORT_X+VIEWPORT_W/2.0, VIEWPORT_Y+VIEWPORT_H/2.0, 0);
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
|
Loading…
Reference in a new issue