Revert "Mic Test Overlay"

This commit is contained in:
PikalaxALT 2024-11-01 19:25:49 -04:00 committed by GitHub
parent a43b5c2e47
commit 5de615ef0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 1947 additions and 1082 deletions

18
.githooks/pre-commit Normal file → Executable file
View File

@ -1,9 +1,9 @@
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# Run clang-format on staged files; abort the commit if any files are changed
if ! git clang-format --extensions c,cpp,h,hpp ; then
echo "linting made changes to source files; aborting commit"
exit 1
fi
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# Run clang-format on staged files; abort the commit if any files are changed
if ! git clang-format --extensions c,cpp,h,hpp ; then
echo "linting made changes to source files; aborting commit"
exit 1
fi

View File

@ -1,7 +1,7 @@
#!/bin/bash -ex
# Only run this script if it's the main branch build.
if [[ "$GITHUB_REF" != "refs/heads/main" || "$GITHUB_EVENT_NAME" != "push" ]]; then
# Only run this script if it's the master branch build.
if [[ "$GITHUB_REF" != "refs/heads/master" || "$GITHUB_EVENT_NAME" != "push" ]]; then
exit 0
fi

View File

@ -2,7 +2,7 @@ name: build
on:
push:
branches: [ main ]
branches: [ master ]
pull_request:
workflow_dispatch:
@ -113,3 +113,4 @@ jobs:
cwd: "./xmap"
add: "*.xMAP"
message: ${{ env.XMAP_COMMIT_MSG }}

View File

