Added conditions to add compiler/linker flags from user's environemnt if they have any set; make sure gl functions are not called before OpenGL is initialised, when fullscreen switching; use new 3 argument mouse_get_delta to avoid compiler errors
This commit is contained in:
parent
e150919deb
commit
a6e1a5c332
|
@ -1,5 +1,9 @@
|
|||
D1X-Rebirth Changelog
|
||||
|
||||
20070530
|
||||
--------
|
||||
SConstruct, arch/ogl/gr.c, ui/window.c: Added conditions to add compiler/linker flags from user's environemnt if they have any set; make sure gl functions are not called before OpenGL is initialised, when fullscreen switching; use new 3 argument mouse_get_delta to avoid compiler errors
|
||||
|
||||
20070516
|
||||
--------
|
||||
main/game.c, main/inferno.c, main/newmenu.c: free grabbed mouse in Demo Playback; improved Player-files deletion
|
||||
|
|
24
SConstruct
24
SConstruct
|
@ -3,6 +3,7 @@
|
|||
# needed imports
|
||||
import sys
|
||||
import os
|
||||
import SCons.Util
|
||||
|
||||
PROGRAM_NAME = 'D1X-Rebirth'
|
||||
|
||||
|
@ -333,6 +334,17 @@ if sdlmixer:
|
|||
if (D1XMICRO):
|
||||
env.Append(CPPDEFINES = [('D1XMICRO', '\\"' + str(D1XMICRO) + '\\"')])
|
||||
|
||||
# Get traditional compiler environment variables
|
||||
if os.environ.has_key('CC'):
|
||||
env['CC'] = os.environ['CC']
|
||||
if os.environ.has_key('CFLAGS'):
|
||||
env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
|
||||
if os.environ.has_key('CXX'):
|
||||
env['CXX'] = os.environ['CXX']
|
||||
if os.environ.has_key('CXXFLAGS'):
|
||||
env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
|
||||
if os.environ.has_key('LDFLAGS'):
|
||||
env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
|
||||
|
||||
# windows or *nix?
|
||||
if sys.platform == 'win32':
|
||||
|
@ -473,6 +485,16 @@ Help(PROGRAM_NAME + ', SConstruct file help:' +
|
|||
'gp2x=1' compile for GP2X handheld
|
||||
|
||||
Default values:
|
||||
""" + ' sharepath = ' + DATA_DIR + '\n')
|
||||
""" + ' sharepath = ' + DATA_DIR + """
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
CFLAGS C compiler flags
|
||||
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
|
||||
nonstandard directory <lib dir>
|
||||
<include dir>
|
||||
CXX C++ compiler command
|
||||
CXXFLAGS C++ compiler flags
|
||||
""")
|
||||
|
||||
#EOF
|
||||
|
|
|
@ -66,7 +66,7 @@ void gr_do_fullscreen(int f){
|
|||
int gr_toggle_fullscreen(void){
|
||||
gr_do_fullscreen(!ogl_fullscreen);
|
||||
|
||||
if (Screen_mode != SCREEN_GAME) // update viewing values for menus
|
||||
if (gl_initialized && Screen_mode != SCREEN_GAME) // update viewing values for menus
|
||||
{
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
|
|
|
@ -386,7 +386,7 @@ int ui_get_idle_seconds()
|
|||
|
||||
void ui_mega_process()
|
||||
{
|
||||
int mx, my;
|
||||
int mx, my, mz;
|
||||
unsigned char k;
|
||||
|
||||
#ifdef __LINUX__
|
||||
|
@ -395,7 +395,7 @@ void ui_mega_process()
|
|||
switch( Record )
|
||||
{
|
||||
case 0:
|
||||
mouse_get_delta( &mx, &my );
|
||||
mouse_get_delta( &mx, &my, &mz );
|
||||
Mouse.new_dx = mx;
|
||||
Mouse.new_dy = my;
|
||||
Mouse.new_buttons = mouse_get_btns();
|
||||
|
@ -426,7 +426,7 @@ void ui_mega_process()
|
|||
ui_event_counter++;
|
||||
}
|
||||
|
||||
mouse_get_delta( &mx, &my );
|
||||
mouse_get_delta( &mx, &my, &mz );
|
||||
MouseDX = mx;
|
||||
MouseDY = my;
|
||||
MouseButtons = mouse_get_btns();
|
||||
|
|
Loading…
Reference in a new issue