Finish dod and set perf testing
This commit is contained in:
10
no_dod.c
10
no_dod.c
@@ -1,3 +1,4 @@
|
||||
#include "raylib-src/src/raylib.h"
|
||||
#include "wapp.h"
|
||||
#include "common.h"
|
||||
#include "raylib.h"
|
||||
@@ -42,15 +43,14 @@ void move_wanderer(Wanderer *wanderer, const SlowZone *zones);
|
||||
void render_wanderer(const Wanderer *wanderer);
|
||||
void init_slow_zone(SlowZone *zone, XOR256State *state);
|
||||
|
||||
#ifndef NDEBUG
|
||||
void render_slow_zone(const SlowZone *zone);
|
||||
#endif
|
||||
|
||||
bool inside_zone(const Wanderer *wanderer, const SlowZone *zone);
|
||||
f32 get_random_float(XOR256State *state);
|
||||
|
||||
int main(void) {
|
||||
InitWindow(WIDTH, HEIGHT, "DOD test");
|
||||
SetTraceLogLevel(LOG_NONE);
|
||||
InitWindow(WIDTH, HEIGHT, "No-DOD test");
|
||||
SetTargetFPS(120);
|
||||
|
||||
Allocator arena = wapp_mem_arena_allocator_init(MB(20));
|
||||
@@ -85,11 +85,9 @@ int main(void) {
|
||||
|
||||
ClearBackground(BG_COLOR);
|
||||
|
||||
#ifndef NDEBUG
|
||||
for (u64 i = 0; i < ZONE_COUNT; ++i) {
|
||||
render_slow_zone(&(zones[i]));
|
||||
}
|
||||
#endif
|
||||
|
||||
for (u64 i = 0; i < WANDERER_COUNT; ++i) {
|
||||
render_wanderer(&(wanderers[i]));
|
||||
@@ -183,7 +181,6 @@ void init_slow_zone(SlowZone *zone, XOR256State *state) {
|
||||
};
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
void render_slow_zone(const SlowZone *zone) {
|
||||
DrawRectangleLines(
|
||||
zone->position.x,
|
||||
@@ -193,7 +190,6 @@ void render_slow_zone(const SlowZone *zone) {
|
||||
ZONE_COLOR
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool inside_zone(const Wanderer *wanderer, const SlowZone *zone) {
|
||||
f32 wanderer_min_x = wanderer->position.x + wanderer->scale.width;
|
||||
|
||||
Reference in New Issue
Block a user