mirror of https://github.com/zeldaret/tmc.git
Merge pull request #613 from nonmatch/patch-74
This commit is contained in:
commit
eb233b05cd
|
@ -1,131 +0,0 @@
|
||||||
.syntax unified
|
|
||||||
ldr r3, _08016DF0 @ =gScreen
|
|
||||||
ldrh r1, [r3]
|
|
||||||
ldrh r0, [r3, #6]
|
|
||||||
ands r0, r1
|
|
||||||
movs r1, #0x80
|
|
||||||
lsls r1, r1, #0x13
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #8
|
|
||||||
ldrh r0, [r3, #8]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0x14]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0x20]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0x2c]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0xa]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0xc]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0x16]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0x18]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0x22]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0x24]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0x2e]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, #2
|
|
||||||
ldrh r0, [r3, #0x30]
|
|
||||||
strh r0, [r1]
|
|
||||||
adds r1, r3, #0
|
|
||||||
adds r1, #0x38
|
|
||||||
ldr r2, _08016DF4 @ =0x04000020
|
|
||||||
ldrh r0, [r3, #0x38]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #2]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #4]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #6]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #8]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #0xa]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #0xc]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #0xe]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r1, #0x10
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #2]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #4]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #6]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #8]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #0xa]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #0xc]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #0xe]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r1, #0x10
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #2]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #4]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #6]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #8]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #0xa]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #0xc]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #4
|
|
||||||
ldrh r0, [r1, #0xe]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #0x10]
|
|
||||||
strh r0, [r2]
|
|
||||||
adds r2, #2
|
|
||||||
ldrh r0, [r1, #0x12]
|
|
||||||
strh r0, [r2]
|
|
||||||
bx lr
|
|
||||||
.align 2, 0
|
|
||||||
_08016DF0: .4byte gScreen
|
|
||||||
_08016DF4: .4byte 0x04000020
|
|
||||||
.syntax divided
|
|
|
@ -94,8 +94,10 @@ void sub_08016CA8(BgSettings* bg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NONMATCH("asm/non_matching/DispCtrlSet.inc", void DispCtrlSet(void)) {
|
void DispCtrlSet(void) {
|
||||||
|
u16* tmp2;
|
||||||
BgControls* controls;
|
BgControls* controls;
|
||||||
|
BgTransformationSettings* bgTfSettings;
|
||||||
u16 tmp = gScreen.lcd.displayControl & gScreen.lcd.displayControlMask;
|
u16 tmp = gScreen.lcd.displayControl & gScreen.lcd.displayControlMask;
|
||||||
REG_DISPCNT = tmp;
|
REG_DISPCNT = tmp;
|
||||||
|
|
||||||
|
@ -113,36 +115,41 @@ NONMATCH("asm/non_matching/DispCtrlSet.inc", void DispCtrlSet(void)) {
|
||||||
REG_BG3VOFS = gScreen.bg3.yOffset;
|
REG_BG3VOFS = gScreen.bg3.yOffset;
|
||||||
|
|
||||||
controls = &(gScreen.controls);
|
controls = &(gScreen.controls);
|
||||||
REG_BG2PA = controls->bg2.dx;
|
bgTfSettings = &controls->bg2;
|
||||||
REG_BG2PB = controls->bg2.dmx;
|
|
||||||
REG_BG2PC = controls->bg2.dy;
|
|
||||||
REG_BG2PD = controls->bg2.dmy;
|
|
||||||
REG_BG2X_L = controls->bg2.xPointLeastSig;
|
|
||||||
REG_BG2X_H = controls->bg2.xPointMostSig;
|
|
||||||
REG_BG2Y_L = controls->bg2.yPointLeastSig;
|
|
||||||
REG_BG2Y_H = controls->bg2.yPointMostSig;
|
|
||||||
|
|
||||||
REG_BG3PA = controls->bg3.dx;
|
REG_BG2PA = bgTfSettings->dx;
|
||||||
REG_BG3PB = controls->bg3.dmx;
|
REG_BG2PB = bgTfSettings->dmx;
|
||||||
REG_BG3PC = controls->bg3.dy;
|
REG_BG2PC = bgTfSettings->dy;
|
||||||
REG_BG3PD = controls->bg3.dmy;
|
REG_BG2PD = bgTfSettings->dmy;
|
||||||
REG_BG3X_L = controls->bg3.xPointLeastSig;
|
REG_BG2X_L = bgTfSettings->xPointLeastSig;
|
||||||
REG_BG3X_H = controls->bg3.xPointMostSig;
|
REG_BG2X_H = bgTfSettings->xPointMostSig;
|
||||||
REG_BG3Y_L = controls->bg3.yPointLeastSig;
|
REG_BG2Y_L = bgTfSettings->yPointLeastSig;
|
||||||
REG_BG3Y_H = controls->bg3.yPointMostSig;
|
REG_BG2Y_H = bgTfSettings->yPointMostSig;
|
||||||
|
|
||||||
REG_WIN0H = controls->window0HorizontalDimensions;
|
bgTfSettings = &controls->bg3;
|
||||||
REG_WIN1H = controls->window1HorizontalDimensions;
|
|
||||||
REG_WIN0V = controls->window0VerticalDimensions;
|
REG_BG3PA = bgTfSettings->dx;
|
||||||
REG_WIN1V = controls->window1VerticalDimensions;
|
REG_BG3PB = bgTfSettings->dmx;
|
||||||
REG_WININ = controls->windowInsideControl;
|
REG_BG3PC = bgTfSettings->dy;
|
||||||
REG_WINOUT = controls->windowOutsideControl;
|
REG_BG3PD = bgTfSettings->dmy;
|
||||||
REG_MOSAIC = controls->mosaicSize;
|
REG_BG3X_L = bgTfSettings->xPointLeastSig;
|
||||||
REG_BLDCNT = controls->layerFXControl;
|
REG_BG3X_H = bgTfSettings->xPointMostSig;
|
||||||
REG_BLDALPHA = controls->alphaBlend;
|
REG_BG3Y_L = bgTfSettings->yPointLeastSig;
|
||||||
REG_BLDY = controls->layerBrightness;
|
REG_BG3Y_H = bgTfSettings->yPointMostSig;
|
||||||
|
|
||||||
|
tmp2 = &controls->window0HorizontalDimensions;
|
||||||
|
REG_WIN0H = tmp2[0];
|
||||||
|
// REG_WIN0H = *tmp2;
|
||||||
|
REG_WIN1H = tmp2[1];
|
||||||
|
REG_WIN0V = tmp2[2];
|
||||||
|
REG_WIN1V = tmp2[3];
|
||||||
|
REG_WININ = tmp2[4];
|
||||||
|
REG_WINOUT = tmp2[5];
|
||||||
|
REG_MOSAIC = tmp2[6];
|
||||||
|
REG_BLDCNT = tmp2[7];
|
||||||
|
REG_BLDALPHA = tmp2[8];
|
||||||
|
REG_BLDY = tmp2[9];
|
||||||
}
|
}
|
||||||
END_NONMATCH
|
|
||||||
|
|
||||||
// Load any resources that were requested with LoadResourceAsync
|
// Load any resources that were requested with LoadResourceAsync
|
||||||
void LoadResources(void) {
|
void LoadResources(void) {
|
||||||
|
|
Loading…
Reference in New Issue