mirror of
				https://github.com/NoelFB/tiny_link.git
				synced 2025-11-04 02:21:33 +08:00 
			
		
		
		
	few final tweaks
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 291 B  | 
							
								
								
									
										13
									
								
								src/game.cpp
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/game.cpp
									
									
									
									
									
								
							@ -33,6 +33,7 @@ void Game::startup()
 | 
			
		||||
	// load first room
 | 
			
		||||
	load_room(Point(0, 0));
 | 
			
		||||
	camera = Vec2(room.x * width, room.y * height);
 | 
			
		||||
	fullscreen = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Game::load_room(Point cell, bool is_reload)
 | 
			
		||||
@ -169,6 +170,18 @@ void Game::update()
 | 
			
		||||
		load_room(room);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Reload First Room
 | 
			
		||||
	if (Input::pressed(Key::F9))
 | 
			
		||||
	{
 | 
			
		||||
		m_transition = false;
 | 
			
		||||
		world.clear();
 | 
			
		||||
		load_room(Point(0, 0));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// Toggle Fullscreen
 | 
			
		||||
	if (Input::pressed(Key::F4))
 | 
			
		||||
		App::fullscreen(fullscreen = !fullscreen);
 | 
			
		||||
 | 
			
		||||
	// Normal Update
 | 
			
		||||
	if (!m_transition)
 | 
			
		||||
	{
 | 
			
		||||
 | 
			
		||||
@ -25,6 +25,7 @@ namespace TL
 | 
			
		||||
		Batch batch;
 | 
			
		||||
		Point room;
 | 
			
		||||
		Vec2 camera;
 | 
			
		||||
		bool fullscreen = false;
 | 
			
		||||
 | 
			
		||||
		void load_room(Point cell, bool is_reload = false);
 | 
			
		||||
		void startup();
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user