end of scaling issues (tm)
This commit is contained in:
parent
799e5ad9eb
commit
7eaa303d6f
4 changed files with 22 additions and 34 deletions
19
screens.odin
19
screens.odin
|
|
@ -50,22 +50,13 @@ draw_screen :: proc(state: ^GameState) {
|
|||
switch state.screen {
|
||||
case .TITLE:
|
||||
{
|
||||
rl.DrawRectangle(0, 0, state.screen_width, state.screen_height, rl.WHITE)
|
||||
rl.DrawRectangle(0, 0, state.screen_width, state.screen_height, rl.BLACK)
|
||||
|
||||
rl.DrawCircle(0, 0, 20, rl.RED)
|
||||
rl.DrawTexturePro(
|
||||
texture_atlas,
|
||||
{LOGO_TO[0].x, LOGO_TO[0].y, LOGO_TO[1].x, LOGO_TO[1].y},
|
||||
{
|
||||
f32(screen_width / GLOBAL_SPRITE_SCALE),
|
||||
f32(screen_height / GLOBAL_SPRITE_SCALE),
|
||||
LOGO_TO[1].x * 4,
|
||||
LOGO_TO[1].y * 4,
|
||||
},
|
||||
{
|
||||
f32(screen_width / GLOBAL_SPRITE_SCALE),
|
||||
f32(screen_height / GLOBAL_SPRITE_SCALE),
|
||||
},
|
||||
{0, 0, LOGO_TO[1].x * 4, LOGO_TO[1].y * 4},
|
||||
{f32(-screen_width/4), f32(-screen_height/3)},
|
||||
0,
|
||||
rl.GREEN,
|
||||
)
|
||||
|
|
@ -73,8 +64,8 @@ draw_screen :: proc(state: ^GameState) {
|
|||
size := rl.MeasureText(text, 20)
|
||||
rl.DrawText(
|
||||
text,
|
||||
(screen_width / 4) - (size / 2),
|
||||
(screen_height / 2) - 20,
|
||||
(screen_width / 2) - (size / 2),
|
||||
screen_height - 20,
|
||||
20,
|
||||
rl.DARKGREEN,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue