bucket renamed to edge2d and saves now; proper input blocking with reversed()
This commit is contained in:
@@ -435,7 +435,7 @@ struct phys2d_edge *Make2DEdge(int go) {
|
||||
new->shape.debugdraw = phys2d_dbgdrawedge;
|
||||
new->shape.moi = phys2d_edge_moi;
|
||||
new->shape.shape = NULL;
|
||||
new->shape.apply = phys2d_applyedge;
|
||||
new->shape.apply = NULL;
|
||||
new->draws = 0;
|
||||
new->closed = 0;
|
||||
phys2d_applyedge(new);
|
||||
|
||||
@@ -138,7 +138,7 @@ struct sFont *MakeFont(const char *fontfile, int height) {
|
||||
|
||||
stbtt_GetFontVMetrics(&fontinfo, &newfont->ascent, &newfont->descent, &newfont->linegap);
|
||||
newfont->emscale = stbtt_ScaleForMappingEmToPixels(&fontinfo, 16);
|
||||
newfont->linegap = (newfont->ascent - newfont->descent)* 2 * newfont->emscale;
|
||||
newfont->linegap = (newfont->ascent - newfont->descent) * newfont->emscale;
|
||||
|
||||
newfont->texID = sg_make_image(&(sg_image_desc){
|
||||
.type = SG_IMAGETYPE_2D,
|
||||
|
||||
@@ -97,7 +97,7 @@ void go_shape_apply(cpBody *body, cpShape *shape, struct gameobject *go) {
|
||||
cpShapeSetFilter(shape, filter);
|
||||
|
||||
struct phys2d_shape *ape = cpShapeGetUserData(shape);
|
||||
if (ape)
|
||||
if (ape && ape->apply)
|
||||
ape->apply(ape->data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user