mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-06 21:15:48 -06:00
chore: set explicit ARGB8888 pixel format for transparency support, 'web' task with caddy fs
This commit is contained in:
2
Justfile
2
Justfile
@@ -41,4 +41,4 @@ samply:
|
|||||||
|
|
||||||
# Build the project for Emscripten
|
# Build the project for Emscripten
|
||||||
web:
|
web:
|
||||||
bun run web.build.ts
|
bun run web.build.ts; caddy file-server --root dist
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ impl Game {
|
|||||||
// Create debug texture at output resolution for crisp debug rendering
|
// Create debug texture at output resolution for crisp debug rendering
|
||||||
let output_size = canvas.output_size().unwrap();
|
let output_size = canvas.output_size().unwrap();
|
||||||
let mut debug_texture = texture_creator
|
let mut debug_texture = texture_creator
|
||||||
.create_texture_target(None, output_size.0, output_size.1)
|
.create_texture_target(Some(sdl2::pixels::PixelFormatEnum::ARGB8888), output_size.0, output_size.1)
|
||||||
.map_err(|e| GameError::Sdl(e.to_string()))?;
|
.map_err(|e| GameError::Sdl(e.to_string()))?;
|
||||||
|
|
||||||
// Debug texture is copied over the backbuffer, it requires transparency abilities
|
// Debug texture is copied over the backbuffer, it requires transparency abilities
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ pub fn requires_console() -> bool {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn get_canvas_size() -> Option<(u32, u32)> {
|
pub fn get_canvas_size() -> Option<(u32, u32)> {
|
||||||
let mut width = 0.0;
|
let mut width = 0.0;
|
||||||
let mut height = 0.0;
|
let mut height = 0.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user