diff --git a/main.c b/main.c index 5713e85..a08209e 100644 --- a/main.c +++ b/main.c @@ -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}); } } diff --git a/makeprompt.h b/makeprompt.h index 9ecc784..0444671 100644 --- a/makeprompt.h +++ b/makeprompt.h @@ -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; + } } } } diff --git a/todo.txt b/todo.txt index 0ba6e26..89792ff 100644 --- a/todo.txt +++ b/todo.txt @@ -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