mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-26 15:44:42 -04:00
ab8d34b8dc
* Bring over progress from another branch
Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com>
* cleanup, fake match Play_Init
* small fixes
* Some small cleanup
* Match func_80165460 (from debug)
* Match func_80165658
* Match func_80165DB8, func_80165DCC, func_80165DF0, func_80165E04
* Match func_80167DE4 (from debug)
* Match func_80167F0C
* Match func_80168DAC
* Matched func_80169100
* Matched func_801691F0
* import D_801DFA18
* match Play_Main thanks to debug
* cleanup
* synray does it again
* add docs from debug
* fix func_801656A4
* more docs and cleanup
* Match func_80166B30 and diff fake match in Init
* import transition docs from OoT
* Play Update, sort of
* cleanup Play_Update
* more cleanup
* slightly more docs
* small docs
* Play_Draw WIP Thanks @petrie911
* progress?
* two more matches
* format
* misc play docs
* transitions cleanup
* Motion Blur
* Transitions
* Fog
* Bombers notebook + small cleanup
* bss
* Camera Functions
* Picto functions
* Init
* MotionBlur Clean up
* Floor Surface
* Pictographs some more
* regs
* fix circular dependency problem
* Cleanup PR commits outside play
* namefixer
* PR picto
* PR audio
* PR small clean ups
* debug strings
* Picto defines
* bss
* enums
* remove void
* typedefs
* Hireso -> BombersNotebook
* bss comments
* bss and I8/I5 functions
* Smaller PR comments
* Transitions
* Combine enums
* Revert "Combine enums"
This reverts commit 0da1ebcaed.
* Fix Transition defines
* RGBA16 macros
* Unname
* worldCoverAlpha
* Rename Update and Draw
* PR review, plus annotate bug
* Clean up nonmatchings with a closer DrawGame
* Format
* New macros
* UpdateMain and DrawMain
* Fix merge
* Small cleanups from PR
* zFar
* Intensity macros
* Format
* Remove bss comments
* Compression/decompression
* Small cleanup
* Format
* More PR cleanup
* Cleanup picto stuff
* format
* Fix compression comments
* Play processes state enums DONE -> READY
* cutscene comment
* fix bss
Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com>
Co-authored-by: engineer124 <engineer124engineer124@gmail.com>
Co-authored-by: petrie911 <pmontag@PHYS-S129.iowa.uiowa.edu>
Co-authored-by: angie <angheloalf95@gmail.com>
53 lines
1.8 KiB
C
53 lines
1.8 KiB
C
#ifndef Z64_SNAP_H
|
|
#define Z64_SNAP_H
|
|
|
|
#include "PR/ultratypes.h"
|
|
#include "z64actor.h"
|
|
|
|
typedef s32 (*PictoValidationFunc)(struct PlayState*, Actor*);
|
|
|
|
typedef struct {
|
|
/* 0x000 */ Actor actor;
|
|
/* 0x144 */ PictoValidationFunc validationFunc;
|
|
} PictoActor;
|
|
|
|
// Picto validation flags
|
|
|
|
typedef enum {
|
|
// Used externally, set and read by actors
|
|
/* 0x00 */ PICTO_VALID_0,
|
|
/* 0x01 */ PICTO_VALID_IN_SWAMP,
|
|
/* 0x02 */ PICTO_VALID_MONKEY,
|
|
/* 0x03 */ PICTO_VALID_BIG_OCTO,
|
|
/* 0x04 */ PICTO_VALID_LULU_HEAD,
|
|
/* 0x05 */ PICTO_VALID_LULU_RIGHT_ARM,
|
|
/* 0x06 */ PICTO_VALID_LULU_LEFT_ARM, // Need all three of these to qualify as a good picture
|
|
/* 0x07 */ PICTO_VALID_SCARECROW,
|
|
/* 0x08 */ PICTO_VALID_TINGLE,
|
|
/* 0x09 */ PICTO_VALID_PIRATE_GOOD,
|
|
/* 0x0A */ PICTO_VALID_DEKU_KING,
|
|
/* 0x0B */ PICTO_VALID_PIRATE_TOO_FAR, // overlaps with PICTO_VALID_PIRATE_GOOD, but that is checked first
|
|
|
|
// Used internally, test for failures of position, angle etc.
|
|
/* 0x3B */ PICTO_VALID_BEHIND_COLLISION = 0x3B,
|
|
/* 0x3C */ PICTO_VALID_BEHIND_BG,
|
|
/* 0x3D */ PICTO_VALID_NOT_IN_VIEW,
|
|
/* 0x3E */ PICTO_VALID_BAD_ANGLE,
|
|
/* 0x3F */ PICTO_VALID_BAD_DISTANCE
|
|
} PictoValidFlag;
|
|
|
|
// The subregion of the picto photo that will set the flag for an actor being in the photo
|
|
#define PICTO_VALID_WIDTH 150
|
|
#define PICTO_VALID_HEIGHT 105
|
|
#define PICTO_VALID_TOPLEFT_X ((SCREEN_WIDTH - PICTO_VALID_WIDTH) / 2)
|
|
#define PICTO_VALID_TOPLEFT_Y ((SCREEN_HEIGHT - PICTO_VALID_HEIGHT) / 2)
|
|
|
|
s32 Snap_RecordPictographedActors(PlayState* play);
|
|
void Snap_SetFlag(s32 flag);
|
|
void Snap_UnsetFlag(s32 flag);
|
|
u32 Snap_CheckFlag(s32 flag);
|
|
s16 Snap_AbsS(s16 val);
|
|
s32 Snap_ValidatePictograph(PlayState* play, Actor* actor, s32 flag, Vec3f* pos, Vec3s* rot, f32 distanceMin, f32 distanceMax, s16 angleRange);
|
|
|
|
#endif
|