Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
is_on_screen.inc.c
Go to the documentation of this file.
1
/* Whether the rectangle (x, y, w, h) is in the view of the map's layer */
2
s32
isOnScreen
(
s32
x,
s32
y,
s32
w,
s32
h) {
3
RECT rect;
4
struct
Layer
*layer =
GFX
.
funcs
.
getLayer
(
FIELD_LAYER_MAP
);
5
6
layer->
getViewRect
(layer, &rect);
7
if
(x + w < rect.x) {
8
return
0;
9
}
10
if
(rect.x + rect.w < x) {
11
return
0;
12
}
13
if
(y + h < rect.y) {
14
return
0;
15
}
16
return
rect.y + rect.h >= y;
17
}
s32
signed int s32
Definition
common.h:11
GFX
GfxState GFX
GFX: the graphics state and its methods.
Definition
display.c:209
FIELD_LAYER_MAP
#define FIELD_LAYER_MAP
the map, its objects and characters, and the menus
Definition
field_map.h:20
isOnScreen
s32 isOnScreen(s32 x, s32 y, s32 w, s32 h)
Whether the rectangle (x, y, w, h) is in the view of the map's layer.
Definition
is_on_screen.inc.c:2
GfxFuncs::getLayer
struct Layer *(* getLayer)(s32 id)
Definition
gfx.h:28
GfxState::funcs
GfxFuncs funcs
Definition
gfx.h:77
Layer
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
Definition
gfx.h:128
Layer::getViewRect
void(* getViewRect)()
Definition
gfx.h:151
src
field
stages
common
is_on_screen.inc.c
Generated by
1.9.8