You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Widescreen option change, puppyvolumes
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "math_util.h"
|
||||
#include "surface_collision.h"
|
||||
#include "surface_load.h"
|
||||
#include "game/puppycam2.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@@ -757,6 +758,40 @@ static void level_cmd_get_or_set_var(void) {
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
static void level_cmd_puppyvolume(void)
|
||||
{
|
||||
if ((sPuppyVolumeStack[gPuppyVolumeCount] = mem_pool_alloc(gPuppyMemoryPool,sizeof(struct sPuppyVolume))) == NULL)
|
||||
{
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
gPuppyError |= PUPPY_ERROR_POOL_FULL;
|
||||
return;
|
||||
}
|
||||
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->pos[0] = CMD_GET(s16, 2);
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->pos[1] = CMD_GET(s16, 4);
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->pos[2] = CMD_GET(s16, 6);
|
||||
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->radius[0] = CMD_GET(s16, 8);
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->radius[1] = CMD_GET(s16, 10);
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->radius[2] = CMD_GET(s16, 12);
|
||||
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->rot = CMD_GET(s16, 14);
|
||||
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->func = CMD_GET(void *, 16);
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->angles = segmented_to_virtual(CMD_GET(void *, 20));
|
||||
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->flagsAdd = CMD_GET(s32, 24);
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->flagsRemove = CMD_GET(s32, 28);
|
||||
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->flagPersistance = CMD_GET(u8, 32);
|
||||
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->shape = CMD_GET(u8, 33);
|
||||
sPuppyVolumeStack[gPuppyVolumeCount]->room = CMD_GET(s16, 34);
|
||||
|
||||
gPuppyVolumeCount++;
|
||||
sCurrentCmd = CMD_NEXT;
|
||||
}
|
||||
|
||||
static void (*LevelScriptJumpTable[])(void) = {
|
||||
/*00*/ level_cmd_load_and_execute,
|
||||
/*01*/ level_cmd_exit_and_execute,
|
||||
@@ -819,6 +854,7 @@ static void (*LevelScriptJumpTable[])(void) = {
|
||||
/*3A*/ level_cmd_3A,
|
||||
/*3B*/ level_cmd_create_whirlpool,
|
||||
/*3C*/ level_cmd_get_or_set_var,
|
||||
/*3E*/ level_cmd_puppyvolume,
|
||||
};
|
||||
|
||||
struct LevelCommand *level_script_execute(struct LevelCommand *cmd) {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "area.h"
|
||||
#include "engine/geo_layout.h"
|
||||
#include "engine/graph_node.h"
|
||||
#include "puppycam2.h"
|
||||
|
||||
#include "level_table.h"
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ UNUSED static s32 sUnusedGameInitValue = 0;
|
||||
// General timer that runs as the game starts
|
||||
u32 gGlobalTimer = 0;
|
||||
#ifdef WIDE
|
||||
u8 gWidescreen;
|
||||
s16 gWidescreen;
|
||||
#endif
|
||||
|
||||
// Framebuffer rendering values (max 3)
|
||||
|
||||
@@ -43,7 +43,7 @@ extern struct GfxPool *gGfxPool;
|
||||
extern u8 gControllerBits;
|
||||
extern u8 gIsConsole;
|
||||
#ifdef WIDE
|
||||
extern u8 gWidescreen;
|
||||
extern s16 gWidescreen;
|
||||
#endif
|
||||
extern u8 gBorderHeight;
|
||||
#ifdef CUSTOM_DEBUG
|
||||
|
||||
@@ -1493,6 +1493,8 @@ void render_pause_red_coins(void) {
|
||||
print_animated_red_coin(GFX_DIMENSIONS_FROM_RIGHT_EDGE(30) - x * 20, 16);
|
||||
}
|
||||
}
|
||||
///By default, not needed as puppycamera has an option, but should you wish to revert that, you are legally allowed.
|
||||
/*
|
||||
#ifdef WIDE
|
||||
void render_widescreen_setting(void) {
|
||||
gSPDisplayList(gDisplayListHead++, dl_ia_text_begin);
|
||||
@@ -1512,7 +1514,7 @@ void render_widescreen_setting(void) {
|
||||
save_file_set_widescreen_mode(gWidescreen);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif*/
|
||||
|
||||
#define CRS_NUM_X1 100
|
||||
#define TXT_STAR_X 98
|
||||
@@ -1869,7 +1871,7 @@ s16 render_pause_courses_and_castle(void) {
|
||||
break;
|
||||
}
|
||||
#ifdef WIDE
|
||||
render_widescreen_setting();
|
||||
//render_widescreen_setting();
|
||||
#endif
|
||||
if (gDialogTextAlpha < 250) {
|
||||
gDialogTextAlpha += 25;
|
||||
|
||||
@@ -42,8 +42,8 @@ struct MemoryPool *gPuppyMemoryPool;
|
||||
s32 gPuppyError = 0;
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
static u8 gPCOptionStringsFR[][64] = {{NC_ANALOGUE_FR}, {NC_CAMX_FR}, {NC_CAMY_FR}, {NC_INVERTX_FR}, {NC_INVERTY_FR}, {NC_CAMC_FR}, {NC_SCHEME_FR},};
|
||||
static u8 gPCOptionStringsDE[][64] = {{NC_ANALOGUE_DE}, {NC_CAMX_DE}, {NC_CAMY_DE}, {NC_INVERTX_DE}, {NC_INVERTY_DE}, {NC_CAMC_DE}, {NC_SCHEME_DE},};
|
||||
static u8 gPCOptionStringsFR[][64] = {{NC_ANALOGUE_FR}, {NC_CAMX_FR}, {NC_CAMY_FR}, {NC_INVERTX_FR}, {NC_INVERTY_FR}, {NC_CAMC_FR}, {NC_SCHEME_FR}, {NC_WIDE_FR},};
|
||||
static u8 gPCOptionStringsDE[][64] = {{NC_ANALOGUE_DE}, {NC_CAMX_DE}, {NC_CAMY_DE}, {NC_INVERTX_DE}, {NC_INVERTY_DE}, {NC_CAMC_DE}, {NC_SCHEME_DE}, {NC_WIDE_DE},};
|
||||
static u8 gPCFlagStringsFR[][64] = {{OPTION_DISABLED_FR}, {OPTION_ENABLED_FR}, {OPTION_SCHEME1_FR}, {OPTION_SCHEME2_FR}, {OPTION_SCHEME3_FR}};
|
||||
static u8 gPCFlagStringsDE[][64] = {{OPTION_DISABLED_DE}, {OPTION_ENABLED_DE}, {OPTION_SCHEME1_DE}, {OPTION_SCHEME2_DE}, {OPTION_SCHEME3_DE}};
|
||||
static u8 gPCToggleStringsFR[][64] = {{NC_ANALOGUE_EN}, {NC_ANALOGUE_EN}, {NC_ANALOGUE_EN}, {NC_ANALOGUE_EN}, {NC_ANALOGUE_EN}};
|
||||
@@ -51,7 +51,7 @@ static u8 gPCToggleStringsDE[][64] = {{NC_ANALOGUE_EN}, {NC_ANALOGUE_EN}, {NC_AN
|
||||
//static u8 gPCToggleStringsFR[][64] = {{NC_BUTTON_FR}, {NC_BUTTON2_FR}, {NC_OPTION_FR}, {NC_HIGHLIGHT_L_FR}, {NC_HIGHLIGHT_R_FR}};
|
||||
//static u8 gPCToggleStringsDE[][64] = {{NC_BUTTON_DE}, {NC_BUTTON2_DE}, {NC_OPTION_DE}, {NC_HIGHLIGHT_L_DE}, {NC_HIGHLIGHT_R_DE}};
|
||||
#endif
|
||||
static u8 gPCOptionStringsEN[][64] = {{NC_ANALOGUE_EN}, {NC_CAMX_EN}, {NC_CAMY_EN}, {NC_INVERTX_EN}, {NC_INVERTY_EN}, {NC_CAMC_EN}, {NC_SCHEME_EN},};
|
||||
static u8 gPCOptionStringsEN[][64] = {{NC_ANALOGUE_EN}, {NC_CAMX_EN}, {NC_CAMY_EN}, {NC_INVERTX_EN}, {NC_INVERTY_EN}, {NC_CAMC_EN}, {NC_SCHEME_EN}, {NC_WIDE_EN},};
|
||||
static u8 gPCFlagStringsEN[][64] = {{OPTION_DISABLED_EN}, {OPTION_ENABLED_EN}, {OPTION_SCHEME1_EN}, {OPTION_SCHEME2_EN}, {OPTION_SCHEME3_EN}};
|
||||
static u8 gPCToggleStringsEN[][64] = {{NC_BUTTON_EN}, {NC_BUTTON2_EN}, {NC_OPTION_EN}, {NC_HIGHLIGHT_L}, {NC_HIGHLIGHT_R}};
|
||||
|
||||
@@ -74,6 +74,7 @@ static const struct gPCOptionStruct
|
||||
|
||||
static const struct gPCOptionStruct gPCOptions[]=
|
||||
{ //If the min and max are 0 and 1, then the value text is used, otherwise it's ignored.
|
||||
{/*Option Name*/ 7, /*Option Variable*/ &gWidescreen, /*Option Value Text Start*/ 0, /*Option Minimum*/ FALSE, /*Option Maximum*/ TRUE},
|
||||
{/*Option Name*/ 0, /*Option Variable*/ &gPuppyCam.options.analogue, /*Option Value Text Start*/ 0, /*Option Minimum*/ FALSE, /*Option Maximum*/ TRUE},
|
||||
{/*Option Name*/ 6, /*Option Variable*/ &gPuppyCam.options.inputType, /*Option Value Text Start*/ 2, /*Option Minimum*/ 0, /*Option Maximum*/ 2},
|
||||
{/*Option Name*/ 1, /*Option Variable*/ &gPuppyCam.options.sensitivityX, /*Option Value Text Start*/ 255, /*Option Minimum*/ 10, /*Option Maximum*/ 500},
|
||||
@@ -85,10 +86,6 @@ static const struct gPCOptionStruct gPCOptions[]=
|
||||
|
||||
u8 gPCOptionCap = sizeof(gPCOptions) / sizeof(struct gPCOptionStruct); //How many options there are in newcam_uptions.
|
||||
|
||||
//Some macros for the sake of basic human sanity.
|
||||
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
|
||||
#define ABS(x) ((x) > 0.f ? (x) : -(x))
|
||||
|
||||
s16 LENSIN(s16 length, s16 direction)
|
||||
{
|
||||
return (length * sins(direction));
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
CMD_W(removeflags), \
|
||||
CMD_BBH(flagpersistance, shape, room)
|
||||
|
||||
//Some macros for the sake of basic human sanity.
|
||||
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
|
||||
#define ABS(x) ((x) > 0.f ? (x) : -(x))
|
||||
|
||||
struct gPuppyOptions
|
||||
{
|
||||
s16 analogue;
|
||||
|
||||
Reference in New Issue
Block a user