Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
map.c File Reference

FieldMap's methods: the cells of the map's levels, the free tiles and the steps of a walk or a flight. More...

#include "field/field_mode.h"
Include dependency graph for map.c:

Go to the source code of this file.

Macros

#define MAP_PART(entry, i)   ((void *)((entry)[i] + (s32)(entry)))
 Part i of a map file, at the offset from its start that its word i holds.
 

Functions

s32 FIELDSTG_selectMap (s32 index)
 Points the map at the file of map index: the grid, whose first two bytes are its width and height, the levels of cells and the pixels, at the offsets the file's entry starts with.
 
void FIELDSTG_setMapFile (s32 index, s32 value)
 Sets the file of map index (FieldMap.setFile)
 
void FIELDSTG_setFirstMap (s32 index)
 Puts the player on map index when the mode is new (FieldMap.setFirstMap)
 
void FIELDSTG_setMap (s32 index)
 Puts the player on map index (FieldMap.setMap)
 
s32 FIELDSTG_getMapCell (s32 index, Vec2 *pos)
 The cell of map index at pos, down the tree from the grid to the pixel (FieldMap.getCell); 1 without a file.
 
s32 FIELDSTG_isTileFree (Vec2 *pos)
 Whether nothing stands at pos: no character's box (gathered once a frame) and no object.
 
void FIELDSTG_getWalkStep (Vec2 *pos, s32 scale, s32 dir, Vec2 *out)
 A step of scale in a direction on the map the player is on, along the slope of its cell (FieldMap.getWalkStep)
 
void FIELDSTG_getFlyStep (Vec2 *pos, s32 scale, s32 dir, Vec2 *out)
 A step of scale in a direction, on the flat (FieldMap.getFlyStep)
 

Detailed Description

FieldMap's methods: the cells of the map's levels, the free tiles and the steps of a walk or a flight.

Definition in file map.c.

Macro Definition Documentation

◆ MAP_PART

#define MAP_PART (   entry,
  i 
)    ((void *)((entry)[i] + (s32)(entry)))

Part i of a map file, at the offset from its start that its word i holds.

Definition at line 7 of file map.c.

Function Documentation

◆ FIELDSTG_selectMap()

s32 FIELDSTG_selectMap ( s32  index)

Points the map at the file of map index: the grid, whose first two bytes are its width and height, the levels of cells and the pixels, at the offsets the file's entry starts with.

map.c

Returns 0 when no file is set. The match depends on the file's check being an early exit, a do-while (0) that breaks once the file is set, with file declared in it: the block's note stops stmt.c from rolling the exit test to the loop's end, and the loop notes keep the prologue's stores of ra and s0 ahead of the load in the second scheduler.

Definition at line 19 of file map.c.

Referenced by FIELDSTG_getMapCell().

Here is the caller graph for this function:

◆ FIELDSTG_setMapFile()

void FIELDSTG_setMapFile ( s32  index,
s32  value 
)

Sets the file of map index (FieldMap.setFile)

Definition at line 46 of file map.c.

◆ FIELDSTG_setFirstMap()

void FIELDSTG_setFirstMap ( s32  index)

Puts the player on map index when the mode is new (FieldMap.setFirstMap)

Definition at line 51 of file map.c.

◆ FIELDSTG_setMap()

void FIELDSTG_setMap ( s32  index)

Puts the player on map index (FieldMap.setMap)

Definition at line 58 of file map.c.

◆ FIELDSTG_getMapCell()

s32 FIELDSTG_getMapCell ( s32  index,
Vec2 *  pos 
)

The cell of map index at pos, down the tree from the grid to the pixel (FieldMap.getCell); 1 without a file.

Definition at line 64 of file map.c.

Referenced by FIELDSTG_getWalkStep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_isTileFree()

s32 FIELDSTG_isTileFree ( Vec2 *  pos)

Whether nothing stands at pos: no character's box (gathered once a frame) and no object.

The match depends on the two widths, the gathered box's and the tested one's, being variables of their own: one width for both blocks gives GCC 2.8.1 other registers.

< every character (FIELDSTG_createActor)

Definition at line 103 of file map.c.

Here is the call graph for this function:

◆ FIELDSTG_getWalkStep()

void FIELDSTG_getWalkStep ( Vec2 *  pos,
s32  scale,
s32  dir,
Vec2 *  out 
)

A step of scale in a direction on the map the player is on, along the slope of its cell (FieldMap.getWalkStep)

Definition at line 150 of file map.c.

Here is the call graph for this function:

◆ FIELDSTG_getFlyStep()

void FIELDSTG_getFlyStep ( Vec2 *  pos,
s32  scale,
s32  dir,
Vec2 *  out 
)

A step of scale in a direction, on the flat (FieldMap.getFlyStep)

Definition at line 164 of file map.c.