trunk/src/mame/video/atarimo.c
| r31547 | r31548 | |
| 215 | 215 | // if this matches the last link, we don't need to re-process the list |
| 216 | 216 | build_active_list(link); |
| 217 | 217 | |
| 218 | // initialize the parameters |
| 219 | m_next_xpos = 123456; |
| 220 | |
| 221 | // safety check |
| 222 | if (m_activelist == m_activelast) |
| 223 | continue; |
| 224 | |
| 218 | 225 | // set the start and end points |
| 219 | 226 | UINT16 *first, *last; |
| 220 | 227 | int step; |
| 221 | 228 | if (m_reverse) |
| 222 | 229 | { |
| 223 | 230 | first = m_activelast - 4; |
| 224 | | // TODO: this sets last to index m_activelist[-4] |
| 225 | | last = m_activelist - 4; |
| 231 | last = m_activelist; |
| 226 | 232 | step = -4; |
| 227 | 233 | } |
| 228 | 234 | else |
| 229 | 235 | { |
| 230 | 236 | first = m_activelist; |
| 231 | | last = m_activelast; |
| 237 | last = m_activelast - 4; |
| 232 | 238 | step = 4; |
| 233 | 239 | } |
| 234 | 240 | |
| 235 | | // initialize the parameters |
| 236 | | m_next_xpos = 123456; |
| 237 | | |
| 238 | 241 | // render the mos |
| 239 | | for (UINT16 *current = first; current != last; current += step) |
| 242 | for (UINT16 *current = first; ; current += step) |
| 243 | { |
| 240 | 244 | render_object(bitmap, bandclip, current); |
| 245 | if (current == last) |
| 246 | break; |
| 247 | } |
| 241 | 248 | } |
| 242 | 249 | } |
| 243 | 250 | |