mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 08:52:40 +01:00
1ce49b1ba9
* first pass * seq cmd args retyping * some SEF commands * etc * couple more SND commands * more functions * checkpoint * five more * another one * more funcs + cleanup * reverted unnecessary unions * all SEF commands done * a bunch more * more! * morrrrrrre * almost done for now * 99% * 100 * few names and types * reorg * minor chnages * miscmiscmisc * yet more * another day another func * eth wip func_8004EC68 * some sym names * retyping sound mgr fields * minor renames * D_80078400 * bigger func * retypings * enhanced drum info * the evil is defeated * merged * prelim ambient sound func names * audio frame * checkpoint * renames * learnin bout sounds * latest * fix snd_load_BK_to_bank * func_80056FA4 * warnings * cosmetics * func_800522A8 * struct reorg * figured some stuff out * much more info * fx params * cleanin up * revert accidental changes to jp * more accidental jp changes reverted * misc names * small stuff * migrated all audio data * checkpoint * header reorg begins * audio public/private headers * fixed headers * fixin warnins * oops * 51 fixed * formatted binary data in 30450 * workwork * cleanup * misc * flip macro arg order * more names * audio event triggers * various * sfx player cleanup * start bgm player cleanup * names names names * priorities * merlow * misc enum vals * rocking chair * kmr_00 funcs * enough * restore delete jp file * func_80055EB4 * fix func name * addressed comments * demoted a couple variables from global * couple hidden panel things * credits mostly * credits dedupe in progress * jump table repair * 'finished' end dedupe Co-authored-by: HailSanta <Hail2Santa@gmail.com> Co-authored-by: Ethan Roseman <ethteck@gmail.com>
116 lines
3.4 KiB
C
116 lines
3.4 KiB
C
/*====================================================================
|
|
*
|
|
* Copyright 1993, Silicon Graphics, Inc.
|
|
* All Rights Reserved.
|
|
*
|
|
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
|
|
* Inc.; the contents of this file may not be disclosed to third
|
|
* parties, copied or duplicated in any form, in whole or in part,
|
|
* without the prior written permission of Silicon Graphics, Inc.
|
|
*
|
|
* RESTRICTED RIGHTS LEGEND:
|
|
* Use, duplication or disclosure by the Government is subject to
|
|
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
|
|
* in Technical Data and Computer Software clause at DFARS
|
|
* 252.227-7013, and/or in similar or successor clauses in the FAR,
|
|
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
|
|
* Copyright Laws of the United States.
|
|
*====================================================================*/
|
|
|
|
#ifndef __N_ABI__
|
|
#define __N_ABI__
|
|
|
|
/*
|
|
* BEGIN C-specific section: (typedef's)
|
|
*/
|
|
|
|
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
|
|
|
|
|
/*
|
|
* Macros to assemble the audio command list
|
|
*/
|
|
|
|
#define n_aADPCMdec(pkt, s, f, c, a, d) \
|
|
{ \
|
|
Acmd *_a = (Acmd *)pkt; \
|
|
\
|
|
_a->words.w0 = (_SHIFTL(A_ADPCM, 24, 8) | _SHIFTL(s, 0, 24)); \
|
|
_a->words.w1 = (_SHIFTL(f, 28, 4) | _SHIFTL(c, 16, 12) | \
|
|
_SHIFTL(a, 12, 4) | _SHIFTL(d, 0, 12)); \
|
|
}
|
|
|
|
#define n_aPoleFilter(pkt, f, g, t, s) \
|
|
{ \
|
|
Acmd *_a = (Acmd *)pkt; \
|
|
\
|
|
_a->words.w0 = (_SHIFTL(A_POLEF, 24, 8) | _SHIFTL(f, 16, 8) | \
|
|
_SHIFTL(g, 0, 16)); \
|
|
_a->words.w1 = (_SHIFTL(t, 24, 8) | \
|
|
_SHIFTL((unsigned int)(s), 0, 24)); \
|
|
}
|
|
|
|
#define n_aEnvMixer(pkt, f, t, s) \
|
|
{ \
|
|
Acmd *_a = (Acmd *)pkt; \
|
|
\
|
|
_a->words.w0 = (_SHIFTL(A_ENVMIXER, 24, 8) | _SHIFTL(f, 16, 8) |\
|
|
_SHIFTL(t, 0, 16)); \
|
|
_a->words.w1 = (unsigned int)(s); \
|
|
}
|
|
|
|
#define n_aInterleave(pkt) \
|
|
{ \
|
|
Acmd *_a = (Acmd *)pkt; \
|
|
\
|
|
_a->words.w0 = _SHIFTL(A_INTERLEAVE, 24, 8); \
|
|
}
|
|
|
|
#define n_aLoadBuffer(pkt, c, d, s) \
|
|
{ \
|
|
Acmd *_a = (Acmd *)pkt; \
|
|
\
|
|
_a->words.w0 = (_SHIFTL(A_LOADBUFF, 24, 8) | _SHIFTL(c, 12, 12)|\
|
|
_SHIFTL(d, 0, 12)); \
|
|
_a->words.w1 = (unsigned int)(s); \
|
|
}
|
|
|
|
#define n_aResample(pkt, s, f, p, i, o) \
|
|
{ \
|
|
Acmd *_a = (Acmd *)pkt; \
|
|
\
|
|
_a->words.w0 = (_SHIFTL(A_RESAMPLE, 24, 8) | _SHIFTL(s, 0, 24));\
|
|
_a->words.w1 = (_SHIFTL(f, 30, 2) | _SHIFTL(p, 14, 16) | \
|
|
_SHIFTL(i, 2, 12) | _SHIFTL(o, 0, 2)); \
|
|
}
|
|
|
|
#define n_aSaveBuffer(pkt, c, d, s) \
|
|
{ \
|
|
Acmd *_a = (Acmd *)pkt; \
|
|
\
|
|
_a->words.w0 = (_SHIFTL(A_SAVEBUFF, 24, 8) | _SHIFTL(c, 12, 12)|\
|
|
_SHIFTL(d, 0, 12)); \
|
|
_a->words.w1 = (unsigned int)(s); \
|
|
}
|
|
|
|
#define n_aSetVolume(pkt, f, v, t, r) \
|
|
{ \
|
|
Acmd *_a = (Acmd *)pkt; \
|
|
\
|
|
_a->words.w0 = (_SHIFTL(A_SETVOL, 24, 8) | _SHIFTL(f, 16, 8) | \
|
|
_SHIFTL(v, 0, 16)); \
|
|
_a->words.w1 = _SHIFTL(t, 16, 16) | _SHIFTL(r, 0, 16); \
|
|
}
|
|
|
|
#define n_aLoadADPCM(pkt, c, d) \
|
|
{ \
|
|
Acmd *_a = (Acmd *)pkt; \
|
|
\
|
|
_a->words.w0 = _SHIFTL(A_LOADADPCM, 24, 8) | _SHIFTL(c, 0, 24); \
|
|
_a->words.w1 = (unsigned int) d; \
|
|
}
|
|
|
|
#endif /* _LANGUAGE_C */
|
|
|
|
#endif /* __N_ABI__ */
|