Campbell Barton
9cf6e305a9
split bge includes for scons onto their own lines (for easier merging)
2013-05-29 21:56:55 +00:00
Campbell Barton
e1a54214bb
code cleanup:
...
- remove unused defines.
- quiet some shadow warnings.
- bevel, ifdef out some asserts that are too common.
- style
2013-03-25 02:41:30 +00:00
Campbell Barton
16b82845ee
code cleanup: add 'const' to headers to quiet msvc warnings, also remove (char *) casts that aren't needed now we're on Python3.3
2013-03-17 18:30:31 +00:00
Campbell Barton
7d585ed475
patch [ #34103 ] check_for_dupid.patch
...
from Lawrence D'Oliveiro (ldo)
- more comments
- more uses of bool type
- define symbol for length of in_use array in check_for_dupid
2013-03-10 05:46:24 +00:00
Brecht Van Lommel
4f3ca854e1
Fix various warnings with clang build, and adjust cmake clang warnings flags
...
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
Campbell Barton
9d4be17de4
style cleanup
2013-02-04 00:05:15 +00:00
Campbell Barton
9da4cab9fd
style cleanup: comment format
2013-02-02 04:48:21 +00:00
Mitchell Stokes
03df7e9a56
BGE: Fix for [ #33839 ] "a logic.joysticks Crashes BGE" reported by Josiah Lane (solarlune).
...
On a scene change the SCA_JoystickManager gets destroyed which in turn means all of it's joystick instances are released. Since SCA_PythonJoystick was just using a borrowed reference, this allowed the joystick to be freed. Now the joystick's refcount is incremented so that the SCA_PythonJoystick's joystick reference will survive across scene changes.
2013-01-12 05:44:08 +00:00
Mitchell Stokes
6a7a144f50
BGE: Fix for [ #33053 ] "2.6x Joystick Sensor Event: Axis fails to fire at full tilt" reported by Auuman Anubis (auuman_anubis).
...
The problem was that SCA_Joystick::pAxisTest() was using shorts, and tried to store abs(MIN_SHRT) in a short. However, on most systems MIN_SHRT == -32768 and MAX_SHRT == 32767. This means that abs(MIN_SHRT) > MAX_SHRT, and thus the short would overflow.
2013-01-06 23:11:12 +00:00
Mitchell Stokes
d0981c279b
BGE: Fixing a crash that occurred when LibLoading a scene with a 2D Filter Actuator. The actuator was still referencing the old scene.
2012-12-31 21:32:46 +00:00
Campbell Barton
4a427d8e0d
style cleanup
2012-12-29 01:54:58 +00:00
Mitchell Stokes
f2f2b6153a
BGE: Adding a Python interface for handling joysticks without needing logic bricks. These new SCA_PythonJoystick objects can be accessed using bge.logic.joysticks, which is a list of joysticks. The length of the list is the number of maximum supported joysticks, and indexes that do not have a joystick available are set to None. This means joysticks can be checked for using something like:
...
if bge.logic.joysticks[0]:
activate_player_one()
if bge.logic.joysticks[1]:
activate_player_two()
etc..
The interface exposed by SCA_PythonJoystick is very similar to the joystick logic brick except for one key difference: axis values are normalized to a -1.0 to 1.0 range instead of -32767 to 32767, which is what the logic brick exposed.
2012-12-21 02:28:59 +00:00
Bastien Montagne
ab2c273b12
Added GPL header to sconscripts!
...
Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes...
2012-12-17 08:01:43 +00:00
Campbell Barton
3fd388fb06
py api cleanup, replace use...
...
- PyLong_FromSsize_t --> PyLong_FromLong
- PyLong_AsSsize_t --> PyLong_AsLong
In all places except for those where python api expects PySsize_t (index lookups mainly).
- use PyBool_FromLong in a few areas of the BGE.
- fix incorrect assumption in the BGE that PySequence_Check() means PySequence_Fast_ functions can be used.
2012-11-21 02:28:36 +00:00
Campbell Barton
47068e88fb
BGE: fix for 2 uses of uninitialized memory - property-sensor and object-color for materials.
2012-11-11 10:03:25 +00:00
Campbell Barton
67b74f96da
- property sensor was converting floating point values to text then back to float - for floating point properties.
...
- IntValue's GetNumber() was convert int -> float -> double.
- BL_Shader was using STR_String rather then char*, where most callers had a char*, use a char* to avoid STR_String conversion-and-alloc on shader access.
2012-11-10 22:32:15 +00:00
Campbell Barton
936f0388e8
code cleanup: some warnings and formatting for PyMethodDef's in the BGE.
2012-11-10 05:42:50 +00:00
Campbell Barton
d25b13d13f
code cleanup: double promotion warnings, also allow cmake to build SDL without audaspace.
2012-11-09 16:15:00 +00:00
Campbell Barton
5549904171
style cleanup
2012-10-29 02:11:40 +00:00
Campbell Barton
aeba4950c3
style cleanup
2012-10-27 10:42:28 +00:00
Campbell Barton
f70d2c65d8
rename api functions...
...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
Campbell Barton
ddc2dbc2a4
style cleanup
2012-10-22 08:15:51 +00:00
Campbell Barton
d599b643b7
style cleanup: bge, switch statements mostly.
...
also left bmesh decimator on in previous commit.
2012-10-21 07:58:38 +00:00
Campbell Barton
f3ece5a108
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
2012-10-21 05:46:41 +00:00
Campbell Barton
4d4664d98f
code cleanup: check for msvc directly when using warning pragma's.
2012-10-15 02:15:07 +00:00
Campbell Barton
97d4fb4161
code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too.
2012-10-09 13:36:42 +00:00
Campbell Barton
2fb8292005
style cleanup
2012-09-16 04:58:18 +00:00
Campbell Barton
5d2e4bb87e
code cleanup: capitalize defines.
2012-09-06 01:31:15 +00:00
Campbell Barton
b96c622015
style cleanup
2012-08-11 22:12:32 +00:00
Campbell Barton
9b51503307
style cleanup
2012-07-21 22:58:08 +00:00
Campbell Barton
32cf7fcdb1
code cleanup: spelling
2012-07-16 23:23:33 +00:00
Campbell Barton
3a0593cc3d
code cleanup: dont use function calls like dot_v3v3, pow and sqrt within macros which results in calling the function multiple times needlessly.
...
also added some comments.
2012-07-06 22:48:28 +00:00
Mitchell Stokes
9f7db7f3ea
Fix for [ #31122 ] "Properties cant have Spaces in names when using interval as a evaluation. Or else it'll fail to activate actuator." reported by Auuman Anubis.
...
I cleaned up the INTERVAL check to do a much cleaner (and saner) range check that doesn't get messed up by spaces.
2012-07-05 20:34:42 +00:00
Campbell Barton
8b865c01cd
style cleanup: comments
2012-06-30 22:49:33 +00:00
Dalai Felinto
7016538974
bge.logic.keyboard.getClipboard() and .setClipboard methods
...
the idea of using methods instead of attributes is to avoid users abusing of the system calls.
Thanks Campbell Barton for reviewing and small corrections
2012-06-27 21:57:33 +00:00
Campbell Barton
cc0784c1b9
optionally use guarded alloc for tiles compositor, also replace allocation functions with a macro.
2012-06-25 09:14:37 +00:00
Campbell Barton
a744fed46c
style cleanup
2012-06-20 16:43:48 +00:00
Campbell Barton
f5f25b81e8
style cleanup:
...
also fix for building ghost test and fix double free in one of the tests
2012-06-17 09:58:26 +00:00
Campbell Barton
b5b8306685
code cleanup: includes, also correct some py example typos
2012-06-16 20:20:07 +00:00
Mitchell Stokes
298feff390
Committing patch [ #31704 ] "Patch to fix keyboard sensor from blocking quit game key binding" by Jay Parker. This patch fixes [ #31671 ] "Keyboard Sensor blocks Quit Game Key Binding"
2012-06-10 19:32:57 +00:00
Campbell Barton
d5032657ed
style cleanup
2012-06-06 22:38:39 +00:00
Campbell Barton
cb0b3558af
style cleanup
2012-06-05 22:12:17 +00:00
Campbell Barton
2d2d36fe3b
code cleanup:
...
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
Campbell Barton
9dd981a440
style cleanup: block comments
2012-05-16 23:37:23 +00:00
Bastien Montagne
2e89e0096a
Spell check fix (lenght -> length)
...
Note: two remains, in comments in extern/bullet2/src/LinearMath/btVector3.h and extern/libmv/libmv/image/tuple.h.
2012-05-16 14:25:25 +00:00
Campbell Barton
112162e09e
code cleanup: header cleanup
2012-04-30 14:24:11 +00:00
Sergey Sharybin
bb0a3e1d90
Game engine: pass string length to BLI_str_cursor_step_prev_utf8 rather than NULL
...
That's what this function expect (but somehow does not use) and it gave compilation
error when using gcc-4.6.3 from debian linux.
2012-04-11 13:17:13 +00:00
Thomas Dinges
c3fc0faae2
Game Engine:
...
* Scons compile fix for svn 45479.
2012-04-09 11:03:58 +00:00
Dalai Felinto
bcd6c84a66
bugfix [ #30760 ] edit text property bug
...
backspace was messing up with utf8 text.
hijacking Blender utf8 functions
tested in CMake but I think scons should work too. No idea about pure 'make'
Happy Easter ;)
2012-04-09 01:42:44 +00:00
Campbell Barton
07065b27b8
style cleanup
2012-03-28 05:03:24 +00:00