Change colors, try to cross compile
This commit is contained in:
22
main.c
22
main.c
@@ -1,6 +1,6 @@
|
||||
#include <SDL2/SDL.h>
|
||||
#include <stdio.h>
|
||||
#include <threads.h>
|
||||
#include <time.h>
|
||||
#include "util/font.h"
|
||||
#include "assembler/assembler.h"
|
||||
#include "util/texteditor.h"
|
||||
@@ -103,7 +103,7 @@ int init() {
|
||||
}
|
||||
|
||||
//Create window
|
||||
window = SDL_CreateWindow("SDLko", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,
|
||||
window = SDL_CreateWindow("RISC-B simulator", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT, SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
|
||||
if (window == NULL) {
|
||||
printf("Window could not be created! SDL_Error: %s\n", SDL_GetError());
|
||||
@@ -120,10 +120,10 @@ int init() {
|
||||
SDL_RenderSetViewport(renderer, &viewport);
|
||||
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
|
||||
biggerFont = prepText(renderer, 16, "../PublicPixel.ttf", 255, 255, 255, 255);
|
||||
smallFont = prepText(renderer, 12, "../PublicPixel.ttf", 255, 255, 255, 255);
|
||||
smallerFont = prepText(renderer, 8, "../PublicPixel.ttf", 255, 255, 255, 255);
|
||||
init_editor(&codeEditor, &smallFont, 10, 80, renderer, 54, 1000, 48, false);
|
||||
biggerFont = prepText(renderer, 16, "PublicPixel.ttf", 255, 255, 255, 255);
|
||||
smallFont = prepText(renderer, 12, "PublicPixel.ttf", 255, 255, 255, 255);
|
||||
smallerFont = prepText(renderer, 8, "PublicPixel.ttf", 255, 255, 255, 255);
|
||||
init_editor(&codeEditor, &smallFont, 10, 80, renderer, 35, 1000, 48, false);
|
||||
init_editor(&memoryViewer, &smallerFont, 738, 80, renderer, 59, MEM_SIZE / 16 + 2, 70, true);
|
||||
SDL_RenderSetLogicalSize(renderer, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, NULL);
|
||||
@@ -514,13 +514,13 @@ int main(__attribute__((unused)) int argc, __attribute__((unused)) char *args[])
|
||||
|
||||
puts(SDL_GetError());
|
||||
|
||||
//SDL_DestroyRenderer(renderer);
|
||||
if (cpuStatsTexture) SDL_DestroyTexture(cpuStatsTexture);
|
||||
if (cpuStateTexture) SDL_DestroyTexture(cpuStateTexture);
|
||||
|
||||
//Destroy window
|
||||
//SDL_DestroyWindow(window);
|
||||
if (renderer) SDL_DestroyRenderer(renderer);
|
||||
if (window) SDL_DestroyWindow(window);
|
||||
|
||||
//Quit SDL subsystems
|
||||
//SDL_Quit();
|
||||
SDL_Quit();
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user