System gamearrays: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Created page with "These are gamearrays which are defined as direct pointers to internal arrays in the game. While some will change frequently, others will remain static for the whole game...."
 
Mblackwell (talk | contribs)
mNo edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 3: Line 3:
The following is a listing of accessible arrays along with their size in brackets. Where the size is variable, it indicates the maximum allowable index plus 1. All of the built-in arrays are read-only.
The following is a listing of accessible arrays along with their size in brackets. Where the size is variable, it indicates the maximum allowable index plus 1. All of the built-in arrays are read-only.


These are the (head|next|prev)sprite(stat|sect) arrays.
The ''tilesiz''(''x''/''y'') arrays are indexed by tile numbers and hold the x/y dimensions of the loaded tiles. If a tile doesn't exist, they will be 0.
*[[headspritesect|hsect]][MAXSECTORS+1]
*[[sizex|tilesizx]][MAXTILES]
*[[nextspritesect|nsect]][MAXSPRITES]
*[[sizey|tilesizy]][MAXTILES]
*[[prevspritesect|psect]][MAXSPRITES]
*[[headspritestat|hstat]][MAXSTATUS+1]
*[[nextspritestat|nstat]][MAXSPRITES]
*[[prevspritestat|pstat]][MAXSPRITES]


The ''tilesiz''(''x''/''y'') arrays are indexed by tile numbers and hold the x/y dimensions
Sectors that are visible in 2d map mode:
of the loaded tiles. If a tile doesn't exist, they will be 0.
*[[show2dsector]][numsectors]
*tilesizx[MAXTILES]
*tilesizy[MAXTILES]


[Something having to do with the ART tiles and their animations]
Determine which [[statnum]]s will be in the loop for hitradius damage checks:
*picanm
* [[radiusdmgstatnums]][MAXSTATUS]


[What context in the game???]
Determine if a specific [[tilenum]] has been rendered this frame:
*show2dsector[(MAXSECTORS+7)>>3]
* [[gotpic]][MAXTILES]
*show2dwall[(MAXWALLS+7)>>3]
*show2dsprite[(MAXSPRITES+7)>>3]


Direct input access!
Determine if a [[sector]] was rendered this frame:
*keystatus[256] Indexed by scancodes (= KEY_?? constants)
* [[gotsector]][numsectors]


[[Category:Gamearray manipulation]]
[[Category:Gamearray manipulation]]

Latest revision as of 20:36, 24 August 2024

These are gamearrays which are defined as direct pointers to internal arrays in the game. While some will change frequently, others will remain static for the whole game. Please note that the values of these array may be different on each peer, so be sure of what you are doing or you could possibly have an effect on sync.

The following is a listing of accessible arrays along with their size in brackets. Where the size is variable, it indicates the maximum allowable index plus 1. All of the built-in arrays are read-only.

The tilesiz(x/y) arrays are indexed by tile numbers and hold the x/y dimensions of the loaded tiles. If a tile doesn't exist, they will be 0.

Sectors that are visible in 2d map mode:

Determine which statnums will be in the loop for hitradius damage checks:

Determine if a specific tilenum has been rendered this frame:

Determine if a sector was rendered this frame: