mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-11 03:39:59 +00:00
Remove some // clang-format off
with a for loop "trick"
This commit is contained in:
parent
6b4001ef82
commit
30c344b800
5 changed files with 5 additions and 15 deletions
|
@ -3,9 +3,7 @@
|
|||
void Lib_MemSet(u8* dest, size_t size, u8 val) {
|
||||
u32 i;
|
||||
|
||||
// clang-format off
|
||||
for (i = 0; i < size; i++) { *dest++ = val; }
|
||||
// clang-format on
|
||||
for (i = 0; i < size; i++, *dest++ = val) {}
|
||||
}
|
||||
|
||||
f32 Math_CosS(s16 angle) {
|
||||
|
|
|
@ -4,9 +4,7 @@ void SoundSource_InitAll(GlobalContext* globalCtx) {
|
|||
SoundSource* sources = &globalCtx->soundSources[0];
|
||||
s32 i;
|
||||
|
||||
// clang-format off
|
||||
for (i = 0; i < ARRAY_COUNT(globalCtx->soundSources); i++) { sources[i].countdown = 0; }
|
||||
// clang-format on
|
||||
for (i = 0; i < ARRAY_COUNT(globalCtx->soundSources); sources[i].countdown = 0, i++) {}
|
||||
}
|
||||
|
||||
void SoundSource_UpdateAll(GlobalContext* globalCtx) {
|
||||
|
|
|
@ -17,9 +17,7 @@ s32 __osContRamRead(OSMesgQueue* ctrlrqueue, s32 channel, u16 addr, u8* data) {
|
|||
if ((__osContLastPoll != 2) || (__osPfsLastChannel != channel)) {
|
||||
__osContLastPoll = 2;
|
||||
__osPfsLastChannel = channel;
|
||||
// clang-format off
|
||||
for (i = 0; i < channel; i++) { *bufptr++ = 0; }
|
||||
// clang-format on
|
||||
for (i = 0; i < channel; i++, *bufptr++ = 0) {}
|
||||
gPifMempakBuf.status = 1;
|
||||
((__OSContRamHeader*)bufptr)->unk_00 = 0xFF;
|
||||
((__OSContRamHeader*)bufptr)->txsize = 3;
|
||||
|
|
|
@ -21,9 +21,7 @@ s32 __osContRamWrite(OSMesgQueue* mq, s32 channel, u16 address, u8* buffer, s32
|
|||
__osContLastPoll = CONT_CMD_WRITE_MEMPACK;
|
||||
__osPfsLastChannel = channel;
|
||||
|
||||
// clang-format off
|
||||
for (i = 0; i < channel; i++) { *ptr++ = 0; }
|
||||
// clang-format on
|
||||
for (i = 0; i < channel; i++, *ptr++ = 0) {}
|
||||
|
||||
gPifMempakBuf.status = 1;
|
||||
|
||||
|
|
|
@ -3762,9 +3762,7 @@ void func_8083819C(Player* this, GlobalContext* globalCtx) {
|
|||
void func_8083821C(Player* this) {
|
||||
s32 i;
|
||||
|
||||
// clang-format off
|
||||
for (i = 0; i < PLAYER_BODYPART_MAX; i++) { this->flameTimers[i] = Rand_S16Offset(0, 200); }
|
||||
// clang-format on
|
||||
for (i = 0; i < PLAYER_BODYPART_MAX; this->flameTimers[i] = Rand_S16Offset(0, 200), i++) {}
|
||||
|
||||
this->isBurning = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue