mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-09-06 18:01:04 -04:00
match some of fraser/cuyler files.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
#include "random_field.h"
|
||||
|
||||
int mRF_GetRandomStepMode(void) {
|
||||
return mRF_GetRandom(100) < 15;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#include "random_field.h"
|
||||
int mRF_MakePerfectBit(void) {
|
||||
int perfect_bit = 0;
|
||||
int i;
|
||||
for (i = 0; i < mRF_PERFECT_BIT; i++) {
|
||||
perfect_bit |= 1 << i;
|
||||
}
|
||||
|
||||
return perfect_bit;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "roomtype.h"
|
||||
|
||||
#define FTR_NO_2_FTR_IDX(f) ((f) >> 2)
|
||||
#define NUM_FTR_IN_TYPE (FTR_NO_2_FTR_IDX(0x1000))
|
||||
#define IS_FTR(f) ((f) == FG_FTR0_TYPE || (f) == FG_FTR1_TYPE)
|
||||
|
||||
extern int mRmTp_FtrItemNo2FtrIdx(u16 ftr_no) {
|
||||
int type = GET_FG_TYPE(ftr_no);
|
||||
if (IS_FTR(type)) {
|
||||
if (type == FG_FTR0_TYPE) {
|
||||
return FTR_NO_2_FTR_IDX(ftr_no - FTR0_NO_START);
|
||||
}
|
||||
return FTR_NO_2_FTR_IDX(ftr_no - FTR1_NO_START) + NUM_FTR_IN_TYPE;
|
||||
}
|
||||
|
||||
return NULL_NO;
|
||||
}
|
||||
Reference in New Issue
Block a user