diff options
Diffstat (limited to 'procyon/source')
-rw-r--r-- | procyon/source/bs/shipnm.c | 66 | ||||
-rw-r--r-- | procyon/source/evt/jmp.c | 13 | ||||
-rw-r--r-- | procyon/source/info/jmplen.c | 7 | ||||
-rw-r--r-- | procyon/source/info/sysdist.c | 7 | ||||
-rw-r--r-- | procyon/source/main.c | 2 | ||||
-rw-r--r-- | procyon/source/sav/cont.c (renamed from procyon/source/bs/cont.c) | 30 | ||||
-rw-r--r-- | procyon/source/sav/sav.c (renamed from procyon/source/bs/sav.c) | 2 |
7 files changed, 78 insertions, 49 deletions
diff --git a/procyon/source/bs/shipnm.c b/procyon/source/bs/shipnm.c index dcbd6fb..f1d8f4e 100644 --- a/procyon/source/bs/shipnm.c +++ b/procyon/source/bs/shipnm.c @@ -1,70 +1,70 @@ #include <acm/bs.h> -char const * acm_shipnm(acm_ship const _ship) { +char const * acm_shipnm(acm_shipid const _ship) { switch (_ship) { - case acm_ship_add: + case acm_shipid_add: return "Adder"; - case acm_ship_ana: + case acm_shipid_ana: return "Anaconda"; - case acm_ship_asp: + case acm_shipid_asp: return "Asp"; - case acm_ship_boa: + case acm_shipid_boa: return "Boa"; - case acm_ship_cob: + case acm_shipid_cob: return "Cobra"; - case acm_ship_con: + case acm_shipid_con: return "Constrictor"; - case acm_ship_cou: + case acm_shipid_cou: return "Courier"; - case acm_ship_cyg: + case acm_shipid_cyg: return "Cygnus"; - case acm_ship_dov: + case acm_shipid_dov: return "Dove"; - case acm_ship_eag: + case acm_shipid_eag: return "Eagle"; - case acm_ship_falc: + case acm_shipid_falc: return "Falcon"; - case acm_ship_fer: + case acm_shipid_fer: return "Fer-de-lance"; - case acm_ship_frei: + case acm_shipid_frei: return "Freighter"; - case acm_ship_geck: + case acm_shipid_geck: return "Gecko"; - case acm_ship_haul: + case acm_shipid_haul: return "Hauler"; - case acm_ship_hawk: + case acm_shipid_hawk: return "Hawk"; - case acm_ship_keel: + case acm_shipid_keel: return "Keelback"; - case acm_ship_kes: + case acm_shipid_kes: return "Kestral"; - case acm_ship_krait: + case acm_shipid_krait: return "Krait"; - case acm_ship_lift: + case acm_shipid_lift: return "Lifter"; - case acm_ship_lion: + case acm_shipid_lion: return "Lion"; - case acm_ship_mamba: + case acm_shipid_mamba: return "Mamba"; - case acm_ship_moray: + case acm_shipid_moray: return "Moray"; - case acm_ship_osp: + case acm_shipid_osp: return "Osprey"; - case acm_ship_pan: + case acm_shipid_pan: return "Panther"; - case acm_ship_puma: + case acm_shipid_puma: return "Puma"; - case acm_ship_py: + case acm_shipid_py: return "Python"; - case acm_ship_shut: + case acm_shipid_shut: return "Shuttle"; - case acm_ship_side: + case acm_shipid_side: return "Sidewinder"; - case acm_ship_tran: + case acm_shipid_tran: return "Transporter"; - case acm_ship_vip: + case acm_shipid_vip: return "Viper"; - case acm_ship_vult: + case acm_shipid_vult: return "Vulture"; } } diff --git a/procyon/source/evt/jmp.c b/procyon/source/evt/jmp.c new file mode 100644 index 0000000..5a93491 --- /dev/null +++ b/procyon/source/evt/jmp.c @@ -0,0 +1,13 @@ +#include <acm/evt.h> +#include <acm/info.h> + +#include <stdint.h> + +bool acm_jmp(uint_least64_t const _sys) { + acm_pldat pldat = acm_dat.pldat; + if (acm_sysdist(_sys) > acm_jmplen(&pldat.ship)) { + return true; + } + acm_dat.pldat = pldat; + return false; +} diff --git a/procyon/source/info/jmplen.c b/procyon/source/info/jmplen.c new file mode 100644 index 0000000..7ef8995 --- /dev/null +++ b/procyon/source/info/jmplen.c @@ -0,0 +1,7 @@ +#include <acm/info.h> + +#include <stdint.h> + +uint_least64_t acm_jmplen(acm_ship const * _ship) { + return 0x0u; +} diff --git a/procyon/source/info/sysdist.c b/procyon/source/info/sysdist.c new file mode 100644 index 0000000..2e77220 --- /dev/null +++ b/procyon/source/info/sysdist.c @@ -0,0 +1,7 @@ +#include <acm/info.h> + +#include <stdint.h> + +uint_least64_t acm_sysdist(uint_least64_t const _sys) { + return ~(uint_least64_t)0x0u; +} diff --git a/procyon/source/main.c b/procyon/source/main.c index 84168ba..19439a4 100644 --- a/procyon/source/main.c +++ b/procyon/source/main.c @@ -1,4 +1,4 @@ -#include <acm/bs.h> +#include <acm/sav.h> #include <flux.h> #include <inttypes.h> diff --git a/procyon/source/bs/cont.c b/procyon/source/sav/cont.c index 61907fc..e52fd76 100644 --- a/procyon/source/bs/cont.c +++ b/procyon/source/sav/cont.c @@ -1,4 +1,5 @@ -#include <acm/bs.h> +#include <acm/info.h> +#include <acm/sav.h> #include <flux.h> #include <inttypes.h> @@ -58,22 +59,23 @@ void acm_cont(acm_pldat * const _pldat) { ); goto new; } - printf("Loaded CMDR %s, %s @ %" PRIiLEAST64 "\n",pldat.nm,acm_shipnm(pldat.ship),pldat.tm); + printf("Loaded CMDR %s, %s @ %" PRIiLEAST64 "\n",pldat.nm,acm_shipnm(pldat.ship.id),pldat.tm); *_pldat = pldat; return; new:; - pldat.heat = 0x120u; /* 288K */ - pldat.pos.px = 0x0u; - pldat.pos.py = 0x0u; - pldat.pos.pz = 0x0u; - pldat.pos.rx = 0x0u; - pldat.pos.ry = 0x0u; - pldat.pos.rz = 0x0u; - pldat.pos.vx = 0x0u; - pldat.pos.vy = 0x0u; - pldat.pos.vz = 0x0u; - pldat.ship = acm_ship_side; - pldat.tm = 0x9679C2B40u; /* 3250-01-01T12:00:00Z */ + pldat.heat = 0x120u; /* 288K */ + pldat.pos.px = 0x0u; + pldat.pos.py = 0x0u; + pldat.pos.pz = 0x0u; + pldat.pos.rx = 0x0u; + pldat.pos.ry = 0x0u; + pldat.pos.rz = 0x0u; + pldat.pos.vx = 0x0u; + pldat.pos.vy = 0x0u; + pldat.pos.vz = 0x0u; + pldat.ship.drv = acm_drv_h1; + pldat.ship.id = acm_shipid_side; + pldat.tm = 0x9679C2B40u; /* 3250-01-01T12:00:00Z */ zap_memcp(acm_dflplnm,acm_plnmlen + 0x1u,pldat.nm); *_pldat = pldat; } diff --git a/procyon/source/bs/sav.c b/procyon/source/sav/sav.c index 1e0b226..d7301c7 100644 --- a/procyon/source/bs/sav.c +++ b/procyon/source/sav/sav.c @@ -1,4 +1,4 @@ -#include <acm/bs.h> +#include <acm/sav.h> #include <flux.h> #include <stdio.h> |