From 52708bc160da106cd406c26f8b797d46e58cc423 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 23 Mar 2026 07:19:20 -0400 Subject: Use macros for ind_act_*() funcs, shaves 33 bytes off the .xex. --- src/indic8.c | 38 +++----------------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) (limited to 'src/indic8.c') diff --git a/src/indic8.c b/src/indic8.c index 33d7d31..2be86d6 100644 --- a/src/indic8.c +++ b/src/indic8.c @@ -2,22 +2,10 @@ #include #include "addrs.h" +#include "indic8.h" extern char hz; -#define NET_TX_CHR 0x5c /* COLOR1 up-arrow */ -#define NET_RX_CHR 0x5d /* COLOR1 down-arrow */ -#define NET_ERR_CHR 0xe1 /* COLOR3 exclamation mark */ -#define NET_IDLE_CHR 0 /* null (renders as a space) */ - -#define J_CHR 0x4a /* COLOR1 J */ -#define P_CHR 0x50 /* COLOR1 P */ -#define Q_CHR 0x51 /* COLOR1 Q */ -#define M_CHR 0x4d /* COLOR1 M */ -#define CHAN_CHR 0x63 /* COLOR1 # */ - -char *ind_net_status; /* initialized in screen.c, scr_init() */ - static void ind_start_timer(void) { /* 3.7 sec is just what The_Doctor__ ordered! */ OS.cdtmv5 = (hz / 10) * 37; @@ -39,31 +27,11 @@ void ind_net_idle(void) { *ind_net_status = NET_IDLE_CHR; } -static void ind_act(char c) { - ind_net_status[1] = c; +void ind_act(char c) { + *ind_act_status = c; ind_start_timer(); } -void ind_act_pm(void) { - ind_act(M_CHR); -} - -void ind_act_chantext(void) { - ind_act(CHAN_CHR); -} - -void ind_act_join(void) { - ind_act(J_CHR); -} - -void ind_act_part(void) { - ind_act(P_CHR); -} - -void ind_act_quit(void) { - ind_act(Q_CHR); -} - void ind_check_timer(void) { if(!OS.cdtmv5) ind_net_status[1] = 0; -- cgit v1.2.3