Vignette in front

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

@ -2707,7 +2707,7 @@ void frame(void)
} }
else else
{ {
SAY(ACT_none, "I am an NPC"); SAY(ACT_fights_player, "I am an NPC");
} }
Perception p = {0}; Perception p = {0};
assert(parse_ai_response(it, mocked_ai_response.data, &p)); assert(parse_ai_response(it, mocked_ai_response.data, &p));
@ -2960,7 +2960,7 @@ void frame(void)
// hurt vignette // hurt vignette
if(player->damage > 0.0) 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,7 +188,8 @@ void fill_available_actions(Entity *it, AvailableActions *a)
void process_perception(Entity *it, Perception p) void process_perception(Entity *it, Perception p)
{ {
assert(it->is_npc); if(it->is_npc)
{
if(p.type != NPCDialog) it->perceptions_dirty = true; if(p.type != NPCDialog) it->perceptions_dirty = true;
if(!BUFF_HAS_SPACE(&it->remembered_perceptions)) BUFF_REMOVE_FRONT(&it->remembered_perceptions); if(!BUFF_HAS_SPACE(&it->remembered_perceptions)) BUFF_REMOVE_FRONT(&it->remembered_perceptions);
BUFF_APPEND(&it->remembered_perceptions, p); BUFF_APPEND(&it->remembered_perceptions, p);
@ -217,6 +218,7 @@ void process_perception(Entity *it, Perception p)
} }
} }
} }
}
#define printf_buff(buff_ptr, ...) { int written = snprintf((buff_ptr)->data+(buff_ptr)->cur_index, ARRLEN((buff_ptr)->data) - (buff_ptr)->cur_index, __VA_ARGS__); assert(written >= 0); (buff_ptr)->cur_index += written; }; #define printf_buff(buff_ptr, ...) { int written = snprintf((buff_ptr)->data+(buff_ptr)->cur_index, ARRLEN((buff_ptr)->data) - (buff_ptr)->cur_index, __VA_ARGS__); assert(written >= 0); (buff_ptr)->cur_index += written; };

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

Loading…
Cancel
Save