Commit graph

556 commits

Author SHA1 Message Date
Jaime Passos 7676f11112 Merge remote-tracking branch 'origin/next' into respawndelaygametyperule 2019-12-30 12:09:45 -03:00
Nev3r 99aace19f5 Merge branch 'textmap-parser' of https://git.magicalgirl.moe/STJr/SRB2/ into textmap-parser 2019-12-30 14:48:10 +01:00
Nev3r 4a5498473c Make P_LoadMapData() a return a boolean as well as P_LoadMapFromFile(); if they fail to load, they return false, and thus P_SetupLevel() will also return false.
TextmapCount() also now returns false if brackets are left open inside a textmap.
2019-12-30 14:47:48 +01:00
Nev3r f9d6e26558 Replace INT16_MAX with LUMPERROR in lump check. 2019-12-30 14:45:39 +01:00
Nev3r 7ae2143c91 Add a disclaimer when loading textmaps/UDMF. 2019-12-30 14:42:41 +01:00
MascaraSnake ea87af0076 Refactor TextmapParse 2019-12-30 14:33:41 +01:00
Nev3r c6c00aa7d5 Tweak TextmapCount()'s bracket detection to account for multiple levels, if that ever happens. 2019-12-30 13:46:37 +01:00
MascaraSnake 4aee4e3684 Refactor TextmapCount 2019-12-30 13:27:05 +01:00
Nev3r e43df2993f Move TextmapFixFlatOffsets() above P_LoadTextmap() so that it can compile. 2019-12-30 12:33:24 +01:00
Nev3r f9aabe753e Refactor TextmapFixFlatOffsets(). 2019-12-30 12:31:55 +01:00
Nev3r f49b8de5fd Adapt P_MakeMapMD5() for textmaps. 2019-12-30 12:07:54 +01:00
Nev3r ed114f655b Fixed missing M_GetToken(NULL); 2019-12-30 12:07:02 +01:00
Nev3r aaef412823 Add basic textmap support; currently crashes when trying to free the virtres, at vres_free(). 2019-12-30 11:33:22 +01:00
James R 97c5e63dc3 Initialize 'supported' array 2019-12-29 16:52:39 -08:00
MascaraSnake 136c656cc0 Properly pass nodes data along to functions that need it without breaking the original data pointer 2019-12-29 22:11:15 +01:00
MascaraSnake 81422c4e6d Revert "Pass along virtnodes to extended nodes loading functions to make sure virtnodes->data is moved correctly"
This reverts commit cfc6428569.
2019-12-29 21:57:47 +01:00
MascaraSnake cfc6428569 Pass along virtnodes to extended nodes loading functions to make sure virtnodes->data is moved correctly 2019-12-29 21:42:16 +01:00
MascaraSnake e88556efe1 P_GetNodetype: The virtnodes pointer is supposed to be the output parameter, so we have to pass a pointer to that pointer 2019-12-29 21:00:20 +01:00
MascaraSnake dd02fe0d78 P_GetNodetype: Set virtnodes for traditional Doom format 2019-12-29 20:43:41 +01:00
MascaraSnake 882e8ef7b8 Separate shared parts of seg initialization into P_InitializeSeg 2019-12-29 20:24:14 +01:00
MascaraSnake 36f86077da Move loading of extended subsectors and segs into its own function 2019-12-29 19:54:04 +01:00
MascaraSnake c287b86fab Get rid of duplicated code in the extended seg parsing 2019-12-29 19:04:50 +01:00
MascaraSnake 3839e95d63 Move reading of extra vertices into separate function 2019-12-29 18:07:44 +01:00
MascaraSnake 45ca959f97 -Move reading of actual extended nodes into separate function, cutting down on code duplication in the process
-Fix a typo in the segs reading
2019-12-29 17:52:49 +01:00
MascaraSnake 9d009edfc8 Move copying of the nodes signature out of the else case 2019-12-29 15:59:15 +01:00
MascaraSnake 0aed60f4de Separate retrieval of nodetype and nodes lump into its own function (Function. Not file. Sorry.) 2019-12-29 15:50:53 +01:00
MascaraSnake 8032054a47 Separate loading of extended nodes into its own file 2019-12-29 15:15:32 +01:00
Nev3r 389b9e35c4 Add XNOD, XGLN and XGL3 BSP formats recognition and support. 2019-12-29 14:17:51 +01:00
MascaraSnake abdfe60aa7 Store custom FOF flags directly in back toptexture field at map load instead of re-reading the sidedefs data later on 2019-12-29 12:01:41 +01:00
MascaraSnake cfadbb0f36 -Add linedef pointer to side_t, so sidedefs are able to tell if they're a front or back sidedef during setup
-Fix a broken condition during setup of texture fields for the change music linedef
2019-12-29 09:39:50 +01:00
Jaime Passos e63f77ea1a Merge remote-tracking branch 'origin/next' into respawndelaygametyperule 2019-12-28 21:39:38 -03:00
James R 90e56bcdf9 Merge branch 'levelload-refactor' into 'next'
Hack P_SetupLevel into little pie- actually just clean it up a bit

See merge request STJr/SRB2!587
2019-12-28 19:37:06 -05:00
MascaraSnake bd7765227e Rename P_GroupLines to the more apt P_LinkMapData 2019-12-28 17:40:08 +01:00
MascaraSnake 7e5b87ce42 Fix debug prints 2019-12-28 17:37:32 +01:00
MascaraSnake d38ee51d49 Separate setting of sector field defaults into P_InitializeSector 2019-12-28 17:29:58 +01:00
MascaraSnake 54fe91b1cc Refactor P_SetupLines into P_InitializeLinedef 2019-12-28 17:21:31 +01:00
MascaraSnake 1ca25224c2 Fix P_SetupLines printing the wrong line number 2019-12-28 17:05:04 +01:00
MascaraSnake 85de3614cb Standardize P_LoadVertices and P_LoadSidedefs 2019-12-28 16:58:48 +01:00
MascaraSnake 86d1fb73f4 Split P_LoadLineDefs2 into P_ProcessLinedefsWithSidedefs and P_CompressSidedefs 2019-12-28 16:49:56 +01:00
MascaraSnake 21b7507aee Reorganize and partially rename map loading functions 2019-12-28 16:40:35 +01:00
MascaraSnake b1854b5c96 Remove stray #endif 2019-12-28 14:50:00 +01:00
MascaraSnake 5590343043 Rename P_LoadThingsOnly to P_RespawnThings to make it clearer that it doesn't actually reload the things from the file, it just respawns them. 2019-12-28 14:13:26 +01:00
MascaraSnake 3971067cf3 Remove some old #if 0'd code 2019-12-28 14:03:48 +01:00
MascaraSnake 303e6cee4a Merge branch 'next' into mapload-refactor 2019-12-28 13:59:24 +01:00
MascaraSnake ceca99e3c5 Fix accidental removal of sector_t's spawn_lightlevel initialization 2019-12-28 13:58:23 +01:00
MascaraSnake e9376a8353 Cleaned up some more stuff in P_LoadLevel() 2019-12-28 12:48:32 +01:00
MascaraSnake c059146937 Move more P_LoadLevel parts into subfunctions 2019-12-28 11:37:56 +01:00
MascaraSnake 319ed09c00 Rename P_SetupLevel to the more accurate P_LoadLevel and separate out some of its content into subfunctions 2019-12-28 11:30:39 +01:00
Jaime Passos 3b341245f1 Same deal, but for starposts. 2019-12-27 17:14:56 -03:00
Jaime Passos f8eed7171a add G_CompetitionGametype(void) 2019-12-27 12:28:00 -03:00
Jaime Passos 9613bdeca6 use GTR_DEATHMATCHSTARTS 2019-12-27 12:14:33 -03:00
Jaime Passos 56e94182d5 P_SetupCamera funny 2019-12-27 02:07:13 -03:00
Alam Ed Arias 61a0197339 Merge branch 'next' into gametype-clownery 2019-12-26 14:48:04 -05:00
Jaime Passos 649455c2d0 R_CalculateSegDistance stuff... 2019-12-26 01:58:38 -03:00
Nev3r a932b54b26 Merge branch 'mapdataload_refactor' into 'next'
Mapdataload refactor

See merge request STJr/SRB2!568
2019-12-25 06:21:49 -05:00
Nev3r c4a017ddf0 Move flat caching code to the map data load function. 2019-12-25 12:05:40 +01:00
Jaime Passos 7e5ec552ee Merge remote-tracking branch 'origin/next' into gametype-clownery 2019-12-25 06:09:00 -03:00
MascaraSnake f11caefed7 Merge branch 'spawnhoopsandrings_refactor' into 'next'
Hack P_SpawnHoopsAndRings into little pieces

See merge request STJr/SRB2!572
2019-12-25 03:00:07 -05:00
Jaime Passos 3622829504 Merge remote-tracking branch 'aaaaaaaa/next' into gametype-clownery 2019-12-24 17:55:46 -03:00
James R 0780e48f86 Merge branch 'titlecard2' into 'next'
More customisable title card

See merge request STJr/SRB2!552
2019-12-24 14:47:55 -05:00
MascaraSnake a57f903933 Move bonus time handling into new function P_SetBonusTime() 2019-12-24 12:52:43 +01:00
MascaraSnake dd01fce1a8 Separate P_SpawnHoopsAndRings into different functions:
-Hoops are spawned in P_SpawnHoop
-Item patterns are spawned in P_SpawnItemPattern
-Ring-like items are spawned normally via P_SpawnMapThing
-Bonus time items are spawned via P_SpawnBonusTimeItem, which is a wrapper for P_SpawnMapThing
2019-12-24 10:50:49 +01:00
Jaime Passos 89b4a558a8 Merge remote-tracking branch 'origin/next' into gametype-clownery 2019-12-23 23:08:16 -03:00
Jaime Passos 630c06b7b0 Turn GTR_CHASECAM into GTR_FIRSTPERSON. 2019-12-23 19:24:06 -03:00
Nev3r 9a9f72f598 Don't reload mapthings in P_LoadThingsOnly() as they should no longer be modified past the mapload procedure. 2019-12-23 16:37:44 +01:00
Nev3r d6a86c37b2 P_PrepareRawThings() is now where it was supposed to be at; moved save and flat & texture caching related functions to the end of P_LoadMapData(). 2019-12-23 16:36:26 +01:00
Nev3r bb54597552 Remove redundant netarchive-related sector vars as they're not used anymore.
Replace lump-based difference checks for sectors in P_NetArchiveWorld(), now it uses the mapload-created copy instead.
2019-12-23 12:42:38 +01:00
Nev3r eadf953957 Store a copy of sectors, lines and sides in memory so that P_NetArchiveWorld() can soon use them instead of relying on re-opening the original lumps.
Fix print type issue.
2019-12-23 12:30:32 +01:00
MascaraSnake 579362fd3b P_LoadMapData(): Throw an error if resources are not found. 2019-12-22 23:22:15 +01:00
MascaraSnake a4fde93fbb Merge branch 'next' into virtres
# Conflicts:
#	src/p_setup.c
2019-12-22 23:02:47 +01:00
Jaime Passos 0accadf02f Merge remote-tracking branch 'origin/next' into gametype-clownery 2019-12-19 02:15:45 -03:00
Jaime Passos ea5e0d28ed More gametype rules yay!! 2019-12-18 01:54:45 -03:00
Jaime Passos 254d812901 More customisable title card
Add TitleCardZigZag, TitleCardZigZagText and TitleCardActDiamond fields to SOC.
Add the same fields to Lua under their internal names.
Turn map header level flags into an UINT16, so that NoTitleCard works. (NOBODY caught this, I'm actually disappointed.)
2019-12-18 00:28:58 -03:00
Jaime Passos e359f802fd Update comments 2019-12-17 16:14:26 -03:00
Jaime Passos cc54163210 Merge remote-tracking branch 'origin/master' into renderswitch 2019-12-17 16:12:44 -03:00
James R 4da57653eb Merge branch 'spawn_z_refactor' into 'next'
(UDMF prereq.) Spawn Z refactor

See merge request STJr/SRB2!536
2019-12-16 23:21:07 -05:00
MascaraSnake 79350992df Some more cleanup of map loading code 2019-12-16 00:17:20 +01:00
MascaraSnake bb3440d021 Minor cleanup of virtual resources code 2019-12-16 00:04:48 +01:00
MascaraSnake 8a6e244e60 SpawnEmeraldHunt() -> P_SpawnEmeraldHunt() 2019-12-15 09:49:54 +01:00
James R 14674223e8 Merge branch 'opengl-is-a-bad-renderer' into 'master'
OpenGL fixes

See merge request STJr/SRB2!519
2019-12-14 16:48:50 -05:00
Jaime Passos b7c7529e75 Don't reset the FOV 2019-12-12 17:06:04 -03:00
Nev3r c64a9d7ae9 Stop things from becoming Chocapic in THZ3, ACZ2, and special stages.
Temporarily revert function call order for mapthings.
2019-12-12 11:37:48 +01:00
Nev3r ec9f727e53 Move map data load procedure to separate functions. 2019-12-12 11:16:55 +01:00
Nev3r 43cbad200c Move loading functions around a bit and refactor the stage data allocation code. 2019-12-12 10:35:38 +01:00
Jaime Passos ea129f701c Fix Ploadflat closing the game with "Too many flats in level" error message 2019-12-11 22:45:47 -03:00
Nev3r a87a9e6ff6 Remove wrappers and dupes for map lump reading, as they are no longer used. 2019-12-11 14:40:31 +01:00
Nev3r 9952bae5ee P_MakeMapMD5() now uses virtres. 2019-12-11 14:20:08 +01:00
Nev3r 4d86dc11a6 'prepare' mapthings using virtres in P_LevelInitStuff(). Whether 'preparing' them or not is actually necessary is another matter. 2019-12-11 13:54:15 +01:00
Nev3r bf5a2c68d5 P_SetupLevel() no longer makes distinction on whether the map is a WAD in a PK3 or not. 2019-12-11 13:22:07 +01:00
Nev3r d2cbdd4fb1 Do not overwrite the mapthing Z when spawning rings and similars, as it now causes them to respawn in wrong places because it is being actually used now. 2019-12-11 11:10:31 +01:00
Jaime Passos 9248f12d55 Merge remote-tracking branch 'origin/master' into renderswitch 2019-12-10 23:01:10 -03:00
Nev3r 8466dc5813 Move mobj spawn Z calculating to a separate function. 2019-12-10 18:03:15 +01:00
Nev3r 3dfa526eea Separate Emerald Hunt emerald spawning into another function. 2019-12-10 14:21:08 +01:00
Nev3r 6fe6db8e18 Removed seemingly redundant (and incorrect) mapthing Z load code.
The proper code seems to sit inside P_SpawnMapThing() and the SpawnHoop functions. Time will tell if I've actually commited an atrocity.
2019-12-09 14:05:22 +01:00
Nev3r 8ea7dd418a Move the axis spawning code out of the mapthing read function, and read the mapthing z in the mapthing read function. 2019-12-09 13:26:31 +01:00
Alam Ed Arias e91a689478 Merge branch 'master' into opengl-is-a-bad-renderer 2019-12-08 12:50:45 -05:00
Alam Ed Arias 1d0cd586ba P_AddWadFile: the PK3 may not have folders 2019-12-08 12:35:21 -05:00
Jaime Passos d74f2a003b HWR_FreeMipmapCache already calls HWR_FreeMipmapCache indirectly
(done by calling HWR_LoadTextures, which in turn calls HWR_FreeTextureCache)
2019-12-08 04:40:29 -03:00
Jaime Passos 4c808cb7e2 Actually don't even call HWR_FreeMipmapCache between levels because I feel like it's futile outside of PWAD loading 2019-12-08 04:32:25 -03:00
Jaime Passos cc12496e9c Optimize mipmaps 2019-12-08 03:23:37 -03:00