memset --> asm
This commit is contained in:
parent
9f5478f7eb
commit
80fca8e0fb
1 changed files with 4 additions and 4 deletions
|
|
@ -39,17 +39,17 @@ void fast_copy_dwords(void *dest, void *src, int count);
|
|||
parm [edi] [esi] [ecx] modify [edi esi ecx];
|
||||
|
||||
void clear_buffers(uint8_t color) {
|
||||
//memset(backbuffer, color, SCREEN_PIXELS);
|
||||
// memset(backbuffer, color, SCREEN_PIXELS);
|
||||
uint32_t c32 = color | (color << 8) | (color << 16) | (color << 24);
|
||||
fast_clear_dwords(backbuffer, c32, SCREEN_PIXELS / 4);
|
||||
fast_clear_dwords(backbuffer, c32, SCREEN_PIXELS >> 2);
|
||||
|
||||
//memset(zbuffer, 0xFF, SCREEN_PIXELS * sizeof(uint16_t));
|
||||
fast_clear_dwords(zbuffer, 0xFFFFFFFFUL, SCREEN_PIXELS / 2); /* 2 pixels (16 bits) par itération 32 bits */
|
||||
fast_clear_dwords(zbuffer, 0xFFFFFFFFUL, SCREEN_PIXELS >> 1); /* 2 pixels (16 bits) par itération 32 bits */
|
||||
}
|
||||
|
||||
void clear_zbuffer(void) {
|
||||
//memset(zbuffer, 0xFF, SCREEN_PIXELS * sizeof(uint16_t));
|
||||
fast_clear_dwords(zbuffer, 0xFFFFFFFFUL, SCREEN_PIXELS / 2);
|
||||
fast_clear_dwords(zbuffer, 0xFFFFFFFFUL, SCREEN_PIXELS >> 1);
|
||||
}
|
||||
|
||||
void blit_image(Image *img, int x, int y) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue