Comments (4)
https://github.com/SuperDisk/hUGEDriver/actions/runs/6489024190
Sorry about that, try this.
from hugedriver.
I just made a modified version you can try: https://github.com/SuperDisk/hUGEDriver/actions/runs/6444707503
This adds hUGE_current_order
which is the current order that is being played. hUGE_set_position
takes a number which represents what order to change to, I guess pattern is a misnomer here.
from hugedriver.
Great!!! But I run into a linking problem with the new symbol when trying to use it
?ASlink-Warning-Undefined Global '_hUGE_current_order' referenced by module 'gameplay' make: *** [Makefile:41: out/mygame.gb] Error 1
from hugedriver.
I finally got some time to test this properly.
The code compiles and links without any problems now.
And it ALMOST works... :)
I'm using it like this:
declarations:
extern const hUGESong_t test_music;
extern const hUGESong_t pause_music;
unsigned char test_music_position = 0;
inside my main game loop:
if(JUST_PRESSED(J_START) && can_pause && gamestate_time>60) {
paused=!paused;
if (paused)
{
test_music_position = hUGE_current_order;
hUGE_init(&pause_music);
} else {
hUGE_init(&test_music);
hUGE_set_position(test_music_position);
}
}
hUGE_dosound()
is being called on vblank
So, I just store the hUGE_current_order in test_music_position and use hUGE_set_position with that. Is that right?
Anyway, it kinda works, but the position start drifting after a few unpauses, and skips waaaay out of bounds eventually, producing garbage audio and after some time, making the game crash:
Suspecting some kind of misalignment, I shifted a few bits to see what happened and this was what worked best for me:
hUGE_set_position((test_music_position>>1)+1);
(which is not correct either but doesnt crash.)
Any idea?
from hugedriver.
Related Issues (19)
- Adding waveform switching to channel 3 HOT 1
- How to use with GBDK 2020 on linux? HOT 5
- Support for RGB9, revision 8 HOT 4
- Multiple feature requests HOT 1
- Implement compression for patterns HOT 1
- Compatibility with FXHammer HOT 2
- Support a music bank HOT 7
- GBA support HOT 8
- Remove "generalized" stuff HOT 1
- Set whether to loop; and get whether it's finished
- GBDK example sample song is outdated HOT 1
- Error with add_VBL in gbdk_player_example.c HOT 1
- rgb2sdas Conflicting sdcc options HOT 1
- SGB Support? HOT 1
- Swing mode HOT 1
- Issue with Note Delay HOT 2
- music credit HOT 1
- Support for RGB9, revision 7 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugedriver.