Merge pull request #1400 from KieronJ/sndtest

Finish s16b
This commit is contained in:
Kieron 2023-09-30 00:22:26 +01:00 committed by GitHub
commit 1cabff5c93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 174 additions and 346 deletions

View File

@ -1,172 +0,0 @@
opt c+, at+, e+, n-
section overlay.text
xdef s16b_800C4584
s16b_800C4584:
dw 0x3C02800C ; 800C4584
dw 0x8C4258AC ; 800C4588
dw 0x03E00008 ; 800C458C
dw 0x00000000 ; 800C4590
dw 0x27BDFFD0 ; 800C4594
dw 0x24020001 ; 800C4598
dw 0xA7A40010 ; 800C459C
dw 0x27A40010 ; 800C45A0
dw 0xAFBF0028 ; 800C45A4
dw 0xA7A20012 ; 800C45A8
dw 0x0C005941 ; 800C45AC
dw 0xA7A50014 ; 800C45B0
dw 0x8FBF0028 ; 800C45B4
dw 0x00000000 ; 800C45B8
dw 0x03E00008 ; 800C45BC
dw 0x27BD0030 ; 800C45C0
dw 0x27BDFFD0 ; 800C45C4
dw 0xAFB20028 ; 800C45C8
dw 0x00809021 ; 800C45CC
dw 0x00A02021 ; 800C45D0
dw 0xAFB00020 ; 800C45D4
dw 0x00C08021 ; 800C45D8
dw 0xAFB10024 ; 800C45DC
dw 0x00E08821 ; 800C45E0
dw 0x1080000D ; 800C45E4
dw 0xAFBF002C ; 800C45E8
dw 0x0C006F11 ; 800C45EC
dw 0x00000000 ; 800C45F0
dw 0x02002021 ; 800C45F4
dw 0x27A50010 ; 800C45F8
dw 0x0C006F92 ; 800C45FC
dw 0x24060001 ; 800C4600
dw 0x02202021 ; 800C4604
dw 0x27A50018 ; 800C4608
dw 0x0C006F92 ; 800C460C
dw 0x24060001 ; 800C4610
dw 0x08031197 ; 800C4614
dw 0x00000000 ; 800C4618
dw 0x8A080003 ; 800C461C
dw 0x9A080000 ; 800C4620
dw 0x8A090007 ; 800C4624
dw 0x9A090004 ; 800C4628
dw 0xABA80013 ; 800C462C
dw 0xBBA80010 ; 800C4630
dw 0xABA90017 ; 800C4634
dw 0xBBA90014 ; 800C4638
dw 0x8A280003 ; 800C463C
dw 0x9A280000 ; 800C4640
dw 0x8A290007 ; 800C4644
dw 0x9A290004 ; 800C4648
dw 0xABA8001B ; 800C464C
dw 0xBBA80018 ; 800C4650
dw 0xABA9001F ; 800C4654
dw 0xBBA9001C ; 800C4658
dw 0x87A40012 ; 800C465C
dw 0x87A2001A ; 800C4660
dw 0x00000000 ; 800C4664
dw 0x00821823 ; 800C4668
dw 0x1C600003 ; 800C466C
dw 0x00403021 ; 800C4670
dw 0x00803021 ; 800C4674
dw 0x00031823 ; 800C4678
dw 0x97A20010 ; 800C467C
dw 0x00000000 ; 800C4680
dw 0xA6420000 ; 800C4684
dw 0x97A20014 ; 800C4688
dw 0x00000000 ; 800C468C
dw 0xA6420002 ; 800C4690
dw 0x97A20018 ; 800C4694
dw 0x02402021 ; 800C4698
dw 0xA4820008 ; 800C469C
dw 0x97A2001C ; 800C46A0
dw 0x00802821 ; 800C46A4
dw 0xA486000C ; 800C46A8
dw 0xA4860004 ; 800C46AC
dw 0xA483000E ; 800C46B0
dw 0xA4830006 ; 800C46B4
dw 0x0C01BFB9 ; 800C46B8
dw 0xA482000A ; 800C46BC
dw 0x8FBF002C ; 800C46C0
dw 0x8FB20028 ; 800C46C4
dw 0x8FB10024 ; 800C46C8
dw 0x8FB00020 ; 800C46CC
dw 0x03E00008 ; 800C46D0
dw 0x27BD0030 ; 800C46D4
dw 0x94A20000 ; 800C46D8
dw 0x94C30000 ; 800C46DC
dw 0x00000000 ; 800C46E0
dw 0x00431023 ; 800C46E4
dw 0xA4820010 ; 800C46E8
dw 0x94A20004 ; 800C46EC
dw 0x94C30004 ; 800C46F0
dw 0x00000000 ; 800C46F4
dw 0x00431023 ; 800C46F8
dw 0xA4820012 ; 800C46FC
dw 0x94A20000 ; 800C4700
dw 0x94C30000 ; 800C4704
dw 0x00000000 ; 800C4708
dw 0x00431021 ; 800C470C
dw 0xA4820018 ; 800C4710
dw 0x94A20004 ; 800C4714
dw 0x94C30004 ; 800C4718
dw 0x00000000 ; 800C471C
dw 0x00431023 ; 800C4720
dw 0xA482001A ; 800C4724
dw 0x94A20000 ; 800C4728
dw 0x94C30000 ; 800C472C
dw 0x00000000 ; 800C4730
dw 0x00431023 ; 800C4734
dw 0xA4820028 ; 800C4738
dw 0x94A20004 ; 800C473C
dw 0x94C30004 ; 800C4740
dw 0x00000000 ; 800C4744
dw 0x00431021 ; 800C4748
dw 0xA482002A ; 800C474C
dw 0x94A20000 ; 800C4750
dw 0x94C30000 ; 800C4754
dw 0x00000000 ; 800C4758
dw 0x00431021 ; 800C475C
dw 0xA4820020 ; 800C4760
dw 0x94A20004 ; 800C4764
dw 0x94C30004 ; 800C4768
dw 0x00000000 ; 800C476C
dw 0x00431021 ; 800C4770
dw 0xA4820022 ; 800C4774
dw 0x94A30002 ; 800C4778
dw 0x94C70002 ; 800C477C
dw 0x240200FF ; 800C4780
dw 0xA4800016 ; 800C4784
dw 0xA480001E ; 800C4788
dw 0xA4820026 ; 800C478C
dw 0x00671821 ; 800C4790
dw 0xA483002C ; 800C4794
dw 0xA4830024 ; 800C4798
dw 0xA483001C ; 800C479C
dw 0xA4830014 ; 800C47A0
dw 0x94A20000 ; 800C47A4
dw 0x94C30000 ; 800C47A8
dw 0x00000000 ; 800C47AC
dw 0x00431023 ; 800C47B0
dw 0xA4820000 ; 800C47B4
dw 0x94A20004 ; 800C47B8
dw 0x94C30004 ; 800C47BC
dw 0x00000000 ; 800C47C0
dw 0x00431023 ; 800C47C4
dw 0xA4820002 ; 800C47C8
dw 0x94A20002 ; 800C47CC
dw 0x94C30002 ; 800C47D0
dw 0x00000000 ; 800C47D4
dw 0x00431023 ; 800C47D8
dw 0xA4820004 ; 800C47DC
dw 0x94A20000 ; 800C47E0
dw 0x94C30000 ; 800C47E4
dw 0x00000000 ; 800C47E8
dw 0x00431021 ; 800C47EC
dw 0xA4820008 ; 800C47F0
dw 0x94A20004 ; 800C47F4
dw 0x94C30004 ; 800C47F8
dw 0x00000000 ; 800C47FC
dw 0x00431021 ; 800C4800
dw 0xA482000A ; 800C4804
dw 0x94A20002 ; 800C4808
dw 0x94C30002 ; 800C480C
dw 0x00000000 ; 800C4810
dw 0x00431021 ; 800C4814
dw 0x03E00008 ; 800C4818
dw 0xA482000C ; 800C481C

View File

@ -1,33 +0,0 @@
opt c+, at+, e+, n-
section overlay.text
xdef s16b_800C4C60
s16b_800C4C60:
dw 0x30827FFF ; 800C4C60
dw 0x14400003 ; 800C4C64
dw 0x00801821 ; 800C4C68
dw 0x03E00008 ; 800C4C6C
dw 0x3062FFFF ; 800C4C70
dw 0x3083001F ; 800C4C74
dw 0x308203E0 ; 800C4C78
dw 0x00021142 ; 800C4C7C
dw 0x00621821 ; 800C4C80
dw 0x30827C00 ; 800C4C84
dw 0x00021282 ; 800C4C88
dw 0x00621821 ; 800C4C8C
dw 0x00031080 ; 800C4C90
dw 0x00431021 ; 800C4C94
dw 0x00021900 ; 800C4C98
dw 0x00431021 ; 800C4C9C
dw 0x30848000 ; 800C4CA0
dw 0x00021242 ; 800C4CA4
dw 0x00021940 ; 800C4CA8
dw 0x00431825 ; 800C4CAC
dw 0x00021280 ; 800C4CB0
dw 0x00621825 ; 800C4CB4
dw 0x00641825 ; 800C4CB8
dw 0x14600002 ; 800C4CBC
dw 0x00000000 ; 800C4CC0
dw 0x34038000 ; 800C4CC4
dw 0x03E00008 ; 800C4CC8
dw 0x3062FFFF ; 800C4CCC

View File

@ -1,66 +0,0 @@
opt c+, at+, e+, n-
section s16b.text
xdef s16b_800C4CD0
s16b_800C4CD0:
dw 0x27BDFFC8 ; 800C4CD0
dw 0xAFB3001C ; 800C4CD4
dw 0x2413000F ; 800C4CD8
dw 0x3C02800C ; 800C4CDC
dw 0xAFB7002C ; 800C4CE0
dw 0x0040B821 ; 800C4CE4
dw 0xAFB60028 ; 800C4CE8
dw 0x3C16800B ; 800C4CEC
dw 0xAFB50024 ; 800C4CF0
dw 0x26D53818 ; 800C4CF4
dw 0x3C02800C ; 800C4CF8
dw 0x24423258 ; 800C4CFC
dw 0xAFB20018 ; 800C4D00
dw 0x00409021 ; 800C4D04
dw 0x26E23260 ; 800C4D08
dw 0xAFB40020 ; 800C4D0C
dw 0x0040A021 ; 800C4D10
dw 0x240200E2 ; 800C4D14
dw 0xAFBF0030 ; 800C4D18
dw 0xAFB10014 ; 800C4D1C
dw 0xAFB00010 ; 800C4D20
dw 0xA6420002 ; 800C4D24
dw 0x240200C4 ; 800C4D28
dw 0xA6820002 ; 800C4D2C
dw 0x0C023E19 ; 800C4D30
dw 0x00002021 ; 800C4D34
dw 0x26E43260 ; 800C4D38
dw 0x0C024827 ; 800C4D3C
dw 0x02A02821 ; 800C4D40
dw 0x0C023E19 ; 800C4D44
dw 0x00002021 ; 800C4D48
dw 0x02A08021 ; 800C4D4C
dw 0x24110200 ; 800C4D50
dw 0x96040000 ; 800C4D54
dw 0x0C031318 ; 800C4D58
dw 0x2631FFFF ; 800C4D5C
dw 0xA6020000 ; 800C4D60
dw 0x1E20FFFB ; 800C4D64
dw 0x26100002 ; 800C4D68
dw 0x02402021 ; 800C4D6C
dw 0x0C0247EC ; 800C4D70
dw 0x26C53818 ; 800C4D74
dw 0x2673FFFF ; 800C4D78
dw 0x96820002 ; 800C4D7C
dw 0x96430002 ; 800C4D80
dw 0x24420002 ; 800C4D84
dw 0x24630002 ; 800C4D88
dw 0xA6820002 ; 800C4D8C
dw 0x1E60FFE7 ; 800C4D90
dw 0xA6430002 ; 800C4D94
dw 0x8FBF0030 ; 800C4D98
dw 0x8FB7002C ; 800C4D9C
dw 0x8FB60028 ; 800C4DA0
dw 0x8FB50024 ; 800C4DA4
dw 0x8FB40020 ; 800C4DA8
dw 0x8FB3001C ; 800C4DAC
dw 0x8FB20018 ; 800C4DB0
dw 0x8FB10014 ; 800C4DB4
dw 0x8FB00010 ; 800C4DB8
dw 0x03E00008 ; 800C4DBC
dw 0x27BD0038 ; 800C4DC0

View File

@ -333,6 +333,8 @@ overlay group over(olay), file("{{OBJ_DIR}}\{{OVERLAY}}.bin")
section overlay.dtors, overlay
section overlay.rdata, overlay
section overlay.sdata, overlay
section overlay.sbss, overlay
section overlay.bss, overlay
section overlay.fixme, overlay
{% if OVERLAY == "sound" %}

View File

@ -17,11 +17,6 @@ extern CONTROL *gSnaControl_800AB9F4;
extern SVECTOR GM_PlayerPosition_800ABA10;
extern int GM_PlayerStatus_800ABA50;
extern const char aAsioto_800C5874[]; // = "asioto.c"
extern const char s16b_dword_800C582C[]; // = " asioto se set err \n"
extern const char s16b_dword_800C5844[]; // = " asioto se noise set err \n"
extern const char s16b_dword_800C5860[]; // = " migi sodesuri %d \n"
#define EXEC_LEVEL 4
int asioto_800C38AC(Work *work)
@ -172,7 +167,7 @@ int AsiotoGetResources_800C3B94(Work *work)
if (i != work->count)
{
printf(s16b_dword_800C582C);
printf(" asioto se set err \n");
return -1;
}
}
@ -211,7 +206,7 @@ int AsiotoGetResources_800C3B94(Work *work)
if (i != work->count)
{
printf(s16b_dword_800C5844);
printf(" asioto se noise set err \n");
return -1;
}
@ -231,7 +226,7 @@ int AsiotoGetResources_800C3B94(Work *work)
work->se_duct[i][0] = GCL_GetNextInt_800209E8(GCL_Get_Param_Result_80020AA4());
work->se_duct[i][1] = GCL_GetNextInt_800209E8(GCL_Get_Param_Result_80020AA4());
printf(s16b_dword_800C5860, work->se_duct[i][0]);
printf(" migi sodesuri %d \n", work->se_duct[i][0]);
}
}
@ -246,7 +241,7 @@ GV_ACT *NewAsioto_800C3E08(int name, int where, int argc, char **argv)
if (work != NULL)
{
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)AsiotoAct_800C39E8,
(TActorFunction)AsiotoDie_800C3B8C, aAsioto_800C5874);
(TActorFunction)AsiotoDie_800C3B8C, "asioto.c");
if (AsiotoGetResources_800C3B94(work) < 0)
{
GV_DestroyActor_800151C8(&work->actor);

View File

@ -20,12 +20,6 @@ extern SVECTOR DG_ZeroVector_800AB39C;
extern int GM_GameStatus_800AB3CC;
extern int GM_CurrentMap_800AB9B0;
extern const char s16b_dword_800C5800[]; // = "destroy\n"
extern const char s16b_dword_800C580C[]; // = "box_01"
extern const char s16b_dword_800C5814[]; // = "dbx1"
extern const char s16b_dword_800C581C[]; // = "dbx2"
extern const char s16b_dword_800C5824[]; // = "wall.c"
#define EXEC_LEVEL 5
void asioto_800C3278(Work *work)
@ -116,7 +110,7 @@ void WallAct_800C345C(Work *work)
void WallDie_800C34B0(Work *work)
{
printf(s16b_dword_800C5800);
printf("destroy\n");
work->object.objs->flag = DG_FLAG_ONEPIECE | DG_FLAG_BOUND | DG_FLAG_TRANS | DG_FLAG_PAINT | DG_FLAG_TEXT;
GM_FreeObject_80034BF8(&work->object);
@ -139,7 +133,7 @@ int WallGetResources_800C34F0(work, pos, dir, def_model, map)
switch (def_model)
{
case 0:
model = GV_StrCode_80016CCC(s16b_dword_800C580C);
model = GV_StrCode_80016CCC("box_01");
scale.vx = 8192;
scale.vy = 16384;
scale.vz = 8192;
@ -147,14 +141,14 @@ int WallGetResources_800C34F0(work, pos, dir, def_model, map)
break;
case 1:
model = GV_StrCode_80016CCC(s16b_dword_800C5814);
model = GV_StrCode_80016CCC("dbx1");
scale.vx = 4096;
scale.vy = 4096;
scale.vz = 4096;
break;
case 2:
model = GV_StrCode_80016CCC(s16b_dword_800C581C);
model = GV_StrCode_80016CCC("dbx2");
scale.vx = 4096;
scale.vy = 4096;
scale.vz = 4096;
@ -201,7 +195,7 @@ GV_ACT *NewWall_800C3688(SVECTOR *pos, SVECTOR *dir)
work = (Work *)GV_NewActor_800150E4(EXEC_LEVEL, sizeof(Work));
if (work != NULL)
{
GV_SetNamedActor_8001514C(&work->actor, NULL, (TActorFunction)WallDie_800C34B0, s16b_dword_800C5824);
GV_SetNamedActor_8001514C(&work->actor, NULL, (TActorFunction)WallDie_800C34B0, "wall.c");
// Why? WallGetResources_800C34F0 is missing two last arguments, leading to nasty UB
if (WallGetResources_800C34F0(work, pos, dir) < 0)
@ -225,7 +219,7 @@ GV_ACT *NewWall_800C3718(int name, int where, int argc, char **argv)
work = (Work *)GV_NewActor_800150E4(EXEC_LEVEL, sizeof(Work));
if (work != NULL)
{
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)WallAct_800C345C, (TActorFunction)WallDie_800C34B0, s16b_dword_800C5824);
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)WallAct_800C345C, (TActorFunction)WallDie_800C34B0, "wall.c");
param = (char *)GCL_GetParam_80020968('t');
if (param != 0)

View File

@ -1,4 +1,3 @@
#include "linker.h"
#include "Bullet/jirai.h"
#include "Game/target.h"
#include "libgcl/libgcl.h"
@ -20,8 +19,7 @@ extern int GM_CurrentMap_800AB9B0;
extern Jirai_unknown stru_800BDD78[16];
extern Jirai_unknown stru_800BDE78[8];
extern const char s16b_dword_800C588C[]; // = "dymc_seg.c"
extern unsigned short s16b_dword_800C3254[]; // = {0xD182, 0x006B}
unsigned short s16b_dword_800C3254[] = {0xD182, 0x006B};
int s16b_800C43A4(char param);
int s16b_800C44DC(unsigned short name, int hash_count, unsigned short *hashes);
@ -178,7 +176,7 @@ GV_ACT *NewDymcSeg_800C4BCC(int name, int where, int argc, char **argv)
work = (DymcSegWork *)GV_NewActor_800150E4(EXEC_LEVEL, sizeof(DymcSegWork));
if (work != NULL)
{
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)DymcSegAct_800C4A44, (TActorFunction)DymcSegDie_800C4A98, s16b_dword_800C588C);
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)DymcSegAct_800C4A44, (TActorFunction)DymcSegDie_800C4A98, "dymc_seg.c");
if (DymcSegGetResources_800C4AC0(work, name, where) < 0)
{

View File

@ -1,5 +1,5 @@
#include "linker.h"
#include "libdg/libdg.h"
#include "libgcl/hash.h"
#include "libgcl/libgcl.h"
#include "libgv/libgv.h"
@ -25,10 +25,10 @@ extern int GV_Clock_800AB920;
extern int GV_PassageTime_800AB924;
extern int GV_PauseLevel_800AB928;
extern int GM_GameStatus_800AB3CC;
extern unsigned short s16b_dword_800C3250[];
extern int s16b_dword_800C58AC;
extern const char aFadeIo_800C5880[]; // = "fadeio.c";
unsigned short s16b_dword_800C3250[] = {HASH_KILL, 0x71F1};
static int s16b_dword_800C58AC[2];
int s16b_800C43A4(char param);
int s16b_800C44DC(unsigned short name, int hash_count, unsigned short *hashes);
@ -165,7 +165,7 @@ GV_ACT *NewFadeIo_800C4224(int name, int where, int argc, char **argv)
if (work != NULL)
{
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)FadeIoAct_800C3E7C, (TActorFunction)FadeIoDie_800C40D0,
aFadeIo_800C5880);
"fadeio.c");
if (FadeIoGetResources_800C4100(work, name, where) < 0)
{
GV_DestroyActor_800151C8(&work->actor);
@ -184,7 +184,7 @@ GV_ACT *NewFadeIo_800C42BC(int name, int where, int argc, char **argv)
work = (FadeIoWork *)GV_NewActor_800150E4(EXEC_LEVEL, sizeof(FadeIoWork));
if (work != NULL)
{
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)FadeIoAct_800C3E7C, (TActorFunction)FadeIoDie_800C40D0, aFadeIo_800C5880);
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)FadeIoAct_800C3E7C, (TActorFunction)FadeIoDie_800C40D0, "fadeio.c");
if (FadeIoGetResources_800C4100(work, s16b_800C43A4('m'), s16b_800C43A4('s')) < 0)
{
@ -269,7 +269,7 @@ int s16b_800C44DC(unsigned short name, int hash_count, unsigned short *hashes)
if (hash == hashes[i])
{
found = i;
s16b_dword_800C58AC = msg->message[1];
s16b_dword_800C58AC[0] = msg->message[1];
}
}
}
@ -277,4 +277,93 @@ int s16b_800C44DC(unsigned short name, int hash_count, unsigned short *hashes)
return found;
}
#pragma INCLUDE_ASM("asm/overlays/s16b/s16b_800C4584.s")
int s16b_800C4584(void)
{
return s16b_dword_800C58AC[0];
}
void s16b_800C4594(short address, short message)
{
GV_MSG msg;
msg.address = address;
msg._len = 1;
msg.message[0] = message;
GV_SendMessage_80016504(&msg);
}
void s16b_800C45C4(HZD_SEG *seg, MATRIX *trans, SVECTOR *arg2, SVECTOR *arg3)
{
SVECTOR sp10;
SVECTOR sp18;
int height;
int y;
if (trans)
{
DG_SetPos_8001BC44(trans);
DG_PutVector_8001BE48(arg2, &sp10, 1);
DG_PutVector_8001BE48(arg3, &sp18, 1);
}
else
{
sp10 = *arg2;
sp18 = *arg3;
}
height = sp10.vy - sp18.vy;
y = sp18.vy;
if (height <= 0)
{
y = sp10.vy;
height = -height;
}
seg->p1.x = sp10.vx;
seg->p1.z = sp10.vz;
seg->p2.x = sp18.vx;
seg->p2.z = sp18.vz;
seg->p2.y = y;
seg->p1.y = y;
seg->p2.h = height;
seg->p1.h = height;
HZD_SetDynamicSegment_8006FEE4(seg, seg);
}
void s16b_800C46D8(HZD_FLR *flr, SVECTOR *arg1, SVECTOR *arg2)
{
short y;
flr->p1.x = arg1->vx - arg2->vx;
flr->p1.z = arg1->vz - arg2->vz;
flr->p2.x = arg1->vx + arg2->vx;
flr->p2.z = arg1->vz - arg2->vz;
flr->p4.x = arg1->vx - arg2->vx;
flr->p4.z = arg1->vz + arg2->vz;
flr->p3.x = arg1->vx + arg2->vx;
flr->p3.z = arg1->vz + arg2->vz;
y = arg1->vy + arg2->vy;
flr->p1.h = 0;
flr->p2.h = 0;
flr->p3.h = 0xFF;
flr->p4.y = y;
flr->p3.y = y;
flr->p2.y = y;
flr->p1.y = y;
flr->b1.x = arg1->vx - arg2->vx;
flr->b1.z = arg1->vz - arg2->vz;
flr->b1.y = arg1->vy - arg2->vy;
flr->b2.x = arg1->vx + arg2->vx;
flr->b2.z = arg1->vz + arg2->vz;
flr->b2.y = arg1->vy + arg2->vy;
}

