| 1 |
// |
| 2 |
// Copyright(C) 2021 by Ryan Krafnick |
| 3 |
// |
| 4 |
// This program is free software; you can redistribute it and/or |
| 5 |
// modify it under the terms of the GNU General Public License |
| 6 |
// as published by the Free Software Foundation; either version 2 |
| 7 |
// of the License, or (at your option) any later version. |
| 8 |
// |
| 9 |
// This program is distributed in the hope that it will be useful, |
| 10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
// GNU General Public License for more details. |
| 13 |
// |
| 14 |
// DESCRIPTION: |
| 15 |
// DSDA Map Format |
| 16 |
// |
| 17 |
|
| 18 |
#ifndef __DSDA_MAP_FORMAT__ |
| 19 |
#define __DSDA_MAP_FORMAT__ |
| 20 |
|
| 21 |
#include "doomtype.h" |
| 22 |
#include "r_defs.h" |
| 23 |
#include "p_maputl.h" |
| 24 |
#include "p_spec.h" |
| 25 |
|
| 26 |
// visibility flags - hide things that don't match |
| 27 |
#define VF_DOOM 0x01 |
| 28 |
#define VF_HERETIC 0x02 |
| 29 |
#define VF_HEXEN 0x04 |
| 30 |
#define VF_ZDOOM 0x08 |
| 31 |
|
| 32 |
typedef struct { |
| 33 |
dboolean zdoom; |
| 34 |
dboolean hexen; |
| 35 |
dboolean polyobjs; |
| 36 |
dboolean acs; |
| 37 |
dboolean thing_id; |
| 38 |
dboolean sndseq; |
| 39 |
dboolean animdefs; |
| 40 |
dboolean doublesky; |
| 41 |
dboolean map99; |
| 42 |
short generalized_mask; |
| 43 |
line_activation_t switch_activation; |
| 44 |
void (*init_sector_special)(sector_t*, int); |
| 45 |
void (*player_in_special_sector)(player_t*, sector_t*); |
| 46 |
dboolean (*mobj_in_special_sector)(mobj_t*); |
| 47 |
void (*spawn_scroller)(line_t*, int); |
| 48 |
void (*spawn_friction)(line_t*); |
| 49 |
void (*spawn_pusher)(line_t*); |
| 50 |
void (*spawn_extra)(line_t*, int); |
| 51 |
void (*cross_special_line)(line_t *, int, mobj_t *, dboolean); |
| 52 |
void (*shoot_special_line)(mobj_t *, line_t *); |
| 53 |
dboolean (*test_activate_line)(line_t *, mobj_t *, int, line_activation_t); |
| 54 |
dboolean (*execute_line_special)(int, int *, line_t *, int, mobj_t *); |
| 55 |
void (*post_process_line_special)(line_t *); |
| 56 |
void (*post_process_sidedef_special)(side_t *, const mapsidedef_t *, sector_t *, int); |
| 57 |
void (*animate_surfaces)(void); |
| 58 |
void (*check_impact)(mobj_t *); |
| 59 |
void (*translate_line_flags)(unsigned int *, line_activation_t *); |
| 60 |
void (*apply_sector_movement_special)(mobj_t *, int); |
| 61 |
void (*t_vertical_door)(vldoor_t *); |
| 62 |
void (*t_move_floor)(floormove_t *); |
| 63 |
void (*t_move_ceiling)(ceiling_t *); |
| 64 |
void (*t_build_pillar)(pillar_t *); |
| 65 |
void (*t_plat_raise)(plat_t *); |
| 66 |
int (*ev_teleport)(short, int, line_t *, int, mobj_t *, int); |
| 67 |
void (*player_thrust)(player_t* player, angle_t angle, fixed_t move); |
| 68 |
void (*build_mobj_thing_id_list)(void); |
| 69 |
void (*add_mobj_thing_id)(mobj_t *, short); |
| 70 |
void (*remove_mobj_thing_id)(mobj_t *); |
| 71 |
void (*iterate_spechit)(mobj_t *, fixed_t, fixed_t); |
| 72 |
int (*point_on_side)(fixed_t, fixed_t, const node_t *); |
| 73 |
int (*point_on_seg_side)(fixed_t, fixed_t, const seg_t *); |
| 74 |
int (*point_on_line_side)(fixed_t, fixed_t, const line_t *); |
| 75 |
int (*point_on_divline_side)(fixed_t, fixed_t, const divline_t *); |
| 76 |
size_t mapthing_size; |
| 77 |
size_t maplinedef_size; |
| 78 |
int mt_push; |
| 79 |
int mt_pull; |
| 80 |
int dn_polyanchor; |
| 81 |
int dn_polyspawn_start; |
| 82 |
int dn_polyspawn_hurt; |
| 83 |
int dn_polyspawn_end; |
| 84 |
int visibility; |
| 85 |
} map_format_t; |
| 86 |
|
| 87 |
extern map_format_t map_format; |
| 88 |
|
| 89 |
int dsda_DoorType(int index); |
| 90 |
dboolean dsda_IsExitLine(int index); |
| 91 |
dboolean dsda_IsSecretExitLine(int index); |
| 92 |
dboolean dsda_IsDeathExitLine(int index); |
| 93 |
dboolean dsda_IsDeathSecretExitLine(int index); |
| 94 |
dboolean dsda_IsTeleportLine(int index); |
| 95 |
void dsda_ApplyZDoomMapFormat(void); |
| 96 |
void dsda_ApplyDefaultMapFormat(void); |
| 97 |
|
| 98 |
#endif |