417
edits
(Memory buffer is 168 in height, not 200. Fixed.) |
(Fixed a typo. Hadn't put & in front of some code where it should have been.) |
||
Line 920: | Line 920: | ||
codeseg:9DB0 jmp AO_agi256_saveArea ; savearea(struct Sprite *s) { | codeseg:9DB0 jmp AO_agi256_saveArea ; savearea(struct Sprite *s) { | ||
codeseg:9DB0 j_AO_agi256_saveArea endp ; int srcOffset = screenOffset(s->xPos, s->yPos); | codeseg:9DB0 j_AO_agi256_saveArea endp ; int srcOffset = screenOffset(s->xPos, s->yPos); | ||
codeseg:9DB0 ; uint8 *src = agi256PicSeg[srcOffset + 160]; | codeseg:9DB0 ; uint8 *src = &agi256PicSeg[srcOffset + 160]; | ||
codeseg:9DB0 ; for (int y = 0; y < s->ySize; y++) | codeseg:9DB0 ; for (int y = 0; y < s->ySize; y++) | ||
codeseg:9DB0 ; memcpy(s->buffer + s->xSize * y, src + 320 * y, s->xSize); | codeseg:9DB0 ; memcpy(s->buffer + s->xSize * y, src + 320 * y, s->xSize); | ||
Line 952: | Line 952: | ||
codeseg:9DB9 ; savearea(struct Sprite *s) { | codeseg:9DB9 ; savearea(struct Sprite *s) { | ||
codeseg:9DB9 ; int srcOffset = screenOffset(s->xPos, s->yPos); | codeseg:9DB9 ; int srcOffset = screenOffset(s->xPos, s->yPos); | ||
codeseg:9DB9 ; uint8 *src = agi256PicSeg[srcOffset + 160]; | codeseg:9DB9 ; uint8 *src = &agi256PicSeg[srcOffset + 160]; | ||
codeseg:9DB9 ; for (int y = 0; y < s->ySize; y++) | codeseg:9DB9 ; for (int y = 0; y < s->ySize; y++) | ||
codeseg:9DB9 ; memcpy(s->buffer + s->xSize * y, src + 320 * y, s->xSize); | codeseg:9DB9 ; memcpy(s->buffer + s->xSize * y, src + 320 * y, s->xSize); |
edits