[FEAT] cnt() i rst()
This commit is contained in:
12
ascii.cpp
12
ascii.cpp
@@ -42,6 +42,7 @@ SDL_Texture *mini_bak = NULL;
|
||||
SDL_AudioDeviceID mini_audio_device;
|
||||
Uint32 *pixels;
|
||||
int pitch;
|
||||
Uint32 counter=0;
|
||||
|
||||
uint32_t palette[16] = { 0x00000000, 0x000000AA, 0x0000AA00, 0x0000AAAA, 0x00AA0000, 0x00AA00AA, 0x00AA5500, 0x00AAAAAA,
|
||||
0x00555555, 0x005555FF, 0x0055FF55, 0x0055FFFF, 0x00FF5555, 0x00FF55FF, 0x00FFFF55, 0x00FFFFFF };
|
||||
@@ -63,6 +64,7 @@ const char* get_filename() {
|
||||
|
||||
void reinit() {
|
||||
if (mini_bak != NULL) SDL_DestroyTexture(mini_bak);
|
||||
counter=0;
|
||||
switch (current_mode) {
|
||||
case 0:
|
||||
screen_width = 80;
|
||||
@@ -305,6 +307,7 @@ int main(int argc,char*argv[]) {
|
||||
SDL_RenderCopy(mini_ren, mini_bak, NULL, &rect);
|
||||
//SDL_RenderCopy(mini_ren, mini_bak, NULL, NULL);
|
||||
SDL_RenderPresent(mini_ren);
|
||||
counter++;
|
||||
}
|
||||
lua_quit();
|
||||
SDL_Quit();
|
||||
@@ -672,4 +675,11 @@ const char* fromclipboard() {
|
||||
SDL_free((void*)text);
|
||||
|
||||
return str_tmp;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t cnt() {
|
||||
return counter;
|
||||
}
|
||||
void rst() {
|
||||
counter = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user