added top-down view (laggy)
This commit is contained in:
parent
28f2e8f6ab
commit
0a61e13d9d
|
@ -8,6 +8,7 @@
|
||||||
"base.h": "c",
|
"base.h": "c",
|
||||||
"limits": "c",
|
"limits": "c",
|
||||||
"move.h": "c",
|
"move.h": "c",
|
||||||
"stdbool.h": "c"
|
"stdbool.h": "c",
|
||||||
|
"sdl2_gfxprimitives.h": "c"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -56,6 +56,13 @@ int max(int a, int b) {
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int sign(int n) {
|
||||||
|
if(n < 0) {
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
double absf(double n) {
|
double absf(double n) {
|
||||||
if(n > 0.0f) {
|
if(n > 0.0f) {
|
||||||
return n;
|
return n;
|
||||||
|
|
|
@ -11,6 +11,8 @@ int min(int a, int b);
|
||||||
|
|
||||||
int max(int a, int b);
|
int max(int a, int b);
|
||||||
|
|
||||||
|
int sign(int n);
|
||||||
|
|
||||||
double absf(double n);
|
double absf(double n);
|
||||||
|
|
||||||
int convex_seg(int x1, int x2, double theta);
|
int convex_seg(int x1, int x2, double theta);
|
||||||
|
|
110
src/display.c
110
src/display.c
|
@ -136,8 +136,58 @@ void drawStringToRenderer(SDL_Renderer* renderer, imgs data, char* s, int X, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawChunkToRenderer(SDL_Renderer* renderer, chunk* ch, int xmin, int xmax, int ymin, int ymax) {
|
void rescale(int* xm, int* xM, int* ym, int* yM, double scale) {
|
||||||
if(ch->draw_id != draw_par) {
|
*xm = (int)((*xm - __width__/2) * scale + __width__/2) ;
|
||||||
|
*xM = (int)((*xM - __width__/2) * scale + __width__/2) ;
|
||||||
|
*ym = (int)((*ym - __height__/2) * scale + __height__/2) ;
|
||||||
|
*yM = (int)((*yM - __height__/2) * scale + __height__/2) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isOnLeft(chunk* ch, int x, int y) {
|
||||||
|
return (x == 0 || unpack_coord(ch->chdata.lines, x-1, y));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isOnRight(chunk* ch, int x, int y) {
|
||||||
|
return (x == 7 || unpack_coord(ch->chdata.lines, x+1, y));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isOnTop(chunk* ch, int x, int y) {
|
||||||
|
return (y == 0 || unpack_coord(ch->chdata.lines, x, y-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isOnBottom(chunk* ch, int x, int y) {
|
||||||
|
return (y == 7 || unpack_coord(ch->chdata.lines, x, y+1));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isPtInPoly(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int xp, int yp) {
|
||||||
|
// (x2 - x1) * (yp - y1) - (xp - x1) * (y2 - y1) ;
|
||||||
|
int v1 = (x2 - x1) * (yp - y1) - (xp - x1) * (y2 - y1) ;
|
||||||
|
int v2 = (x3 - x2) * (yp - y2) - (xp - x2) * (y3 - y2) ;
|
||||||
|
int v3 = (x4 - x3) * (yp - y3) - (xp - x3) * (y4 - y3) ;
|
||||||
|
int v4 = (x1 - x4) * (yp - y4) - (xp - x4) * (y1 - y4) ;
|
||||||
|
return (sign(v1) == sign(v2) && sign(v2) == sign(v3) && sign(v3) == sign(v4));
|
||||||
|
}
|
||||||
|
|
||||||
|
void fillQuadPoly(SDL_Renderer* renderer, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) {
|
||||||
|
int ymin = min(min(y1, y2), min(y3, y4));
|
||||||
|
int ymax = max(max(y1, y2), max(y3, y4));
|
||||||
|
int xmin = min(min(x1, x2), min(x3, x4));
|
||||||
|
int xmax = max(max(x1, x2), max(x3, x4));
|
||||||
|
for(int h = ymin; h <= ymax; h++) {
|
||||||
|
for(int w = xmin; w <= xmax; w++) {
|
||||||
|
if(isPtInPoly(x1, y1, x2, y2, x3, y3, x4, y4, w, h)) {
|
||||||
|
SDL_RenderDrawPoint(renderer, w, h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
drawLineWithThicc(renderer, 2, x1, x2, y1, y2, 32, 32, 32, SDL_ALPHA_OPAQUE);
|
||||||
|
drawLineWithThicc(renderer, 2, x2, x3, y2, y3, 32, 32, 32, SDL_ALPHA_OPAQUE);
|
||||||
|
drawLineWithThicc(renderer, 2, x3, x4, y3, y4, 32, 32, 32, SDL_ALPHA_OPAQUE);
|
||||||
|
drawLineWithThicc(renderer, 2, x4, x1, y4, y1, 32, 32, 32, SDL_ALPHA_OPAQUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void drawChunkToRenderer(SDL_Renderer* renderer, chunk* ch, int xmin, int xmax, int ymin, int ymax, bool period) {
|
||||||
|
if(ch->draw_id != draw_par || !period) {
|
||||||
ch->draw_id = draw_par ;
|
ch->draw_id = draw_par ;
|
||||||
for(int i = 0; i < 8; i++) {
|
for(int i = 0; i < 8; i++) {
|
||||||
uint8_t cur = ch->chdata.lines[i] ;
|
uint8_t cur = ch->chdata.lines[i] ;
|
||||||
|
@ -150,12 +200,40 @@ void drawChunkToRenderer(SDL_Renderer* renderer, chunk* ch, int xmin, int xmax,
|
||||||
if(cur%2 == 1) {
|
if(cur%2 == 1) {
|
||||||
int nxmin = to_int((to_double(cux) - to_double(xmin)) * to_double(__width__)) / (to_double(xmax) - to_double(xmin)) ;
|
int nxmin = to_int((to_double(cux) - to_double(xmin)) * to_double(__width__)) / (to_double(xmax) - to_double(xmin)) ;
|
||||||
int nymin = to_int((to_double(cuy) - to_double(ymin)) * to_double(__height__)) / (to_double(ymax) - to_double(ymin)) ;
|
int nymin = to_int((to_double(cuy) - to_double(ymin)) * to_double(__height__)) / (to_double(ymax) - to_double(ymin)) ;
|
||||||
int nxmin2 = to_int((to_double(cux2) - to_double(xmin)) * to_double(__width__)) / (to_double(xmax) - to_double(xmin)) ;
|
int nxmax = to_int((to_double(cux2) - to_double(xmin)) * to_double(__width__)) / (to_double(xmax) - to_double(xmin)) ;
|
||||||
int nymin2 = to_int((to_double(cuy2) - to_double(ymin)) * to_double(__height__)) / (to_double(ymax) - to_double(ymin)) ;
|
int nymax = to_int((to_double(cuy2) - to_double(ymin)) * to_double(__height__)) / (to_double(ymax) - to_double(ymin)) ;
|
||||||
if(abs(ch->chx + ch->chy)%2 == 0) {
|
|
||||||
placeRectToRenderer(renderer, nxmin, nymin, nxmin2 - nxmin, nymin2 - nymin, 255, 192, 192, SDL_ALPHA_OPAQUE);
|
uint8_t R = 255 - 63 * ((abs(ch->chx) + abs(ch->chy))%2 == 0) ;
|
||||||
|
uint8_t G = 255 ;
|
||||||
|
uint8_t B = 255 - 63 * ((abs(ch->chx) + abs(ch->chy))%2 == 1) ;
|
||||||
|
|
||||||
|
int sxmin = nxmin ;
|
||||||
|
int sxmax = nxmax ;
|
||||||
|
int symin = nymin ;
|
||||||
|
int symax = nymax ;
|
||||||
|
|
||||||
|
rescale(&nxmin, &nxmax, &nymin, &nymax, 1.5);
|
||||||
|
if(period) {
|
||||||
|
if(!isOnLeft(ch, i, j) && (8*ch->chy + i) >= (8*player_cy + player_y)) { // North
|
||||||
|
SDL_SetRenderDrawColor(renderer, R/2, G/2, B/2, SDL_ALPHA_OPAQUE);
|
||||||
|
fillQuadPoly(renderer, nxmin, nymin, sxmin, symin, sxmax, symin, nxmax, nymin);
|
||||||
|
}
|
||||||
|
if(!isOnBottom(ch, i, j) && (8*ch->chx + j) <= (8*player_cx + player_x)) { // West
|
||||||
|
SDL_SetRenderDrawColor(renderer, R/2, G/2, B/2, SDL_ALPHA_OPAQUE);
|
||||||
|
fillQuadPoly(renderer, nxmax, nymax, sxmax, symax, sxmax, symin, nxmax, nymin);
|
||||||
|
}
|
||||||
|
if(!isOnRight(ch, i, j) && (8*ch->chy + i) <= (8*player_cy + player_y)) { // South
|
||||||
|
SDL_SetRenderDrawColor(renderer, R/2, G/2, B/2, SDL_ALPHA_OPAQUE);
|
||||||
|
fillQuadPoly(renderer, nxmax, nymax, sxmax, symax, sxmin, symax, nxmin, nymax);
|
||||||
|
}
|
||||||
|
if(!isOnTop(ch, i, j) && (8*ch->chx + j) >= (8*player_cx + player_x)) { // East
|
||||||
|
SDL_SetRenderDrawColor(renderer, R/2, G/2, B/2, SDL_ALPHA_OPAQUE);
|
||||||
|
fillQuadPoly(renderer, nxmin, nymin, sxmin, symin, sxmin, symax, nxmin, nymax);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
placeRectToRenderer(renderer, nxmin, nymin, nxmin2 - nxmin, nymin2 - nymin, 192, 192, 255, SDL_ALPHA_OPAQUE);
|
SDL_SetRenderDrawColor(renderer, R, G, B, SDL_ALPHA_OPAQUE);
|
||||||
|
placeRectToRenderer(renderer, nxmin, nymin, nxmax - nxmin, nymax - nymin, 32, 32, 32, SDL_ALPHA_OPAQUE);
|
||||||
|
placeRectToRenderer(renderer, nxmin+1, nymin+1, nxmax - nxmin -2, nymax - nymin -2, R, G, B, SDL_ALPHA_OPAQUE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
cur = cur / 2 ;
|
cur = cur / 2 ;
|
||||||
|
@ -172,7 +250,7 @@ void drawHashToRenderer(SDL_Renderer* renderer, int chx, int chy, int xmin, int
|
||||||
fprintf(stderr, "NO (%d, %d)\n", chx, chy);
|
fprintf(stderr, "NO (%d, %d)\n", chx, chy);
|
||||||
exit(1);
|
exit(1);
|
||||||
};
|
};
|
||||||
drawChunkToRenderer(renderer, todraw, xmin, xmax, ymin, ymax);
|
drawChunkToRenderer(renderer, todraw, xmin, xmax, ymin, ymax, true);
|
||||||
|
|
||||||
if(distx != render_distance -1 && !gridMem(map, chx+1, chy)) {
|
if(distx != render_distance -1 && !gridMem(map, chx+1, chy)) {
|
||||||
generate_chunk_all(chx+1, chy);
|
generate_chunk_all(chx+1, chy);
|
||||||
|
@ -191,6 +269,8 @@ void drawHashToRenderer(SDL_Renderer* renderer, int chx, int chy, int xmin, int
|
||||||
drawHashToRenderer(renderer, chx-1, chy, xmin, xmax, ymin, ymax, distx+1, disty);
|
drawHashToRenderer(renderer, chx-1, chy, xmin, xmax, ymin, ymax, distx+1, disty);
|
||||||
drawHashToRenderer(renderer, chx, chy+1, xmin, xmax, ymin, ymax, distx, disty+1);
|
drawHashToRenderer(renderer, chx, chy+1, xmin, xmax, ymin, ymax, distx, disty+1);
|
||||||
drawHashToRenderer(renderer, chx, chy-1, xmin, xmax, ymin, ymax, distx, disty+1);
|
drawHashToRenderer(renderer, chx, chy-1, xmin, xmax, ymin, ymax, distx, disty+1);
|
||||||
|
|
||||||
|
drawChunkToRenderer(renderer, todraw, xmin, xmax, ymin, ymax, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,3 +278,17 @@ void drawMapToRenderer(SDL_Renderer* renderer, int xmin, int xmax, int ymin, int
|
||||||
drawHashToRenderer(renderer, player_cx, player_cy, xmin, xmax, ymin, ymax, 0, 0);
|
drawHashToRenderer(renderer, player_cx, player_cy, xmin, xmax, ymin, ymax, 0, 0);
|
||||||
placeRectToRenderer(renderer, __width__ /2 - 5*zoom/100, __height__ /2 - 5*zoom/100, 10*zoom/100, 10*zoom/100, 255, 255, 32, SDL_ALPHA_OPAQUE);
|
placeRectToRenderer(renderer, __width__ /2 - 5*zoom/100, __height__ /2 - 5*zoom/100, 10*zoom/100, 10*zoom/100, 255, 255, 32, SDL_ALPHA_OPAQUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void drawMapToRendererV2(SDL_Renderer* renderer, int xmin, int xmax, int ymin, int ymax) {
|
||||||
|
for(int i = 0; i < (2*render_distance+1)*(2*render_distance+1); i++) {
|
||||||
|
if(!gridMem(map, player_cx+sorted_x[i], player_cy + sorted_y[i])) {
|
||||||
|
generate_chunk_all(player_cx+sorted_x[i], player_cy + sorted_y[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
chunk* todraw = gridGet(map, player_cx+sorted_x[i], player_cy + sorted_y[i]) ;
|
||||||
|
|
||||||
|
//drawChunkToRenderer(renderer, todraw, xmin, xmax, ymin, ymax, true);
|
||||||
|
drawChunkToRenderer(renderer, todraw, xmin, xmax, ymin, ymax, false);
|
||||||
|
}
|
||||||
|
placeRectToRenderer(renderer, __width__ /2 - 5*zoom/100, __height__ /2 - 5*zoom/100, 10*zoom/100, 10*zoom/100, 255, 255, 32, SDL_ALPHA_OPAQUE);
|
||||||
|
}
|
|
@ -21,10 +21,26 @@ void drawNumberToRenderer(SDL_Renderer* renderer, imgs data, int n, int X, int Y
|
||||||
|
|
||||||
void drawStringToRenderer(SDL_Renderer* renderer, imgs data, char* s, int X, int Y, int W, int H);
|
void drawStringToRenderer(SDL_Renderer* renderer, imgs data, char* s, int X, int Y, int W, int H);
|
||||||
|
|
||||||
void drawChunkToRenderer(SDL_Renderer* renderer, chunk* ch, int xmin, int xmax, int ymin, int ymax);
|
void rescale(int* xm, int* xM, int* ym, int* yM, double scale);
|
||||||
|
|
||||||
|
bool isOnLeft(chunk* ch, int x, int y);
|
||||||
|
|
||||||
|
bool isOnRight(chunk* ch, int x, int y);
|
||||||
|
|
||||||
|
bool isOnTop(chunk* ch, int x, int y);
|
||||||
|
|
||||||
|
bool isOnBottom(chunk* ch, int x, int y);
|
||||||
|
|
||||||
|
bool isPtInPoly(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int xp, int yp);
|
||||||
|
|
||||||
|
void fillQuadPoly(SDL_Renderer* renderer, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
|
||||||
|
|
||||||
|
void drawChunkToRenderer(SDL_Renderer* renderer, chunk* ch, int xmin, int xmax, int ymin, int ymax, bool period);
|
||||||
|
|
||||||
void drawHashToRenderer(SDL_Renderer* renderer, int chx, int chy, int xmin, int xmax, int ymin, int ymax, int distx, int disty);
|
void drawHashToRenderer(SDL_Renderer* renderer, int chx, int chy, int xmin, int xmax, int ymin, int ymax, int distx, int disty);
|
||||||
|
|
||||||
void drawMapToRenderer(SDL_Renderer* renderer, int xmin, int xmax, int ymin, int ymax);
|
void drawMapToRenderer(SDL_Renderer* renderer, int xmin, int xmax, int ymin, int ymax);
|
||||||
|
|
||||||
|
void drawMapToRendererV2(SDL_Renderer* renderer, int xmin, int xmax, int ymin, int ymax);
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -24,7 +24,7 @@ template* configs ;
|
||||||
array** matches ;
|
array** matches ;
|
||||||
int n_configs = 18;
|
int n_configs = 18;
|
||||||
|
|
||||||
int render_distance = 4 ;
|
int render_distance = 2 ;
|
||||||
|
|
||||||
int player_x = 4;
|
int player_x = 4;
|
||||||
int player_y = 4;
|
int player_y = 4;
|
||||||
|
@ -43,12 +43,15 @@ imgs letters ;
|
||||||
|
|
||||||
template full ;
|
template full ;
|
||||||
|
|
||||||
|
int* sorted_x ;
|
||||||
|
int* sorted_y ;
|
||||||
|
|
||||||
// yes Valentin I learned to use .h the intended way xD
|
// yes Valentin I learned to use .h the intended way xD
|
||||||
|
|
||||||
// ------------------------------------------------------------------------ //
|
// ------------------------------------------------------------------------ //
|
||||||
|
|
||||||
bool unpack_coord(uint8_t* lines, int cx, int cy) {
|
bool unpack_coord(uint8_t* lines, int cx, int cy) {
|
||||||
return (bool)((lines[cy]/pw(2, cx))%2);
|
return (bool)((lines[cx]/pw(2, cy))%2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template copy(template src) {
|
template copy(template src) {
|
||||||
|
@ -91,6 +94,13 @@ void print_template(int config_id) {
|
||||||
printf("(%d)\n", configs[config_id].lines[i]);
|
printf("(%d)\n", configs[config_id].lines[i]);
|
||||||
};
|
};
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
for(int i = 0; i < 8; i++) {
|
||||||
|
for(int j = 0; j < 8; j++) {
|
||||||
|
printf("%d ", unpack_coord(configs[config_id].lines, i, j));
|
||||||
|
};
|
||||||
|
printf("\n");
|
||||||
|
};
|
||||||
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void rotateTemplateClockWise(int config_id) {
|
void rotateTemplateClockWise(int config_id) {
|
||||||
|
@ -232,6 +242,38 @@ void initialize(SDL_Renderer* renderer) {
|
||||||
};
|
};
|
||||||
full.id = -1 ;
|
full.id = -1 ;
|
||||||
|
|
||||||
|
int xys = pw(2*render_distance+1, 2);
|
||||||
|
sorted_x = malloc(sizeof(int)*xys);
|
||||||
|
sorted_y = malloc(sizeof(int)*xys);
|
||||||
|
|
||||||
|
int i = 0 ;
|
||||||
|
for(int w = -render_distance; w <= render_distance; w++) {
|
||||||
|
for(int h = -render_distance; h <= render_distance; h++) {
|
||||||
|
sorted_x[i] = w ;
|
||||||
|
sorted_y[i] = h ;
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int k = 0; k < xys-1; k++) {
|
||||||
|
for(int l = 0; l < xys-1; l++) {
|
||||||
|
if(abs(sorted_x[l]) + abs(sorted_y[l]) < abs(sorted_x[1+l]) + abs(sorted_y[1+l])) {
|
||||||
|
int tpx = sorted_x[l];
|
||||||
|
int tpy = sorted_y[l];
|
||||||
|
|
||||||
|
sorted_x[l] = sorted_x[l+1];
|
||||||
|
sorted_y[l] = sorted_y[l+1];
|
||||||
|
|
||||||
|
sorted_x[l+1] = tpx;
|
||||||
|
sorted_y[l+1] = tpy ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int k = 0; k < xys; k++) {
|
||||||
|
printf("[%d, %d] -> (%d)\n", sorted_x[k], sorted_y[k], abs(sorted_x[k]) + abs(sorted_y[k]));
|
||||||
|
}
|
||||||
|
|
||||||
generate_chunk(0, 0, 2);
|
generate_chunk(0, 0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,6 +284,9 @@ void destroy() {
|
||||||
free_digits(letters);
|
free_digits(letters);
|
||||||
|
|
||||||
free(full.lines);
|
free(full.lines);
|
||||||
|
|
||||||
|
free(sorted_x);
|
||||||
|
free(sorted_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void parse_one(FILE* ptr, FILE* ptr2, int index) {
|
void parse_one(FILE* ptr, FILE* ptr2, int index) {
|
||||||
|
|
|
@ -29,7 +29,7 @@ bool checkCollision() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool checkCollision2(int cx, int cy, int x, int y) {
|
bool checkCollision2(int cx, int cy, int x, int y) {
|
||||||
return (unpack_coord(gridGet(map, cx, cy)->chdata.lines, x, y));
|
return (unpack_coord(gridGet(map, cx, cy)->chdata.lines, y, x));
|
||||||
}
|
}
|
||||||
|
|
||||||
void normalize(int* ch_coord, int* coord, double* ε) {
|
void normalize(int* ch_coord, int* coord, double* ε) {
|
||||||
|
@ -176,7 +176,8 @@ void moveFunctionMaster(SDL_Renderer* renderer) {
|
||||||
while(!halt) {
|
while(!halt) {
|
||||||
moveControl(&halt);
|
moveControl(&halt);
|
||||||
resetRenderer(renderer);
|
resetRenderer(renderer);
|
||||||
drawMapToRenderer(renderer, -300 * 250/zoom + to_int(50 * (8*player_cx + player_x + εx)), 300 * 250/zoom + to_int(50 * (8*player_cx + player_x + εx)), -300 * 250/zoom + to_int(50 * (8*player_cy + player_y + εy)), 300 * 250/zoom + to_int(50 * (8*player_cy + player_y + εy)));
|
//drawMapToRenderer(renderer, -300 * 250/zoom + to_int(50 * (8*player_cx + player_x + εx)), 300 * 250/zoom + to_int(50 * (8*player_cx + player_x + εx)), -300 * 250/zoom + to_int(50 * (8*player_cy + player_y + εy)), 300 * 250/zoom + to_int(50 * (8*player_cy + player_y + εy)));
|
||||||
|
drawMapToRendererV2(renderer, -300 * 250/zoom + to_int(50 * (8*player_cx + player_x + εx)), 300 * 250/zoom + to_int(50 * (8*player_cx + player_x + εx)), -300 * 250/zoom + to_int(50 * (8*player_cy + player_y + εy)), 300 * 250/zoom + to_int(50 * (8*player_cy + player_y + εy)));
|
||||||
drawNumberToRenderer(renderer, digits, player_cx, 10, 10, 50, 70, 0);
|
drawNumberToRenderer(renderer, digits, player_cx, 10, 10, 50, 70, 0);
|
||||||
drawNumberToRenderer(renderer, digits, player_cy, 10, 80, 50, 70, 0);
|
drawNumberToRenderer(renderer, digits, player_cy, 10, 80, 50, 70, 0);
|
||||||
drawNumberToRenderer(renderer, digits, player_x, __width__ / 3, 10, 50, 70, 0);
|
drawNumberToRenderer(renderer, digits, player_x, __width__ / 3, 10, 50, 70, 0);
|
||||||
|
|
|
@ -47,4 +47,7 @@ extern imgs letters ;
|
||||||
|
|
||||||
extern template full ;
|
extern template full ;
|
||||||
|
|
||||||
|
extern int* sorted_x ;
|
||||||
|
extern int* sorted_y ;
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue