mm/include/z64quake.h
Derek Hensley ab8d34b8dc
Play (2 NON_MATCHINGS) (#1109)
* 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>
2023-01-14 12:18:13 -03:00

70 lines
2.1 KiB
C

#ifndef Z64QUAKE_H
#define Z64QUAKE_H
#include "z64math.h"
struct PlayState;
struct Camera;
typedef struct {
/* 0x00 */ Vec3f atOffset;
/* 0x0C */ Vec3f eyeOffset;
/* 0x18 */ s16 rollOffset;
/* 0x1A */ s16 zoom;
/* 0x1C */ f32 max; // Set to scaled max data of struct (mag for Vec3f), never used
} QuakeCamCalc; // size = 0x20
#define QUAKE_SPEED (1 << 0)
#define QUAKE_VERTICAL_MAG (1 << 1)
#define QUAKE_HORIZONTAL_MAG (1 << 2)
#define QUAKE_ZOOM (1 << 3)
#define QUAKE_ROLL_OFFSET (1 << 4)
#define QUAKE_SHAKE_PLANE_OFFSET_X (1 << 5)
#define QUAKE_SHAKE_PLANE_OFFSET_Y (1 << 6)
#define QUAKE_SHAKE_PLANE_OFFSET_Z (1 << 7)
#define QUAKE_COUNTDOWN (1 << 8)
#define QUAKE_IS_SHAKE_PERPENDICULAR (1 << 9)
typedef enum {
/* 1 */ QUAKE_TYPE_1 = 1,
/* 2 */ QUAKE_TYPE_2,
/* 3 */ QUAKE_TYPE_3,
/* 4 */ QUAKE_TYPE_4,
/* 5 */ QUAKE_TYPE_5,
/* 6 */ QUAKE_TYPE_6
} QuakeType;
u32 Quake_SetValue(s16 quakeIndex, s16 valueType, s16 value);
u32 Quake_SetSpeed(s16 quakeIndex, s16 speed);
u32 Quake_SetCountdown(s16 quakeIndex, s16 countdown);
s16 Quake_GetCountdown(s16 quakeIndex);
u32 Quake_SetQuakeValues(s16 quakeIndex, s16 verticalMag, s16 horizontalMag, s16 zoom, s16 rollOffset);
u32 Quake_SetQuakeValues2(s16 quakeIndex, s16 isShakePerpendicular, Vec3s shakePlaneOffset);
s16 Quake_Add(Camera* camera, u32 type);
s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData);
u32 Quake_Remove(s16 index);
s32 Quake_NumActiveQuakes(void);
void Quake_Init(void);
#define DISTORTION_TYPE_0 (1 << 0)
#define DISTORTION_TYPE_NON_ZORA_SWIMMING (1 << 2)
#define DISTORTION_TYPE_ZORA_SWIMMING (1 << 3)
#define DISTORTION_TYPE_UNDERWATER_ENTRY (1 << 4)
#define DISTORTION_TYPE_5 (1 << 5)
#define DISTORTION_TYPE_6 (1 << 6)
#define DISTORTION_TYPE_7 (1 << 7)
#define DISTORTION_TYPE_8 (1 << 8)
#define DISTORTION_TYPE_9 (1 << 9)
#define DISTORTION_TYPE_A (1 << 10)
#define DISTORTION_TYPE_B (1 << 11)
void Distortion_SetCountdown(s16 countdown);
s16 Distortion_GetCountdown(void);
s16 Distortion_GetType(void);
void Distortion_SetType(s32 type);
void Distortion_ClearType(s32 type);
void Distortion_Init(PlayState* play);
void Distortion_Update(void);
#endif