This commit is contained in:
		
							
								
								
									
										18
									
								
								src/surf.c
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								src/surf.c
									
									
									
									
									
								
							@@ -762,14 +762,16 @@ static void tick(Surf* surf)
 | 
				
			|||||||
	tic->api.clear(tic, TIC_COLOR_BG);
 | 
						tic->api.clear(tic, TIC_COLOR_BG);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	drawBG(surf);
 | 
						drawBG(surf);
 | 
				
			||||||
	processAnim(surf);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(surf->state == &MenuModeState)
 | 
						if(surf->menu.count > 0)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		processGamepad(surf);
 | 
							processAnim(surf);
 | 
				
			||||||
	}
 | 
					
 | 
				
			||||||
 | 
							if(surf->state == &MenuModeState)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								processGamepad(surf);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		loadCover(surf);
 | 
							loadCover(surf);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		drawCover(surf, surf->menu.pos, 0, 0);
 | 
							drawCover(surf, surf->menu.pos, 0, 0);
 | 
				
			||||||
@@ -782,6 +784,12 @@ static void tick(Surf* surf)
 | 
				
			|||||||
		drawTopToolbar(surf, 0, AnimVar.topBarY - MENU_HEIGHT);
 | 
							drawTopToolbar(surf, 0, AnimVar.topBarY - MENU_HEIGHT);
 | 
				
			||||||
		drawBottomToolbar(surf, 0, TIC80_HEIGHT - AnimVar.bottomBarY);
 | 
							drawBottomToolbar(surf, 0, TIC80_HEIGHT - AnimVar.bottomBarY);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							static const char Label[] = "You don't have any files...";
 | 
				
			||||||
 | 
							s32 size = tic->api.text(tic, Label, 0, -TIC_FONT_HEIGHT, tic_color_white);
 | 
				
			||||||
 | 
							tic->api.text(tic, Label, (TIC80_WIDTH - size) / 2, (TIC80_HEIGHT - TIC_FONT_HEIGHT)/2, tic_color_white);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void resume(Surf* surf)
 | 
					static void resume(Surf* surf)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -440,9 +440,6 @@ static void api_pause(tic_mem* memory)
 | 
				
			|||||||
	memcpy(&machine->pause.registers, &memory->ram.registers, sizeof memory->ram.registers);
 | 
						memcpy(&machine->pause.registers, &memory->ram.registers, sizeof memory->ram.registers);
 | 
				
			||||||
	memcpy(&machine->pause.music_pos, &memory->ram.music_pos, sizeof memory->ram.music_pos);
 | 
						memcpy(&machine->pause.music_pos, &memory->ram.music_pos, sizeof memory->ram.music_pos);
 | 
				
			||||||
	memcpy(&machine->pause.vram, &memory->ram.vram, sizeof memory->ram.vram);
 | 
						memcpy(&machine->pause.vram, &memory->ram.vram, sizeof memory->ram.vram);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	// api_reset(memory);
 | 
					 | 
				
			||||||
	// memcpy(memory->ram.vram.palette.data, memory->config.palette.data, sizeof(tic_palette));
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void api_resume(tic_mem* memory)
 | 
					static void api_resume(tic_mem* memory)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user