module LibDoom
Defined in:
doo-cr.crdoo-cr/doo-cr.cr
doo-cr/variables.cr
Constant Summary
-
ANG180 =
2147483648_i64 -
ANG270 =
3221225472_i64 -
ANG45 =
536870912 -
Binary Angle Measument, BAM.
-
ANG90 =
1073741824 -
BOTTOM =
4 -
DBITS =
(FRACBITS - SLOPEBITS) -
FINEANGLES =
8192 -
FINEMASK =
(FINEANGLES - 1) -
FINESINE_SIZE =
(5 * FINEANGLES) // 4 -
FINETANGENT_SIZE =
FINEANGLES // 2 -
FRACBITS =
16 -
FRACUNIT =
(1 << FRACBITS) -
LASTMESSAGE_SIZE =
CDoom::HU_MAXLINELENGTH + 1 -
LEFT =
1 -
MENU_SCROLL_DEADZONE =
80 -
MIDI_BANK =
16 -
TODO make a setting
-
MIDI_BUFFER_SIZE =
2048 -
Midi info
-
MIDI_SAMPLE_RATE =
44100 -
MIDI_TICK_TIME =
1.0 / 140.0 -
NCMD_CHECKSUM =
67108863 -
NCMD_CONNECT =
134217728 -
NCMD_DISTRIBUTE =
67108864 -
NCMD_EXIT =
2147483648_i64 -
NCMD_KILL =
268435456 -
NCMD_RETRANSMIT =
1073741824 -
NCMD_SETUP =
536870912 -
NEEDS_BYTE_SWAP =
IO::ByteFormat::SystemEndian != IO::ByteFormat::NetworkEndian -
NULL_PROC =
Proc(Nil).new(Pointer(Void).null, Pointer(Void).null) -
NULL_PROCP1 =
Proc(Int32, Nil).new(Pointer(Void).null, Pointer(Void).null) -
PI =
3.141592657 -
PL_DRONE =
128 -
RESENDCOUNT =
10 -
RIGHT =
2 -
SLOPEBITS =
11 -
SLOPERANGE =
2048 -
SRES_X =
320 -
The resolutions of the render target the screen puts on the screen
-
SRES_Y =
240 -
TANTOANGLE_SIZE =
SLOPERANGE + 1 -
TOP =
8 -
VERSION =
10 -
VERSION_STR =
"1.0"
Class Method Summary
- .a_baby_metal(mo : Pointer(CDoom::Mobj))
- .a_bfg_sound(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
-
.a_bfg_spray(mo : Pointer(CDoom::Mobj))
Spawn a BFG explosion on every monster in view
-
.a_boss_death(mo : Pointer(CDoom::Mobj))
Possibly trigger special effects if on first boss level
- .a_brain_awake(mo : Pointer(CDoom::Mobj))
- .a_brain_die(mo : Pointer(CDoom::Mobj))
- .a_brain_explode(mo : Pointer(CDoom::Mobj))
- .a_brain_pain(mo : Pointer(CDoom::Mobj))
- .a_brain_scream(mo : Pointer(CDoom::Mobj))
- .a_brain_spit(mo : Pointer(CDoom::Mobj))
- .a_bruis_attack(actor : Pointer(CDoom::Mobj))
- .a_bspi_attack(actor : Pointer(CDoom::Mobj))
-
.a_chase(actor : Pointer(CDoom::Mobj))
Actor has a melee attack, so it tries to close as fast as possible
- .a_check_reload(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_close_shotgun2(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_cpos_attack(actor : Pointer(CDoom::Mobj))
- .a_cpos_refire(actor : Pointer(CDoom::Mobj))
- .a_cyber_attack(actor : Pointer(CDoom::Mobj))
- .a_explode(thingy : Pointer(CDoom::Mobj))
- .a_face_target(actor : Pointer(CDoom::Mobj))
- .a_fall(actor : Pointer(CDoom::Mobj))
- .a_fat_attack1(actor : Pointer(CDoom::Mobj))
- .a_fat_attack2(actor : Pointer(CDoom::Mobj))
- .a_fat_attack3(actor : Pointer(CDoom::Mobj))
-
.a_fat_raise(actor : Pointer(CDoom::Mobj))
firing three missiles (bruisers) in three different directions? Doesn't look like it.
- .a_fire(actor : Pointer(CDoom::Mobj))
- .a_fire_bfg(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_fire_cgun(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_fire_crackle(actor : Pointer(CDoom::Mobj))
- .a_fire_missile(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_fire_pistol(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_fire_plasma(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_fire_shotgun(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_fire_shotgun2(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_gun_flash(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_head_attack(actor : Pointer(CDoom::Mobj))
- .a_hoof(mo : Pointer(CDoom::Mobj))
- .a_keen_die(mo : Pointer(CDoom::Mobj))
- .a_light0(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_light1(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_light2(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_load_shotgun2(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
-
.a_look(actor : Pointer(CDoom::Mobj))
Stay in state until a player is sighted.
-
.a_lower(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
Lowers current weapon, and changes weapon at bottom.
- .a_metal(mo : Pointer(CDoom::Mobj))
- .a_open_shotgun2(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_pain(actor : Pointer(CDoom::Mobj))
- .a_pain_attack(actor : Pointer(CDoom::Mobj))
- .a_pain_die(actor : Pointer(CDoom::Mobj))
- .a_pain_shoot_skull(actor : Pointer(CDoom::Mobj), angle : CDoom::Angle)
- .a_player_scream(mo : Pointer(CDoom::Mobj))
- .a_pos_attack(actor : Pointer(CDoom::Mobj))
- .a_punch(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_raise(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
-
.a_refire(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
The player can re-fire the weapon without lowering it entirely.
- .a_sarg_attack(actor : Pointer(CDoom::Mobj))
- .a_saw(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
- .a_scream(actor : Pointer(CDoom::Mobj))
- .a_skel_fist(actor : Pointer(CDoom::Mobj))
- .a_skel_missile(actor : Pointer(CDoom::Mobj))
- .a_skel_whoosh(actor : Pointer(CDoom::Mobj))
-
.a_skull_attack(actor : Pointer(CDoom::Mobj))
Fly at the player like a missile
- .a_spawn_fly(mo : Pointer(CDoom::Mobj))
-
.a_spawn_sound(mo : Pointer(CDoom::Mobj))
travelling cube sound
- .a_spid_refire(actor : Pointer(CDoom::Mobj))
- .a_spos_attack(actor : Pointer(CDoom::Mobj))
-
.a_start_fire(actor : Pointer(CDoom::Mobj))
Keep fire in front of player unless out of sight
- .a_tracer(actor : Pointer(CDoom::Mobj))
- .a_troop_attack(actor : Pointer(CDoom::Mobj))
- .a_vile_attack(actor : Pointer(CDoom::Mobj))
-
.a_vile_chase(actor : Pointer(CDoom::Mobj))
Check for ressurecting a body
- .a_vile_start(actor : Pointer(CDoom::Mobj))
-
.a_vile_target(actor : Pointer(CDoom::Mobj))
Spawn the hellfire
-
.a_weapon_ready(player : Pointer(CDoom::Player), psp : Pointer(CDoom::Pspdef))
The player can fire the weapon or change to another weapon at this time.
- .a_xscream(actor : Pointer(CDoom::Mobj))
-
.addsfx(sfxid : Int32, volume : Int32, step : Int32, seperation : Int32) : Int32
This function adds a sound to the list of currently active sounds, which is maintained as a given number (eight, usually) of internal channels.
- .am_activate_new_scale
-
.am_add_mark
adds a marker at the current location
- .am_change_window_loc
-
.am_change_window_scale
Zooming
-
.am_clear_fb(color : Int32)
Clear automap frame buffer.
- .am_clear_marks
-
.am_clip_mline(ml : Pointer(CDoom::Mline), fl : Pointer(CDoom::Fline)) : CDoom::DoomBool
Automap clipping of lines.
- .am_do_follow_player
- .am_draw_crosshair(color : Int32)
-
.am_draw_fline(fl : Pointer(CDoom::Fline), color : Int32)
Classic Bresenham w/ whatever optimizations needed for speed
-
.am_draw_grid(color : Int32)
Draws flat (floor/ceiling tile) aligned grid lines.
- .am_draw_line_character(lineguy : Pointer(CDoom::Mline), lineguylines : Int32, scale : CDoom::Fixed, angle : CDoom::Angle, color : Int32, x : CDoom::Fixed, y : CDoom::Fixed)
- .am_draw_marks
-
.am_draw_mline(ml : Pointer(CDoom::Mline), color : Int32)
Clip lines, draw visible part sof lines.
- .am_draw_players
- .am_draw_things(colors : Int32, colorrange : Int32)
-
.am_draw_walls
Determines visible lines, draws them.
- .am_drawer
-
.am_find_min_max_boundaries
Determines bounding box of all vertices, sets global variables controlling zoom range.
- .am_init_variables
-
.am_level_init
should be called at the start of every level right now, i figure it out myself
- .am_load_pics
-
.am_max_out_window_scale
set the window scale to the minimum size
-
.am_min_out_window_scale
set the window scale to the maximum size
-
.am_responder(ev : Pointer(CDoom::Event)) : CDoom::DoomBool
Handle events (user inputs) in automap mode
- .am_restore_scale_and_loc
-
.am_rotate(x : Pointer(CDoom::Fixed), y : Pointer(CDoom::Fixed), a : CDoom::Angle)
Rotation in 2D.
- .am_save_scale_and_loc
- .am_start
- .am_stop
-
.am_ticker
Updates on Game Tick
- .am_unload_pics
- .am_update_light_lev
- .bind_to_local_port(socket : UDPSocket, port : Int32)
-
.check_abort
check_abort
- .cht_check_cheat(cht : Pointer(CDoom::Cheatseq), key : LibC::Char) : LibC::Int
- .cht_get_param(cht : Pointer(CDoom::Cheatseq), buffer : Pointer(LibC::Char))
-
.confirm_version
Confirms a WAD files type based off of data in the WAD
- .d_add_file(file : Pointer(UInt8))
-
.d_advance_demo
d_advance_demo Called after each demo or intro demosequence finishes
-
.d_arbitrate_net_start
d_arbitrate_net_start
-
.d_check_net_game
d_check_net_game Works out player numbers among the net participants
-
.d_display
d_display draw current display, possibly wiping it from the previous
-
.d_do_advance_demo
This cycles through the demo sequences.
- .d_doom_loop
-
.d_doom_main
d_doom_main
- .d_page_drawer
-
.d_page_ticker
d_page_ticker Handles timing for warped projection
-
.d_post_event(ev : Pointer(CDoom::Event))
d_post_event Called by the I/O functions when input is detected
-
.d_process_events
d_process_events Send all the events of the given timestamp down the responder chain
-
.d_quit_net_game
d_quit_net_game Called before quitting to leave a net game without hanging the other players
- .d_start_title
- .doom_atoi(str : Pointer(UInt8)) : Int32
- .doom_atox(str : Pointer(UInt8)) : Int32
- .doom_button_down(button : CDoom::DoomButton)
- .doom_button_up(button : CDoom::DoomButton)
- .doom_close_impl(handle : Pointer(Void))
- .doom_concat(dst : Pointer(UInt8), src : Pointer(UInt8)) : Pointer(UInt8)
- .doom_ctoa(c : UInt8) : Pointer(UInt8)
- .doom_draw
- .doom_eof_impl(handle : Pointer(Void)) : Int32
- .doom_exit_impl(code : Int32)
- .doom_fprint(handle : Pointer(Void), str : Pointer(UInt8)) : Int32
- .doom_get_sound_buffer : Pointer(Int16)
- .doom_getenv_impl(var : Pointer(UInt8)) : Pointer(UInt8)
- .doom_gettime_impl(sec : Pointer(Int32), usec : Pointer(Int32))
- .doom_htonl(x : UInt32) : UInt32
- .doom_htons(x : Int16) : Int16
- .doom_init(argc : Int32, argv : Pointer(Pointer(UInt8)), flags : Int32)
- .doom_itoa(k : Int32, radix : Int32) : Pointer(UInt8)
- .doom_key_down(key : CDoom::DoomKey)
- .doom_key_up(key : CDoom::DoomKey)
- .doom_memcpy(destination : Pointer(Void), source : Pointer(Void), num : Int32) : Pointer(Void)
- .doom_memset(ptr : Pointer(Void), value : Int32, num : Int32)
- .doom_mouse_move(delta_x : Int32, delta_y : Int32)
- .doom_open_impl(filename : Pointer(UInt8), mode : Pointer(UInt8)) : Pointer(Void)
- .doom_ptoa(p : Pointer(Void)) : Pointer(UInt8)
- .doom_read_impl(handle : Pointer(Void), buf : Pointer(Void), count : Int32) : Int32
- .doom_seek_impl(handle : Pointer(Void), offset : Int32, origin : CDoom::DoomSeek) : Int32
- .doom_set_exit(exit_fn : CDoom::DoomExitFn)
- .doom_set_file_io(open_fn : CDoom::DoomOpenFn, close_fn : CDoom::DoomCloseFn, read_fn : CDoom::DoomReadFn, write_fn : CDoom::DoomWriteFn, seek_fn : CDoom::DoomSeekFn, tell_fn : CDoom::DoomTellFn, eof_fn : CDoom::DoomEofFn)
- .doom_set_getenv(getenv_fn : CDoom::DoomGetenvFn)
- .doom_set_gettime(gettime_fn : CDoom::DoomGettimeFn)
- .doom_strcasecmp(str1 : Pointer(UInt8), str2 : Pointer(UInt8)) : Int32
- .doom_strcmp(str1 : Pointer(UInt8), str2 : Pointer(UInt8)) : Int32
- .doom_strcpy(dst : Pointer(UInt8), src : Pointer(UInt8)) : Pointer(UInt8)
- .doom_strlen(str : Pointer(UInt8)) : Int32
- .doom_strncasecmp(str1 : Pointer(UInt8), str2 : Pointer(UInt8), n : Int32) : Int32
- .doom_strncmp(str1 : Pointer(UInt8), str2 : Pointer(UInt8), n : Int32) : Int32
- .doom_strncpy(dst : Pointer(UInt8), src : Pointer(UInt8), num : Int32) : Pointer(UInt8)
- .doom_strupr(s : Pointer(LibC::Char))
- .doom_tell_impl(handle : Pointer(Void)) : Int32
- .doom_tick_midi : UInt64
- .doom_toupper(c : Int32) : Int32
- .doom_write_impl(handle : Pointer(Void), buf : Pointer(Void), count : Int32) : Int32
-
.ev_build_stairs(line : Pointer(CDoom::Line), type : CDoom::Stairenum) : LibC::Int
BUILD A STAIRCASE!
-
.ev_ceiling_crush_stop(line : Pointer(CDoom::Line)) : LibC::Int
Stop a ceiling from crushing!
-
.ev_do_ceiling(line : Pointer(CDoom::Line), type : CDoom::Ceilingenum) : LibC::Int
Move a ceiling up/down and all around!
-
.ev_do_donut(line : Pointer(CDoom::Line)) : LibC::Int
Special Stuff that can not be categorized
-
.ev_do_door(line : Pointer(CDoom::Line), type : CDoom::Vldoorenum) : LibC::Int
open a door manually, no tag value
- .ev_do_floor(line : Pointer(CDoom::Line), floortype : CDoom::Floorenum) : LibC::Int
- .ev_do_locked_door(line : Pointer(CDoom::Line), type : CDoom::Vldoorenum, thing : Pointer(CDoom::Mobj)) : LibC::Int
-
.ev_do_plat(line : Pointer(CDoom::Line), type : CDoom::Plattype, amount : LibC::Int) : LibC::Int
Do Platforms "amount" is only used for SOME platforms.
- .ev_light_turn_on(line : Pointer(CDoom::Line), bright : LibC::Int)
-
.ev_start_light_strobing(line : Pointer(CDoom::Line))
Start strobing lights (usually from a trigger)
- .ev_stop_plat(line : Pointer(CDoom::Line))
- .ev_teleport(line : Pointer(CDoom::Line), side : LibC::Int, thing : Pointer(CDoom::Mobj)) : LibC::Int
-
.ev_turn_tag_lights_off(line : Pointer(CDoom::Line))
TURN LINE'S TAG LIGHTS OFF
- .ev_vertical_door(line : Pointer(CDoom::Line), thing : Pointer(CDoom::Mobj))
- .expand_tics(low : Int32) : Int32
- .extract_file_base(path : Pointer(LibC::Char), dest : Pointer(LibC::Char))
-
.f_bunny_scroll
f_bunny_scroll
-
.f_cast_drawer
f_cast_drawer
- .f_cast_print(text : Pointer(UInt8))
- .f_cast_responder(ev : Pointer(CDoom::Event)) : CDoom::DoomBool
-
.f_cast_ticker
f_cast_ticker
-
.f_draw_patch_col(x : Int32, patch : Pointer(CDoom::Patch), col : Int32)
f_draw_patch_col
- .f_drawer
- .f_responder(event : Pointer(CDoom::Event)) : CDoom::DoomBool
-
.f_start_cast
Final DOOM 2 animation Casting by id Software.
-
.f_start_finale
f_start_finale
-
.f_text_write
f_text_write
-
.f_ticker
f_ticker
-
.find_response_file
Find a Response File
- .fixed_div(a : CDoom::Fixed, b : CDoom::Fixed) : CDoom::Fixed
- .fixed_div2(a : CDoom::Fixed, b : CDoom::Fixed) : CDoom::Fixed
- .fixed_mul(a : CDoom::Fixed, b : CDoom::Fixed) : CDoom::Fixed
- .foreign_translation(ch : UInt8) : UInt8
- .g_begin_recording
-
.g_build_ticcmd(cmd : Pointer(CDoom::Ticcmd))
g_build_ticcmd Builds a ticcmd from all of the available inputs or reads it from the demo buffer.
-
.g_check_demo_status : CDoom::DoomBool
=================== = = g_check_demo_status = = Called after a death or level completion to allow demos to be cleaned up = Returns true if a new demo loop action will take place ===================
- .g_check_spot(playernum : Int32, mthing : Pointer(CDoom::Mapthing)) : CDoom::DoomBool
- .g_deathmatch_spawn_player(playernum : Int32)
-
.g_defered_init_new(skill : CDoom::Skill, episode : Int32, map : Int32)
g_init_new Can be called by the startup code or the menu task, consoleplayer, displayplayer, playeringame[] should be set.
- .g_defered_play_demo(name : Pointer(UInt8))
- .g_despawn_player(playernum : Int32)
- .g_do_completed
- .g_do_load_game
-
.g_do_load_level
g_do_load_level
- .g_do_new_game
- .g_do_play_demo
-
.g_do_reborn(playernum : Int32)
g_do_reborn
- .g_do_save_game
-
.g_do_world_done
g_do_world_done
- .g_exit_level
- .g_init_new(skill : CDoom::Skill, episode : Int32, map : Int32)
-
.g_init_player(player : Int32)
g_init_player Called at the start.
-
.g_load_game(name : Pointer(UInt8))
g_load_game Can be called by the startup code or the menu task.
-
.g_player_finish_level(player : Int32)
g_player_finish_level Can when a player completes a level.
-
.g_player_reborn(player : Int32)
g_player_reborn Called after a player dies almost everything is cleared and initialized
-
.g_read_demo_ticcmd(cmd : Pointer(CDoom::Ticcmd))
DEMO RECORDING
-
.g_record_demo(name : Pointer(UInt8))
g_record_demo
- .g_responder(ev : Pointer(CDoom::Event)) : CDoom::DoomBool
-
.g_save_game(slot : Int32, description : Pointer(UInt8))
g_save_game Called by the menu task.
- .g_screenshot
-
.g_secret_exit_level
Here's for the german edition.
-
.g_ticker
g_ticker Make ticcmds for the players.
-
.g_time_demo(name : Pointer(UInt8))
g_time_demo
-
.g_world_done
g_world_done
- .g_write_demo_ticcmd(cmd : Pointer(CDoom::Ticcmd))
- .get_local_address : Int32
-
.get_next_sector(line : Pointer(CDoom::Line), sec : Pointer(CDoom::Sector)) : Pointer(CDoom::Sector)
Return sector_t * of sector next to current.
-
.get_packets
get_packets
-
.get_sector(current_sector : LibC::Int, line : LibC::Int, side : LibC::Int) : Pointer(CDoom::Sector)
Will return a sector_t* given the number of the current sector, the line number and the side (0/1) that you want.
-
.get_side(current_sector : LibC::Int, line : LibC::Int, side : LibC::Int) : Pointer(CDoom::Side)
Will return a side_t* given the number of the current sector, the line number, and the side (0/1) that you want.
-
.getsfx(sfxname : Pointer(UInt8), len : Pointer(Int32)) : Pointer(Void)
This function loads the sound data from the WAD lump, for single sound.
-
.h_get_packet : CDoom::DoomBool
h_get_packet Returns false if no packet is waiting
- .h_send_packet(node : Int32, flags : Int32)
- .hu_dequeue_chat_char : UInt8
- .hu_drawer
- .hu_erase
- .hu_init
- .hu_queue_chat_char(c : UInt8)
- .hu_responder(ev : Pointer(CDoom::Event)) : CDoom::DoomBool
- .hu_start
- .hu_stop
- .hu_ticker
- .hulib_add_char_to_text_line(t : Pointer(CDoom::HU_Textline), ch : UInt8) : CDoom::DoomBool
- .hulib_add_line_to_s_text(s : Pointer(CDoom::HU_Stext))
- .hulib_add_message_to_s_text(s : Pointer(CDoom::HU_Stext), prefix : Pointer(UInt8), msg : Pointer(UInt8))
- .hulib_add_prefix_to_i_text(it : Pointer(CDoom::HU_Itext), str : Pointer(UInt8))
- .hulib_clear_text_line(t : Pointer(CDoom::HU_Textline))
-
.hulib_del_char_from_i_text(it : Pointer(CDoom::HU_Itext))
The following deletion routines adhere to the left margin restriction
- .hulib_del_char_from_text_line(t : Pointer(CDoom::HU_Textline)) : CDoom::DoomBool
- .hulib_draw_i_text(it : Pointer(CDoom::HU_Itext))
- .hulib_draw_s_text(s : Pointer(CDoom::HU_Stext))
- .hulib_draw_text_line(l : Pointer(CDoom::HU_Textline), drawcursor : CDoom::DoomBool)
- .hulib_erase_i_text(it : Pointer(CDoom::HU_Itext))
- .hulib_erase_line_from_i_text(it : Pointer(CDoom::HU_Itext))
- .hulib_erase_s_text(s : Pointer(CDoom::HU_Stext))
-
.hulib_erase_text_line(l : Pointer(CDoom::HU_Textline))
sorta called by hu_erase and just better darn get things straight
- .hulib_init_i_text(it : Pointer(CDoom::HU_Itext), x : Int32, y : Int32, font : Pointer(Pointer(CDoom::Patch)), startchar : Int32, on : Pointer(CDoom::DoomBool))
- .hulib_init_s_text(s : Pointer(CDoom::HU_Stext), x : Int32, y : Int32, h : Int32, font : Pointer(Pointer(CDoom::Patch)), startchar : Int32, on : Pointer(CDoom::DoomBool))
- .hulib_init_text_line(t : Pointer(CDoom::HU_Textline), x : Int32, y : Int32, f : Pointer(Pointer(CDoom::Patch)), sc : Int32)
-
.hulib_key_in_i_text(it : Pointer(CDoom::HU_Itext), ch : UInt8) : CDoom::DoomBool
wrapper function for handling general keyed input.
-
.hulib_reset_i_text(it : Pointer(CDoom::HU_Itext))
Resets left margin as well
- .i_alloc_low(length : LibC::Int) : Pointer(CDoom::Byte)
- .i_base_ticcmd : Pointer(CDoom::Ticcmd)
-
.i_error(error : String)
i_error
- .i_finish_update
- .i_get_heap_size : LibC::Int
- .i_get_sfx_lump_num(sfx : Pointer(CDoom::Sfxinfo)) : Int32
-
.i_get_time : LibC::Int
i_get_time returns time in 1/70th second tics
-
.i_init
i_init
- .i_init_graphics
-
.i_init_music
MUSIC API.
- .i_init_network
- .i_init_sound
- .i_net_cmd
- .i_pause_song(handle : Int32)
- .i_play_song(handle : Int32, looping : Int32)
-
.i_qry_song_playing(handle : LibC::Int) : LibC::Int
Is the song playing?
-
.i_quit
i_quit
- .i_read_screen(scr : Pointer(CDoom::Byte))
- .i_register_song(data : Pointer(Void)) : LibC::Int
- .i_resume_song(handle : Int32)
- .i_set_channels
-
.i_set_music_volume(volume : Int32)
MUSIC API - dummy.
- .i_set_palette(palette : Pointer(CDoom::Byte))
- .i_set_sfx_volume(volume : Int32)
- .i_shutdown_graphics
- .i_shutdown_music
- .i_shutdown_sound
- .i_sound_is_playing(handle : Int32) : Int32
- .i_start_frame
-
.i_start_sound(id : Int32, vol : Int32, sep : Int32, pitch : Int32, priority : Int32) : Int32
Starting a sound means adding it to the current list of active sounds in the internal channels.
- .i_start_tic
- .i_stop_song(handle : LibC::Int)
- .i_stop_sound(handle : Int32)
- .i_tactile(on : LibC::Int, off : LibC::Int, total : LibC::Int)
-
.i_tick_song : UInt64
Is the song playing?
- .i_unregister_song(handle : LibC::Int)
- .i_update_no_blit
-
.i_update_sound
This function loops all active (internal) sound channels, retrieves a given number of samples from the raw sound data, modifies it according to the current (internal) channel parameters, mixes the per channel samples into the global mixbuffer, clamping it to the allowed range, and sets up everything for transferring the contents of the mixbuffer to the (two) hardware channels (left and right, that is).
- .i_update_sound_params(handle : LibC::Int, vol : LibC::Int, sep : LibC::Int, pitch : LibC::Int)
- .i_wait_vbl(count : LibC::Int)
- .i_zone_base(size : Pointer(LibC::Int)) : Pointer(CDoom::Byte)
-
.identify_version
identify_version Checks availability of IWAD files by name, to determine whether registered/commercial features should be executed (notably loading PWAD's).
- .keystates
- .m_add_to_box(box : Pointer(CDoom::Fixed), x : CDoom::Fixed, y : CDoom::Fixed)
-
.m_change_alwaysrun(choice : Int32)
Toggle always-run on/off
-
.m_change_crosshair(choice : Int32)
Toggle crosshair on/off
-
.m_change_messages(choice : Int32)
Toggle messages on/off
- .m_change_sensitivity(choice : Int32)
-
.m_check_parm(check : Pointer(UInt8)) : Int32
m_check_parm Checks for the given parameter in the program's command line arguments.
- .m_choose_skill(choice : Int32)
- .m_clear_box(box : Pointer(CDoom::Fixed))
- .m_clear_menus
- .m_clear_random
-
.m_do_save(slot : Int32)
m_responder calls this when user is finished
- .m_draw_edit_controls
- .m_draw_empty_cell(menu : Pointer(CDoom::Menu), item : Int32)
-
.m_draw_episode
m_episode
- .m_draw_key(key : Pointer(Int32)) : String
-
.m_draw_load
m_draw_load & Cie
-
.m_draw_mainmenu
m_draw_mainmenu
- .m_draw_moreoptions
-
.m_draw_newgame
m_newgame
-
.m_draw_options
m_options
-
.m_draw_readthis1
Read This Menus Had a "quick hack to fix romero bug"
-
.m_draw_readthis2
Read This Menus - optional second page.
-
.m_draw_save
m_save_game & Cie.
-
.m_draw_save_load_border(x : Int32, y : Int32)
Draw border for the savegame description
- .m_draw_selcell(menu : Pointer(CDoom::Menu), item : Int32)
-
.m_draw_sound
Change Sfx & Music volumes
- .m_draw_text(x : Int32, y : Int32, direct : CDoom::DoomBool, string : Pointer(LibC::Char)) : LibC::Int
-
.m_draw_thermo(x : LibC::Int, y : LibC::Int, therm_width : LibC::Int, therm_dot : LibC::Int)
Menu Methods
-
.m_drawer
m_drawer Called after the view has been rendered, but before it has been blitted.
- .m_edit_backward(choice : Int32)
- .m_edit_controls(choice : Int32)
- .m_edit_forward(choice : Int32)
- .m_edit_shoot(choice : Int32)
- .m_edit_sleft(choice : Int32)
- .m_edit_sprint(choice : Int32)
- .m_edit_sright(choice : Int32)
- .m_edit_tleft(choice : Int32)
- .m_edit_tright(choice : Int32)
- .m_edit_use(choice : Int32)
- .m_endgame(choice : Int32)
-
.m_endgame_response(ch : Int32)
m_endgame
- .m_episode(choice : Int32)
- .m_finish_readthis(choice : Int32)
- .m_init
- .m_load_defaults
-
.m_load_game(choice : Int32)
Selected from DOOM menu
-
.m_load_select(choice : Int32)
User wants to load this game
- .m_moreoptions(choice : Int32)
- .m_mouse_move(choice : Int32)
- .m_musicvol(choice : Int32)
- .m_new_game(choice : Int32)
- .m_options(choice : Int32)
- .m_quickload
-
.m_quickload_response(ch : Int32)
m_quickload
- .m_quicksave
-
.m_quicksave_response(ch : Int32)
m_quicksave
-
.m_quit_response(ch : Int32)
m_quitdoom
- .m_quitdoom(choice : Int32)
- .m_random : Int32
- .m_read_file(name : Pointer(LibC::Char), buffer : Pointer(Pointer(CDoom::Byte))) : LibC::Int
-
.m_read_save_strings
m_read_save_strings read the strings from the savegame files
-
.m_readthis(choice : Int32)
m_readthis
- .m_readthis2(choice : Int32)
-
.m_responder(ev : Pointer(CDoom::Event)) : CDoom::DoomBool
m_responder
- .m_save_defaults
-
.m_save_game(choice : Int32)
Selected from DOOM menu
-
.m_save_select(choice : Int32)
User wants to save.
- .m_screenshot
- .m_setup_next_menu(menudef : Pointer(CDoom::Menu))
- .m_sfxvol(choice : Int32)
- .m_size_display(choice : Int32)
- .m_sound(choice : Int32)
- .m_start_control_panel
- .m_start_message(string : Pointer(LibC::Char), routine : Proc(Int32, Nil), input : CDoom::DoomBool)
- .m_stop_message
-
.m_string_height(string : Pointer(UInt8)) : Int32
Find string height from hu_font chars
-
.m_string_width(string : Pointer(UInt8)) : Int32
Find string width from hu_font chars
- .m_ticker
- .m_toggle_amactivedraw(choice : Int32)
- .m_toggle_fullscreen(choice : Int32)
- .m_toggle_pitching(choice : Int32)
- .m_toggle_smoothpan(choice : Int32)
- .m_toggle_weaponfirecentered(choice : Int32)
- .m_verify_nightmare(ch : Int32)
- .m_write_file(name : Pointer(LibC::Char), source : Pointer(Void), length : LibC::Int) : CDoom::DoomBool
-
.m_write_text(x : Int32, y : Int32, string : Pointer(UInt8))
Write a string using the hu_font
-
.net_buffer_checksum : UInt32
Checksum
- .net_buffer_size : Int32
-
.net_update
net_update Builds ticcmds for console player, sends out a packet
- .p_activate_in_stasis(tag : LibC::Int)
-
.p_activate_in_stasis_ceiling(line : Pointer(CDoom::Line))
Restart a ceiling that's in-stasis
-
.p_add_active_ceiling(c : Pointer(CDoom::Ceiling))
Add an active ceiling
- .p_add_active_plat(plat : Pointer(CDoom::Plat))
-
.p_add_thinker(thinker : Pointer(CDoom::Thinker))
Adds a new thinker at the end of the list.
- .p_aim_line_attack(t1 : Pointer(CDoom::Mobj), angle : CDoom::Angle, distance : CDoom::Fixed) : CDoom::Fixed
-
.p_aprox_distance(dx : CDoom::Fixed, dy : CDoom::Fixed) : CDoom::Fixed
Gives an estimation of distance (not exact)
- .p_archive_players(file : File)
-
.p_archive_specials(file : File)
Things to handle:
- .p_archive_thinkers(file : File)
- .p_archive_world(file : File)
-
.p_block_lines_iterator(x : LibC::Int, y : LibC::Int, func : Proc(Pointer(CDoom::Line), CDoom::DoomBool)) : CDoom::DoomBool
The validcount flags are used to avoid checking lines that are marked in multiple mapblocks, so increment validcount before the first call to P_BlockLinesIterator, then make one or more calls to it.
- .p_block_things_iterator(x : LibC::Int, y : LibC::Int, func : Proc(Pointer(CDoom::Mobj), CDoom::DoomBool)) : CDoom::DoomBool
-
.p_box_on_line_side(tmbox : Pointer(CDoom::Fixed), ld : Pointer(CDoom::Line)) : LibC::Int
Considers the line to be infinite Returns side 0 or 1, -1 if box crosses the line.
-
.p_bring_up_weapon(player : Pointer(CDoom::Player))
Starts bringing the pending weapon up from the bottom of the screen.
-
.p_bullet_slope(mo : Pointer(CDoom::Mobj))
Sets a slope so a near miss is at aproximately the height of the intended target
-
.p_calc_height(player : Pointer(CDoom::Player))
Calculate the walking / running height adjustment
- .p_change_sector(sector : Pointer(CDoom::Sector), crunch : CDoom::DoomBool) : CDoom::DoomBool
-
.p_change_switch_texture(line : Pointer(CDoom::Line), use_again : LibC::Int)
Function that changes wall texture.
-
.p_check_ammo(player : Pointer(CDoom::Player)) : CDoom::DoomBool
Returns true if there is enough ammo to shoot.
- .p_check_melee_range(actor : Pointer(CDoom::Mobj)) : CDoom::DoomBool
- .p_check_missile_range(actor : Pointer(CDoom::Mobj)) : CDoom::DoomBool
-
.p_check_missile_spawn(th : Pointer(CDoom::Mobj))
Moves the missile forward a bit and possibly explodes it right there.
-
.p_check_position(thing : Pointer(CDoom::Mobj), x : CDoom::Fixed, y : CDoom::Fixed) : CDoom::DoomBool
This is purely informative, nothing is modified (except things picked up).
-
.p_check_sight(t1 : Pointer(CDoom::Mobj), t2 : Pointer(CDoom::Mobj)) : CDoom::DoomBool
Returns true if a straight line between t1 and t2 is unobstructed.
-
.p_cross_bsp_node(bspnum : LibC::Int) : CDoom::DoomBool
Returns true if strace crosses the given node successfully.
-
.p_cross_special_line(linenum : LibC::Int, side : LibC::Int, thing : Pointer(CDoom::Mobj))
Called every time a thing origin is about to cross a line with a non 0 special.
-
.p_cross_subsector(num : LibC::Int) : CDoom::DoomBool
Returns true if strace crosses the given subsector successfully.
-
.p_damage_mobj(target : Pointer(CDoom::Mobj), inflictor : Pointer(CDoom::Mobj), source : Pointer(CDoom::Mobj), damage : LibC::Int)
Damages both enemies and players "inflictor" is the thing that caused the damage creature or missile, can be 0 (slime, etc) "source" is the thing to target after taking damage creature or 0 Source and inflictor are the same for melee attacks.
- .p_death_think(player : Pointer(CDoom::Player))
-
.p_divline_side(x : CDoom::Fixed, y : CDoom::Fixed, node : Pointer(CDoom::Divline)) : LibC::Int
Returns side 0 (front), 1 (back), or 2 (on).
-
.p_drop_weapon(player : Pointer(CDoom::Player))
Player died, so put the weapon away.
- .p_explode_missile(mo : Pointer(CDoom::Mobj))
-
.p_find_highest_ceiling_surrounding(sec : Pointer(CDoom::Sector)) : CDoom::Fixed
FIND HIGHEST CEILING IN THE SURROUNDING SECTORS
-
.p_find_highest_floor_surrounding(sec : Pointer(CDoom::Sector)) : CDoom::Fixed
FIND HIGHEST FLOOR HEIGHT IN SURROUNDING SECTORS
-
.p_find_lowest_ceiling_surrounding(sec : Pointer(CDoom::Sector)) : CDoom::Fixed
FIND LOWEST CEILING IN THE SURROUNDING SECTORS
-
.p_find_lowest_floor_surrounding(sec : Pointer(CDoom::Sector)) : CDoom::Fixed
FIND LOWEST FLOOR HEIGHT IN SURROUNDING SECTORS
-
.p_find_min_surrounding_light(sector : Pointer(CDoom::Sector), max : LibC::Int) : LibC::Int
Find minimum light from an adjacent sector
-
.p_find_next_highest_floor(sec : Pointer(CDoom::Sector), currentheight : LibC::Int) : CDoom::Fixed
FIND NEXT HIGHEST FLOOR IN SURROUNDING SECTORS Note: this should be doable w/o a fixed array.
-
.p_find_sector_from_line_tag(line : Pointer(CDoom::Line), start : LibC::Int) : LibC::Int
RETURN NEXT SECTOR # THAT LINE TAG REFERS TO
- .p_fire_weapon(player : Pointer(CDoom::Player))
-
.p_give_ammo(player : Pointer(CDoom::Player), ammo : CDoom::Ammotype, num : LibC::Int) : CDoom::DoomBool
Num is the number of clip loads, not the individual count (0= 1/2 clip).
-
.p_give_armor(player : Pointer(CDoom::Player), armortype : LibC::Int) : CDoom::DoomBool
Returns false if the armor is worse than the current armor.
-
.p_give_body(player : Pointer(CDoom::Player), num : LibC::Int) : CDoom::DoomBool
Returns false if the body isn't needed at all
- .p_give_card(player : Pointer(CDoom::Player), card : CDoom::Card)
- .p_give_power(player : Pointer(CDoom::Player), power : LibC::Int) : CDoom::DoomBool
-
.p_give_weapon(player : Pointer(CDoom::Player), weapon : CDoom::Weapontype, dropped : CDoom::DoomBool) : CDoom::DoomBool
The weapon name may have a MF_DROPPED flag ored in.
-
.p_group_lines
Builds sector line lists and subsector sector numbers.
- .p_gunshot(mo : Pointer(CDoom::Mobj), accurate : CDoom::DoomBool)
-
.p_hit_slide_line(ld : Pointer(CDoom::Line))
Adjusts the xmove / ymove so that the next move will slide along the wall.
- .p_init
- .p_init_pic_anims
-
.p_init_switch_list
Only called at game initialization
- .p_init_thinkers
-
.p_intercept_vector(v2 : Pointer(CDoom::Divline), v1 : Pointer(CDoom::Divline)) : CDoom::Fixed
Returns the fractional intercept point along the first divline.
-
.p_intercept_vector2(v2 : Pointer(CDoom::Divline), v1 : Pointer(CDoom::Divline)) : CDoom::Fixed
Returns the fractional intercept point along the first divline.
- .p_kill_mobj(source : Pointer(CDoom::Mobj), target : Pointer(CDoom::Mobj))
-
.p_line_attack(t1 : Pointer(CDoom::Mobj), angle : CDoom::Angle, distance : CDoom::Fixed, slope : CDoom::Fixed, damage : LibC::Int)
If damage == 0, it is just a test trace that will leave linetarget set.
-
.p_line_opening(linedef : Pointer(CDoom::Line))
Sets opentop and openbottom to the window through a two sided line.
- .p_load_blockmap(lump : LibC::Int)
-
.p_load_linedefs(lump : LibC::Int)
Also counts secret lines for intermissions.
- .p_load_nodes(lump : LibC::Int)
- .p_load_sectors(lump : LibC::Int)
- .p_load_segs(lump : LibC::Int)
- .p_load_sidedefs(lump : LibC::Int)
- .p_load_subsectors(lump : LibC::Int)
- .p_load_things(lump : LibC::Int)
- .p_load_vertexes(lump : LibC::Int)
- .p_look_for_players(actor : Pointer(CDoom::Mobj), allaround : CDoom::DoomBool) : CDoom::DoomBool
- .p_make_divline(li : Pointer(CDoom::Line), dl : Pointer(CDoom::Divline))
- .p_mobj_thinker(mobj : Pointer(CDoom::Mobj))
- .p_move(actor : Pointer(CDoom::Mobj)) : CDoom::DoomBool
- .p_move_player(player : Pointer(CDoom::Player))
-
.p_move_psprites(player : Pointer(CDoom::Player))
Called every tic by player thinking routine.
- .p_new_chase_dir(actor : Pointer(CDoom::Mobj))
- .p_nightmare_respawn(mobj : Pointer(CDoom::Mobj))
-
.p_noise_alert(target : Pointer(CDoom::Mobj), emmiter : Pointer(CDoom::Mobj))
If a monster yells at a player, it will alert other monsters to the player.
-
.p_path_traverse(x1 : CDoom::Fixed, y1 : CDoom::Fixed, x2 : CDoom::Fixed, y2 : CDoom::Fixed, flags : LibC::Int, trav : Proc(Pointer(CDoom::Intercept), CDoom::DoomBool)) : CDoom::DoomBool
Traces a line from x1,y1 to x2,y2, calling the traverser function for each.
-
.p_player_in_special_sector(player : Pointer(CDoom::Player))
Called every tic frame that the player origin is in a special sector
- .p_player_think(player : Pointer(CDoom::Player))
- .p_point_on_divline_side(x : CDoom::Fixed, y : CDoom::Fixed, line : Pointer(CDoom::Divline)) : LibC::Int
-
.p_point_on_line_side(x : CDoom::Fixed, y : CDoom::Fixed, line : Pointer(CDoom::Line)) : LibC::Int
Returns 0 or 1
-
.p_radius_attack(spot : Pointer(CDoom::Mobj), source : Pointer(CDoom::Mobj), damage : LibC::Int)
Source is the creature that caused the explosion at spot.
-
.p_random : Int32
Which one is deterministic?
-
.p_recursive_sound(sec : Pointer(CDoom::Sector), soundblocks : LibC::Int)
Called by p_noise_alert.
-
.p_remove_active_ceiling(c : Pointer(CDoom::Ceiling))
Remove a ceiling's thinker
- .p_remove_active_plat(plat : Pointer(CDoom::Plat))
- .p_remove_mobj(mobj : Pointer(CDoom::Mobj))
-
.p_remove_thinker(thinker : Pointer(CDoom::Thinker))
Deallocation is lazy -- it will not actually be freed until its thinking turn comes up.
- .p_respawn_specials
- .p_run_thinkers
- .p_set_mobj_state(mobj : Pointer(CDoom::Mobj), state : CDoom::Statenum) : CDoom::DoomBool
- .p_set_psprite(player : Pointer(CDoom::Player), position : LibC::Int, stnum : CDoom::Statenum)
- .p_set_thing_position(thing : Pointer(CDoom::Mobj))
- .p_setup_level(episode : LibC::Int, map : LibC::Int, playermask : LibC::Int, skill : CDoom::Skill)
-
.p_setup_psprites(player : Pointer(CDoom::Player))
Called at start of level for each player.
-
.p_shoot_special_line(thing : Pointer(CDoom::Mobj), line : Pointer(CDoom::Line))
Called when a thing shoots a special line.
-
.p_slide_move(mo : Pointer(CDoom::Mobj))
The momx / momy move is bad, so try to slide along a wall.
- .p_spawn_blood(x : CDoom::Fixed, y : CDoom::Fixed, z : CDoom::Fixed, damage : Int32)
-
.p_spawn_door_close_in_30(sec : Pointer(CDoom::Sector))
Spawn a door that closes after 30 seconds
-
.p_spawn_door_raise_in_5_mins(sec : Pointer(CDoom::Sector), secnum : LibC::Int)
Spawn a door that opens after 5 minutes
- .p_spawn_fire_flicker(sector : Pointer(CDoom::Sector))
- .p_spawn_glowing_light(sector : Pointer(CDoom::Sector))
-
.p_spawn_light_flash(sector : Pointer(CDoom::Sector))
After the map has been loaded, scan each sector for specials that spawn thinkers
-
.p_spawn_map_thing(mthing : Pointer(CDoom::Mapthing))
The fields of the mapthing should already be in host byte order.
- .p_spawn_missile(source : Pointer(CDoom::Mobj), dest : Pointer(CDoom::Mobj), type : CDoom::Mobjtype) : Pointer(CDoom::Mobj)
- .p_spawn_mobj(x : CDoom::Fixed, y : CDoom::Fixed, z : CDoom::Fixed, type : CDoom::Mobjtype) : Pointer(CDoom::Mobj)
-
.p_spawn_player(mthing : Pointer(CDoom::Mapthing))
Called when a player is spawned on the level.
-
.p_spawn_player_missile(source : Pointer(CDoom::Mobj), type : CDoom::Mobjtype)
Tries to aim at a nearby monster
- .p_spawn_puff(x : CDoom::Fixed, y : CDoom::Fixed, z : CDoom::Fixed)
-
.p_spawn_specials
Parses command line parameters.
-
.p_spawn_strobe_flash(sector : Pointer(CDoom::Sector), fast_or_slow : LibC::Int, in_sync : LibC::Int)
After the map has been loaded, scan each sector for specials that spawn thinkers
-
.p_start_button(line : Pointer(CDoom::Line), w : CDoom::Bwhere, texture : LibC::Int, time : LibC::Int)
Start a button counting down till it turns off.
- .p_teleport_move(thing : Pointer(CDoom::Mobj), x : CDoom::Fixed, y : CDoom::Fixed) : CDoom::DoomBool
- .p_thing_height_clip(thing : Pointer(CDoom::Mobj)) : CDoom::DoomBool
-
.p_thrust(player : Pointer(CDoom::Player), angle : CDoom::Angle, move : CDoom::Fixed)
Moves the given origin along a given angle.
- .p_ticker
- .p_touch_special_thing(special : Pointer(CDoom::Mobj), toucher : Pointer(CDoom::Mobj))
-
.p_traverse_intercepts(func : CDoom::Traverser, maxfrac : CDoom::Fixed) : CDoom::DoomBool
Returns true if the traverser function returns true for all lines.
-
.p_try_move(thing : Pointer(CDoom::Mobj), x : CDoom::Fixed, y : CDoom::Fixed) : CDoom::DoomBool
Attempt to move to a new position, crossing special lines unless MF_TELEPORT is set.
-
.p_try_walk(actor : Pointer(CDoom::Mobj)) : CDoom::DoomBool
Attempts to move actor on in its current (ob->moveangle) direction.
- .p_unarchive_players(file : File)
- .p_unarchive_specials(file : File)
- .p_unarchive_thinkers(file : File)
- .p_unarchive_world(file : File)
-
.p_unset_thing_position(thing : Pointer(CDoom::Mobj))
Unlinks a thing from block map and sectors.
-
.p_update_specials
Animate planes, scroll walls, etc.
-
.p_use_lines(player : Pointer(CDoom::Player))
Looks for special lines in front of the player to activate.
-
.p_use_special_line(thing : Pointer(CDoom::Mobj), line : Pointer(CDoom::Line), side : LibC::Int) : CDoom::DoomBool
Called when a thing uses a special line.
- .p_xymovement(mo : Pointer(CDoom::Mobj))
- .p_zmovement(mo : Pointer(CDoom::Mobj))
- .packet_get
- .packet_send
-
.pit_add_line_intercepts(ld : Pointer(CDoom::Line)) : CDoom::DoomBool
Looks for lines in the given block that intercept the given trace to add to the intercepts list.
- .pit_add_thing_intercepts(thing : Pointer(CDoom::Mobj)) : CDoom::DoomBool
- .pit_change_sector(thing : Pointer(CDoom::Mobj)) : CDoom::DoomBool
-
.pit_check_line(ld : Pointer(CDoom::Line)) : CDoom::DoomBool
Adjusts tmfloorz and tmceilingz as lines are contacted
- .pit_check_thing(thing : Pointer(CDoom::Mobj)) : CDoom::DoomBool
-
.pit_radius_attack(thing : Pointer(CDoom::Mobj)) : CDoom::DoomBool
"bombsource" is the creature that caused the explosion at "bombspot".
- .pit_stomp_thing(thing : Pointer(CDoom::Mobj)) : CDoom::DoomBool
-
.pit_vile_check(thing : Pointer(CDoom::Mobj)) : CDoom::DoomBool
Detect a corpse that could be raised.
-
.ptr_aim_traverse(int : Pointer(CDoom::Intercept)) : CDoom::DoomBool
Sets linetaget and aimslope when a target is aimed at.
- .ptr_shoot_traverse(int : Pointer(CDoom::Intercept)) : CDoom::DoomBool
- .ptr_slide_traverse(int : Pointer(CDoom::Intercept)) : CDoom::DoomBool
- .ptr_use_traverse(int : Pointer(CDoom::Intercept)) : CDoom::DoomBool
- .punch_peers
-
.r_add_point_to_box(x : LibC::Int, y : LibC::Int, box : Pointer(CDoom::Fixed))
Expand a given bbox so that it encloses a given point.
-
.r_add_sprites(sec : Pointer(CDoom::Sector))
During BSP traversal, this adds sprites by sector.
-
.r_addline(line : Pointer(CDoom::Seg))
Clips the given segment and adds any visible pieces to the line list.
-
.r_check_bbox(bspcoord : Pointer(CDoom::Fixed)) : CDoom::DoomBool
Checks BSP node/subtree bounding box.
- .r_check_plane(pl : Pointer(CDoom::Visplane), start : LibC::Int, stop : LibC::Int) : Pointer(CDoom::Visplane)
-
.r_check_texture_num_for_name(name : Pointer(LibC::Char)) : LibC::Int
Check whether texture is available.
- .r_clear_clip_segs
- .r_clear_draw_segs
-
.r_clear_planes
At begining of frame.
-
.r_clear_sprites
Called at frame start.
-
.r_clip_pass_wall_segment(first : LibC::Int, last : LibC::Int)
Clips the given range of columns, but does not includes it in the clip list.
-
.r_clip_solid_wall_segment(first : LibC::Int, last : LibC::Int)
Does handle solid walls, e.g.
-
.r_draw_column
A column is a vertical slice/span from a wall texture that, given the DOOM style restrictions on the view orientation, will always have constant z depth.
-
.r_draw_column_in_cache(patch : Pointer(CDoom::Column), cache : Pointer(CDoom::Byte), originy : LibC::Int, cacheheight : LibC::Int)
Clip and draw a column from a patch into a cached post.
-
.r_draw_fuzz_column
Framebuffer postprocessing.
- .r_draw_masked
-
.r_draw_masked_column(column : Pointer(CDoom::Column))
Used for sprites and masked mid textures.
-
.r_draw_planes
At the end of each frame.
- .r_draw_player_sprites
- .r_draw_psprite(psp : Pointer(CDoom::Pspdef))
-
.r_draw_span
Draws the actual span.
- .r_draw_sprite(spr : Pointer(CDoom::Vissprite))
-
.r_draw_translated_column
Used to draw player sprites with the green colorramp mapped to others.
-
.r_draw_view_border
Draws the border around the view for different size windows?
- .r_draw_vis_sprite(vis : Pointer(CDoom::Vissprite), x1 : LibC::Int, x2 : LibC::Int)
- .r_execute_set_view_size
-
.r_fill_back_screen
Fills the back screen with a pattern for variable screen sizes Also draws a beveled edge.
- .r_find_plane(height : CDoom::Fixed, picnum : LibC::Int, lightlevel : LibC::Int) : Pointer(CDoom::Visplane)
-
.r_flat_num_for_name(name : Pointer(LibC::Char)) : LibC::Int
Retrieval, get a flat number for a flat name.
-
.r_generate_composite(texnum : LibC::Int)
Using the texture definition, the composite texture is created from the patches, and each column is cached.
- .r_generate_lookup(texnum : LibC::Int)
- .r_get_column(tex : LibC::Int, col : LibC::Int) : Pointer(CDoom::Byte)
- .r_init
-
.r_init_buffer(width : LibC::Int, height : LibC::Int)
Creats lookup tables that avoid multiplies and other hazzles for getting the framebuffer address of a pixel to draw.
- .r_init_colormaps
-
.r_init_data
Locates all the lumps that will be used by all views Must be called after W_Init.
- .r_init_flats
-
.r_init_light_tables
Only inits the zlight table, because the scalelight table changes with view size.
-
.r_init_sky_map
Called whenever the view size changes.
-
.r_init_sprite_defs(namelist : Pointer(Pointer(LibC::Char)))
Pass a null terminated list of sprite names (4 chars exactly) to be used.
-
.r_init_sprite_lumps
Finds the width and hoffset of all sprites in the wad, so the sprite does not need to be cached completely just for having the header info ready during rendering.
-
.r_init_sprites(namelist : Pointer(Pointer(LibC::Char)))
Called at program start.
- .r_init_tables
- .r_init_texture_mapping
-
.r_init_textures
Initializes the texture list with the textures from the world map.
-
.r_init_translation_tables
Creates the translation tables to map the green color ramp to gray, brown, red.
-
.r_install_sprite_lump(lump : LibC::Int, frame : LibC::UInt, rotation : LibC::UInt, flipped : CDoom::DoomBool)
Local function for R_InitSprites.
- .r_make_spans(x : LibC::Int, t1 : LibC::Int, b1 : LibC::Int, t2 : LibC::Int, b2 : LibC::Int)
-
.r_map_plane(y : LibC::Int, x1 : LibC::Int, x2 : LibC::Int)
Uses global vars: planeheight ds_source basexscale baseyscale viewx viewy
- .r_new_vis_sprite : Pointer(CDoom::Vissprite)
- .r_point_in_subsector(x : CDoom::Fixed, y : CDoom::Fixed) : Pointer(CDoom::Subsector)
- .r_point_on_seg_side(x : CDoom::Fixed, y : CDoom::Fixed, line : Pointer(CDoom::Seg)) : LibC::Int
-
.r_point_on_side(x : CDoom::Fixed, y : CDoom::Fixed, node : Pointer(CDoom::Node)) : LibC::Int
Traverse BSP (sub) tree, check point against partition plane.
-
.r_point_to_angle(x : CDoom::Fixed, y : CDoom::Fixed) : CDoom::Angle
To get a global angle from cartesian coordinates, the coordinates are flipped until they are in the first octant of the coordinate system, then the y (<=x) is scaled and divided by x to get a tangent (slope) value which is looked up in the tantoangle[] table.
- .r_point_to_angle2(x1 : CDoom::Fixed, y1 : CDoom::Fixed, x2 : CDoom::Fixed, y2 : CDoom::Fixed) : CDoom::Angle
- .r_point_to_dist(x : CDoom::Fixed, y : CDoom::Fixed) : CDoom::Fixed
-
.r_precache_level
Preloads all relevant graphics for the level.
-
.r_project_sprite(thing : Pointer(CDoom::Mobj))
Generates a vissprite for a thing if it might be visible.
-
.r_render_bsp_node(bspnum : LibC::Int)
Renders all subsectors below a given node, traversing subtree recursively.
- .r_render_masked_seg_range(ds : Pointer(CDoom::Drawseg), x1 : LibC::Int, x2 : LibC::Int)
- .r_render_player_view(player : Pointer(CDoom::Player))
-
.r_render_seg_loop
Draws zero, one, or two textures (and possibly a masked texture) for walls.
-
.r_scale_from_global_angle(visangle : CDoom::Angle) : CDoom::Fixed
Returns the texture mapping scale for the current line (horizontal span) at the given angle.
-
.r_set_view_size(blocks : LibC::Int, detail : LibC::Int)
Do not really change anything here, because it might be in the middle of a refresh.
- .r_setup_frame(player : Pointer(CDoom::Player))
- .r_sort_vis_sprites
-
.r_store_wall_range(start : LibC::Int, stop : LibC::Int)
A wall segment will be drawn between start and stop pixels (inclusive).
-
.r_subsector(num : LibC::Int)
Determine floor/ceiling planes.
-
.r_texture_num_for_name(name : Pointer(LibC::Char)) : LibC::Int
Calls R_CheckTextureNumForName, aborts with error message.
-
.r_video_erase(ofs : LibC::UInt, count : LibC::Int)
Copy a screen buffer.
- .reset_all_channels
-
.s_adjust_sound_params(listener : Pointer(CDoom::Mobj), source : Pointer(CDoom::Mobj), vol : Pointer(LibC::Int), sep : Pointer(LibC::Int), pitch : Pointer(LibC::Int)) : LibC::Int
Changes volume, stereo-separation, and pitch variables from the norm of a sound effect to be played.
- .s_change_music(musicnum : LibC::Int, looping : LibC::Int)
-
.s_get_channel(origin : Pointer(Void), sfxinfo : Pointer(CDoom::Sfxinfo)) : LibC::Int
If none available, return -1.
-
.s_init(sfx_volume : LibC::Int, music_volume : LibC::Int)
Initializes sound stuff, including volume Sets channels, SFX and music volume, allocates channel buffer, sets S_sfx lookup.
-
.s_pause_sound
Stop and resume music, during game PAUSE.
- .s_resume_sound
- .s_set_music_volume(volume : LibC::Int)
- .s_set_sfx_volume(volume : LibC::Int)
-
.s_start
Per level startup code.
-
.s_start_music(m_id : LibC::Int)
Starts some music with the music id found in sounds.h.
- .s_start_sound(origin : Pointer(Void), sfx_id : LibC::Int)
- .s_start_sound_at_volume(origin_p : Pointer(Void), sfx_id : LibC::Int, volume : LibC::Int)
- .s_stop_channel(cnum : LibC::Int)
- .s_stop_music
- .s_stop_sound(origin : Pointer(Void))
-
.s_update_sounds(listener_p : Pointer(Void))
Updates music & sounds
- .slope_div(num : LibC::UInt, den : LibC::UInt) : LibC::Int
- .st_calc_pain_offset : LibC::Int
- .st_create_widgets
- .st_diff_draw
- .st_do_palette_stuff
- .st_do_refresh
- .st_draw_widgets(refresh : CDoom::DoomBool)
- .st_drawer(fullscreen : CDoom::DoomBool, refresh : CDoom::DoomBool)
- .st_init
- .st_init_data
- .st_load_data
- .st_load_graphics
- .st_refresh_background
-
.st_responder(ev : Pointer(CDoom::Event)) : CDoom::DoomBool
Respond to keyboard input events, intercept cheats.
- .st_start
- .st_stop
- .st_ticker
- .st_unload_data
- .st_unload_graphics
- .st_update_face_widget
- .st_update_widgets
-
.stlib_draw_num(n : Pointer(CDoom::ST_Number), refresh : CDoom::DoomBool)
A fairly efficient way to draw a number based on differences from the old number.
- .stlib_init
- .stlib_init_bin_icon(b : Pointer(CDoom::ST_Binicon), x : LibC::Int, y : LibC::Int, i : Pointer(CDoom::Patch), val : Pointer(CDoom::DoomBool), on : Pointer(CDoom::DoomBool))
- .stlib_init_mult_icon(i : Pointer(CDoom::ST_Multicon), x : LibC::Int, y : LibC::Int, il : Pointer(Pointer(CDoom::Patch)), inum : Pointer(LibC::Int), on : Pointer(CDoom::DoomBool))
-
.stlib_init_num(n : Pointer(CDoom::ST_Number), x : LibC::Int, y : LibC::Int, pl : Pointer(Pointer(CDoom::Patch)), num : Pointer(LibC::Int), on : Pointer(CDoom::DoomBool), width : LibC::Int)
?
- .stlib_init_percent(p : Pointer(CDoom::ST_Percent), x : LibC::Int, y : LibC::Int, pl : Pointer(Pointer(CDoom::Patch)), num : Pointer(LibC::Int), on : Pointer(CDoom::DoomBool), percent : Pointer(CDoom::Patch))
- .stlib_update_bin_icon(bi : Pointer(CDoom::ST_Binicon), refresh : CDoom::DoomBool)
- .stlib_update_mult_icon(mi : Pointer(CDoom::ST_Multicon), refresh : CDoom::DoomBool)
- .stlib_update_num(n : Pointer(CDoom::ST_Number), refresh : CDoom::DoomBool)
- .stlib_update_percent(per : Pointer(CDoom::ST_Percent), refresh : LibC::Int)
- .t_fire_flicker(flick : Pointer(CDoom::Fireflicker))
- .t_glow(g : Pointer(CDoom::Glow))
-
.t_light_flash(flash : Pointer(CDoom::Lightflash))
Do flashing lights.
- .t_move_ceiling(ceiling : Pointer(CDoom::Ceiling))
-
.t_move_floor(floor : Pointer(CDoom::Floormove))
MOVE A FLOOR TO IT'S DESTINATION (UP OR DOWN)
- .t_move_plane(sector : Pointer(CDoom::Sector), speed : CDoom::Fixed, dest : CDoom::Fixed, crush : CDoom::DoomBool, floor_or_ceiling : LibC::Int, direction : LibC::Int) : CDoom::Result
-
.t_plat_raise(plat : Pointer(CDoom::Plat))
Move a plat up and down
- .t_strobe_flash(flash : Pointer(CDoom::Strobe))
-
.t_vertical_door(door : Pointer(CDoom::Vldoor))
Move a locked door up/down
-
.try_run_tics
try_run_tics
-
.two_sided(sector : LibC::Int, line : LibC::Int) : LibC::Int
Given the sector number and the line number, it will tell you whether the line is two-sided or not.
- .udp_socket : UDPSocket
- .update_audio
- .v_copy_rect(srcx : LibC::Int, srcy : LibC::Int, srcscrn : LibC::Int, width : LibC::Int, height : LibC::Int, destx : LibC::Int, desty : LibC::Int, destscrn : LibC::Int)
-
.v_draw_block(x : LibC::Int, y : LibC::Int, scrn : LibC::Int, width : LibC::Int, height : LibC::Int, src : Pointer(CDoom::Byte))
Draw a linear block of pixels into the view buffer.
-
.v_draw_patch(x : LibC::Int, y : LibC::Int, scrn : LibC::Int, patch : Pointer(CDoom::Patch))
Masks a column based masked pic to the screen.
-
.v_draw_patch_direct(x : LibC::Int, y : LibC::Int, scrn : LibC::Int, patch : Pointer(CDoom::Patch))
Draws directly to the screen on the pc.
-
.v_draw_patch_flipped(x : LibC::Int, y : LibC::Int, scrn : LibC::Int, patch : Pointer(CDoom::Patch))
Masks a column based masked pic to the screen.
- .v_draw_patch_rect_direct(x : LibC::Int, y : LibC::Int, scrn : LibC::Int, patch : Pointer(CDoom::Patch), src_x : LibC::Int, src_w : LibC::Int)
- .v_get_block(x : LibC::Int, y : LibC::Int, scrn : LibC::Int, width : LibC::Int, height : LibC::Int, dest : Pointer(CDoom::Byte))
- .v_init
- .v_mark_rect(x : LibC::Int, y : LibC::Int, width : LibC::Int, height : LibC::Int)
- .w_add_file(filename : Pointer(LibC::Char))
- .w_cache_lump_name(name : Pointer(LibC::Char), tag : LibC::Int) : Pointer(Void)
- .w_cache_lump_num(lump : LibC::Int, tag : LibC::Int) : Pointer(Void)
-
.w_check_num_for_name(name : Pointer(LibC::Char)) : LibC::Int
Returns -1 if name not found.
-
.w_get_num_for_name(name : Pointer(LibC::Char)) : LibC::Int
Calls w_check_num_for_name, but bombs out if not found.
-
.w_init_file(filename : Pointer(LibC::Char))
Just initialize from a single file.
-
.w_init_multiple_files(filenames : Pointer(Pointer(LibC::Char)))
Pass a null terminated list of files to use.
-
.w_lump_length(lump : LibC::Int) : LibC::Int
Returns the buffer size needed to load the given lump.
-
.w_read_lump(lump : LibC::Int, dest : Pointer(Void))
Loads the lump into the given buffer, which must be >= w_lump_length().
-
.w_reload
Flushes any of the reloadable lumps in memory and reloads the directory.
- .wi_check_for_accelerate
- .wi_draw_animated_back
- .wi_draw_deathmatch_stats
-
.wi_draw_el
Draws "Entering
" -
.wi_draw_lf
Draws "
Finished!" - .wi_draw_netgame_stats
- .wi_draw_no_state
-
.wi_draw_num(x : LibC::Int, y : LibC::Int, n : LibC::Int, digits : LibC::Int) : LibC::Int
Draws a number.
- .wi_draw_on_lnode(n : LibC::Int, c : Pointer(Pointer(CDoom::Patch)))
- .wi_draw_percent(x : LibC::Int, y : LibC::Int, p : LibC::Int)
- .wi_draw_show_next_loc
- .wi_draw_stats
-
.wi_draw_time(x : LibC::Int, y : LibC::Int, t : LibC::Int)
Display level completion time and par, or "sucks" message if overflow.
- .wi_drawer
- .wi_end
- .wi_frag_sum(playernum : LibC::Int) : LibC::Int
- .wi_init_animated_back
- .wi_init_deathmatch_stats
- .wi_init_netgame_stats
- .wi_init_no_state
- .wi_init_show_next_loc
- .wi_init_stats
- .wi_init_variables(wbstartstruct : Pointer(CDoom::Wbstartstruct))
- .wi_load_data
- .wi_slam_background
- .wi_start(wbstartstruct : Pointer(CDoom::Wbstartstruct))
-
.wi_ticker
Updates stuff each tick
- .wi_unload_data
- .wi_update_animated_back
- .wi_update_deathmatch_stats
- .wi_update_netgame_stats
- .wi_update_no_state
- .wi_update_show_next_loc
- .wi_update_stats
- .wipe_do_color_x_form(width : Int32, height : Int32, ticks : Int32) : Int32
- .wipe_do_melt(width : Int32, height : Int32, ticks : Int32) : Int32
- .wipe_end_screen(x : Int32, y : Int32, width : Int32, height : Int32) : Int32
- .wipe_exit_color_x_form(width : Int32, height : Int32, ticks : Int32) : Int32
- .wipe_exit_melt(width : Int32, height : Int32, ticks : Int32) : Int32
- .wipe_init_color_x_form(width : Int32, height : Int32, ticks : Int32) : Int32
- .wipe_init_melt(width : Int32, height : Int32, ticks : Int32) : Int32
- .wipe_screen_wipe(wipeno : Int32, x : Int32, y : Int32, width : Int32, height : Int32, ticks : Int32) : Int32
- .wipe_shitty_col_major_x_form(array : Pointer(Int16), width : Int32, height : Int32)
- .wipe_start_screen(x : Int32, y : Int32, width : Int32, height : Int32) : Int32
- .write_pcx_file(filename : Pointer(LibC::Char), data : Pointer(CDoom::Byte), width : LibC::Int, height : LibC::Int, palette : Pointer(CDoom::Byte))
- .z_change_tag2(ptr : Pointer(Void), tag : LibC::Int)
- .z_check_heap
- .z_free(ptr : Pointer(Void))
- .z_free_tags(lowtag : LibC::Int, hightag : LibC::Int)
- .z_init
- .z_malloc(size : LibC::Int, tag : LibC::Int, user : Pointer(Void)) : Pointer(Void)
Macro Summary
- dooutcode(oc, mx, my)
- poll_button(doombutton, raylibbutton)
-
poll_key(doomkey, raylibkey)
-- Macros for quick key polling --
- poll_two_key(doomkey, raylibkey1, raylibkey2)
- putdot(xx, yy, cc)
Class Method Detail
Possibly trigger special effects if on first boss level
Actor has a melee attack, so it tries to close as fast as possible
firing three missiles (bruisers) in three different directions? Doesn't look like it.
Lowers current weapon, and changes weapon at bottom.
The player can re-fire the weapon without lowering it entirely.
Keep fire in front of player unless out of sight
The player can fire the weapon or change to another weapon at this time. Follows after getting weapon up, or after previous attack/fire sequence.
This function adds a sound to the list of currently active sounds, which is maintained as a given number (eight, usually) of internal channels. Returns a handle.
Automap clipping of lines.
Based on Cohen-Sutherland clipping algorithm but with a slightly faster reject and precalculated slopes. If the speed is needed, use a hash algorithm to handle the common cases.
Classic Bresenham w/ whatever optimizations needed for speed
Clip lines, draw visible part sof lines.
Determines visible lines, draws them. This is LineDef based, not LineSeg based.
Determines bounding box of all vertices, sets global variables controlling zoom range.
should be called at the start of every level right now, i figure it out myself
Handle events (user inputs) in automap mode
Rotation in 2D. Used to rotate player arrow line character.
This cycles through the demo sequences. Todo: FIXME - version dependend demo numbers?
d_post_event Called by the I/O functions when input is detected
d_process_events Send all the events of the given timestamp down the responder chain
d_quit_net_game Called before quitting to leave a net game without hanging the other players
BUILD A STAIRCASE!
Stop a ceiling from crushing!
Move a ceiling up/down and all around!
Special Stuff that can not be categorized
open a door manually, no tag value
Do Platforms "amount" is only used for SOME platforms.
Start strobing lights (usually from a trigger)
g_build_ticcmd Builds a ticcmd from all of the available inputs or reads it from the demo buffer. If recording a demo, write it out
===================
= g_check_demo_status
= Called after a death or level completion to allow demos to be cleaned up = Returns true if a new demo loop action will take place
g_init_new Can be called by the startup code or the menu task, consoleplayer, displayplayer, playeringame[] should be set.
g_init_player Called at the start. Called by the game initialization functions.
g_load_game Can be called by the startup code or the menu task.
g_player_finish_level Can when a player completes a level.
g_player_reborn Called after a player dies almost everything is cleared and initialized
g_save_game Called by the menu task. Description is a 24 byte text string
Return sector_t * of sector next to current. 0 if not two-sided line
Will return a sector_t* given the number of the current sector, the line number and the side (0/1) that you want.
Will return a side_t* given the number of the current sector, the line number, and the side (0/1) that you want.
This function loads the sound data from the WAD lump, for single sound.
The following deletion routines adhere to the left margin restriction
sorta called by hu_erase and just better darn get things straight
wrapper function for handling general keyed input. returns true if it ate the key
Starting a sound means adding it to the current list of active sounds in the internal channels. As the SFX info struct contains e.g. a pointer to the raw data, it is ignored. As our sound handling does not handle priority, it is ignored. Pitching (that is, increased speed of playback) is set, but currently not used by mixing.
This function loops all active (internal) sound channels, retrieves a given number of samples from the raw sound data, modifies it according to the current (internal) channel parameters, mixes the per channel samples into the global mixbuffer, clamping it to the allowed range, and sets up everything for transferring the contents of the mixbuffer to the (two) hardware channels (left and right, that is).
This function currently supports only 16bit.
identify_version Checks availability of IWAD files by name, to determine whether registered/commercial features should be executed (notably loading PWAD's).
m_check_parm Checks for the given parameter in the program's command line arguments. Returns the argument number (1 to argc-1) or 0 if not present
Menu Methods
m_drawer Called after the view has been rendered, but before it has been blitted.
Write a string using the hu_font
Restart a ceiling that's in-stasis
Adds a new thinker at the end of the list.
Gives an estimation of distance (not exact)
Things to handle:
T_MoveCeiling, (ceiling_t: sector_t * swizzle), - active list T_VerticalDoor, (vldoor_t: sector_t * swizzle), T_MoveFloor, (floormove_t: sector_t * swizzle), T_LightFlash, (lightflash_t: sector_t * swizzle), T_StrobeFlash, (strobe_t: sector_t *), T_Glow, (glow_t: sector_t *), T_PlatRaise, (plat_t: sector_t *), - active list
The validcount flags are used to avoid checking lines that are marked in multiple mapblocks, so increment validcount before the first call to P_BlockLinesIterator, then make one or more calls to it.
Considers the line to be infinite Returns side 0 or 1, -1 if box crosses the line.
Starts bringing the pending weapon up from the bottom of the screen. Uses player
Sets a slope so a near miss is at aproximately the height of the intended target
Calculate the walking / running height adjustment
Function that changes wall texture. Tell it if switch is ok to use again (1=yes, it's a button).
Returns true if there is enough ammo to shoot. If not, selects the next weapon to use.
Moves the missile forward a bit and possibly explodes it right there.
This is purely informative, nothing is modified (except things picked up).
in: a mobj_t (can be valid or invalid) a position to be checked (doesn't need to be related to the mobj_t->x,y)
during: special things are touched if MF_PICKUP early out on solid lines?
out: newsubsec floorz ceilingz tmdropoffz the lowest point contacted (monsters won't move to a dropoff) speciallines[] numspeciallines
Returns true if a straight line between t1 and t2 is unobstructed. Uses REJECT.
Returns true if strace crosses the given node successfully.
Called every time a thing origin is about to cross a line with a non 0 special.
Returns true if strace crosses the given subsector successfully.
Damages both enemies and players "inflictor" is the thing that caused the damage creature or missile, can be 0 (slime, etc) "source" is the thing to target after taking damage creature or 0 Source and inflictor are the same for melee attacks. Source can be 0 for slime, barrel explosions and other environmental stuff.
Returns side 0 (front), 1 (back), or 2 (on).
FIND HIGHEST CEILING IN THE SURROUNDING SECTORS
FIND HIGHEST FLOOR HEIGHT IN SURROUNDING SECTORS
FIND LOWEST CEILING IN THE SURROUNDING SECTORS
FIND LOWEST FLOOR HEIGHT IN SURROUNDING SECTORS
Find minimum light from an adjacent sector
FIND NEXT HIGHEST FLOOR IN SURROUNDING SECTORS Note: this should be doable w/o a fixed array.
RETURN NEXT SECTOR # THAT LINE TAG REFERS TO
Num is the number of clip loads, not the individual count (0= 1/2 clip). Returns false if the ammo can't be picked up at all
Returns false if the armor is worse than the current armor.
Returns false if the body isn't needed at all
The weapon name may have a MF_DROPPED flag ored in.
Builds sector line lists and subsector sector numbers. Finds block bounding boxes for sectors.
Adjusts the xmove / ymove so that the next move will slide along the wall.
Returns the fractional intercept point along the first divline. This is only called by the addthings and addlines traversers.
Returns the fractional intercept point along the first divline. This is only called by the addthings and addlines traversers.
If damage == 0, it is just a test trace that will leave linetarget set.
Sets opentop and openbottom to the window through a two sided line.
OPTIMIZE keep this precalculated
Called every tic by player thinking routine.
If a monster yells at a player, it will alert other monsters to the player.
Traces a line from x1,y1 to x2,y2, calling the traverser function for each. Returns true if the traverser function returns true for all lines.
Called every tic frame that the player origin is in a special sector
Returns 0 or 1
Source is the creature that caused the explosion at spot.
Called by p_noise_alert. Recursively traverse adjacent sectors, sound blocking lines cut off traversal.
Deallocation is lazy -- it will not actually be freed until its thinking turn comes up.
Called at start of level for each player.
Called when a thing shoots a special line.
The momx / momy move is bad, so try to slide along a wall. Find the first line hit, move flush to it, and slide along it
This is a kludgy mess.
Spawn a door that closes after 30 seconds
Spawn a door that opens after 5 minutes
After the map has been loaded, scan each sector for specials that spawn thinkers
The fields of the mapthing should already be in host byte order.
Called when a player is spawned on the level. Most of the player structure stays unchanged between levels.
Tries to aim at a nearby monster
After the map has been loaded, scan each sector for specials that spawn thinkers
Start a button counting down till it turns off.
Moves the given origin along a given angle.
Returns true if the traverser function returns true for all lines.
Attempt to move to a new position, crossing special lines unless MF_TELEPORT is set.
Attempts to move actor on in its current (ob->moveangle) direction. If blocked by either a wall or an actor returns FALSE If move is either clear or blocked only by a door, returns TRUE and sets... If a door is in the way, an OpenDoor call is made to start it opening.
Unlinks a thing from block map and sectors. On each position change, BLOCKMAP and other lookups maintaining lists ot things inside these structures need to be updated.
Looks for special lines in front of the player to activate.
Called when a thing uses a special line. Only the front sides of lines are usable.
Looks for lines in the given block that intercept the given trace to add to the intercepts list.
A line is crossed if its endpoints are on opposite sides of the trace. Returns true if earlyout and a solid line hit.
Adjusts tmfloorz and tmceilingz as lines are contacted
"bombsource" is the creature that caused the explosion at "bombspot".
Detect a corpse that could be raised.
Sets linetaget and aimslope when a target is aimed at.
Expand a given bbox so that it encloses a given point.
During BSP traversal, this adds sprites by sector.
Clips the given segment and adds any visible pieces to the line list.
Checks BSP node/subtree bounding box. Returns true if some part of the bbox might be visible.
Check whether texture is available. Filter out NoTexture indicator.
Clips the given range of columns, but does not includes it in the clip list. Does handle windows, e.g. LineDefs with upper and lower texture.
Does handle solid walls, e.g. single sided LineDefs (middle texture) that entirely block the view.
A column is a vertical slice/span from a wall texture that, given the DOOM style restrictions on the view orientation, will always have constant z depth. Thus a special case loop for very fast rendering can be used. It has also been used with Wolfenstein 3D.
Clip and draw a column from a patch into a cached post.
Framebuffer postprocessing. Creates a fuzzy image by copying pixels from adjacent ones to left and right. Used with an all black colormap, this could create the SHADOW effect, i.e. spectres and invisible players.
Used for sprites and masked mid textures. Masked means: partly transparent, i.e. stored in posts/runs of opaque pixels.
Used to draw player sprites with the green colorramp mapped to others. Could be used with different translation tables, e.g. the lighter colored version of the BaronOfHell, the HellKnight, uses identical sprites, kinda brightened up.
Fills the back screen with a pattern for variable screen sizes Also draws a beveled edge.
Retrieval, get a flat number for a flat name.
Using the texture definition, the composite texture is created from the patches, and each column is cached.
Creats lookup tables that avoid multiplies and other hazzles for getting the framebuffer address of a pixel to draw.
Locates all the lumps that will be used by all views Must be called after W_Init.
Only inits the zlight table, because the scalelight table changes with view size.
Pass a null terminated list of sprite names (4 chars exactly) to be used. Builds the sprite rotation matrixes to account for horizontally flipped sprites. Will report an error if the lumps are inconsistant. Only called at startup.
Sprite lump names are 4 characters for the actor, a letter for the frame, and a number for the rotation. A sprite that is flippable will have an additional letter/number appended. The rotation character can be 0 to signify no rotations.
Finds the width and hoffset of all sprites in the wad, so the sprite does not need to be cached completely just for having the header info ready during rendering.
Creates the translation tables to map the green color ramp to gray, brown, red. Assumes a given structure of the PLAYPAL. Could be read from a lump instead.
Local function for R_InitSprites.
Uses global vars: planeheight ds_source basexscale baseyscale viewx viewy
BASIC PRIMITIVE
Traverse BSP (sub) tree, check point against partition plane. Returns side 0 (front) or 1 (back).
To get a global angle from cartesian coordinates, the coordinates are flipped until they are in the first octant of the coordinate system, then the y (<=x) is scaled and divided by x to get a tangent (slope) value which is looked up in the tantoangle[] table.
Generates a vissprite for a thing if it might be visible.
Renders all subsectors below a given node, traversing subtree recursively. Just call with BSP root.
Draws zero, one, or two textures (and possibly a masked texture) for walls. Can draw or mark the starting pixel of floor and ceiling textures. CALLED: CORE LOOPING ROUTINE.
Returns the texture mapping scale for the current line (horizontal span) at the given angle. rw_distance must be calculated first.
Do not really change anything here, because it might be in the middle of a refresh. The change will take effect next refresh.
A wall segment will be drawn between start and stop pixels (inclusive).
Determine floor/ceiling planes. Add sprites of things in sector. Draw one or more line segments.
Calls R_CheckTextureNumForName, aborts with error message.
Changes volume, stereo-separation, and pitch variables from the norm of a sound effect to be played. If the sound is not audible, returns a 0. Otherwise, modifies parameters and returns 1.
If none available, return -1. Otherwise channel #.
Initializes sound stuff, including volume Sets channels, SFX and music volume, allocates channel buffer, sets S_sfx lookup.
Per level startup code. Kills playing sounds at start of level, determines music if any, changes music.
Respond to keyboard input events, intercept cheats.
A fairly efficient way to draw a number based on differences from the old number. Note: worth the trouble?
?
MOVE A FLOOR TO IT'S DESTINATION (UP OR DOWN)
Given the sector number and the line number, it will tell you whether the line is two-sided or not.
Draw a linear block of pixels into the view buffer.
Masks a column based masked pic to the screen.
Draws directly to the screen on the pc.
Masks a column based masked pic to the screen. Flips horizontally, e.g. to mirror face.
Returns -1 if name not found.
Calls w_check_num_for_name, but bombs out if not found.
Pass a null terminated list of files to use. All files are optional, but at least one file must be found. Files with a .wad extension are idlink files with multiple lumps. Other files are single lumps with the base filename for the lump name. Lump names can appear multiple times. The name searcher looks backwards, so a later file does override all earlier ones.
Returns the buffer size needed to load the given lump.
Loads the lump into the given buffer, which must be >= w_lump_length().
Draws a number. If digits > 0, then use that many digits minimum, otherwise only use as many as necessary. Returns new x position.
Display level completion time and par, or "sucks" message if overflow.