Created
July 23, 2015 12:57
-
-
Save fl4shk/38aad2f67b70e6e9ff3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void generate_coll_point_group_16x16 ( const coll_box& the_coll_box, | |
coll_point_group& the_pt_group ) | |
{ | |
the_pt_group.correct_num_used_points_16x16 (); | |
// The collision points | |
vec2_f24p8 & pt_lt = the_pt_group.get_pt_lt_16x16 (), | |
& pt_lb = the_pt_group.get_pt_lb_16x16 (), | |
& pt_tl = the_pt_group.get_pt_tl_16x16 (), | |
& pt_tr = the_pt_group.get_pt_tr_16x16 (), | |
& pt_rt = the_pt_group.get_pt_rt_16x16 (), | |
& pt_rb = the_pt_group.get_pt_rb_16x16 (), | |
& pt_bl = the_pt_group.get_pt_bl_16x16 (), | |
& pt_br = the_pt_group.get_pt_br_16x16 (); | |
pt_lt.x = pt_lb.x = the_coll_box.left (); | |
pt_rt.x = pt_rb.x = the_coll_box.right (); | |
pt_lt.y.data = pt_rt.y.data = the_coll_box.top ().data | |
+ ( the_coll_box.size.y.data / 4 ); | |
pt_lb.y.data = pt_rb.y.data | |
= the_coll_box.bot ().data | |
- ( the_coll_box.size.y.data / 4 ); | |
pt_tl.x.data = pt_bl.x.data = the_coll_box.left ().data | |
+ ( the_coll_box.size.x.data / 4 ); | |
pt_tr.x.data = pt_br.x.data = the_coll_box.right ().data | |
- ( the_coll_box.size.x.data / 4 ); | |
pt_tl.y = pt_tr.y = the_coll_box.top (); | |
pt_bl.y = pt_br.y = the_coll_box.bot (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment