Skip to content

Commit

Permalink
some edits
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperErnD committed Jul 20, 2024
1 parent 2a69692 commit 8063bb7
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 15 deletions.
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# ⚠️ Maintenance notice ⚠️

## Chronical is now slowly developed due to electrical problems

> Is that end?
> No, its not end, its a temporary notice, maybe when electricy will be more stable (no shutdowns), that notice will be removed.
# ⚠️ Maintenance notice ⚠️

# hello this is chronical

its still in development, written in V
Expand Down
6 changes: 3 additions & 3 deletions client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ MAKE ?= make
libraylib.a:
cd raylib/src && $(MAKE) && cd ../..

build: libraylib.a
build:
$(V) -prod .

devbuild: libraylib.a
devbuild:
$(V) .

rundev: libraylib.a
rundev:
$(V) run .

.PHONY: libraylib.a build devbuild rundev
4 changes: 2 additions & 2 deletions client/src/engine/app.v
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ pub fn (mut e Engine) init(c types.RendererConfig) ! {

for mut renderer in preferred_renderers {
renderer.init(mut e.ctx, c) or {
println(err)
println('Failed to initialize this renderer, trying next')
log.error(err.str())
log.error('Failed to initialize this renderer, trying next')
continue
}

Expand Down
3 changes: 3 additions & 0 deletions client/src/engine/renderers/gg_renderer.v
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ pub fn (mut r GGRenderer) get_mouse_s() types.MouseState {
pub fn (mut r GGRenderer) begin_c2d(camera types.Camera2D) ! {
}

pub fn (mut r GGRenderer) end_c2d() ! {
}

pub fn (mut r GGRenderer) get_dpi() f32 {
return gg.dpi_scale()
}
Expand Down
3 changes: 3 additions & 0 deletions client/src/engine/renderers/null_renderer.v
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ pub fn (mut r NullRenderer) get_mouse_s() types.MouseState {
pub fn (mut r NullRenderer) begin_c2d(camera types.Camera2D) ! {
}

pub fn (mut r NullRenderer) end_c2d() ! {
}

pub fn (mut r NullRenderer) get_dpi() f32 {
return 0
}
Expand Down
1 change: 1 addition & 0 deletions client/src/engine/types/base_renderer.v
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ mut:
get_mouse_y() i32
get_mouse_s() MouseState
begin_c2d(Camera2D) !
end_c2d() !
get_dpi() f32
get_res() (int, int)
}
13 changes: 13 additions & 0 deletions client/src/network/api.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// A file which implements API

module network

const api_endpoint = $d("api", "http://localhost:8000") // define your own API by adding -d api=server

pub struct API {
pub mut:
api_url string
mut:
auth_token string
refresh_token string
}
12 changes: 12 additions & 0 deletions client/src/screens/menu.v
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ pub fn (mut ms MenuScreen) draw(delta f32, mut ctx types.Context) ! {
ms.block = true
}

$if debug {
if ms.ui.button(types.Rect{ x: 0.92, y: 0.965, w: 0.08, h: 0.035 }, 'enter debugger', mut
types.Color{
a: 255
})!
{
$dbg
}
}



ms.ui.end()

ctx.r.end()
Expand Down

0 comments on commit 8063bb7

Please sign in to comment.