From 4dfb96e3ad7ebdc1950eb0df8edb43b056e80f35 Mon Sep 17 00:00:00 2001 From: xolatile Date: Fri, 22 Mar 2024 14:38:17 -0400 Subject: [PATCH] Insane bit hackery... --- source/ai.ads | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/source/ai.ads b/source/ai.ads index e02ce0a..81364fc 100644 --- a/source/ai.ads +++ b/source/ai.ads @@ -10,12 +10,16 @@ package ai is subtype string_16 is string (1 .. 16); + agent_digit : constant natural := 4; + agent_state : constant natural := 8; + type name_limit is mod 400; type clan_limit is mod 120; + type data_limit is mod agent_state ** agent_digit - 1; type action_data is record - base : natural; + base : data_limit; data : core.procedure_pointer; name : core.short_string; end record; @@ -24,6 +28,7 @@ package ai is record name : name_limit; clan : clan_limit; + data : data_limit; end record; ------------------------------------------------------------------------------------------ @@ -34,10 +39,10 @@ package ai is procedure action_find; action_array : constant array (action) of action_data := ( - (000000, action_none'access, "idle "), - (000001, action_walk'access, "walking "), - (000300, action_talk'access, "talking "), - (050060, action_find'access, "finding ") + (4#00000000#, action_none'access, "standing "), + (4#00000000#, action_walk'access, "walking "), + (4#00000000#, action_talk'access, "talking "), + (4#00000000#, action_find'access, "finding ") ); male_name_array : constant array (name_limit) of string_16 := (