MicroCorruption/17-Chernobyl/Code/inc/chernobyl.h

44 lines
1.3 KiB
C
Raw Normal View History

2022-08-08 00:58:46 +00:00
#ifndef CHERNOBYL_H
#define CHERNOBYL_H
#include "chernobyl_types.h"
u16 _main ();
u16 walk (u16 r15);
u16 run ();
u16 *create_hash_table (u16 r15, u16 r14);
u16 add_to_table (u16 r15, u16 r14, u16 r13);
// Return address of a buffer from the table
// r15 = buffer address. r14
u16 get_from_table (void *r15, char *r14);
2022-08-08 00:58:46 +00:00
u16 hash (char *str);
u16 rehash (u16 r15, u16 r14);
// Strings, named after the position of the first character in memory
// Strings associated with <walk>
2022-08-08 00:58:46 +00:00
#define s_4566 "\r\r"
#define s_4569 "%x [alloc] [p %x] [n %x] [s %x]"
#define s_4588 " "
#define s_458b " {%x} [ "
#define s_4594 "%x "
#define s_4599 "%x [freed] [p %x] [n %x] [s %x]"
// Strings associated with <malloc>
2022-08-08 00:58:46 +00:00
#define s_465e "Heap exhausted; aborting."
// Strings associated with <run>
2022-08-08 00:58:46 +00:00
#define s_4a38 "Welcome to the lock controller."
#define s_4a58 "You can open the door by entering 'access [your name] [pin]'"
#define s_4a95 ""
#define s_4a96 "No such box."
#define s_4aa3 "Access granted."
#define s_4ab3 "Access granted; but account not activated."
#define s_4ade "Aceess denied" // [sic]
#define s_4aec "Can not have a pin with high bit set."
#define s_4b12 "User already has an account."
#define s_4b2f "Adding user account %s with pin %x."
#define s_4b54 "Invalid command."
#endif