mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-09 19:52:28 +03:00
Merge branch 'starfield' into interpolation
This commit is contained in:
commit
e5ed74b978
3
.gitignore
vendored
3
.gitignore
vendored
@ -42,3 +42,6 @@ imgui.ini
|
|||||||
default.sav
|
default.sav
|
||||||
imgui.ini
|
imgui.ini
|
||||||
starship.cfg.json
|
starship.cfg.json
|
||||||
|
imgui.ini
|
||||||
|
starship.cfg.json
|
||||||
|
Starship.log
|
24
imgui.ini
24
imgui.ini
@ -1,24 +0,0 @@
|
|||||||
[Window][Main Game]
|
|
||||||
Pos=0,25
|
|
||||||
Size=1920,992
|
|
||||||
Collapsed=0
|
|
||||||
DockId=0xDAFE6DF6
|
|
||||||
|
|
||||||
[Window][Main - Deck]
|
|
||||||
Pos=0,0
|
|
||||||
Size=1920,1017
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Window][Debug##Default]
|
|
||||||
Pos=60,60
|
|
||||||
Size=400,400
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Window][Controller Reordering]
|
|
||||||
Pos=-40,-17
|
|
||||||
Size=32,41
|
|
||||||
Collapsed=0
|
|
||||||
|
|
||||||
[Docking][Data]
|
|
||||||
DockSpace ID=0xDAFE6DF6 Window=0x064B4959 Pos=0,48 Size=1920,992 CentralNode=1 NoTabBar=1 Selected=0x63C739B5
|
|
||||||
|
|
@ -209,6 +209,7 @@ void Effect_Update(Effect*);
|
|||||||
void TexturedLine_Update(TexturedLine*);
|
void TexturedLine_Update(TexturedLine*);
|
||||||
void TexturedLine_UpdateAll(void);
|
void TexturedLine_UpdateAll(void);
|
||||||
void Object_Update(void);
|
void Object_Update(void);
|
||||||
|
float FloatMod(float a, float b);
|
||||||
|
|
||||||
//fox_enmy2
|
//fox_enmy2
|
||||||
void Actor237_Update(Actor*);
|
void Actor237_Update(Actor*);
|
||||||
|
@ -66,12 +66,12 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* 0x00000 */ SPTask task;
|
/* 0x00000 */ SPTask task;
|
||||||
/* 0x00050 */ Vp viewports[0x10];
|
/* 0x00050 */ Vp viewports[0x10 * 4];
|
||||||
/* 0x00150 */ Mtx mtx[0x480];
|
/* 0x00150 */ Mtx mtx[0x480 * 4];
|
||||||
/* 0x12150 */ Gfx unkDL1[0x180];
|
/* 0x12150 */ Gfx unkDL1[0x180 * 4];
|
||||||
/* 0x12D50 */ Gfx masterDL[0x1380];
|
/* 0x12D50 */ Gfx masterDL[0x1380 * 4];
|
||||||
/* 0x1C950 */ Gfx unkDL2[0xD80];
|
/* 0x1C950 */ Gfx unkDL2[0xD80 * 4];
|
||||||
/* 0x23550 */ Lightsn lights[0x100];
|
/* 0x23550 */ Lightsn lights[0x100 * 4];
|
||||||
} GfxPool; // size = 0x2AD50, 0x8 aligned
|
} GfxPool; // size = 0x2AD50, 0x8 aligned
|
||||||
|
|
||||||
void Controller_Init(void);
|
void Controller_Init(void);
|
||||||
|
5831
logs/Starship.log
5831
logs/Starship.log
File diff suppressed because it is too large
Load Diff
@ -101,11 +101,59 @@ f32 sGroundPositions360z[4] = {
|
|||||||
-6000.0f,
|
-6000.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Declare global variables for screen dimensions
|
||||||
|
float gCurrentScreenWidth = 320.0f * 3; // Default width
|
||||||
|
float gCurrentScreenHeight = 240.0f * 3; // Default height
|
||||||
|
|
||||||
|
// Custom floating-point modulo function (replaces fmodf)
|
||||||
|
float FloatMod(float a, float b) {
|
||||||
|
float result = a - ((int) (a / b)) * b;
|
||||||
|
if (result < 0.0f) {
|
||||||
|
result += b;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define a single 1x1 star as two triangles
|
||||||
|
static Vtx starVerts[4] = {
|
||||||
|
// Format: VTX(x, y, z, s, t, r, g, b, a)
|
||||||
|
VTX(0, 0, 0, 0, 0, 255, 255, 255, 255), // Bottom-left
|
||||||
|
VTX(0, 1, 0, 0, 0, 255, 255, 255, 255), // Top-left
|
||||||
|
VTX(1, 0, 0, 0, 0, 255, 255, 255, 255), // Bottom-right
|
||||||
|
VTX(1, 1, 0, 0, 0, 255, 255, 255, 255), // Top-right
|
||||||
|
};
|
||||||
|
|
||||||
|
// Display list to render the two triangles forming the star quad
|
||||||
|
static Gfx starDL[] = {
|
||||||
|
gsSPVertex(starVerts, ARRAY_COUNT(starVerts), 0),
|
||||||
|
gsSP2Triangles(0, 1, 2, 0, 1, 2, 3, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
// Display list to render the two triangles forming the partial star quad
|
||||||
|
static Gfx starDLPartial[] = {
|
||||||
|
gsSPVertex(starVerts, ARRAY_COUNT(starVerts), 0),
|
||||||
|
gsSP2Triangles(0, 1, 2, 0, 1, 2, 3, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
// Setup render state for stars
|
||||||
|
static Gfx starSetupDL[] = {
|
||||||
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF), // Disable texturing
|
||||||
|
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_CULL_BACK |
|
||||||
|
G_SHADING_SMOOTH),
|
||||||
|
//gsDPPipeSync(),
|
||||||
|
gsDPSetCombineMode(G_CC_PRIMITIVE, G_CC_PRIMITIVE), // Use primitive color
|
||||||
|
gsDPSetOtherMode(G_AD_NOTPATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE |
|
||||||
|
G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
|
||||||
|
G_AC_NONE | G_ZS_PIXEL | G_RM_OPA_SURF | G_RM_OPA_SURF2),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
// @port: Starfield drawn with triangles, re-engineered by @Tharo & @TheBoy181
|
||||||
void Background_DrawStarfield(void) {
|
void Background_DrawStarfield(void) {
|
||||||
f32 by;
|
f32 by;
|
||||||
f32 bx;
|
f32 bx;
|
||||||
s16 vy;
|
|
||||||
s16 vx;
|
|
||||||
s32 i;
|
s32 i;
|
||||||
s32 starCount;
|
s32 starCount;
|
||||||
f32 zCos;
|
f32 zCos;
|
||||||
@ -115,24 +163,40 @@ void Background_DrawStarfield(void) {
|
|||||||
f32* xStar;
|
f32* xStar;
|
||||||
f32* yStar;
|
f32* yStar;
|
||||||
u32* color;
|
u32* color;
|
||||||
|
float currentScreenWidth;
|
||||||
|
float currentScreenHeight;
|
||||||
|
float starfieldWidth;
|
||||||
|
float starfieldHeight;
|
||||||
|
float vx;
|
||||||
|
float vy;
|
||||||
|
const float STAR_MARGIN = 10.0f; // Margin to hide seam stars
|
||||||
|
|
||||||
|
// Set projection to orthographic before drawing stars
|
||||||
|
Lib_InitOrtho(&gMasterDisp);
|
||||||
|
|
||||||
|
gSPDisplayList(gMasterDisp++, starSetupDL);
|
||||||
|
|
||||||
|
// Get current screen dimensions
|
||||||
|
currentScreenWidth = gCurrentScreenWidth;
|
||||||
|
currentScreenHeight = gCurrentScreenHeight;
|
||||||
|
starfieldWidth = 1.0f * currentScreenWidth;
|
||||||
|
starfieldHeight = 1.0f * currentScreenHeight;
|
||||||
|
|
||||||
gDPPipeSync(gMasterDisp++);
|
|
||||||
gDPSetCycleType(gMasterDisp++, G_CYC_FILL);
|
|
||||||
gDPSetCombineMode(gMasterDisp++, G_CC_SHADE, G_CC_SHADE);
|
|
||||||
gDPSetRenderMode(gMasterDisp++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
|
||||||
starCount = gStarCount;
|
starCount = gStarCount;
|
||||||
|
|
||||||
if (starCount != 0) {
|
if (starCount != 0) {
|
||||||
if (gStarfieldX >= 1.5f * SCREEN_WIDTH) {
|
// Wrapping logic for starfield positions
|
||||||
gStarfieldX -= 1.5f * SCREEN_WIDTH;
|
if (gStarfieldX >= starfieldWidth) {
|
||||||
|
gStarfieldX -= starfieldWidth;
|
||||||
}
|
}
|
||||||
if (gStarfieldY >= 1.5f * SCREEN_HEIGHT) {
|
if (gStarfieldY >= starfieldHeight) {
|
||||||
gStarfieldY -= 1.5f * SCREEN_HEIGHT;
|
gStarfieldY -= starfieldHeight;
|
||||||
}
|
}
|
||||||
if (gStarfieldX < 0.0f) {
|
if (gStarfieldX < 0.0f) {
|
||||||
gStarfieldX += 1.5f * SCREEN_WIDTH;
|
gStarfieldX += starfieldWidth;
|
||||||
}
|
}
|
||||||
if (gStarfieldY < 0.0f) {
|
if (gStarfieldY < 0.0f) {
|
||||||
gStarfieldY += 1.5f * SCREEN_HEIGHT;
|
gStarfieldY += starfieldHeight;
|
||||||
}
|
}
|
||||||
xField = gStarfieldX;
|
xField = gStarfieldX;
|
||||||
yField = gStarfieldY;
|
yField = gStarfieldY;
|
||||||
@ -144,35 +208,86 @@ void Background_DrawStarfield(void) {
|
|||||||
if (gGameState != GSTATE_PLAY) {
|
if (gGameState != GSTATE_PLAY) {
|
||||||
starCount = 1000;
|
starCount = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
starCount = starCount * 3; // Adjust multiplier as needed
|
||||||
|
|
||||||
zCos = __cosf(gStarfieldRoll);
|
zCos = __cosf(gStarfieldRoll);
|
||||||
zSin = __sinf(gStarfieldRoll);
|
zSin = __sinf(gStarfieldRoll);
|
||||||
|
|
||||||
for (i = 0; i < starCount; i++, yStar++, xStar++, color++) {
|
for (i = 0; i < starCount; i++, yStar++, xStar++, color++) {
|
||||||
|
// Adjust star positions with field offsets
|
||||||
bx = *xStar + xField;
|
bx = *xStar + xField;
|
||||||
by = *yStar + yField;
|
by = *yStar + yField;
|
||||||
if (bx >= 1.25f * SCREEN_WIDTH) {
|
|
||||||
bx -= 1.5f * SCREEN_WIDTH;
|
|
||||||
}
|
|
||||||
bx -= SCREEN_WIDTH / 2.0f;
|
|
||||||
|
|
||||||
if (by >= 1.25f * SCREEN_HEIGHT) {
|
// Wrapping logic for individual stars along X-axis
|
||||||
by -= 1.5f * SCREEN_HEIGHT;
|
if (bx >= starfieldWidth) {
|
||||||
|
bx -= starfieldWidth;
|
||||||
|
}
|
||||||
|
if (bx < 0.0f) {
|
||||||
|
bx += starfieldWidth;
|
||||||
}
|
}
|
||||||
by -= SCREEN_HEIGHT / 2.0f;
|
|
||||||
|
|
||||||
vx = (zCos * bx) + (zSin * by) + SCREEN_WIDTH / 2.0f;
|
// Wrapping logic for individual stars along Y-axis
|
||||||
vy = (-zSin * bx) + (zCos * by) + SCREEN_HEIGHT / 2.0f;
|
if (by >= starfieldHeight) {
|
||||||
if ((vx >= 0) && (vx < SCREEN_WIDTH) && (vy > 0) && (vy < SCREEN_HEIGHT)) {
|
by -= starfieldHeight;
|
||||||
gDPPipeSync(gMasterDisp++);
|
}
|
||||||
gDPSetFillColor(gMasterDisp++, *color);
|
if (by < 0.0f) {
|
||||||
gDPFillRectangle(gMasterDisp++, vx, vy, vx, vy);
|
by += starfieldHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Center the positions
|
||||||
|
bx -= starfieldWidth / 2.0f;
|
||||||
|
by -= starfieldHeight / 2.0f;
|
||||||
|
|
||||||
|
// Apply rotation
|
||||||
|
vx = (zCos * bx) + (zSin * by) + currentScreenWidth / 2.0f;
|
||||||
|
vy = (-zSin * bx) + (zCos * by) + currentScreenHeight / 2.0f;
|
||||||
|
|
||||||
|
// Check if the star is within the visible screen area with margin
|
||||||
|
if ((vx >= STAR_MARGIN) && (vx < currentScreenWidth - STAR_MARGIN) && (vy >= STAR_MARGIN) &&
|
||||||
|
(vy < currentScreenHeight - STAR_MARGIN)) {
|
||||||
|
// @recomp Tag the transform.
|
||||||
|
// gEXMatrixGroupDecomposed(gMasterDisp++, TAG_STARFIELD + i, G_EX_PUSH, G_MTX_MODELVIEW,
|
||||||
|
// G_EX_COMPONENT_AUTO, G_EX_COMPONENT_AUTO, G_EX_COMPONENT_AUTO,
|
||||||
|
// G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP,
|
||||||
|
// G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_AUTO, G_EX_EDIT_ALLOW);
|
||||||
|
|
||||||
|
// Translate to (vx, vy) in ortho coordinates
|
||||||
|
Matrix_Push(&gGfxMatrix);
|
||||||
|
Matrix_Translate(gGfxMatrix, vx - (currentScreenWidth / 2.0f), -(vy - (currentScreenHeight / 2.0f)),
|
||||||
|
0.0f, MTXF_NEW);
|
||||||
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
|
Matrix_Pop(&gGfxMatrix);
|
||||||
|
|
||||||
|
// Convert color from fill color (assuming RGB5A1) to RGBA8
|
||||||
|
u8 r = ((*color >> 11) & 0x1F);
|
||||||
|
r = (r << 3) | (r >> 2); // Convert 5-bit to 8-bit
|
||||||
|
u8 g = ((*color >> 6) & 0x1F);
|
||||||
|
g = (g << 3) | (g >> 2); // Convert 5-bit to 8-bit
|
||||||
|
u8 b = ((*color >> 1) & 0x1F);
|
||||||
|
b = (b << 3) | (b >> 2); // Convert 5-bit to 8-bit
|
||||||
|
u8 a = 255; // Fully opaque
|
||||||
|
|
||||||
|
gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, a);
|
||||||
|
|
||||||
|
// Draw the star using the predefined display list
|
||||||
|
gSPDisplayList(gMasterDisp++, starDL);
|
||||||
|
|
||||||
|
// Pop the transform id
|
||||||
|
// gEXPopMatrixGroup(gMasterDisp++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Restore original perspective after drawing stars
|
||||||
|
Lib_InitPerspective(&gMasterDisp);
|
||||||
|
|
||||||
|
// Finalize rendering state
|
||||||
gDPPipeSync(gMasterDisp++);
|
gDPPipeSync(gMasterDisp++);
|
||||||
gDPSetColorDither(gMasterDisp++, G_CD_MAGICSQ);
|
gDPSetColorDither(gMasterDisp++, G_CD_MAGICSQ);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Background_DrawPartialStarfield(s32 yMin, s32 yMax) {
|
void Background_DrawPartialStarfield(s32 yMin, s32 yMax) { // Stars that are in the Epilogue
|
||||||
f32 by;
|
f32 by;
|
||||||
f32 bx;
|
f32 bx;
|
||||||
s16 vy;
|
s16 vy;
|
||||||
@ -186,22 +301,30 @@ void Background_DrawPartialStarfield(s32 yMin, s32 yMax) {
|
|||||||
f32* sp60;
|
f32* sp60;
|
||||||
f32* sp5C;
|
f32* sp5C;
|
||||||
u32* sp58;
|
u32* sp58;
|
||||||
|
|
||||||
|
// Get current screen dimensions
|
||||||
|
float currentScreenWidth = gCurrentScreenWidth;
|
||||||
|
float currentScreenHeight = gCurrentScreenHeight;
|
||||||
|
float starfieldWidth = 1.0f * currentScreenWidth;
|
||||||
|
float starfieldHeight = 1.0f * currentScreenHeight;
|
||||||
|
|
||||||
|
// Graphics pipeline setup
|
||||||
gDPPipeSync(gMasterDisp++);
|
gDPPipeSync(gMasterDisp++);
|
||||||
gDPSetCycleType(gMasterDisp++, G_CYC_FILL);
|
gDPSetCycleType(gMasterDisp++, G_CYC_FILL);
|
||||||
gDPSetCombineMode(gMasterDisp++, G_CC_SHADE, G_CC_SHADE);
|
gDPSetCombineMode(gMasterDisp++, G_CC_SHADE, G_CC_SHADE);
|
||||||
gDPSetRenderMode(gMasterDisp++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
gDPSetRenderMode(gMasterDisp++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||||
|
|
||||||
if (gStarfieldX >= 1.5f * SCREEN_WIDTH) {
|
if (gStarfieldX >= 1.5f * currentScreenWidth) {
|
||||||
gStarfieldX -= 1.5f * SCREEN_WIDTH;
|
gStarfieldX -= 1.5f * currentScreenWidth;
|
||||||
}
|
}
|
||||||
if (gStarfieldY >= 1.5f * SCREEN_HEIGHT) {
|
if (gStarfieldY >= 1.5f * currentScreenHeight) {
|
||||||
gStarfieldY -= 1.5f * SCREEN_HEIGHT;
|
gStarfieldY -= 1.5f * currentScreenHeight;
|
||||||
}
|
}
|
||||||
if (gStarfieldX < 0.0f) {
|
if (gStarfieldX < 0.0f) {
|
||||||
gStarfieldX += 1.5f * SCREEN_WIDTH;
|
gStarfieldX += 1.5f * currentScreenWidth;
|
||||||
}
|
}
|
||||||
if (gStarfieldY < 0.0f) {
|
if (gStarfieldY < 0.0f) {
|
||||||
gStarfieldY += 1.5f * SCREEN_HEIGHT;
|
gStarfieldY += 1.5f * currentScreenHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
spf68 = gStarfieldX;
|
spf68 = gStarfieldX;
|
||||||
@ -217,21 +340,50 @@ void Background_DrawPartialStarfield(s32 yMin, s32 yMax) {
|
|||||||
for (i = 0; i < var_s2; i++, sp5C++, sp60++, sp58++) {
|
for (i = 0; i < var_s2; i++, sp5C++, sp60++, sp58++) {
|
||||||
bx = *sp60 + spf68;
|
bx = *sp60 + spf68;
|
||||||
by = *sp5C + spf64;
|
by = *sp5C + spf64;
|
||||||
if (bx >= SCREEN_WIDTH * 1.25f) {
|
if (bx >= starfieldWidth * 1.25f) {
|
||||||
bx -= 1.5f * SCREEN_WIDTH;
|
bx -= 1.5f * starfieldWidth;
|
||||||
}
|
}
|
||||||
bx -= SCREEN_WIDTH / 2.0f;
|
bx -= starfieldWidth / 2.0f;
|
||||||
if (by >= SCREEN_HEIGHT * 1.25f) {
|
if (by >= starfieldHeight * 1.25f) {
|
||||||
by -= 1.5f * SCREEN_HEIGHT;
|
by -= 1.5f * starfieldHeight;
|
||||||
}
|
}
|
||||||
by -= SCREEN_HEIGHT / 2.0f;
|
by -= starfieldHeight / 2.0f;
|
||||||
|
|
||||||
vx = (cos * bx) + (sin * by) + SCREEN_WIDTH / 2.0f;
|
// Apply rotation
|
||||||
vy = (-sin * bx) + (cos * by) + SCREEN_HEIGHT / 2.0f;
|
vx = (cos * bx) + (sin * by) + currentScreenWidth / 2.0f;
|
||||||
if ((vx >= 0) && (vx < SCREEN_WIDTH) && (yMin < vy) && (vy < yMax)) {
|
vy = (-sin * bx) + (cos * by) + currentScreenHeight / 2.0f;
|
||||||
gDPPipeSync(gMasterDisp++);
|
|
||||||
gDPSetFillColor(gMasterDisp++, *sp58);
|
// Check if the star is within the visible screen area
|
||||||
gDPFillRectangle(gMasterDisp++, vx, vy, vx, vy);
|
if ((vx >= 0) && (vx < currentScreenWidth) && (yMin < vy) && (vy < yMax)) {
|
||||||
|
// Tag the transform. Assuming TAG_STARFIELD is a defined base tag value
|
||||||
|
// @recomp Tag the transform.
|
||||||
|
// gEXMatrixGroupDecomposed(gMasterDisp++, TAG_STARFIELD + i, G_EX_PUSH, G_MTX_MODELVIEW, G_EX_COMPONENT_AUTO,
|
||||||
|
// G_EX_COMPONENT_AUTO, G_EX_COMPONENT_AUTO, G_EX_COMPONENT_INTERPOLATE,
|
||||||
|
// G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE,
|
||||||
|
// G_EX_ORDER_AUTO, G_EX_EDIT_ALLOW);
|
||||||
|
// Translate to (vx, vy) in ortho coordinates
|
||||||
|
Matrix_Push(&gGfxMatrix);
|
||||||
|
Matrix_Translate(gGfxMatrix, vx - (currentScreenWidth / 2.0f), -(vy - (currentScreenHeight / 2.0f)), 0.0f,
|
||||||
|
MTXF_NEW);
|
||||||
|
Matrix_SetGfxMtx(&gMasterDisp);
|
||||||
|
Matrix_Pop(&gGfxMatrix);
|
||||||
|
|
||||||
|
// Convert color from fill color (assuming RGB5A1) to RGBA8
|
||||||
|
u8 r = ((*sp58 >> 11) & 0x1F);
|
||||||
|
r = (r << 3) | (r >> 2); // Convert 5-bit to 8-bit
|
||||||
|
u8 g = ((*sp58 >> 6) & 0x1F);
|
||||||
|
g = (g << 3) | (g >> 2); // Convert 5-bit to 8-bit
|
||||||
|
u8 b = ((*sp58 >> 1) & 0x1F);
|
||||||
|
b = (b << 3) | (b >> 2); // Convert 5-bit to 8-bit
|
||||||
|
u8 a = 255; // Fully opaque
|
||||||
|
|
||||||
|
gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, a);
|
||||||
|
|
||||||
|
// Draw the star using the predefined display list
|
||||||
|
gSPDisplayList(gMasterDisp++, starDLPartial);
|
||||||
|
|
||||||
|
// Pop the transform id
|
||||||
|
// gEXPopMatrixGroup(gMasterDisp++, G_MTX_MODELVIEW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterDisp++);
|
gDPPipeSync(gMasterDisp++);
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#include "assets/ast_area_6.h"
|
#include "assets/ast_area_6.h"
|
||||||
#include "assets/ast_zoness.h"
|
#include "assets/ast_zoness.h"
|
||||||
|
|
||||||
|
extern float gCurrentScreenWidth;
|
||||||
|
extern float gCurrentScreenHeight;
|
||||||
|
|
||||||
UNK_TYPE D_800D2F50 = 0; // unused
|
UNK_TYPE D_800D2F50 = 0; // unused
|
||||||
s32 sOverheadCam = 0;
|
s32 sOverheadCam = 0;
|
||||||
f32 sOverheadCamDist = 0.0f;
|
f32 sOverheadCamDist = 0.0f;
|
||||||
@ -559,7 +562,7 @@ void Play_InitEnvironment(void) {
|
|||||||
D_ctx_80178544 = 40;
|
D_ctx_80178544 = 40;
|
||||||
gFovY = 45.0f;
|
gFovY = 45.0f;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
void Play_GenerateStarfield(void) {
|
void Play_GenerateStarfield(void) {
|
||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
@ -574,34 +577,92 @@ void Play_GenerateStarfield(void) {
|
|||||||
gStarFillColors[i] = FILL_COLOR(gStarColors[i % ARRAY_COUNT(gStarColors)]);
|
gStarFillColors[i] = FILL_COLOR(gStarColors[i % ARRAY_COUNT(gStarColors)]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
void Play_GenerateStarfield(void) {
|
||||||
|
u32 i;
|
||||||
|
float currentScreenWidth = gCurrentScreenWidth;
|
||||||
|
float currentScreenHeight = gCurrentScreenHeight;
|
||||||
|
float starfieldWidth = 1.0f * currentScreenWidth;
|
||||||
|
float starfieldHeight = 1.0f * currentScreenHeight;
|
||||||
|
|
||||||
|
MEM_ARRAY_ALLOCATE(gStarOffsetsX, 3000);
|
||||||
|
MEM_ARRAY_ALLOCATE(gStarOffsetsY, 3000);
|
||||||
|
MEM_ARRAY_ALLOCATE(gStarFillColors, 3000);
|
||||||
|
|
||||||
|
Rand_SetSeed(1, 29000, 9876);
|
||||||
|
|
||||||
|
for (i = 0; i < 3000; i++) {
|
||||||
|
gStarOffsetsX[i] = RAND_FLOAT_SEEDED(starfieldWidth);
|
||||||
|
gStarOffsetsY[i] = RAND_FLOAT_SEEDED(starfieldHeight);
|
||||||
|
gStarFillColors[i] = FILL_COLOR(gStarColors[i % ARRAY_COUNT(gStarColors)]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Play_SetupStarfield(void) {
|
void Play_SetupStarfield(void) {
|
||||||
|
// Get current screen dimensions
|
||||||
|
float currentScreenWidth = gCurrentScreenWidth;
|
||||||
|
float currentScreenHeight = gCurrentScreenHeight;
|
||||||
|
float baseAspectRatio = 4.0f / 3.0f; // Original aspect ratio
|
||||||
|
float baseScreenWidth = gCurrentScreenHeight * baseAspectRatio;
|
||||||
|
float baseArea = baseScreenWidth * gCurrentScreenHeight;
|
||||||
|
float currentArea = currentScreenWidth * currentScreenHeight;
|
||||||
|
float areaRatio = currentArea / baseArea;
|
||||||
|
|
||||||
Play_GenerateStarfield();
|
Play_GenerateStarfield();
|
||||||
gGroundHeight = -25000.0f;
|
gGroundHeight = -25000.0f;
|
||||||
gStarCount = 600;
|
|
||||||
|
// Base star count adjusted for screen area
|
||||||
|
gStarCount = (s32) (600 * areaRatio);
|
||||||
|
if (gStarCount > 1000) {
|
||||||
|
gStarCount = 1000; // Cap the star count to 1000
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adjust star count based on the current level
|
||||||
if (gCurrentLevel == LEVEL_AREA_6) {
|
if (gCurrentLevel == LEVEL_AREA_6) {
|
||||||
gStarCount = 300;
|
gStarCount = (s32) (300 * areaRatio);
|
||||||
|
if (gStarCount > 1000) {
|
||||||
|
gStarCount = 1000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (gCurrentLevel == LEVEL_UNK_15) {
|
if (gCurrentLevel == LEVEL_UNK_15) {
|
||||||
gStarCount = 400;
|
gStarCount = (s32) (400 * areaRatio);
|
||||||
|
if (gStarCount > 1000) {
|
||||||
|
gStarCount = 1000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (gGameState != GSTATE_PLAY) {
|
if (gGameState != GSTATE_PLAY) {
|
||||||
gStarCount = 800;
|
gStarCount = (s32) (800 * areaRatio);
|
||||||
|
if (gStarCount > 1000) {
|
||||||
|
gStarCount = 1000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (gCurrentLevel == LEVEL_FORTUNA) {
|
if (gCurrentLevel == LEVEL_FORTUNA) {
|
||||||
gStarCount = 500;
|
gStarCount = (s32) (500 * areaRatio);
|
||||||
|
if (gStarCount > 1000) {
|
||||||
|
gStarCount = 1000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (gVersusMode) {
|
if (gVersusMode) {
|
||||||
gStarCount = 0;
|
gStarCount = 0; // No stars in versus mode
|
||||||
}
|
}
|
||||||
if (gCurrentLevel == LEVEL_BOLSE) {
|
if (gCurrentLevel == LEVEL_BOLSE) {
|
||||||
gStarCount = 300;
|
gStarCount = (s32) (300 * areaRatio);
|
||||||
|
if (gStarCount > 1000) {
|
||||||
|
gStarCount = 1000;
|
||||||
|
}
|
||||||
gGroundHeight = -0.0f;
|
gGroundHeight = -0.0f;
|
||||||
}
|
}
|
||||||
if (gCurrentLevel == LEVEL_TRAINING) {
|
if (gCurrentLevel == LEVEL_TRAINING) {
|
||||||
gStarCount = 800;
|
gStarCount = (s32) (800 * areaRatio);
|
||||||
|
if (gStarCount > 1000) {
|
||||||
|
gStarCount = 1000;
|
||||||
|
}
|
||||||
gGroundHeight = -0.0f;
|
gGroundHeight = -0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize starfield position with dynamic screen dimensions
|
||||||
|
gStarfieldX = currentScreenWidth;
|
||||||
|
gStarfieldY = currentScreenHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player_PlaySfx(f32* sfxSrc, u32 sfxId, s32 mode) {
|
void Player_PlaySfx(f32* sfxSrc, u32 sfxId, s32 mode) {
|
||||||
@ -6370,27 +6431,39 @@ void Camera_SetStarfieldPos(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32
|
|||||||
f32 tempf;
|
f32 tempf;
|
||||||
f32 sp20;
|
f32 sp20;
|
||||||
|
|
||||||
|
// Get current screen dimensions
|
||||||
|
float currentScreenWidth = gCurrentScreenWidth;
|
||||||
|
float currentScreenHeight = gCurrentScreenHeight;
|
||||||
|
float starfieldWidth = 1.0f * currentScreenWidth;
|
||||||
|
float starfieldHeight = 1.0f * currentScreenHeight;
|
||||||
|
|
||||||
yaw = -Math_Atan2F(xEye - xAt, zEye - zAt);
|
yaw = -Math_Atan2F(xEye - xAt, zEye - zAt);
|
||||||
tempf = sqrtf(SQ(zEye - zAt) + SQ(xEye - xAt));
|
tempf = sqrtf(SQ(zEye - zAt) + SQ(xEye - xAt));
|
||||||
pitch = -Math_Atan2F(yEye - yAt, tempf);
|
pitch = -Math_Atan2F(yEye - yAt, tempf);
|
||||||
|
|
||||||
|
// Adjust yaw to stay within the range [-π/2, π/2]
|
||||||
if (yaw >= M_PI / 2) {
|
if (yaw >= M_PI / 2) {
|
||||||
yaw -= M_PI;
|
yaw -= M_PI;
|
||||||
}
|
}
|
||||||
if (yaw <= -M_PI / 2) {
|
if (yaw <= -M_PI / 2) {
|
||||||
yaw += M_PI;
|
yaw += M_PI;
|
||||||
}
|
}
|
||||||
|
|
||||||
tempf = 0.0f;
|
tempf = 0.0f;
|
||||||
if (gCurrentLevel == LEVEL_UNK_15) {
|
if (gCurrentLevel == LEVEL_UNK_15) {
|
||||||
tempf = gPlayer[0].cam.eye.y * 0.03f;
|
tempf = gPlayer[0].cam.eye.y * 0.03f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calculate new starfield positions
|
||||||
sp30 = (-pitch * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + gStarfieldScrollY + tempf;
|
sp30 = (-pitch * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + gStarfieldScrollY + tempf;
|
||||||
sp34 = (yaw * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + gStarfieldScrollX;
|
sp34 = (yaw * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + gStarfieldScrollX;
|
||||||
sp20 = gStarfieldX;
|
sp20 = gStarfieldX;
|
||||||
|
|
||||||
gStarfieldX = Math_ModF(sp34, SCREEN_WIDTH * 1.5f);
|
// Wrap the starfield positions within the starfield dimensions
|
||||||
gStarfieldY = Math_ModF(sp30, SCREEN_HEIGHT * 1.5f);
|
gStarfieldX = FloatMod(sp34, starfieldWidth);
|
||||||
|
gStarfieldY = FloatMod(sp30, starfieldHeight);
|
||||||
|
|
||||||
|
// Special case handling for specific game state and level
|
||||||
if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
|
if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) &&
|
||||||
(gCurrentLevel == LEVEL_METEO)) {
|
(gCurrentLevel == LEVEL_METEO)) {
|
||||||
if (fabsf(gStarfieldX - sp20) < 50.0f) {
|
if (fabsf(gStarfieldX - sp20) < 50.0f) {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
|
|
||||||
s32 sMemoryBuffer[0x8800];
|
// s32 sMemoryBuffer[0x8800];
|
||||||
|
// @ port: Increase memory buffer size.
|
||||||
|
s32 sMemoryBuffer[1000000];
|
||||||
s32* sMemoryPtr;
|
s32* sMemoryPtr;
|
||||||
|
|
||||||
void Memory_FreeAll(void) {
|
void Memory_FreeAll(void) {
|
||||||
|
@ -1,282 +0,0 @@
|
|||||||
{
|
|
||||||
"CVars": {
|
|
||||||
"gControllers": {
|
|
||||||
"AxisDirectionMappings": {
|
|
||||||
"P0-S0-D0-KB30": {
|
|
||||||
"AxisDirectionMappingClass": "KeyboardKeyToAxisDirectionMapping",
|
|
||||||
"Direction": 0,
|
|
||||||
"KeyboardScancode": 30,
|
|
||||||
"Stick": 0
|
|
||||||
},
|
|
||||||
"P0-S0-D0-LUSI0-SDLA0-ADN": {
|
|
||||||
"AxisDirection": -1,
|
|
||||||
"AxisDirectionMappingClass": "SDLAxisDirectionToAxisDirectionMapping",
|
|
||||||
"Direction": 0,
|
|
||||||
"SDLControllerAxis": 0,
|
|
||||||
"ShipDeviceIndex": 0,
|
|
||||||
"Stick": 0
|
|
||||||
},
|
|
||||||
"P0-S0-D1-KB32": {
|
|
||||||
"AxisDirectionMappingClass": "KeyboardKeyToAxisDirectionMapping",
|
|
||||||
"Direction": 1,
|
|
||||||
"KeyboardScancode": 32,
|
|
||||||
"Stick": 0
|
|
||||||
},
|
|
||||||
"P0-S0-D1-LUSI0-SDLA0-ADP": {
|
|
||||||
"AxisDirection": 1,
|
|
||||||
"AxisDirectionMappingClass": "SDLAxisDirectionToAxisDirectionMapping",
|
|
||||||
"Direction": 1,
|
|
||||||
"SDLControllerAxis": 0,
|
|
||||||
"ShipDeviceIndex": 0,
|
|
||||||
"Stick": 0
|
|
||||||
},
|
|
||||||
"P0-S0-D2-KB17": {
|
|
||||||
"AxisDirectionMappingClass": "KeyboardKeyToAxisDirectionMapping",
|
|
||||||
"Direction": 2,
|
|
||||||
"KeyboardScancode": 17,
|
|
||||||
"Stick": 0
|
|
||||||
},
|
|
||||||
"P0-S0-D2-LUSI0-SDLA1-ADN": {
|
|
||||||
"AxisDirection": -1,
|
|
||||||
"AxisDirectionMappingClass": "SDLAxisDirectionToAxisDirectionMapping",
|
|
||||||
"Direction": 2,
|
|
||||||
"SDLControllerAxis": 1,
|
|
||||||
"ShipDeviceIndex": 0,
|
|
||||||
"Stick": 0
|
|
||||||
},
|
|
||||||
"P0-S0-D3-KB31": {
|
|
||||||
"AxisDirectionMappingClass": "KeyboardKeyToAxisDirectionMapping",
|
|
||||||
"Direction": 3,
|
|
||||||
"KeyboardScancode": 31,
|
|
||||||
"Stick": 0
|
|
||||||
},
|
|
||||||
"P0-S0-D3-LUSI0-SDLA1-ADP": {
|
|
||||||
"AxisDirection": 1,
|
|
||||||
"AxisDirectionMappingClass": "SDLAxisDirectionToAxisDirectionMapping",
|
|
||||||
"Direction": 3,
|
|
||||||
"SDLControllerAxis": 1,
|
|
||||||
"ShipDeviceIndex": 0,
|
|
||||||
"Stick": 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ButtonMappings": {
|
|
||||||
"P0-B1-KB333": {
|
|
||||||
"Bitmask": 1,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 333
|
|
||||||
},
|
|
||||||
"P0-B1-LUSI0-SDLA2-ADP": {
|
|
||||||
"AxisDirection": 1,
|
|
||||||
"Bitmask": 1,
|
|
||||||
"ButtonMappingClass": "SDLAxisDirectionToButtonMapping",
|
|
||||||
"SDLControllerAxis": 2,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B1024-KB34": {
|
|
||||||
"Bitmask": 1024,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 34
|
|
||||||
},
|
|
||||||
"P0-B1024-LUSI0-SDLB12": {
|
|
||||||
"Bitmask": 1024,
|
|
||||||
"ButtonMappingClass": "SDLButtonToButtonMapping",
|
|
||||||
"SDLControllerButton": 12,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B16-KB19": {
|
|
||||||
"Bitmask": 16,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 19
|
|
||||||
},
|
|
||||||
"P0-B16-LUSI0-SDLA5-ADP": {
|
|
||||||
"AxisDirection": 1,
|
|
||||||
"Bitmask": 16,
|
|
||||||
"ButtonMappingClass": "SDLAxisDirectionToButtonMapping",
|
|
||||||
"SDLControllerAxis": 5,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B16384-KB46": {
|
|
||||||
"Bitmask": 16384,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 46
|
|
||||||
},
|
|
||||||
"P0-B16384-LUSI0-SDLB1": {
|
|
||||||
"Bitmask": 16384,
|
|
||||||
"ButtonMappingClass": "SDLButtonToButtonMapping",
|
|
||||||
"SDLControllerButton": 1,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B2-KB331": {
|
|
||||||
"Bitmask": 2,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 331
|
|
||||||
},
|
|
||||||
"P0-B2-LUSI0-SDLA2-ADN": {
|
|
||||||
"AxisDirection": -1,
|
|
||||||
"Bitmask": 2,
|
|
||||||
"ButtonMappingClass": "SDLAxisDirectionToButtonMapping",
|
|
||||||
"SDLControllerAxis": 2,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B2048-KB20": {
|
|
||||||
"Bitmask": 2048,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 20
|
|
||||||
},
|
|
||||||
"P0-B2048-LUSI0-SDLB11": {
|
|
||||||
"Bitmask": 2048,
|
|
||||||
"ButtonMappingClass": "SDLButtonToButtonMapping",
|
|
||||||
"SDLControllerButton": 11,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B256-KB35": {
|
|
||||||
"Bitmask": 256,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 35
|
|
||||||
},
|
|
||||||
"P0-B256-LUSI0-SDLB14": {
|
|
||||||
"Bitmask": 256,
|
|
||||||
"ButtonMappingClass": "SDLButtonToButtonMapping",
|
|
||||||
"SDLControllerButton": 14,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B32-KB18": {
|
|
||||||
"Bitmask": 32,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 18
|
|
||||||
},
|
|
||||||
"P0-B32-LUSI0-SDLB9": {
|
|
||||||
"Bitmask": 32,
|
|
||||||
"ButtonMappingClass": "SDLButtonToButtonMapping",
|
|
||||||
"SDLControllerButton": 9,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B32768-KB45": {
|
|
||||||
"Bitmask": 32768,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 45
|
|
||||||
},
|
|
||||||
"P0-B32768-LUSI0-SDLB0": {
|
|
||||||
"Bitmask": 32768,
|
|
||||||
"ButtonMappingClass": "SDLButtonToButtonMapping",
|
|
||||||
"SDLControllerButton": 0,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B4-KB336": {
|
|
||||||
"Bitmask": 4,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 336
|
|
||||||
},
|
|
||||||
"P0-B4-LUSI0-SDLA3-ADP": {
|
|
||||||
"AxisDirection": 1,
|
|
||||||
"Bitmask": 4,
|
|
||||||
"ButtonMappingClass": "SDLAxisDirectionToButtonMapping",
|
|
||||||
"SDLControllerAxis": 3,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B4096-KB57": {
|
|
||||||
"Bitmask": 4096,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 57
|
|
||||||
},
|
|
||||||
"P0-B4096-LUSI0-SDLB6": {
|
|
||||||
"Bitmask": 4096,
|
|
||||||
"ButtonMappingClass": "SDLButtonToButtonMapping",
|
|
||||||
"SDLControllerButton": 6,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B512-KB33": {
|
|
||||||
"Bitmask": 512,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 33
|
|
||||||
},
|
|
||||||
"P0-B512-LUSI0-SDLB13": {
|
|
||||||
"Bitmask": 512,
|
|
||||||
"ButtonMappingClass": "SDLButtonToButtonMapping",
|
|
||||||
"SDLControllerButton": 13,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B8-KB328": {
|
|
||||||
"Bitmask": 8,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 328
|
|
||||||
},
|
|
||||||
"P0-B8-LUSI0-SDLA3-ADN": {
|
|
||||||
"AxisDirection": -1,
|
|
||||||
"Bitmask": 8,
|
|
||||||
"ButtonMappingClass": "SDLAxisDirectionToButtonMapping",
|
|
||||||
"SDLControllerAxis": 3,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
},
|
|
||||||
"P0-B8192-KB44": {
|
|
||||||
"Bitmask": 8192,
|
|
||||||
"ButtonMappingClass": "KeyboardKeyToButtonMapping",
|
|
||||||
"KeyboardScancode": 44
|
|
||||||
},
|
|
||||||
"P0-B8192-LUSI0-SDLA4-ADP": {
|
|
||||||
"AxisDirection": 1,
|
|
||||||
"Bitmask": 8192,
|
|
||||||
"ButtonMappingClass": "SDLAxisDirectionToButtonMapping",
|
|
||||||
"SDLControllerAxis": 4,
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"DeviceMappingIds": "Blue,",
|
|
||||||
"DeviceMappings": {
|
|
||||||
"Blue": {
|
|
||||||
"DeviceMappingClass": "ShipDeviceIndexToSDLDeviceIndexMapping",
|
|
||||||
"SDLControllerName": "PS4 Controller",
|
|
||||||
"SDLDeviceIndex": 0,
|
|
||||||
"SDLJoystickGUID": "03008fe54c050000cc09000000006800",
|
|
||||||
"ShipDeviceIndex": 0,
|
|
||||||
"StickAxisThresholdPercentage": 25,
|
|
||||||
"TriggerAxisThresholdPercentage": 25
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Port1": {
|
|
||||||
"Buttons": {
|
|
||||||
"AButtonMappingIds": "P0-B32768-KB45,P0-B32768-LUSI0-SDLB0,",
|
|
||||||
"BButtonMappingIds": "P0-B16384-KB46,P0-B16384-LUSI0-SDLB1,",
|
|
||||||
"CDownButtonMappingIds": "P0-B4-KB336,P0-B4-LUSI0-SDLA3-ADP,",
|
|
||||||
"CLeftButtonMappingIds": "P0-B2-LUSI0-SDLA2-ADN,P0-B2-KB331,",
|
|
||||||
"CRightButtonMappingIds": "P0-B1-KB333,P0-B1-LUSI0-SDLA2-ADP,",
|
|
||||||
"CUpButtonMappingIds": "P0-B8-KB328,P0-B8-LUSI0-SDLA3-ADN,",
|
|
||||||
"DDownButtonMappingIds": "P0-B1024-KB34,P0-B1024-LUSI0-SDLB12,",
|
|
||||||
"DLeftButtonMappingIds": "P0-B512-KB33,P0-B512-LUSI0-SDLB13,",
|
|
||||||
"DRightButtonMappingIds": "P0-B256-KB35,P0-B256-LUSI0-SDLB14,",
|
|
||||||
"DUpButtonMappingIds": "P0-B2048-KB20,P0-B2048-LUSI0-SDLB11,",
|
|
||||||
"LButtonMappingIds": "P0-B32-KB18,P0-B32-LUSI0-SDLB9,",
|
|
||||||
"RButtonMappingIds": "P0-B16-KB19,P0-B16-LUSI0-SDLA5-ADP,",
|
|
||||||
"StartButtonMappingIds": "P0-B4096-LUSI0-SDLB6,P0-B4096-KB57,",
|
|
||||||
"ZButtonMappingIds": "P0-B8192-KB44,P0-B8192-LUSI0-SDLA4-ADP,"
|
|
||||||
},
|
|
||||||
"HasConfig": 1,
|
|
||||||
"LeftStick": {
|
|
||||||
"DownAxisDirectionMappingIds": "P0-S0-D3-KB31,P0-S0-D3-LUSI0-SDLA1-ADP,",
|
|
||||||
"LeftAxisDirectionMappingIds": "P0-S0-D0-KB30,P0-S0-D0-LUSI0-SDLA0-ADN,",
|
|
||||||
"RightAxisDirectionMappingIds": "P0-S0-D1-KB32,P0-S0-D1-LUSI0-SDLA0-ADP,",
|
|
||||||
"UpAxisDirectionMappingIds": "P0-S0-D2-KB17,P0-S0-D2-LUSI0-SDLA1-ADN,"
|
|
||||||
},
|
|
||||||
"RumbleMappingIds": "P0-LUSI0,"
|
|
||||||
},
|
|
||||||
"RumbleMappings": {
|
|
||||||
"P0-LUSI0": {
|
|
||||||
"HighFrequencyIntensity": 50,
|
|
||||||
"LowFrequencyIntensity": 50,
|
|
||||||
"RumbleMappingClass": "SDLRumbleMapping",
|
|
||||||
"ShipDeviceIndex": 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gForceCursorVisibility": 0,
|
|
||||||
"gLevelSelector": 1,
|
|
||||||
"gOpenMenuBar": 1
|
|
||||||
},
|
|
||||||
"Window": {
|
|
||||||
"AudioBackend": "wasapi",
|
|
||||||
"Backend": {
|
|
||||||
"Id": 0,
|
|
||||||
"Name": "DirectX 11"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user