Commit Graph

434 Commits

Author SHA1 Message Date
ptitSeb
86ef2fee09 Restrict the Eps precision change only to Pandora platform 2016-04-23 19:13:44 +02:00
ptitSeb
07e64e787e Don't regulate Framerate on Pandora 2016-04-23 19:13:17 +02:00
Tan Wang Leng
4db3022cbd Fix mouse wheel for switching weapons
This fixes #32. Strictly follows the Win32 version.
2016-04-23 19:12:28 +02:00
ptitSeb
b6d54121a5 Restrict the Eps precision change only to Pandora platform 2016-04-23 18:56:18 +02:00
ptitSeb
90e408e02c Don't regulate Framerate on Pandora 2016-04-23 18:55:14 +02:00
Tan Wang Leng
65d8d44f0e Fix mouse wheel for switching weapons
This fixes #32. Strictly follows the Win32 version.
2016-04-23 10:49:07 -04:00
ptitSeb
dca5b7a6ac Merge branch 'master' of https://github.com/ptitSeb/Serious-Engine
Conflicts:
	Sources/Engine/Base/Types.h
	Sources/Engine/Engine.h
2016-04-22 23:04:19 +02:00
ptitSeb
bbb184aad7 More macro for UNIPTR_MAX 2016-04-22 22:03:07 +02:00
ptitSeb
df3592c88c Need __STDC_LIMIT_MACROS macro here too 2016-04-22 22:03:06 +02:00
ptitSeb
c15a2ce2b3 Nedd __STDC_LIMIT_MACROS for *_MAX constant to be defined 2016-04-22 22:03:06 +02:00
ptitSeb
c6415f84b5 Don't regulate Framerate on Pandora 2016-04-22 22:03:05 +02:00
ptitSeb
e1921174d4 Restrict the Eps precision change only to Pandora platform 2016-04-22 22:03:05 +02:00
ptitSeb
c32b7cc829 fix Inverted Right and Middle button on certain case with SDL 2016-04-22 22:03:04 +02:00
ptitSeb
b4e43fac95 Lower Epsilonon Pandora 2016-04-22 22:03:03 +02:00
Joshua Scoggins
88a0ec269b Use stdint.h everywhere since Serious Engine requires MSVC 2013 or greater (#40) 2016-04-22 13:57:32 -04:00
Rohit Nirmal
cb3f3bf521 Use those other averages. (#41) 2016-04-22 13:57:04 -04:00
Ryan C. Gordon
7213794459 Merge pull request #38 from DanielGibson/fix-FloatToInt
Fix for FloatToInt
2016-04-21 23:00:03 -04:00
Ryan C. Gordon
10395909e8 Merge pull request #39 from notaz/asm_fixes
Asm fixes
2016-04-21 22:46:07 -04:00
Daniel Gibson
1f23f37b36 CMakeLists.txt: suppress some warnings also for gcc, not only clang
also, check for AppleClang, not only Clang.
2016-04-22 04:27:29 +02:00
Daniel Gibson
c74fa69bf6 gcc told me copysignf() in FloatToInt() didn't do anything. oops.
sometimes using GCC *does* find problems clang didn't :)
2016-04-22 04:27:29 +02:00
notaz
52c178718c fix SoundMixer asm
SoundMixer386.asm forgot to save some callee-save registers too
2016-04-22 02:29:47 +03:00
notaz
b1837c2e58 fix Graphics asm
same stuff as in previous commit
2016-04-22 02:29:30 +03:00
notaz
a1b84b3ba0 Revert "fix build on gcc 4.8"
This reverts commit 8bbe4c1d5e.
Going to fix it properly.
2016-04-22 02:29:30 +03:00
notaz
fd045e5025 fix LayerMixer asm
- clobber the whole x87 state for mmx (emms alone requires this)
- add all modified registers to clobber list
  (in some cases use dummy output vars instead)
- use symbolic names
- use more relaxed constraints where possible
- allow gcc to allocate ebx replacement reg
2016-04-22 02:28:42 +03:00
notaz
cb69bd3cdd add some asm helpers 2016-04-22 02:28:41 +03:00
Ryan C. Gordon
fd52a044d4 Merge pull request #36 from DrItanium/abstraction-layer
Abstraction layer
2016-04-21 12:40:44 -04:00
Ryan C. Gordon
e64199441a Merge pull request #31 from DanielGibson/more-64bit-fixes
More 64bit fixes
2016-04-21 12:31:05 -04:00
Daniel Gibson
a28a7bb00f now TFE builds on OSX, too 2016-04-21 17:46:44 +02:00
Daniel Gibson
2a58209487 Some cmake fixes, fixing OSX build (incl 64bit) + disable i386ASM by default
OSX build was a bit broken, it needs to be linked against zlib.
Furthermore it now uses the systems libSDL2 framework, unless you use
-DUSE_SYSTEM_SDL2=FALSE

i386 ASM is now disabled by default, we have plain C fallbacks for
everything that seems to work well enough (and if not they need more
testing which is likely to happen this way)
2016-04-21 17:40:42 +02:00
Daniel Gibson
64e6b915b7 Fix out of bounds access of afStarsPositions in TFE Particles.cpp
same as before for EntitiesMP/Common/Particles.cpp, this time for
the first encounter.
2016-04-21 16:21:47 +02:00
Daniel Gibson
72bd84edb8 Fix 64-bit build of Entities/Player.es (of First Encounter) 2016-04-21 16:21:47 +02:00
Daniel Gibson
430e0c8a95 Remove "64-bit issue" STUBBED() in Model.cpp, as it only looks fishy
.. but is really fine (most probably).

I added comments instead; see them for explanation why it's fine ;-)
2016-04-21 16:21:47 +02:00
Daniel Gibson
d228b6a7a7 make all BSP-related tags size_t so they can store pointers
The tags are often initially assigned from pointers and then copied
around, even from one tag type to the other.
As BSPTree::MoveSubTreeToArray() uses them to get the original pointer,
we need the pointers anyway, so just CRC-ing the pointers doesn't seem
like a good option. As the tags are assigned from other tag-types
sometimes, I probably would have needed to add Pointers for the same
values in addition to the ULONG tags, that are also copied around along
the tags, to keep the tags ULONG - that seemed like a worse alternative.

However, when writing (via BSPTree::Write_t()) the bn_ulPlaneTag tag
needs to be ULONG, so there I actually use CRC for 64bit pointers (via
IntPtrToID()) - when restoring (in Read_t()), the pointers aren't valid
anymore anyway, so that all should somehow be fine.
I assume that Write_t() is only used by the Editor, anyway, so I fear I
won't be able to test that part of the code on Linux anytime soon.
2016-04-21 16:21:47 +02:00
Daniel Gibson
b437abf10d Use PointerToID() for sound-event ID in CSoundObject::Play()/Stop()
so that code should be 64bit-clean now.
2016-04-21 16:21:47 +02:00
Daniel Gibson
23b6374e9a Add ULONG PointerToID(void*) and IntPtrToID(size_t) that CRC 64bit pointers
Sometimes pointers are casted to ULONG just to get an ID or tag - this
is fine for 32bit pointers, but 64bit pointers will truncate which might
result in not being so unique after all.
CRC-ing the pointer should yield a more likely to be unique 32bit value.
NULL is a special case that yields 0 instead of the CRC, so code that
handles IDs/Tags with value 0 differently will continue to work.
For 32bit builds, it just returns the pointer as ULONG.
2016-04-21 16:21:47 +02:00
Daniel Gibson
e642cbcd20 Change PLATFORM_32/64BIT detection
turns out that using UINTPTR_MAX is a pain on several systems like
FreeBSD or even older Linux/glibc systems, so maybe let's not do that
anymore.
Now I check for known CPU-architectures instead.

I also added some sanity checks to make sure the detection was
correct.
2016-04-21 16:21:47 +02:00
Joshua Scoggins
7f682180f3 Use SERIOUS_MHZ envvar for the time being 2016-04-20 19:24:51 -07:00
Joshua Scoggins
dbd896b58d Use the platform independent version of ReadTSC
- If I use the gnu inline version, the game runs way too fast on my cpu due to
  frequency scaling (I think).
2016-04-20 19:06:02 -07:00
Joshua Scoggins
1b873d3ab4 Bool's must be 32-bits wide 2016-04-20 18:50:36 -07:00
Ryan C. Gordon
83b3e2fee3 Merge pull request #34 from rohit-n/reorder
Silence -Wreorder warnings.
2016-04-20 15:02:29 -04:00
Rohit Nirmal
e166958881 Silence -Wreorder warnings. 2016-04-20 13:31:49 -05:00
Ryan C. Gordon
3e84eafe15 Merge pull request #28 from salamanderrake/icculus-master-cmake-bms
CMakeLists.txt changes plus install.
2016-04-19 22:53:41 -04:00
Salamanderrake
9477af7bfa CMakeLists.txt: Applied some changes Ryan wanted with the c/cxx flags. 2016-04-19 18:16:45 -04:00
ptitSeb
88d553c8f4 Merge branch 'master' of https://github.com/ptitSeb/Serious-Engine 2016-04-19 23:47:30 +02:00
ptitSeb
c8291e6d37 More macro for UNIPTR_MAX 2016-04-19 22:00:29 +02:00
ptitSeb
e077fd664d Need __STDC_LIMIT_MACROS macro here too 2016-04-19 22:00:28 +02:00
ptitSeb
4b47c278bb Nedd __STDC_LIMIT_MACROS for *_MAX constant to be defined 2016-04-19 22:00:27 +02:00
ptitSeb
b9bb24e608 Don't regulate Framerate on Pandora 2016-04-19 22:00:27 +02:00
ptitSeb
484d49434b Restrict the Eps precision change only to Pandora platform 2016-04-19 21:54:46 +02:00
ptitSeb
9288c42268 fix Inverted Right and Middle button on certain case with SDL 2016-04-19 21:54:43 +02:00