소스 검색

formatting

pull/5345/head
RobinsAviary 3 달 전
부모
커밋
1bd7722557
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. +6
    -4
      examples/textures/textures_sprite_stacking.c

+ 6
- 4
examples/textures/textures_sprite_stacking.c 파일 보기

@ -57,11 +57,13 @@ int main(void)
stackSpacing = Clamp(stackSpacing, 0.0f, 5.0f);
// Add a positive/negative offset to spin right/left at different speeds
if (IsKeyDown(KEY_LEFT) || IsKeyDown(KEY_A)) {
if (IsKeyDown(KEY_LEFT) || IsKeyDown(KEY_A))
{
rotationSpeed -= speedChange;
}
if (IsKeyDown(KEY_RIGHT) || IsKeyDown(KEY_D)) {
if (IsKeyDown(KEY_RIGHT) || IsKeyDown(KEY_D))
{
rotationSpeed += speedChange;
}
@ -82,7 +84,8 @@ int main(void)
float scaledHeight = frameHeight*stackScale;
// Draw the stacked sprite, rotated to the correct angle, with an vertical offset applied based on its y location
for (int i = stackCount - 1; i >= 0; i--) {
for (int i = stackCount - 1; i >= 0; i--)
{
Rectangle source = { 0.0f, (float)i*frameHeight, frameWidth, frameHeight };
// Center vertically
Rectangle dest = { screenWidth/2.0f, (screenHeight/2.0f) + (i*stackSpacing) - (stackSpacing*stackCount/2.0f), scaledWidth, scaledHeight };
@ -103,7 +106,6 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadTexture(booth);
CloseWindow(); // Close window and OpenGL context

불러오는 중...
취소
저장