[FEAT] memcpy
[CHANGE] New default color 0x0f
This commit is contained in:
10
ascii.cpp
10
ascii.cpp
@@ -67,7 +67,7 @@ void reinit() {
|
||||
case 1:
|
||||
screen_width = 40;
|
||||
screen_height = 30;
|
||||
current_color = 0x1e;
|
||||
current_color = 0x07;
|
||||
cursor_x = 0;
|
||||
cursor_y = 0;
|
||||
char_screen = &mem[0];
|
||||
@@ -78,7 +78,7 @@ void reinit() {
|
||||
case 2:
|
||||
screen_width = 20;
|
||||
screen_height = 15;
|
||||
current_color = 0x1e;
|
||||
current_color = 0x07;
|
||||
cursor_x = 0;
|
||||
cursor_y = 0;
|
||||
char_screen = &mem[0];
|
||||
@@ -469,6 +469,12 @@ void poke(uint16_t addr, uint8_t val) {
|
||||
}
|
||||
}
|
||||
|
||||
void memcpy(uint16_t dst, uint16_t src, uint16_t size) {
|
||||
if (dst <= src) return;
|
||||
if (src+size>=dst) return;
|
||||
SDL_memcpy(&mem[dst], &mem[src], size);
|
||||
}
|
||||
|
||||
void sound(float freq, uint32_t len) {
|
||||
// [TODO]
|
||||
audio_len = len*44.1f;
|
||||
|
||||
Reference in New Issue
Block a user