Commit graph

38 commits

Author SHA1 Message Date
Matt Penny 9e633b868b Work on CMake compilation
About half of the source files compile.
Need to hook up generated code, compiler definitions, and dependencies.
2024-09-24 01:27:18 -04:00
Giacomo Garbin 855f798a18
Decouple time interface from libultra (#66)
* Wrap OSTimer usage into sleep function.

* Remove unused gLastTime.

This makes time.h independent from libultra, so let's rename time.c to time_libultra.c.

TODO: should we move time.h and time_libultra.c to the src/system folder?

* Add time unit to macro name.

* Move time initialization call to main function.

* Move time.h and time_libultra.c to src/system folder.
2024-05-17 01:09:08 -04:00
Bobby Lovell 1ba19f1f44
Use the square root of the distance for volume attenuation. 2024-01-23 08:19:24 -05:00
James Lambert f43de9167b Remove unused sound flag 2023-11-24 19:10:50 -07:00
James Lambert 4d88e3d9bb Make radio quieter and dampen non voice sounds when glados is speaking 2023-11-24 19:09:35 -07:00
westonCoder 4c5c23315b Added Ambient Sound to Game
- simply added the ambient_base sound to the game. its actually a very small sound file, so we could layer on other ambient sounds on top that are queued by different parts of the level in the future if we wanted.
- because this is an activeSound it is also effected by the bug where if you save and reload it is no longer playing (just like the current glados voice line activeSound)
- tested in entire game seems to work well.
2023-10-26 12:40:14 -05:00
westonCoder 6be32e3068 Fixes a save load crash and audio bug
- if the game was saved while the cutscene runner had queued audio lines, when that save was loaded it would crash the game.
- to alleviate I simply deny the player to save while a cutscene audio is playing with the "deny" sound.
- also relieved a bug where audio volume would not be correct after loading a save, by simply updating the volume when a queued level is loaded.

we could probably find the true solution to this crash and allow players to save during a cutscene, however I think this workaround is good for now to avoid crashes.
2023-10-19 19:44:50 -05:00
westonCoder d96c5ce81e Fixes Sound Slider Issue
Fixes #321
2023-10-18 16:15:36 -05:00
Weston 125197508e
Merge branch 'master' into audio-through-portals 2023-10-14 20:34:20 -05:00
westonCoder 3b43017b03 Audio Now Travels Through Portals
- audio travels through portals now by updating the soundPlayerDetermine3DSound function
- basically instead of just checking distance to the sound producer, we also check sound->portal0+portal1->listener and sound->portal1+portal0->listener to see if any of them are a smaller distance.
- works pretty seamlessly

Fixes #115
2023-10-14 17:34:10 -05:00
westonCoder a9d16f3185 Added in Volume Sliders
- Master Volume adjusts all sounds including music
- Music slider adjusts only music sounds
- new enum added to insicate which type of sound each sound being played is.
- general menu formatting

because we are now guaranteeing that atleast one english caption file is going to be present, I removed the if statements checking if there was more than 0.

I pretty throughoughly tested and everything seems to be working properly.
2023-10-11 17:28:56 -05:00
westonCoder a6b66783f8 Various Tweaks to Portal Gun Mechanics
- tweaked portal gun to have a max fire rate, that is tied to its animation speed (used video of portal1 for reference)
- allowed ControllerActionOpenPortal1 and ControllerActionOpenPortal2 actions to be "Holdable" meaning that you can hold down the button and continuously do that action
- made sure two portals cant be shot at once, prohibiting both buttons being held at once.

video attached:
2023-10-04 00:14:55 -05:00
westonCoder 0bebdbd8b9 Sound Crackling Noise Fix
this bug was caused by too many sounds playing at once. to alleviate this two things were implemented

- lowered the max number of active sounds from 16 to 12, this based on my testing eliminated all crackling sounds
- made an array of sound clips that are "skippable". also added a function to check if a given sound ID is skippable based on the list.

the idea here is there are some sounds (footsteps, portal shooting, portal entering, etc.) that are acceptable to be skipped. there are other
sounds that are more important to not skip (glados speaking, menu sounds, buttons pressed, etc.). by marking some as skippable, those sounds
will not be able to be played after the number of active sounds passes a MAX_SKIPPABLE_SOUNDS threshold. this makes the event of skipping an
important sound like glados speaking MUCH less likely. as more sound effects are added to the game we will need to make sure to add them to
that list if they are less important.

Fixes #183
2023-08-06 12:43:33 -05:00
James Lambert 8470c4ae22 Fix some fizzler related issues 2023-07-15 15:35:37 -06:00
James Lambert 9ab44568d8 Finish up clock implementation 2023-06-29 21:10:58 -06:00
James Lambert 86ade0b0ab Pause audio when the pause menu is opened 2023-05-09 20:03:15 -06:00
Weston Salinas c0c8047a7e Fixed flipped audio panning direction
- panning was flipped for 3d objects

Fixes #103
2023-04-30 15:04:02 -05:00
Weston Salinas 18e0b0068b Added All Switch Sounds
- switch has activate sound
- switch has countdown timer sound
- the player now doesnt make the deniedSelect sound when clicking the switch, and makes the select sound instead
- tested on n64 hardware, no issues
2023-04-08 17:16:58 -05:00
Weston Salinas f9982e3c25 Added 3 New Sound Effects
- elevator chime arrive sound
- button release "beep" sound
- ball catcher activate sound
- updated TODO in readme
2023-04-07 21:23:58 -05:00
Weston Salinas cea6a82047 requested changes to adjust volume function 2023-04-05 21:11:26 -05:00
Weston Salinas ff2101642d Adding Sound for Fast Falling
- added a new function in SoundPlayer that allows to adjust a playing activesound
- added new fast falling whoosh sound
- tuned whoosh sound to be right volume
2023-04-05 19:31:57 -05:00
Weston Salinas e360a288df Added A Few More Sounds and Utilized Flags
- Door open and close sound implemented
- Pedestal rotating sound implemented
- Elevator moving sound and timing implemented
- fixed implementation to make use of object flags rather than global variables (this was a good catch because it fixed a bug when there were two buttons loaded at once)
2023-03-15 18:04:08 -05:00
Weston Salinas ef476af8a3 Added Various Sounds to Game
- intercom on sound triggers when its the first queued sound
- intercom off sound triggers when its the last queued sound in a string of sounds
- button press sound implemented
- cube dropper now has a sound when it drops cube
- pedestal now has a shooting sound
2023-03-14 15:34:34 -05:00
Weston Salinas 52ede9d936 Player Action Sound Additions
- player now has footsteps (always sounds like concrete steps)
- player now has jump footstep
- player now has landing footstep
- player has select (grabbing) sound
- player now has select denied sound
- player has various new additions to flags to accomodate sounds

Fixes #20
Fixes #69
2023-03-13 22:04:31 -05:00
James Lambert 06593f221b Work on ball audio 2023-02-14 19:53:20 -07:00
James Lambert 47cd6c3c5e Work on ball sound effects 2023-02-14 08:54:34 -07:00
James Lambert 8c14455096 Implement doppler effect 2023-02-13 22:00:24 -07:00
James Lambert 0b7aee7f22 saving and loading checkpoints 2023-02-07 21:56:24 -07:00
James Lambert d26a6408b5 Fix PAL audio 2022-12-22 11:01:31 -07:00
James Lambert 6f78076558 work on dynamic signage 2022-08-09 12:59:09 -06:00
James Lambert 5f517da095 Implement basics for polygon screen cover 2022-07-09 16:37:12 -06:00
James Lambert 5d25fb2cfb Allow for more than one cutscene to run at once 2022-06-25 12:17:13 -06:00
James Lambert 7db1d880c8 Implement fizzler for cube 2022-06-15 21:09:38 -06:00
James Lambert a845dbcb6d Radio now sings 2022-06-11 11:30:42 -06:00
James Lambert 7e5c49e094 Add some more sound effects 2022-06-05 19:37:10 -06:00
James Lambert f1f362157d work on button 2022-05-24 20:07:18 -06:00
James Lambert c96f607427 Start work on cutscenes and sound 2022-05-20 20:21:16 -06:00
James Lambert feccb13a58 Start work on sound effects 2022-05-19 19:26:54 -06:00