View File

@ -17,18 +17,69 @@ typedef struct _SepiaWork
extern int GV_Clock_800AB920;
extern u_long image_data_800B3818[256];
extern RECT rect_800C3268;
extern RECT rect_800C3270;
extern const char s16b_dword_800C5898[]; // = "sepia.c"
RECT rect_800C3258 = {768, 226, 256, 2};
RECT rect_800C3260 = {768, 196, 256, 2};
RECT rect_800C3268 = {768, 226, 256, 2};
RECT rect_800C3270 = {768, 196, 256, 2};
#define EXEC_LEVEL 7
#pragma INCLUDE_ASM("asm/overlays/s16b/s16b_800C4C60.s");
unsigned short s16b_800C4C60(unsigned short);
unsigned short s16b_800C4C60(unsigned short color)
{
int r, g, b, a;
#pragma INCLUDE_ASM("asm/overlays/s16b/s16b_800C4CD0.s");
unsigned short s16b_800C4CD0(unsigned short);
if ((color & 0x7FFF) == 0)
{
return color;
}
r = color & 0x1F;
g = (color & 0x3E0) >> 5;
b = (color & 0x7C00) >> 10;
r = r + g;
r = r + b;
r = (r * 85) >> 9;
a = color & 0x8000;
color = r;
r = color | color << 5 | color << 10 | a;
if (r == 0)
{
r = 0x8000;
}
return r;
}
void s16b_800C4CD0(void)
{
int i, j;
unsigned short *iter;
rect_800C3258.y = 226;
rect_800C3260.y = 196;
for (i = 15; i > 0; i--)
{
DrawSync(0);
StoreImage2(&rect_800C3260, image_data_800B3818);
DrawSync(0);
iter = (short *)image_data_800B3818;
for (j = 512; j > 0; j--)
{
*iter++ = s16b_800C4C60(*iter);
}
LoadImage2(&rect_800C3258, image_data_800B3818);
rect_800C3260.y += 2;
rect_800C3258.y += 2;
}
}
void SepiaAct_800C4DC4(SepiaWork *work)
{
@ -89,7 +140,7 @@ GV_ACT *NewSepia_800C4F9C(int r, int g, int b)
work = (SepiaWork *)GV_NewActor_800150E4(EXEC_LEVEL, sizeof(SepiaWork));
if (work != NULL)
{
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)SepiaAct_800C4DC4, (TActorFunction)SepiaDie_800C4E70, s16b_dword_800C5898);
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)SepiaAct_800C4DC4, (TActorFunction)SepiaDie_800C4E70, "sepia.c");
if (s16b_800C4EAC(work, r, g, b) < 0)
{
@ -182,7 +233,7 @@ GV_ACT *NewSepia_800C5214(void)
work = (SepiaWork *)GV_NewActor_800150E4(EXEC_LEVEL, sizeof(SepiaWork));
if (work != NULL)
{
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)SepiaAct_800C51E0, (TActorFunction)SepiaDie_800C4E70, s16b_dword_800C5898);
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)SepiaAct_800C51E0, (TActorFunction)SepiaDie_800C4E70, "sepia.c");
if (SepiaGetResources_800C51E8(work) < 0)
{

View File

@ -1,4 +1,3 @@
#include "linker.h"
#include "libdg/libdg.h"
#include "libgcl/libgcl.h"
#include "libgv/libgv.h"
@ -18,8 +17,6 @@ typedef struct _ShakemdlWork
short *vertices;
} ShakemdlWork;
extern const char s16b_dword_800C58A0[]; // = "shakemdl.c"
int s16b_800C4364(int param, int def);
int s16b_800C43A4(int param);
int s16b_800C5728(ShakemdlWork *, short *);
@ -129,7 +126,7 @@ GV_ACT *NewShakemdl_800C54E8(int name, int where, int argc, char **argv)
work = (ShakemdlWork *)GV_NewActor_800150E4(EXEC_LEVEL, sizeof(ShakemdlWork));
if (work != NULL)
{
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)ShakemdlAct_800C5288, (TActorFunction)ShakemdlDie_800C5418, s16b_dword_800C58A0);
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)ShakemdlAct_800C5288, (TActorFunction)ShakemdlDie_800C5418, "shakemdl.c");
model = s16b_800C43A4('m');
work->f2C = s16b_800C43A4('a');
@ -157,7 +154,7 @@ GV_ACT *NewShakemdl_800c55b0(int arg0, int arg1, int arg2)
work = (ShakemdlWork *)GV_NewActor_800150E4(EXEC_LEVEL, sizeof(ShakemdlWork));
if (work != NULL)
{
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)ShakemdlAct_800C5288, (TActorFunction)ShakemdlDie_800C5418, s16b_dword_800C58A0);
GV_SetNamedActor_8001514C(&work->actor, (TActorFunction)ShakemdlAct_800C5288, (TActorFunction)ShakemdlDie_800C5418, "shakemdl.c");
work->f2C = arg1;

