--- np2/win9x/dclock.h 2003/10/16 17:58:51 1.1 +++ np2/win9x/dclock.h 2005/05/14 19:38:59 1.5 @@ -1,46 +1,56 @@ -#define DCLOCK_X 56 -#define DCLOCK_Y 12 -typedef struct { - BYTE dclock_flm[8]; - BYTE dclock_now[8]; - BYTE dclock_bak[8]; - WORD dclock_drawing; -} DCLOCK_T; +enum { + DCLOCK_WIDTH = 56, + DCLOCK_HEIGHT = 12, + DCLOCK_YALIGN = (56 / 8) +}; typedef struct { - BYTE *dclock_pos; - WORD dclock_mask; - BYTE dclock_rolbit; - BYTE reserved; -} DCLOCK_POS; + UINT8 *pos; + UINT16 mask; + UINT8 rolbit; + UINT8 reserved; +} DCPOS; +typedef struct { +const UINT8 *fnt; +const DCPOS *pos; + UINT8 flm[8]; + UINT8 now[8]; + UINT8 bak[8]; + UINT16 drawing; + UINT8 clk_x; + UINT8 _padding; + UINT8 dat[(DCLOCK_HEIGHT * DCLOCK_YALIGN) + 4]; +} _DCLOCK, *DCLOCK; typedef struct { - BYTE *dclock_fnt; - DCLOCK_POS *dclock_put; - void (*init)(void); -} DCLOCK_FNT; + RGB32 pal32[4]; + RGB16 pal16[4]; + UINT32 pal8[4][16]; +} DCLOCKPAL; #ifdef __cplusplus extern "C" { #endif -extern RGB32 dclock_pal[4]; +extern _DCLOCK dclock; +extern DCLOCKPAL dclockpal; void dclock_init(void); -void dclock_init8(void); -void dclock_init16(void); +void dclock_palset(UINT bpp); void dclock_reset(void); void dclock_callback(void); void dclock_redraw(void); BOOL dclock_disp(void); -void __fastcall dclock_cntdown(BYTE value); +void dclock_cntdown(UINT8 value); void dclock_make(void); -void __fastcall dclock_out8(void *ptr, DWORD width); -void __fastcall dclock_out16(void *ptr, DWORD width); +void dclock_out8(void *ptr, UINT yalign); +void dclock_out16(void *ptr, UINT yalign); +void dclock_out24(void *ptr, UINT yalign); +void dclock_out32(void *ptr, UINT yalign); #ifdef __cplusplus }