all: rename mod.entities -> mod.__entities (private)

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-05-07 13:11:49 -07:00 committed by Stephen Gutekanst
parent 3bd46d078d
commit 69ff2e027f
16 changed files with 51 additions and 43 deletions

View file

@ -155,7 +155,7 @@ fn tick(
// Query all the entities that have the .follower tag indicating they should follow the player.
// TODO(important): better querying API
var archetypes_iter = core.entities.queryDeprecated(.{ .all = &.{
var archetypes_iter = core.__entities.queryDeprecated(.{ .all = &.{
.{ .app = &.{.follower} },
} });
while (archetypes_iter.next()) |archetype| {
@ -169,7 +169,7 @@ fn tick(
const close_dist = 1.0 / 15.0;
var avoidance = Vec3.splat(0);
var avoidance_div: f32 = 1.0;
var archetypes_iter_2 = core.entities.queryDeprecated(.{ .all = &.{
var archetypes_iter_2 = core.__entities.queryDeprecated(.{ .all = &.{
.{ .app = &.{.follower} },
} });
while (archetypes_iter_2.next()) |archetype_2| {

View file

@ -138,7 +138,7 @@ fn renderFrame(
defer encoder.release();
// Update uniform buffer
var archetypes_iter = core.entities.queryDeprecated(.{ .all = &.{
var archetypes_iter = core.__entities.queryDeprecated(.{ .all = &.{
.{ .renderer = &.{ .position, .scale } },
} });
var num_entities: usize = 0;

View file

@ -163,7 +163,7 @@ fn tick(
const delta_time = game.state().timer.lap();
// Animate entities
var archetypes_iter = core.entities.queryDeprecated(.{ .all = &.{
var archetypes_iter = core.__entities.queryDeprecated(.{ .all = &.{
.{ .mach_gfx_sprite = &.{.transform} },
} });
while (archetypes_iter.next()) |archetype| {
@ -174,7 +174,7 @@ fn tick(
// TODO: formatting
// TODO(Core)
if (location.x() < -@as(f32, @floatFromInt(mach.core.size().width)) / 1.5 or location.x() > @as(f32, @floatFromInt(mach.core.size().width)) / 1.5 or location.y() < -@as(f32, @floatFromInt(mach.core.size().height)) / 1.5 or location.y() > @as(f32, @floatFromInt(mach.core.size().height)) / 1.5) {
try core.entities.remove(id);
try core.__entities.remove(id);
game.state().sprites -= 1;
continue;
}

View file

@ -69,7 +69,7 @@ fn audioStateChange(
app: *Mod,
) !void {
// Find audio entities that are no longer playing
var archetypes_iter = audio.entities.queryDeprecated(.{ .all = &.{
var archetypes_iter = audio.__entities.queryDeprecated(.{ .all = &.{
.{ .mach_audio = &.{.playing} },
} });
while (archetypes_iter.next()) |archetype| {

View file

@ -79,7 +79,7 @@ fn audioStateChange(
app: *Mod,
) !void {
// Find audio entities that are no longer playing
var archetypes_iter = audio.entities.queryDeprecated(.{ .all = &.{.{ .mach_audio = &.{.playing} }} });
var archetypes_iter = audio.__entities.queryDeprecated(.{ .all = &.{.{ .mach_audio = &.{.playing} }} });
while (archetypes_iter.next()) |archetype| {
for (
archetype.slice(.entity, .id),

View file

@ -156,7 +156,7 @@ fn tick(
const delta_time = game.state().timer.lap();
// Rotate entities
var archetypes_iter = core.entities.queryDeprecated(.{ .all = &.{
var archetypes_iter = core.__entities.queryDeprecated(.{ .all = &.{
.{ .mach_gfx_sprite = &.{.transform} },
} });
while (archetypes_iter.next()) |archetype| {

View file

@ -199,7 +199,7 @@ fn tick(
const delta_time = game.state().timer.lap();
// Rotate entities
var archetypes_iter = core.entities.queryDeprecated(.{ .all = &.{
var archetypes_iter = core.__entities.queryDeprecated(.{ .all = &.{
.{ .mach_gfx_text = &.{.transform} },
} });
while (archetypes_iter.next()) |archetype| {
@ -283,7 +283,7 @@ fn endFrame(game: *Mod, text: *gfx.Text.Mod, core: *mach.Core.Mod) !void {
// Gather some text rendering stats
var num_texts: u32 = 0;
var num_glyphs: usize = 0;
var archetypes_iter = text.entities.queryDeprecated(.{ .all = &.{
var archetypes_iter = text.__entities.queryDeprecated(.{ .all = &.{
.{ .mach_gfx_text = &.{
.built,
} },