Previous 15994 Revisions Next

r5924 Wednesday 30th September, 2009 at 12:09:29 UTC by Dirk Best
Fixed some compile issues in the last commit.
[src/mess/video]m6847.c

src/mess/video/m6847.c
r5923r5924
10961096
10971097static int attr_index_from_attribute(const device_config *device, UINT8 attr)
10981098{
1099   mc6847_state *mc6847 = get_safe_token(device);
11001099   int result;
11011100
11021101   result = ((attr & (M6847_AG | M6847_AS | M6847_INTEXT | M6847_INV | M6847_CSS)) >> 3)
11031102      | ((attr & (M6847_GM1 | M6847_GM0)) << 5);
11041103
11051104   /* sanity check */
1106   assert(result < ARRAY_LENGTH(mc6847->fontdata));
1105   assert(result < ARRAY_LENGTH(get_safe_token(device)->fontdata));
11071106   return result;
11081107}
11091108
11101109static UINT8 attribute_from_attr_index(const device_config *device, int attr_index)
11111110{
1112   mc6847_state *mc6847 = get_safe_token(device);
1113
11141111   /* sanity check */
11151112   assert(attr_index >= 0);
1116   assert(attr_index < ARRAY_LENGTH(mc6847->fontdata));
1113   assert(attr_index < ARRAY_LENGTH(get_safe_token(device)->fontdata));
11171114
11181115   return (UINT8) ((attr_index & 0x1F) << 3)
11191116      | ((attr_index & 0x60) >> 5);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team