/apps/examples/cirlce-raster: update
This commit is contained in:
parent
09eac707c3
commit
844283c2fb
@ -13,4 +13,4 @@ set(SOURCE_FILES
|
||||
state.h
|
||||
)
|
||||
|
||||
use_townengine(${PROJECT_NAME} "${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
use_townengine("${SOURCE_FILES}" ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
@ -116,9 +116,9 @@ void game_tick(void) {
|
||||
input_action("up", "LCLICK");
|
||||
input_action("down", "RCLICK");
|
||||
|
||||
if (input_action_just_pressed("up"))
|
||||
if (input_action_pressed("up"))
|
||||
state->r += 1;
|
||||
if (input_action_just_pressed("down"))
|
||||
if (input_action_pressed("down") && state->r > 2)
|
||||
state->r -= 1;
|
||||
|
||||
int32_t const rsi = (int32_t)state->r * (int32_t)state->r;
|
||||
@ -135,7 +135,8 @@ void game_tick(void) {
|
||||
|
||||
draw_circle(mouse_snap, state->r * 8, (Color){125, 125, 125, 125});
|
||||
|
||||
benchmark(state);
|
||||
/* uncomment to see performance difference between variants */
|
||||
// benchmark(state);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user