finals fets. Credits fets. Personatge secret fet
This commit is contained in:
19
jdraw8.cpp
19
jdraw8.cpp
@@ -85,6 +85,12 @@ void JD8_SetScreenPalette(JD8_Palette palette) {
|
||||
main_palette = palette;
|
||||
}
|
||||
|
||||
void JD8_FillSquare(int ini, int height, Uint8 color) {
|
||||
const int offset = ini * 320;
|
||||
const int size = height * 320;
|
||||
memset(&screen[offset], color, size);
|
||||
}
|
||||
|
||||
void JD8_Blit(JD8_Surface surface) {
|
||||
memcpy( screen, surface, 64000 );
|
||||
}
|
||||
@@ -126,13 +132,24 @@ void JD8_BlitCKCut(int x, int y, JD8_Surface surface, int sx, int sy, int sw, in
|
||||
int dst_pointer = x + (y * 320);
|
||||
for (int j = 0; j < sh; j++) {
|
||||
for (int i = 0; i < sw; i++) {
|
||||
if (surface[src_pointer + i] != colorkey && (x+i >= 0) && (y+j >= 0) && (x+i < 320) && (y+i < 200)) screen[dst_pointer + i] = surface[src_pointer + i];
|
||||
if (surface[src_pointer + i] != colorkey && (x+i >= 0) && (y+j >= 0) && (x+i < 320) && (y+j < 200)) screen[dst_pointer + i] = surface[src_pointer + i];
|
||||
}
|
||||
src_pointer += 320;
|
||||
dst_pointer += 320;
|
||||
}
|
||||
}
|
||||
|
||||
void JD8_BlitCKScroll(int y, JD8_Surface surface, int sx, int sy, int sh, Uint8 colorkey) {
|
||||
int dst_pointer = y * 320;
|
||||
for (int j = sy; j < sy+sh; j++) {
|
||||
for (int i = 0; i < 320; i++) {
|
||||
int x = (i+sx) % 320;
|
||||
if (surface[x + j*320] != colorkey) screen[dst_pointer] = surface[x + j * 320];
|
||||
dst_pointer++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void JD8_BlitCKToSurface(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh, JD8_Surface dest, Uint8 colorkey) {
|
||||
int src_pointer = sx + (sy*320);
|
||||
int dst_pointer = x + (y*320);
|
||||
|
||||
Reference in New Issue
Block a user