Cleanup
This commit is contained in:
@@ -1,20 +1,27 @@
|
|||||||
{
|
{
|
||||||
description = "game";
|
description = "game engine";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs =
|
||||||
|
{ self, nixpkgs }:
|
||||||
let
|
let
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" ];
|
||||||
|
|
||||||
forAllSystems = f:
|
forAllSystems =
|
||||||
nixpkgs.lib.genAttrs systems (system:
|
f:
|
||||||
f (import nixpkgs {
|
nixpkgs.lib.genAttrs systems (
|
||||||
inherit system;
|
system:
|
||||||
}));
|
f (
|
||||||
in {
|
import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
in
|
||||||
|
{
|
||||||
devShells = forAllSystems (pkgs: {
|
devShells = forAllSystems (pkgs: {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ERect : Element {
|
struct ERect : Element {
|
||||||
Color color = {255, 255, 255};
|
|
||||||
Vec2<float> shape = {0, 0};
|
Vec2<float> shape = {0, 0};
|
||||||
|
Color color = {255, 255, 255};
|
||||||
|
|
||||||
Vec2<float> size() override;
|
Vec2<float> size() override;
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -3,8 +3,12 @@
|
|||||||
|
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
struct Entity;
|
struct Entity {};
|
||||||
struct Component;
|
struct Component;
|
||||||
struct System;
|
struct System;
|
||||||
|
|
||||||
|
struct EntityPool {
|
||||||
|
Entity entities[];
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -58,12 +58,18 @@ rect.click do
|
|||||||
end
|
end
|
||||||
|
|
||||||
App.map_key :mouse_left, :action_name
|
App.map_key :mouse_left, :action_name
|
||||||
|
App.map_key :q, :quit
|
||||||
|
|
||||||
start = Time.now
|
start = Time.now
|
||||||
c_ = 0.0
|
c_ = 0.0
|
||||||
c_c = 0
|
c_c = 0
|
||||||
|
|
||||||
App.update do |delta_time|
|
App.update do |delta_time|
|
||||||
|
if App.pressed?(:quit)
|
||||||
|
App.exit!
|
||||||
|
next
|
||||||
|
end
|
||||||
|
|
||||||
c_ += delta_time
|
c_ += delta_time
|
||||||
c_c += 1
|
c_c += 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user