* 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.
- 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.
- 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.
- 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
- 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.
- 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:
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
- 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
- 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
- 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)
- 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
- 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#20Fixes#69