bucket renamed to edge2d and saves now; proper input blocking with reversed()

This commit is contained in:
2023-09-27 22:40:04 +00:00
parent 98ba229c9c
commit 70e4105e1b
10 changed files with 67 additions and 64 deletions

View File

@@ -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);

View File

@@ -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,

View File

@@ -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);
}