Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mouse showing sprite 258 pressing esc #2629

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
18 changes: 7 additions & 11 deletions src/studio/studio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2334,20 +2334,16 @@ static void blitCursor(Studio* studio)

tic_point hot = {0};

if(tic->ram->vram.vars.cursor.system)
bank = &getConfig(studio)->cart->bank0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed using of vram.vars.cursor.system flag which user could use to switch between system/custom cursors

hot = (tic_point[])
{
bank = &getConfig(studio)->cart->bank0;
hot = (tic_point[])
nesbox marked this conversation as resolved.
Show resolved Hide resolved
{
{0, 0},
{3, 0},
{2, 3},
}[CLAMP(sprite, 0, 2)];
}
else if(sprite == 0) return;
{0, 0},
{3, 0},
{2, 3},
}[CLAMP(sprite, 0, 2)];

const tic_palette* pal = &bank->palette.vbank0;
const tic_tile* tile = &bank->sprites.data[sprite];
const tic_tile* tile = &studio->config->cart->bank0.sprites.data[sprite];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you always use the cursor from the config cart, this code will not work if I want to change the cursor from the game

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. I'll look into that.


tic_point s = {m->x - hot.x, m->y - hot.y};
u32* dst = tic->product.screen + TIC80_FULLWIDTH * s.y + s.x;
Expand Down
Loading