Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs3-24sp
project03
Commits
a920818f
Commit
a920818f
authored
1 year ago
by
Eshani J. Patel
Browse files
Options
Download
Email Patches
Plain Diff
Fix list.wasm.ref.o
parent
96e41d11
ref_fix
Pipeline
#102602
failed with stage
in 0 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
include/body.h
+3
-4
include/body.h
library/sdl_wrapper.c
+1
-1
library/sdl_wrapper.c
ref/body.wasm.ref.o
+0
-0
ref/body.wasm.ref.o
ref/list.wasm.ref.o
+0
-0
ref/list.wasm.ref.o
ref/polygon.wasm.ref.o
+0
-0
ref/polygon.wasm.ref.o
ref/sdl_wrapper.wasm.ref.o
+0
-0
ref/sdl_wrapper.wasm.ref.o
with
4 additions
and
5 deletions
+4
-5
include/body.h
View file @
a920818f
...
@@ -38,7 +38,7 @@ void body_free(body_t *body);
...
@@ -38,7 +38,7 @@ void body_free(body_t *body);
* Returns a newly allocated vector list, which must be list_free()d.
* Returns a newly allocated vector list, which must be list_free()d.
*
*
* @param body a pointer to a body returned from body_init()
* @param body a pointer to a body returned from body_init()
* @return the
polygon
describing the body's current position
* @return the
list of points
describing the body's current position
*/
*/
list_t
*
body_get_shape
(
body_t
*
body
);
list_t
*
body_get_shape
(
body_t
*
body
);
...
@@ -113,8 +113,7 @@ double body_get_rotation(body_t *body);
...
@@ -113,8 +113,7 @@ double body_get_rotation(body_t *body);
void
body_set_rotation
(
body_t
*
body
,
double
angle
);
void
body_set_rotation
(
body_t
*
body
,
double
angle
);
/**
/**
* Moves a body at its current velocity over a given time interval based total
* Translates a body based on its current velocity over a given time interval.
* force acting upon body.
*
*
* @param body the body to tick
* @param body the body to tick
* @param dt the number of seconds elapsed since the last tick
* @param dt the number of seconds elapsed since the last tick
...
@@ -129,4 +128,4 @@ void body_tick(body_t *body, double dt);
...
@@ -129,4 +128,4 @@ void body_tick(body_t *body, double dt);
*/
*/
double
body_get_mass
(
body_t
*
body
);
double
body_get_mass
(
body_t
*
body
);
#endif // #ifndef __BODY_H__
#endif // #ifndef __BODY_H__
\ No newline at end of file
This diff is collapsed.
Click to expand it.
library/sdl_wrapper.c
View file @
a920818f
...
@@ -208,7 +208,7 @@ void sdl_render_scene(scene_t *scene) {
...
@@ -208,7 +208,7 @@ void sdl_render_scene(scene_t *scene) {
body_t
*
body
=
scene_get_body
(
scene
,
i
);
body_t
*
body
=
scene_get_body
(
scene
,
i
);
list_t
*
shape
=
body_get_shape
(
body
);
list_t
*
shape
=
body_get_shape
(
body
);
polygon_t
*
poly
=
polygon_t
*
poly
=
polygon_init
(
shape
,
(
vector_t
){
0
,
0
},
(
vector_t
){
0
,
0
},
0
,
0
,
0
,
0
);
polygon_init
(
shape
,
(
vector_t
){
0
,
0
},
0
,
0
,
0
,
0
);
sdl_draw_polygon
(
poly
,
body_get_color
(
body
));
sdl_draw_polygon
(
poly
,
body_get_color
(
body
));
list_free
(
shape
);
list_free
(
shape
);
}
}
...
...
This diff is collapsed.
Click to expand it.
ref/body.wasm.ref.o
View file @
a920818f
No preview for this file type
This diff is collapsed.
Click to expand it.
ref/list.wasm.ref.o
View file @
a920818f
No preview for this file type
This diff is collapsed.
Click to expand it.
ref/polygon.wasm.ref.o
View file @
a920818f
No preview for this file type
This diff is collapsed.
Click to expand it.
ref/sdl_wrapper.wasm.ref.o
View file @
a920818f
No preview for this file type
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help