Only mark dialog unread if they said something, debug draw memories that have speech

main
Cameron Murphy Reikes 10 months ago
parent f6997cfce0
commit b326324c84

@ -6210,7 +6210,8 @@ ISANERROR("Don't know how to do this stuff on this platform.")
new_unread = MD_PushArray(persistent_arena, ListOfEntities, 1);
}
new_unread->referring_to = frome(it);
MD_DblPushBack(unread_first, unread_last, new_unread);
if(out.speech_length > 0)
MD_DblPushBack(unread_first, unread_last, new_unread);
}
else
{
@ -7434,7 +7435,6 @@ ISANERROR("Don't know how to do this stuff on this platform.")
draw_quad((DrawParams){quad_at(V2(screen_size().x - depth_size.x, screen_size().y), depth_size), IMG(state.shadows.color_img), WHITE, .layer = LAYER_UI_FG});
draw_quad((DrawParams){quad_at(V2(0.0, screen_size().y/2.0f), MulV2F(screen_size(), 0.1f)), IMG(state.outline_pass_image), WHITE, .layer = LAYER_UI_FG});
//dbgsquare(mouse_pos);
Vec3 view_cam_pos = MulM4V4(InvGeneralM4(view), V4(0,0,0,1)).xyz;
Vec3 world_mouse = screenspace_point_to_camera_point(mouse_pos);
Vec3 mouse_ray = NormV3(SubV3(world_mouse, view_cam_pos));
@ -7446,10 +7446,25 @@ ISANERROR("Don't know how to do this stuff on this platform.")
dbgcol(PINK)
{
dbgplanerect(entity_aabb(*it));
// debug draw memories of hovered
Entity *to_view = *it;
Vec2 start_at = V2(0,300);
Vec2 cur_pos = start_at;
AABB bounds = draw_text((TextParams){false, MD_S8Fmt(frame_arena, "--Memories for %s--", characters[to_view->npc_kind].name), cur_pos, WHITE, 1.0});
cur_pos.y -= aabb_size(bounds).y;
for(Memory *cur = to_view->memories_first; cur; cur = cur->next)
if(cur->speech_length > 0)
{
MD_String8 text = MD_S8Fmt(frame_arena, "%s%s: %.*s", to_view->npc_kind == cur->context.author_npc_kind ? "(Me) " : "", characters[cur->context.author_npc_kind].name, cur->speech_length, cur->speech);
AABB bounds = draw_text((TextParams){false, text, cur_pos, WHITE, 1.0});
cur_pos.y -= aabb_size(bounds).y;
}
}
break;
}
//dbgsquare3d(plane_point(gs.player->pos));
Vec2 pos = V2(0.0, screen_size().Y);
int num_entities = 0;

Loading…
Cancel
Save