User:Jwaffe: Difference between revisions
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 59: | Line 59: | ||
A_Execute /* | A_Execute /* | ||
int32_t g_i = iActor (actor's sprite index), g_p = iPlayer, g_x =lDist; | int32_t g_i = iActor (actor's sprite index), | ||
g_p = iPlayer, | |||
g_x =lDist; | |||
int32_t *g_t =actor[iactor].t_data[0]; | int32_t *g_t =actor[iactor].t_data[0]; | ||
spritetype *g_sp = &sprite[iActor]; | spritetype *g_sp = &sprite[iActor]; | ||
int32_t g_flags = 0; | int32_t g_flags = 0; | ||
*/ | */ | ||
[http://www.ifocserv.net/ftp/project/lotag.txt WIP lotag reference] | |||
premap.c / prelevel( | |||
for (i=0; i<numsectors; i++) | |||
{ | |||
sector[i].extra = 256; | |||
switch (sector[i].lotag) | |||
{ | |||
case ST_20_CEILING_DOOR: | |||
case ST_22_SPLITTING_DOOR: | |||
if (sector[i].floorz > sector[i].ceilingz) | |||
sector[i].lotag |= 32768; | |||
continue; | |||
} | |||
if (sector[i].ceilingstat &1) // parallax sky | |||
{ | |||
if (waloff[sector[i].ceilingpicnum] == 0) | |||
{ | |||
if (sector[i].ceilingpicnum == LA) // 89, Los Angeles city sky, it's actually 5 different pieces | |||
for (j = 0; j < 5; j++) | |||
tloadtile(sector[i].ceilingpicnum + j, 0); // load all 5 parts | |||
} | |||
if (sector[i].ceilingpicnum == CLOUDYSKIES && g_numClouds < 127) | |||
clouds[g_numClouds++] = i; | |||
if (g_player[0].ps->one_parallax_sectnum == -1) // treat the first parallax sky sector we encounter as one_parallax_sectnum | |||
g_player[0].ps->one_parallax_sectnum = i; | |||
} | |||
one_parallax_sectnum should have first parallax sector's # |
Latest revision as of 12:10, 25 January 2015
Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.Your biography must be at least 50 words long.
// Defines the motion characteristics of an actor enum amoveflags_t {
face_player = 1, geth = 2, getv = 4, random_angle = 8, face_player_slow = 16, spin = 32, face_player_smart = 64, fleeenemy = 128, jumptoplayer = 257, seekplayer = 512, furthestdir = 1024, dodgebullet = 4096
};
T2 = T5 = 0; // AC_MOVE_ID, AC_ACTION_ID
vm.g_t[0]: Actor's count
vm.g_t[1] ID of the actor's current move
vm.g_t[2] Action count
vm.g_t[3] Current frame offset
vm.g_t[4] Actor action
vm.g_t[5] the ID of the actor's current ai
http://wiki.eduke32.com/wiki/Move
faceplayer actor faces the player.
geth use horizontal velocity.
getv use vertical velocity.
randomangle actor will face random direction.
faceplayerslow same as faceplayer, but done gradually.
spin spin in a clockwise circle.
faceplayersmart same as faceplayer, but with a slight "lead" on position.
fleeenemy actor faces away from the player.
jumptoplayer actor will move vertically and then fall as if jumping.
seekplayer actor will try to find the best path to the nearest player.
furthestdir actor faces the furthest distance from the closest player.
dodgebullet actor attempts to avoid all shots directed at him. The actor will not avoid GROWSPARK.
A_Execute /* int32_t g_i = iActor (actor's sprite index),
g_p = iPlayer,
g_x =lDist;
int32_t *g_t =actor[iactor].t_data[0];
spritetype *g_sp = &sprite[iActor];
int32_t g_flags = 0;
*/
premap.c / prelevel(
for (i=0; i<numsectors; i++) { sector[i].extra = 256;
switch (sector[i].lotag) { case ST_20_CEILING_DOOR: case ST_22_SPLITTING_DOOR: if (sector[i].floorz > sector[i].ceilingz) sector[i].lotag |= 32768; continue; }
if (sector[i].ceilingstat &1) // parallax sky { if (waloff[sector[i].ceilingpicnum] == 0) { if (sector[i].ceilingpicnum == LA) // 89, Los Angeles city sky, it's actually 5 different pieces for (j = 0; j < 5; j++) tloadtile(sector[i].ceilingpicnum + j, 0); // load all 5 parts }
if (sector[i].ceilingpicnum == CLOUDYSKIES && g_numClouds < 127) clouds[g_numClouds++] = i;
if (g_player[0].ps->one_parallax_sectnum == -1) // treat the first parallax sky sector we encounter as one_parallax_sectnum g_player[0].ps->one_parallax_sectnum = i; }
one_parallax_sectnum should have first parallax sector's #