Giter Club home page Giter Club logo

Comments (4)

SuperDisk avatar SuperDisk commented on August 16, 2024 1

https://github.com/SuperDisk/hUGEDriver/actions/runs/6489024190

Sorry about that, try this.

from hugedriver.

SuperDisk avatar SuperDisk commented on August 16, 2024

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.

image

from hugedriver.

RodrigoCard avatar RodrigoCard commented on August 16, 2024

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.

RodrigoCard avatar RodrigoCard commented on August 16, 2024

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:
Captura de tela 2023-10-12 174120

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.