Skip to content

Commit

Permalink
box2D experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondra Voves committed Jun 7, 2019
1 parent fcde160 commit bc1d9fc
Show file tree
Hide file tree
Showing 31 changed files with 1,653 additions and 1,013 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ set(SOURCE_FILES
src/cetech/node_graph/private/node_test.c
src/cetech/node_graph_editor/private/node_graph_editor.cpp

src/cetech/physics2d/private/physics2d.c
src/cetech/physics2d_box2d/private/physics2d_box2d.cpp
src/cetech/parent/private/parent.c

)

################################################################################
Expand Down Expand Up @@ -204,6 +208,7 @@ set(RELEASE_LIBS

SDL2.a
yaml_static.a
Box2D.a

celib
)
Expand Down Expand Up @@ -248,7 +253,7 @@ target_include_directories(celib PUBLIC externals/build/${PLATFORM_ID}/release/)

add_executable(doc src/tools/doc/doc.c)
target_link_libraries(doc ${DEVELOP_LIBS})
target_include_directories(doc PUBLIC externals/build/${PLATFORM_ID}/elease/)
target_include_directories(doc PUBLIC externals/build/${PLATFORM_ID}/release/)

add_executable(hash src/tools/hash/hash.c)
target_link_libraries(hash ${DEVELOP_LIBS})
Expand Down
6 changes: 4 additions & 2 deletions examples/develop/src/components/c_gamepad_controler.inl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ static const ce_cdb_prop_def_t0 gamepad_controler_compo_prop[] = {
},
};

static void _gamepad_controler_on_spawn(uint64_t obj,
void *data) {
static void _gamepad_controler_on_spawn(ct_world_t0 world,
ce_cdb_t0 db,
uint64_t obj,
void *data) {
gamepad_controler_component *c = data;
ce_cdb_a0->read_to(ce_cdb_a0->db(), obj, c, sizeof(gamepad_controler_component));

Expand Down
6 changes: 4 additions & 2 deletions examples/develop/src/components/c_rectangle.inl
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ static uint64_t rectangle_size() {
return sizeof(rectangle_component);
}

static void _rectangle_on_spawn(uint64_t obj,
void *data) {
static void _rectangle_on_spawn(ct_world_t0 world,
ce_cdb_t0 db,
uint64_t obj,
void *data) {
rectangle_component *c = data;
ce_cdb_a0->read_to(ce_cdb_a0->db(), obj, c, sizeof(rectangle_component));
}
Expand Down
49 changes: 0 additions & 49 deletions examples/develop/src/components/c_velocity.inl

This file was deleted.

28 changes: 1 addition & 27 deletions examples/develop/src/content/ceong/ball.entity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,10 @@ components:
cdb_type: cdb_objset
0x67f9896de60ec93d:
cdb_uid: 0x67f9896de60ec93d
cdb_type: transform
position:
cdb_uid: 0x631032765594592
cdb_type: position
x: 222.000015
y: 126.000008
z: 1.000000
rotation:
cdb_uid: 0xa4687ce0e4a3c1e7
cdb_type: rotation
x: 0.000000
y: 0.000000
z: 0.000000
scale:
cdb_uid: 0x429ff69a63ee3e3c
cdb_type: scale
x: 1.000000
y: 1.000000
z: 1.000000
cdb_type: local_to_world
0x2fef2a3fb338ba91:
cdb_uid: 0x2fef2a3fb338ba91
cdb_type: ball
0xb482192d3b8336e6:
cdb_uid: 0xb482192d3b8336e6
cdb_type: velocity
velocity:
cdb_uid: 0x52b992e6bacdb33b
cdb_type: vec2_t
x: 0.000000
y: 0.000000
0x50c5dbcdff5e53dd:
cdb_uid: 0x50c5dbcdff5e53dd
cdb_type: rectangle
Expand Down
Loading

0 comments on commit bc1d9fc

Please sign in to comment.