Working on boot logo
This commit is contained in:
22
ascii.cpp
22
ascii.cpp
@@ -246,6 +246,12 @@ int main(int argc,char*argv[]) {
|
||||
void cls(uint8_t value) {
|
||||
SDL_memset(char_screen, value, screen_width*screen_height);
|
||||
if (current_mode != 0) SDL_memset(color_screen, current_color, screen_width*screen_height);
|
||||
if (!lua_is_playing()) {
|
||||
SDL_memset(debug_text, 32, debug_total_size);
|
||||
debug_cursor = 1;
|
||||
debug_prompt = 0;
|
||||
debug_text[debug_prompt] = '>';
|
||||
}
|
||||
}
|
||||
|
||||
void ink(uint8_t value) {
|
||||
@@ -371,7 +377,7 @@ int rnd(int x) {
|
||||
}*/
|
||||
|
||||
char tostr_tmp[256];
|
||||
const char* tostr(int val) {
|
||||
const char* tostr(float val) {
|
||||
return SDL_itoa(val, tostr_tmp, 10);
|
||||
}
|
||||
|
||||
@@ -484,4 +490,16 @@ void setmode(const uint8_t mode) {
|
||||
void load(const char* str) {
|
||||
SDL_strlcpy(lua_filename, str, SDL_strlen(str)+1);
|
||||
should_reset = true;
|
||||
}
|
||||
}
|
||||
|
||||
void fileout(const char* str, uint16_t addr, uint16_t size) {
|
||||
FILE* f = fopen(str, "wb");
|
||||
fwrite(&mem[addr], size, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
void filein(const char* str, uint16_t addr, uint16_t size) {
|
||||
FILE* f = fopen(str, "rb");
|
||||
fread(&mem[addr], size, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user