Commit graph

579 commits

Author SHA1 Message Date
Daniel Gibson
cd8c3662e2 Merge branch 'aros': Support for the AROS operating system
See www.aros.org, it's an OS aiming to be compatible with AmigaOS
2017-04-22 16:32:22 +02:00
Kalamatee
c8cdb641d4 # move the AROS specific folder icon and default.cfg mmakefile.src under neo/sys/aros/setup
# add a comment to the top level AROS mmakefile.src to clarify that it is specifically for AROS.
2017-04-22 16:21:14 +02:00
Kalamatee
c482b2da13 update for AROS build system changes. Use the defined flags in case the compiler doesn't support them. 2017-04-22 16:21:14 +02:00
Kalamatee
7a2da3127e update for AROS trunk changes 2017-04-22 16:21:14 +02:00
Kalamatee
edf3b077ce use the correct extension for x86 2017-04-22 16:21:14 +02:00
Kalamatee
4813718954 use socklen_t 2017-04-22 16:21:14 +02:00
Kalamatee
315d66f8f8 rename the resurrection of evil files to just "ROE". 2017-04-22 16:21:14 +02:00
Kalamatee
17c66c3da0 pass static-libstdc++ via USER_LDFLAGS 2017-04-22 16:21:14 +02:00
Kalamatee
1a7c574dce delint 2017-04-22 16:21:14 +02:00
Kalamatee
d1fe0b7cb3 add dependency on libjpeg 2017-04-02 00:42:29 +01:00
Kalamatee
f83e270cdb revert changes committed in error 2017-04-02 00:42:28 +01:00
Kalamatee
46279bf11f import AROS changes 2017-04-02 00:42:28 +01:00
Turo Lamminen
d535e54c90 Add 2560x1440 screen mode 2017-04-02 00:48:40 +02:00
Turo Lamminen
9e628e8474 Fix read from uninitialized part of buffer
According to "man 2 readlink": "readlink() does not append a null byte to buf."
I have no idea how this worked up to now.
2017-03-14 22:19:20 +01:00
Turo Lamminen
5da6374663 Fix idStr self-assignment
Was calling memcpy with overlapping parameters which is inefficient,
undefined behavior and Valgrind complained about it.
2017-03-14 21:45:40 +01:00
Turo Lamminen
f26f70c717 Fix stack overflow in SSE code
This was checking the wrong variable so when count was < 4 it was writing
past the end of buffer and potentially breaking the stack.
2017-03-14 21:11:13 +01:00
Daniel Gibson
3d57e99e0a Hopefully fix built on OSX El Capitan with libjpeg9 2017-02-27 20:19:20 +01:00
Daniel Gibson
787405f253 Merge pull request #153 from devnexen/openbsd_build
make it compilable under openbsd
2016-12-10 01:36:36 +01:00
David Carlier
09c1330a0e make it compilable under openbsd 2016-12-09 16:21:54 +00:00
Daniel Gibson
665ed62d8e Version 1.4.1 2016-06-19 01:48:20 +02:00
Daniel Gibson
89f227b365 1.4.1 Release Candidate 1 2015-12-23 03:57:35 +01:00
Daniel Gibson
befe732dbb Fix new[]/delete missmatches and memory leaks found by clang's ASAN
Sometimes memory was allocated with new[] but freed with delete instead
of delete[], which is wrong.
And there were some small memory leaks, too.
Furtunately clang's AddressSanitizer detected all that so I could easily
fix it.

(There seem to be some more small memory leaks which are harder to fix,
though)
2015-12-17 18:11:03 +01:00
Daniel Gibson
9950a5721f Fix heap corruption when loading (broken?) .ma models
On FreeBSD, the game used to crash when loading the last level of RoE
(d3xp), while loading models/david/hell_h7.ma.
The problem could be reproduced on Linux whith #define USE_LIBC_MALLOC 1
and clang's AddressSanitizer.
Turns out that this file specifies a vertex transform for a non-existent
vertex (index 31, while we only have 0-30) and thus the bounds of
pMesh->vertexes[] are violated.
I added a check to ensure the index is within the bounds and a Warning
if it isn't.
It should work now. If however it turns out that more files have this
problem, maybe .ma is parsed incorrectly and we need a differently fix.

