Name cache (#53)
Removed B3_BODY_NAME_LENGTH and B3_SHAPE_NAME_LENGTH. Now using a name cache instead to save memory and make recordings more universal. This is a recording version bump.
This commit is contained in:
parent
540ea387b0
commit
52f1a254ad
31 changed files with 759 additions and 824 deletions
|
|
@ -2,7 +2,6 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "gfx/debug_adapter.h"
|
||||
#include "gfx/draw.h"
|
||||
#include "gfx/keycodes.h"
|
||||
#include "imgui.h"
|
||||
#include "mesh_loader.h"
|
||||
|
|
@ -10,6 +9,8 @@
|
|||
|
||||
#include "box3d/box3d.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
class CardHouseThick : public Sample
|
||||
{
|
||||
public:
|
||||
|
|
@ -451,13 +452,9 @@ public:
|
|||
|
||||
b3ShapeDef shapeDef = b3DefaultShapeDef();
|
||||
shapeDef.baseMaterial.rollingResistance = 0.1f;
|
||||
|
||||
#if B3_SHAPE_NAME_LENGTH > 0
|
||||
char buffer[B3_SHAPE_NAME_LENGTH + 1];
|
||||
snprintf( buffer, sizeof( buffer ), "box_%d", i );
|
||||
char buffer[16];
|
||||
snprintf( buffer, sizeof( buffer ), "box_%.3d", i );
|
||||
shapeDef.name = buffer;
|
||||
#endif
|
||||
|
||||
b3CreateHullShape( bodyId, &shapeDef, &cube.base );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue