Increased sprite limit per pixel to 10
this fixes the sprite ordering issue in zelda
This commit is contained in:
17
lib/ui.c
17
lib/ui.c
@ -23,6 +23,7 @@ SDL_Window *sdlDebugWindow;
|
||||
SDL_Renderer *sdlDebugRenderer;
|
||||
SDL_Texture *sdlDebugTexture;
|
||||
SDL_Surface *debugScreen;
|
||||
TTF_Font *sans;
|
||||
|
||||
static int scale = 4;
|
||||
|
||||
@ -32,6 +33,14 @@ void ui_init(){
|
||||
TTF_Init();
|
||||
printf("TTF INIT\n");
|
||||
|
||||
char buffer[1024];
|
||||
strcpy(buffer, emu_get_context()->app_path);
|
||||
*strrchr(buffer, '\\') = 0;
|
||||
strcat(buffer,"/Sans.ttf");
|
||||
sans = TTF_OpenFont(buffer, 24);
|
||||
if ( !sans ) {
|
||||
printf("Failed to load font: %s\n", TTF_GetError());
|
||||
}
|
||||
SDL_CreateWindowAndRenderer(SCREEN_WIDTH, SCREEN_HEIGHT, 0, &sdlWindow, &sdlRenderer);
|
||||
|
||||
screen = SDL_CreateRGBSurface(0, SCREEN_WIDTH,
|
||||
@ -138,14 +147,6 @@ void ui_update() {
|
||||
SDL_UpdateTexture(sdlTexture, NULL, screen->pixels, screen->pitch);
|
||||
SDL_RenderClear(sdlRenderer);
|
||||
SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, NULL);
|
||||
char buffer[1024];
|
||||
strcpy(buffer, emu_get_context()->app_path);
|
||||
*strrchr(buffer, '\\') = 0;
|
||||
strcat(buffer,"/Sans.ttf");
|
||||
TTF_Font* sans = TTF_OpenFont(buffer, 24);
|
||||
if ( !sans ) {
|
||||
printf("Failed to load font: %s\n", TTF_GetError());
|
||||
}
|
||||
SDL_Color text_color = {255,255,255};
|
||||
int yOffset = 50;
|
||||
int lastY = (yOffset) - (audio_get_context()->sq1_history[audio_get_context()->sq1_index] * 50);
|
||||
|
Reference in New Issue
Block a user