@ -12,7 +12,7 @@ This repository includes an opinionated `clang-format` specification to ensure t
### Requirements
- `clang-format@18` or newer
- `clang-format@17` or newer
### Usage
@ -47,23 +47,3 @@ asm void func() {
// clang-format on
#endif // NONMATCHING
```
### Ubuntu (WSL) Installation
On older versions of Ubuntu, clang-format will default to earlier versions.
To install clang-format-18 on Ubuntu (WSL), run the following:
```sh
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 18
sudo apt install clang-format-18
```
And then create a symbolic link:
```sh
ln -s /usr/bin/clang-format-18 /usr/bin/clang-format
```
If you're using the pre-commit hook, you also want to set up a symlink for git:
```sh
git config alias.clang-format clang-format-18
```

View File

@ -0,0 +1,96 @@
#include <nitro/fs/overlay.h>
#pragma once
.public RegisterMainOverlay
.public FontID_Alloc
.public FontID_Release
.public sub_02005518
.public GF_MIC_StartAutoSampling
.public GF_MIC_StopAutoSampling
.public GF_SndStartFadeOutBGM
.public PlaySE
.public OverlayManager_CreateAndGetData
.public OverlayManager_GetData
.public OverlayManager_FreeData
.public GfGfxLoader_LoadCharData
.public GfGfxLoader_LoadScrnData
.public GfGfxLoader_GXLoadPal
.public sub_0200B2E0
.public sub_0200B2E8
.public NewMsgDataFromNarc
.public DestroyMsgData
.public NewString_ReadMsgData
.public SpriteRenderer_Create
.public SpriteRenderer_CreateGfxHandler
.public SpriteRenderer_CreateOamCharPlttManagers
.public SpriteRenderer_CreateSpriteList
.public SpriteGfxHandler_RenderAndAnimateSprites
.public thunk_OamManager_ApplyAndResetBuffers
.public SpriteRenderer_Delete
.public SpriteRenderer_Init2DGfxResManagersFromCountsArray
.public SpriteRenderer_LoadCharResObjFromNarcId
.public SpriteRenderer_LoadPlttResObjFromNarcId
.public SpriteRenderer_LoadCellResObjFromNarcId
.public SpriteRenderer_LoadAnimResObjFromNarcId
.public SpriteRenderer_LoadResourcesAndCreateSprite
.public SpriteRenderer_UnloadResourcesAndRemoveGfxHandler
.public UnkImageStruct_Delete
.public UnkImageStruct_TickSpriteAnimation1Frame
.public UnkImageStruct_SetSpriteAnimSeqNo
.public UnkImageStruct_SetSpriteAnimActiveFlag
.public sub_0200DCA0
.public UnkImageStruct_SetSpriteVisibleFlag
.public UnkImageStruct_SetSpritePriority
.public UnkImageStruct_SetSpritePositionXY
.public sub_0200E0C0
.public SysTask_CreateOnMainQueue
.public SysTask_Destroy
.public BeginNormalPaletteFade
.public IsPaletteFadeFinished
.public sub_0200FBDC
.public Main_SetVBlankIntrCB
.public HBlankInterruptDisable
.public Sys_SetSleepDisableFlag
.public Sys_ClearSleepDisableFlag
.public CreateHeap
.public DestroyHeap
.public AllocFromHeap
.public FreeToHeap
.public BgConfig_Alloc
.public SetBothScreensModesAndDisable
.public InitBgFromTemplate
.public FreeBgTilemapBuffer
.public BG_ClearCharDataRange
.public BgClearTilemapBufferAndCommit
.public AddWindowParameterized
.public RemoveWindow
.public CopyWindowToVram
.public ClearWindowTilemap
.public ClearWindowTilemapAndCopyToVram
.public FillWindowPixelBuffer
.public DoScheduledBgGpuUpdates
.public SysTask_GetData
.public GF_SinDegNoWrap
.public LCRandom
.public AddTextPrinterParameterizedWithColor
.public GF_CreateVramTransferManager
.public GF_DestroyVramTransferManager
.public GfGfx_SetBanks
.public GfGfx_DisableEngineAPlanes
.public GfGfx_EngineATogglePlanes
.public GfGfx_DisableEngineBPlanes
.public GfGfx_EngineBTogglePlanes
.public TouchscreenHitbox_FindRectAtTouchNew
.public GF_AssertFail
.public String_Delete
.public NNS_GfdDoVramTransfer
.public VEC_Add
.public MI_CpuFill8
.public _fadd
.public _ffix
.public _fflt
.public _fsub
.public _ll_mul
.public _s32_div_f
.public gSystem
.public gApplication_TitleScreen
.public gApplication_MicTest

1818
asm/overlay_62.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -34,7 +34,6 @@ typedef enum HeapID {
HEAP_ID_CERTIFICATES = 82,
HEAP_ID_89 = 89,
HEAP_ID_ALPH_PUZZLE = 97,
HEAP_ID_MIC_TEST = 98,
HEAP_ID_GAME_BOARD = 110,
HEAP_ID_BERRY_POTS = 130,
HEAP_ID_BERRY_POTS_APP = 131,

View File

@ -1,12 +0,0 @@
#ifndef POKEHEARTGOLD_MIC_TEST_H
#define POKEHEARTGOLD_MIC_TEST_H
#include "bg_window.h"
#include "msgdata.h"
#include "overlay_manager.h"
#include "system.h"
#include "unk_0200CF18.h"
extern const OVY_MGR_TEMPLATE gApplication_MicTest;
#endif // POKEHEARTGOLD_MIC_TEST_H

View File

@ -857,7 +857,7 @@ Overlay OVY_61
Overlay OVY_62
{
After main
Object src/overlay_mic_test.o
Object asm/overlay_62.o
}
Overlay OVY_63
{

View File

@ -1384,8 +1384,8 @@ u8 GetBgPriority(BgConfig *bgConfig, u8 bgId) {
return 0;
}
#define GetPixelAddressFromBlit4bpp(ptr, x, y, width) ((u8 *)((ptr) + (((x) >> 1) & 3) + (((x) << 2) & 0x3FE0) + ((((y) << 2) & 0x3FE0) * (width)) + ((u32)(((y) << 2) & 0x1C))))
#define GetPixelAddressFromBlit8bpp(ptr, x, y, width) ((u8 *)((ptr) + ((x) & 7) + (((x) << 3) & 0x7FC0) + ((((y) << 3) & 0x7FC0) * (width)) + ((u32)(((y) << 3) & 0x38))))
#define GetPixelAddressFromBlit4bpp(ptr, x, y, width) ((u8 *)((ptr) + (((x) >> 1) & 3) + (((x) << 2) & 0x3FE0) + ((((y) << 2) & 0x3FE0) * (width)) + (((u32)(((y) << 2) & 0x1C)))))
#define GetPixelAddressFromBlit8bpp(ptr, x, y, width) ((u8 *)((ptr) + ((x) & 7) + (((x) << 3) & 0x7FC0) + ((((y) << 3) & 0x7FC0) * (width)) + (((u32)(((y) << 3) & 0x38)))))
#define ConvertPixelsToTiles(x) (((x) + ((x) & 7)) >> 3)
void BlitBitmapRect4Bit(const Bitmap *src, const Bitmap *dest, u16 srcX, u16 srcY, u16 destX, u16 destY, u16 width, u16 height, u16 colorKey) {

View File

@ -54,21 +54,20 @@ static const MailMessageTemplate TrainerHouse_DefaultIntroMessage = {
.ec_words = { msg_0285_match, 0 },
};
#define DUMMY_TRAINER_HOUSE_MON \
{ \
.language = GAME_LANGUAGE, \
.nickname = { \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
}, \
#define DUMMY_TRAINER_HOUSE_MON { \
.language = GAME_LANGUAGE, \
.nickname = { \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
EOS, \
}, \
}
static const TrainerHouseSet ov25_02259D9C = {

File diff suppressed because it is too large Load Diff

View File

@ -64,8 +64,8 @@ void sub_02072190(BoxPokemon *boxMon, PlayerProfile *a1, u32 pokeball, u32 a3, u
#define DECRYPT_PTY(mon) MonDecryptSegment(ENCRY_ARGS_PTY(mon))
#define DECRYPT_BOX(boxMon) MonDecryptSegment(ENCRY_ARGS_BOX(boxMon))
#define CHECKSUM(boxMon) CalcMonChecksum((u16 *)(boxMon)->substructs, sizeof((boxMon)->substructs))
#define SHINY_CHECK(otid, pid) (( \
(((otid) & 0xFFFF0000u) >> 16u) ^ ((otid) & 0xFFFFu) ^ (((pid) & 0xFFFF0000u) >> 16u) ^ ((pid) & 0xFFFFu)) \
#define SHINY_CHECK(otid, pid) (( \
((((otid) & 0xFFFF0000u) >> 16u)) ^ (((otid) & 0xFFFFu)) ^ ((((pid) & 0xFFFF0000u) >> 16u)) ^ (((pid) & 0xFFFFu))) \
< 8u)
#define CALC_UNOWN_LETTER(pid) ((u32)((((pid) & 0x3000000) >> 18) | (((pid) & 0x30000) >> 12) | (((pid) & 0x300) >> 6) | (((pid) & 0x3) >> 0)) % 28u)