1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 16:24:35 +01:00
Commit Graph

66 Commits

Author SHA1 Message Date
Dom Light
3a8b25a0ee Sanitize audio.h 2015-11-17 01:05:14 +00:00
Michał Janiszewski
2b02a04114 Use C++'s std::abs instead of C's to get floats
C's abs() will only work on int values, only std::abs will get floats.
2015-11-11 08:16:36 +01:00
Michał Janiszewski
c0e2a5c7be Add get_current_rotation function and DEBUG_LEVEL macros 2015-11-02 22:58:15 +01:00
Michał Janiszewski
be32b5e5f4 Init all fields in audio classes 2015-11-02 22:58:15 +01:00
Michał Janiszewski
9284930d7e Add safe_strncpy function
safe_strncpy is similar to strncpy, but makes sure buffer is
null-terminated. Update most of project to use this updated function to
prevent illegal memory accesses.
2015-10-30 16:01:00 +01:00
Daniël Heres
fdbd08e306 Calculate correct d_left / d_right 2015-10-23 14:06:38 +02:00
Daniël Heres
831dc631c8 Optimize Mixer::EffectPanS16 2015-10-23 12:40:35 +02:00
IntelOrca
be7d3d5b54 do not do any sound / music operations when in headless mode 2015-10-20 22:15:48 +01:00
Michał Janiszewski
7d0ce00bab Strip all whitespace 2015-10-20 20:48:51 +02:00
zsilencer
cf78d76bdf make disable volume on focus lost not reset title music 2015-10-17 11:48:39 -06:00
zsilencer
6449dfd6ea fix #2076 2015-10-17 11:47:04 -06:00
zsilencer
ae6c88d1ce remove unused/redundant RCT2_GLOBALS fix #2065 and cleanup 2015-10-16 02:31:31 -06:00
zsilencer
9ac89c2b5e remove directsound and get sound working for linux native 2015-09-23 09:42:55 -06:00
Michał Janiszewski
1bd8e11c0f Make it work on Linux
Right now the project is decompiled to the point where it is feasible to
try porting it to another platform. It doesn't work 100% correctly, but
it's nearing this state.

To port it to Linux I mmapped the openrct2.exe into expected places,
disabled two offending calls (RCT2_CALLPROC_EBPSAFE(0x0040701D) and
RCT2_CALLPROC_X(0x006E7FF3…)), replaced memory management routines
with generic ones and removed all the function-pointer calls.

A basic, non-exhaustive check is included to verify that memory is
loaded correctly in place.

That last bit is probably the most intrusive one, but had to be done, as
the calling convention on Linux differs from the one on Windows. It
could possibly be emulated (just like RCT2_CALLFUNC_X) until dependency
on exe is dropped.

It is possible to completely remove calls out to original code by
commenting out contents of RCT2_CALLFUNC_X, right now this will yield
working UI, but no rendering of peeps, rides or rest of world. This can
be used as a benchmark or test platform for correctness of
implementation. The data sections will still be required for now.

Assets are expected to be in specific places, so to launch it, following
needs to satisified:
* $build/data/ has to have contents of $RCT2/Data/
* $build/data/ (same as above) has to have contents of $repo/data/
* $build/ObjData/ has to have contents of $RCT2/ObjData/
* $build/../openrct2.exe has to be $repo/openrct2.exe (as of 976ea0d)
Keep in mind you can symlink stuff and that filesystems are case
sensitive!
You can copy more of required data to possibly improve your experience.

Pretty much all of this commit will possibly have to be reverted by the
time OpenRCT2 gains independence.

Remember to build with -DDISABLE_NETWORK=ON -DDISABLE_HTTP_TWITCH=ON
2015-09-23 00:04:40 +02:00
Michał Janiszewski
4ce0e3a8b2 Linux platform file
Add bulk of the platform file for linux, change the compilation target
from shared library to executable for linux, provide necessary changes
to make it compile & load the stub of a process.

Make sure functions are marked as stubs where needed, and implementation
is expected.
2015-09-20 23:19:08 +02:00
Michał Janiszewski
4df8761831 remove windows-only code
Step 1 on road towards Linux.

Remove windows-specific code, stub it out where needed and make sure we
can still compile it the way it is.

Take care of Travis' build matrix to include new build configuration.

