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

Various Tecmo driver updates/cleanups #11886

Merged
merged 4 commits into from
Jan 5, 2024
Merged

Conversation

cam900
Copy link
Contributor

@cam900 cam900 commented Dec 29, 2023

shared/tecmo_spr.cpp: Use device_gfx_interface for gfx decode, Use callback for priority, Fix/Add notes, Minor cleanups

comad/galspnbl.cpp, tecmo/spbactn.cpp, tecmo/tbowl.cpp, tecmo/wc90.cpp: Cleanup gfxdecode layouts

tecmo/tecmo.cpp, tecmo/gaiden.cpp: Rename GFX ROM regions

shared/tecmo_spr.cpp: Use device_gfx_interface for gfx decode, Use callback for priority, Fix/Add notes, Minor cleanups

comad/galspnbl.cpp, tecmo/spbactn.cpp, tecmo/tbowl.cpp, tecmo/wc90.cpp: Cleanup gfxdecode layouts

tecmo/tecmo.cpp, tecmo/gaiden.cpp: Rename GFX ROM regions
Comment on lines 79 to 86
int attributes_word = 0;
int tilenumber_word = 1;
int colour_word = 2;
int yposition_word = 3;
int xposition_word = 4;
int const attributes_word = 0;
int const tilenumber_word = 1;
int const colour_word = 2;
int const yposition_word = 3;
int const xposition_word = 4;
Copy link
Member

Choose a reason for hiding this comment

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

You could make these constexpr and change them to SCREAMING_SNAKE_CASE as they’re constants (and sourceinc as well).

xmask = 512;
else
xmask = 256;

/* draw all sprites from front to back */
bitmap_ind16* bitmap = &sprite_bitmap;
Copy link
Member

Choose a reason for hiding this comment

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

Does this local actually serve a purpose? Why not use sprite_bitmap directly, or rename it to bitmap?

Comment on lines 107 to 114
int frame = screen.frame_number() & 1;
if (frame==1)
uint8_t const frame = screen.frame_number() & 1;
if (frame == 1)
enabled = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Since you’ve changed enabled to bool to reflect usage, you should probably change this to enabled = false; to match.

Comment on lines 81 to 88
switch (pri)
{
default:
case 0x0: return 0; break;
case 0x1: return 0xf0; break; // obscured by text layer
case 0x2: return 0xf0|0xcc; break; // obscured by foreground
case 0x3: return 0xf0|0xcc|0xaa; break; // obscured by bg and fg
}
Copy link
Member

Choose a reason for hiding this comment

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

A break after a return is unreachable.

@cuavas cuavas merged commit ee326eb into mamedev:master Jan 5, 2024
5 checks passed
einstein95 pushed a commit to einstein95/mame that referenced this pull request Mar 2, 2024
* shared/tecmo_spr.cpp: Use device_gfx_interface to decode graphics ROMs, and callback for priority.
* comad/galspnbl.cpp, tecmo/spbactn.cpp, tecmo/tbowl.cpp, tecmo/wc90.cpp: Adjusted graphics ROM loading so standard layouts can be used to decode tiles.
* tecmo/tecmo.cpp, tecmo/gaiden.cpp: Use mnemonic names for graphics ROM regions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants