Browse Source

remove old style function/type header comments

tags/1.6
Alison Watson 3 years ago
parent
commit
8ce03c11e6
84 changed files with 1 additions and 1426 deletions
  1. +0
    -14
      source/Headers/lith_list.h
  2. +0
    -8
      source/Headers/lith_player.h
  3. +0
    -6
      source/Headers/lith_savedata.h
  4. +0
    -30
      source/Main/g_auto.c
  5. +0
    -3
      source/Main/g_button.c
  6. +0
    -3
      source/Main/g_checkbox.c
  7. +0
    -10
      source/Main/g_scrollbar.c
  8. +0
    -3
      source/Main/g_slider.c
  9. +0
    -3
      source/Main/g_textbox.c
  10. +0
    -42
      source/Main/m_common.c
  11. +0
    -3
      source/Main/m_cps.c
  12. +0
    -44
      source/Main/m_file.c
  13. +0
    -15
      source/Main/m_list.c
  14. +0
    -48
      source/Main/m_math.c
  15. +0
    -3
      source/Main/m_namegen.c
  16. +0
    -27
      source/Main/m_print.c
  17. +0
    -36
      source/Main/m_str.c
  18. +0
    -27
      source/Main/m_tokbuf.c
  19. +0
    -3
      source/Main/m_token.c
  20. +0
    -42
      source/Main/p_bip.c
  21. +0
    -21
      source/Main/p_cbigui.c
  22. +0
    -38
      source/Main/p_data.c
  23. +0
    -22
      source/Main/p_dialogue.c
  24. +0
    -9
      source/Main/p_gui_bip.c
  25. +0
    -9
      source/Main/p_gui_cbi.c
  26. +0
    -15
      source/Main/p_gui_upgrades.c
  27. +0
    -12
      source/Main/p_hud.c
  28. +0
    -69
      source/Main/p_items.c
  29. +0
    -24
      source/Main/p_log.c
  30. +0
    -15
      source/Main/p_magic.c
  31. +0
    -18
      source/Main/p_misc.c
  32. +0
    -3
      source/Main/p_notes.c
  33. +0
    -3
      source/Main/p_obituary.c
  34. +0
    -3
      source/Main/p_payout.c
  35. +1
    -59
      source/Main/p_player.c
  36. +0
    -32
      source/Main/p_render.c
  37. +0
    -24
      source/Main/p_save.c
  38. +0
    -18
      source/Main/p_savedata.c
  39. +0
    -12
      source/Main/p_settings.c
  40. +0
    -15
      source/Main/p_shop.c
  41. +0
    -9
      source/Main/p_shopdef.c
  42. +0
    -3
      source/Main/p_statistics.c
  43. +0
    -12
      source/Main/p_status.c
  44. +0
    -54
      source/Main/p_upgrades.c
  45. +0
    -49
      source/Main/p_weapons.c
  46. +0
    -9
      source/Main/u_7777777.c
  47. +0
    -9
      source/Main/u_adrenaline.c
  48. +0
    -6
      source/Main/u_autoreload.c
  49. +0
    -9
      source/Main/u_cyberlegs.c
  50. +0
    -3
      source/Main/u_defensenuke.c
  51. +0
    -3
      source/Main/u_goldeneye.c
  52. +0
    -15
      source/Main/u_headsupdis2.c
  53. +0
    -15
      source/Main/u_headsupdisp.c
  54. +0
    -9
      source/Main/u_homingrpg.c
  55. +0
    -3
      source/Main/u_implying.c
  56. +0
    -3
      source/Main/u_instadeath.c
  57. +0
    -9
      source/Main/u_jetbooster.c
  58. +0
    -9
      source/Main/u_lolsords.c
  59. +0
    -18
      source/Main/u_magic.c
  60. +0
    -6
      source/Main/u_punctcannon.c
  61. +0
    -15
      source/Main/u_reactarmor.c
  62. +0
    -12
      source/Main/u_reflexwetw.c
  63. +0
    -12
      source/Main/u_riflemodes.c
  64. +0
    -6
      source/Main/u_stealthsys.c
  65. +0
    -6
      source/Main/u_subweapons.c
  66. +0
    -9
      source/Main/u_unceunce.c
  67. +0
    -6
      source/Main/u_vitalscan.c
  68. +0
    -12
      source/Main/u_zoom.c
  69. +0
    -27
      source/Main/w_boss.c
  70. +0
    -15
      source/Main/w_cbi.c
  71. +0
    -3
      source/Main/w_cyberspace.c
  72. +0
    -6
      source/Main/w_data.c
  73. +0
    -78
      source/Main/w_dialogue.c
  74. +0
    -18
      source/Main/w_dmon.c
  75. +0
    -9
      source/Main/w_font.c
  76. +0
    -21
      source/Main/w_misc.c
  77. +0
    -31
      source/Main/w_monster.c
  78. +0
    -3
      source/Main/w_payout.c
  79. +0
    -18
      source/Main/w_powerup.c
  80. +0
    -6
      source/Main/w_rain.c
  81. +0
    -6
      source/Main/w_spawn.c
  82. +0
    -9
      source/Main/w_time.c
  83. +0
    -6
      source/Main/w_title.c
  84. +0
    -48
      source/Main/w_world.c

+ 0
- 14
source/Headers/lith_list.h View File

@@ -24,20 +24,6 @@ optargs(1) void Lith_ListFree(struct list_s *head, bool dofree);

// Type Definitions ----------------------------------------------------------|

// To clarify how these new linked list structures work:
// You put a list_t in your structure (or anywhere, you could allocate one)
// and run LinkDefault on it to construct it proper.
//
// You can then have a head node which you iterate over. The head itself is
// a dummy node with no object, but you can iterate over it bidirectionally,
// as the back is head->prev and the front is head->next.
//
// This removes any real need to reverse a linked list, and you can insert
// backwards. Just be careful that all the nodes get constructed correctly.
//
// You can delete an entire list (destroying objects with a custom function or
// not at all) with ListFree, and get the size of a headed list with ListSize.

typedef struct list_s
{
__prop construct {call: Lith_LinkDefault(this)}


+ 0
- 8
source/Headers/lith_player.h View File

@@ -83,11 +83,7 @@ enum
GUI_MAX
};

//
// player_delta
//
// Data that needs to be kept track of between frames.
//
struct player_delta
{
// Status
@@ -152,9 +148,6 @@ struct player *Lith_GetPlayer(int tid, int ptr);

// Types ---------------------------------------------------------------------|

//
// struct player
//
// 7/4/2016: That's a lot of data!
// edit 9/4/2016: Holy shit, that's really a lot of data!
// edit 7/5/2016: JESUS TAKE THE WHEEL
@@ -166,7 +159,6 @@ struct player *Lith_GetPlayer(int tid, int ptr);
// edit 11/7/2017: and now it's over 5000 bytes.
// edit 14/7/2017: lol nevermind it's only 2kb now
// edit 31/8/2017: m e r g e
//
struct player
{
// state


+ 0
- 6
source/Headers/lith_savedata.h View File

@@ -34,9 +34,6 @@

typedef uint32_t ident_t;

//
// savechunk_t
//
typedef struct savechunk_s
{
ident_t iden; // four char identifier
@@ -44,9 +41,6 @@ typedef struct savechunk_s
uint32_t size; // size of chunk data in bytes
} savechunk_t;

//
// savefile_t
//
typedef struct savefile_s
{
FILE *fp;


+ 0
- 30
source/Main/g_auto.c View File

@@ -5,9 +5,6 @@

// Extern Functions ----------------------------------------------------------|

//
// Lith_GUI_Auto
//
stkcall
void Lith_GUI_Auto(gui_state_t *g, id_t id, int x, int y, int w, int h, bool slide)
{
@@ -32,9 +29,6 @@ void Lith_GUI_Auto(gui_state_t *g, id_t id, int x, int y, int w, int h, bool sli
}
}

//
// Lith_GUI_Init
//
stkcall
void Lith_GUI_Init(gui_state_t *g, void *state)
{
@@ -42,9 +36,6 @@ void Lith_GUI_Init(gui_state_t *g, void *state)
g->gfxprefix = ":UI:";
}

//
// Lith_GUI_UpdateState
//
stkcall
void Lith_GUI_UpdateState(gui_state_t *g, struct player *p)
{
@@ -77,9 +68,6 @@ void Lith_GUI_UpdateState(gui_state_t *g, struct player *p)
g->slidetime++;
}

//
// Lith_GUI_Begin
//
stkcall
void Lith_GUI_Begin(gui_state_t *g, int w, int h)
{
@@ -92,9 +80,6 @@ void Lith_GUI_Begin(gui_state_t *g, int w, int h)
SetSize(g->w, g->h);
}

//
// Lith_GUI_End
//
stkcall
void Lith_GUI_End(gui_state_t *g, enum cursor curs)
{
@@ -121,9 +106,6 @@ void Lith_GUI_End(gui_state_t *g, enum cursor curs)
g->active = 0;
}

//
// Lith_GUI_Clip
//
stkcall
void Lith_GUI_Clip(gui_state_t *g, int x, int y, int w, int h, int ww)
{
@@ -135,9 +117,6 @@ void Lith_GUI_Clip(gui_state_t *g, int x, int y, int w, int h, int ww)
SetClipW(g->clpxS = x, g->clpyS = y, w, h, ww);
}

//
// Lith_GUI_ClipRelease
//
stkcall
void Lith_GUI_ClipRelease(gui_state_t *g)
{
@@ -145,9 +124,6 @@ void Lith_GUI_ClipRelease(gui_state_t *g)
ClearClip();
}

//
// Lith_GUI_TypeOn
//
stkcall
void Lith_GUI_TypeOn(gui_state_t *g, gui_typeon_state_t *typeon, __str text)
{
@@ -156,9 +132,6 @@ void Lith_GUI_TypeOn(gui_state_t *g, gui_typeon_state_t *typeon, __str text)
typeon->pos = 0;
}

//
// Lith_RemoveTextColors
//
stkcall
__str Lith_RemoveTextColors(__str str, int size)
{
@@ -188,9 +161,6 @@ __str Lith_RemoveTextColors(__str str, int size)
return l_strncpy(buf, j);
}

//
// Lith_GUI_TypeOnUpdate
//
stkcall
gui_typeon_state_t const *Lith_GUI_TypeOnUpdate(gui_state_t *g, gui_typeon_state_t *typeon)
{


+ 0
- 3
source/Main/g_button.c View File

@@ -2,9 +2,6 @@
#include "lith_common.h"
#include "lith_player.h"

//
// Lith_GUI_Button_Impl
//
bool Lith_GUI_Button_Impl(gui_state_t *g, id_t id, gui_button_args_t const *a)
{
gui_button_preset_t const *pre = a->preset ? a->preset : &guipre.btndef;


+ 0
- 3
source/Main/g_checkbox.c View File

@@ -2,9 +2,6 @@
#include "lith_common.h"
#include "lith_player.h"

//
// Lith_GUI_Checkbox_Impl
//
bool Lith_GUI_Checkbox_Impl(gui_state_t *g, id_t id, gui_checkb_args_t const *a)
{
gui_checkb_preset_t const *pre = a->preset ? a->preset : &guipre.cbxdef;


+ 0
- 10
source/Main/g_scrollbar.c View File

@@ -2,12 +2,8 @@
#include "lith_common.h"
#include "lith_player.h"

//
// Lith_GUI_ScrollBegin_Impl
//
// This function is excessively commented in case I need to change it.
// Reading this function will cause a 5x1d20 hit to your SAN stat. Beware!
//
void Lith_GUI_ScrollBegin_Impl(gui_state_t *g, id_t id, gui_scroll_args_t const *a)
{
gui_scroll_preset_t const *pre = a->preset ? a->preset : &guipre.scrdef;
@@ -140,9 +136,6 @@ void Lith_GUI_ScrollBegin_Impl(gui_state_t *g, id_t id, gui_scroll_args_t const
Lith_GUI_Clip(g, x, ory, a->w, realh, a->ww);
}

//
// Lith_GUI_ScrollEnd
//
void Lith_GUI_ScrollEnd(gui_state_t *g, gui_scroll_state_t *scr)
{
// reset offsets
@@ -153,9 +146,6 @@ void Lith_GUI_ScrollEnd(gui_state_t *g, gui_scroll_state_t *scr)
Lith_GUI_ClipRelease(g);
}

//
// Lith_GUI_ScrollOcclude
//
bool Lith_GUI_ScrollOcclude(gui_state_t *g, gui_scroll_state_t const *scr, int y, int h)
{
return y > scr->occludeE || (h && (y + h) - scr->occludeS < 0);


+ 0
- 3
source/Main/g_slider.c View File

@@ -2,9 +2,6 @@
#include "lith_common.h"
#include "lith_player.h"

//
// Lith_GUI_Slider_Impl
//
fixed64 Lith_GUI_Slider_Impl(gui_state_t *g, id_t id, gui_slider_args_t const *a)
{
gui_slider_preset_t const *pre = a->preset ? a->preset : &guipre.slddef;


+ 0
- 3
source/Main/g_textbox.c View File

@@ -6,9 +6,6 @@

#include <ctype.h>

//
// Lith_GUI_TextBox_Impl
//
gui_txtbox_state_t *Lith_GUI_TextBox_Impl(gui_state_t *g, id_t id, gui_txtbox_args_t const *a)
{
gui_txtbox_state_t *st = a->st;


+ 0
- 42
source/Main/m_common.c View File

@@ -13,9 +13,6 @@ int dbgstatnum, dbgnotenum;

// Static Functions ----------------------------------------------------------|

//
// SetInventory
//
stkcall
static void SetInventory(__str item, int amount)
{
@@ -24,9 +21,6 @@ static void SetInventory(__str item, int amount)
else if(s > 0) InvGive(item, s);
}

//
// SetActorInventory
//
stkcall
static void SetActorInventory(int tid, __str item, int amount)
{
@@ -37,18 +31,12 @@ static void SetActorInventory(int tid, __str item, int amount)

// Extern Functions ----------------------------------------------------------|

//
// Lith_DumpAlloc
//
script
void Lith_DumpAlloc(void)
{
__GDCC__alloc_dump();
}

//
// Lith_FadeFlash
//
stkcall
void Lith_FadeFlash(int r, int g, int b, fixed amount, fixed seconds)
{
@@ -56,9 +44,6 @@ void Lith_FadeFlash(int r, int g, int b, fixed amount, fixed seconds)
ACS_FadeTo(r, g, b, 0.0, seconds);
}

//
// Lith_GetTID
//
script
int Lith_GetTID(int tid, int ptr)
{
@@ -67,9 +52,6 @@ int Lith_GetTID(int tid, int ptr)
return ACS_ActivatorTID();
}

//
// Lith_GetPlayerNumber
//
script
int Lith_GetPlayerNumber(int tid, int ptr)
{
@@ -78,9 +60,6 @@ int Lith_GetPlayerNumber(int tid, int ptr)
return ACS_PlayerNumber();
}

//
// Lith_ValidPointer
//
script
bool Lith_ValidPointer(int tid, int ptr)
{
@@ -90,9 +69,6 @@ bool Lith_ValidPointer(int tid, int ptr)
return true;
}

//
// Lith_SetPointer
//
script
bool Lith_SetPointer(int tid, int ptr, int assign, int tid2, int ptr2, int flags)
{
@@ -101,9 +77,6 @@ bool Lith_SetPointer(int tid, int ptr, int assign, int tid2, int ptr2, int flags
return ACS_SetPointer(assign, tid2, ptr2, flags);
}

//
// Lith_CheckActorInventory
//
stkcall
int Lith_CheckActorInventory(int tid, __str item)
{
@@ -111,9 +84,6 @@ int Lith_CheckActorInventory(int tid, __str item)
else return ACS_CheckActorInventory(tid, item);
}

//
// Lith_GiveActorInventory
//
stkcall
void Lith_GiveActorInventory(int tid, __str item, int amount)
{
@@ -121,9 +91,6 @@ void Lith_GiveActorInventory(int tid, __str item, int amount)
else ACS_GiveActorInventory(tid, item, amount);
}

//
// Lith_TakeActorInventory
//
stkcall
void Lith_TakeActorInventory(int tid, __str item, int amount)
{
@@ -131,9 +98,6 @@ void Lith_TakeActorInventory(int tid, __str item, int amount)
else ACS_TakeActorInventory(tid, item, amount);
}

//
// Lith_SetActorInventory
//
stkcall
void Lith_SetActorInventory(int tid, __str item, int amount)
{
@@ -141,9 +105,6 @@ void Lith_SetActorInventory(int tid, __str item, int amount)
else SetActorInventory(tid, item, amount);
}

//
// Lith_DebugStat
//
void Lith_DebugStat(__str fmt, ...)
{
if(!(world.dbgLevel & log_devh)) return;
@@ -159,9 +120,6 @@ void Lith_DebugStat(__str fmt, ...)
dbgstat[dbgstatnum++] = ACS_EndStrParam();
}

//
// Lith_DebugNote
//
void Lith_DebugNote(__str fmt, ...)
{
if(!(world.dbgLevel & log_devh)) return;


+ 0
- 3
source/Main/m_cps.c View File

@@ -4,9 +4,6 @@

// Extern Functions ----------------------------------------------------------|

//
// Lith_CPS_Print
//
__str Lith_CPS_Print(u32 *cps)
{
ACS_BeginPrint();


+ 0
- 44
source/Main/m_file.c View File

@@ -13,9 +13,6 @@

// Type Definitions ----------------------------------------------------------|

//
// memfile_t
//
typedef struct memfile_t
{
byte *mem;
@@ -23,9 +20,6 @@ typedef struct memfile_t
size_t pos;
} memfile_t;

//
// netfile_t
//
typedef struct netfile_s
{
anonymous
@@ -36,9 +30,6 @@ typedef struct netfile_s

// Static Functions ----------------------------------------------------------|

//
// PrintMem
//
void PrintMem(byte const *data, size_t size)
{
int termpos = 0;
@@ -60,12 +51,8 @@ void PrintMem(byte const *data, size_t size)
printf(c"\nEOF\n\n");
}

//
// NetClose
//
// fclose for netfiles.
// Output to the CVar with a Base64 representation of the output buffer.
//
static int NetClose(void *nfdata)
{
netfile_t *nf = nfdata;
@@ -112,9 +99,6 @@ static int NetClose(void *nfdata)
return 0;
}

//
// MemRead
//
static ssize_t MemRead(void *memdata, char *buf, size_t size)
{
memfile_t *mem = memdata;
@@ -128,10 +112,6 @@ static ssize_t MemRead(void *memdata, char *buf, size_t size)
return size;
}

//
// MemWrite
//
//
static ssize_t MemWrite(void *memdata, char const *buf, size_t size)
{
memfile_t *mem = memdata;
@@ -154,9 +134,6 @@ static ssize_t MemWrite(void *memdata, char const *buf, size_t size)
return size;
}

//
// MemSeek
//
static int MemSeek(void *memdata, off_t *offset, int whence)
{
memfile_t *mem = memdata;
@@ -178,9 +155,6 @@ static int MemSeek(void *memdata, off_t *offset, int whence)
return 0;
}

//
// MemClose
//
static int MemClose(void *memdata)
{
memfile_t *mem = memdata;
@@ -192,9 +166,6 @@ static int MemClose(void *memdata)

// Extern Functions ----------------------------------------------------------|

//
// W_Open
//
FILE *W_Open(__str fname, char const *rw)
{
__str f;
@@ -205,11 +176,7 @@ FILE *W_Open(__str fname, char const *rw)
return __fmemopen_str(f, ACS_StrLen(f), rw);
}

//
// Lith_NFOpen
//
// fopen() equivalent for netfiles.
//
FILE *Lith_NFOpen(int pnum, __str pcvar, char rw)
{
FILE *fp = null;
@@ -283,11 +250,7 @@ FILE *Lith_NFOpen(int pnum, __str pcvar, char rw)
return fp;
}

//
// Lith_FWrite32
//
// Unpacks integers into a file stream.
//
size_t Lith_FWrite32(void const *restrict ptr, size_t count, size_t bytes, FILE *restrict fp)
{
size_t res = 0;
@@ -303,9 +266,6 @@ size_t Lith_FWrite32(void const *restrict ptr, size_t count, size_t bytes, FILE
return res;
}

//
// Lith_FWrite_str
//
size_t Lith_FWrite_str(void const __str_ars *restrict ptr, size_t count, FILE *restrict fp)
{
size_t res = 0;
@@ -317,11 +277,7 @@ size_t Lith_FWrite_str(void const __str_ars *restrict ptr, size_t count, FILE *r
return res;
}

//
// Lith_FRead32
//
// Reads packed integers from a file stream.
//
size_t Lith_FRead32(void *restrict buf, size_t count, size_t bytes, FILE *restrict fp)
{
size_t res = 0;


+ 0
- 15
source/Main/m_list.c View File

@@ -6,27 +6,18 @@

// Extern Functions ----------------------------------------------------------|

//
// Lith_LinkDefault
//
void Lith_LinkDefault(list_t *list, void *object)
{
list->prev = list->next = list;
list->object = object;
}

//
// Lith_ListLink
//
void Lith_ListLink(list_t *head, list_t *list)
{
(list->prev = head->prev)->next = list;
(list->next = head )->prev = list;
}

//
// Lith_ListUnlink
//
void *Lith_ListUnlink(list_t *list)
{
list->prev->next = list->next;
@@ -36,9 +27,6 @@ void *Lith_ListUnlink(list_t *list)
return list->object;
}

//
// Lith_ListSize
//
size_t Lith_ListSize(list_t *head)
{
size_t count = 0;
@@ -47,9 +35,6 @@ size_t Lith_ListSize(list_t *head)
return count;
}

//
// Lith_ListFree
//
void Lith_ListFree(list_t *head, bool dofree)
{
if(head->next)


+ 0
- 48
source/Main/m_math.c View File

@@ -13,9 +13,6 @@
static u64 lmvar crctable[256]; // NB: Don't try to hash >8bit data.
static bool lmvar crcinit;

//
// InitCRC64
//
static void InitCRC64()
{
u64 const polynomial = 0xC96C5795D7870F42; // ECMA 182
@@ -35,9 +32,6 @@ static void InitCRC64()
crcinit = true;
}

//
// crc64
//
u64 crc64(void const *data, size_t len, u64 result)
{
byte const *ptr = data;
@@ -52,9 +46,6 @@ u64 crc64(void const *data, size_t len, u64 result)
return ~result;
}

//
// crc64_str
//
u64 crc64_str(void __str_ars const *data, size_t len, u64 result)
{
byte __str_ars const *ptr = data;
@@ -69,9 +60,6 @@ u64 crc64_str(void __str_ars const *data, size_t len, u64 result)
return ~result;
}

//
// powlk
//
stkcall
fixed64 powlk(fixed64 x, int y)
{
@@ -80,36 +68,24 @@ fixed64 powlk(fixed64 x, int y)
return z;
}

//
// mag2lk
//
stkcall
fixed64 mag2lk(fixed64 x, fixed64 y)
{
return ACS_FixedSqrt(x * x + y * y);
}

//
// mag2k
//
stkcall
fixed mag2k(fixed x, fixed y)
{
return ACS_FixedSqrt(x * x + y * y);
}

//
// mag2i
//
stkcall
int mag2i(int x, int y)
{
return ACS_Sqrt(x * x + y * y);
}

//
// lerpk
//
fixed lerpk(fixed a, fixed b, fixed t)
{
fixed ret = ((1.0k - t) * a) + (t * b);
@@ -120,9 +96,6 @@ fixed lerpk(fixed a, fixed b, fixed t)
return ret;
}

//
// lerplk
//
fixed64 lerplk(fixed64 a, fixed64 b, fixed64 t)
{
fixed64 ret = ((1.0lk - t) * a) + (t * b);
@@ -133,18 +106,12 @@ fixed64 lerplk(fixed64 a, fixed64 b, fixed64 t)
return ret;
}

//
// aabb
//
stkcall
bool aabb(int x, int y, int z, int w, int x2, int y2)
{
return x2 >= x && y2 >= y && x2 < z && y2 < w;
}

//
// ceilk
//
stkcall
int ceilk(fixed n)
{
@@ -153,43 +120,28 @@ int ceilk(fixed n)
else return (int)u.a;
}

//
// bzpolylk
//
stkcall
fixed64 bzpolylk(fixed64 a, fixed64 b, fixed64 t)
{
return a + ((b - a) * t);
}

//
// bzpolyi
//
stkcall
int bzpolyi(int a, int b, fixed64 t)
{
return a + ((b - a) * t);
}

//
// qbezierlk
//
struct vec2lk qbezierlk(fixed64 x1, fixed64 y1, fixed64 x2, fixed64 y2, fixed64 x3, fixed64 y3, fixed64 t)
{
BezierImpl(fixed64, struct vec2lk, bzpolylk);
}

//
// qbezieri
//
struct vec2i qbezieri(int x1, int y1, int x2, int y2, int x3, int y3, fixed64 t)
{
BezierImpl(int, struct vec2i, bzpolyi);
}

//
// ctopol
//
struct polar ctopol(fixed x, fixed y)
{
return (struct polar){ACS_VectorAngle(x, y), mag2i(x, y)};


+ 0
- 3
source/Main/m_namegen.c View File

@@ -7,9 +7,6 @@

// Extern Functions ----------------------------------------------------------|

//
// Lith_RandomName
//
__str Lith_RandomName(int id)
{
static __str syllables[] = {


+ 0
- 27
source/Main/m_print.c View File

@@ -20,9 +20,6 @@
ACS_MoreHudMessage(); \
} while(0)

//
// DrawSprite
//
stkcall
void DrawSprite(__str name, int flags, int id, fixed x, fixed y, fixed hold)
{
@@ -31,9 +28,6 @@ void DrawSprite(__str name, int flags, int id, fixed x, fixed y, fixed hold)
ACS_EndHudMessage();
}

//
// DrawSpriteX
//
stkcall
void DrawSpriteX(__str name, int flags, int id, fixed x, fixed y, fixed hold, fixed a1)
{
@@ -42,9 +36,6 @@ void DrawSpriteX(__str name, int flags, int id, fixed x, fixed y, fixed hold, fi
ACS_EndHudMessage(a1);
}

//
// DrawSpriteXX
//
stkcall
void DrawSpriteXX(__str name, int flags, int id, fixed x, fixed y, fixed hold, fixed a1, fixed a2)
{
@@ -53,9 +44,6 @@ void DrawSpriteXX(__str name, int flags, int id, fixed x, fixed y, fixed hold, f
ACS_EndHudMessage(a1, a2);
}

//
// DrawSpriteXXX
//
stkcall
void DrawSpriteXXX(__str name, int flags, int id, fixed x, fixed y, fixed hold, fixed a1, fixed a2, fixed a3)
{
@@ -64,9 +52,6 @@ void DrawSpriteXXX(__str name, int flags, int id, fixed x, fixed y, fixed hold,
ACS_EndHudMessage(a1, a2, a3);
}

//
// DrawSpritePlain
//
stkcall
void DrawSpritePlain(__str name, int id, fixed x, fixed y, fixed hold)
{
@@ -75,9 +60,6 @@ void DrawSpritePlain(__str name, int id, fixed x, fixed y, fixed hold)
ACS_EndHudMessage();
}

//
// DrawSpriteAlpha
//
stkcall
void DrawSpriteAlpha(__str name, int id, fixed x, fixed y, fixed hold, fixed alpha)
{
@@ -86,9 +68,6 @@ void DrawSpriteAlpha(__str name, int id, fixed x, fixed y, fixed hold, fixed alp
ACS_EndHudMessage(alpha);
}

//
// DrawSpriteFade
//
stkcall
void DrawSpriteFade(__str name, int id, fixed x, fixed y, fixed hold, fixed fadetime)
{
@@ -97,9 +76,6 @@ void DrawSpriteFade(__str name, int id, fixed x, fixed y, fixed hold, fixed fade
ACS_EndHudMessage(fadetime);
}

//
// HudMessage
//
void HudMessage(__str fmt, ...)
{
va_list vl;
@@ -113,9 +89,6 @@ void HudMessage(__str fmt, ...)
ACS_MoreHudMessage();
}

//
// Log
//
void Log(__str fmt, ...)
{
va_list vl;


+ 0
- 36
source/Main/m_str.c View File

@@ -10,9 +10,6 @@
for(; *s; s++) ret = *s + 101 * ret; \
return ret

//
// lstrupper
//
__str lstrupper(__str in)
{
ACS_BeginPrint();
@@ -23,27 +20,18 @@ __str lstrupper(__str in)
return ACS_EndStrParam();
}

//
// l_strhash
//
stkcall
u32 l_strhash(char __str_ars const *s)
{
l_strhashImpl();
}

//
// lstrhash
//
stkcall
u32 lstrhash(char const *s)
{
l_strhashImpl();
}

//
// lstrcpy_str
//
char *lstrcpy_str(char *dest, char __str_ars const *src)
{
for(char *i = dest; (*i = *src); ++i, ++src);
@@ -54,17 +42,11 @@ char *lstrcpy_str(char *dest, char __str_ars const *src)
for(; *s1 && *s2; ++s1, ++s2) {if(*s1 != *s2) return *s1 - *s2;} \
return *s1 - *s2

//
// lstrcmp_str
//
int lstrcmp_str(char const *s1, char __str_ars const *s2)
{
StrCmpImpl();
}

//
// l_strncpy
//
stkcall
__str l_strncpy(void const *s, int n)
{
@@ -73,9 +55,6 @@ __str l_strncpy(void const *s, int n)
return ACS_EndStrParam();
}

//
// scoresep
//
stkcall
__str scoresep(i96 num)
{
@@ -105,9 +84,6 @@ __str scoresep(i96 num)
return ACS_EndStrParam();
}

//
// LanguageV
//
__str LanguageV(__str name)
{
ACS_BeginPrint();
@@ -127,9 +103,6 @@ __str LanguageV(__str name)
return ret;
}

//
// Language
//
__str Language(__str fmt, ...)
{
va_list vl;
@@ -143,9 +116,6 @@ __str Language(__str fmt, ...)
return LanguageV(ACS_EndStrParam());
}

//
// LanguageNull
//
__str LanguageNull(__str fmt, ...)
{
va_list vl;
@@ -162,9 +132,6 @@ __str LanguageNull(__str fmt, ...)
return name == alias ? null : alias;
}

//
// StrParam
//
__str StrParam(__str fmt, ...)
{
va_list vl;
@@ -178,9 +145,6 @@ __str StrParam(__str fmt, ...)
return ACS_EndStrParam();
}

//
// StrParamBegin
//
void StrParamBegin(__str fmt, ...)
{
va_list vl;


+ 0
- 27
source/Main/m_tokbuf.c View File

@@ -5,9 +5,6 @@

// Extern Functions ----------------------------------------------------------|

//
// Lith_TBufProc
//
int Lith_TBufProc(struct token *tok, void *udata)
{
switch(tok->type)
@@ -20,9 +17,6 @@ int Lith_TBufProc(struct token *tok, void *udata)
return tokproc_next;
}

//
// Lith_TBufProcL
//
int Lith_TBufProcL(struct token *tok, void *udata)
{
switch(tok->type)
@@ -34,9 +28,6 @@ int Lith_TBufProcL(struct token *tok, void *udata)
return tokproc_next;
}

//
// Lith_TBufCtor
//
void Lith_TBufCtor(struct tokbuf *tb)
{
tb->orig.line = 1;
@@ -44,9 +35,6 @@ void Lith_TBufCtor(struct tokbuf *tb)
if(!tb->tokProcess) tb->tokProcess = Lith_TBufProc;
}

//
// Lith_TBufDtor
//
void Lith_TBufDtor(struct tokbuf *tb)
{
if(tb->toks) for(int i = 0; i < tb->bend; i++)
@@ -55,9 +43,6 @@ void Lith_TBufDtor(struct tokbuf *tb)
Dalloc(tb->toks);
}

//
// Lith_TBufGet
//
struct token *Lith_TBufGet(struct tokbuf *tb)
{
if(++tb->tpos < tb->tend)
@@ -94,34 +79,22 @@ done:
return &tb->toks[tb->tpos];
}

//
// Lith_TBufPeek
//
struct token *Lith_TBufPeek(struct tokbuf *tb)
{
Lith_TBufGet(tb);
return Lith_TBufUnGet(tb);
}

//
// Lith_TBufUnGet
//
struct token *Lith_TBufUnGet(struct tokbuf *tb)
{
return &tb->toks[tb->tpos--];
}

//
// Lith_TBufReGet
//
struct token *Lith_TBufReGet(struct tokbuf *tb)
{
return &tb->toks[tb->tpos];
}

//
// Lith_TBufDrop
//
bool Lith_TBufDrop(struct tokbuf *tb, int t)
{
if(Lith_TBufGet(tb)->type != t)


+ 0
- 3
source/Main/m_token.c View File

@@ -42,9 +42,6 @@

// Extern Functions ----------------------------------------------------------|

//
// Lith_ParseToken
//
void Lith_ParseToken(FILE *fp, struct token *tok, struct origin *orig)
{
if(!tok || !fp || !orig) return;


+ 0
- 42
source/Main/p_bip.c View File

@@ -21,9 +21,6 @@ struct page_init

// Static Functions ----------------------------------------------------------|

//
// DecryptBody
//
static __str DecryptBody(char __str_ars const *str)
{
ACS_BeginPrint();
@@ -32,9 +29,6 @@ static __str DecryptBody(char __str_ars const *str)
return ACS_EndStrParam();
}

//
// UnlockPage
//
static void UnlockPage(struct bip *bip, struct page *page, int pclass)
{
bip->pageavail++;
@@ -45,9 +39,6 @@ static void UnlockPage(struct bip *bip, struct page *page, int pclass)
bip->unlock(page->unlocks[i], pclass);
}

//
// AddToBIP
//
optargs(1)
static void AddToBIP(struct bip *bip, int categ, int pclass, struct page_init const *pinit, bool isfree)
{
@@ -70,9 +61,6 @@ static void AddToBIP(struct bip *bip, int categ, int pclass, struct page_init co
if(isfree) UnlockPage(bip, page, pclass);
}

//
// CatFromStr
//
stkcall
static int CatFromStr(__str name)
{
@@ -82,9 +70,6 @@ static int CatFromStr(__str name)
return BIPC_NONE;
}

//
// PClFromStr
//
stkcall
static int PClFromStr(__str name)
{
@@ -93,9 +78,6 @@ static int PClFromStr(__str name)
return 0;
}

//
// LoadBIPInfo
//
static int LoadBIPInfo(__str fname, struct bip *bip, int pclass)
{
struct tokbuf tb = {
@@ -160,9 +142,6 @@ static int LoadBIPInfo(__str fname, struct bip *bip, int pclass)

// Extern Functions ----------------------------------------------------------|

//
// Lith_PlayerInitBIP
//
script
void Lith_PlayerInitBIP(struct player *p)
{
@@ -188,9 +167,6 @@ void Lith_PlayerInitBIP(struct player *p)
bip->init = true;
}

//
// Lith_DeliverMail
//
script
void Lith_DeliverMail(struct player *p, __str title, int flags)
{
@@ -245,9 +221,6 @@ void Lith_DeliverMail(struct player *p, __str title, int flags)
}
}

//
// Lith_FindBIPPage
//
struct page *Lith_FindBIPPage(struct bip *bip, __str name)
{
if(!name)
@@ -260,9 +233,6 @@ struct page *Lith_FindBIPPage(struct bip *bip, __str name)
return null;
}

//
// Lith_UnlockBIPPage
//
struct page *Lith_UnlockBIPPage(struct bip *bip, __str name, int pclass)
{
struct page *page = bip->find(name);
@@ -278,18 +248,12 @@ struct page *Lith_UnlockBIPPage(struct bip *bip, __str name, int pclass)
return page;
}

//
// Lith_BIPUnlock
//
script ext("ACS")
void Lith_BIPUnlock(int pnum)
{
withplayer(&players[pnum]) p->bipUnlock(getmems(0, "m_infopage"));
}

//
// Lith_DeallocateBIP
//
script
void Lith_DeallocateBIP(struct bip *bip)
{
@@ -298,9 +262,6 @@ void Lith_DeallocateBIP(struct bip *bip)
bip->init = false;
}

//
// Lith_GetPageInfo
//
struct page_info Lith_GetPageInfo(struct page const *page)
{
struct page_info pinf;
@@ -323,9 +284,6 @@ struct page_info Lith_GetPageInfo(struct page const *page)
return pinf;
}

//
// Lith_GiveMail
//
script ext("ACS")
void Lith_GiveMail(int num)
{


+ 0
- 21
source/Main/p_cbigui.c View File

@@ -18,9 +18,6 @@

// Static Functions ----------------------------------------------------------|

//
// Lith_CBITab_Arsenal
//
static void Lith_CBITab_Arsenal(gui_state_t *g, struct player *p)
{
extern void Lith_CBITab_Upgrades(gui_state_t *g, struct player *p);
@@ -36,9 +33,6 @@ static void Lith_CBITab_Arsenal(gui_state_t *g, struct player *p)
}
}

//
// Lith_CBITab_Stat
//
static void Lith_CBITab_Stat(gui_state_t *g, struct player *p)
{
extern void Lith_CBITab_CBI (gui_state_t *g, struct player *p);
@@ -54,9 +48,6 @@ static void Lith_CBITab_Stat(gui_state_t *g, struct player *p)
}
}

//
// Lith_CBITab_Info
//
static void Lith_CBITab_Info(gui_state_t *g, struct player *p)
{
extern void Lith_CBITab_BIP (gui_state_t *g, struct player *p);
@@ -80,9 +71,6 @@ static void Lith_CBITab_Info(gui_state_t *g, struct player *p)

// Extern Functions ----------------------------------------------------------|

//
// Lith_ThemeName
//
__str Lith_ThemeName(uint num)
{
#define X(n) n,
@@ -92,9 +80,6 @@ __str Lith_ThemeName(uint num)
return themes[num >= cbi_theme_max ? 0 : num];
}

//
// Lith_PlayerUpdateCBIGUI
//
script
void Lith_PlayerUpdateCBIGUI(struct player *p)
{
@@ -145,9 +130,6 @@ void Lith_PlayerUpdateCBIGUI(struct player *p)
Lith_GUI_End(g, p->getCVarI("lith_gui_cursor"));
}

//
// Lith_PlayerResetCBIGUI
//
void Lith_PlayerResetCBIGUI(struct player *p)
{
p->cbi.guistate.cx = 320 / 2;
@@ -165,9 +147,6 @@ void Lith_PlayerResetCBIGUI(struct player *p)

// Scripts -------------------------------------------------------------------|

//
// Lith_KeyOpenCBI
//
script ext("ACS") type("net")
void Lith_KeyOpenCBI(void)
{


+ 0
- 38
source/Main/p_data.c View File

@@ -7,9 +7,6 @@

// Static Functions ----------------------------------------------------------|

//
// SetupAttributes
//
static void SetupAttributes(struct player *p)
{
p->attr.names[at_acc] = "ACC";
@@ -32,9 +29,6 @@ static void SetupAttributes(struct player *p)
p->attr.level = 1;
}

//
// SetupInventory
//
static void SetupInventory(struct player *p)
{
static container_t const baseinv[] = {
@@ -55,9 +49,6 @@ static void SetupInventory(struct player *p)
p->misc.user = p;
}

//
// SetPClass
//
static void SetPClass(struct player *p)
{
__with(__str cl = p->pcstr = ACS_GetActorClass(0);) {
@@ -78,18 +69,12 @@ static void SetPClass(struct player *p)

// Extern Functions ----------------------------------------------------------|

//
// Lith_ButtonPressed
//
stkcall
bool Lith_ButtonPressed(struct player *p, int bt)
{
return p->buttons & bt && !(p->old.buttons & bt);
}

//
// Lith_SetPlayerVelocity
//
stkcall
bool Lith_SetPlayerVelocity(struct player *p, fixed velx, fixed vely, fixed velz, bool add)
{
@@ -101,9 +86,6 @@ bool Lith_SetPlayerVelocity(struct player *p, fixed velx, fixed vely, fixed velz
return ACS_SetActorVelocity(p->tid, velx, vely, velz, add, true);
}

//
// Lith_ValidatePlayerTID
//
void Lith_ValidatePlayerTID(struct player *p)
{
if(ACS_ActivatorTID() == 0) {
@@ -115,11 +97,7 @@ void Lith_ValidatePlayerTID(struct player *p)
}
}

//
// Lith_PlayerUpdateData
//
// Update all of the player's data.
//
script
void Lith_PlayerUpdateData(struct player *p)
{
@@ -171,9 +149,6 @@ void Lith_PlayerUpdateData(struct player *p)
p->kbs = InvNum("BlueSkull");
}

//
// Lith_KeyDown
//
script ext("ACS")
void Lith_KeyDown(int pnum, int ch)
{
@@ -182,9 +157,6 @@ void Lith_KeyDown(int pnum, int ch)
p->txtbuf[p->tbptr++] = ch;
}

//
// LevelUp
//
script
static void LevelUp(struct player *p, u32 attr[at_max])
{
@@ -219,9 +191,6 @@ static void LevelUp(struct player *p, u32 attr[at_max])
p->attr.lvupstr = strnull;
}

//
// Lith_GiveEXP
//
stkcall
void Lith_GiveEXP(struct player *p, u64 amt)
{
@@ -245,11 +214,7 @@ void Lith_GiveEXP(struct player *p, u64 amt)
a->exp += amt;
}

//
// Lith_ResetPlayer
//
// Reset some things on the player when they spawn.
//
script
void Lith_ResetPlayer(struct player *p)
{
@@ -381,9 +346,6 @@ void Lith_ResetPlayer(struct player *p)
}
}

//
// Lith_PlayerUpdateStats
//
stkcall
void Lith_PlayerUpdateStats(struct player *p)
{


+ 0
- 22
source/Main/p_dialogue.c View File

@@ -76,9 +76,6 @@ struct dlgdef *lmvar dlgdefs;

// Static Functions ----------------------------------------------------------|

//
// Lith_TerminalGUI
//
script
static void Lith_TerminalGUI(gui_state_t *g, struct player *p, dlgvmstate_t *vmstate)
{
@@ -188,9 +185,6 @@ static void Lith_TerminalGUI(gui_state_t *g, struct player *p, dlgvmstate_t *vms
}
}

//
// Lith_DialogueGUI
//
script
static void Lith_DialogueGUI(gui_state_t *g, struct player *p, dlgvmstate_t *vmstate)
{
@@ -230,9 +224,6 @@ static void Lith_DialogueGUI(gui_state_t *g, struct player *p, dlgvmstate_t *vms
Lith_GUI_End(g, gui_curs_outlineinv);
}

//
// AddText
//
static __str AddText(dlgvmstate_t *vmstate, __str s, bool local)
{
if(!vmstate->concat) {
@@ -248,9 +239,6 @@ static __str AddText(dlgvmstate_t *vmstate, __str s, bool local)

// Extern Functions ----------------------------------------------------------|

//
// Lith_TeleportOutEffect
//
script ext("ACS")
void Lith_TeleportOutEffect(struct player *p)
{
@@ -273,11 +261,7 @@ void Lith_TeleportOutEffect(struct player *p)
}
}

//
// Lith_DialogueVM
//
// Main dialogue VM.
//
script
void Lith_DialogueVM(struct player *p, int num)
{
@@ -512,9 +496,6 @@ done:
p->indialogue -= 2;
}

//
// Lith_RunDialogue
//
script ext("ACS")
void Lith_RunDialogue(int num)
{
@@ -525,9 +506,6 @@ void Lith_RunDialogue(int num)
}
}

//
// Lith_RunTerminal
//
script ext("ACS")
void Lith_RunTerminal(int num)
{


+ 0
- 9
source/Main/p_gui_bip.c View File

@@ -4,9 +4,6 @@
#include "lith_bip.h"
#include "lith_list.h"

//
// SetCurPage
//
static void SetCurPage(gui_state_t *g, struct bip *bip, struct page *page, __str body)
{
bip->curpage = page;
@@ -15,9 +12,6 @@ static void SetCurPage(gui_state_t *g, struct bip *bip, struct page *page, __str
Lith_GUI_ScrollReset(g, &CBIState(g)->bipinfoscr);
}

//
// CheckMatch
//
script
static bool CheckMatch(struct page_info *pinf, __str query)
{
@@ -26,9 +20,6 @@ static bool CheckMatch(struct page_info *pinf, __str query)
strcasestr_str(pinf->body, query);
}

//
// Lith_CBITab_BIP
//
void Lith_CBITab_BIP(gui_state_t *g, struct player *p)
{
struct bip *bip = &p->bip;


+ 0
- 9
source/Main/p_gui_cbi.c View File

@@ -24,9 +24,6 @@

// Static Functions ----------------------------------------------------------|

//
// CBITab_Marine
//
static void CBITab_Marine(gui_state_t *g, struct player *p)
{
int ram;
@@ -59,9 +56,6 @@ static void CBITab_Marine(gui_state_t *g, struct player *p)
Upgr(rdistinter) Slot("RDistInter", 0, 4);
}

//
// CBITab_CyberMage
//
static void CBITab_CyberMage(gui_state_t *g, struct player *p)
{
CPU(2);
@@ -98,9 +92,6 @@ static void CBITab_CyberMage(gui_state_t *g, struct player *p)

// Extern Functions ----------------------------------------------------------|

//
// Lith_CBITab_CBI
//
void Lith_CBITab_CBI(gui_state_t *g, struct player *p)
{
switch(p->pclass)


+ 0
- 15
source/Main/p_gui_upgrades.c View File

@@ -9,9 +9,6 @@ static __str const upgrcateg[UC_MAX] = {
[UC_Down] = "LITH_CAT_DOWN"
};

//
// GUIUpgradesList
//
static void GUIUpgradesList(gui_state_t *g, struct player *p)
{
if(Lith_GUI_Button(g, .x = 90, 213, Pre(btnprev)))
@@ -86,9 +83,6 @@ static void GUIUpgradesList(gui_state_t *g, struct player *p)
Lith_GUI_ScrollEnd(g, &CBIState(g)->upgrscr);
}

//
// GUIUpgradeRequirements
//
static void GUIUpgradeRequirements(gui_state_t *g, struct player *p, upgrade_t *upgr)
{
int y = 0;
@@ -144,9 +138,6 @@ static void GUIUpgradeRequirements(gui_state_t *g, struct player *p, upgrade_t *
}
}

//
// GUIUpgradeDescription
//
static void GUIUpgradeDescription(gui_state_t *g, struct player *p, upgrade_t *upgr)
{
SetClipW(111, 30, 190, 170, 184);
@@ -183,9 +174,6 @@ static void GUIUpgradeDescription(gui_state_t *g, struct player *p, upgrade_t *u
ClearClip();
}

//
// GUIUpgradeButtons
//
static void GUIUpgradeButtons(gui_state_t *g, struct player *p, upgrade_t *upgr)
{
if(Lith_GUI_Button(g, L("LITH_BUY"), 111, 205, !p->canBuy(&upgr->info->shopdef, upgr)))
@@ -195,9 +183,6 @@ static void GUIUpgradeButtons(gui_state_t *g, struct player *p, upgrade_t *upgr)
upgr->toggle(p);
}

//
// Lith_CBITab_Upgrades
//
void Lith_CBITab_Upgrades(gui_state_t *g, struct player *p)
{
GUIUpgradesList(g, p);


+ 0
- 12
source/Main/p_hud.c View File

@@ -5,9 +5,6 @@

// Extern Functions ----------------------------------------------------------|

//
// Lith_HUD_WeaponSlots_Impl
//
void Lith_HUD_WeaponSlots_Impl(struct player *p, struct hud_wsl const *a)
{
if(p->getCVarI("lith_hud_showweapons"))
@@ -31,9 +28,6 @@ void Lith_HUD_WeaponSlots_Impl(struct player *p, struct hud_wsl const *a)
}
}

//
// Lith_HUD_Score
//
void Lith_HUD_Score(struct player *p, __str fmt, i96 scrn, __str font, __str cr, int x, int xa, int y, int ya)
{
if(p->getCVarI("lith_hud_showscore"))
@@ -73,9 +67,6 @@ void Lith_HUD_Score(struct player *p, __str fmt, i96 scrn, __str font, __str cr,
}
}

//
// Lith_HUD_KeyInd
//
void Lith_HUD_KeyInd(struct player *p, int x, int y, bool horz, fixed a)
{
#define Inc (horz ? (x -= 10) : (y += 10))
@@ -88,9 +79,6 @@ void Lith_HUD_KeyInd(struct player *p, int x, int y, bool horz, fixed a)
#undef Inc
}

//
// Lith_HUD_Log
//
script
void Lith_HUD_Log(struct player *p, int cr, int x, int yy)
{


+ 0
- 69
source/Main/p_items.c View File

@@ -5,9 +5,6 @@

// Static Functions ----------------------------------------------------------|

//
// BagItem_Tick
//
script
static void BagItem_Tick(item_t *_item)
{
@@ -17,9 +14,6 @@ static void BagItem_Tick(item_t *_item)
if(it->Tick) it->Tick(it);
}

//
// BagItem_Place
//
script
static void BagItem_Place(item_t *_item, container_t *cont)
{
@@ -33,9 +27,6 @@ static void BagItem_Place(item_t *_item, container_t *cont)
it->Place(it, &item->content);
}

//
// BagItem_Destroy
//
script
static void BagItem_Destroy(item_t *_item)
{
@@ -47,9 +38,6 @@ static void BagItem_Destroy(item_t *_item)
Lith_Item_Destroy(&item->item);
}

//
// ItemCanPlace
//
static bool ItemCanPlace(container_t *cont, item_t *item, int x, int y)
{
if(x < 0 || y < 0)
@@ -79,9 +67,6 @@ static bool ItemCanPlace(container_t *cont, item_t *item, int x, int y)
return true;
}

//
// ItemCanPlaceAny
//
static bool ItemCanPlaceAny(container_t *cont, item_t *item)
{
int xn = cont->w / item->w;
@@ -96,9 +81,6 @@ static bool ItemCanPlaceAny(container_t *cont, item_t *item)

// Extern Functions ----------------------------------------------------------|

//
// Lith_Item_Init
//
void Lith_Item_Init(item_t *item, itemdata_t const *data)
{
item->link.construct(item);
@@ -110,9 +92,6 @@ void Lith_Item_Init(item_t *item, itemdata_t const *data)
if(!item->Place ) item->Place = Lith_Item_Place;
}

//
// Lith_Item_New
//
item_t *Lith_Item_New(itemdata_t const *data)
{
item_t *item = Salloc(item_t);
@@ -122,9 +101,6 @@ item_t *Lith_Item_New(itemdata_t const *data)
return item;
}

//
// Lith_Item_Destroy
//
script
void Lith_Item_Destroy(item_t *item)
{
@@ -143,18 +119,12 @@ void Lith_Item_Destroy(item_t *item)
Dalloc(item);
}

//
// Lith_Item_Use
//
script
bool Lith_Item_Use(item_t *item)
{
return HERMES("UseItem", item);
}

//
// Lith_Item_Place
//
script
void Lith_Item_Place(item_t *item, container_t *cont)
{
@@ -164,9 +134,6 @@ void Lith_Item_Place(item_t *item, container_t *cont)
item->user = cont->user;
}

//
// Lith_Item_Unlink
//
void Lith_Item_Unlink(item_t *item)
{
if(item->container)
@@ -176,9 +143,6 @@ void Lith_Item_Unlink(item_t *item)
}
}

//
// Lith_BagItem_New
//
bagitem_t *Lith_BagItem_New(int w, int h, __str bg, itemdata_t const *data)
{
bagitem_t *item = Salloc(bagitem_t);
@@ -198,9 +162,6 @@ bagitem_t *Lith_BagItem_New(int w, int h, __str bg, itemdata_t const *data)
return item;
}

//
// Lith_ItemPlace
//
bool Lith_ItemPlace(container_t *cont, item_t *item, int x, int y)
{
if(!ItemCanPlace(cont, item, x, y)) return false;
@@ -213,9 +174,6 @@ bool Lith_ItemPlace(container_t *cont, item_t *item, int x, int y)
return true;
}

//
// Lith_ItemPlaceFirst
//
script
bool Lith_ItemPlaceFirst(container_t *cont, item_t *item)
{
@@ -226,9 +184,6 @@ bool Lith_ItemPlaceFirst(container_t *cont, item_t *item)
return false;
}

//
// Lith_PlayerAddItem
//
bool Lith_PlayerAddItem(struct player *p, item_t *item)
{
for(int i = 0; i < countof(p->inv); i++)
@@ -238,9 +193,6 @@ bool Lith_PlayerAddItem(struct player *p, item_t *item)
return false;
}

//
// Lith_Container
//
void Lith_Container(gui_state_t *g, container_t *cont, int sx, int sy)
{
struct player *p = cont->user;
@@ -286,9 +238,6 @@ void Lith_Container(gui_state_t *g, container_t *cont, int sx, int sy)
}
}

//
// Lith_PlayerUpdateInventory
//
script
void Lith_PlayerUpdateInventory(struct player *p)
{
@@ -311,9 +260,6 @@ void Lith_PlayerUpdateInventory(struct player *p)
if(it->Tick) it->Tick(it);
}

//
// Lith_ItemCreate
//
script ext("ACS")
void *Lith_ItemCreate(int w, int h)
{
@@ -335,9 +281,6 @@ void *Lith_ItemCreate(int w, int h)
return null;
}

//
// Lith_ItemAttach
//
script ext("ACS")
bool Lith_ItemAttach(void *_item)
{
@@ -354,9 +297,6 @@ bool Lith_ItemAttach(void *_item)
return false;
}

//
// Lith_ItemDetach
//
script ext("ACS")
void Lith_ItemDetach(void *_item)
{
@@ -367,9 +307,6 @@ void Lith_ItemDetach(void *_item)
item->Destroy(item);
}

//
// Lith_ItemUnlink
//
script ext("ACS")
void Lith_ItemUnlink(void *_item)
{
@@ -387,9 +324,6 @@ void Lith_ItemUnlink(void *_item)
}
}

//
// Lith_ItemCanPlace
//
script ext("ACS")
bool Lith_ItemCanPlace(void *_item)
{
@@ -403,9 +337,6 @@ bool Lith_ItemCanPlace(void *_item)
return false;
}

//
// Lith_CBITab_Items
//
void Lith_CBITab_Items(gui_state_t *g, struct player *p)
{
static int const x[] = {


+ 0
- 24
source/Main/p_log.c View File

@@ -10,9 +10,6 @@

// Extern Functions ----------------------------------------------------------|

//
// Lith_LogS
//
script ext("ACS")
void Lith_LogS(int levl, int type)