View File

@ -20,30 +20,3 @@ GCL_ActorTableEntry s16bOverlayCharas[] =
{ 0x001F, (TGCL_ActorCreateFn)NewSepia_800C4F9C },
{ 0, 0 }
};
int s16b_dword_800C3250 = 0x71F13223;
int s16b_dword_800C3254 = 0x006BD182;
int s16b_dword_800C3258 = 0x00E20300;
int s16b_dword_800C325C = 0x00020100;
int s16b_dword_800C3260 = 0x00C40300;
int s16b_dword_800C3264 = 0x00020100;
RECT rect_800C3268 = {768, 226, 256, 2};
RECT rect_800C3270 = {768, 196, 256, 2};
const char s16b_dword_800C5800[] = "destroy\n";
const char s16b_dword_800C580C[] = "box_01";
const char s16b_dword_800C5814[] = "dbx1";
const char s16b_dword_800C581C[] = "dbx2";
const char s16b_dword_800C5824[] = "wall.c";
const char s16b_dword_800C582C[] = " asioto se set err \n";
const char s16b_dword_800C5844[] = " asioto se noise set err \n";
const char s16b_dword_800C5860[] = " migi sodesuri %d \n";
const char aAsioto_800C5874[] = "asioto.c";
const char aFadeIo_800C5880[] = "fadeio.c";
const char s16b_dword_800C588C[] = "dymc_seg.c";
const char s16b_dword_800C5898[] = "sepia.c";
const char s16b_dword_800C58A0[] = "shakemdl.c";
const char s16b_dword_800C58AC[] = {0x0, 0x0, 0x0, 0x0};
const char s16b_dword_800C58B0[] = {0x0, 0x0, 0x0, 0x0};