Install new packages.
2015-09-18 16:01:38 +02:00
Gymnasiast
3ddddec21c Fix some warnings 2015-09-07 14:57:39 +02:00
IntelOrca
bea74ee261 make all file IO utf8 compatible, fixes #1847 2015-08-29 13:13:23 +01:00
IntelOrca
f0100a71a7 use windows lean and mean to reduce definition conflicts 2015-08-29 13:13:22 +01:00
Runelaenen
fb5921db6d First headless version 2015-08-19 18:07:04 +02:00
Gymnasiast
59202f97f8 Make the string for 'Default audio device' translatable, fix comment 2015-08-18 21:55:04 +02:00
Gymnasiast
99dd05176f Use a define the number of default music tracks 2015-08-16 22:26:17 +02:00
Gymnasiast
6a23e28670 Refactored music file list, removed some extra unused code, clear up some comments 2015-08-16 21:29:10 +02:00
Gymnasiast
fcb74d13b2 Get rid of unused file references, comment out unused obsolete config file code 2015-08-16 20:45:23 +02:00
zsilencer
1d811a5692 improve chat feature 2015-08-14 09:13:39 -06:00
medsouz
6caa48d3c3 Make all game sounds respect gGameSoundsOff 2015-08-11 06:29:21 -04:00
IntelOrca
cac0f2ab52 upgrade to VS2015 compiler 2015-08-03 23:16:30 +01:00
zsilencer
38b691b460 fix #1624 2015-07-15 15:44:05 -06:00
zsilencer
ca6c3d68aa fix #1155 2015-07-14 16:45:25 -06:00
zsilencer
b876591543 use SDL_RWops for save games 2015-07-11 12:27:46 +01:00
IntelOrca
beb2b23afb use log functions instead of printf and RCT2_ERROR (now removed) 2015-06-14 12:03:32 +01:00
Gymnasiast
a62e1c02c2 Force best sound quality and software buffering 2015-06-09 22:56:47 +02:00
zsilencer
71ae580483 fixes #1230 and #1212 2015-06-05 01:02:02 -06:00
zsilencer
c6e63d5d25 add volume control in options 2015-06-04 16:31:54 -06:00
Duncan Frost
fb1c8c4e42 Check against invalid tiles correctly 2015-06-03 18:02:41 +01:00
zsilencer
86ce94f8e9 fix #1101 and reorganize the tune lists 2015-05-20 18:25:26 -06:00
Robert Jordan
b49676a887 Added option for random title music in main menu
Added STR_5126 to UK and US languages
rand() is seeded in rct2_init()
2015-05-11 13:17:33 -04:00
zsilencer
bcad8c200e #1042 2015-05-06 19:15:00 -06:00
zsilencer
9296cfd334 fix audio panning 2015-05-06 19:15:00 -06:00
zsilencer
71e21c2a6c refactor mixer, add support for streamed music 2015-04-25 09:28:28 -06:00
zsilencer
9bd620cd99 game_command_raise_water, game_command_lower_water, suggested changes 2015-04-25 09:20:15 -06:00
Duncan Frost
e010d43763 Add load and save audio options. Fix all sounds not pausing 2015-03-24 20:42:20 +00:00
Timmy Weerwag
873eac46e8 Restart title music if necessary 2015-02-20 02:10:13 +01:00
IntelOrca
7f0ed995b5 improve reading and saving of configuration 2015-02-16 22:47:11 +00:00
IntelOrca
a66b29076b move osinterface code to shared or windows 2015-02-12 20:51:40 +00:00
IntelOrca
ce719ef086 fix fullscreen issues and add title music option 2015-02-06 22:35:08 +00:00
IntelOrca
e4914085ad convert Windows-1252 to UTF8 where necessary, fixes #744 2015-02-05 17:34:51 +00:00
IntelOrca
4fc91adce2 fix error that occured when samples failed to load 2015-02-04 19:11:41 +00:00
IntelOrca
8774731f03 refactor map element iteration 2015-01-22 00:19:05 +00:00
Duncan Frost
e6f966f395 Fix intro crash. Caused by incorrect pointer address. Fixed crash on freeing unallocated memory. Fixed audio issue when channels set to zero. 2015-01-18 19:13:21 +00:00