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
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
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
47068e88fb
BGE: fix for 2 uses of uninitialized memory - property-sensor and object-color for materials.
2012-11-11 10:03:25 +00:00
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
936f0388e8
code cleanup: some warnings and formatting for PyMethodDef's in the BGE.
2012-11-10 05:42:50 +00:00
d25b13d13f
code cleanup: double promotion warnings, also allow cmake to build SDL without audaspace.
2012-11-09 16:15:00 +00:00
5549904171
style cleanup
2012-10-29 02:11:40 +00:00
aeba4950c3
style cleanup
2012-10-27 10:42:28 +00:00
f70d2c65d8
rename api functions...
...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
ddc2dbc2a4
style cleanup
2012-10-22 08:15:51 +00:00
d599b643b7
style cleanup: bge, switch statements mostly.
...
also left bmesh decimator on in previous commit.
2012-10-21 07:58:38 +00:00
f3ece5a108
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
2012-10-21 05:46:41 +00:00
4d4664d98f
code cleanup: check for msvc directly when using warning pragma's.
2012-10-15 02:15:07 +00:00
97d4fb4161
code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too.
2012-10-09 13:36:42 +00:00
2fb8292005
style cleanup
2012-09-16 04:58:18 +00:00
5d2e4bb87e
code cleanup: capitalize defines.
2012-09-06 01:31:15 +00:00
b96c622015
style cleanup
2012-08-11 22:12:32 +00:00
9b51503307
style cleanup
2012-07-21 22:58:08 +00:00
32cf7fcdb1
code cleanup: spelling
2012-07-16 23:23:33 +00:00
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
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
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
cc0784c1b9
optionally use guarded alloc for tiles compositor, also replace allocation functions with a macro.
2012-06-25 09:14:37 +00:00
a744fed46c
style cleanup
2012-06-20 16:43:48 +00:00
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
b5b8306685
code cleanup: includes, also correct some py example typos
2012-06-16 20:20:07 +00:00
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
d5032657ed
style cleanup
2012-06-06 22:38:39 +00:00
cb0b3558af
style cleanup
2012-06-05 22:12:17 +00:00
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
9dd981a440
style cleanup: block comments
2012-05-16 23:37:23 +00:00
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
112162e09e
code cleanup: header cleanup
2012-04-30 14:24:11 +00:00
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
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
07065b27b8
style cleanup
2012-03-28 05:03:24 +00:00
b8a71efeba
style cleanup: follow style guide for/with/if spacing
2012-03-24 07:52:14 +00:00
81d8f17843
style cleanup: pep8, indentation
2012-03-24 07:36:32 +00:00
4f19c1a995
spelling cleanup
2012-03-18 07:38:51 +00:00
c21c58f44c
style cleanup, also remove unused externs.
2012-03-11 19:09:01 +00:00
89a963fb7f
style cleanup: comment blocks
2012-03-09 18:28:30 +00:00
4f7bdc59d3
style cleanup: spelling.
...
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
640d766370
style cleanup - remove unneeded ';'s
2012-03-08 03:05:57 +00:00
f6ae27daef
style cleanup - comment spelling + translate some dutch.
2012-03-04 04:35:12 +00:00
7bbf4b7831
style cleanup
...
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
ea13ec1699
Spelling Cleanup
2012-03-01 12:20:18 +00:00
7cc206ddca
Code Cleanup: remove non existing function declarations.
...
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
2012-02-29 15:00:37 +00:00