Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move rand.h funcs to stdlib.h #566

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
BasedOnStyle: WebKit
Language: Cpp
LineEnding: LF
ColumnLimit: 0

Expand Down
6 changes: 3 additions & 3 deletions arm9/asm/MSL_Common_scanf.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.rodata

parse_format$f: ; 0x0210440C
.byte 0x00, 0x00, 0x00, 0x00
.word 0x00000000
.word 0x7FFFFFFF
.word 0x00000000
.word 0x00000000
Expand Down Expand Up @@ -1447,12 +1447,12 @@ sscanf: ; 0x020E2D54
bx lr
arm_func_end sscanf

exception __sformatter, 3412, UNK_020EC718
exception __sformatter, 3412, __sformatter_exception
exception vsscanf, 85, 0x00200000
exception sscanf, 41, 0x00300020

.section .exception,8

UNK_020EC718: ; 0x020EC718
__sformatter_exception: ; 0x020EC718
.byte 0x00, 0xFF, 0x01, 0xB0
.balign 8
1 change: 0 additions & 1 deletion arm9/lib/MSL_C/include/MSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

//include all msl files here

#include "rand.h"
#include "stdlib.h"
#include "string.h"

Expand Down
7 changes: 0 additions & 7 deletions arm9/lib/MSL_C/include/rand.h

This file was deleted.

2 changes: 2 additions & 0 deletions arm9/lib/MSL_C/include/stdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
// this file MUST be called stdlib.h, as the filename affects matching for some reason

int abs(int val);
void srand(unsigned int seed);
int rand(void);

#endif // POKEDIAMOND_MSL_C_STDLIB_H
2 changes: 1 addition & 1 deletion arm9/lib/MSL_C/src/rand.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "rand.h"
#include "code32.h"
#include "stdlib.h"

static unsigned long int random_next = 1;

Expand Down
3 changes: 1 addition & 2 deletions arm9/src/scrcmd_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include "party.h"
#include "pokedex.h"
#include "pokemon_storage_system.h"
#include "sav_chatot.h"
#include "save_vars_flags.h"
#include "scrcmd.h"
#include "sav_chatot.h"

extern void *FieldSysGetAttrAddr(FieldSystem *fieldSystem, u8 idx);
extern SaveFashionData *Save_FashionData_Get(SaveData *save);
Expand Down Expand Up @@ -55,7 +55,6 @@ static BOOL sub_0203FEF4(ScriptContext *ctx);
static BOOL sub_020401F0(ScriptContext *ctx);
static BOOL sub_02040618(ScriptContext *ctx);


BOOL ScrCmd_Unk00F8(ScriptContext *ctx) {
void **miscDataPtr = FieldSysGetAttrAddr(ctx->fieldSystem, SCRIPTENV_MISC_DATA_PTR);

Expand Down