-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Conversation
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
src/mame/shared/tecmo_spr.cpp
Outdated
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; |
There was a problem hiding this comment.
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).
src/mame/shared/tecmo_spr.cpp
Outdated
xmask = 512; | ||
else | ||
xmask = 256; | ||
|
||
/* draw all sprites from front to back */ | ||
bitmap_ind16* bitmap = &sprite_bitmap; |
There was a problem hiding this comment.
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
?
src/mame/shared/tecmo_spr.cpp
Outdated
int frame = screen.frame_number() & 1; | ||
if (frame==1) | ||
uint8_t const frame = screen.frame_number() & 1; | ||
if (frame == 1) | ||
enabled = 0; |
There was a problem hiding this comment.
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.
src/mame/tecmo/tecmo_v.cpp
Outdated
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 | ||
} |
There was a problem hiding this comment.
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.
* 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.
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