(Should) fix #138
2015-12-17 18:07:35 +01:00
Daniel Gibson
df90fce6a5 small improvement for handling up to 8 mouse buttons
as we do int buttonIndex = ev.button.button - SDL_BUTTON_LEFT;
it's only consistent to do if(ev.button.button < SDL_BUTTON_LEFT + 8)

it doesn't really make any difference as long as SDL_BUTTON_LEFT is 1,
but this way it's safe for SDL3 or whatever future version might break
the ABI.
2015-12-13 03:49:29 +01:00
Sébastien Noel
32feff2be1 handle up to 8 buttons with SDL2 based on https://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/213
it's buggy on Linux/X11 before 2.0.4, but it works fine on other platforms
extra bonus: don't generate garbage events for unknown mouse buttons
2015-12-13 03:30:43 +01:00
Daniel Gibson
48511003b6 Unix: On failed assertion, break gracefully into debugger
__builtin_trap() causes an illegal instruction and thus the process
can't resume afterwards.
raise(SIGTRAP) only breaks into the debugger and thus allows to
"ignore" the assertion while debugging.
2015-12-13 03:30:03 +01:00
Daniel Gibson
b03fc9271a Fix crash by assert in last RoE level (and maybe elsewhere)
The assertion in idBounds::operator-(const idBounds&) was triggered
from idWeapon::Event_LaunchProjectiles() (ownerBounds - projBounds)
It only happened when using the BFG.
So I added a check to make sure calling operator- is legal.

I guess this also caused #122
2015-12-13 03:30:03 +01:00
Daniel Gibson
c5ad45368a Workaround to better support AZERTY keyboards
The first row of AZERTY-Keyboards (used in France and Belgium) doesn't
have numbers as keys but ², &, é, ", ', (, -, è, _, ç, à, ), =
(with small differences between France and Belgium).
For some of those keys we don't have keycodes - and neither does SDL2.
See also https://bugzilla.libsdl.org/show_bug.cgi?id=3188

As a workaround, just map those keys to 1, 2, ..., 9, 0 anyway, as those
are keys Quake2 already knows (and those chars are printed on the keys
too, for typing they're reachable via shift).
This workaround only works for SDL2, as SDL1.2 doesn't have Scancodes
which we need to identify the keys.

This should obsolete one part of pull request #135
2015-11-22 23:21:30 +01:00
Daniel Gibson
1680603d8c Sort vidmodes in menu, add 2880x1800
it's the native resolution of "Macbook Pro retina 15-inch mid 2014"
2015-10-30 21:41:18 +01:00
Daniel Gibson
4198f92bd5 ignore unknown SDL events
they just spam the console and don't matter anyway.
for example, on OS X you get lots of SDL_FINGER* events that spam
the console.
2015-10-23 18:19:46 +02:00
Daniel Gibson
c2c989cfb6 README: changed cmake example command line for OSX
.. to the directories that seem to be used by brew on OSX 10.11
2015-10-23 17:31:05 +02:00
Daniel Gibson
16bba7c2ff README: mention that there are still shadows
.. despite the lack of depth-fail ("Carmack's Reverse"), which doesn't really matter for that reason.

I have the impression that some people didn't get this.
2015-10-20 03:19:51 +02:00
Daniel Gibson
d4fcb27b41 README: call it "source port", mention OSX
"source port" is the usual term for this and what people will probably google for.
mentioning the tested platforms right at beginning might also be helpful for people.

also (hopefully) clarified what EFX/EAX is about, some people who wrote comments
about the release seemed confused about that.
2015-10-15 00:30:02 +02:00
Daniel Gibson
9958e3807c Win32: Don't access FILE::_file, use _fileno() instead
It has always been ugly to do that with and MSVC2015 doesn't seem to
work at all.
2015-10-11 23:32:31 +02:00
leffmann
c86e394da5 more fixes for Visual Studio 14 2015-10-11 23:27:42 +02:00
leffmann
498ef9cb83 make d3xp build with Visual Studio 14 2015-10-11 23:27:42 +02:00
leffmann
61aee9ed29 make base build with Visual Studio 14 2015-10-11 23:27:42 +02:00
leffmann
db461045bf make idlib build with Visual Studio 14 2015-10-11 00:36:25 +02:00
Daniel Gibson
999b5635f4 change version number to 1.4.1pre
so hopefully people trying code from git won't report problems (that
might be new) as bugs in 1.4.0
2015-10-11 00:36:25 +02:00
Daniel Gibson
5a146bf671 link latest release in readme 2015-10-10 00:31:00 +02:00
Daniel Gibson
5f6177839f Version 1.4.0
Thanks to all the testers!
Especially from http://idtechforums.fuzzylogicinc.com/
http://www.holarse-linuxgaming.de/ (special thanks to NoXPhasma!)
http://www.quakehaus.com/ and #iodoom3.

Also many thanks to everyone reporting bugs and sending pull requests
over the years.
And dhewg of course for starting this and doing all the hard work :-)
2015-10-09 16:06:49 +02:00
Daniel Gibson
8f4f1ca39f Get rid of "WARNING: unknown event 770" on Windows
It's an SDL_TEXTEDITING event which we seem to get on Windows whenever
the Window gains focus (or is created). I think it can be safely
ignored, so that's what I do.

I also changed how those warnings are printed - as a hex number now,
because they're defined as hex numbers in the SDL source and it's easier
to find out what kind of event it is this way.
2015-10-05 15:14:42 +02:00
Daniel Gibson
dad0eda29e Release Candiate 1 preparations, other small fixes 2015-10-03 19:14:22 +02:00
Daniel Gibson
5ab546f67d Esc should only open menu if shift isn't pressed (=> shift+esc for console)
When ingame, Shift-Esc would open the menu and another Shift-Esc the
console. Now it immediately opens the console and only Esc without
Shift opens the menu.
2015-10-03 18:58:49 +02:00
Daniel Gibson
08238d5ce0 Merge pull request #121 from svdijk/master
Win32: Add an icon to the dhewm3 executable

+ changes to CMakeLists.txt to make it possible by preventing that all kinds of C/C++ compiler flags
are set for windres which doesn't like them
2015-10-03 16:20:46 +02:00
svdijk
dd082b78de Win32: Add an icon to the dhewm3 executable 2015-10-03 09:17:30 +02:00
Daniel Gibson
1b18eefaf7 Update README: Use Homebrew instead of MacPorts for dependencies on OS X
I heard MacPorts is dead and the cool kids use Homebrew now.
2015-10-01 01:46:12 +02:00
Daniel Gibson
61d3efec98 Fix mouse cursor moving to fast in fullscreen GUIs (main menu, PDA)
The fullscreen guis pretend to be 640x480 internally, also for the mouse
cursor position. So adding the actually moved pixels (when playing the
game at a higher resolution) to the GUIs cursor position makes it move
too fast.
To fix that I detect (hopefully that check is reliable!) if the
idUserInterfaceLocal instance is a fullscreen GUI and if so scale the
reported mouse moved pixels with 640/actual_window_width and
480/actual_window_height.
2015-09-30 18:38:27 +02:00
Daniel Gibson
412dad6758 Sys_GetEvent(): Don't return res_none when more events are available
If res_none (event with .evType == EV_NONE) is returned,
idEventLoop::RunEventLoop() will assume there are no more events this
frame => pending events will be delayed til next frame (or later if
again res_none is returned in the meantime).
So res_none shouldn't be returned just because there was an SDL event
we didn't care about or we did care about but don't generate a doom3
event for (but toggle fullscreen or something).
Instead we should just fetch and handle the next SDL event.
2015-09-30 15:58:50 +02:00
Daniel Gibson
66f7b6aa87 no allocation per SDL_TEXTINPUT event
those event have a max size (SDL_TEXTINPUTEVENT_TEXT_SIZE) so we can
just use a static buffer.
2015-09-30 15:41:14 +02:00