コード例 #1
0
ファイル: Main.cpp プロジェクト: Allenjonesing/tutorials
void HandleMenu(int menuID)
{		
	if(menuID == ID_FILE_QUIT)					// If the user chose File->Quit
	{
		PostQuitMessage(0);						// Quit the program
	}


//////////// *** NEW *** ////////// *** NEW *** ///////////// *** NEW *** ////////////////////

	else if(menuID == ID_FILE_OPENUP)			// If the user chose File->Open
	{	
		// Have windows bring up the Open File dialog box and Load the file chosen
		if(GetOpenFileName(&g_OpenInfo))
			g_Map.Load(g_OpenInfo.lpstrFile);	
	}
	else if(menuID == ID_FILE_SAVEIT)			// If the user chose File->Save
	{
		// If we have a n valid name for our map already, do a normal save
		if(strlen(g_Map.GetMapName()) > 3)
			g_Map.Save(g_Map.GetMapName());
		else
		{
			// If haven't given our map a name yet, do a "SaveAs" and bring up the save dlg box
			if(GetSaveFileName(&g_OpenInfo))
				g_Map.Save(g_OpenInfo.lpstrFile);
		}
	}
	else if(menuID == ID_FILE_SAVEAS)			// If the user chose File->SaveAs
	{
		// Bring up the save dlg box and allow the user to type in a new map name and save it
		if(GetSaveFileName(&g_OpenInfo))
			g_Map.Save(g_OpenInfo.lpstrFile);
	}

//////////// *** NEW *** ////////// *** NEW *** ///////////// *** NEW *** ////////////////////


	else if(menuID == ID_FILE_RESET)			// If the user chose File->Reset
		g_Map.SetDefault();						// Destroy all the tiles on the map and start over
	else if(menuID == ID_TILES_TILES)			// If the user chose Tiles->Tiles
		g_Map.SetCurrentType(TILE_TYPE);		// Set the tool bar tile type to tiles
	else if(menuID == ID_TILES_ITEMS)			// If the user chose Tiles->Items
		g_Map.SetCurrentType(ITEM_TYPE);		// Set the tool bar tile type to items
	else if(menuID == ID_TILES_MONSTERS)		// If the user chose Tiles->Monsters
		g_Map.SetCurrentType(MONSTER_TYPE);		// Set the tool bar tile type to monsters
	else if(menuID == ID_TILES_CITIZENS)		// If the user chose Tiles->Citizens
		g_Map.SetCurrentType(NPC_TYPE);			// Set the tool bar tile type to citizens
	else if(menuID == ID_TILES_EXITS)			// If the user chose Tiles->Exits
		g_Map.SetCurrentType(EXIT_TYPE);		// Set the tool bar tile type to exits (no tiles of course)
	else if(menuID == ID_HELP_ABOUT)			// If the user chose Help->About
		// Instead of creating a help dialog box, we can just use a simple system MessageBox() call
		MessageBox(g_hWnd, "www.GameTutorials.com Map Editor\n\n"
						   "\t- Choose the desired tile type from the Tiles menu,\n"
						   "\t  then click on a tile in the tile window. You can\n"
						   "\t  then draw the tiles on the map with the left mouse button.\n\n"
						   "\t- Right click to remove the current cursor tile.\n\n"
						   "\t- To delete a item:monster:citizen:exit, make sure you choose\n"
						   "\t  that type from the menu, then right click on the tile.\n\n"
						   "\t- When setting an exit you can hold down shift to place more exits.\n"
						   "\t  Once you place an exit without holding the shift key you will be\n"
						   "\t  prompted to choose the destination map.  Then place one tile for\n"
						   "\t  the position where the character will end up.\n\n"
						   "\t- Hit Esc to quit the program.", "About", MB_OK | MB_ICONINFORMATION);

	// Over assuming that a tile type was changed, reset the scroll bar size.
	// The -1 is because the tool bar window's title size offsets it a bit (being smaller).
	g_ScrollInfo.nMax = g_Map.GetCurrentTypeSize() - MAP_HEIGHT - 1;
	
	// If there isn't enough (or any) tiles to fill up the tool bar window, disable the scroll bar
	if(g_ScrollInfo.nMax < 0)
	{
		g_ScrollInfo.nMax = 0;
		EnableScrollBar(g_hWndTool, SB_VERT, ESB_DISABLE_BOTH);
	}
	else
		EnableScrollBar(g_hWndTool, SB_VERT, ESB_ENABLE_BOTH);	// Enable the scroll bar if it's needed

	// Reset the scroll bar info
	g_scrollBarPosY = 0;
	g_ScrollInfo.nPage = 0;

	// Update the current scroll bar information with no need to redraw (FALSE)
	SetScrollInfo(g_hWndTool, SB_VERT, &g_ScrollInfo, FALSE);
	ShowScrollBar(g_hWndTool, SB_VERT, TRUE);

	// If we chose a tile type, put a check box next to it
	switch(menuID)
	{
		case ID_TILES_TILES: 
		case ID_TILES_ITEMS:
		case ID_TILES_MONSTERS:
		case ID_TILES_CITIZENS:
		case ID_TILES_EXITS:
			g_pCursorTile = NULL;
			CheckTileType(menuID);
			break;
	}
}
コード例 #2
0
ファイル: pacman.c プロジェクト: m4tthartley/LD_Lib
int CALLBACK WinMain(
	HINSTANCE hInstance,
	HINSTANCE hPrevInstance,
	LPSTR lpCmdLine,
	int nCmdShow)
{
	printf("Hello PacMan! \n");
	
	ld_window Window;
	LD_CreateWindow(&Window, 768, 768, "PacMan");

	ld_texture TexGhosts;
	LD_LoadBitmap(&TexGhosts, "../pacman/assets/ghosts.bmp");
	ld_texture TexLevel;
	LD_LoadBitmap(&TexLevel, "../pacman/assets/level.bmp");
	ld_texture TexPacman;
	LD_LoadBitmap(&TexPacman, "../pacman/assets/sprites.bmp");

	sound_asset Sound_Intro;
	sound_asset Sound_SleepAway;
	sound_asset Sound_Kalimba;
	sound_asset Sound_Shoot;
	sound_asset Sound_Hit;
	sound_asset Sound_Explosion;

	//LD_LoadWav(&Sound_Intro, "../pacman/assets/intro.wav");
	LD_LoadWav(&Sound_SleepAway, "../pacman/assets/Sleep_Away.wav");
	LD_LoadWav(&Sound_Kalimba, "../pacman/assets/Kalimba.wav");
	LD_LoadWav(&Sound_Shoot, "../pacman/assets/shoot_48000.wav");
	LD_LoadWav(&Sound_Hit, "../pacman/assets/hit.wav");
	LD_LoadWav(&Sound_Explosion, "../pacman/assets/explosion.wav");

	/*
		TODO: If you play a sound that doesn't get loaded
		it crashes, that's not great
	*/
	LD_PlaySound(Sound_SleepAway);
	LD_PlaySound(Sound_Kalimba);

	u32 *LevelImageData;
	LD_LoadBitmapData(&LevelImageData, "../pacman/assets/level.bmp");
	for (u32 I = 0;
		I < TILE_COUNT;
		I++)
	{
		u32 *Pixel = LevelImageData + I;
		/*u8 R = (*Pixel & 0x00ff0000) >> 16;
		u8 G = (*Pixel & 0x0000ff00) >> 8;
		u8 B = (*Pixel & 0x000000ff) >> 0;*/
		//Level[I].Color = (color){R, G, B, 255};
		if (*Pixel == 0xffffffff)
		{
			Level[I].Type = Tile_Filled;
		}
		else
		{
			Level[I].Type = Tile_Empty;
		}
	}

	ld_sprite Ghost;
	Ghost.Texture = TexGhosts;
	Ghost.XOffset = 0;
	Ghost.XOffset = 0;
	Ghost.Width = 64;
	Ghost.Height = 64;

	ld_sprite SpriteLevel;
	SpriteLevel.Texture = TexLevel;
	SpriteLevel.XOffset = 0;
	SpriteLevel.XOffset = 0;
	SpriteLevel.Width = 24;
	SpriteLevel.Height = 24;

	ld_sprite S_Pacman[4];
	for (u32 I = 0;
		I < 4;
		I++)
	{
		S_Pacman[I].Texture = TexPacman;
		S_Pacman[I].XOffset = I*16;
		S_Pacman[I].YOffset = 0;
		S_Pacman[I].Width = 16;
		S_Pacman[I].Height = 16;
	}

	ld_sprite S_Tiles[16];
	for (u32 I = 0;
		I < 16;
		I++)
	{
		S_Tiles[I].Texture = TexPacman;
		S_Tiles[I].XOffset = (I%8)*8;
		S_Tiles[I].YOffset = 16+(I/8)*8;
		S_Tiles[I].Width = 8;
		S_Tiles[I].Height = 8;
	}

#define GHOST_SPRITE_COUNT 32
	ld_sprite S_Ghosts[GHOST_SPRITE_COUNT];
	/*S_Blinky[0].Texture = TexGhosts;
	S_Blinky[0].XOffset = 0;
	S_Blinky[0].YOffset = 0;
	S_Blinky[0].Width = 16;
	S_Blinky[0].Height = 16;*/
	for (u32 I = 0;
		I < GHOST_SPRITE_COUNT;
		I++)
	{
		S_Ghosts[I].Texture = TexGhosts;
		S_Ghosts[I].XOffset = (I%4)*16;
		S_Ghosts[I].YOffset = (I/4)*16;
		S_Ghosts[I].Width = 16;
		S_Ghosts[I].Height = 16;
	}

	direction Opposites[] =
	{
		Dir_Left,
		Dir_Right,
		Dir_Up,
		Dir_Down
	};

#define GhostCount 16 //8092
	entity Ghosts[GhostCount] = {0};
	for (u32 I = 0;
		I < GhostCount;
		I++)
	{
		Ghosts[I].ID = RandomInt(4);
		//Ghosts[I] = {0};
		tile_position Pos = GetRandomEmptyTile();
		Ghosts[I].TilePosX = Pos.X;
		Ghosts[I].TilePosY = Pos.Y;
		Ghosts[I].LastTilePosX = Pos.X;
		Ghosts[I].LastTilePosY = Pos.Y;
		Ghosts[I].Counter = MOVEMENT_COUNTER;
		Ghosts[I].Dir = Dir_Right;
	}

	/*entity Blinky = {0};
	tile_position Pos = GetRandomEmptyTile();
	Blinky.TilePosX = Pos.X;
	Blinky.TilePosY = Pos.Y;
	Blinky.Counter = 30;
	Blinky.Dir = Dir_Right;*/

	entity PacMan = {0};
	tile_position Pos = GetRandomEmptyTile();
	PacMan.TilePosX = Pos.X;
	PacMan.TilePosY = Pos.Y;
	PacMan.LastTilePosX = Pos.X;
	PacMan.LastTilePosY = Pos.Y;
	PacMan.Dir = Dir_Right;
	PacMan.Counter = PACMAN_MOVEMENT_COUNTER;
	PacMan.AniCounter = 0.0f;

	while (Window.Alive)
	{
		glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
		glClear(GL_COLOR_BUFFER_BIT);

		color Cyan = {0.0f, 1.0f, 1.0f, 1.0f};
		//LD_RDrawQuad(10, 10, 100, 100, Cyan);

		for (u32 Y = 0;
			Y < LEVEL_HEIGHT;
			Y++)
		{
			for (u32 X = 0;
				X < LEVEL_WIDTH;
				X++)
			{
				tile *Tile = GetTile(X, Y);
				if (Tile->Type == Tile_Filled)
				{
					//LD_RDrawQuad((I%24)*32, (I/24)*32, 32, 32, WHITE);
					f32 XPos = X*32;
					f32 YPos = Y*32;
					tile *OtherTile;

					/*OtherTile = GetTile(X+1, Y);
					if (!OtherTile || OtherTile->Type == Tile_Empty)
					{
						OtherTile = GetTile(X, Y-1);
						if (!OtherTile || OtherTile->Type == Tile_Empty)
						{
							LD_RDrawSprite(S_Tiles[4+0], XPos, YPos, 2);
						}
						else
						{
							LD_RDrawSprite(S_Tiles[0], XPos, YPos, 2);
						}
					}

					OtherTile = GetTile(X-1, Y);
					if (!OtherTile || OtherTile->Type == Tile_Empty)
					{
						LD_RDrawSprite(S_Tiles[1], XPos, YPos, 2);
					}

					OtherTile = GetTile(X, Y+1);
					if (!OtherTile || OtherTile->Type == Tile_Empty)
					{
						LD_RDrawSprite(S_Tiles[2], XPos, YPos, 2);
					}

					OtherTile = GetTile(X, Y-1);
					if (!OtherTile || OtherTile->Type == Tile_Empty)
					{
						LD_RDrawSprite(S_Tiles[3], XPos, YPos, 2);
					}*/

					/*LD_RDrawSprite(S_Tiles[4+0], XPos, YPos, 2);

					if (CheckTileType(X-1, Y, Tile_Empty))
					{
						LD_RDrawSprite(S_Tiles[4+1], XPos, YPos, 2);
					}
					else
					{
						LD_RDrawSprite(S_Tiles[0], XPos, YPos, 2);
					}

					LD_RDrawSprite(S_Tiles[4+2], XPos, YPos, 2);
					LD_RDrawSprite(S_Tiles[4+3], XPos, YPos, 2);*/

					// Tile sides
#define TILE_PART 16
					if (CheckTileType(X, Y-1, Tile_Empty))
					{
						if (CheckTileType(X-1, Y, Tile_Empty))
						{
							LD_RDrawSprite(S_Tiles[8+0], XPos, YPos, 2);
						}
						else
						{
							LD_RDrawSprite(S_Tiles[0], XPos, YPos, 2);
						}
						if (CheckTileType(X+1, Y, Tile_Empty))
						{
							LD_RDrawSprite(S_Tiles[8+1], XPos+TILE_PART, YPos, 2);
						}
						else
						{
							LD_RDrawSprite(S_Tiles[1], XPos+TILE_PART, YPos, 2);
						}
					}
					if (CheckTileType(X+1, Y, Tile_Empty))
					{
						if (CheckTileType(X, Y-1, Tile_Empty))
						{
							LD_RDrawSprite(S_Tiles[8+2], XPos+TILE_PART, YPos, 2);
						}
						else
						{
							LD_RDrawSprite(S_Tiles[2], XPos+TILE_PART, YPos, 2);
						}
						if (CheckTileType(X, Y+1, Tile_Empty))
						{
							LD_RDrawSprite(S_Tiles[8+3], XPos+TILE_PART, YPos+TILE_PART, 2);
						}
						else
						{
							LD_RDrawSprite(S_Tiles[3], XPos+TILE_PART, YPos+TILE_PART, 2);
						}
					}
					if (CheckTileType(X-1, Y, Tile_Empty))
					{
						if (CheckTileType(X, Y-1, Tile_Empty))
						{
							LD_RDrawSprite(S_Tiles[8+4], XPos, YPos, 2);
						}
						else
						{
							LD_RDrawSprite(S_Tiles[4], XPos, YPos, 2);
						}
						if (CheckTileType(X, Y+1, Tile_Empty))
						{
							LD_RDrawSprite(S_Tiles[8+5], XPos, YPos+TILE_PART, 2);
						}
						else
						{
							LD_RDrawSprite(S_Tiles[5], XPos, YPos+TILE_PART, 2);
						}
					}
					
					if (CheckTileType(X, Y+1, Tile_Empty))
					{
						if (CheckTileType(X-1, Y, Tile_Empty))
						{
							LD_RDrawSprite(S_Tiles[8+6], XPos, YPos+TILE_PART, 2);
						}
						else
						{
							LD_RDrawSprite(S_Tiles[6], XPos, YPos+TILE_PART, 2);
						}
						if (CheckTileType(X+1, Y, Tile_Empty))
						{
							LD_RDrawSprite(S_Tiles[8+7], XPos+TILE_PART, YPos+TILE_PART, 2);
						}
						else
						{
							LD_RDrawSprite(S_Tiles[7], XPos+TILE_PART, YPos+TILE_PART, 2);
						}
					}
				}
			}
		}

		//LD_RDrawSprite(SpriteLevel, 200, 10, 4);

		//LD_RDrawSprite(Ghost, 10, 100, 2);
		//LD_RDrawSprite(S_Pacman, 200, 100, 2);

		// Ghosts
		for (u32 GhostIndex = 0;
				GhostIndex < GhostCount;
				GhostIndex++)
		{
			entity *Ghost = &Ghosts[GhostIndex];

			// Movement
			if (Ghost->Counter > 0)
			{
				Ghost->Counter--;
				if (Ghost->Counter < 1)
				{
					Ghost->Counter = MOVEMENT_COUNTER;

					Ghost->LastTilePosX = Ghost->TilePosX;
					Ghost->LastTilePosY = Ghost->TilePosY;

					b32 Moved = FALSE;
					while (!Moved)
					{
						u32 NewDir = RandomInt(4);
						if (NewDir != Opposites[Ghost->Dir])
						{
							switch (NewDir)
							{
								case Dir_Right:
								{
									tile_position NewPos;
									if (CheckTileEmpty(&NewPos,
										Ghost->TilePosX+1, Ghost->TilePosY))
									{
										Ghost->TilePosX = NewPos.X;
										Ghost->Dir = Dir_Right;
										Moved = TRUE;
									}
								}
								break;
								case Dir_Left:
								{
									tile_position NewPos;
									if (CheckTileEmpty(&NewPos,
										Ghost->TilePosX-1, Ghost->TilePosY))
									{
										Ghost->TilePosX = NewPos.X;
										Ghost->Dir = Dir_Left;
										Moved = TRUE;
									}
								}
								break;
								case Dir_Down:
								{
									tile_position NewPos;
									if (CheckTileEmpty(&NewPos,
										Ghost->TilePosX, Ghost->TilePosY+1))
									{
										Ghost->TilePosY = NewPos.Y;
										Ghost->Dir = Dir_Down;
										Moved = TRUE;
									}
								}
								break;
								case Dir_Up:
								{
									tile_position NewPos;
									if (CheckTileEmpty(&NewPos,
										Ghost->TilePosX, Ghost->TilePosY-1))
									{
										Ghost->TilePosY = NewPos.Y;
										Ghost->Dir = Dir_Up;
										Moved = TRUE;
									}
								}
								break;
							}
						}
					}

					/*switch (Blinky.Dir)
					{
						case Dir_Right:
						{
						}
						break;
						case Dir_Left:
						{
							Blinky.TilePosX--;
						}
						break;
					}*/

					if (Ghost->TilePosX >= LEVEL_WIDTH)
					{
						Ghost->TilePosX = 0;
					}
					if (Ghost->TilePosX < 0)
					{
						Ghost->TilePosX = LEVEL_WIDTH-1;
					}
					if (Ghost->TilePosY >= LEVEL_HEIGHT)
					{
						Ghost->TilePosY = 0;
					}
					if (Ghost->TilePosY < 0)
					{
						Ghost->TilePosY = LEVEL_HEIGHT-1;
					}
				}
			}

			// Animation
			Ghost->AniCounter += 0.1f;
			if (Ghost->AniCounter >= 2.0f)
			{
				Ghost->AniCounter = 0.0f;
			}

			u32 AniFrame = (u32)Ghost->AniCounter;

			// Render
			f32 RenderPosXDiff = ((f32)(Ghost->LastTilePosX*TILE_SIZE)-(f32)(Ghost->TilePosX*TILE_SIZE));
			f32 RenderPosX = (Ghost->TilePosX*TILE_SIZE) + RenderPosXDiff*((f32)Ghost->Counter/MOVEMENT_COUNTER);
			if (Ghost->LastTilePosX > Ghost->TilePosX)
			{
				if (Ghost->LastTilePosX - Ghost->TilePosX > 1)
				{
					RenderPosX = Ghost->LastTilePosX*TILE_SIZE;
				}
			}
			else
			{
				if (Ghost->TilePosX - Ghost->LastTilePosX > 1)
				{
					RenderPosX = Ghost->LastTilePosX*TILE_SIZE;
				}
			}
			f32 RenderPosYDiff = ((f32)(Ghost->LastTilePosY*TILE_SIZE)-(f32)(Ghost->TilePosY*TILE_SIZE));
			f32 RenderPosY = (Ghost->TilePosY*TILE_SIZE) + RenderPosYDiff*((f32)Ghost->Counter/MOVEMENT_COUNTER);
			LD_RDrawSprite(S_Ghosts[(AniFrame*16)+(Ghost->ID*4)+Ghost->Dir],
						   RenderPosX,
						   RenderPosY, 2);
		}

		//Player/PacMan
		/*for (u32 BitIndex = 0;
			BitIndex < 32;
			BitIndex++)
		{
			if (Keys & ())
			OutputDebugString();
		}*/
		if (Keys & Key_Left)
		{
			PacMan.RequestedDir = Dir_Left;
		}
		if (Keys & Key_Right)
		{
			PacMan.RequestedDir = Dir_Right;
		}
		if (Keys & Key_Up)
		{
			PacMan.RequestedDir = Dir_Up;
		}
		if (Keys & Key_Down)
		{
			PacMan.RequestedDir = Dir_Down;
		}

		PacMan.Counter--;
		if (PacMan.Counter < 1)
		{
			PacMan.AniCounter = 0.0f;
			PacMan.Counter = PACMAN_MOVEMENT_COUNTER;
			PacMan.LastTilePosX = PacMan.TilePosX;
			PacMan.LastTilePosY = PacMan.TilePosY;

			if (PacMan.RequestedDir == Dir_Left)
			{
				tile_position Pos;
				if (CheckTileEmpty(&Pos, PacMan.TilePosX-1, PacMan.TilePosY))
				{
					PacMan.Dir = PacMan.RequestedDir;
				}
			}
			if (PacMan.RequestedDir == Dir_Right)
			{
				tile_position Pos;
				if (CheckTileEmpty(&Pos, PacMan.TilePosX+1, PacMan.TilePosY))
				{
					PacMan.Dir = PacMan.RequestedDir;
				}
			}
			if (PacMan.RequestedDir == Dir_Up)
			{
				tile_position Pos;
				if (CheckTileEmpty(&Pos, PacMan.TilePosX, PacMan.TilePosY-1))
				{
					PacMan.Dir = PacMan.RequestedDir;
				}
			}
			if (PacMan.RequestedDir == Dir_Down)
			{
				tile_position Pos;
				if (CheckTileEmpty(&Pos, PacMan.TilePosX, PacMan.TilePosY+1))
				{
					PacMan.Dir = PacMan.RequestedDir;
				}
			}

			PacMan.Counter = PACMAN_MOVEMENT_COUNTER;
			if (PacMan.Dir == Dir_Left)
			{
				tile_position Pos;
				if (CheckTileEmpty(&Pos, PacMan.TilePosX-1, PacMan.TilePosY))
				{
					PacMan.TilePosX = Pos.X;
				}
			}
			if (PacMan.Dir == Dir_Right)
			{
				tile_position Pos;
				if (CheckTileEmpty(&Pos, PacMan.TilePosX+1, PacMan.TilePosY))
				{
					PacMan.TilePosX = Pos.X;
				}
			}
			if (PacMan.Dir == Dir_Up)
			{
				tile_position Pos;
				if (CheckTileEmpty(&Pos, PacMan.TilePosX, PacMan.TilePosY-1))
				{
					PacMan.TilePosY = Pos.Y;
				}
			}
			if (PacMan.Dir == Dir_Down)
			{
				tile_position Pos;
				if (CheckTileEmpty(&Pos, PacMan.TilePosX, PacMan.TilePosY+1))
				{
					PacMan.TilePosY = Pos.Y;
				}
			}
		}

		b32 Moving = PacMan.LastTilePosX != PacMan.TilePosX ||
			PacMan.LastTilePosY != PacMan.TilePosY;

		if (Moving)
		{
			PacMan.AniCounter += 4.0f / PACMAN_MOVEMENT_COUNTER;
			if (PacMan.AniCounter >= 4.0f)
			{
				PacMan.AniCounter = 0.0f;
			}
		}
		u32 AniFrame = (u32)PacMan.AniCounter;
		/*if (!Moving)
		{
			AniFrame = 1;
		}*/

		s32 Angles[] = { 0, 180, 90, 270 };

		f32 RenderPosXDiff = ((f32)(PacMan.LastTilePosX*TILE_SIZE)-(f32)(PacMan.TilePosX*TILE_SIZE));
		f32 RenderPosX = (PacMan.TilePosX*TILE_SIZE) + RenderPosXDiff*((f32)PacMan.Counter/PACMAN_MOVEMENT_COUNTER);
		f32 RenderPosYDiff = ((f32)(PacMan.LastTilePosY*TILE_SIZE)-(f32)(PacMan.TilePosY*TILE_SIZE));
		f32 RenderPosY = (PacMan.TilePosY*TILE_SIZE) + RenderPosYDiff*((f32)PacMan.Counter/PACMAN_MOVEMENT_COUNTER);
		LD_RDrawSpriteRotate(S_Pacman[AniFrame],
						   RenderPosX,
						   RenderPosY, 2, Angles[PacMan.Dir]);

		LD_UpdateWindow(&Window);
	}

	LD_Exit();
	return 0;
}