Commit Graph

  • 09ad4b848c Added a build configuration which will only include portable code, i.e. no dependencies on SDL, OpenGL or native Windows libraries Nico de Poel 2021-04-14 17:05:47 +0200
  • 11cdaf7a75 Allow passing of player number to FMOD for split-screen purposes. Not used for anything yet, but it's handy to have it in there already. Nico de Poel 2021-04-14 16:06:38 +0200
  • afa6333078 Some additional cleanup Nico de Poel 2021-04-14 10:52:39 +0200
  • 35e48c9087 Fixed popping noise upon stopping a sound by quickly ramping down the volume instead of stopping immediately. Also did a bit of additional housekeeping. Nico de Poel 2021-04-14 00:29:15 +0200
  • 9806b057c7 Implemented ambient sounds, did some refactoring and added explanations about the different types of sounds Nico de Poel 2021-04-13 22:38:09 +0200
  • 162c935334 Some housekeeping and preparation for ambient sounds Nico de Poel 2021-04-13 19:57:02 +0200
  • 13df268ecf Implemented sound effect delay in the situation where multiple instances of the same sound are started on a single frame Nico de Poel 2021-04-13 19:38:09 +0200
  • e928833f5e Implemented proper looping of sounds based on cue information from the WAV file header. Also modified Delay function so that it is unaffected by differences in sample rate between the input file and FMOD's mixer. Nico de Poel 2021-04-13 18:06:46 +0200
  • 79ad6f086c Release sounds loaded by FMOD on shutdown, and check FMOD version upon startup Nico de Poel 2021-04-13 16:20:38 +0200
  • 756420c5f9 Set channels with 0 volume to automatically become virtual. This greatly reduces the number of real channels that are being used. Nico de Poel 2021-04-13 14:06:43 +0200
  • 52510cfecc Some cleanup and extra housekeeping Nico de Poel 2021-04-13 13:56:01 +0200
  • 2b740b33aa Give local player sounds higher-than-default priority, so its real channels won't get stolen by other entity sounds Nico de Poel 2021-04-13 13:30:57 +0200
  • 0d4043e444 Properly set max real and virtual channels on FMOD initialization. Fixes sounds noticeably cutting out when the default max of 64 real channels is exceeded. Nico de Poel 2021-04-13 13:21:03 +0200
  • 83210b5822 Got the FMOD entity sound slot system working in a way that's effective and still fairly simple: - Up to 1024 entities are statically defined with 8 sound slots each. Sounds played within these ranges will override each other. - Sounds with free channel assignment get a slot that's dynamically allocated in zone memory. - Used the channel control callback to detect when a channel is done playing and free the associated slot. - Also implemented StopSound function Nico de Poel 2021-04-13 12:46:19 +0200
  • dedad3b4e4 Use channel's 3D level to handle sounds from the view entity. Fixes player sounds still panning left and right, and simplifies attenuation code. Nico de Poel 2021-04-12 23:39:40 +0200
  • f5b948af3a WIP FMOD sound system: - Quick hack channel userdata for attenuation to test normal entity sounds - Always set full volume for sounds coming from the view entity (i.e. the player) - It's starting to sound like Quake! Nico de Poel 2021-04-12 22:29:17 +0200
  • fa4183ac30 WIP FMOD sound system: - Update listener position and SFX volume - Implemented static looping sounds, with an attenuation algorithm mimicking the one from Quake - First bits of entity sound playback, which needs some additional thought first Nico de Poel 2021-04-12 21:45:46 +0200
  • 68db1e78ae Implemented more FMOD goodness: - Initialization of FMOD System (if necessary), diagnostics and setup of SFX channel group - Loading of FMOD sounds from either disk or PAK file Nico de Poel 2021-04-12 16:17:16 +0200
  • db31892192 First work on rewriting the SFX sound system using FMOD: - Isolated all the bits from the old sound system that are obsolete, and compile them out with USE_FMOD directive - Moved FMOD_System_Update call to S_Update function in new snd_fmod.c where it belongs - Mute FMOD when application is not in focus - Added stubs with research on what needs to happen for relevant sound API functions Nico de Poel 2021-04-12 13:28:07 +0200
  • 64b4ac812b Split off native interop code for the main UniQuake class into a separate partial class file as well Nico de Poel 2021-04-12 12:34:58 +0200
  • 12faa0c8a1 Allow FMOD system to be re-created during hot code compile & reload, and added some debug UI to inspect what FMOD is doing Nico de Poel 2021-04-11 23:03:27 +0200
  • 3e0c4b5314 Stream music files from disk with FMOD, instead of preloading the entire file into memory and playing from there. Added a helper function to COM_ to assist with this. This removes the noticeable delay when loading into a level, and simplifies the music playback code as well. Nico de Poel 2021-04-11 20:03:21 +0200
  • 1a5ff9b64b Send normal logs to Unity again, but for the Update loop collect all logs and flush the contents only once per frame Nico de Poel 2021-04-11 14:45:29 +0200
  • b36a292fbc Initialize FMOD pointers to NULL, so that the validation checks will also work correctly in Release builds Nico de Poel 2021-04-11 14:29:14 +0200
  • 78f42d9c9a Return result of directory creation, so that the game may handle creation errors Nico de Poel 2021-04-11 14:28:48 +0200
  • 548b72aed1 Minor bits: - Consolidate FMOD closing code into a single method - Added some experimental (commented-out) code to test running multiple instances of Quake - Extra validation checks in FMOD music code - Removed QuakeSpasm "feature" that skipped the demo reel at startup Nico de Poel 2021-04-11 11:45:52 +0200
  • 754812d63e Split all of the callback modules' native interop boilerplate code off into separate partial class files, to keep the actual logic code clean and easy to read. Nico de Poel 2021-04-11 11:44:14 +0200
  • 243bb70613 Rewrote the BGM system using FMOD, making the whole codec system rather obsolete Nico de Poel 2021-04-10 23:51:47 +0200
  • 34764f8eeb Added SDL2 library files that were previously ignored Nico de Poel 2021-04-10 21:28:33 +0200
  • 1df95cd0df Added FMOD Core library to the engine project Nico de Poel 2021-04-10 21:27:44 +0200
  • 623292cdae Organized some source files to isolate stuff that will be made obsolete at some point Nico de Poel 2021-04-10 19:18:28 +0200
  • b1112c5d15 Ignore more files and directories Nico de Poel 2021-04-10 19:14:57 +0200
  • 08b1139efd Added SDL2 libraries required by QuakeSpasm (for now) Nico de Poel 2021-04-10 19:14:17 +0200
  • c91e6b2bea Replaced UQE-based engine code with a modified QuakeSpasm, stripping out all music codecs (obviously losing music playback capability but that'll be re-added later), and compiling to a DLL with the UniQuake integration code added in. Nico de Poel 2021-04-10 19:13:26 +0200
  • e416868650 Modifications to make UniQuake work with a new engine DLL based on QuakeSpasm: - Extended QuakeParms with additional fields required by QuakeSpasm, and marshal it to a fixed memory block so that the engine can hold on to a reference. - Increased heap size to 128 MB - Some minor renaming and refactoring Nico de Poel 2021-04-10 18:16:49 +0200
  • 303f064f52 Added the ability to start one of the mission packs and to test mods Nico de Poel 2021-04-07 19:16:26 +0200
  • b2a9a27ede Started marking stuff in the code that's either platform-dependent (Windows) or graphics API-dependent (OpenGL), with a new build Portable configuration that will eventually only compile the plain portable C portions of the code. Nico de Poel 2021-04-07 16:41:35 +0200
  • 404f19a56d Renamed mod* to gl* to reflect that it's about rendering in general, and cleaned up & rearranged some code Nico de Poel 2021-04-07 13:18:53 +0200
  • 0f02005c58 Reimplemented uploading of alias model data, which now includes all vertex, triangle index and UV data Nico de Poel 2021-04-07 12:53:37 +0200
  • e8f97ce8e8 Transplanted improved QuakeC string handling over from QuakeSpasm, as well as a few other improvements to the script interpreter (including a massive bump to the Zone memory size). This now allows the entire game to run properly in 64-bit mode! :D Nico de Poel 2021-04-06 23:29:43 +0200
  • 264848f832 Integrated FMOD (just Core, not Studio) into the Unity project and initialize it through a new AudioManager. The FMOD Core system handle is shared between Unity and Quake, so that both may produce sound through the same audio device. Nico de Poel 2021-04-06 15:26:10 +0200
  • adc94064ae More FMOD cleanup Nico de Poel 2021-04-06 11:52:42 +0200
  • d4ef2063d6 More FMOD cleanup, and introduced Channel Groups for both music and SFX (to be used later). Volume is regulated through the channel group instead of on the channels directly. Nico de Poel 2021-04-06 00:39:15 +0200
  • e9529687e5 Newlines correction Nico de Poel 2021-04-06 00:25:34 +0200
  • 9402848813 Further cleanup of FMOD code, removed all traces of CD audio and switching between CD and MOD music Nico de Poel 2021-04-06 00:20:52 +0200
  • 75f0382070 Upgraded FMOD to version 2.00.16 (Core libraries only) and included 64-bit Windows libraries. Updated API's where necessary and removed all of the CD audio stuff as FMOD doesn't seem to support this anymore, and we're not interested in it anyway. Nico de Poel 2021-04-05 20:48:18 +0200
  • 3b4382954a Some renaming and reorganization Nico de Poel 2021-04-05 18:14:25 +0200
  • b19df802c7 Reworked library loading so that the native DLL and its functions are now loaded dynamically using native LoadLibrary/GetProcAddress calls and can be freed again with FreeLibrary. This allows the library to be unloaded while in the Unity Editor, making iteration on native code easier, and it's a first step on the way to loading multiple Quake instances simultaneously. Nico de Poel 2021-04-04 18:07:30 +0200
  • 276d66434e Moved time registration to the main UniQuake class Nico de Poel 2021-04-04 14:44:41 +0200
  • cfb73cb1e9 Added Universal Rendering Pipeline (URP) to the Unity project Nico de Poel 2021-04-04 14:35:24 +0200
  • fa50659490 Use custom exceptions to stop control flow in the Quake engine on Error and Quit, and shut down the engine. Doesn't work quite as intended yet (Quit will terminate the entire Unity application for some reason, instead of just Quake) but it's a step in the right direction. Nico de Poel 2021-04-04 13:52:43 +0200
  • 65c759036d Added FMOD library files (32-bit Windows) which were being ignored by default Nico de Poel 2021-04-03 11:36:13 +0200
  • 9778575e6f Disabled Unity lightmapping and tweaked default scene Nico de Poel 2021-04-02 13:06:18 +0200
  • ec8951fa7c First test to upload model data (brush models and alias models) from Quake to Unity Nico de Poel 2021-04-02 12:42:14 +0200
  • 9be3852e55 First pass at making Quake engine code 64-bit ready. Not entirely stable yet, but it starts, runs and is partially playable. Will still crash when loading some levels. Nico de Poel 2021-03-31 16:45:50 +0200
  • cb8bb17c63 Replaced native file I/O functions with managed versions implemented in Unity. Worked first try! :D Nico de Poel 2021-03-31 01:12:21 +0200
  • d268e8794a Declare callback delegates as using Cdecl calling convention, so it's consistent with the rest of the code and also consistent across all platforms. Nico de Poel 2021-03-30 19:46:24 +0200
  • ac0be29e11 Upgraded project to Unity 2020.3.2 Nico de Poel 2021-03-30 16:20:09 +0200
  • 14f7b78f1d Removed delegate handles list as that wasn't necessary for anything at all Nico de Poel 2021-03-30 16:19:38 +0200
  • b1a7505d81 Limit tested video modes even further and skip all display frequencies above 60 Hz, to significantly lower startup times Nico de Poel 2021-03-30 00:19:40 +0200
  • 40c8c13fb3 Moved native Sys_ calls into their own separate compilation unit, and removed some auto-generated Windows garbage Nico de Poel 2021-03-29 17:20:56 +0200
  • 0fafaf32ad Callback target pointer is now contained within the struct passed to native. Organized yet more code to move generic GCHandle stuff into the base class. Nico de Poel 2021-03-29 16:58:43 +0200
  • b3d419d1ad More code organization; putting QuakeParms in its own file and encapsulating the nitty gritty unmanaged code details, to make things overall more readable. Nico de Poel 2021-03-29 16:45:10 +0200
  • c2f4d854e0 Moved all of the callbacks interop code into a separate class with a base class for some common abstractions. Allows for better organization of callbacks as the list grows. Nico de Poel 2021-03-29 16:34:29 +0200
  • b2ad8a5074 Added an opaque target pointer to each callback function, so that Unity can pass an object instance and use that instance when processing callbacks. Nico de Poel 2021-03-29 15:47:54 +0200
  • 9c5e00b8a0 Modified callback conventions so that the paradigm is more Unity implementing system calls required by Quake in whatever way works best, rather than Quake calling specific Unity functions. Nico de Poel 2021-03-29 15:17:28 +0200
  • 3f74b45969 Renamed UniQuake files and functions to have consistent casing Nico de Poel 2021-03-29 14:57:19 +0200
  • 6a06621b90 Added some fun stuff that allows you to play with the time scale in Quake, either speeding it up or slowing it down from Unity. Nico de Poel 2021-03-29 12:23:15 +0200
  • 2ef1b24042 Further simplified mechanism for creating and pinning callbacks. We don't care about the individual GCHandles so just throw them into a list for easy management. Nico de Poel 2021-03-29 12:09:46 +0200
  • 38840fa7c3 Reorganized callbacks so that the function pointers and the containing class are all pinned, which makes them safe to store inside the DLL and reuse them on subsequent update calls. Nico de Poel 2021-03-29 11:00:24 +0200
  • 0928173a43 Fixed command-line argument passing, and simplified code to set up callbacks Nico de Poel 2021-03-29 01:51:41 +0200
  • 79b8f0d221 Added Unity code to interop with Quake DLL and test initialization from a Unity scene. Nico de Poel 2021-03-29 01:12:31 +0200
  • 03cee3a4ce Implemented minimum system functionality to initialize Quake from inside a DLL Nico de Poel 2021-03-29 01:11:34 +0200
  • bff11033c3 First steps to get a custom DLL built in Debug mode with all of the relevent Quake engine code embedded Nico de Poel 2021-03-28 22:47:40 +0200
  • da021bd98b Upgraded WinQuake project to VS2017 and added some VS ignore rules Nico de Poel 2021-03-01 17:46:31 +0100
  • 540789f846 Added Quake engine code from UQE project that will be gradually stripped down and used as the basis for a Unity plugin Nico de Poel 2021-02-28 22:14:31 +0100
  • c497f6366a First commit of an empty Unity project with some basic setup: - Use OpenGL only on Windows (temporary while we integrate Quake as a native rendering plugin first) - Imported new Input System package - Set physics tick rate to 10 fps (default for Quake) Nico de Poel 2021-02-28 21:12:15 +0100