Skip to content

Commit

Permalink
Fix Codacy badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Crayon2000 committed Apr 6, 2024
1 parent 945ef54 commit 070de48
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Wii-Tac-Toe

[![Actions Status](https://github.com/Crayon2000/Wii-Tac-Toe/actions/workflows/ci.yml/badge.svg)](https://github.com/Crayon2000/Wii-Tac-Toe/actions)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ab38c1f3adee4d629c72d285efee6a73)](https://www.codacy.com/app/Crayon2000/Wii-Tac-Toe?utm_source=github.com&utm_medium=referral&utm_content=Crayon2000/Wii-Tac-Toe&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ab38c1f3adee4d629c72d285efee6a73)](https://app.codacy.com/gh/Crayon2000/Wii-Tac-Toe/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

Wii-Tac-Toe is a Tic-Tac-Toe game for the Nintendo Wii. It was programmed in C++ using devkitPro along with GRRLIB.

Expand Down
4 changes: 2 additions & 2 deletions source/cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ void Cursor::Paint()
if(Visible == true)
{
// Draw the shadow
GRRLIB_DrawTile(Left + 3, Top + 3, (GRRLIB_texImg *)Cursors, Angle, 1, 1, 0x00000000 | ((A(Color) == 0xFF) ? 0x44 : 0x11), Frame);
Cursors->DrawTile(Left + 3, Top + 3, Angle, 1, 1, 0x00000000 | ((A(Color) == 0xFF) ? 0x44 : 0x11), Frame);
// Draw the cursor
GRRLIB_DrawTile(Left, Top, (GRRLIB_texImg *)Cursors, Angle, 1, 1, Color, Frame);
Cursors->DrawTile(Left, Top, Angle, 1, 1, Color, Frame);
}
}

Expand Down
16 changes: 16 additions & 0 deletions source/grrlib_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,22 @@ void Texture::Draw(const f32 xpos, const f32 ypos)
Draw(xpos, ypos, _Angle, _ScaleX, _ScaleY, _Color);
}

/**
* Draw a tile.
* @param xpos Specifies the x-coordinate of the upper-left corner.
* @param ypos Specifies the y-coordinate of the upper-left corner.
* @param degrees Angle of rotation.
* @param scaleX Specifies the x-coordinate scale. -1 could be used for flipping the texture horizontally.
* @param scaleY Specifies the y-coordinate scale. -1 could be used for flipping the texture vertically.
* @param color Color in RGBA format.
* @param frame Specifies the frame to draw.
*/
void Texture::DrawTile(const f32 xpos, const f32 ypos, const f32 degrees,
const f32 scaleX, const f32 scaleY, const u32 color, int frame)
{
GRRLIB_DrawTile(xpos, ypos, this, degrees, scaleX, scaleY, color, frame);
}

/**
* Make a snapshot of the screen in a texture WITHOUT ALPHA LAYER.
* @param posx top left corner of the grabbed part. Default is 0.
Expand Down
2 changes: 2 additions & 0 deletions source/grrlib_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class Texture : protected GRRLIB_texImg
const f32 scaleX, const f32 scaleY);
void Draw(const f32 xpos, const f32 ypos, const f32 degrees);
void Draw(const f32 xpos, const f32 ypos);
void DrawTile(const f32 xpos, const f32 ypos, const f32 degrees,
const f32 scaleX, const f32 scaleY, const u32 color, int frame);
void CopyScreen(u16 posx = 0, u16 posy = 0, bool clear = false);
void SetColor(u32);
u32 GetColor(void);
Expand Down

0 comments on commit 070de48

Please sign in to comment.