2020-06-05 12:24:03 +00:00
|
|
|
#include "th01/sprites/pellet.h"
|
2020-03-27 21:12:18 +00:00
|
|
|
|
|
|
|
void pascal near pellet_render(int left, int top)
|
|
|
|
{
|
|
|
|
_ES = SEG_PLANE_B;
|
|
|
|
_BX = _BX; // Keeps any parameters from being put into BX
|
|
|
|
|
|
|
|
_AX = (left >> 3);
|
|
|
|
_DX = top;
|
|
|
|
_DX <<= 6;
|
|
|
|
_AX += _DX;
|
|
|
|
_DX >>= 2;
|
|
|
|
_DI = _AX + _DX;
|
|
|
|
|
2020-06-05 15:19:44 +00:00
|
|
|
_SI = reinterpret_cast<uint16_t>(sPELLET[0][left & 7]);
|
2020-03-27 21:12:18 +00:00
|
|
|
_CX = 8;
|
|
|
|
put_loop: {
|
2020-06-19 15:50:05 +00:00
|
|
|
__asm movsw
|
2020-03-27 21:12:18 +00:00
|
|
|
_DI += (ROW_SIZE - sizeof(dots16_t));
|
|
|
|
if(static_cast<int16_t>(_DI) >= PLANE_SIZE) {
|
|
|
|
_DI -= PLANE_SIZE;
|
|
|
|
}
|
|
|
|
}
|
2020-06-19 15:50:05 +00:00
|
|
|
__asm loop put_loop;
|
2020-03-27 21:12:18 +00:00
|
|
|
}
|