Skip to content

Commit

Permalink
Update to mGBA 0.11-8472-2ea11feda.
Browse files Browse the repository at this point in the history
Resynchronize with Game Boy Interface.
  • Loading branch information
Extrems committed Jun 18, 2024
1 parent 72d9810 commit 3f18f32
Show file tree
Hide file tree
Showing 38 changed files with 783 additions and 426 deletions.
4 changes: 1 addition & 3 deletions emgba.cli.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
--cursor=point-srgb.tpl.gz
--overlay=frame-srgb.tpl.gz
--dither=none
--matrix=identity
--input-gamma=1.
--output-gamma=1.
--profile=srgb
--contrast=.78125
--
4 changes: 2 additions & 2 deletions emgba.dcp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name={--aspect, TV Aspect Ratio}
Values={3:2, 3:2}, {4:3, 4:3}, {5:4, 5:4}, {16:9, 16:9}, {16:10, 16:10}
Values={4:3, 4:3}, {5:4, 5:4}, {16:9, 16:9}, {16:10, 16:10}, {3:2, 3:2}

Name={--format, Video Format}
Values={ntsc, NTSC}, {pal, PAL}, {pal-m, PAL-M}, {ntsc-50, NTSC-50}, {pal-60, PAL-60}, {custom, Custom}, {custom-m, Custom-M}, {hd60, HD60}
Expand All @@ -20,7 +20,7 @@ Name={--filter, Filter}
Values={none, Sharp}, {blend, Soft}, {deflicker, Normal}, {scale2xex, Scale2�Ex}, {scale2xplus, Scale2�Plus}, {scale2x, Scale2�}, {eagle2x, Eagle2�}, {scan2x, Scan2�}

Name={--matrix, Color Matrix}
Values={identity, Identity}, {gba, GBA}, {gbi, GBI}, {nds, NDS}, {palm, Palm}, {psp, PSP}, {vba, VBA}
Values={identity, Identity}, {gba, GBA}, {gbasp, GBASP}, {gbi, GBI}, {nds, NDS}, {palm, Palm}, {psp, PSP}, {vba, VBA}

Name={--input-gamma, Decoding Gamma}
Values={1.0, 1.0}, {1.2, 1.2}, {1.4, 1.4}, {1.6, 1.6}, {1.8, 1.8}, {2.0, 2.0}, {2.2, 2.2}, {2.4, 2.4}
Expand Down
2 changes: 1 addition & 1 deletion mgba
Submodule mgba updated 1377 files
6 changes: 3 additions & 3 deletions source/3ds.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -17,7 +17,7 @@ static syswd_t alarm = SYS_WD_NULL;

ctr_state_t ctr = {
.sv.sd = INVALID_SOCKET,
.sv.nb = 1,
.sv.nonblock = 1,
.sv.sin.sin_family = AF_INET,
.sv.sin.sin_port = 15708,
.sv.sin.sin_addr.s_addr = INADDR_ANY,
Expand Down Expand Up @@ -91,7 +91,7 @@ bool CTRInit(void)

if (ctr.sv.sd == INVALID_SOCKET)
goto fail;
if (net_ioctl(ctr.sv.sd, FIONBIO, &ctr.sv.nb) < 0)
if (net_ioctl(ctr.sv.sd, FIONBIO, &ctr.sv.nonblock) < 0)
goto fail;
if (net_bind(ctr.sv.sd, (struct sockaddr *)&ctr.sv.sin, ctr.sv.sinlen) < 0)
goto fail;
Expand Down
4 changes: 2 additions & 2 deletions source/3ds.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -40,7 +40,7 @@
typedef struct {
struct {
int sd;
int nb;
int nonblock;
struct sockaddr_in sin;
socklen_t sinlen;
} sv;
Expand Down
4 changes: 2 additions & 2 deletions source/clock.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -13,7 +13,7 @@ void ClockTick(timing_t *clock, uint32_t step)
{
uint64_t diff, curr;

curr = gettime();
curr = __SYS_GetSystemTime();
diff = diff_ticks(clock->start, curr);

if (clock->reset) {
Expand Down
2 changes: 1 addition & 1 deletion source/clock.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
2 changes: 1 addition & 1 deletion source/gba.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
2 changes: 1 addition & 1 deletion source/gba.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
338 changes: 166 additions & 172 deletions source/gba_mb.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion source/gba_memory.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
2 changes: 1 addition & 1 deletion source/gba_video.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
2 changes: 1 addition & 1 deletion source/gbp_sram.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
38 changes: 31 additions & 7 deletions source/gx.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -120,12 +120,38 @@ void *GXAllocBuffer(uint32_t size)
return ptr;
}

static double trc_linear(int ch, double f) {
return f;
}

static double trc_gamma(int ch, double f) {
double V = fabs(f);
double L = pow(V, state.input_gamma[ch]);
return copysign(L, f);
}

static double trc_piecewise(int ch, double f) {
double V = fabs(f);
double L;

if (state.input_gamma[ch] <= 1. + state.input_alpha[ch]) {
L = pow(V, state.input_gamma[ch]);
} else {
double kappa = state.input_alpha[ch] / (state.input_gamma[ch] - 1.);
double phi = pow((1. + state.input_alpha[ch]) / state.input_gamma[ch], state.input_gamma[ch])
* pow((state.input_gamma[ch] - 1.) / state.input_alpha[ch], state.input_gamma[ch] - 1.);
L = V <= kappa ? V / phi : pow((V + state.input_alpha[ch]) / (1. + state.input_alpha[ch]), state.input_gamma[ch]);
}

return copysign(L, f);
}

static double trc_iec61966(int ch, double f) {
double V = fabs(f);
double L = V <= .04045 ? V / 12.92 : pow((V + .055) / 1.055, 2.4);
return copysign(L, f);
}

static double trc_itu709(int ch, double f) {
double V = fabs(f);
double L = V <= .081 ? V / 4.5 : pow((V + .099) / 1.099, 1/.45);
Expand All @@ -138,15 +164,13 @@ static double trc_smpte240(int ch, double f) {
return copysign(L, f);
}

static double trc_linear(int ch, double f) {
return f;
}

static double (*trc_funcs[])(int, double) = {
trc_linear,
trc_gamma,
trc_piecewise,
trc_iec61966,
trc_itu709,
trc_smpte240,
trc_linear
trc_smpte240
};

static void fill_lut(int ch, double (*func)(int, double), hword_t *lut)
Expand Down
2 changes: 1 addition & 1 deletion source/gx.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
4 changes: 2 additions & 2 deletions source/gx_cursor.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -53,7 +53,7 @@ void GXCursorAllocState(void)
-screen.y, screen.y + screen.h,
-screen.x, screen.x + screen.w, 0., 1.);

TPL_OpenTPLFromFile(&tdf, GXOpenFile(state.cursor));
TPL_OpenTPLFromHandle(&tdf, GXOpenFile(state.cursor));
TPL_GetTexture(&tdf, 0, &texobj[0]);
TPL_GetTexture(&tdf, 1, &texobj[1]);
TPL_GetTexture(&tdf, 2, &texobj[2]);
Expand Down
2 changes: 1 addition & 1 deletion source/gx_font.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
6 changes: 3 additions & 3 deletions source/gx_overlay.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down Expand Up @@ -110,13 +110,13 @@ void GXOverlayReadMemEx(void *buffer, int size, int index)
void GXOverlayReadMem(void *buffer, int size, int index)
{
TPL_CloseTPLFile(&tdf);
TPL_OpenTPLFromFile(&tdf, GXOpenMem(buffer, size));
TPL_OpenTPLFromHandle(&tdf, GXOpenMem(buffer, size));
TPL_GetTexture(&tdf, MIN(index, tdf.ntextures - 1), &texobj);
}

void GXOverlayReadFile(const char *file, int index)
{
TPL_CloseTPLFile(&tdf);
TPL_OpenTPLFromFile(&tdf, GXOpenFile(file));
TPL_OpenTPLFromHandle(&tdf, GXOpenFile(file));
TPL_GetTexture(&tdf, MIN(index, tdf.ntextures - 1), &texobj);
}
2 changes: 1 addition & 1 deletion source/gx_packed.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
46 changes: 23 additions & 23 deletions source/gx_planar.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -11,19 +11,6 @@
#include "gx.h"
#include "state.h"

static float indtexmtx[][2][3] = {
{
{ +.5, +.0, +.0 },
{ +.0, +.5, +.0 }
}, {
{ +.0, +.0, +.0 },
{ +.0, +.5, +.0 }
}, {
{ +.5, +.0, +.0 },
{ +.0, +.0, +.0 }
}
};

static uint16_t indtexdata[][4 * 4] ATTRIBUTE_ALIGN(32) = {
{
0x7E7E, 0x817E, 0x7E7E, 0x817E,
Expand All @@ -43,6 +30,19 @@ static uint16_t indtexdata[][4 * 4] ATTRIBUTE_ALIGN(32) = {
}
};

static float indtexmtx[][2][3] = {
{
{ +.5, +.0, +.0 },
{ +.0, +.5, +.0 }
}, {
{ +.0, +.0, +.0 },
{ +.0, +.5, +.0 }
}, {
{ +.5, +.0, +.0 },
{ +.0, +.0, +.0 }
}
};

static GXTexObj indtexobj[3];

static void GXPlanarCopyChannel(GXTexObj texobj, rect_t dst_rect, rect_t src_rect, uint8_t channel)
Expand Down Expand Up @@ -348,12 +348,12 @@ void GXPlanarApplyScale2xEx(gx_surface_t *dst, gx_surface_t *src, gx_surface_t *
GX_SetTevKColorSel(GX_TEVSTAGE6, GX_TEV_KCSEL_K0);
GX_SetTevColorIn(GX_TEVSTAGE6, GX_CC_TEXC, GX_CC_ZERO, GX_CC_ZERO, GX_CC_KONST);
GX_SetTevColorOp(GX_TEVSTAGE6, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV);
GX_SetTevIndirect(GX_TEVSTAGE6, GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_STU, GX_ITM_1, GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
GX_SetTevIndWarp(GX_TEVSTAGE6, GX_INDTEXSTAGE0, GX_TRUE, GX_FALSE, GX_ITM_1);

GX_SetTevOrder(GX_TEVSTAGE7, GX_TEXCOORD0, GX_TEXMAP1, GX_COLORNULL);
GX_SetTevColorIn(GX_TEVSTAGE7, GX_CC_TEXC, GX_CC_ZERO, GX_CC_ZERO, GX_CC_CPREV);
GX_SetTevColorOp(GX_TEVSTAGE7, GX_TEV_SUB, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV);
GX_SetTevIndirect(GX_TEVSTAGE7, GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_STU, GX_ITM_2, GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
GX_SetTevIndWarp(GX_TEVSTAGE7, GX_INDTEXSTAGE0, GX_TRUE, GX_FALSE, GX_ITM_2);

GX_SetTevOrder(GX_TEVSTAGE8, GX_TEXCOORDNULL, GX_TEXMAP_NULL, GX_COLORNULL);
GX_SetTevKColorSel(GX_TEVSTAGE8, GX_TEV_KCSEL_K1);
Expand All @@ -374,14 +374,14 @@ void GXPlanarApplyScale2xEx(gx_surface_t *dst, gx_surface_t *src, gx_surface_t *
GX_SetTevColorOp(GX_TEVSTAGE10, GX_TEV_COMP_BGR24_GT, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GX_SetTevAlphaIn(GX_TEVSTAGE10, GX_CA_ZERO, GX_CA_ZERO, GX_CA_APREV, GX_CA_ZERO);
GX_SetTevAlphaOp(GX_TEVSTAGE10, GX_TEV_COMP_BGR24_GT, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GX_SetTevIndirect(GX_TEVSTAGE10, GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_STU, GX_ITM_1, GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
GX_SetTevIndWarp(GX_TEVSTAGE10, GX_INDTEXSTAGE0, GX_TRUE, GX_FALSE, GX_ITM_1);

GX_SetTevOrder(GX_TEVSTAGE11, GX_TEXCOORD0, GX_TEXMAP0, GX_COLORNULL);
GX_SetTevColorIn(GX_TEVSTAGE11, GX_CC_TEXC, GX_CC_ZERO, GX_CC_ZERO, GX_CC_CPREV);
GX_SetTevColorOp(GX_TEVSTAGE11, GX_TEV_ADD, GX_TB_ZERO, GX_CS_DIVIDE_2, GX_TRUE, GX_TEVPREV);
GX_SetTevAlphaIn(GX_TEVSTAGE11, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_APREV);
GX_SetTevAlphaOp(GX_TEVSTAGE11, GX_TEV_ADD, GX_TB_ZERO, GX_CS_DIVIDE_2, GX_TRUE, GX_TEVPREV);
GX_SetTevIndirect(GX_TEVSTAGE11, GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_STU, GX_ITM_2, GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
GX_SetTevIndWarp(GX_TEVSTAGE11, GX_INDTEXSTAGE0, GX_TRUE, GX_FALSE, GX_ITM_2);

GX_ClearVtxDesc();
GX_SetVtxDesc(GX_VA_POS, GX_DIRECT);
Expand Down Expand Up @@ -471,15 +471,15 @@ void GXPlanarApplyScale2x(gx_surface_t *dst, gx_surface_t *src, bool blend)
GX_SetTevColorOp(GX_TEVSTAGE4, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GX_SetTevAlphaIn(GX_TEVSTAGE4, GX_CA_APREV, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO);
GX_SetTevAlphaOp(GX_TEVSTAGE4, GX_TEV_SUB, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV);
GX_SetTevIndirect(GX_TEVSTAGE4, GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_STU, GX_ITM_1, GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
GX_SetTevIndWarp(GX_TEVSTAGE4, GX_INDTEXSTAGE0, GX_TRUE, GX_FALSE, GX_ITM_1);

GX_SetTevOrder(GX_TEVSTAGE5, GX_TEXCOORD0, GX_TEXMAP0, GX_COLORNULL);
GX_SetTevColorIn(GX_TEVSTAGE5, GX_CC_CPREV, GX_CC_TEXC, GX_CC_CPREV, GX_CC_ZERO);
GX_SetTevColorOp(GX_TEVSTAGE5, GX_TEV_COMP_BGR24_EQ, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GX_SetTevKAlphaSel(GX_TEVSTAGE5, GX_TEV_KASEL_1);
GX_SetTevAlphaIn(GX_TEVSTAGE5, GX_CA_ZERO, GX_CA_ZERO, GX_CA_KONST, GX_CA_APREV);
GX_SetTevAlphaOp(GX_TEVSTAGE5, GX_TEV_COMP_BGR24_EQ, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GX_SetTevIndirect(GX_TEVSTAGE5, GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_STU, GX_ITM_2, GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
GX_SetTevIndWarp(GX_TEVSTAGE5, GX_INDTEXSTAGE0, GX_TRUE, GX_FALSE, GX_ITM_2);

if (blend) {
GX_SetTevOrder(GX_TEVSTAGE6, GX_TEXCOORD0, GX_TEXMAP0, GX_COLORNULL);
Expand Down Expand Up @@ -548,22 +548,22 @@ void GXPlanarApplyEagle2x(gx_surface_t *dst, gx_surface_t *src)
GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLORNULL);
GX_SetTevColorIn(GX_TEVSTAGE0, GX_CC_TEXC, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO);
GX_SetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GX_SetTevIndirect(GX_TEVSTAGE0, GX_INDTEXSTAGE1, GX_ITF_8, GX_ITB_STU, GX_ITM_0, GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
GX_SetTevIndWarp(GX_TEVSTAGE0, GX_INDTEXSTAGE1, GX_TRUE, GX_FALSE, GX_ITM_0);

GX_SetTevOrder(GX_TEVSTAGE1, GX_TEXCOORD0, GX_TEXMAP0, GX_COLORNULL);
GX_SetTevColorIn(GX_TEVSTAGE1, GX_CC_CPREV, GX_CC_TEXC, GX_CC_CPREV, GX_CC_ZERO);
GX_SetTevColorOp(GX_TEVSTAGE1, GX_TEV_COMP_BGR24_EQ, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GX_SetTevKAlphaSel(GX_TEVSTAGE1, GX_TEV_KASEL_1);
GX_SetTevAlphaIn(GX_TEVSTAGE1, GX_CA_ZERO, GX_CA_ZERO, GX_CA_KONST, GX_CA_ZERO);
GX_SetTevAlphaOp(GX_TEVSTAGE1, GX_TEV_COMP_BGR24_EQ, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GX_SetTevIndirect(GX_TEVSTAGE1, GX_INDTEXSTAGE2, GX_ITF_8, GX_ITB_STU, GX_ITM_0, GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
GX_SetTevIndWarp(GX_TEVSTAGE1, GX_INDTEXSTAGE2, GX_TRUE, GX_FALSE, GX_ITM_0);

GX_SetTevOrder(GX_TEVSTAGE2, GX_TEXCOORD0, GX_TEXMAP0, GX_COLORNULL);
GX_SetTevColorIn(GX_TEVSTAGE2, GX_CC_CPREV, GX_CC_TEXC, GX_CC_CPREV, GX_CC_ZERO);
GX_SetTevColorOp(GX_TEVSTAGE2, GX_TEV_COMP_BGR24_EQ, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GX_SetTevAlphaIn(GX_TEVSTAGE2, GX_CA_ZERO, GX_CA_ZERO, GX_CA_APREV, GX_CA_ZERO);
GX_SetTevAlphaOp(GX_TEVSTAGE2, GX_TEV_COMP_BGR24_EQ, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
GX_SetTevIndirect(GX_TEVSTAGE2, GX_INDTEXSTAGE0, GX_ITF_8, GX_ITB_STU, GX_ITM_0, GX_ITW_OFF, GX_ITW_OFF, GX_FALSE, GX_FALSE, GX_ITBA_OFF);
GX_SetTevIndWarp(GX_TEVSTAGE2, GX_INDTEXSTAGE0, GX_TRUE, GX_FALSE, GX_ITM_0);

GX_SetTevOrder(GX_TEVSTAGE3, GX_TEXCOORD0, GX_TEXMAP0, GX_COLORNULL);
GX_SetTevColorIn(GX_TEVSTAGE3, GX_CC_TEXC, GX_CC_CPREV, GX_CC_APREV, GX_CC_ZERO);
Expand Down
2 changes: 1 addition & 1 deletion source/gx_prescale.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2022, Extrems' Corner.org
* Copyright (c) 2015-2024, Extrems' Corner.org
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand Down
Loading

0 comments on commit 3f18f32

Please sign in to comment.