#include "game_types.h"

/* Sub_0800CA4C @ 0x0800CA4C (real 76B) -- channel/queue/DMA setup chain. Mirrors src/matched/Sub_0800CA4C.c. */
/* Fires the sound channel, posts a queue entry, DMAs 512 bytes, and runs
   the draw-string helper over p+20. Straight-line init chain. */
extern void Sound_AddChannel(int *buf, int a, int b, int c, int d);
extern void TextQueue_AddEntry(int a, int b, int c, int d, int e);
extern int DMA_Transfer(int dst, int src, int n);
extern void Sub_0801178C(int a, int b, int *c);

void Sub_0800CA4C(int *p)
{
    Sound_AddChannel((int *)0x0805AB94, 3, 1024, 0x6000000, 0);
    TextQueue_AddEntry(1, 0, 0, 0x08062B94, 16);
    DMA_Transfer(0x08062D94, (int)((char *)p + 20), 512);
    Sub_0801178C(2048, 24, (int *)((char *)p + 20));
}
