Upload stale local changes (MultiSpacc_PrintString)

This commit is contained in:
2023-10-07 01:55:59 +02:00
parent 3480071958
commit 1c660aa6ec
5 changed files with 36 additions and 9 deletions

View File

@ -22,23 +22,26 @@ int main( int argc, char *args[] )
// Copyright (c) 2018 Doug Fraker www.nesdoug.com (MIT)
MultiSpacc_Surface *TilesImg = MultiSpacc_LoadImage( "Tiles.png", Screen, NULL );
const char Text[] = "Hello, World!";
for(int i = 0; i < sizeof(Text); i++){
SDL_Rect Offset = {
.x = (8 * i) + (ScreenWidth / sizeof(Text)),
/*char Text[] = "Hello, World!";
for(int i = 0; i < sizeof( Text ); i++){
MultiSpacc_Rect Offset = {
.x = (8 * i) + (ScreenWidth / sizeof( Text )),
.y = ScreenHeight / 3,
};
SDL_Rect Clip = {
.x = 8 * ((int)Text[i] % 16),
.y = 8 * ((int)Text[i] / 16),
MultiSpacc_Rect Clip = {
.x = 8 * (Text[i] % 16),
.y = 8 * (Text[i] / 16),
.w = 8,
.h = 8,
};
SDL_BlitSurface( TilesImg, &Clip, Screen, &Offset );
};
};*/
MultiSpacc_PrintString( "Hello, World!", Screen, ScreenWidth, ScreenHeight, 4, 4, TilesImg );
if( MultiSpacc_UpdateWindowSurface( Window ) != 0 ) {
if( MultiSpacc_UpdateWindowSurface( Window ) != 0 )
{
printf("[E] Error updating Screen.\n");
return -1;
};
MultiSpacc_Sleep( 3000 );