Compare commits

...

2 Commits

Author SHA1 Message Date
Ryan Walters
e87d458121 fix: set PlayerLives default to 3, use resource for HUD lives count in top left
yes I am fully aware that the UP is not the player lives, I'm just
wanting the indicator to be somewhere and I'll make the proper indicator
tomorrow probably
2025-09-08 01:23:26 -05:00
Ryan Walters
44f0b5d373 fix: use coveralls in README, use proper 'coverage' recipe, remove codecov.yml 2025-09-08 01:18:55 -05:00
7 changed files with 10 additions and 12 deletions

View File

@@ -46,7 +46,7 @@ jobs:
- name: Generate coverage report
run: |
just coverage-lcov
just coverage
- name: Coveralls upload
uses: coverallsapp/github-action@v2

2
Cargo.lock generated
View File

@@ -663,7 +663,7 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
name = "pacman"
version = "0.77.0"
version = "0.77.1"
dependencies = [
"anyhow",
"bevy_ecs",

View File

@@ -1,6 +1,6 @@
[package]
name = "pacman"
version = "0.77.0"
version = "0.77.1"
authors = ["Xevion"]
edition = "2021"
rust-version = "1.86.0"

View File

@@ -1,16 +1,16 @@
# Pac-Man
[![Tests Status][badge-test]][test] [![Build Status][badge-build]][build] [![Code Coverage][badge-coverage]][coverage] [![Online Demo][badge-online-demo]][demo] [![Last Commit][badge-last-commit]][commits]
[![Tests Status][badge-test]][test] [![Build Status][badge-build]][build] [![If you're seeing this, Coveralls.io is broken again and it's not my fault.][badge-coverage]][coverage] [![Online Demo][badge-online-demo]][demo] [![Last Commit][badge-last-commit]][commits]
[badge-test]: https://github.com/Xevion/Pac-Man/actions/workflows/tests.yaml/badge.svg
[badge-build]: https://github.com/Xevion/Pac-Man/actions/workflows/build.yaml/badge.svg
[badge-coverage]: https://codecov.io/github/Xevion/Pac-Man/branch/master/graph/badge.svg?token=R2RBYUQK3I
[badge-coverage]: https://coveralls.io/repos/github/Xevion/Pac-Man/badge.svg?branch=master
[badge-demo]: https://img.shields.io/github/deployments/Xevion/Pac-Man/github-pages?label=GitHub%20Pages
[badge-online-demo]: https://img.shields.io/badge/GitHub%20Pages-Demo-brightgreen
[badge-last-commit]: https://img.shields.io/github/last-commit/Xevion/Pac-Man
[build]: https://github.com/Xevion/Pac-Man/actions/workflows/build.yaml
[test]: https://github.com/Xevion/Pac-Man/actions/workflows/tests.yaml
[coverage]: https://codecov.io/github/Xevion/Pac-Man
[coverage]: https://coveralls.io/github/Xevion/Pac-Man?branch=master
[demo]: https://xevion.github.io/Pac-Man/
[commits]: https://github.com/Xevion/Pac-Man/commits/master

View File

@@ -1,3 +0,0 @@
ignore:
- "src/(?:bin|platform))/.+\\.rs"
- "src/(?:app|events|formatter)\\.rs"

View File

@@ -2,7 +2,7 @@ use crate::map::builder::Map;
use crate::systems::input::TouchState;
use crate::systems::{
debug_render_system, BatchedLinesResource, Collider, CursorPosition, DebugState, DebugTextureResource, DeltaTime,
DirectionalAnimation, Dying, Frozen, GameStage, LinearAnimation, Looping, Position, Renderable, ScoreResource,
DirectionalAnimation, Dying, Frozen, GameStage, LinearAnimation, Looping, PlayerLives, Position, Renderable, ScoreResource,
StartupSequence, SystemId, SystemTimings, TtfAtlasResource, Velocity,
};
use crate::texture::sprite::SpriteAtlas;
@@ -204,6 +204,7 @@ pub fn hud_render_system(
mut backbuffer: NonSendMut<BackbufferResource>,
mut canvas: NonSendMut<&mut Canvas<Window>>,
mut atlas: NonSendMut<SpriteAtlas>,
player_lives: Res<PlayerLives>,
score: Res<ScoreResource>,
stage: Res<GameStage>,
mut errors: EventWriter<GameError>,
@@ -212,7 +213,7 @@ pub fn hud_render_system(
let mut text_renderer = TextTexture::new(1.0);
// Render lives and high score text in white
let lives = 3; // TODO: Get from actual lives resource
let lives = player_lives.0;
let lives_text = format!("{lives}UP HIGH SCORE ");
let lives_position = glam::UVec2::new(4 + 8 * 3, 2); // x_offset + lives_offset * 8, y_offset

View File

@@ -78,7 +78,7 @@ pub struct PlayerLives(pub u8);
impl Default for PlayerLives {
fn default() -> Self {
Self(1)
Self(3)
}
}