Vignette in front

main
Cameron Murphy Reikes 2 years ago
parent 25608b58ed
commit c0ebdc758f

@ -2707,7 +2707,7 @@ void frame(void)
}
else
{
SAY(ACT_none, "I am an NPC");
SAY(ACT_fights_player, "I am an NPC");
}
Perception p = {0};
assert(parse_ai_response(it, mocked_ai_response.data, &p));
@ -2960,7 +2960,7 @@ void frame(void)
// hurt vignette
if(player->damage > 0.0)
{
draw_quad((DrawParams){false, (Quad){.ul=V2(0.0f, screen_size().Y), .ur = screen_size(), .lr = V2(screen_size().X, 0.0f)}, image_hurt_vignette, full_region(image_hurt_vignette), (Color){1.0f, 1.0f, 1.0f, player->damage}});
draw_quad((DrawParams){false, (Quad){.ul=V2(0.0f, screen_size().Y), .ur = screen_size(), .lr = V2(screen_size().X, 0.0f)}, image_hurt_vignette, full_region(image_hurt_vignette), (Color){1.0f, 1.0f, 1.0f, player->damage}, .y_coord_sorting = 1.0f, .queue_for_translucent = true});
}
}

@ -188,32 +188,34 @@ void fill_available_actions(Entity *it, AvailableActions *a)
void process_perception(Entity *it, Perception p)
{
assert(it->is_npc);
if(p.type != NPCDialog) it->perceptions_dirty = true;
if(!BUFF_HAS_SPACE(&it->remembered_perceptions)) BUFF_REMOVE_FRONT(&it->remembered_perceptions);
BUFF_APPEND(&it->remembered_perceptions, p);
if(p.type == PlayerHeldItemChanged)
{
it->last_seen_holding_kind = p.holding;
}
else if(p.type == NPCDialog)
if(it->is_npc)
{
if(p.npc_action_type == ACT_allows_player_to_pass)
{
it->target_goto = AddV2(it->pos, V2(-50.0, 0.0));
it->moved = true;
}
else if(p.npc_action_type == ACT_fights_player)
{
it->standing = STANDING_FIGHTING;
}
else if(p.npc_action_type == ACT_leaves_player)
if(p.type != NPCDialog) it->perceptions_dirty = true;
if(!BUFF_HAS_SPACE(&it->remembered_perceptions)) BUFF_REMOVE_FRONT(&it->remembered_perceptions);
BUFF_APPEND(&it->remembered_perceptions, p);
if(p.type == PlayerHeldItemChanged)
{
it->standing = STANDING_INDIFFERENT;
it->last_seen_holding_kind = p.holding;
}
else if(p.npc_action_type == ACT_joins_player)
else if(p.type == NPCDialog)
{
it->standing = STANDING_JOINED;
if(p.npc_action_type == ACT_allows_player_to_pass)
{
it->target_goto = AddV2(it->pos, V2(-50.0, 0.0));
it->moved = true;
}
else if(p.npc_action_type == ACT_fights_player)
{
it->standing = STANDING_FIGHTING;
}
else if(p.npc_action_type == ACT_leaves_player)
{
it->standing = STANDING_INDIFFERENT;
}
else if(p.npc_action_type == ACT_joins_player)
{
it->standing = STANDING_JOINED;
}
}
}
}

@ -13,7 +13,7 @@ DON'T NEED - Old man in beginning is invincible
- Style buttons
- Make map better
DONE - Fade dialog with distance
- Make vignette in front
DONE - Make vignette in front
- Ignore keyrepeat events
- Remove control attack key as devtools
- Particle fx and sound fx for when hit

Loading…
Cancel
Save