- Implementada polifonia en Chirping
- Arreglats un montó de warnings per lo mon
This commit is contained in:
15
mini.cpp
15
mini.cpp
@@ -186,8 +186,8 @@ int main(int argc,char*argv[]){
|
||||
// initfont()
|
||||
int bi = 0;
|
||||
for (int ci=0; ci<96; ci+=2) {
|
||||
font[ci] = base64font[bi]-48+((base64font[bi+1]-48)<<6)+((base64font[bi+2]-48&7)<<12);
|
||||
font[ci+1] = ((base64font[bi+2]-48)>>3)+((base64font[bi+3]-48)<<3)+((base64font[bi+4]-48)<<9);
|
||||
font[ci] = base64font[bi] - 48 + ( ( base64font[bi+1] - 48 ) << 6) + ( ( ( base64font[bi+2] - 48 ) & 7 ) << 12 );
|
||||
font[ci+1] = ( ( base64font[bi+2] - 48 ) >> 3 ) + ( ( base64font[bi+3] - 48 ) << 3 ) + ( ( base64font[bi+4] - 48 ) << 9 );
|
||||
bi += 5;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ int main(int argc,char*argv[]){
|
||||
key_just_pressed = 0;
|
||||
}
|
||||
SDL_LockTexture(mini_bak, NULL, (void**)&pixels, &pitch);
|
||||
for (int i=0;i<screen_surface->size;++i) pixels[i] = palette[screen_surface->p[i]];
|
||||
for (uint32_t i=0;i<screen_surface->size;++i) pixels[i] = palette[screen_surface->p[i]];
|
||||
SDL_UnlockTexture(mini_bak);
|
||||
SDL_RenderCopy(mini_ren, mini_bak, NULL, NULL);
|
||||
SDL_RenderPresent(mini_ren);
|
||||
@@ -512,7 +512,7 @@ const char t195_symbol[]={1,2,0,0,0,0,0,3,1,2,0,0,1,2,0,0,0,4,1,2,0,0,0,0,0,1,2,
|
||||
|
||||
void print(const char *str, int x, int y) {
|
||||
int pos=0;
|
||||
for (int i=0; i < SDL_strlen(str); ++i) {
|
||||
for (size_t i=0; i < SDL_strlen(str); ++i) {
|
||||
if ((unsigned char)str[i]==194) {
|
||||
i++;
|
||||
if ((unsigned char)str[i]==161) print_char_hv('!', x+pos*4, y);
|
||||
@@ -678,7 +678,8 @@ void spr(uint8_t n, int x, int y, float w, float h, bool flip_x, bool flip_y) {
|
||||
}
|
||||
|
||||
void sspr(int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, bool flip_x, bool flip_y) {
|
||||
if (dw==0)dw=sw; if (dh==0)dh=sh;
|
||||
if (dw==0) dw=sw;
|
||||
if (dh==0) dh=sh;
|
||||
float sdx = float(sw)/float(dw);
|
||||
float sdy = float(sh)/float(dh);
|
||||
float ssx = sx; float ssy = sy;
|
||||
@@ -986,8 +987,8 @@ bool freadb() {
|
||||
return strcmp(fstr, "true")==0?true:false;
|
||||
}
|
||||
|
||||
void playchirp(const char *song, const bool lock) {
|
||||
chirp_play(song, lock);
|
||||
void playchirp(const char *song) {
|
||||
chirp_play(song);
|
||||
}
|
||||
|
||||
void stopchirp() {
|
||||
|
||||
Reference in New Issue
Block a user