mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-09 10:21:53 +00:00
Compare commits
50 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49beb6b74b | ||
|
|
0d54b41983 | ||
|
|
d3eb26a8c0 | ||
|
|
14f8e94e7d | ||
|
|
4a9d1927c4 | ||
|
|
8a5f548f87 | ||
|
|
515b1e3770 | ||
|
|
8863004dc2 | ||
|
|
14985f6852 | ||
|
|
45c48168ef | ||
|
|
b642e64982 | ||
|
|
cb4ae5b942 | ||
|
|
1367261b8a | ||
|
|
933e1db424 | ||
|
|
2e5c0ed531 | ||
|
|
2cff964080 | ||
|
|
e77b192d90 | ||
|
|
cc4bd8f5fd | ||
|
|
3b0560052d | ||
|
|
578dea4b3b | ||
|
|
5c9993bbca | ||
|
|
1bea669e8a | ||
|
|
34697855d4 | ||
|
|
f11b88fa1f | ||
|
|
3060f456d3 | ||
|
|
ef1c653e85 | ||
|
|
5e3c9e5c92 | ||
|
|
f98dc74aa0 | ||
|
|
0401d0b4b3 | ||
|
|
64e5bb4954 | ||
|
|
b2d15865df | ||
|
|
252eca52c4 | ||
|
|
1add66786c | ||
|
|
b941974911 | ||
|
|
b0a06771a2 | ||
|
|
5cc230fe7f | ||
|
|
6ebba60f23 | ||
|
|
f97c3a7340 | ||
|
|
0cd45e5982 | ||
|
|
73b71af9a6 | ||
|
|
ea7076f576 | ||
|
|
edc456050b | ||
|
|
c64ecb0d0a | ||
|
|
2db890dd27 | ||
|
|
d02e1b1573 | ||
|
|
80cd3de286 | ||
|
|
9ddcc66baa | ||
|
|
ffc9400799 | ||
|
|
d73a42cf02 | ||
|
|
ac8d0e7758 |
72 changed files with 1433 additions and 4429 deletions
|
|
@ -24,34 +24,6 @@ if(APPLE)
|
|||
enable_language(OBJC)
|
||||
endif()
|
||||
|
||||
##### PACKAGE CONFIGURATION #####
|
||||
|
||||
set(SRB2_CPACK_GENERATOR "" CACHE STRING "Generator to use for making a package. E.g., ZIP, TGZ, DragNDrop (OSX only). Leave blank for default generator.")
|
||||
|
||||
if("${SRB2_CPACK_GENERATOR}" STREQUAL "")
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
|
||||
set(SRB2_CPACK_GENERATOR "ZIP")
|
||||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
||||
set(SRB2_CPACK_GENERATOR "TGZ")
|
||||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
|
||||
set(SRB2_CPACK_GENERATOR "TGZ")
|
||||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD")
|
||||
set(SRB2_CPACK_GENERATOR "TGZ")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CPACK_GENERATOR ${SRB2_CPACK_GENERATOR})
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Dr. Robotnik's Ring Racers" CACHE STRING "Program name for display purposes")
|
||||
set(CPACK_PACKAGE_VENDOR "Kart Krew" CACHE STRING "Vendor name for display purposes")
|
||||
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${SRB2_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${SRB2_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${SRB2_VERSION_PATCH})
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}")
|
||||
SET(CPACK_OUTPUT_FILE_PREFIX package)
|
||||
include(CPack)
|
||||
|
||||
# Options
|
||||
if("${CMAKE_SYSTEM_NAME}" MATCHES Windows)
|
||||
if(DEFINED VCPKG_TARGET_TRIPLET)
|
||||
|
|
@ -183,7 +155,6 @@ set(GIT_EXECUTABLE "git" CACHE FILEPATH "Path to git binary")
|
|||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(assets)
|
||||
|
||||
include(GitUtilities)
|
||||
|
||||
|
|
|
|||
12
assets/.gitignore
vendored
12
assets/.gitignore
vendored
|
|
@ -1,12 +0,0 @@
|
|||
*.srb
|
||||
*.pk3
|
||||
*.dta
|
||||
*.wad
|
||||
*.txt
|
||||
*.kart
|
||||
!README.txt
|
||||
!HISTORY.txt
|
||||
!LICENSE.txt
|
||||
!LICENSE-3RD-PARTY.txt
|
||||
!CMakeLists.txt
|
||||
!debian-template/*
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
## Assets Target Configuration ##
|
||||
|
||||
if(${CMAKE_SYSTEM} MATCHES Linux)
|
||||
# Asset installation isn't part of the Linux target
|
||||
return()
|
||||
endif()
|
||||
|
||||
if("${SRB2_CONFIG_ASSET_DIRECTORY}" STREQUAL "")
|
||||
message(WARNING "SRB2_CONFIG_ASSET_DIRECTORY is not set, so installation will not contain data files.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
get_filename_component(SRB2_ASSET_DIRECTORY_ABSOLUTE "${SRB2_CONFIG_ASSET_DIRECTORY}" ABSOLUTE)
|
||||
|
||||
set(SRB2_ASSETS_DOCS
|
||||
"README.txt"
|
||||
"HISTORY.txt"
|
||||
"README-SDL.txt"
|
||||
"LICENSE.txt"
|
||||
"LICENSE-3RD-PARTY.txt"
|
||||
)
|
||||
list(TRANSFORM SRB2_ASSETS_DOCS PREPEND "/")
|
||||
list(TRANSFORM SRB2_ASSETS_DOCS PREPEND "${SRB2_ASSET_DIRECTORY_ABSOLUTE}")
|
||||
|
||||
####################
|
||||
# POST-V2.2 NOTE: Do not forget to add patch.pk3 to the end of this list!
|
||||
####################
|
||||
|
||||
set(SRB2_ASSETS_GAME
|
||||
"bios.pk3"
|
||||
"gfx.pk3"
|
||||
"textures_General.pk3"
|
||||
"textures_OriginalZones.pk3"
|
||||
"textures_SEGAZones.pk3"
|
||||
"chars.pk3"
|
||||
"maps.pk3"
|
||||
"followers.pk3"
|
||||
"patch.pk3"
|
||||
"scripts.pk3"
|
||||
"staffghosts.pk3"
|
||||
"unlocks.pk3"
|
||||
)
|
||||
list(TRANSFORM SRB2_ASSETS_GAME PREPEND "/")
|
||||
list(TRANSFORM SRB2_ASSETS_GAME PREPEND "${SRB2_ASSET_DIRECTORY_ABSOLUTE}")
|
||||
|
||||
set(SRB2_ASSETS ${SRB2_ASSET_DOCS} ${SRB2_ASSETS_GAME})
|
||||
|
||||
# Installation
|
||||
|
||||
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||
get_target_property(outname SRB2SDL2 OUTPUT_NAME)
|
||||
install(FILES ${SRB2_ASSETS} DESTINATION "${outname}.app/Contents/Resources")
|
||||
install(DIRECTORY "${SRB2_ASSET_DIRECTORY_ABSOLUTE}/models" DESTINATION "${outname}.app/Contents/Resources")
|
||||
install(FILES ${SRB2_ASSETS_DOCS} DESTINATION .)
|
||||
else()
|
||||
install(FILES ${SRB2_ASSETS} DESTINATION .)
|
||||
install(DIRECTORY "${SRB2_ASSET_DIRECTORY_ABSOLUTE}/models" DESTINATION .)
|
||||
endif()
|
||||
|
|
@ -1,202 +0,0 @@
|
|||
KartKrew: Chapter 1.0 - Who Would Actually Read All This???? [LIVE DOC]
|
||||
|
||||
|
||||
-beep-
|
||||
|
||||
|
||||
[Chromatian dual-wields onto the interview set, stage left, and takes a seat next to VelocitOni. Oni stands up to look at the confused camera-men before opening a binder to stoically show both of his redone Tails sprites for Kart 1.0 and Vanilla 2.2. He closes it and sits back down, the three sofa cushions being Sryder, toaster, and Lat’s limp timezone’d bodies respectively; throwing arm over the side of the Fooruman pillow]
|
||||
|
||||
Chrome: Uh…......anyway Chaos Zero 64, a Vanilla SRB2 Developer at the time, during the “heyday” of Sonic Riders started working on his own side project of recreating that game in SRB2 v1.09.4. After programming a functional recreation, he went a step further and threw together a new race mode for all of the characters in the playable exe. After THAT, he took it another step further and made a Mario Kart game type as well. A bunch of young mappers (Including current KartKrew™ dev members Blade & I) tossed him a few maps and he called it a complete exe.
|
||||
|
||||
While fully functional, it was as barebones as you could get. Character stats were altered Vanilla stats (lowered jump, speed, no spindash, and no drifting!) weapon rings reskinned into mario items, and a bunch of checkpoints that you had to hit to count as a lap around the course. It was pretty jank, but seeing all of those dents in the core gameplay is what gave way to the inspiration to push it further than what it initially was.
|
||||
|
||||
Oni: There’s only one way to describe how I found it in 1.09.4, and the phrasing kinda caught on (to my pleasure), “ghetto footrace”. It was definitely an absolute MIRACLE at the time to even have SRB2 do anything different from it’s main gameplay scheme, bare ass open maps with collapsing FOFs; and the entire community as a whole was younger… so we all ate it up anyways. Standards were lower, times were simpler, we still really appreciate CZ for trying something ‘new’. When you pulled the wool off though, it was just ghetto footrace with reskinned buttons and totally unique…but also totally random weapon panels.
|
||||
|
||||
|
||||
|
||||
[FlareBlade pops out of loose pipe in the room for some reason and hits his head on a kitchen sink.]
|
||||
|
||||
|
||||
|
||||
Blade: While most of the maps back then harkened back to the simpler style of the 1.09.4 era; and were scrapped as SRB2 as a whole improved, Pipe Speedway has survived all the way to the present, although with a heavy style change, including a new name! (Now Daytona Speedway)
|
||||
|
||||
Oni: [laughs] You really like that map, don’t you?
|
||||
|
||||
Random Audience Member:[shouting] PICK, PICK STARDUST!!
|
||||
|
||||
[The audience member is immediately shot through the heart with striking accuracy... the vote-screen SFX of a map being picked and Palmtree Panic Zone kids screaming "Yeah!" sounds. Cut to SeventhSentinel who just logged into the middle of the room with a shocked expression, smoking quality-controlling Desert Eagle in hand. The audience member's mask falls off, turning out to be Stardust Speedway Battle himself, now dead from the rotation.]
|
||||
|
||||
Sev: Why would Blade do this…?
|
||||
|
||||
|
||||
Chrome: Pipe Speedway opened the PIPES for Kart’s 2.0 development, you could say. [laughs]
|
||||
|
||||
Blade: Well, it WAS the first one to be slope-ified! Mostly as a proof-of-concept to show what could be done. (the rest of you lot were too busy with that “TD” thing…) And then you all went and upstaged it anyway with some of the other maps. [chuckles] //shade
|
||||
|
||||
Oni: Yeah, while we finished ANOTHER full fledged mod, you actually got about 54% done with Pipe Speedway after 4 years! I was impressed. ////clapback
|
||||
|
||||
Chrome: Still, Blade kept the campfire lit while we went in search of food, that takes some dedication.
|
||||
|
||||
Oni: No. That was Blitz-T who continued making entire maps the whole time--
|
||||
|
||||
Blade --Thank you. Overall though, the original kart was more-or-less a side feature of Riders. Never really the main focus of the mod, but without a doubt the most popular part of it. The other two modes never really caught on. (Though we did have that ill-fated “Rivals” mod…) =P
|
||||
|
||||
|
||||
|
||||
Oni: [Holding a knife up to the two] The “what” mod?? Anywho, I was a frequent player of 1.09.4 but never really in the community much until 2.0. It wasn’t until CZ ported his mod to be up to date, that I jumped in with the idea that I actually had enough of a brain to contribute to things… the problem was that my standards from the get-go were way way too high, and my skill as a spriter and general design experience were a lot lower. Nevertheless, when SRB2Riders hype died down, I approached him in DMs with all my expectations and ideas for his mod...and… surprisingly he didn’t laugh me out! I guess he’d never had anyone directly tell him they’d help outright before (besides Ground The Fox), but he was a bit noticeably bummed that I only cared for what he’d considered the minor Mario mod within the mod.
|
||||
|
||||
This is what kickstarted the chain of events. All my plans that I bugged CZ for every other day in PMs never came to fruition, he actually lost interest and began to slowly fade out of the SRB2 community as a whole. Instead out of LITERALLY nowhere, D00D64 decided to revive the SRB2Riders mod himself by releasing a pretty expansive mod...of a mod within a mod OF a mod himself. Naturally, everyone jumped onto this, it exploded in popularity pretty much right away, because there were finally more than just a few mediocre maps to play “kart mode” on. There were PORTS, glorious glorious ports. Of course, I flocked to D00D to help out.
|
||||
|
||||
|
||||
|
||||
Blade: Flat, boring, ports. Though the crazy item spam helped. Also we FINALLY got DRIFTING! Separating the characters from the bloat of the other 2 modes also made making custom racers easier to make.
|
||||
|
||||
|
||||
|
||||
Oni: ...yeah, the truth is, once the “D00DKart” era started, it didn’t help that there were so many more por-- er, maps to play kart-mode on that people realized the formula for a kart racer was just inherently more exciting than what CZ’d pulled off with the Riders half of it. I remember a LOT of content for kart, and then like 2 maps for the more fleshed out and polished main focus of the thing. Everyone just sorta... forgot about Riders mode, sadly. It didn’t help that someone else also exploded onto the scene in a siamese feedback loop once D00D churned out enough maps a day to actually make a full game out of; ZarroTsu, who also saw opportunity too.
|
||||
|
||||
D00DKart and “Super SRB2Kart Z”, a continuation of ChaosZero’s mod, combined into one super project. A ‘team’ just kinda assembled naturally out of this, and more original content started to, slowly but surely, get made by a wider variety of people. The train continued to accelerate, lots of familiar faces coming into play. All the basics you’d expect out of a Mario Kart clone were coded by Zarro, basically updates every single day, stuff just kept getting done by this specific group of people.
|
||||
|
||||
|
||||
|
||||
Chrome: That’s about when things for kart started to die down. D00DKart kept the entire game afloat, but Kart was always a sideline to Vanilla. Once D00DKart finally got comfortable, people moved back to Vanilla to see what else they could do with that. Servers stopped popping up as quickly as they used to, and eventually Super SRB2 Kart Z fell into obscurity. It was at this point that the small group still excited for the game tried to push for an even better project.
|
||||
|
||||
|
||||
|
||||
Oni: Yep. When steam on this makeshift game finally died, Zarro lost interest too, and outright just vanished for a year or two(?) and when then, when he returned, he had very little momentum to continue. So in the meanwhile we kinda came closer together under the team “Kart Krew”, and in his place Sryder took the helm. Zarro’s vision was always to be a Mario clone, so when he was absent I wanted to push my idea of getting rid of most if not all references to Mario pronto, going for a Sonic aesthetic instead. The idea was that we’ll never be as good as a Nintendo game, and comparisons will always be drawn, so why not do something more unique?
|
||||
|
||||
Progress boomed again, but in private this time. 2013 ended up being the “2.0 indev” period. Standards kept increasing and increasing internally, because no one was satisfied with “ghetto footrace” anymore, we grew out of it and wanted an actual game this time… not play-pretend with all the instathrust hacks and poor game design decisions we were left with. Like shields.
|
||||
|
||||
NOBODY liked those shields. We just couldn’t force Zarro to do what he didn’t want with his mod of a mod in a mod of a mod.
|
||||
|
||||
|
||||
|
||||
Chrome: [laughs] Whirlwind was just a bit too broken for everyone.
|
||||
|
||||
|
||||
|
||||
Oni: Using a Whirlwind Shield felt like playing a game of fucking Twister with my fingers just to reach the convoluted buttons, and you’re rewarded with the equivalent of bomb-jumping into the sky, except your kart is a runaway shower tub on pig grease. Awful. But good going, you ruined the entire race! Your slap on the wrist is now an unavoidable Armageddon Shield to the entire server by that Brazilian player who accidentally somehow made it to Lap 2 by RNG.
|
||||
|
||||
Mechanics were being edited, handling changed a bit, sprites were getting updated (notably the karts themselves), videos were being released from each of our channels, maps were bloating, notorious bug fixes at light speed. Unfortunately, literally at the same time, the new “Kart Krew” decided to sink their teeth into the Top Down experiment (we were on a high of too much confidence from all the progress) WHILE the release of Vanilla 2.1 invalidated all thre-- BOTH of our projects in one fell swoop. These were the dark ages, and it only got worse when I decided to disappear TOO before TD even got done. The story behind that development cycle (Top Down took all our Kart focus away when it was in progress) is known by now, but the real unexpected meat happened when we finally pushed that abortion out the door.
|
||||
|
||||
|
||||
|
||||
Chrome: You probably should have listened to Blade and stuck with our guns on Kart, and not take a “break” for a new experiment. [laughs]
|
||||
|
||||
|
||||
|
||||
[A silhouette outside the window in the rain can be seen with glowing cones, waving. Before anyone can process it, American Airlines smashes through the studio. For some reason Charybdizs walks out of the left-frontmost hatch]
|
||||
|
||||
|
||||
Charyb: For the record, Top Down wasn't bad by any means! People are just jumping on it because its dev cycle was complicated and a big learning experience for everyone. There were numerous members who poured their hearts into it! I’m proud of them! But yeah… the dev cycle…
|
||||
|
||||
[wolfs can be seen frantically searching for a point in this interview to be relevant, unscheduled anime forcing him to miss most of it]
|
||||
|
||||
|
||||
wolfs: Oh man, TD’s dev cycle. What a shitshow. You’d either get a response in 3 seconds or 3 days depending on who was around. Motivation was at an all-time low back then. I felt like I was talking into a vacuum sometime--
|
||||
|
||||
Oni: Why the fuck would you interrupt THIS moment, talking about 3 day responses when you’ll be “online” and won’t say anything until Kony’s live fucking body is found. Get outta here.
|
||||
|
||||
wolfs: says the guy who disappeared for two years
|
||||
|
||||
Oni: 'ey fuk you mane
|
||||
|
||||
[Oni can be seen across the room from the plane, his TD_PTSD.td filled breathing into a brown paper bag]
|
||||
|
||||
Oni: No, if Top Down were bad it wouldn’t have made half the hype of what Kart is doing now by ITSELF and manage to make it on Retro’s front page. But the dev cycle was purgatory, a big explosion at the start that dwindled to a candlefire, put out by the rain of inactivity...and then reignited by the power of Discord Chat. The actual product itself was pretty decent, and another fresh multiplayer experience not ever done in SRB2. It had hype.
|
||||
|
||||
|
||||
Blade: ...When you say the karts were updated, you mean “Oni nit-picked them to death and redid them like 10 times”.
|
||||
|
||||
Oni: I wish he were joking about that number.
|
||||
|
||||
|
||||
|
||||
Chrome: It all worked out for the better though. That (rather lengthy!) experiment taught us a lot about time management and what not to do for the far more important modification. Discord got popular around this time, and Top Down hopped into that plane, and quickly parachuted out into the community. This gathered a few new, very important members into KartKrew™. TehRealSalt, host of the Sugoi series, Seventh Sentinel, a new mapper with a fresh take on level design, and toaster, a Vanilla dev programmer with a fire for Kart so hot keeping up with her pace is a job in itself. Seriously, without these three members, Kart wouldn’t have the polish it does now.
|
||||
|
||||
It’s around this time that the pioneer in Kart level design returned, Blitz-T. Every map he made for 2.0 indev kart was a jawdropper to everyone on the team, and his attention to the small details were more than impressive. On top of all of this, SRB2 version 2.1 supported sloped planes, something that was as unbelievable for this game as cell phones were back in the 50s.
|
||||
This is where 2.1 Kart really started to shine, Zarro ported the entire game in the span of a few weeks, Blitz-T took his old maps and revamped them with slopes to nearly unrecognizable new iterations, TehRealSalt made the entire Battle mode in the span of a *single* night, and Seventh Sentinel finally gave us looped music and consistent sound quality.
|
||||
|
||||
|
||||
|
||||
Blade: Yeah, they really picked up the slack of some of the older members that lost steam, such as myself.
|
||||
|
||||
|
||||
|
||||
Oni: Sev, Sal, and toast were the most unexpected things to ever happen to this thing. This shit was literally overnight. It’s really crazy how new blood can help bring a new perspective and vision to the game, along with skills you didn’t know the team was lacking. SO much pressure was taken off of Sryder as Sal and toaster literally slapped the exe until it cried, like frame-perfect Ice Climber handoffs into a 300% wobble. EVERYONE was overwhelmed. I saw the chance and took it, so we decided to go with my vision while Zarro took a backseat. Most, if not all the remaining broken code was just thrown out the window at this point, the game was rapidly feeling cleaner in just nights.
|
||||
|
||||
If you took your eyes off of it for a few hours, something changed massively. The physics went from instathrust to momentum based, Zarro coded new acceleration code, toaster put in 2.2 friction physics as a test that turned out overwhelmingly positive...and also divisive with the previous vision of the mod. These changes were all happening so fast, despite being in kinda stored with me idea-wise for years, that it caused a bit of a rift in what this game was supposed to be. Zarro decided to take a step back and dip because it’d changed so much in just the span of 4 months, he took one good look at 4-Player Splitscreen… a never seen before feat, and just breathed. It didn’t feel like his mod anymore, his personal connection with it felt lost…
|
||||
|
||||
[Oni wiping sweat off his brow] Things only got more drastically revamped… very very rapidly.
|
||||
|
||||
The Mario aesthetic was entirely tossed out, as Sal was willing to work with me night and day on redoing most of everything about items… and then sounds. My power level for sprites massively jumped during TD development, so I decided to take it upon myself to do almost everything. They’re such friendly and cooperative coders that I can’t help but push a little harder than I used to (I was WAY lazier before they got here) to keep up.
|
||||
|
||||
|
||||
|
||||
|
||||
Chrome: Those kart sprites took a good 6 months longer than they needed to for sure! [laughs]
|
||||
|
||||
|
||||
|
||||
|
||||
Oni: [laughs in Latin] It’s not as easy as sloping a single sector in Misty Maze, that’s for sure!
|
||||
|
||||
The mappers went bonkers, especially Blitz-T and TyrannoChao aka “Ezo” (previously ChaoticChao) who’s content probably makes up half the game combined. The creative freedom and supportive style/mentality of how the team is led pretty much went to an unstoppable feedback loop of content AND polish, surprisingly. We got to a point where we could not only lay any remaining ChaosZero64 code that might’ve seeped to rest, but also throw out almost every direct Mario port or reference right down to the sounds. It became a Sonic game, in one year.
|
||||
|
||||
|
||||
Blade: Stuff was added so rapidly, even right up to release it always felt like there was something new being added. Bonuschars alone got 2 extra characters added in the week before release!
|
||||
|
||||
Oni: Really, if you asked me, I’d say that most of kart just happened since TD released til now, and the rest was just a confused fever dream of passing torches until it all just got thrown out and re-done anyway. That’s why a changelog is pretty pointless, it’s like going to a shop...sitting down…and getting a recommendation for your vehicle; but the paper’s blank and just reads “get new car”. Honestly, playing this and playing the old 2.0 public builds that people like Super Chris still host for some reason is like aging backwards, except you’re really just amputating your skeleton to appear small and young again, it’s HORRIBLE. So if they all liked that… hopefully they’ll like an actually good game...even more??
|
||||
|
||||
[Sounds of an angry midnight release crowd erupting outside, muffled. D00D64 can be seen at the forefront...slapping yet another unnaturally high quality gif meme onto the glass window. The camera pans out, there’s hundreds of gif memes all over the outer walls]
|
||||
|
||||
Oni: Is it midnight?? I told them to fuck off, there’s no midnight release! @Chromatian FIND SOMETHING TO SAY AFTER ME TO CLOSE THIS UP ALREADY
|
||||
|
||||
Chrome: [this shitty Iwata Asks atmosphere cracking at the seams of its own immersion, reality warping his professional and calm demeanor, but he laughs regardless...shakily] You just don’t know when to stop!!
|
||||
|
||||
[TehRealSalt struggles trying to get into the room through the tiny doggy door for 5 awkward minutes, before giving up and just opening the door] … [she doesn’t know what to say.]
|
||||
|
||||
Oni: EZO
|
||||
|
||||
[The towering dinosaur just nonchalantly sits in his chair on-stage, legs crossed, resting his head on his hand]
|
||||
|
||||
Ezo: Sticky Kart was a shitshow. [referring to the old controls/physics]
|
||||
|
||||
Oni: holy shit YOU CAN’T SAY THAT ZARRO MIGHT BE READING
|
||||
|
||||
Ezo: I have no regretties. Except for maybe Arid S--wait, that’s a secret, isn’t it? Hm. Anyway, yeah, working on this was fun. Usually. Learning to sprite was annoying but it paid off since I got to cram Wonder Boy in everyone’s faces like the scaly fucko I am. Though Gamma’s pretty cool too. I hope you all enjoy my Sonic Adventure references and that you all suffer an appropriately huge amount in Egg Quarters and Spotlight Syndicate.
|
||||
|
||||
Oni: THIS IS A NON FURRY DOCUMENT :boi:
|
||||
|
||||
Ezo: Speciesism UwU
|
||||
|
||||
|
||||
|
||||
Boinciel: [screaming from a speaker contained offstage] HI MY NAME IS BOINCIEL I DESIGNED KART MAPS TO DESTROY YOUR EYES AND/OR YOUR SOUL OKAY BYE I HAVE TO DO MY JOB NOW
|
||||
|
||||
|
||||
Oni: With a map like Kodachrome…..clearly...
|
||||
|
||||
[Off in the corner, a lone wooden coat rack stands, although upon further inspection... It turns out to be, well, CoatRack in a disguise!]
|
||||
|
||||
[The entire server pauses for Coat to come up with something]
|
||||
|
||||
Coat: You know, these guys all did an awesome job. The controls, the graphics, music too! I just, uh… Had an engine stall on my map, sad how many times I ran out of fuel at a petroleum refinery when making it. Huh. But as one of the more outside members of the krew, just ask anyone, I could be placed under the decorative ornament members with how rarely I dropped in. But each time I did I was blown away by the leaps and bounds, filling me with joy to see this racer come to life. Even if I am a living example of why inanimate objects shouldn’t drive!
|
||||
|
||||
[The entire Krew stares at the literal coat rack, smiling wholesomely until Blade opens his mouth]
|
||||
|
||||
Blade: Whatever. Enough talking, LET’S GO AWAY!!!!!!!! DAYTONNNAAAAAAAAAAAAAAAA
|
||||
|
||||
|
||||
[...the .txt file itself cringes to a halt.]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
doot
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,339 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
SONIC ROBO BLAST 2 KART
|
||||
|
||||
SRB2Kart is a kart racer based on SRB2, the 3D Sonic the Hedgehog
|
||||
fangame based on a modified version of Doom Legacy.
|
||||
|
||||
LICENSE
|
||||
|
||||
The source code for SRB2 & SRB2Kart is licensed under the GNU General
|
||||
Public License, Version 2. See LICENSE.txt for the full text of this
|
||||
license.
|
||||
|
||||
SRB2 & SRB2Kart uses various third-party libraries, including SDL, SDL
|
||||
Mixer, and their dependencies. See LICENSE-3RD-PARTY.txt for the
|
||||
licenses of these libraries.
|
||||
|
||||
SOURCE CODE
|
||||
|
||||
You may obtain the source code for SRB2Kart, including the source code
|
||||
for specific version releases, at the following web site:
|
||||
|
||||
STJr GitLab:
|
||||
https://git.magicalgirl.moe/KartKrew/Kart-Public
|
||||
|
||||
You may obtain the source code for the parent game, SRB2, at the
|
||||
following web sites:
|
||||
|
||||
STJr GitLab:
|
||||
https://git.magicalgirl.moe/STJr/SRB2
|
||||
|
||||
GitHub:
|
||||
https://github.com/STJr/SRB2
|
||||
|
||||
CONTACT
|
||||
|
||||
You may contact Kart Krew via the following web site:
|
||||
|
||||
Kart Krew Official Discord:
|
||||
https://discord.gg/WJmqDtN
|
||||
|
||||
You may contact Sonic Team Junior via the following web sites:
|
||||
|
||||
SRB2.ORG:
|
||||
https://www.srb2.org
|
||||
|
||||
SRB2 Message Board:
|
||||
https://mb.srb2.org
|
||||
|
||||
SRB2 Official Discord:
|
||||
https://discord.gg/pYDXzpX (13+)
|
||||
|
||||
COPYRIGHT AND DISCLAIMER
|
||||
|
||||
Design and content on SRB2Kart is copyright 2020 by Kart Krew.
|
||||
Design and content on SRB2 is copyright 1998-2020 by Sonic Team Junior.
|
||||
All non-original material on SRB2.ORG is copyrighted by their
|
||||
respective owners, and no copyright infringement is intended. The owner
|
||||
of the SRB2.ORG domain is only acting as an ISP, and is therefore not
|
||||
responsible for any content on SRB2.ORG under the 1998 DMCA. This
|
||||
site, its webmaster, and its staff make no profit whatsoever (in fact,
|
||||
we lose money). Sonic Team Junior assumes no responsibility for the
|
||||
content on any Sonic Team Junior fan sites.
|
||||
|
||||
Kart Krew nor Sonic Team Junior is in no way affiliated with SEGA or
|
||||
Sonic Team. We do not claim ownership of any of SEGA's intellectual
|
||||
property used in SRB2 or SRB2Kart.
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
srb2 for Debian
|
||||
---------------
|
||||
|
||||
SRB2 Debian package!
|
||||
Hi there, to rebuild this package just use the SRB2 Makefile system, or, optionally, run
|
||||
dpkg-buildpackage in the in /assets directory. You can build these with or without a key
|
||||
if you want, but if you want to put these on a repo, generate your own GnuPG key as per the
|
||||
https://help.ubuntu.com/community/GnuPrivacyGuardHowto instructions and pass the -k<keyid>
|
||||
command to debuild. Make sure you export the key footprint and give them to your users to install
|
||||
with apt-key add. Thanks!
|
||||
|
||||
-- Callum Dickinson <gcfreak_ag20@hotmail.com> Fri, 26 Nov 2010 18:25:31 +1300
|
||||
|
||||
|
||||
---------------
|
||||
|
||||
|
||||
Templating
|
||||
|
||||
Note that you MUST run [repo-root]/debian_template.sh before running debuild
|
||||
on these scripts! debian_template.sh fills these template files with working values.
|
||||
|
||||
You should also set PACKAGE_NAME_EMAIL="John Doe <jdoe@example.com>" to match
|
||||
the identity of the key you will use to sign the package.
|
||||
|
||||
|
||||
Building for Launchpad PPA
|
||||
|
||||
Run this step first:
|
||||
|
||||
1. source [repo-root]/debian_template.sh
|
||||
* Initializes defaults for the package variables and fills in templates.
|
||||
|
||||
Use these steps to prepare building a source package for Launchpad:
|
||||
|
||||
1. cd [repo-root]/assets/
|
||||
2. debuild -T clean-all (optional; if you already have asset files, this clears them)
|
||||
|
||||
Build the source package:
|
||||
|
||||
1. debuild -T build (this downloads the asset files from srb2.org if necessary)
|
||||
2. debuild -S (builds the source package for Launchpad, including the asset files)
|
||||
|
||||
|
||||
Signing for Launchpad PPA
|
||||
|
||||
First, follow Callum's instructions to generate a GnuPG key with your identity. You will need
|
||||
to publish the fingerprint of that key to Ubuntu's key server.
|
||||
|
||||
https://help.ubuntu.com/community/GnuPrivacyGuardHowto#Uploading_the_key_to_Ubuntu_keyserver
|
||||
|
||||
Next, you will have to add that key fingerprint to your Launchpad account. Go to your Launchpad
|
||||
profile and click the yellow Edit button next to "OpenPGP keys". Once you add the key, you can
|
||||
upload signed source packages and publish them onto your PPA.
|
||||
|
||||
IF YOU UPLOAD A PACKAGE and Launchpad does NOT send you a confirmation or rejection email, that
|
||||
means your key is not set up correctly with your Launchpad account.
|
||||
|
||||
Finally, if your packages have not already been signed, follow these steps:
|
||||
|
||||
1. cd ..
|
||||
* Packages are located in the parent folder of where debuild was called
|
||||
2. debsign "srb2-data_[version]_source.changes"
|
||||
* You may need to specify -k [key-fingerprint]
|
||||
|
||||
|
||||
Uploading for Launchpad PPA
|
||||
|
||||
Follow the instructions at <https://help.launchpad.net/Packaging/PPA/Uploading> to upload
|
||||
to your PPA and have Launchpad build your binary deb packages.
|
||||
|
||||
|
||||
-- Marco Zafra <marco.a.zafra@gmail.com> Mon, 26 Nov 2018 21:13:00 -0500
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
srb2-data for Debian
|
||||
---------------
|
||||
|
||||
Look in main SRB2 README.source for more information.
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
${PACKAGE_NAME}-data (${PACKAGE_VERSION}${PACKAGE_SUBVERSION}${PACKAGE_REVISION}) ${PACKAGE_DISTRO}; urgency=${PACKAGE_URGENCY}
|
||||
|
||||
* ${PROGRAM_NAME} v${PROGRAM_VERSION} asset data
|
||||
|
||||
-- ${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
|
||||
|
|
@ -1 +0,0 @@
|
|||
7
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
# SRB2-data Debian package control file.
|
||||
|
||||
Source: ${PACKAGE_NAME}-data
|
||||
Section: games
|
||||
Priority: extra
|
||||
Maintainer: ${PACKAGE_GROUP_NAME_EMAIL}
|
||||
Build-Depends: debhelper (>= 7.0.50~),
|
||||
wget
|
||||
Standards-Version: 3.8.4
|
||||
Homepage: ${PACKAGE_WEBSITE}
|
||||
|
||||
Package: ${PACKAGE_NAME}-data
|
||||
Architecture: all
|
||||
Description: A cross-platform 3D Sonic fangame
|
||||
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog
|
||||
fangame built using a modified version of the Doom Legacy
|
||||
port of Doom. SRB2 is closely inspired by the original
|
||||
Sonic games from the Sega Genesis, and attempts to recreate
|
||||
the design in 3D. It features tons of levels, enemies, speed,
|
||||
and quite a lot of the fun that the original Sonic games provided.
|
||||
This is the data package that provides the data files that
|
||||
SRB2 requires to run; it will not work without it.
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
This work was packaged for Debian by:
|
||||
|
||||
${PACKAGE_NAME_EMAIL} ${__PACKAGE_DATETIME}
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
${PACKAGE_WEBSITE}
|
||||
|
||||
Upstream Author(s):
|
||||
|
||||
${PACKAGE_GROUP_NAME_EMAIL}
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 1998-2018 by Sonic Team Junior
|
||||
|
||||
License:
|
||||
|
||||
GNU General Public License, version 2
|
||||
|
||||
The Debian packaging is:
|
||||
|
||||
Copyright (C) 2010 Callum Dickinson <gcfreak_ag20@hotmail.com>
|
||||
Copyright (C) 2010-2018 by Sonic Team Junior <stjr@srb2.org>
|
||||
|
||||
and is licensed under the GPL version 2,
|
||||
see "/usr/share/common-licenses/GPL-2".
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# GNU Make Debian package makefile for SRB2-data
|
||||
#
|
||||
# Copyright (C) 1998-2011 by Callum Dickinson
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# This file most likely will not need to be modified to make
|
||||
# branches of SRB2 capable of making their own Debian packages,
|
||||
# instead look at the /debian/control file for configuration.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# !!!!!!!!!! DEPLOYER NOTE !!!!!!!!!!
|
||||
#
|
||||
# Variables to be templated are curly-braced ${PACKAGE_INSTALL_PATH}
|
||||
# Variables used by the rules script are parenthese'd $(DATADIR)
|
||||
# See [repo-root]/debian_template.sh
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
# user/group of to-be-installed files
|
||||
ROOT_USER := 0
|
||||
ROOT_GROUP := 0
|
||||
|
||||
MKDIR := mkdir -p
|
||||
INSTALL := install -o $(ROOT_USER) -g $(ROOT_GROUP) -m 644
|
||||
MV := mv
|
||||
RM := rm -rf
|
||||
DIR := $(shell pwd)
|
||||
|
||||
PACKAGE := $(shell cat $(DIR)/debian/control | grep 'Package:' | sed -e 's/Package: //g')
|
||||
ARCHIVEPATH := ${ASSET_ARCHIVE_PATH}
|
||||
ARCHIVEOPTIONALPATH := ${ASSET_ARCHIVE_OPTIONAL_PATH}
|
||||
GETOPTIONALFILES := ${ASSET_FILES_OPTIONAL_GET}
|
||||
|
||||
DATADIR := $(shell echo "${PACKAGE_INSTALL_PATH}" | sed -e 's/^\///')
|
||||
RESOURCEDIR := .
|
||||
STAGINGDIR := $(RESOURCEDIR)/installer
|
||||
WGET := wget -P $(RESOURCEDIR) -c -nc
|
||||
|
||||
build:
|
||||
$(MKDIR) $(DIR)/debian/tmp/$(DATADIR)
|
||||
> $(DIR)/debian/source/include-binaries
|
||||
# Copy data files to their install locations, and add data files to include-binaries
|
||||
if [ ! -d $(STAGINGDIR) ]; then \
|
||||
mkdir -p "$(STAGINGDIR)"; \
|
||||
$(WGET) $(ARCHIVEPATH); \
|
||||
7z x "$(RESOURCEDIR)/$(shell basename $(ARCHIVEPATH))" -aos; \
|
||||
if [ "$(GETOPTIONALFILES)" = "1" ]; then \
|
||||
$(WGET) $(ARCHIVEOPTIONALPATH); \
|
||||
7z x "$(RESOURCEDIR)/$(shell basename $(ARCHIVEOPTIONALPATH))" -aos; \
|
||||
fi; \
|
||||
fi
|
||||
# Install asset directory and add asset file to include-binaries
|
||||
cp -vr "$(STAGINGDIR)/." "$(DIR)/debian/tmp/$(DATADIR)"
|
||||
find "$(STAGINGDIR)" >> $(DIR)/debian/source/include-binaries
|
||||
|
||||
|
||||
binary-indep:
|
||||
# Generate install folder file
|
||||
echo $(DATADIR) > $(DIR)/debian/$(PACKAGE).install
|
||||
|
||||
binary-arch:
|
||||
# only here to kill Lintian warning
|
||||
echo "no need to do any arch-specific stuff"
|
||||
|
||||
binary: binary-indep
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs
|
||||
# dh_installdocs
|
||||
# dh_installexamples
|
||||
dh_install --sourcedir=$(DIR)/debian/tmp
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_python
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installinfo
|
||||
# dh_installman
|
||||
# dh_link
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# dh_perl
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
# -dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
clean:
|
||||
$(RM) $(DIR)/debian/tmp/*; \
|
||||
$(RM) $(DIR)/debian/$(PACKAGE).install; \
|
||||
$(RM) $(DIR)/debian/files; \
|
||||
|
||||
clean-all: clean
|
||||
$(RM) $(RESOURCEDIR)/*.wad; \
|
||||
$(RM) $(RESOURCEDIR)/*.dta; \
|
||||
$(RM) $(RESOURCEDIR)/*.plr; \
|
||||
$(RM) $(RESOURCEDIR)/*.wpn; \
|
||||
$(RM) $(RESOURCEDIR)/*.srb; \
|
||||
$(RM) $(RESOURCEDIR)/*.dll; \
|
||||
$(RM) $(RESOURCEDIR)/*.txt; \
|
||||
$(RM) $(DIR)/debian/source/include-binaries; \
|
||||
|
||||
.PHONY: all clean binary binary-arch binary-indep build
|
||||
|
|
@ -1 +0,0 @@
|
|||
3.0 (native)
|
||||
|
|
@ -1 +0,0 @@
|
|||
tar-ignore = "tmp/*"
|
||||
|
|
@ -123,27 +123,25 @@ void VS_Print(vsbuf_t *buf, const char *data); // strcats onto the sizebuf
|
|||
|
||||
// flags for console vars
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CV_SAVE = 1, // save to config when quit game
|
||||
CV_CALL = 2, // call function on change
|
||||
CV_NETVAR = 4, // send it when change (see logboris.txt at 12-4-2000)
|
||||
CV_NOINIT = 8, // dont call function when var is registered (1st set)
|
||||
CV_FLOAT = 16, // the value is fixed 16 : 16, where unit is FRACUNIT
|
||||
typedef INT32 cvflags_t;
|
||||
#define CV_SAVE (1) // save to config when quit game
|
||||
#define CV_CALL (2) // call function on change
|
||||
#define CV_NETVAR (4) // send it when change (see logboris.txt at 12-4-2000)
|
||||
#define CV_NOINIT (8) // dont call function when var is registered (1st set)
|
||||
#define CV_FLOAT (16) // the value is fixed 16 : 16, where unit is FRACUNIT
|
||||
// (allow user to enter 0.45 for ex)
|
||||
// WARNING: currently only supports set with CV_Set()
|
||||
CV_NOTINNET = 32, // some varaiable can't be changed in network but is not netvar (ex: splitscreen)
|
||||
CV_MODIFIED = 64, // this bit is set when cvar is modified
|
||||
CV_SHOWMODIF = 128, // say something when modified
|
||||
CV_SHOWMODIFONETIME = 256, // same but will be reset to 0 when modified, set in toggle
|
||||
CV_NOSHOWHELP = 512, // Cannot be accessed by the console, but it still exists in the cvar list
|
||||
CV_HIDDEN = 1024, // variable is not part of the cvar list so cannot be accessed by the console
|
||||
#define CV_NOTINNET (32) // some varaiable can't be changed in network but is not netvar (ex: splitscreen)
|
||||
#define CV_MODIFIED (64) // this bit is set when cvar is modified
|
||||
#define CV_SHOWMODIF (128) // say something when modified
|
||||
#define CV_SHOWMODIFONETIME (256) // same but will be reset to 0 when modified, set in toggle
|
||||
#define CV_NOSHOWHELP (512) // Cannot be accessed by the console, but it still exists in the cvar list
|
||||
#define CV_HIDDEN (1024) // variable is not part of the cvar list so cannot be accessed by the console
|
||||
// can only be set when we have the pointer to it
|
||||
// used on menus
|
||||
CV_CHEAT = 2048, // Don't let this be used in multiplayer unless cheats are on.
|
||||
CV_NOLUA = 4096,/* don't let this be called from Lua */
|
||||
CV_ADDEDBYLUA = 8192,
|
||||
} cvflags_t;
|
||||
#define CV_CHEAT (2048) // Don't let this be used in multiplayer unless cheats are on.
|
||||
#define CV_NOLUA (4096)/* don't let this be called from Lua */
|
||||
#define CV_ADDEDBYLUA (8192)
|
||||
|
||||
struct CV_PossibleValue_t
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1469,12 +1469,12 @@ consvar_t cv_voice_allowservervoice = NetVar("voice_allowservervoice", "Off")
|
|||
#ifdef HWRENDER
|
||||
consvar_t cv_fovchange = OpenGL("gr_fovchange", "Off").on_off();
|
||||
|
||||
extern CV_PossibleValue_t glshaders_cons_t[];
|
||||
extern "C" CV_PossibleValue_t glshaders_cons_t[];
|
||||
consvar_t cv_glallowshaders = OpenGL("gr_allowclientshaders", "On").on_off().network().dont_save();
|
||||
consvar_t cv_glshaders = OpenGL("gr_shaders", "On").values(glshaders_cons_t);
|
||||
|
||||
extern CV_PossibleValue_t glanisotropicmode_cons_t[];
|
||||
void CV_glanisotropic_OnChange(void);
|
||||
extern "C" CV_PossibleValue_t glanisotropicmode_cons_t[];
|
||||
extern "C" void CV_glanisotropic_OnChange(void);
|
||||
consvar_t cv_glanisotropicmode = OpenGL("gr_anisotropicmode", "1").values(glanisotropicmode_cons_t).onchange(CV_glanisotropic_OnChange);
|
||||
|
||||
consvar_t cv_glbatching = OpenGL("gr_batching", "On").on_off().dont_save();
|
||||
|
|
@ -1486,8 +1486,8 @@ consvar_t cv_voice_allowservervoice = NetVar("voice_allowservervoice", "Off")
|
|||
consvar_t cv_glstaticlighting = OpenGL("gr_staticlighting", "On").on_off();
|
||||
#endif
|
||||
|
||||
extern CV_PossibleValue_t glfiltermode_cons_t[];
|
||||
void CV_glfiltermode_OnChange(void);
|
||||
extern "C" CV_PossibleValue_t glfiltermode_cons_t[];
|
||||
extern "C" void CV_glfiltermode_OnChange(void);
|
||||
consvar_t cv_glfiltermode = OpenGL("gr_filtermode", "Nearest").values(glfiltermode_cons_t).onchange(CV_glfiltermode_OnChange);
|
||||
|
||||
#ifdef BAD_MODEL_OPTIONS
|
||||
|
|
|
|||
|
|
@ -2307,15 +2307,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
}
|
||||
I_UpdateNoVsync(); // page flip or blit buffer
|
||||
|
||||
#ifdef HWRENDER
|
||||
// Only take screenshots after drawing.
|
||||
if (moviemode && rendermode == render_opengl)
|
||||
M_LegacySaveFrame();
|
||||
if (rendermode == render_opengl && takescreenshot)
|
||||
M_DoLegacyGLScreenShot();
|
||||
#endif
|
||||
|
||||
if ((moviemode || takescreenshot) && rendermode == render_soft)
|
||||
if ((moviemode || takescreenshot) && rendermode != render_none)
|
||||
I_CaptureVideoFrame();
|
||||
S_UpdateSounds();
|
||||
S_UpdateClosedCaptions();
|
||||
|
|
@ -2732,7 +2724,7 @@ void CL_RemovePlayer(INT32 playernum, kickreason_t reason)
|
|||
|
||||
K_CheckBumpers();
|
||||
P_CheckRacers();
|
||||
|
||||
|
||||
// Reset map headers' justPlayed and anger records
|
||||
// when there are no players in a dedicated server.
|
||||
// Otherwise maps get angry at newly-joined players
|
||||
|
|
@ -6884,8 +6876,6 @@ boolean TryRunTics(tic_t realtics)
|
|||
|
||||
if (ticking)
|
||||
{
|
||||
boolean tickInterp = true;
|
||||
|
||||
// run the count * tics
|
||||
while (neededtic > gametic)
|
||||
{
|
||||
|
|
@ -6946,12 +6936,9 @@ boolean TryRunTics(tic_t realtics)
|
|||
|
||||
boolean run = (gametic % NEWTICRATERATIO) == 0;
|
||||
|
||||
if (run && tickInterp)
|
||||
if (run)
|
||||
{
|
||||
// Update old view state BEFORE ticking so resetting
|
||||
// the old interpolation state from game logic works.
|
||||
R_UpdateViewInterpolation();
|
||||
tickInterp = false; // do not update again in sped-up tics
|
||||
}
|
||||
|
||||
G_Ticker(run);
|
||||
|
|
|
|||
|
|
@ -570,14 +570,21 @@ static bool D_Display(bool world)
|
|||
memset(screens[0], 32+(timeinmap&15), vid.width * vid.height * vid.bpp);
|
||||
}
|
||||
}
|
||||
|
||||
if (r_splitscreen == 2)
|
||||
{
|
||||
// Draw over the fourth screen so you don't have to stare at a HOM :V
|
||||
V_DrawFill(viewwidth, viewheight, viewwidth, viewheight, 31|V_NOSCALESTART);
|
||||
}
|
||||
}
|
||||
|
||||
if (r_splitscreen == 2)
|
||||
{
|
||||
// Draw over the fourth screen so you don't have to stare at a HOM :V
|
||||
V_DrawFill(viewwidth, viewheight, viewwidth, viewheight, 31|V_NOSCALESTART);
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
VID_BeginLegacyGLRenderPass();
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0; i <= r_splitscreen; i++)
|
||||
{
|
||||
if (players[displayplayers[i]].mo || players[displayplayers[i]].playerstate == PST_DEAD)
|
||||
|
|
@ -641,6 +648,13 @@ static bool D_Display(bool world)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
VID_EndLegacyGLRenderPass();
|
||||
}
|
||||
#endif
|
||||
|
||||
ps_rendercalltime = I_GetPreciseTime() - ps_rendercalltime;
|
||||
R_RestoreLevelInterpolators();
|
||||
}
|
||||
|
|
@ -687,6 +701,10 @@ static bool D_Display(bool world)
|
|||
{
|
||||
VID_DisplaySoftwareScreen();
|
||||
}
|
||||
if (rendermode != render_none)
|
||||
{
|
||||
VID_DisplayRHIPostimg();
|
||||
}
|
||||
|
||||
if (lastdraw)
|
||||
{
|
||||
|
|
@ -1069,15 +1087,7 @@ void D_SRB2Loop(void)
|
|||
ranwipe = D_Display(world);
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
// Only take screenshots after drawing.
|
||||
if (moviemode && rendermode == render_opengl)
|
||||
M_LegacySaveFrame();
|
||||
if (rendermode == render_opengl && takescreenshot)
|
||||
M_DoLegacyGLScreenShot();
|
||||
#endif
|
||||
|
||||
if ((moviemode || takescreenshot) && rendermode == render_soft)
|
||||
if ((moviemode || takescreenshot) && rendermode != render_none)
|
||||
I_CaptureVideoFrame();
|
||||
|
||||
// consoleplayer -> displayplayers (hear sounds from viewpoint)
|
||||
|
|
@ -1233,7 +1243,7 @@ void D_ClearState(void)
|
|||
// In case someone exits out at the same time they start a time attack run,
|
||||
// reset modeattacking
|
||||
modeattacking = ATTACKING_NONE;
|
||||
marathonmode = static_cast<marathonmode_t>(0);
|
||||
marathonmode = 0;
|
||||
|
||||
// Reset GP and roundqueue
|
||||
memset(&grandprixinfo, 0, sizeof(struct grandprixinfo));
|
||||
|
|
|
|||
198
src/d_player.h
198
src/d_player.h
|
|
@ -49,14 +49,12 @@ extern "C" {
|
|||
#define MAXRACESPLITS 32
|
||||
|
||||
// Extra abilities/settings for skins (combinable stuff)
|
||||
typedef enum
|
||||
{
|
||||
SF_MACHINE = 1, // Beep boop. Are you a robot?
|
||||
SF_IRONMAN = 1<<1, // Pick a new skin during POSITION. I main Random!
|
||||
SF_BADNIK = 1<<2, // Explodes on death
|
||||
SF_HIVOLT = 1<<3, // High power TA ringboxes, like 2.0-2.3!
|
||||
// free up to and including 1<<31
|
||||
} skinflags_t;
|
||||
typedef INT32 skinflags_t;
|
||||
#define SF_MACHINE (1) // Beep boop. Are you a robot?
|
||||
#define SF_IRONMAN (1<<1) // Pick a new skin during POSITION. I main Random!
|
||||
#define SF_BADNIK (1<<2) // Explodes on death
|
||||
#define SF_HIVOLT (1<<3) // High power TA ringboxes, like 2.0-2.3!
|
||||
// free up to and including 1<<31
|
||||
|
||||
//
|
||||
// Player states.
|
||||
|
|
@ -71,92 +69,66 @@ typedef enum
|
|||
PST_REBORN
|
||||
} playerstate_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
IF_USERINGS = 1, // Have to be not holding the item button to change from using rings to using items (or vice versa) - prevents weirdness
|
||||
IF_ITEMOUT = 1<<1, // Are you holding an item out?
|
||||
IF_EGGMANOUT = 1<<2, // Eggman mark held, separate from IF_ITEMOUT so it doesn't stop you from getting items
|
||||
IF_HOLDREADY = 1<<3, // Hold button-style item is ready to activate
|
||||
} itemflags_t;
|
||||
typedef INT32 itemflags_t;
|
||||
#define IF_USERINGS (1) // Have to be not holding the item button to change from using rings to using items (or vice versa) - prevents weirdness
|
||||
#define IF_ITEMOUT (1<<1) // Are you holding an item out?
|
||||
#define IF_EGGMANOUT (1<<2) // Eggman mark held, separate from IF_ITEMOUT so it doesn't stop you from getting items
|
||||
#define IF_HOLDREADY (1<<3) // Hold button-style item is ready to activate
|
||||
|
||||
//
|
||||
// Player internal flags
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
PF_GODMODE = 1<<0, // Immortal. No lightsnake from pits either
|
||||
typedef INT32 pflags_t;
|
||||
#define PF_GODMODE (1<<0) // Immortal. No lightsnake from pits either
|
||||
#define PF_UPDATEMYRESPAWN (1<<1) // Scripted sequences / fastfall can set this to force a respawn waypoint update
|
||||
#define PF_AUTOROULETTE (1<<2) // Accessibility: Non-deterministic item box, no manual stop.
|
||||
// Look back VFX has been spawned
|
||||
// TODO: Is there a better way to track this?
|
||||
#define PF_GAINAX (1<<3)
|
||||
#define PF_KICKSTARTACCEL (1<<4) // Accessibility feature: Is accelerate in kickstart mode?
|
||||
#define PF_POINTME (1<<5) // An object is calling for my attention (via Obj_PointPlayersToMobj). Unset every frame!
|
||||
#define PF_CASTSHADOW (1<<6) // Something is casting a shadow on the player
|
||||
#define PF_WANTSTOJOIN (1<<7) // Spectator that wants to join
|
||||
#define PF_STASIS (1<<8) // Player is not allowed to move
|
||||
#define PF_FAULT (1<<9) // F A U L T
|
||||
#define PF_ELIMINATED (1<<10) // Battle-style elimination, no extra penalty
|
||||
#define PF_NOCONTEST (1<<11) // Did not finish (last place explosion)
|
||||
#define PF_LOSTLIFE (1<<12) // Do not lose life more than once
|
||||
#define PF_RINGLOCK (1<<13) // Prevent picking up rings while SPB is locked on
|
||||
#define PF_ANALOGSTICK (1<<14) // This player is using an analog joystick
|
||||
#define PF_TRUSTWAYPOINTS (1<<15) // Do not activate lap cheat prevention next time finish line distance is updated
|
||||
#define PF_FREEZEWAYPOINTS (1<<16) // Skip the next waypoint/finish line distance update
|
||||
#define PF_AUTORING (1<<17) // Accessibility: Non-deterministic item box, no manual stop.
|
||||
#define PF_DRIFTINPUT (1<<18) // Drifting!
|
||||
#define PF_GETSPARKS (1<<19) // Can get sparks
|
||||
#define PF_DRIFTEND (1<<20) // Drift has ended, used to adjust character angle after drift
|
||||
#define PF_BRAKEDRIFT (1<<21) // Helper for brake-drift spark spawning
|
||||
#define PF_AIRFAILSAFE (1<<22) // Whenever or not try the air boost
|
||||
#define PF_TRICKDELAY (1<<23) // Prevent tricks until control stick is neutral
|
||||
#define PF_TUMBLELASTBOUNCE (1<<24) // One more time for the funny
|
||||
#define PF_TUMBLESOUND (1<<25) // Don't play more than once
|
||||
#define PF_HITFINISHLINE (1<<26) // Already hit the finish line this tic
|
||||
#define PF_WRONGWAY (1<<27) // Moving the wrong way with respect to waypoints?
|
||||
#define PF_SHRINKME (1<<28) // "Shrink me" cheat preference
|
||||
#define PF_SHRINKACTIVE (1<<29) // "Shrink me" cheat is in effect. (Can't be disabled mid-race)
|
||||
#define PF_VOID (1<<30) // Removed from reality! When leaving hitlag, reenable visibility+collision and kill speed.
|
||||
#define PF_NOFASTFALL ((INT32)(1U<<31)) // Has already done ebrake/fastfall behavior for this input. Fastfalling needs a new input to prevent unwanted bounces on unexpected airtime.
|
||||
|
||||
PF_UPDATEMYRESPAWN = 1<<1, // Scripted sequences / fastfall can set this to force a respawn waypoint update
|
||||
|
||||
PF_AUTOROULETTE = 1<<2, // Accessibility: Non-deterministic item box, no manual stop.
|
||||
|
||||
// Look back VFX has been spawned
|
||||
// TODO: Is there a better way to track this?
|
||||
PF_GAINAX = 1<<3,
|
||||
|
||||
PF_KICKSTARTACCEL = 1<<4, // Accessibility feature: Is accelerate in kickstart mode?
|
||||
|
||||
PF_POINTME = 1<<5, // An object is calling for my attention (via Obj_PointPlayersToMobj). Unset every frame!
|
||||
|
||||
PF_CASTSHADOW = 1<<6, // Something is casting a shadow on the player
|
||||
|
||||
PF_WANTSTOJOIN = 1<<7, // Spectator that wants to join
|
||||
|
||||
PF_STASIS = 1<<8, // Player is not allowed to move
|
||||
PF_FAULT = 1<<9, // F A U L T
|
||||
PF_ELIMINATED = 1<<10, // Battle-style elimination, no extra penalty
|
||||
PF_NOCONTEST = 1<<11, // Did not finish (last place explosion)
|
||||
PF_LOSTLIFE = 1<<12, // Do not lose life more than once
|
||||
|
||||
PF_RINGLOCK = 1<<13, // Prevent picking up rings while SPB is locked on
|
||||
|
||||
PF_ANALOGSTICK = 1<<14, // This player is using an analog joystick
|
||||
PF_TRUSTWAYPOINTS = 1<<15, // Do not activate lap cheat prevention next time finish line distance is updated
|
||||
PF_FREEZEWAYPOINTS = 1<<16, // Skip the next waypoint/finish line distance update
|
||||
|
||||
PF_AUTORING = 1<<17, // Accessibility: Non-deterministic item box, no manual stop.
|
||||
|
||||
PF_DRIFTINPUT = 1<<18, // Drifting!
|
||||
PF_GETSPARKS = 1<<19, // Can get sparks
|
||||
PF_DRIFTEND = 1<<20, // Drift has ended, used to adjust character angle after drift
|
||||
PF_BRAKEDRIFT = 1<<21, // Helper for brake-drift spark spawning
|
||||
|
||||
PF_AIRFAILSAFE = 1<<22, // Whenever or not try the air boost
|
||||
PF_TRICKDELAY = 1<<23, // Prevent tricks until control stick is neutral
|
||||
|
||||
PF_TUMBLELASTBOUNCE = 1<<24, // One more time for the funny
|
||||
PF_TUMBLESOUND = 1<<25, // Don't play more than once
|
||||
|
||||
PF_HITFINISHLINE = 1<<26, // Already hit the finish line this tic
|
||||
PF_WRONGWAY = 1<<27, // Moving the wrong way with respect to waypoints?
|
||||
|
||||
PF_SHRINKME = 1<<28, // "Shrink me" cheat preference
|
||||
PF_SHRINKACTIVE = 1<<29, // "Shrink me" cheat is in effect. (Can't be disabled mid-race)
|
||||
|
||||
PF_VOID = 1<<30, // Removed from reality! When leaving hitlag, reenable visibility+collision and kill speed.
|
||||
PF_NOFASTFALL = (INT32)(1U<<31), // Has already done ebrake/fastfall behavior for this input. Fastfalling needs a new input to prevent unwanted bounces on unexpected airtime.
|
||||
} pflags_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PF2_SELFMUTE = 1<<1,
|
||||
PF2_SELFDEAFEN = 1<<2,
|
||||
PF2_SERVERMUTE = 1<<3,
|
||||
PF2_SERVERDEAFEN = 1<<4,
|
||||
|
||||
PF2_STRICTFASTFALL = 1<<5, // Fastfall only with C, never with A+X. Profile preference.
|
||||
|
||||
PF2_ALWAYSDAMAGED = 1<<6, // Ignore invulnerability or clash conditions when evaulating damage (P_DamageMobj). Unset after use!
|
||||
PF2_BUBBLECONTACT = 1<<7, // ACHTUNG VERY BAD HACK - Don't allow Bubble Shield to contact certain objects unless this is a fresh blowup.
|
||||
PF2_SUPERTRANSFERVFX = 1<<8, // Don't respawn the "super transfer available" VFX.
|
||||
PF2_FASTTUMBLEBOUNCE = 1<<9, // Don't lose speed when tumblebouncing.
|
||||
|
||||
PF2_SERVERTEMPMUTE = 1<<10, // Haven't met gamestochat requirement
|
||||
PF2_SAMEFRAMESTUNG = 1<<11, // Goofy bullshit for tracking mutual ring sting
|
||||
PF2_UNSTINGABLE = 1<<12, // Was bumped out of spindash
|
||||
PF2_GIMMESTARTAWARDS = 1<<13, // Need to apply non-first start awards on a 1 tic delay to prevent port priority
|
||||
PF2_GIMMEFIRSTBLOOD = 1<<14, // And need to differentiate between First Blood and everything else!
|
||||
} pflags2_t;
|
||||
typedef INT32 pflags2_t;
|
||||
#define PF2_SELFMUTE (1<<1)
|
||||
#define PF2_SELFDEAFEN (1<<2)
|
||||
#define PF2_SERVERMUTE (1<<3)
|
||||
#define PF2_SERVERDEAFEN (1<<4)
|
||||
#define PF2_STRICTFASTFALL (1<<5) // Fastfall only with C, never with A+X. Profile preference.
|
||||
#define PF2_ALWAYSDAMAGED (1<<6) // Ignore invulnerability or clash conditions when evaulating damage (P_DamageMobj). Unset after use!
|
||||
#define PF2_BUBBLECONTACT (1<<7) // ACHTUNG VERY BAD HACK - Don't allow Bubble Shield to contact certain objects unless this is a fresh blowup.
|
||||
#define PF2_SUPERTRANSFERVFX (1<<8) // Don't respawn the "super transfer available" VFX.
|
||||
#define PF2_FASTTUMBLEBOUNCE (1<<9) // Don't lose speed when tumblebouncing.
|
||||
#define PF2_SERVERTEMPMUTE (1<<10) // Haven't met gamestochat requirement
|
||||
#define PF2_SAMEFRAMESTUNG (1<<11) // Goofy bullshit for tracking mutual ring sting
|
||||
#define PF2_UNSTINGABLE (1<<12) // Was bumped out of spindash
|
||||
#define PF2_GIMMESTARTAWARDS (1<<13) // Need to apply non-first start awards on a 1 tic delay to prevent port priority
|
||||
#define PF2_GIMMEFIRSTBLOOD (1<<14) // And need to differentiate between First Blood and everything else!
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -273,24 +245,18 @@ typedef enum
|
|||
KSM__MAX,
|
||||
} kartslotmachine_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
KSPIN_THRUST = (1<<0),
|
||||
KSPIN_IFRAMES = (1<<1),
|
||||
KSPIN_AIRTIMER = (1<<2),
|
||||
typedef INT32 kartspinoutflags_t;
|
||||
#define KSPIN_THRUST (1<<0)
|
||||
#define KSPIN_IFRAMES (1<<1)
|
||||
#define KSPIN_AIRTIMER (1<<2)
|
||||
|
||||
KSPIN_TYPEBIT = (1<<3),
|
||||
KSPIN_TYPEMASK = ~( KSPIN_TYPEBIT - 1 ),
|
||||
#define KSPIN_TYPEBIT (1<<3)
|
||||
#define KSPIN_TYPEMASK (~( KSPIN_TYPEBIT - 1 ))
|
||||
|
||||
#define KSPIN_TYPE( type ) ( KSPIN_TYPEBIT << type )
|
||||
|
||||
KSPIN_SPINOUT = KSPIN_TYPE(0)|KSPIN_IFRAMES|KSPIN_THRUST,
|
||||
KSPIN_WIPEOUT = KSPIN_TYPE(1)|KSPIN_IFRAMES,
|
||||
KSPIN_STUNG = KSPIN_TYPE(2),
|
||||
KSPIN_EXPLOSION = KSPIN_TYPE(3)|KSPIN_IFRAMES|KSPIN_AIRTIMER,
|
||||
|
||||
#undef KSPIN_TYPE
|
||||
} kartspinoutflags_t;
|
||||
#define KSPIN_SPINOUT (( KSPIN_TYPEBIT << 0 )|KSPIN_IFRAMES|KSPIN_THRUST)
|
||||
#define KSPIN_WIPEOUT (( KSPIN_TYPEBIT << 1 )|KSPIN_IFRAMES)
|
||||
#define KSPIN_STUNG (( KSPIN_TYPEBIT << 2 ))
|
||||
#define KSPIN_EXPLOSION (( KSPIN_TYPEBIT << 3 )|KSPIN_IFRAMES|KSPIN_AIRTIMER)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -464,18 +430,16 @@ struct botvars_t
|
|||
|
||||
// player_t struct for round-specific condition tracking
|
||||
|
||||
typedef enum
|
||||
{
|
||||
UFOD_GENERIC = 1,
|
||||
UFOD_BOOST = 1<<1,
|
||||
UFOD_WHIP = 1<<2,
|
||||
UFOD_BANANA = 1<<3,
|
||||
UFOD_ORBINAUT = 1<<4,
|
||||
UFOD_JAWZ = 1<<5,
|
||||
UFOD_SPB = 1<<6,
|
||||
UFOD_GACHABOM = 1<<7,
|
||||
// free up to and including 1<<31
|
||||
} targetdamaging_t;
|
||||
typedef INT32 targetdamaging_t;
|
||||
#define UFOD_GENERIC (1)
|
||||
#define UFOD_BOOST (1<<1)
|
||||
#define UFOD_WHIP (1<<2)
|
||||
#define UFOD_BANANA (1<<3)
|
||||
#define UFOD_ORBINAUT (1<<4)
|
||||
#define UFOD_JAWZ (1<<5)
|
||||
#define UFOD_SPB (1<<6)
|
||||
#define UFOD_GACHABOM (1<<7)
|
||||
// free up to and including 1<<31
|
||||
|
||||
struct roundconditions_t
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,31 +25,29 @@ extern "C" {
|
|||
#define MAXPREDICTTICS 30
|
||||
|
||||
// Button/action code definitions.
|
||||
typedef enum
|
||||
{
|
||||
BT_ACCELERATE = 1, // Accelerate
|
||||
BT_DRIFT = 1<<2, // Drift (direction is cmd->turning)
|
||||
BT_BRAKE = 1<<3, // Brake
|
||||
BT_ATTACK = 1<<4, // Use Item
|
||||
BT_LOOKBACK = 1<<5, // Look Backward
|
||||
BT_BAIL = 1<<6, // Bail
|
||||
BT_VOTE = 1<<7, // Vote
|
||||
BT_SPINDASH = 1<<8, // Spindash
|
||||
typedef INT32 buttoncode_t;
|
||||
#define BT_ACCELERATE (1) // Accelerate
|
||||
#define BT_DRIFT (1<<2) // Drift (direction is cmd->turning)
|
||||
#define BT_BRAKE (1<<3) // Brake
|
||||
#define BT_ATTACK (1<<4) // Use Item
|
||||
#define BT_LOOKBACK (1<<5) // Look Backward
|
||||
#define BT_BAIL (1<<6) // Bail
|
||||
#define BT_VOTE (1<<7) // Vote
|
||||
#define BT_SPINDASH (1<<8) // Spindash
|
||||
|
||||
BT_EBRAKEMASK = (BT_ACCELERATE|BT_BRAKE),
|
||||
BT_SPINDASHMASK = (BT_ACCELERATE|BT_BRAKE|BT_DRIFT),
|
||||
BT_RESPAWNMASK = (BT_EBRAKEMASK|BT_BAIL),
|
||||
#define BT_EBRAKEMASK ((BT_ACCELERATE)|(BT_BRAKE))
|
||||
#define BT_SPINDASHMASK ((BT_ACCELERATE)|(BT_BRAKE)|(BT_DRIFT))
|
||||
#define BT_RESPAWNMASK ((BT_EBRAKEMASK)|(BT_BAIL))
|
||||
|
||||
// free: 1<<9 to 1<<12
|
||||
// free: 1<<9 to 1<<12
|
||||
|
||||
// Lua garbage, replace with freeslottable buttons some day
|
||||
BT_LUAA = 1<<13,
|
||||
BT_LUA1 = 1<<13,
|
||||
BT_LUAB = 1<<14,
|
||||
BT_LUA2 = 1<<14,
|
||||
BT_LUAC = 1<<15,
|
||||
BT_LUA3 = 1<<15,
|
||||
} buttoncode_t;
|
||||
// Lua garbage, replace with freeslottable buttons some day
|
||||
#define BT_LUAA (1<<13)
|
||||
#define BT_LUA1 (1<<13)
|
||||
#define BT_LUAB (1<<14)
|
||||
#define BT_LUA2 (1<<14)
|
||||
#define BT_LUAC (1<<15)
|
||||
#define BT_LUA3 (1<<15)
|
||||
|
||||
// The data sampled per tick (single player)
|
||||
// and transmitted to other peers (multiplayer).
|
||||
|
|
|
|||
|
|
@ -536,25 +536,23 @@ extern boolean devparm; // development mode (-debug)
|
|||
// m_cheat.c
|
||||
extern UINT32 cht_debug;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DBG_NONE = 0x00000000,
|
||||
DBG_BASIC = 0x00000001,
|
||||
DBG_DETAILED = 0x00000002,
|
||||
DBG_PLAYER = 0x00000004,
|
||||
DBG_RENDER = 0x00000008,
|
||||
DBG_MUSIC = 0x00000010,
|
||||
DBG_PWRLV = 0x00000020,
|
||||
DBG_POLYOBJ = 0x00000040,
|
||||
DBG_GAMELOGIC = 0x00000080,
|
||||
DBG_NETPLAY = 0x00000100,
|
||||
DBG_MEMORY = 0x00000200,
|
||||
DBG_SETUP = 0x00000400,
|
||||
DBG_LUA = 0x00000800,
|
||||
DBG_RNG = 0x00001000,
|
||||
DBG_DEMO = 0x00002000,
|
||||
DBG_TEAMS = 0x00004000,
|
||||
} debugFlags_t;
|
||||
typedef INT32 debugFlags_t;
|
||||
#define DBG_NONE (0x00000000)
|
||||
#define DBG_BASIC (0x00000001)
|
||||
#define DBG_DETAILED (0x00000002)
|
||||
#define DBG_PLAYER (0x00000004)
|
||||
#define DBG_RENDER (0x00000008)
|
||||
#define DBG_MUSIC (0x00000010)
|
||||
#define DBG_PWRLV (0x00000020)
|
||||
#define DBG_POLYOBJ (0x00000040)
|
||||
#define DBG_GAMELOGIC (0x00000080)
|
||||
#define DBG_NETPLAY (0x00000100)
|
||||
#define DBG_MEMORY (0x00000200)
|
||||
#define DBG_SETUP (0x00000400)
|
||||
#define DBG_LUA (0x00000800)
|
||||
#define DBG_RNG (0x00001000)
|
||||
#define DBG_DEMO (0x00002000)
|
||||
#define DBG_TEAMS (0x00004000)
|
||||
|
||||
struct debugFlagNames_s
|
||||
{
|
||||
|
|
|
|||
144
src/doomstat.h
144
src/doomstat.h
|
|
@ -64,13 +64,11 @@ extern UINT8 gamecomplete;
|
|||
#define CUPMENU_ROWS 2
|
||||
|
||||
// Extra abilities/settings for skins (combinable stuff)
|
||||
typedef enum
|
||||
{
|
||||
MA_RUNNING = 1, // In action
|
||||
MA_INIT = 1<<1, // Initialisation
|
||||
MA_NOCUTSCENES = 1<<2, // No cutscenes
|
||||
MA_INGAME = 1<<3 // Timer ignores loads
|
||||
} marathonmode_t;
|
||||
typedef INT32 marathonmode_t;
|
||||
#define MA_RUNNING (1) // In action
|
||||
#define MA_INIT (1<<1) // Initialisation
|
||||
#define MA_NOCUTSCENES (1<<2) // No cutscenes
|
||||
#define MA_INGAME (1<<3) // Timer ignores loads
|
||||
|
||||
extern marathonmode_t marathonmode;
|
||||
extern tic_t marathontime;
|
||||
|
|
@ -98,12 +96,10 @@ typedef enum
|
|||
MAXPRECIP
|
||||
} preciptype_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PRECIPFX_THUNDER = 1,
|
||||
PRECIPFX_LIGHTNING = 1<<1,
|
||||
PRECIPFX_WATERPARTICLES = 1<<2
|
||||
} precipeffect_t;
|
||||
typedef INT32 precipeffect_t;
|
||||
#define PRECIPFX_THUNDER (1)
|
||||
#define PRECIPFX_LIGHTNING (1<<1)
|
||||
#define PRECIPFX_WATERPARTICLES (1<<2)
|
||||
|
||||
struct precipprops_t
|
||||
{
|
||||
|
|
@ -674,47 +670,44 @@ extern INT16 numgametypes;
|
|||
extern INT16 gametype, g_lastgametype;
|
||||
|
||||
// Gametype rules
|
||||
enum GameTypeRules
|
||||
{
|
||||
// Race rules
|
||||
GTR_CIRCUIT = 1, // Enables the finish line, laps, and the waypoint system.
|
||||
GTR_BOTS = 1<<1, // Allows bots in this gametype. Combine with BotTiccmd hooks to make bots support your gametype.
|
||||
typedef INT32 GameTypeRules;
|
||||
#define GTR_CIRCUIT (1) // Enables the finish line, laps, and the waypoint system.
|
||||
#define GTR_BOTS (1<<1) // Allows bots in this gametype. Combine with BotTiccmd hooks to make bots support your gametype.
|
||||
|
||||
// Battle gametype rules
|
||||
GTR_BUMPERS = 1<<2, // Enables the bumper health system
|
||||
GTR_SPHERES = 1<<3, // Replaces rings with blue spheres
|
||||
GTR_CLOSERPLAYERS = 1<<4, // Buffs spindash and draft power to bring everyone together, nerfs invincibility and grow to prevent excessive combos
|
||||
// Battle gametype rules
|
||||
#define GTR_BUMPERS (1<<2) // Enables the bumper health system
|
||||
#define GTR_SPHERES (1<<3) // Replaces rings with blue spheres
|
||||
#define GTR_CLOSERPLAYERS (1<<4) // Buffs spindash and draft power to bring everyone together, nerfs invincibility and grow to prevent excessive combos
|
||||
|
||||
GTR_BATTLESTARTS = 1<<5, // Use Battle Mode start positions.
|
||||
GTR_PAPERITEMS = 1<<6, // Replaces item boxes with paper item spawners
|
||||
GTR_POWERSTONES = 1<<7, // Battle Emerald collectables.
|
||||
GTR_KARMA = 1<<8, // Enables the Karma system if you're out of bumpers
|
||||
// 1<<9 - UNUSED
|
||||
#define GTR_BATTLESTARTS (1<<5) // Use Battle Mode start positions.
|
||||
#define GTR_PAPERITEMS (1<<6) // Replaces item boxes with paper item spawners
|
||||
#define GTR_POWERSTONES (1<<7) // Battle Emerald collectables.
|
||||
#define GTR_KARMA (1<<8) // Enables the Karma system if you're out of bumpers
|
||||
// 1<<9 - UNUSED
|
||||
|
||||
// Bonus gametype rules
|
||||
GTR_CHECKPOINTS = 1<<10, // Player respawns at specific checkpoints
|
||||
GTR_PRISONS = 1<<11, // Can enter Prison Break mode
|
||||
GTR_CATCHER = 1<<12, // UFO Catcher (only works with GTR_CIRCUIT)
|
||||
GTR_ROLLINGSTART = 1<<13, // Rolling start (only works with GTR_CIRCUIT)
|
||||
GTR_SPECIALSTART = 1<<14, // White fade instant start
|
||||
GTR_BOSS = 1<<15, // Boss intro and spawning
|
||||
// Bonus gametype rules
|
||||
#define GTR_CHECKPOINTS (1<<10) // Player respawns at specific checkpoints
|
||||
#define GTR_PRISONS (1<<11) // Can enter Prison Break mode
|
||||
#define GTR_CATCHER (1<<12) // UFO Catcher (only works with GTR_CIRCUIT)
|
||||
#define GTR_ROLLINGSTART (1<<13) // Rolling start (only works with GTR_CIRCUIT)
|
||||
#define GTR_SPECIALSTART (1<<14) // White fade instant start
|
||||
#define GTR_BOSS (1<<15) // Boss intro and spawning
|
||||
|
||||
// General purpose rules
|
||||
GTR_POINTLIMIT = 1<<16, // Reaching point limit ends the round
|
||||
GTR_TIMELIMIT = 1<<17, // Reaching time limit ends the round
|
||||
GTR_OVERTIME = 1<<18, // Allow overtime behavior
|
||||
GTR_ENCORE = 1<<19, // Alternate Encore mirroring, scripting, and texture remapping
|
||||
// General purpose rules
|
||||
#define GTR_POINTLIMIT (1<<16) // Reaching point limit ends the round
|
||||
#define GTR_TIMELIMIT (1<<17) // Reaching time limit ends the round
|
||||
#define GTR_OVERTIME (1<<18) // Allow overtime behavior
|
||||
#define GTR_ENCORE (1<<19) // Alternate Encore mirroring, scripting, and texture remapping
|
||||
|
||||
GTR_TEAMS = 1<<20, // Teams are forced on
|
||||
GTR_NOTEAMS = 1<<21, // Teams are forced off
|
||||
GTR_TEAMSTARTS = 1<<22, // Use team-based start positions
|
||||
#define GTR_TEAMS (1<<20) // Teams are forced on
|
||||
#define GTR_NOTEAMS (1<<21) // Teams are forced off
|
||||
#define GTR_TEAMSTARTS (1<<22) // Use team-based start positions
|
||||
|
||||
GTR_NOMP = 1<<23, // No multiplayer
|
||||
GTR_NOCUPSELECT = 1<<24, // Your maps are not selected via cup.
|
||||
GTR_NOPOSITION = 1<<25, // No POSITION
|
||||
#define GTR_NOMP (1<<23) // No multiplayer
|
||||
#define GTR_NOCUPSELECT (1<<24) // Your maps are not selected via cup.
|
||||
#define GTR_NOPOSITION (1<<25) // No POSITION
|
||||
|
||||
// free: to and including 1<<31
|
||||
};
|
||||
// free: to and including 1<<31
|
||||
// Remember to update GAMETYPERULE_LIST in deh_soc.c
|
||||
|
||||
#define GTR_FORBIDMP (GTR_NOMP|GTR_CATCHER|GTR_BOSS)
|
||||
|
|
@ -723,18 +716,15 @@ enum GameTypeRules
|
|||
#define gametyperules (gametypes[gametype]->rules)
|
||||
|
||||
// TypeOfLevel things
|
||||
enum TypeOfLevel
|
||||
{
|
||||
// Gametypes
|
||||
TOL_RACE = 0x0001, ///< Race
|
||||
TOL_BATTLE = 0x0002, ///< Battle
|
||||
TOL_SPECIAL = 0x0004, ///< Special Stage (variant of race, but forbidden)
|
||||
TOL_VERSUS = 0x0008, ///< Versus (variant of battle, but forbidden)
|
||||
TOL_TUTORIAL = 0x0010, ///< Tutorial (variant of race, but forbidden)
|
||||
typedef INT32 TypeOfLevel;
|
||||
#define TOL_RACE (0x0001) ///< Race
|
||||
#define TOL_BATTLE (0x0002) ///< Battle
|
||||
#define TOL_SPECIAL (0x0004) ///< Special Stage (variant of race, but forbidden)
|
||||
#define TOL_VERSUS (0x0008) ///< Versus (variant of battle, but forbidden)
|
||||
#define TOL_TUTORIAL (0x0010) ///< Tutorial (variant of race, but forbidden)
|
||||
|
||||
// Modifiers
|
||||
TOL_TV = 0x0100 ///< Midnight Channel specific: draw TV like overlay on HUD
|
||||
};
|
||||
// Modifiers
|
||||
#define TOL_TV (0x0100) ///< Midnight Channel specific: draw TV like overlay on HUD
|
||||
// Make sure to update TYPEOFLEVEL too
|
||||
|
||||
#define MAXTOL (1<<31)
|
||||
|
|
@ -752,28 +742,26 @@ extern UINT32 lastcustomtol;
|
|||
extern UINT8 stagefailed;
|
||||
|
||||
// Emeralds stored as bits to throw savegame hackers off.
|
||||
typedef enum
|
||||
{
|
||||
EMERALD_CHAOS1 = 1,
|
||||
EMERALD_CHAOS2 = 1<<1,
|
||||
EMERALD_CHAOS3 = 1<<2,
|
||||
EMERALD_CHAOS4 = 1<<3,
|
||||
EMERALD_CHAOS5 = 1<<4,
|
||||
EMERALD_CHAOS6 = 1<<5,
|
||||
EMERALD_CHAOS7 = 1<<6,
|
||||
EMERALD_ALLCHAOS = EMERALD_CHAOS1|EMERALD_CHAOS2|EMERALD_CHAOS3|EMERALD_CHAOS4|EMERALD_CHAOS5|EMERALD_CHAOS6|EMERALD_CHAOS7,
|
||||
typedef INT32 emeraldflags_t;
|
||||
#define EMERALD_CHAOS1 (1)
|
||||
#define EMERALD_CHAOS2 (1<<1)
|
||||
#define EMERALD_CHAOS3 (1<<2)
|
||||
#define EMERALD_CHAOS4 (1<<3)
|
||||
#define EMERALD_CHAOS5 (1<<4)
|
||||
#define EMERALD_CHAOS6 (1<<5)
|
||||
#define EMERALD_CHAOS7 (1<<6)
|
||||
#define EMERALD_ALLCHAOS ((EMERALD_CHAOS1)|(EMERALD_CHAOS2)|(EMERALD_CHAOS3)|(EMERALD_CHAOS4)|(EMERALD_CHAOS5)|(EMERALD_CHAOS6)|(EMERALD_CHAOS7))
|
||||
|
||||
EMERALD_SUPER1 = 1<<7,
|
||||
EMERALD_SUPER2 = 1<<8,
|
||||
EMERALD_SUPER3 = 1<<9,
|
||||
EMERALD_SUPER4 = 1<<10,
|
||||
EMERALD_SUPER5 = 1<<11,
|
||||
EMERALD_SUPER6 = 1<<12,
|
||||
EMERALD_SUPER7 = 1<<13,
|
||||
EMERALD_ALLSUPER = EMERALD_SUPER1|EMERALD_SUPER2|EMERALD_SUPER3|EMERALD_SUPER4|EMERALD_SUPER5|EMERALD_SUPER6|EMERALD_SUPER7,
|
||||
#define EMERALD_SUPER1 (1<<7)
|
||||
#define EMERALD_SUPER2 (1<<8)
|
||||
#define EMERALD_SUPER3 (1<<9)
|
||||
#define EMERALD_SUPER4 (1<<10)
|
||||
#define EMERALD_SUPER5 (1<<11)
|
||||
#define EMERALD_SUPER6 (1<<12)
|
||||
#define EMERALD_SUPER7 (1<<13)
|
||||
#define EMERALD_ALLSUPER ((EMERALD_SUPER1)|(EMERALD_SUPER2)|(EMERALD_SUPER3)|(EMERALD_SUPER4)|(EMERALD_SUPER5)|(EMERALD_SUPER6)|(EMERALD_SUPER7))
|
||||
|
||||
EMERALD_ALL = EMERALD_ALLCHAOS|EMERALD_ALLSUPER
|
||||
} emeraldflags_t;
|
||||
#define EMERALD_ALL ((EMERALD_ALLCHAOS)|(EMERALD_ALLSUPER))
|
||||
|
||||
#define ALLCHAOSEMERALDS(v) ((v & EMERALD_ALLCHAOS) == EMERALD_ALLCHAOS)
|
||||
#define ALLSUPEREMERALDS(v) ((v & EMERALD_ALLSUPER) == EMERALD_ALLSUPER)
|
||||
|
|
|
|||
|
|
@ -35,10 +35,6 @@
|
|||
#include "g_game.h"
|
||||
#include "st_stuff.h"
|
||||
|
||||
#ifdef HWRENDER
|
||||
#include "hardware/hw_main.h"
|
||||
#endif
|
||||
|
||||
#if NUMSCREENS < 5
|
||||
#define NOWIPE // do not enable wipe image post processing for ARM, SH and MIPS CPUs
|
||||
#endif
|
||||
|
|
@ -356,14 +352,6 @@ static void refresh_wipe_screen_texture(rhi::Rhi& rhi, rhi::Handle<rhi::Texture>
|
|||
void F_WipeStartScreen(void)
|
||||
{
|
||||
#ifndef NOWIPE
|
||||
#ifdef HWRENDER
|
||||
if(rendermode == render_opengl)
|
||||
{
|
||||
HWR_StartScreenWipe();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
rhi::Rhi* rhi = srb2::sys::get_rhi(srb2::sys::g_current_rhi);
|
||||
|
||||
if (!rhi)
|
||||
|
|
@ -392,14 +380,6 @@ void F_WipeStartScreen(void)
|
|||
void F_WipeEndScreen(void)
|
||||
{
|
||||
#ifndef NOWIPE
|
||||
#ifdef HWRENDER
|
||||
if(rendermode == render_opengl)
|
||||
{
|
||||
HWR_EndScreenWipe();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
rhi::Rhi* rhi = srb2::sys::get_rhi(srb2::sys::g_current_rhi);
|
||||
|
||||
if (!rhi)
|
||||
|
|
@ -501,12 +481,6 @@ void F_RunWipe(UINT8 wipemode, UINT8 wipetype, boolean drawMenu, const char *col
|
|||
}
|
||||
lastwipetic = nowtime;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
HWR_DoWipe(wipetype, wipeframe-1); // send in the wipe type and wipeframe because we need to cache the graphic
|
||||
else
|
||||
#endif
|
||||
|
||||
if (rendermode != render_none) //this allows F_RunWipe to be called in dedicated servers
|
||||
{
|
||||
// F_DoWipe(fmask, fcolor, reverse);
|
||||
|
|
@ -563,11 +537,6 @@ void F_RunWipe(UINT8 wipemode, UINT8 wipetype, boolean drawMenu, const char *col
|
|||
|
||||
I_FinishUpdate(); // page flip or blit buffer
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (moviemode && rendermode == render_opengl)
|
||||
M_LegacySaveFrame();
|
||||
else
|
||||
#endif
|
||||
if (moviemode && rendermode == render_soft)
|
||||
I_CaptureVideoFrame();
|
||||
|
||||
|
|
|
|||
|
|
@ -1304,12 +1304,7 @@ void G_PreLevelTitleCard(void)
|
|||
I_FinishUpdate(); // page flip or blit buffer
|
||||
NetKeepAlive(); // Prevent timeouts
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (moviemode && rendermode == render_opengl)
|
||||
M_LegacySaveFrame();
|
||||
else
|
||||
#endif
|
||||
if (moviemode && rendermode == render_soft)
|
||||
if (moviemode && rendermode != render_none)
|
||||
I_CaptureVideoFrame();
|
||||
|
||||
while (!((nowtime = I_GetTime()) - lasttime))
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
target_sources(SRB2SDL2 PRIVATE
|
||||
hw_bsp.c
|
||||
hw_draw.c
|
||||
hw_light.c
|
||||
hw_main.c
|
||||
hw_clip.c
|
||||
hw_md2.c
|
||||
hw_cache.c
|
||||
hw_md2load.c
|
||||
hw_md3load.c
|
||||
hw_model.c
|
||||
u_list.c
|
||||
hw_batching.c
|
||||
r_opengl/r_opengl.c
|
||||
hw_bsp.cpp
|
||||
hw_draw.cpp
|
||||
hw_light.cpp
|
||||
hw_main.cpp
|
||||
hw_clip.cpp
|
||||
hw_md2.cpp
|
||||
hw_cache.cpp
|
||||
hw_md2load.cpp
|
||||
hw_md3load.cpp
|
||||
hw_model.cpp
|
||||
u_list.cpp
|
||||
hw_batching.cpp
|
||||
r_opengl/r_opengl.cpp
|
||||
)
|
||||
|
|
|
|||
|
|
@ -50,11 +50,11 @@ void HWR_StartBatching(void)
|
|||
// init arrays if that has not been done yet
|
||||
if (!finalVertexArray)
|
||||
{
|
||||
finalVertexArray = malloc(finalVertexArrayAllocSize * sizeof(FOutVector));
|
||||
finalVertexIndexArray = malloc(finalVertexArrayAllocSize * 3 * sizeof(UINT32));
|
||||
polygonArray = malloc(polygonArrayAllocSize * sizeof(PolygonArrayEntry));
|
||||
polygonIndexArray = malloc(polygonArrayAllocSize * sizeof(UINT32));
|
||||
unsortedVertexArray = malloc(unsortedVertexArrayAllocSize * sizeof(FOutVector));
|
||||
finalVertexArray = (FOutVector *)malloc(finalVertexArrayAllocSize * sizeof(FOutVector));
|
||||
finalVertexIndexArray = (UINT32 *)malloc(finalVertexArrayAllocSize * 3 * sizeof(UINT32));
|
||||
polygonArray = (PolygonArrayEntry *)malloc(polygonArrayAllocSize * sizeof(PolygonArrayEntry));
|
||||
polygonIndexArray = (UINT32 *)malloc(polygonArrayAllocSize * sizeof(UINT32));
|
||||
unsortedVertexArray = (FOutVector *)malloc(unsortedVertexArrayAllocSize * sizeof(FOutVector));
|
||||
}
|
||||
|
||||
currently_batching = true;
|
||||
|
|
@ -104,13 +104,13 @@ void HWR_ProcessPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPt
|
|||
PolygonArrayEntry* new_array;
|
||||
// ran out of space, make new array double the size
|
||||
polygonArrayAllocSize *= 2;
|
||||
new_array = malloc(polygonArrayAllocSize * sizeof(PolygonArrayEntry));
|
||||
new_array = (PolygonArrayEntry *)malloc(polygonArrayAllocSize * sizeof(PolygonArrayEntry));
|
||||
memcpy(new_array, polygonArray, polygonArraySize * sizeof(PolygonArrayEntry));
|
||||
free(polygonArray);
|
||||
polygonArray = new_array;
|
||||
// also need to redo the index array, dont need to copy it though
|
||||
free(polygonIndexArray);
|
||||
polygonIndexArray = malloc(polygonArrayAllocSize * sizeof(UINT32));
|
||||
polygonIndexArray = (UINT32 *)malloc(polygonArrayAllocSize * sizeof(UINT32));
|
||||
}
|
||||
|
||||
while (unsortedVertexArraySize + (int)iNumPts > unsortedVertexArrayAllocSize)
|
||||
|
|
@ -118,7 +118,7 @@ void HWR_ProcessPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPt
|
|||
FOutVector* new_array;
|
||||
// need more space for vertices in unsortedVertexArray
|
||||
unsortedVertexArrayAllocSize *= 2;
|
||||
new_array = malloc(unsortedVertexArrayAllocSize * sizeof(FOutVector));
|
||||
new_array = (FOutVector *)malloc(unsortedVertexArrayAllocSize * sizeof(FOutVector));
|
||||
memcpy(new_array, unsortedVertexArray, unsortedVertexArraySize * sizeof(FOutVector));
|
||||
free(unsortedVertexArray);
|
||||
unsortedVertexArray = new_array;
|
||||
|
|
@ -368,13 +368,13 @@ void HWR_RenderBatches(void)
|
|||
FOutVector* new_array;
|
||||
unsigned int* new_index_array;
|
||||
finalVertexArrayAllocSize *= 2;
|
||||
new_array = malloc(finalVertexArrayAllocSize * sizeof(FOutVector));
|
||||
new_array = (FOutVector *)malloc(finalVertexArrayAllocSize * sizeof(FOutVector));
|
||||
memcpy(new_array, finalVertexArray, finalVertexWritePos * sizeof(FOutVector));
|
||||
free(finalVertexArray);
|
||||
finalVertexArray = new_array;
|
||||
// also increase size of index array, 3x of vertex array since
|
||||
// going from fans to triangles increases vertex count to 3x
|
||||
new_index_array = malloc(finalVertexArrayAllocSize * 3 * sizeof(UINT32));
|
||||
new_index_array = (UINT32 *)malloc(finalVertexArrayAllocSize * 3 * sizeof(UINT32));
|
||||
memcpy(new_index_array, finalVertexIndexArray, finalIndexWritePos * sizeof(UINT32));
|
||||
free(finalVertexIndexArray);
|
||||
finalVertexIndexArray = new_index_array;
|
||||
|
|
@ -88,7 +88,7 @@ void HWR_InitPolyPool(void)
|
|||
POLYPOOLSIZE = atoi(myargv[pnum+1])*1024; // (in kb)
|
||||
|
||||
CONS_Debug(DBG_RENDER, "HWR_InitPolyPool(): allocating %d bytes\n", POLYPOOLSIZE);
|
||||
gl_polypool = malloc(POLYPOOLSIZE);
|
||||
gl_polypool = (UINT8 *)malloc(POLYPOOLSIZE);
|
||||
if (!gl_polypool)
|
||||
I_Error("HWR_InitPolyPool(): couldn't malloc polypool\n");
|
||||
HWR_ClearPolys();
|
||||
|
|
@ -109,7 +109,7 @@ static poly_t *HWR_AllocPoly(INT32 numpts)
|
|||
poly_t *p;
|
||||
size_t size = sizeof (poly_t) + sizeof (polyvertex_t) * numpts;
|
||||
#ifdef ZPLANALLOC
|
||||
p = Z_Malloc(size, PU_HWRPLANE, NULL);
|
||||
p = (poly_t *)Z_Malloc(size, PU_HWRPLANE, NULL);
|
||||
#else
|
||||
#ifdef PARANOIA
|
||||
if (!gl_polypool)
|
||||
|
|
@ -135,7 +135,7 @@ static polyvertex_t *HWR_AllocVertex(void)
|
|||
polyvertex_t *p;
|
||||
size_t size = sizeof (polyvertex_t);
|
||||
#ifdef ZPLANALLOC
|
||||
p = Z_Malloc(size, PU_HWRPLANE, NULL);
|
||||
p = (polyvertex_t *)Z_Malloc(size, PU_HWRPLANE, NULL);
|
||||
#else
|
||||
if (gl_ppfree < size)
|
||||
I_Error("HWR_AllocVertex(): no more memory %u bytes left, %u bytes needed\n\n%s\n",
|
||||
|
|
@ -715,8 +715,8 @@ void HWR_FreeExtraSubsectors(void)
|
|||
//#define MOVEVERTEX
|
||||
static boolean PointInSeg(polyvertex_t *a,polyvertex_t *v1,polyvertex_t *v2)
|
||||
{
|
||||
register float ax,ay,bx,by,cx,cy,d,norm;
|
||||
register polyvertex_t *p;
|
||||
float ax,ay,bx,by,cx,cy,d,norm;
|
||||
polyvertex_t *p;
|
||||
|
||||
// check bbox of the seg first
|
||||
if (v1->x > v2->x)
|
||||
|
|
@ -985,7 +985,7 @@ void HWR_CreatePlanePolygons(INT32 bspnum)
|
|||
HWR_FreeExtraSubsectors();
|
||||
// allocate extra data for each subsector present in map
|
||||
totsubsectors = numsubsectors + NEWSUBSECTORS;
|
||||
extrasubsectors = calloc(totsubsectors, sizeof (*extrasubsectors));
|
||||
extrasubsectors = (extrasubsector_t *)calloc(totsubsectors, sizeof (*extrasubsectors));
|
||||
if (extrasubsectors == NULL)
|
||||
I_Error("couldn't malloc extrasubsectors totsubsectors %s\n", sizeu1(totsubsectors));
|
||||
|
||||
|
|
@ -283,7 +283,7 @@ static void HWR_DrawPatchInCache(GLMipmap_t *mipmap,
|
|||
fixed_t xfrac, xfracstep;
|
||||
fixed_t yfracstep, scale_y;
|
||||
const column_t *patchcol;
|
||||
UINT8 *block = mipmap->data;
|
||||
UINT8 *block = (UINT8 *)mipmap->data;
|
||||
INT32 bpp;
|
||||
INT32 blockmodulo;
|
||||
|
||||
|
|
@ -330,7 +330,7 @@ static void HWR_DrawTexturePatchInCache(GLMipmap_t *mipmap,
|
|||
fixed_t xfrac, xfracstep;
|
||||
fixed_t yfracstep, scale_y;
|
||||
const column_t *patchcol;
|
||||
UINT8 *block = mipmap->data;
|
||||
UINT8 *block = (UINT8 *)mipmap->data;
|
||||
INT32 bpp;
|
||||
INT32 blockmodulo;
|
||||
INT32 width, height;
|
||||
|
|
@ -423,7 +423,7 @@ static UINT8 *MakeBlock(GLMipmap_t *grMipmap)
|
|||
INT32 blocksize = (grMipmap->width * grMipmap->height);
|
||||
|
||||
bpp = format2bpp(grMipmap->format);
|
||||
block = Z_Malloc(blocksize*bpp, PU_HWRCACHE, &(grMipmap->data));
|
||||
block = (UINT8 *)Z_Malloc(blocksize*bpp, PU_HWRCACHE, &(grMipmap->data));
|
||||
|
||||
switch (bpp)
|
||||
{
|
||||
|
|
@ -476,12 +476,12 @@ static void HWR_GenerateTexture(GLMapTexture_t *grtex, INT32 texnum, boolean noe
|
|||
|
||||
grtex->mipmap.width = (UINT16)texture->width;
|
||||
grtex->mipmap.height = (UINT16)texture->height;
|
||||
grtex->mipmap.format = textureformat;
|
||||
grtex->mipmap.format = (GLTextureFormat_t)textureformat;
|
||||
|
||||
if (!noencoremap && encoremap)
|
||||
colormap += COLORMAP_REMAPOFFSET;
|
||||
|
||||
grtex->mipmap.colormap = Z_Calloc(sizeof(*grtex->mipmap.colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
grtex->mipmap.colormap = (GLColormap_t *)Z_Calloc(sizeof(*grtex->mipmap.colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
grtex->mipmap.colormap->source = colormap;
|
||||
M_Memcpy(grtex->mipmap.colormap->data, colormap, 256 * sizeof(UINT8));
|
||||
|
||||
|
|
@ -513,17 +513,17 @@ static void HWR_GenerateTexture(GLMapTexture_t *grtex, INT32 texnum, boolean noe
|
|||
{
|
||||
boolean dealloc = true;
|
||||
size_t lumplength = W_LumpLengthPwad(patch->wad, patch->lump);
|
||||
pdata = W_CacheLumpNumPwad(patch->wad, patch->lump, PU_CACHE);
|
||||
pdata = (uint8_t*)W_CacheLumpNumPwad(patch->wad, patch->lump, PU_CACHE);
|
||||
realpatch = (softwarepatch_t *)pdata;
|
||||
|
||||
#ifndef NO_PNG_LUMPS
|
||||
if (Picture_IsLumpPNG((UINT8 *)realpatch, lumplength))
|
||||
realpatch = (softwarepatch_t *)Picture_PNGConvert(pdata, PICFMT_DOOMPATCH, NULL, NULL, NULL, NULL, lumplength, NULL, 0);
|
||||
realpatch = (softwarepatch_t *)Picture_PNGConvert(pdata, PICFMT_DOOMPATCH, NULL, NULL, NULL, NULL, lumplength, NULL, (pictureflags_t)0);
|
||||
else
|
||||
#endif
|
||||
#ifdef WALLFLATS
|
||||
if (texture->type == TEXTURETYPE_FLAT)
|
||||
realpatch = (softwarepatch_t *)Picture_Convert(PICFMT_FLAT, pdata, PICFMT_DOOMPATCH, 0, NULL, texture->width, texture->height, 0, 0, 0);
|
||||
realpatch = (softwarepatch_t *)Picture_Convert(PICFMT_FLAT, pdata, PICFMT_DOOMPATCH, 0, NULL, texture->width, texture->height, 0, 0, (pictureflags_t)0);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
|
|
@ -566,7 +566,7 @@ void HWR_MakePatch (const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipm
|
|||
grMipmap->flags = 0;
|
||||
|
||||
// setup the texture info
|
||||
grMipmap->format = patchformat;
|
||||
grMipmap->format = (GLTextureFormat_t)patchformat;
|
||||
|
||||
grPatch->max_s = (float)patch->width / (float)grMipmap->width;
|
||||
grPatch->max_t = (float)patch->height / (float)grMipmap->height;
|
||||
|
|
@ -601,7 +601,7 @@ void HWR_FreeTextureData(patch_t *patch)
|
|||
if (!patch || !patch->hardware)
|
||||
return;
|
||||
|
||||
grPatch = patch->hardware;
|
||||
grPatch = (GLPatch_t*)patch->hardware;
|
||||
|
||||
if (vid.glstate == VID_GL_LIBRARY_LOADED)
|
||||
HWD.pfnDeleteTexture(grPatch->mipmap);
|
||||
|
|
@ -616,7 +616,7 @@ void HWR_FreeTexture(patch_t *patch)
|
|||
|
||||
if (patch->hardware)
|
||||
{
|
||||
GLPatch_t *grPatch = patch->hardware;
|
||||
GLPatch_t *grPatch = (GLPatch_t*)patch->hardware;
|
||||
|
||||
HWR_FreeTextureColormaps(patch);
|
||||
|
||||
|
|
@ -641,7 +641,7 @@ void HWR_FreeTextureColormaps(patch_t *patch)
|
|||
if (!patch)
|
||||
return;
|
||||
|
||||
pat = patch->hardware;
|
||||
pat = (GLPatch_t*)patch->hardware;
|
||||
if (!pat)
|
||||
return;
|
||||
|
||||
|
|
@ -759,8 +759,8 @@ void HWR_LoadMapTextures(size_t pnumtextures)
|
|||
HWR_FreeMapTextures();
|
||||
|
||||
gl_numtextures = pnumtextures;
|
||||
gl_textures = calloc(gl_numtextures, sizeof(*gl_textures));
|
||||
gl_flats = calloc(gl_numtextures, sizeof(*gl_flats));
|
||||
gl_textures = (GLMapTexture_t *)calloc(gl_numtextures, sizeof(*gl_textures));
|
||||
gl_flats = (GLMapTexture_t *)calloc(gl_numtextures, sizeof(*gl_flats));
|
||||
|
||||
if ((gl_textures == NULL) || (gl_flats == NULL))
|
||||
I_Error("HWR_LoadMapTextures: ran out of memory for OpenGL textures");
|
||||
|
|
@ -879,7 +879,7 @@ static void HWR_CacheFlat(GLMipmap_t *grMipmap, lumpnum_t flatlumpnum)
|
|||
W_ReadLump(flatlumpnum, Z_Malloc(W_LumpLength(flatlumpnum),
|
||||
PU_HWRCACHE, &grMipmap->data));
|
||||
|
||||
flat = grMipmap->data;
|
||||
flat = (UINT8*)grMipmap->data;
|
||||
for (steppy = 0; steppy < size; steppy++)
|
||||
if (flat[steppy] != HWR_PATCHES_CHROMAKEY_COLORINDEX)
|
||||
flat[steppy] = grMipmap->colormap->source[flat[steppy]];
|
||||
|
|
@ -906,7 +906,7 @@ static void HWR_CacheTextureAsFlat(GLMipmap_t *grMipmap, INT32 texturenum, boole
|
|||
grMipmap->height = (UINT16)textures[texturenum]->height;
|
||||
size = (grMipmap->width * grMipmap->height);
|
||||
|
||||
flat = Z_Malloc(size, PU_HWRCACHE, &grMipmap->data);
|
||||
flat = (UINT8 *)Z_Malloc(size, PU_HWRCACHE, &grMipmap->data);
|
||||
converted = (UINT8 *)Picture_TextureToFlat(texturenum);
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
|
|
@ -934,7 +934,7 @@ void HWR_GetRawFlat(lumpnum_t flatlumpnum, boolean noencoremap)
|
|||
if (!noencoremap && encoremap)
|
||||
colormap += COLORMAP_REMAPOFFSET;
|
||||
|
||||
grmip->colormap = Z_Calloc(sizeof(*grmip->colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
grmip->colormap = (GLColormap_t *)Z_Calloc(sizeof(*grmip->colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
grmip->colormap->source = colormap;
|
||||
M_Memcpy(grmip->colormap->data, colormap, 256 * sizeof(UINT8));
|
||||
}
|
||||
|
|
@ -1013,7 +1013,7 @@ void HWR_GetLevelFlat(levelflat_t *levelflat, boolean noencoremap)
|
|||
}
|
||||
else if (levelflat->type == LEVELFLAT_PATCH)
|
||||
{
|
||||
patch_t *patch = W_CachePatchNum(levelflat->u.flat.lumpnum, PU_CACHE);
|
||||
patch_t *patch = (patch_t *)W_CachePatchNum(levelflat->u.flat.lumpnum, PU_CACHE);
|
||||
levelflat->width = (UINT16)(patch->width);
|
||||
levelflat->height = (UINT16)(patch->height);
|
||||
HWR_GetPatch(patch);
|
||||
|
|
@ -1021,13 +1021,13 @@ void HWR_GetLevelFlat(levelflat_t *levelflat, boolean noencoremap)
|
|||
#ifndef NO_PNG_LUMPS
|
||||
else if (levelflat->type == LEVELFLAT_PNG)
|
||||
{
|
||||
GLMipmap_t *mipmap = levelflat->mipmap;
|
||||
GLMipmap_t *mipmap = (GLMipmap_t *)levelflat->mipmap;
|
||||
|
||||
// Cache the picture.
|
||||
if (!levelflat->mippic)
|
||||
{
|
||||
INT32 pngwidth = 0, pngheight = 0;
|
||||
void *pic = Picture_PNGConvert(W_CacheLumpNum(levelflat->u.flat.lumpnum, PU_CACHE), PICFMT_FLAT, &pngwidth, &pngheight, NULL, NULL, W_LumpLength(levelflat->u.flat.lumpnum), NULL, 0);
|
||||
void *pic = Picture_PNGConvert((const UINT8*)W_CacheLumpNum(levelflat->u.flat.lumpnum, PU_CACHE), PICFMT_FLAT, &pngwidth, &pngheight, NULL, NULL, W_LumpLength(levelflat->u.flat.lumpnum), NULL, (pictureflags_t)0);
|
||||
|
||||
Z_ChangeTag(pic, PU_LEVEL);
|
||||
Z_SetUser(pic, &levelflat->mippic);
|
||||
|
|
@ -1039,7 +1039,7 @@ void HWR_GetLevelFlat(levelflat_t *levelflat, boolean noencoremap)
|
|||
// Make the mipmap.
|
||||
if (mipmap == NULL)
|
||||
{
|
||||
mipmap = Z_Calloc(sizeof(GLMipmap_t), PU_STATIC, NULL);
|
||||
mipmap = (GLMipmap_t *)Z_Calloc(sizeof(GLMipmap_t), PU_STATIC, NULL);
|
||||
mipmap->format = GL_TEXFMT_P_8;
|
||||
mipmap->flags = TF_WRAPXY|TF_CHROMAKEYED;
|
||||
levelflat->mipmap = mipmap;
|
||||
|
|
@ -1057,7 +1057,7 @@ void HWR_GetLevelFlat(levelflat_t *levelflat, boolean noencoremap)
|
|||
mipmap->height = levelflat->height;
|
||||
|
||||
size = (mipmap->width * mipmap->height);
|
||||
flat = Z_Malloc(size, PU_LEVEL, &mipmap->data);
|
||||
flat = (UINT8 *)Z_Malloc(size, PU_LEVEL, &mipmap->data);
|
||||
M_Memcpy(flat, levelflat->mippic, size);
|
||||
}
|
||||
|
||||
|
|
@ -1074,7 +1074,7 @@ void HWR_GetLevelFlat(levelflat_t *levelflat, boolean noencoremap)
|
|||
// --------------------+
|
||||
static void HWR_LoadPatchMipmap(patch_t *patch, GLMipmap_t *grMipmap)
|
||||
{
|
||||
GLPatch_t *grPatch = patch->hardware;
|
||||
GLPatch_t *grPatch = (GLPatch_t *)patch->hardware;
|
||||
if (!grMipmap->downloaded && !grMipmap->data)
|
||||
HWR_MakePatch(patch, grPatch, grMipmap, true);
|
||||
|
||||
|
|
@ -1092,7 +1092,7 @@ static void HWR_LoadPatchMipmap(patch_t *patch, GLMipmap_t *grMipmap)
|
|||
// ----------------------+
|
||||
static void HWR_UpdatePatchMipmap(patch_t *patch, GLMipmap_t *grMipmap)
|
||||
{
|
||||
GLPatch_t *grPatch = patch->hardware;
|
||||
GLPatch_t *grPatch = (GLPatch_t *)patch->hardware;
|
||||
HWR_MakePatch(patch, grPatch, grMipmap, true);
|
||||
|
||||
// If hardware does not have the texture, then call pfnSetTexture to upload it
|
||||
|
|
@ -1127,7 +1127,7 @@ void HWR_GetMappedPatch(patch_t *patch, const UINT8 *colormap)
|
|||
|
||||
if (!patch->hardware)
|
||||
Patch_CreateGL(patch);
|
||||
grPatch = patch->hardware;
|
||||
grPatch = (GLPatch_t *)patch->hardware;
|
||||
|
||||
// Blatant hack for encore colormapping aside...
|
||||
if (colormap == colormaps || colormap == NULL || colormap == (const UINT8*)(COLORMAP_REMAPOFFSET))
|
||||
|
|
@ -1161,12 +1161,12 @@ void HWR_GetMappedPatch(patch_t *patch, const UINT8 *colormap)
|
|||
// (it have a liste of mipmap)
|
||||
// this malloc is cleared in HWR_FreeColormapCache
|
||||
// (...) unfortunately z_malloc fragment alot the memory :(so malloc is better
|
||||
newMipmap = calloc(1, sizeof (*newMipmap));
|
||||
newMipmap = (GLMipmap_t *)calloc(1, sizeof (*newMipmap));
|
||||
if (newMipmap == NULL)
|
||||
I_Error("%s: Out of memory", "HWR_GetMappedPatch");
|
||||
grMipmap->nextcolormap = newMipmap;
|
||||
|
||||
newMipmap->colormap = Z_Calloc(sizeof(*newMipmap->colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
newMipmap->colormap = (GLColormap_t *)Z_Calloc(sizeof(*newMipmap->colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
newMipmap->colormap->source = colormap;
|
||||
M_Memcpy(newMipmap->colormap->data, colormap, 256 * sizeof(UINT8));
|
||||
|
||||
|
|
@ -1202,7 +1202,7 @@ static void HWR_DrawPicInCache(UINT8 *block, INT32 pblockwidth, INT32 pblockheig
|
|||
|
||||
stepy = ((INT32)SHORT(pic->height)<<FRACBITS)/pblockheight;
|
||||
stepx = ((INT32)SHORT(pic->width)<<FRACBITS)/pblockwidth;
|
||||
picbpp = format2bpp(picmode2GR[pic->mode]);
|
||||
picbpp = format2bpp((GLTextureFormat_t)picmode2GR[pic->mode]);
|
||||
posy = 0;
|
||||
for (j = 0; j < pblockheight; j++)
|
||||
{
|
||||
|
|
@ -1270,7 +1270,7 @@ patch_t *HWR_GetPic(lumpnum_t lumpnum)
|
|||
UINT8 *block;
|
||||
size_t len;
|
||||
|
||||
pic = W_CacheLumpNum(lumpnum, PU_CACHE);
|
||||
pic = (pic_t*)W_CacheLumpNum(lumpnum, PU_CACHE);
|
||||
patch->width = SHORT(pic->width);
|
||||
patch->height = SHORT(pic->height);
|
||||
len = W_LumpLength(lumpnum) - sizeof (pic_t);
|
||||
|
|
@ -1279,9 +1279,9 @@ patch_t *HWR_GetPic(lumpnum_t lumpnum)
|
|||
grPatch->mipmap->height = (UINT16)patch->height;
|
||||
|
||||
if (pic->mode == PALETTE)
|
||||
grPatch->mipmap->format = textureformat; // can be set by driver
|
||||
grPatch->mipmap->format = (GLTextureFormat_t)textureformat; // can be set by driver
|
||||
else
|
||||
grPatch->mipmap->format = picmode2GR[pic->mode];
|
||||
grPatch->mipmap->format = (GLTextureFormat_t)picmode2GR[pic->mode];
|
||||
|
||||
Z_Free(grPatch->mipmap->data);
|
||||
|
||||
|
|
@ -1290,7 +1290,7 @@ patch_t *HWR_GetPic(lumpnum_t lumpnum)
|
|||
|
||||
if (patch->width == SHORT(pic->width) &&
|
||||
patch->height == SHORT(pic->height) &&
|
||||
format2bpp(grPatch->mipmap->format) == format2bpp(picmode2GR[pic->mode]))
|
||||
format2bpp(grPatch->mipmap->format) == format2bpp((GLTextureFormat_t)picmode2GR[pic->mode]))
|
||||
{
|
||||
// no conversion needed
|
||||
M_Memcpy(grPatch->mipmap->data, pic->data,len);
|
||||
|
|
@ -1318,7 +1318,7 @@ patch_t *HWR_GetCachedGLPatchPwad(UINT16 wadnum, UINT16 lumpnum)
|
|||
lumpcache_t *lumpcache = wadfiles[wadnum]->patchcache;
|
||||
if (!lumpcache[lumpnum])
|
||||
{
|
||||
void *ptr = Z_Calloc(sizeof(patch_t), PU_PATCH, &lumpcache[lumpnum]);
|
||||
patch_t *ptr = (patch_t *)Z_Calloc(sizeof(patch_t), PU_PATCH, &lumpcache[lumpnum]);
|
||||
Patch_Create(NULL, 0, ptr);
|
||||
Patch_AllocateHardwarePatch(ptr);
|
||||
}
|
||||
|
|
@ -1336,7 +1336,7 @@ static void HWR_DrawFadeMaskInCache(GLMipmap_t *mipmap, INT32 pblockwidth, INT32
|
|||
{
|
||||
INT32 i,j;
|
||||
fixed_t posx, posy, stepx, stepy;
|
||||
UINT8 *block = mipmap->data; // places the data directly into here
|
||||
UINT8 *block = (UINT8 *)mipmap->data; // places the data directly into here
|
||||
UINT8 *flat;
|
||||
UINT8 *dest, *src, texel;
|
||||
RGBA_t col;
|
||||
|
|
@ -214,54 +214,48 @@ typedef struct
|
|||
|
||||
// Flags describing how to render a polygon
|
||||
// You pass a combination of these flags to DrawPolygon()
|
||||
enum EPolyFlags
|
||||
{
|
||||
// Mutually exclusive blend flags
|
||||
PF_Masked = 0x00000001, // Poly is alpha scaled and 0 alpha pixels are discarded (holes in texture)
|
||||
PF_Translucent = 0x00000002, // Poly is transparent, alpha = level of transparency
|
||||
PF_Environment = 0x00000004, // Poly should be drawn environment mapped. (Hurdler: used for text drawing)
|
||||
PF_Additive = 0x00000008, // Source blending factor is additive.
|
||||
PF_Subtractive = 0x00000010, // Subtractive color blending
|
||||
PF_ReverseSubtract = 0x00000020, // Reverse subtract, used in wall splats (decals)
|
||||
PF_Multiplicative = 0x00000040, // Multiplicative color blending
|
||||
PF_Invert = 0x00000100, // Polygon inverts the colours of what it's in front of
|
||||
PF_Fog = 0x20000000, // Fog blocks
|
||||
PF_NoAlphaTest = 0x40000000, // Disables alpha testing
|
||||
PF_Blending = (PF_Masked|PF_Translucent|PF_Environment|PF_Additive|PF_Subtractive|PF_ReverseSubtract|PF_Multiplicative|PF_Invert|PF_Fog) & ~PF_NoAlphaTest,
|
||||
PF_EnvironmentTrans = (PF_Translucent|PF_Additive|PF_Subtractive|PF_ReverseSubtract|PF_Multiplicative|PF_Environment),
|
||||
typedef int EPolyFlags;
|
||||
// Mutually exclusive blend flags
|
||||
#define PF_Masked (0x00000001) // Poly is alpha scaled and 0 alpha pixels are discarded (holes in texture)
|
||||
#define PF_Translucent (0x00000002) // Poly is transparent, alpha = level of transparency
|
||||
#define PF_Environment (0x00000004) // Poly should be drawn environment mapped. (Hurdler: used for text drawing)
|
||||
#define PF_Additive (0x00000008) // Source blending factor is additive.
|
||||
#define PF_Subtractive (0x00000010) // Subtractive color blending
|
||||
#define PF_ReverseSubtract (0x00000020) // Reverse subtract, used in wall splats (decals)
|
||||
#define PF_Multiplicative (0x00000040) // Multiplicative color blending
|
||||
#define PF_Invert (0x00000100) // Polygon inverts the colours of what it's in front of
|
||||
#define PF_Fog (0x20000000) // Fog blocks
|
||||
#define PF_NoAlphaTest (0x40000000) // Disables alpha testing
|
||||
#define PF_Blending (((PF_Masked)|(PF_Translucent)|(PF_Environment)|(PF_Additive)|(PF_Subtractive)|(PF_ReverseSubtract)|(PF_Multiplicative)|(PF_Invert)|(PF_Fog)) & ~(PF_NoAlphaTest))
|
||||
#define PF_EnvironmentTrans (((PF_Translucent)|(PF_Additive)|(PF_Subtractive)|(PF_ReverseSubtract)|(PF_Multiplicative)|(PF_Environment)))
|
||||
|
||||
// other flag bits
|
||||
PF_Occlude = 0x00000100, // Updates the depth buffer
|
||||
PF_NoDepthTest = 0x00000200, // Disables the depth test mode
|
||||
PF_Invisible = 0x00000400, // Disables write to color buffer
|
||||
PF_Decal = 0x00000800, // Enables polygon offset
|
||||
PF_Modulated = 0x00001000, // Modulation (multiply output with constant RGBA)
|
||||
// other flag bits
|
||||
#define PF_Occlude (0x00000100) // Updates the depth buffer
|
||||
#define PF_NoDepthTest (0x00000200) // Disables the depth test mode
|
||||
#define PF_Invisible (0x00000400) // Disables write to color buffer
|
||||
#define PF_Decal (0x00000800) // Enables polygon offset
|
||||
#define PF_Modulated (0x00001000) // Modulation (multiply output with constant RGBA)
|
||||
// When set, pass the color constant into the FSurfaceInfo -> PolyColor
|
||||
PF_NoTexture = 0x00002000, // Disables texturing
|
||||
PF_Corona = 0x00004000, // Tells the renderer we are drawing a corona
|
||||
PF_ColorMapped = 0x00008000, // Surface has "tint" and "fade" colors, which are sent as uniforms to a shader.
|
||||
PF_RemoveYWrap = 0x00010000, // Forces clamp texture on Y
|
||||
PF_ForceWrapX = 0x00020000, // Forces repeat texture on X
|
||||
PF_ForceWrapY = 0x00040000, // Forces repeat texture on Y
|
||||
PF_Ripple = 0x00100000, // Water ripple effect. The current backend doesn't use it for anything.
|
||||
PF_WireFrame = 0x00200000, // Draws vertices as lines instead of triangles
|
||||
};
|
||||
#define PF_NoTexture (0x00002000) // Disables texturing
|
||||
#define PF_Corona (0x00004000) // Tells the renderer we are drawing a corona
|
||||
#define PF_ColorMapped (0x00008000) // Surface has "tint" and "fade" colors, which are sent as uniforms to a shader.
|
||||
#define PF_RemoveYWrap (0x00010000) // Forces clamp texture on Y
|
||||
#define PF_ForceWrapX (0x00020000) // Forces repeat texture on X
|
||||
#define PF_ForceWrapY (0x00040000) // Forces repeat texture on Y
|
||||
#define PF_Ripple (0x00100000) // Water ripple effect. The current backend doesn't use it for anything.
|
||||
#define PF_WireFrame (0x00200000) // Draws vertices as lines instead of triangles
|
||||
|
||||
|
||||
enum ESurfFlags
|
||||
{
|
||||
SF_DYNLIGHT = 0x00000001,
|
||||
};
|
||||
typedef int ESurfFlags;
|
||||
#define SF_DYNLIGHT (0x00000001)
|
||||
|
||||
enum ETextureFlags
|
||||
{
|
||||
TF_WRAPX = 0x00000001, // wrap around X
|
||||
TF_WRAPY = 0x00000002, // wrap around Y
|
||||
TF_WRAPXY = TF_WRAPY|TF_WRAPX, // very common so use alias is more easy
|
||||
TF_CHROMAKEYED = 0x00000010,
|
||||
TF_TRANSPARENT = 0x00000040, // texture with some alpha == 0
|
||||
TF_BRIGHTMAP = 0x00000080,
|
||||
};
|
||||
typedef int ETextureFlags;
|
||||
#define TF_WRAPX (0x00000001) // wrap around X
|
||||
#define TF_WRAPY (0x00000002) // wrap around Y
|
||||
#define TF_WRAPXY (TF_WRAPY|TF_WRAPX) // very common so use alias is more easy
|
||||
#define TF_CHROMAKEYED (0x00000010)
|
||||
#define TF_TRANSPARENT (0x00000040) // texture with some alpha == 0
|
||||
#define TF_BRIGHTMAP (0x00000080)
|
||||
|
||||
struct FTextureInfo
|
||||
{
|
||||
|
|
|
|||
|
|
@ -881,7 +881,7 @@ void HWR_DrawViewBorder(INT32 clearlines)
|
|||
// top edge
|
||||
if (clearlines > basewindowy - 8)
|
||||
{
|
||||
patch = W_CachePatchNum(viewborderlump[BRDR_T], PU_PATCH);
|
||||
patch = (patch_t*)W_CachePatchNum(viewborderlump[BRDR_T], PU_PATCH);
|
||||
for (x = 0; x < baseviewwidth; x += 8)
|
||||
HWR_DrawPatch(patch, basewindowx + x, basewindowy - 8,
|
||||
0);
|
||||
|
|
@ -890,7 +890,7 @@ void HWR_DrawViewBorder(INT32 clearlines)
|
|||
// bottom edge
|
||||
if (clearlines > basewindowy + baseviewheight)
|
||||
{
|
||||
patch = W_CachePatchNum(viewborderlump[BRDR_B], PU_PATCH);
|
||||
patch = (patch_t*)W_CachePatchNum(viewborderlump[BRDR_B], PU_PATCH);
|
||||
for (x = 0; x < baseviewwidth; x += 8)
|
||||
HWR_DrawPatch(patch, basewindowx + x,
|
||||
basewindowy + baseviewheight, 0);
|
||||
|
|
@ -899,7 +899,7 @@ void HWR_DrawViewBorder(INT32 clearlines)
|
|||
// left edge
|
||||
if (clearlines > basewindowy)
|
||||
{
|
||||
patch = W_CachePatchNum(viewborderlump[BRDR_L], PU_PATCH);
|
||||
patch = (patch_t*)W_CachePatchNum(viewborderlump[BRDR_L], PU_PATCH);
|
||||
for (y = 0; y < baseviewheight && basewindowy + y < clearlines;
|
||||
y += 8)
|
||||
{
|
||||
|
|
@ -911,7 +911,7 @@ void HWR_DrawViewBorder(INT32 clearlines)
|
|||
// right edge
|
||||
if (clearlines > basewindowy)
|
||||
{
|
||||
patch = W_CachePatchNum(viewborderlump[BRDR_R], PU_PATCH);
|
||||
patch = (patch_t*)W_CachePatchNum(viewborderlump[BRDR_R], PU_PATCH);
|
||||
for (y = 0; y < baseviewheight && basewindowy+y < clearlines;
|
||||
y += 8)
|
||||
{
|
||||
|
|
@ -922,22 +922,22 @@ void HWR_DrawViewBorder(INT32 clearlines)
|
|||
|
||||
// Draw beveled corners.
|
||||
if (clearlines > basewindowy - 8)
|
||||
HWR_DrawPatch(W_CachePatchNum(viewborderlump[BRDR_TL],
|
||||
HWR_DrawPatch((patch_t*)W_CachePatchNum(viewborderlump[BRDR_TL],
|
||||
PU_PATCH),
|
||||
basewindowx - 8, basewindowy - 8, 0);
|
||||
|
||||
if (clearlines > basewindowy - 8)
|
||||
HWR_DrawPatch(W_CachePatchNum(viewborderlump[BRDR_TR],
|
||||
HWR_DrawPatch((patch_t*)W_CachePatchNum(viewborderlump[BRDR_TR],
|
||||
PU_PATCH),
|
||||
basewindowx + baseviewwidth, basewindowy - 8, 0);
|
||||
|
||||
if (clearlines > basewindowy+baseviewheight)
|
||||
HWR_DrawPatch(W_CachePatchNum(viewborderlump[BRDR_BL],
|
||||
HWR_DrawPatch((patch_t*)W_CachePatchNum(viewborderlump[BRDR_BL],
|
||||
PU_PATCH),
|
||||
basewindowx - 8, basewindowy + baseviewheight, 0);
|
||||
|
||||
if (clearlines > basewindowy + baseviewheight)
|
||||
HWR_DrawPatch(W_CachePatchNum(viewborderlump[BRDR_BR],
|
||||
HWR_DrawPatch((patch_t*)W_CachePatchNum(viewborderlump[BRDR_BR],
|
||||
PU_PATCH),
|
||||
basewindowx + baseviewwidth,
|
||||
basewindowy + baseviewheight, 0);
|
||||
|
|
@ -1297,19 +1297,19 @@ static inline boolean saveTGA(const char *file_name, void *buffer,
|
|||
|
||||
UINT8 *HWR_GetScreenshot(void)
|
||||
{
|
||||
UINT8 *buf = malloc(vid.width * vid.height * 3 * sizeof (*buf));
|
||||
UINT8 *buf = (UINT8 *)malloc(vid.width * vid.height * 3 * sizeof (*buf));
|
||||
|
||||
if (!buf)
|
||||
return NULL;
|
||||
// returns 24bit 888 RGB
|
||||
HWD.pfnReadRect(0, 0, vid.width, vid.height, vid.width * 3, (void *)buf);
|
||||
HWD.pfnReadRect(0, 0, vid.width, vid.height, vid.width * 3, (UINT16 *)buf);
|
||||
return buf;
|
||||
}
|
||||
|
||||
boolean HWR_Screenshot(const char *pathname)
|
||||
{
|
||||
boolean ret;
|
||||
UINT8 *buf = malloc(vid.width * vid.height * 3 * sizeof (*buf));
|
||||
UINT8 *buf = (UINT8 *)malloc(vid.width * vid.height * 3 * sizeof (*buf));
|
||||
|
||||
if (!buf)
|
||||
{
|
||||
|
|
@ -1318,7 +1318,7 @@ boolean HWR_Screenshot(const char *pathname)
|
|||
}
|
||||
|
||||
// returns 24bit 888 RGB
|
||||
HWD.pfnReadRect(0, 0, vid.width, vid.height, vid.width * 3, (void *)buf);
|
||||
HWD.pfnReadRect(0, 0, vid.width, vid.height, vid.width * 3, (UINT16 *)buf);
|
||||
|
||||
#ifdef USE_PNG
|
||||
ret = M_SavePNG(pathname, buf, vid.width, vid.height, NULL);
|
||||
|
|
@ -41,6 +41,7 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUI
|
|||
EXPORT void HWRAPI(DrawIndexedTriangles) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, UINT32 *IndexArray);
|
||||
EXPORT void HWRAPI(RenderSkyDome) (gl_sky_t *sky);
|
||||
EXPORT void HWRAPI(SetBlend) (FBITFIELD PolyFlags);
|
||||
EXPORT void HWRAPI(ResetRenderState) (void);
|
||||
EXPORT void HWRAPI(ClearBuffer) (FBOOLEAN ColorMask, FBOOLEAN DepthMask, FRGBAFloat *ClearColor);
|
||||
EXPORT void HWRAPI(SetTexture) (GLMipmap_t *TexInfo);
|
||||
EXPORT void HWRAPI(UpdateTexture) (GLMipmap_t *TexInfo);
|
||||
|
|
@ -126,6 +127,7 @@ struct hwdriver_s
|
|||
|
||||
SetShaderInfo pfnSetShaderInfo;
|
||||
LoadCustomShader pfnLoadCustomShader;
|
||||
ResetRenderState pfnResetRenderState;
|
||||
};
|
||||
|
||||
extern struct hwdriver_s hwdriver;
|
||||
|
|
|
|||
|
|
@ -1233,7 +1233,7 @@ static void HWR_SetLight(void)
|
|||
if (!lightmappatch.mipmap->downloaded && !lightmappatch.mipmap->data)
|
||||
{
|
||||
|
||||
UINT16 *Data = Z_Malloc(129*128*sizeof (UINT16), PU_HWRCACHE, &lightmappatch.mipmap->data);
|
||||
UINT16 *Data = (UINT16 *)Z_Malloc(129*128*sizeof (UINT16), PU_HWRCACHE, &lightmappatch.mipmap->data);
|
||||
|
||||
for (i = 0; i < 128; i++)
|
||||
{
|
||||
|
|
@ -1285,7 +1285,7 @@ static inline void HWR_BuildWallLightmaps(FVector *p1, FVector *p2, int lighnum,
|
|||
(void)lighnum;
|
||||
(void)p1;
|
||||
(void)p2;
|
||||
lp = malloc(sizeof (*lp));
|
||||
lp = (lightmap_t *)malloc(sizeof (*lp));
|
||||
lp->next = line->lightmaps;
|
||||
line->lightmaps = lp;
|
||||
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
/// \file hw_main.c
|
||||
/// \brief hardware renderer, using the standard HardWareRender driver DLL for SRB2
|
||||
|
||||
#include <algorithm>
|
||||
#include <math.h>
|
||||
|
||||
#include "../doomstat.h"
|
||||
|
|
@ -226,7 +227,7 @@ void HWR_ObjectLightLevelPost(gl_vissprite_t *spr, const sector_t *sector, INT32
|
|||
);
|
||||
|
||||
// Less change in contrast in dark sectors
|
||||
extralight = FixedMul(extralight, min(max(0, *lightlevel), 255) * FRACUNIT / 255);
|
||||
extralight = FixedMul(extralight, std::min(std::max(0, *lightlevel), 255) * FRACUNIT / 255);
|
||||
|
||||
if (papersprite)
|
||||
{
|
||||
|
|
@ -241,7 +242,7 @@ void HWR_ObjectLightLevelPost(gl_vissprite_t *spr, const sector_t *sector, INT32
|
|||
|
||||
// Less change in contrast at further distances, to counteract DOOM diminished light
|
||||
fixed_t n = FixedDiv(FixedMul(xscale, LIGHTRESOLUTIONFIX), ((MAXLIGHTSCALE-1) << LIGHTSCALESHIFT));
|
||||
extralight = FixedMul(extralight, min(n, FRACUNIT));
|
||||
extralight = FixedMul(extralight, std::min(n, FRACUNIT));
|
||||
|
||||
// Contrast is stronger for normal sprites, stronger than wall lighting is at the same distance
|
||||
*lightlevel += FixedFloor((extralight * 2) + (FRACUNIT / 2)) / FRACUNIT;
|
||||
|
|
@ -290,8 +291,8 @@ void HWR_Lighting(FSurfaceInfo *Surface, INT32 light_level, extracolormap_t *col
|
|||
fade_alpha = (float)(sqrt(255-light_level) * 12) / 255.0f;
|
||||
|
||||
// Clamp the alpha values
|
||||
tint_alpha = min(max(tint_alpha, 0.0f), 1.0f);
|
||||
fade_alpha = min(max(fade_alpha, 0.0f), 1.0f);
|
||||
tint_alpha = std::min(std::max(tint_alpha, 0.0f), 1.0f);
|
||||
fade_alpha = std::min(std::max(fade_alpha, 0.0f), 1.0f);
|
||||
|
||||
red = (tint_color.s.red * tint_alpha) + (red * (1.0f - tint_alpha));
|
||||
green = (tint_color.s.green * tint_alpha) + (green * (1.0f - tint_alpha));
|
||||
|
|
@ -307,7 +308,7 @@ void HWR_Lighting(FSurfaceInfo *Surface, INT32 light_level, extracolormap_t *col
|
|||
}
|
||||
|
||||
// Clamp the light level, since it can sometimes go out of the 0-255 range from animations
|
||||
light_level = min(max(light_level, 0), 255);
|
||||
light_level = std::min(std::max(light_level, 0), 255);
|
||||
|
||||
Surface->PolyColor.rgba = poly_color.rgba;
|
||||
Surface->TintColor.rgba = tint_color.rgba;
|
||||
|
|
@ -737,7 +738,7 @@ FBITFIELD HWR_GetBlendModeFlag(INT32 ast)
|
|||
|
||||
UINT8 HWR_GetTranstableAlpha(INT32 transtablenum)
|
||||
{
|
||||
transtablenum = max(min(transtablenum, tr_trans90), 0);
|
||||
transtablenum = std::max(std::min(transtablenum, (INT32)tr_trans90), 0);
|
||||
|
||||
switch (transtablenum)
|
||||
{
|
||||
|
|
@ -1332,20 +1333,20 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
}
|
||||
else
|
||||
{
|
||||
popentop = min(worldtop, worldhigh);
|
||||
popenbottom = max(worldbottom, worldlow);
|
||||
popentop = std::min(worldtop, worldhigh);
|
||||
popenbottom = std::max(worldbottom, worldlow);
|
||||
}
|
||||
|
||||
if (gl_linedef->flags & ML_NOSKEW)
|
||||
{
|
||||
if (gl_linedef->flags & ML_MIDPEG)
|
||||
{
|
||||
polybottom = max(front->floorheight, back->floorheight) + gl_sidedef->rowoffset;
|
||||
polybottom = std::max(front->floorheight, back->floorheight) + gl_sidedef->rowoffset;
|
||||
polytop = polybottom + textureheight[gl_midtexture]*repeats;
|
||||
}
|
||||
else
|
||||
{
|
||||
polytop = min(front->ceilingheight, back->ceilingheight) + gl_sidedef->rowoffset;
|
||||
polytop = std::min(front->ceilingheight, back->ceilingheight) + gl_sidedef->rowoffset;
|
||||
polybottom = polytop - textureheight[gl_midtexture]*repeats;
|
||||
}
|
||||
}
|
||||
|
|
@ -1374,8 +1375,8 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
highcut = popentop;
|
||||
}
|
||||
|
||||
h = min(highcut, polytop);
|
||||
l = max(polybottom, lowcut);
|
||||
h = std::min(highcut, polytop);
|
||||
l = std::max(polybottom, lowcut);
|
||||
|
||||
{
|
||||
// PEGGING
|
||||
|
|
@ -1434,8 +1435,8 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
: worldlowslope-worldlow;
|
||||
|
||||
// Texture stuff
|
||||
h = min(highcut, polytop);
|
||||
l = max(polybottom, lowcut);
|
||||
h = std::min(highcut, polytop);
|
||||
l = std::max(polybottom, lowcut);
|
||||
|
||||
{
|
||||
// PEGGING
|
||||
|
|
@ -1443,7 +1444,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
texturevpeg = textureheight[gl_sidedef->midtexture]*repeats - h + polybottom;
|
||||
else
|
||||
texturevpeg = polytop - h;
|
||||
|
||||
|
||||
// Apply tripwire flipping for slope correction as well
|
||||
if (R_ShouldFlipTripWire(gl_linedef))
|
||||
{
|
||||
|
|
@ -1643,10 +1644,10 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
INT32 texnum, basetexnum;
|
||||
line_t * newline = NULL; // Multi-Property FOF
|
||||
|
||||
lowcut = max(worldbottom, worldlow);
|
||||
highcut = min(worldtop, worldhigh);
|
||||
lowcutslope = max(worldbottomslope, worldlowslope);
|
||||
highcutslope = min(worldtopslope, worldhighslope);
|
||||
lowcut = std::max(worldbottom, worldlow);
|
||||
highcut = std::min(worldtop, worldhigh);
|
||||
lowcutslope = std::max(worldbottomslope, worldlowslope);
|
||||
highcutslope = std::min(worldtopslope, worldhighslope);
|
||||
|
||||
if (gl_backsector->ffloors)
|
||||
{
|
||||
|
|
@ -1793,7 +1794,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
if (rover->alpha < 256 || rover->blend)
|
||||
{
|
||||
blendmode = HWR_GetBlendModeFlag(rover->blend);
|
||||
Surf.PolyColor.s.alpha = max(0, min(rover->alpha, 255));
|
||||
Surf.PolyColor.s.alpha = std::max(0, std::min(rover->alpha, 255));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1922,7 +1923,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
|||
if (rover->alpha < 256 || rover->blend)
|
||||
{
|
||||
blendmode = HWR_GetBlendModeFlag(rover->blend);
|
||||
Surf.PolyColor.s.alpha = max(0, min(rover->alpha, 255));
|
||||
Surf.PolyColor.s.alpha = std::max(0, std::min(rover->alpha, 255));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2168,9 +2169,9 @@ static boolean HWR_CheckBBox(fixed_t *bspcoord)
|
|||
static inline void HWR_AddPolyObjectSegs(void)
|
||||
{
|
||||
size_t i, j;
|
||||
seg_t *gl_fakeline = Z_Calloc(sizeof(seg_t), PU_STATIC, NULL);
|
||||
polyvertex_t *pv1 = Z_Calloc(sizeof(polyvertex_t), PU_STATIC, NULL);
|
||||
polyvertex_t *pv2 = Z_Calloc(sizeof(polyvertex_t), PU_STATIC, NULL);
|
||||
seg_t *gl_fakeline = (seg_t *)Z_Calloc(sizeof(seg_t), PU_STATIC, NULL);
|
||||
polyvertex_t *pv1 = (polyvertex_t *)Z_Calloc(sizeof(polyvertex_t), PU_STATIC, NULL);
|
||||
polyvertex_t *pv2 = (polyvertex_t *)Z_Calloc(sizeof(polyvertex_t), PU_STATIC, NULL);
|
||||
|
||||
// Sort through all the polyobjects
|
||||
for (i = 0; i < numpolys; ++i)
|
||||
|
|
@ -2551,12 +2552,12 @@ static void HWR_Subsector(size_t num)
|
|||
|
||||
light = R_GetPlaneLight(gl_frontsector, locFloorHeight, false);
|
||||
if (gl_frontsector->floorlightsec == -1 && !gl_frontsector->floorlightabsolute)
|
||||
floorlightlevel = max(0, min(255, *gl_frontsector->lightlist[light].lightlevel + gl_frontsector->floorlightlevel));
|
||||
floorlightlevel = std::max(0, std::min(255, *gl_frontsector->lightlist[light].lightlevel + gl_frontsector->floorlightlevel));
|
||||
floorcolormap = *gl_frontsector->lightlist[light].extra_colormap;
|
||||
|
||||
light = R_GetPlaneLight(gl_frontsector, locCeilingHeight, false);
|
||||
if (gl_frontsector->ceilinglightsec == -1 && !gl_frontsector->ceilinglightabsolute)
|
||||
ceilinglightlevel = max(0, min(255, *gl_frontsector->lightlist[light].lightlevel + gl_frontsector->ceilinglightlevel));
|
||||
ceilinglightlevel = std::max(0, std::min(255, *gl_frontsector->lightlist[light].lightlevel + gl_frontsector->ceilinglightlevel));
|
||||
ceilingcolormap = *gl_frontsector->lightlist[light].extra_colormap;
|
||||
}
|
||||
|
||||
|
|
@ -2667,7 +2668,7 @@ static void HWR_Subsector(size_t num)
|
|||
false,
|
||||
*rover->bottomheight,
|
||||
*gl_frontsector->lightlist[light].lightlevel,
|
||||
max(0, min(rover->alpha, 255)), rover->master->frontsector, blendmode,
|
||||
std::max(0, std::min(rover->alpha, 255)), rover->master->frontsector, blendmode,
|
||||
false, *gl_frontsector->lightlist[light].extra_colormap);
|
||||
}
|
||||
else
|
||||
|
|
@ -2715,7 +2716,7 @@ static void HWR_Subsector(size_t num)
|
|||
true,
|
||||
*rover->topheight,
|
||||
*gl_frontsector->lightlist[light].lightlevel,
|
||||
max(0, min(rover->alpha, 255)), rover->master->frontsector, blendmode,
|
||||
std::max(0, std::min(rover->alpha, 255)), rover->master->frontsector, blendmode,
|
||||
false, *gl_frontsector->lightlist[light].extra_colormap);
|
||||
}
|
||||
else
|
||||
|
|
@ -4390,14 +4391,14 @@ static void HWR_CreateDrawNodes(void)
|
|||
// Dump EVERYTHING into a huge drawnode list. Then we'll sort it!
|
||||
// Could this be optimized into _AddTransparentWall/_AddTransparentPlane?
|
||||
// Hell yes! But sort algorithm must be modified to use a linked list.
|
||||
sortnode = Z_Calloc((sizeof(planeinfo_t)*numplanes)
|
||||
sortnode = (gl_drawnode_t *)Z_Calloc((sizeof(planeinfo_t)*numplanes)
|
||||
+ (sizeof(polyplaneinfo_t)*numpolyplanes)
|
||||
+ (sizeof(wallinfo_t)*numwalls)
|
||||
,PU_STATIC, NULL);
|
||||
// todo:
|
||||
// However, in reality we shouldn't be re-copying and shifting all this information
|
||||
// that is already lying around. This should all be in some sort of linked list or lists.
|
||||
sortindex = Z_Calloc(sizeof(size_t) * (numplanes + numpolyplanes + numwalls), PU_STATIC, NULL);
|
||||
sortindex = (size_t *)Z_Calloc(sizeof(size_t) * (numplanes + numpolyplanes + numwalls), PU_STATIC, NULL);
|
||||
|
||||
ps_hw_nodesorttime = I_GetPreciseTime();
|
||||
|
||||
|
|
@ -4740,7 +4741,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
fixed_t jitters = HITLAGJITTERS;
|
||||
if (R_UsingFrameInterpolation() && !paused)
|
||||
jitters += (rendertimefrac / HITLAGDIV);
|
||||
|
||||
|
||||
fixed_t mul = thing->hitlag * jitters;
|
||||
|
||||
if (leveltime & 1)
|
||||
|
|
@ -5175,16 +5176,16 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
// Hide not-yet-unlocked characters in replays from other people
|
||||
if (skinnum >= 0 && !R_CanShowSkinInDemo(skinnum))
|
||||
{
|
||||
vis->colormap = R_GetTranslationColormap(TC_BLINK, thing->color, GTC_CACHE);
|
||||
vis->colormap = R_GetTranslationColormap(TC_BLINK, (skincolornum_t)thing->color, GTC_CACHE);
|
||||
}
|
||||
//Hurdler: 25/04/2000: now support colormap in hardware mode
|
||||
else if (R_ThingIsFlashing(vis->mobj))
|
||||
{
|
||||
vis->colormap = R_GetTranslationColormap(TC_HITLAG, 0, GTC_CACHE);
|
||||
vis->colormap = R_GetTranslationColormap(TC_HITLAG, (skincolornum_t)0, GTC_CACHE);
|
||||
}
|
||||
else if (thing->color)
|
||||
{
|
||||
vis->colormap = R_GetTranslationColormap(thing->colorized ? TC_RAINBOW : skinnum, thing->color, GTC_CACHE);
|
||||
vis->colormap = R_GetTranslationColormap(thing->colorized ? TC_RAINBOW : skinnum, (skincolornum_t)thing->color, GTC_CACHE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -5450,7 +5451,6 @@ void HWR_ClearSkyDome(void)
|
|||
sky->loops = NULL;
|
||||
sky->data = NULL;
|
||||
|
||||
sky->vbo = 0;
|
||||
sky->rows = sky->columns = 0;
|
||||
sky->loopcount = 0;
|
||||
|
||||
|
|
@ -5484,11 +5484,11 @@ void HWR_BuildSkyDome(void)
|
|||
sky->vertex_count = 2 * sky->rows * (sky->columns * 2 + 2) + sky->columns * 2;
|
||||
|
||||
if (!sky->loops)
|
||||
sky->loops = malloc((sky->rows * 2 + 2) * sizeof(sky->loops[0]));
|
||||
sky->loops = (gl_skyloopdef_t *)malloc((sky->rows * 2 + 2) * sizeof(sky->loops[0]));
|
||||
|
||||
// create vertex array
|
||||
if (!sky->data)
|
||||
sky->data = malloc(sky->vertex_count * sizeof(sky->data[0]));
|
||||
sky->data = (gl_skyvertex_t *)malloc(sky->vertex_count * sizeof(sky->data[0]));
|
||||
|
||||
sky->texture = texturetranslation[skytexture];
|
||||
sky->width = texture->width;
|
||||
|
|
@ -5620,7 +5620,7 @@ static void HWR_DrawSkyBackground(player_t *player)
|
|||
|
||||
dimensionmultiply = ((float)textures[texturetranslation[skytexture]]->width/256.0f);
|
||||
|
||||
v[0].s = v[3].s = (-1.0f * angle) / ((ANGLE_90-1)*dimensionmultiply); // left
|
||||
v[0].s = v[3].s = (-1.0f * angle) / ((ANGLE_90-1.0f)*dimensionmultiply); // left
|
||||
v[2].s = v[1].s = v[0].s + (1.0f/dimensionmultiply); // right (or left + 1.0f)
|
||||
// use +angle and -1.0f above instead if you wanted old backwards behavior
|
||||
|
||||
|
|
@ -5782,10 +5782,10 @@ static void HWR_SetTransformAiming(FTransform *trans, player_t *player, boolean
|
|||
//
|
||||
static void HWR_SetShaderState(void)
|
||||
{
|
||||
hwdshaderoption_t state = cv_glshaders.value;
|
||||
hwdshaderoption_t state = (hwdshaderoption_t)cv_glshaders.value;
|
||||
|
||||
if (!cv_glallowshaders.value)
|
||||
state = (cv_glshaders.value == HWD_SHADEROPTION_ON ? HWD_SHADEROPTION_NOCUSTOM : cv_glshaders.value);
|
||||
state = (hwdshaderoption_t)(cv_glshaders.value == HWD_SHADEROPTION_ON ? HWD_SHADEROPTION_NOCUSTOM : cv_glshaders.value);
|
||||
|
||||
HWD.pfnSetSpecialState(HWD_SET_SHADERS, (INT32)state);
|
||||
HWD.pfnSetShader(SHADER_DEFAULT);
|
||||
|
|
@ -5993,6 +5993,8 @@ static void HWR_RollTransform(FTransform *tr, angle_t roll)
|
|||
|
||||
void HWR_RenderPlayerView(void)
|
||||
{
|
||||
HWD.pfnResetRenderState();
|
||||
|
||||
player_t * player = &players[displayplayers[viewssnum]];
|
||||
|
||||
const boolean skybox = (player->skybox.viewpoint && cv_skybox.value); // True if there's a skybox object and skyboxes are on
|
||||
|
|
@ -6056,8 +6058,10 @@ void HWR_LoadLevel(void)
|
|||
// 3D ENGINE COMMANDS
|
||||
// ==========================================================================
|
||||
|
||||
extern "C" CV_PossibleValue_t glshaders_cons_t[];
|
||||
CV_PossibleValue_t glshaders_cons_t[] = {{HWD_SHADEROPTION_OFF, "Off"}, {HWD_SHADEROPTION_ON, "On"}, {HWD_SHADEROPTION_NOCUSTOM, "Ignore custom shaders"}, {0, NULL}};
|
||||
|
||||
extern "C" CV_PossibleValue_t glfiltermode_cons_t[];
|
||||
CV_PossibleValue_t glfiltermode_cons_t[]= {{HWD_SET_TEXTUREFILTER_POINTSAMPLED, "Nearest"},
|
||||
{HWD_SET_TEXTUREFILTER_BILINEAR, "Bilinear"}, {HWD_SET_TEXTUREFILTER_TRILINEAR, "Trilinear"},
|
||||
{HWD_SET_TEXTUREFILTER_MIXED1, "Linear_Nearest"},
|
||||
|
|
@ -6065,27 +6069,29 @@ CV_PossibleValue_t glfiltermode_cons_t[]= {{HWD_SET_TEXTUREFILTER_POINTSAMPLED,
|
|||
{HWD_SET_TEXTUREFILTER_MIXED3, "Nearest_Mipmap"},
|
||||
{0, NULL}};
|
||||
|
||||
extern "C" CV_PossibleValue_t glanisotropicmode_cons_t[];
|
||||
CV_PossibleValue_t glanisotropicmode_cons_t[] = {{1, "MIN"}, {16, "MAX"}, {0, NULL}};
|
||||
|
||||
void CV_glfiltermode_OnChange(void);
|
||||
extern "C" void CV_glfiltermode_OnChange(void);
|
||||
void CV_glfiltermode_OnChange(void)
|
||||
{
|
||||
if (rendermode == render_opengl)
|
||||
HWD.pfnSetSpecialState(HWD_SET_TEXTUREFILTERMODE, cv_glfiltermode.value);
|
||||
}
|
||||
|
||||
void CV_glanisotropic_OnChange(void);
|
||||
extern "C" void CV_glanisotropic_OnChange(void);
|
||||
void CV_glanisotropic_OnChange(void)
|
||||
{
|
||||
if (rendermode == render_opengl)
|
||||
HWD.pfnSetSpecialState(HWD_SET_TEXTUREANISOTROPICMODE, cv_glanisotropicmode.value);
|
||||
}
|
||||
|
||||
extern "C" struct CVarList *cvlist_opengl;
|
||||
|
||||
//added by Hurdler: console varibale that are saved
|
||||
void HWR_AddCommands(void)
|
||||
{
|
||||
{
|
||||
extern struct CVarList *cvlist_opengl;
|
||||
CV_RegisterList(cvlist_opengl);
|
||||
}
|
||||
}
|
||||
|
|
@ -6466,10 +6472,10 @@ void HWR_LoadCustomShadersFromFile(UINT16 wadnum, boolean PK3)
|
|||
if (lump == INT16_MAX)
|
||||
return;
|
||||
|
||||
shaderdef = W_CacheLumpNumPwad(wadnum, lump, PU_CACHE);
|
||||
shaderdef = (char *)W_CacheLumpNumPwad(wadnum, lump, PU_CACHE);
|
||||
size = W_LumpLengthPwad(wadnum, lump);
|
||||
|
||||
line = Z_Malloc(size+1, PU_STATIC, NULL);
|
||||
line = (char *)Z_Malloc(size+1, PU_STATIC, NULL);
|
||||
M_Memcpy(line, shaderdef, size);
|
||||
line[size] = '\0';
|
||||
|
||||
|
|
@ -6530,14 +6536,14 @@ skip_lump:
|
|||
|
||||
if (PK3)
|
||||
{
|
||||
shader_lumpname = Z_Malloc(strlen(value) + 12, PU_STATIC, NULL);
|
||||
shader_lumpname = (char *)Z_Malloc(strlen(value) + 12, PU_STATIC, NULL);
|
||||
strcpy(shader_lumpname, "Shaders/sh_");
|
||||
strcat(shader_lumpname, value);
|
||||
shader_lumpnum = W_CheckNumForFullNamePK3(shader_lumpname, wadnum, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
shader_lumpname = Z_Malloc(strlen(value) + 4, PU_STATIC, NULL);
|
||||
shader_lumpname = (char *)Z_Malloc(strlen(value) + 4, PU_STATIC, NULL);
|
||||
strcpy(shader_lumpname, "SH_");
|
||||
strcat(shader_lumpname, value);
|
||||
shader_lumpnum = W_CheckNumForNamePwad(shader_lumpname, wadnum, 0);
|
||||
|
|
@ -6551,7 +6557,7 @@ skip_lump:
|
|||
}
|
||||
|
||||
shader_size = W_LumpLengthPwad(wadnum, shader_lumpnum);
|
||||
shader_source = Z_Malloc(shader_size, PU_STATIC, NULL);
|
||||
shader_source = (char *)Z_Malloc(shader_size, PU_STATIC, NULL);
|
||||
W_ReadLumpPwad(wadnum, shader_lumpnum, shader_source);
|
||||
|
||||
HWD.pfnLoadCustomShader(shaderxlat[i].id, shader_source, shader_size, (shadertype == 2));
|
||||
|
|
@ -15,6 +15,7 @@
|
|||
#ifdef __GNUC__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <algorithm>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -100,11 +101,11 @@ static void md2_freeModel (model_t *model)
|
|||
static model_t *md2_readModel(const char *filename)
|
||||
{
|
||||
//Filename checking fixed ~Monster Iestyn and Golden
|
||||
if (FIL_FileExists(va("%s"PATHSEP"%s", srb2home, filename)))
|
||||
return LoadModel(va("%s"PATHSEP"%s", srb2home, filename), PU_STATIC);
|
||||
if (FIL_FileExists(va("%s" PATHSEP "%s", srb2home, filename)))
|
||||
return LoadModel(va("%s" PATHSEP "%s", srb2home, filename), PU_STATIC);
|
||||
|
||||
if (FIL_FileExists(va("%s"PATHSEP"%s", srb2path, filename)))
|
||||
return LoadModel(va("%s"PATHSEP"%s", srb2path, filename), PU_STATIC);
|
||||
if (FIL_FileExists(va("%s" PATHSEP "%s", srb2path, filename)))
|
||||
return LoadModel(va("%s" PATHSEP "%s", srb2path, filename), PU_STATIC);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -168,18 +169,18 @@ static GLTextureFormat_t PNG_Load(const char *filename, int *w, int *h, GLPatch_
|
|||
#endif
|
||||
volatile png_FILE_p png_FILE;
|
||||
//Filename checking fixed ~Monster Iestyn and Golden
|
||||
char *pngfilename = va("%s"PATHSEP"models"PATHSEP"%s", srb2home, filename);
|
||||
char *pngfilename = va("%s" PATHSEP "models" PATHSEP "%s", srb2home, filename);
|
||||
|
||||
FIL_ForceExtension(pngfilename, ".png");
|
||||
png_FILE = fopen(pngfilename, "rb");
|
||||
if (!png_FILE)
|
||||
{
|
||||
pngfilename = va("%s"PATHSEP"models"PATHSEP"%s", srb2path, filename);
|
||||
pngfilename = va("%s" PATHSEP "models" PATHSEP "%s", srb2path, filename);
|
||||
FIL_ForceExtension(pngfilename, ".png");
|
||||
png_FILE = fopen(pngfilename, "rb");
|
||||
//CONS_Debug(DBG_RENDER, "M_SavePNG: Error on opening %s for loading\n", filename);
|
||||
if (!png_FILE)
|
||||
return 0;
|
||||
return (GLTextureFormat_t)0;
|
||||
}
|
||||
|
||||
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL,
|
||||
|
|
@ -188,7 +189,7 @@ static GLTextureFormat_t PNG_Load(const char *filename, int *w, int *h, GLPatch_
|
|||
{
|
||||
CONS_Debug(DBG_RENDER, "PNG_Load: Error on initialize libpng\n");
|
||||
fclose(png_FILE);
|
||||
return 0;
|
||||
return (GLTextureFormat_t)0;
|
||||
}
|
||||
|
||||
png_info_ptr = png_create_info_struct(png_ptr);
|
||||
|
|
@ -197,7 +198,7 @@ static GLTextureFormat_t PNG_Load(const char *filename, int *w, int *h, GLPatch_
|
|||
CONS_Debug(DBG_RENDER, "PNG_Load: Error on allocate for libpng\n");
|
||||
png_destroy_read_struct(&png_ptr, NULL, NULL);
|
||||
fclose(png_FILE);
|
||||
return 0;
|
||||
return (GLTextureFormat_t)0;
|
||||
}
|
||||
|
||||
#ifdef USE_FAR_KEYWORD
|
||||
|
|
@ -210,7 +211,7 @@ static GLTextureFormat_t PNG_Load(const char *filename, int *w, int *h, GLPatch_
|
|||
png_destroy_read_struct(&png_ptr, &png_info_ptr, NULL);
|
||||
fclose(png_FILE);
|
||||
Z_Free(grpatch->mipmap->data);
|
||||
return 0;
|
||||
return (GLTextureFormat_t)0;
|
||||
}
|
||||
#ifdef USE_FAR_KEYWORD
|
||||
png_memcpy(png_jmpbuf(png_ptr), jmpbuf, sizeof jmp_buf);
|
||||
|
|
@ -250,8 +251,8 @@ static GLTextureFormat_t PNG_Load(const char *filename, int *w, int *h, GLPatch_
|
|||
|
||||
{
|
||||
png_uint_32 i, pitch = png_get_rowbytes(png_ptr, png_info_ptr);
|
||||
png_bytep PNG_image = Z_Malloc(pitch*height, PU_HWRMODELTEXTURE, &grpatch->mipmap->data);
|
||||
png_bytepp row_pointers = png_malloc(png_ptr, height * sizeof (png_bytep));
|
||||
png_bytep PNG_image = (png_bytep)Z_Malloc(pitch*height, PU_HWRMODELTEXTURE, &grpatch->mipmap->data);
|
||||
png_bytepp row_pointers = (png_bytepp)png_malloc(png_ptr, height * sizeof (png_bytep));
|
||||
for (i = 0; i < height; i++)
|
||||
row_pointers[i] = PNG_image + i*pitch;
|
||||
png_read_image(png_ptr, row_pointers);
|
||||
|
|
@ -301,42 +302,42 @@ static GLTextureFormat_t PCX_Load(const char *filename, int *w, int *h,
|
|||
INT32 ch, rep;
|
||||
FILE *file;
|
||||
//Filename checking fixed ~Monster Iestyn and Golden
|
||||
char *pcxfilename = va("%s"PATHSEP"models"PATHSEP"%s", srb2home, filename);
|
||||
char *pcxfilename = va("%s" PATHSEP "models" PATHSEP "%s", srb2home, filename);
|
||||
|
||||
FIL_ForceExtension(pcxfilename, ".pcx");
|
||||
file = fopen(pcxfilename, "rb");
|
||||
if (!file)
|
||||
{
|
||||
pcxfilename = va("%s"PATHSEP"models"PATHSEP"%s", srb2path, filename);
|
||||
pcxfilename = va("%s" PATHSEP "models" PATHSEP "%s", srb2path, filename);
|
||||
FIL_ForceExtension(pcxfilename, ".pcx");
|
||||
file = fopen(pcxfilename, "rb");
|
||||
if (!file)
|
||||
return 0;
|
||||
return (GLTextureFormat_t)0;
|
||||
}
|
||||
|
||||
if (fread(&header, sizeof (PcxHeader), 1, file) != 1)
|
||||
{
|
||||
fclose(file);
|
||||
return 0;
|
||||
return (GLTextureFormat_t)0;
|
||||
}
|
||||
|
||||
if (header.bitsPerPixel != 8)
|
||||
{
|
||||
fclose(file);
|
||||
return 0;
|
||||
return (GLTextureFormat_t)0;
|
||||
}
|
||||
|
||||
fseek(file, -PALSIZE, SEEK_END);
|
||||
|
||||
pw = *w = header.xmax - header.xmin + 1;
|
||||
ph = *h = header.ymax - header.ymin + 1;
|
||||
image = Z_Malloc(pw*ph*4, PU_HWRMODELTEXTURE, &grpatch->mipmap->data);
|
||||
image = (RGBA_t *)Z_Malloc(pw*ph*4, PU_HWRMODELTEXTURE, &grpatch->mipmap->data);
|
||||
|
||||
if (fread(palette, sizeof (UINT8), PALSIZE, file) != PALSIZE)
|
||||
{
|
||||
Z_Free(image);
|
||||
fclose(file);
|
||||
return 0;
|
||||
return (GLTextureFormat_t)0;
|
||||
}
|
||||
fseek(file, sizeof (PcxHeader), SEEK_SET);
|
||||
|
||||
|
|
@ -378,7 +379,7 @@ static void md2_loadTexture(md2_t *model)
|
|||
|
||||
if (model->grpatch)
|
||||
{
|
||||
patch = model->grpatch;
|
||||
patch = (patch_t*)(model->grpatch);
|
||||
grPatch = (GLPatch_t *)(patch->hardware);
|
||||
if (grPatch)
|
||||
Z_Free(grPatch->mipmap->data);
|
||||
|
|
@ -418,7 +419,7 @@ static void md2_loadTexture(md2_t *model)
|
|||
grPatch->mipmap->height = (UINT16)h;
|
||||
|
||||
// Lactozilla: Apply colour cube
|
||||
image = grPatch->mipmap->data;
|
||||
image = (RGBA_t*)(grPatch->mipmap->data);
|
||||
size = w*h;
|
||||
while (size--)
|
||||
{
|
||||
|
|
@ -437,14 +438,14 @@ static void md2_loadBlendTexture(md2_t *model)
|
|||
{
|
||||
patch_t *patch;
|
||||
GLPatch_t *grPatch = NULL;
|
||||
char *filename = Z_Malloc(strlen(model->filename)+7, PU_STATIC, NULL);
|
||||
char *filename = (char *)Z_Malloc(strlen(model->filename)+7, PU_STATIC, NULL);
|
||||
|
||||
strcpy(filename, model->filename);
|
||||
FIL_ForceExtension(filename, "_blend.png");
|
||||
|
||||
if (model->blendgrpatch)
|
||||
{
|
||||
patch = model->blendgrpatch;
|
||||
patch = (patch_t*)(model->blendgrpatch);
|
||||
grPatch = (GLPatch_t *)(patch->hardware);
|
||||
if (grPatch)
|
||||
Z_Free(grPatch->mipmap->data);
|
||||
|
|
@ -495,10 +496,10 @@ void HWR_InitModels(void)
|
|||
size_t i;
|
||||
INT32 s;
|
||||
FILE *f;
|
||||
char name[26], filename[32];
|
||||
char name[24], filename[32];
|
||||
// name[24] is used to check for names in the models.dat file that match with sprites or player skins
|
||||
// sprite names are always 4 characters long, and names is for player skins can be up to 19 characters long
|
||||
// PLAYERMODELPREFIX is 6 characters long
|
||||
// sprite names are always 4 characters long, and names is for player skins can be up to 16+1 characters long
|
||||
// PLAYERMODELPREFIX is 6 characters long - 24 fits in (16 + 6) + 1
|
||||
float scale, offset;
|
||||
size_t prefixlen;
|
||||
|
||||
|
|
@ -528,11 +529,11 @@ void HWR_InitModels(void)
|
|||
|
||||
// read the models.dat file
|
||||
//Filename checking fixed ~Monster Iestyn and Golden
|
||||
f = fopen(va("%s"PATHSEP"%s", srb2home, "models.dat"), "rt");
|
||||
f = fopen(va("%s" PATHSEP "%s", srb2home, "models.dat"), "rt");
|
||||
|
||||
if (!f)
|
||||
{
|
||||
f = fopen(va("%s"PATHSEP"%s", srb2path, "models.dat"), "rt");
|
||||
f = fopen(va("%s" PATHSEP "%s", srb2path, "models.dat"), "rt");
|
||||
if (!f)
|
||||
{
|
||||
CONS_Printf("%s %s\n", M_GetText("Error while loading models.dat:"), strerror(errno));
|
||||
|
|
@ -544,7 +545,7 @@ void HWR_InitModels(void)
|
|||
// length of the player model prefix
|
||||
prefixlen = strlen(PLAYERMODELPREFIX);
|
||||
|
||||
while (fscanf(f, "%25s %31s %f %f", name, filename, &scale, &offset) == 4)
|
||||
while (fscanf(f, "%23s %31s %f %f", name, filename, &scale, &offset) == 4)
|
||||
{
|
||||
char *skinname = name;
|
||||
size_t len = strlen(name);
|
||||
|
|
@ -609,11 +610,11 @@ void HWR_AddPlayerModel(INT32 skin) // For skins that were added after startup
|
|||
|
||||
// read the models.dat file
|
||||
//Filename checking fixed ~Monster Iestyn and Golden
|
||||
f = fopen(va("%s"PATHSEP"%s", srb2home, "models.dat"), "rt");
|
||||
f = fopen(va("%s" PATHSEP "%s", srb2home, "models.dat"), "rt");
|
||||
|
||||
if (!f)
|
||||
{
|
||||
f = fopen(va("%s"PATHSEP"%s", srb2path, "models.dat"), "rt");
|
||||
f = fopen(va("%s" PATHSEP "%s", srb2path, "models.dat"), "rt");
|
||||
if (!f)
|
||||
{
|
||||
CONS_Printf("%s %s\n", M_GetText("Error while loading models.dat:"), strerror(errno));
|
||||
|
|
@ -626,7 +627,7 @@ void HWR_AddPlayerModel(INT32 skin) // For skins that were added after startup
|
|||
prefixlen = strlen(PLAYERMODELPREFIX);
|
||||
|
||||
// Check for any models that match the names of player skins!
|
||||
while (fscanf(f, "%25s %31s %f %f", name, filename, &scale, &offset) == 4)
|
||||
while (fscanf(f, "%23s %31s %f %f", name, filename, &scale, &offset) == 4)
|
||||
{
|
||||
char *skinname = name;
|
||||
size_t len = strlen(name);
|
||||
|
|
@ -655,8 +656,8 @@ void HWR_AddSpriteModel(size_t spritenum) // For sprites that were added after s
|
|||
{
|
||||
FILE *f;
|
||||
// name[24] is used to check for names in the models.dat file that match with sprites or player skins
|
||||
// sprite names are always 4 characters long, and names is for player skins can be up to 19 characters long
|
||||
// PLAYERMODELPREFIX is 6 characters long
|
||||
// sprite names are always 4 characters long, and names is for player skins can be up to 16+1 characters long
|
||||
// PLAYERMODELPREFIX is 6 characters long - 24 fits in (16 + 6) + 1
|
||||
char name[24], filename[32];
|
||||
float scale, offset;
|
||||
|
||||
|
|
@ -668,11 +669,11 @@ void HWR_AddSpriteModel(size_t spritenum) // For sprites that were added after s
|
|||
|
||||
// Read the models.dat file
|
||||
//Filename checking fixed ~Monster Iestyn and Golden
|
||||
f = fopen(va("%s"PATHSEP"%s", srb2home, "models.dat"), "rt");
|
||||
f = fopen(va("%s" PATHSEP" %s", srb2home, "models.dat"), "rt");
|
||||
|
||||
if (!f)
|
||||
{
|
||||
f = fopen(va("%s"PATHSEP"%s", srb2path, "models.dat"), "rt");
|
||||
f = fopen(va("%s" PATHSEP" %s", srb2path, "models.dat"), "rt");
|
||||
if (!f)
|
||||
{
|
||||
CONS_Printf("%s %s\n", M_GetText("Error while loading models.dat:"), strerror(errno));
|
||||
|
|
@ -682,7 +683,7 @@ void HWR_AddSpriteModel(size_t spritenum) // For sprites that were added after s
|
|||
}
|
||||
|
||||
// Check for any models that match the names of sprite names!
|
||||
while (fscanf(f, "%25s %31s %f %f", name, filename, &scale, &offset) == 4)
|
||||
while (fscanf(f, "%23s %31s %f %f", name, filename, &scale, &offset) == 4)
|
||||
{
|
||||
// length of the sprite name
|
||||
size_t len = strlen(name);
|
||||
|
|
@ -713,8 +714,8 @@ spritemodelfound:
|
|||
|
||||
static void HWR_CreateBlendedTexture(patch_t *gpatch, patch_t *blendgpatch, GLMipmap_t *grMipmap, INT32 skinnum, skincolornum_t color)
|
||||
{
|
||||
GLPatch_t *hwrPatch = gpatch->hardware;
|
||||
GLPatch_t *hwrBlendPatch = blendgpatch->hardware;
|
||||
GLPatch_t *hwrPatch = (GLPatch_t*)(gpatch->hardware);
|
||||
GLPatch_t *hwrBlendPatch = (GLPatch_t*)(blendgpatch->hardware);
|
||||
UINT16 w = gpatch->width, h = gpatch->height;
|
||||
UINT32 size = w*h;
|
||||
RGBA_t *image, *blendimage, *cur, blendcolor;
|
||||
|
|
@ -747,11 +748,11 @@ static void HWR_CreateBlendedTexture(patch_t *gpatch, patch_t *blendgpatch, GLMi
|
|||
grMipmap->data = NULL;
|
||||
}
|
||||
|
||||
cur = Z_Malloc(size*4, PU_HWRMODELTEXTURE, &grMipmap->data);
|
||||
cur = (RGBA_t *)Z_Malloc(size*4, PU_HWRMODELTEXTURE, &grMipmap->data);
|
||||
memset(cur, 0x00, size*4);
|
||||
|
||||
image = hwrPatch->mipmap->data;
|
||||
blendimage = hwrBlendPatch->mipmap->data;
|
||||
image = (RGBA_t*)(hwrPatch->mipmap->data);
|
||||
blendimage = (RGBA_t*)(hwrBlendPatch->mipmap->data);
|
||||
|
||||
// TC_METALSONIC includes an actual skincolor translation, on top of its flashing.
|
||||
if (skinnum == TC_METALSONIC)
|
||||
|
|
@ -1068,15 +1069,15 @@ static void HWR_CreateBlendedTexture(patch_t *gpatch, patch_t *blendgpatch, GLMi
|
|||
}
|
||||
|
||||
tempcolor = (brightness * blendcolor.s.red) / colorbright;
|
||||
tempcolor = min(255, tempcolor);
|
||||
tempcolor = std::min<UINT32>(255, tempcolor);
|
||||
cur->s.red = (UINT8)tempcolor;
|
||||
|
||||
tempcolor = (brightness * blendcolor.s.green) / colorbright;
|
||||
tempcolor = min(255, tempcolor);
|
||||
tempcolor = std::min<UINT32>(255, tempcolor);
|
||||
cur->s.green = (UINT8)tempcolor;
|
||||
|
||||
tempcolor = (brightness * blendcolor.s.blue) / colorbright;
|
||||
tempcolor = min(255, tempcolor);
|
||||
tempcolor = std::min<UINT32>(255, tempcolor);
|
||||
cur->s.blue = (UINT8)tempcolor;
|
||||
cur->s.alpha = image->s.alpha;
|
||||
}
|
||||
|
|
@ -1086,15 +1087,15 @@ static void HWR_CreateBlendedTexture(patch_t *gpatch, patch_t *blendgpatch, GLMi
|
|||
INT32 tempcolor;
|
||||
|
||||
tempcolor = ((image->s.red * (255-blendimage->s.alpha)) / 255) + ((blendcolor.s.red * blendimage->s.alpha) / 255);
|
||||
tempcolor = min(255, tempcolor);
|
||||
tempcolor = std::min(255, tempcolor);
|
||||
cur->s.red = (UINT8)tempcolor;
|
||||
|
||||
tempcolor = ((image->s.green * (255-blendimage->s.alpha)) / 255) + ((blendcolor.s.green * blendimage->s.alpha) / 255);
|
||||
tempcolor = min(255, tempcolor);
|
||||
tempcolor = std::min(255, tempcolor);
|
||||
cur->s.green = (UINT8)tempcolor;
|
||||
|
||||
tempcolor = ((image->s.blue * (255-blendimage->s.alpha)) / 255) + ((blendcolor.s.blue * blendimage->s.alpha) / 255);
|
||||
tempcolor = min(255, tempcolor);
|
||||
tempcolor = std::min(255, tempcolor);
|
||||
cur->s.blue = (UINT8)tempcolor;
|
||||
cur->s.alpha = image->s.alpha;
|
||||
}
|
||||
|
|
@ -1129,7 +1130,7 @@ skippixel:
|
|||
static void HWR_GetBlendedTexture(patch_t *patch, patch_t *blendpatch, INT32 skinnum, const UINT8 *colormap, skincolornum_t color)
|
||||
{
|
||||
// mostly copied from HWR_GetMappedPatch, hence the similarities and comment
|
||||
GLPatch_t *grPatch = patch->hardware;
|
||||
GLPatch_t *grPatch = (GLPatch_t*)(patch->hardware);
|
||||
GLPatch_t *grBlendPatch = NULL;
|
||||
GLMipmap_t *grMipmap, *newMipmap;
|
||||
|
||||
|
|
@ -1140,7 +1141,7 @@ static void HWR_GetBlendedTexture(patch_t *patch, patch_t *blendpatch, INT32 ski
|
|||
return;
|
||||
}
|
||||
|
||||
if ((blendpatch && (grBlendPatch = blendpatch->hardware) && grBlendPatch->mipmap->format)
|
||||
if ((blendpatch && (grBlendPatch = (GLPatch_t*)blendpatch->hardware) && grBlendPatch->mipmap->format)
|
||||
&& (patch->width != blendpatch->width || patch->height != blendpatch->height))
|
||||
{
|
||||
// Blend image exists, but it's bad.
|
||||
|
|
@ -1179,12 +1180,12 @@ static void HWR_GetBlendedTexture(patch_t *patch, patch_t *blendpatch, INT32 ski
|
|||
// (it have a liste of mipmap)
|
||||
// this malloc is cleared in HWR_FreeColormapCache
|
||||
// (...) unfortunately z_malloc fragment alot the memory :(so malloc is better
|
||||
newMipmap = calloc(1, sizeof (*newMipmap));
|
||||
newMipmap = (GLMipmap_t *)calloc(1, sizeof (*newMipmap));
|
||||
if (newMipmap == NULL)
|
||||
I_Error("%s: Out of memory", "HWR_GetBlendedTexture");
|
||||
grMipmap->nextcolormap = newMipmap;
|
||||
|
||||
newMipmap->colormap = Z_Calloc(sizeof(*newMipmap->colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
newMipmap->colormap = (GLColormap_t*) Z_Calloc(sizeof(*newMipmap->colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
newMipmap->colormap->source = colormap;
|
||||
M_Memcpy(newMipmap->colormap->data, colormap, 256 * sizeof(UINT8));
|
||||
|
||||
|
|
@ -1297,7 +1298,7 @@ static void adjustTextureCoords(model_t *model, patch_t *patch)
|
|||
// if originaluvs points to uvs, we need to allocate new memory for adjusted uvs
|
||||
// the old uvs are kept around for use in possible readjustments
|
||||
if (mesh->uvs == mesh->originaluvs)
|
||||
mesh->uvs = Z_Malloc(numVertices * 2 * sizeof(float), PU_STATIC, NULL);
|
||||
mesh->uvs = (float *)Z_Malloc(numVertices * 2 * sizeof(float), PU_STATIC, NULL);
|
||||
|
||||
uvWritePtr = mesh->uvs;
|
||||
|
||||
|
|
@ -1465,7 +1466,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
|
||||
// texture loading before model init, so it knows if sprite graphics are used, which
|
||||
// means that texture coordinates have to be adjusted
|
||||
gpatch = md2->grpatch;
|
||||
gpatch = (patch_t*)(md2->grpatch);
|
||||
if (gpatch)
|
||||
hwrPatch = ((GLPatch_t *)gpatch->hardware);
|
||||
|
||||
|
|
@ -1474,12 +1475,12 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
md2_loadTexture(md2);
|
||||
|
||||
// Load it again, because it isn't being loaded into gpatch after md2_loadtexture...
|
||||
gpatch = md2->grpatch;
|
||||
gpatch = (patch_t*)(md2->grpatch);
|
||||
if (gpatch)
|
||||
hwrPatch = ((GLPatch_t *)gpatch->hardware);
|
||||
|
||||
// Load blend texture
|
||||
blendgpatch = md2->blendgrpatch;
|
||||
blendgpatch = (patch_t*)(md2->blendgrpatch);
|
||||
if (blendgpatch)
|
||||
hwrBlendPatch = ((GLPatch_t *)blendgpatch->hardware);
|
||||
|
||||
|
|
@ -1489,7 +1490,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
md2_loadBlendTexture(md2);
|
||||
|
||||
// Load it again, because it isn't being loaded into blendgpatch after md2_loadblendtexture...
|
||||
blendgpatch = md2->blendgrpatch;
|
||||
blendgpatch = (patch_t*)(md2->blendgrpatch);
|
||||
if (blendgpatch)
|
||||
hwrBlendPatch = ((GLPatch_t *)blendgpatch->hardware);
|
||||
|
||||
|
|
@ -1573,7 +1574,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
frame = (spr->mobj->frame & FF_FRAMEMASK);
|
||||
if (spr->mobj->skin && spr->mobj->sprite == SPR_PLAY && md2->model->spr2frames)
|
||||
{
|
||||
spr2 = HWR_GetModelSprite2(md2, spr->mobj->skin, spr->mobj->sprite2, spr->mobj->player);
|
||||
spr2 = HWR_GetModelSprite2(md2, (skin_t*)spr->mobj->skin, spr->mobj->sprite2, spr->mobj->player);
|
||||
mod = md2->model->spr2frames[spr2].numframes;
|
||||
#ifndef DONTHIDEDIFFANIMLENGTH // by default, different anim length is masked by the mod
|
||||
if (mod > (INT32)((skin_t *)spr->mobj->skin)->sprites[spr2].numframes)
|
||||
|
|
@ -1610,7 +1611,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
&& (spr->mobj->frame & FF_ANIMATE
|
||||
|| (spr->mobj->state->nextstate != S_NULL
|
||||
&& states[spr->mobj->state->nextstate].sprite == SPR_PLAY
|
||||
&& ((P_GetSkinSprite2(spr->mobj->skin, (states[spr->mobj->state->nextstate].frame) & FF_FRAMEMASK, spr->mobj->player) == spr->mobj->sprite2)))))
|
||||
&& ((P_GetSkinSprite2((skin_t*)spr->mobj->skin, (states[spr->mobj->state->nextstate].frame) & FF_FRAMEMASK, spr->mobj->player) == spr->mobj->sprite2)))))
|
||||
{
|
||||
nextFrame = (spr->mobj->frame & FF_FRAMEMASK) + 1;
|
||||
if (nextFrame >= mod)
|
||||
|
|
@ -1780,7 +1781,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
// x offset
|
||||
xx = FIXED_TO_FLOAT(FixedMul(FixedMul(
|
||||
FixedMul(xoffs,spr->mobj->spritexscale),
|
||||
hflipmul),
|
||||
hflipmul),
|
||||
FINECOSINE(pitchR >> ANGLETOFINESHIFT)
|
||||
));
|
||||
xy = FIXED_TO_FLOAT(FixedMul(FixedMul(
|
||||
|
|
@ -1792,7 +1793,7 @@ boolean HWR_DrawModel(gl_vissprite_t *spr)
|
|||
// y offset
|
||||
yx = FIXED_TO_FLOAT(FixedMul(FixedMul(
|
||||
FixedMul(yoffs,spr->mobj->spritexscale),
|
||||
hflipmul),
|
||||
hflipmul),
|
||||
FINECOSINE(rollR >> ANGLETOFINESHIFT)
|
||||
));
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ model_t *MD2_LoadModel(const char *fileName, int ztag, boolean useFloat)
|
|||
fseek(f, 0, SEEK_SET);
|
||||
|
||||
// read in file
|
||||
buffer = malloc(fileLen);
|
||||
buffer = (char *)malloc(fileLen);
|
||||
if (fread(buffer, fileLen, 1, f)) { } // squash ignored fread error
|
||||
fclose(f);
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ model_t *MD3_LoadModel(const char *fileName, int ztag, boolean useFloat)
|
|||
fseek(f, 0, SEEK_SET);
|
||||
|
||||
// read in file
|
||||
buffer = malloc(fileLen);
|
||||
buffer = (char *)malloc(fileLen);
|
||||
fileReadLen = fread(buffer, fileLen, 1, f);
|
||||
fclose(f);
|
||||
|
||||
|
|
@ -429,7 +429,7 @@ EXPORT void HWRAPI(GetModeList) (vmode_t** pvidmodes, INT32 *numvidmodes)
|
|||
video_modes[iMode].pnext = &video_modes[iMode+1];
|
||||
video_modes[iMode].windowed = 0; // fullscreen is the default
|
||||
video_modes[iMode].misc = 0;
|
||||
video_modes[iMode].name = malloc(12 * sizeof (CHAR));
|
||||
video_modes[iMode].name = (char *)malloc(12 * sizeof (CHAR));
|
||||
sprintf(video_modes[iMode].name, "%dx%d", (INT32)Tmp.dmPelsWidth, (INT32)Tmp.dmPelsHeight);
|
||||
GL_DBG_Printf ("Mode: %s\n", video_modes[iMode].name);
|
||||
video_modes[iMode].width = Tmp.dmPelsWidth;
|
||||
|
|
@ -482,7 +482,7 @@ EXPORT void HWRAPI(GetModeList) (vmode_t** pvidmodes, INT32 *numvidmodes)
|
|||
video_modes[i].pnext = &video_modes[i+1];
|
||||
video_modes[i].windowed = 0; // fullscreen is the default
|
||||
video_modes[i].misc = 0;
|
||||
video_modes[i].name = malloc(12 * sizeof (CHAR));
|
||||
video_modes[i].name = (char *)malloc(12 * sizeof (CHAR));
|
||||
sprintf(video_modes[i].name, "%dx%d", res[i][0], res[i][1]);
|
||||
GL_DBG_Printf ("Mode: %s\n", video_modes[i].name);
|
||||
video_modes[i].width = res[i][0];
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
#include "r_opengl.h"
|
||||
|
|
@ -1107,7 +1108,7 @@ EXPORT void HWRAPI(LoadCustomShader) (int number, char *code, size_t size, boole
|
|||
#define COPYSHADER(source) { \
|
||||
if (shader->source) \
|
||||
free(shader->source); \
|
||||
shader->source = malloc(size+1); \
|
||||
shader->source = (char *)malloc(size+1); \
|
||||
strncpy(shader->source, code, size); \
|
||||
shader->source[size] = 0; \
|
||||
}
|
||||
|
|
@ -1384,6 +1385,14 @@ void SetStates(void)
|
|||
pglLoadIdentity();
|
||||
pglScalef(1.0f, 1.0f, -1.0f);
|
||||
pglGetFloatv(GL_MODELVIEW_MATRIX, modelMatrix); // added for new coronas' code (without depth buffer)
|
||||
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
pglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
pglDisableClientState(GL_VERTEX_ARRAY);
|
||||
pglDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
pglDisableClientState(GL_NORMAL_ARRAY);
|
||||
pglDisableClientState(GL_COLOR_ARRAY);
|
||||
SetShader(SHADER_NONE);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1516,8 +1525,8 @@ EXPORT void HWRAPI(ReadRect) (INT32 x, INT32 y, INT32 width, INT32 height,
|
|||
// GL_DBG_Printf ("ReadRect()\n");
|
||||
if (dst_stride == width*3)
|
||||
{
|
||||
GLubyte*top = (GLvoid*)dst_data, *bottom = top + dst_stride * (height - 1);
|
||||
GLubyte *row = malloc(dst_stride);
|
||||
GLubyte*top = (GLubyte*)dst_data, *bottom = top + dst_stride * (height - 1);
|
||||
GLubyte *row = (GLubyte *)malloc(dst_stride);
|
||||
if (!row) return;
|
||||
pglPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
pglReadPixels(x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE, dst_data);
|
||||
|
|
@ -1531,11 +1540,13 @@ EXPORT void HWRAPI(ReadRect) (INT32 x, INT32 y, INT32 width, INT32 height,
|
|||
bottom -= dst_stride;
|
||||
}
|
||||
free(row);
|
||||
pglPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||
pglPixelStorei(GL_PACK_ALIGNMENT, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
INT32 j;
|
||||
GLubyte *image = malloc(width*height*3*sizeof (*image));
|
||||
GLubyte *image = (GLubyte *)malloc(width*height*3*sizeof (*image));
|
||||
if (!image) return;
|
||||
pglPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
pglReadPixels(x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE, image);
|
||||
|
|
@ -1552,6 +1563,8 @@ EXPORT void HWRAPI(ReadRect) (INT32 x, INT32 y, INT32 width, INT32 height,
|
|||
}
|
||||
}
|
||||
free(image);
|
||||
pglPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||
pglPixelStorei(GL_PACK_ALIGNMENT, 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1608,8 +1621,6 @@ EXPORT void HWRAPI(ClearBuffer) (FBOOLEAN ColorMask,
|
|||
SetBlend(DepthMask ? PF_Occlude | CurrentPolyFlags : CurrentPolyFlags&~PF_Occlude);
|
||||
|
||||
pglClear(ClearMask);
|
||||
pglEnableClientState(GL_VERTEX_ARRAY); // We always use this one
|
||||
pglEnableClientState(GL_TEXTURE_COORD_ARRAY); // And mostly this one, too
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1643,12 +1654,14 @@ EXPORT void HWRAPI(Draw2DLine) (F2DCoord * v1,
|
|||
p[6] = v2->x + dx; p[7] = -(v2->y - dy); p[8] = 1;
|
||||
p[9] = v1->x + dx; p[10] = -(v1->y - dy); p[11] = 1;
|
||||
|
||||
pglDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
pglColor4ubv((GLubyte*)&Color.s);
|
||||
pglVertexPointer(3, GL_FLOAT, 0, p);
|
||||
pglDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
|
||||
pglEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
pglEnableClientState(GL_VERTEX_ARRAY);
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
pglDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
pglDisableClientState(GL_VERTEX_ARRAY);
|
||||
|
||||
pglEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
|
|
@ -1865,12 +1878,17 @@ EXPORT void HWRAPI(SetBlend) (FBITFIELD PolyFlags)
|
|||
CurrentPolyFlags = PolyFlags;
|
||||
}
|
||||
|
||||
EXPORT void HWRAPI(ResetRenderState) (void)
|
||||
{
|
||||
SetStates();
|
||||
}
|
||||
|
||||
static void AllocTextureBuffer(GLMipmap_t *pTexInfo)
|
||||
{
|
||||
size_t size = pTexInfo->width * pTexInfo->height;
|
||||
if (size > textureBufferSize)
|
||||
{
|
||||
textureBuffer = realloc(textureBuffer, size * sizeof(RGBA_t));
|
||||
textureBuffer = (RGBA_t *)realloc(textureBuffer, size * sizeof(RGBA_t));
|
||||
if (textureBuffer == NULL)
|
||||
I_Error("AllocTextureBuffer: out of memory allocating %s bytes", sizeu1(size * sizeof(RGBA_t)));
|
||||
textureBufferSize = size;
|
||||
|
|
@ -2081,6 +2099,8 @@ EXPORT void HWRAPI(UpdateTexture) (GLMipmap_t *pTexInfo)
|
|||
if (maximumAnisotropy)
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropic_filter);
|
||||
|
||||
pglPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||
pglPixelStorei(GL_PACK_ALIGNMENT, 4);
|
||||
pglActiveTexture(GL_TEXTURE0);
|
||||
}
|
||||
|
||||
|
|
@ -2112,7 +2132,7 @@ EXPORT void HWRAPI(SetTexture) (GLMipmap_t *pTexInfo)
|
|||
}
|
||||
else
|
||||
{
|
||||
FTextureInfo *newTex = calloc(1, sizeof (*newTex));
|
||||
FTextureInfo *newTex = (FTextureInfo *)calloc(1, sizeof (*newTex));
|
||||
|
||||
UpdateTexture(pTexInfo);
|
||||
|
||||
|
|
@ -2334,7 +2354,7 @@ static void Shader_CompileError(const char *message, GLuint program, INT32 shade
|
|||
|
||||
if (logLength)
|
||||
{
|
||||
infoLog = malloc(logLength);
|
||||
infoLog = (GLchar *)malloc(logLength);
|
||||
pglGetShaderInfoLog(program, logLength, NULL, infoLog);
|
||||
}
|
||||
|
||||
|
|
@ -2462,7 +2482,14 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUI
|
|||
|
||||
pglVertexPointer(3, GL_FLOAT, sizeof(FOutVector), &pOutVerts[0].x);
|
||||
pglTexCoordPointer(2, GL_FLOAT, sizeof(FOutVector), &pOutVerts[0].s);
|
||||
|
||||
pglEnableClientState(GL_VERTEX_ARRAY);
|
||||
pglEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
|
||||
pglDrawArrays(PolyFlags & PF_WireFrame ? GL_LINES : GL_TRIANGLE_FAN, 0, iNumPts);
|
||||
pglDisableClientState(GL_VERTEX_ARRAY);
|
||||
pglDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
|
||||
if (PolyFlags & PF_RemoveYWrap)
|
||||
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
|
|
@ -2480,7 +2507,14 @@ EXPORT void HWRAPI(DrawIndexedTriangles) (FSurfaceInfo *pSurf, FOutVector *pOutV
|
|||
|
||||
pglVertexPointer(3, GL_FLOAT, sizeof(FOutVector), &pOutVerts[0].x);
|
||||
pglTexCoordPointer(2, GL_FLOAT, sizeof(FOutVector), &pOutVerts[0].s);
|
||||
|
||||
pglEnableClientState(GL_VERTEX_ARRAY);
|
||||
pglEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
pglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
pglDrawElements(GL_TRIANGLES, iNumPts, GL_UNSIGNED_INT, IndexArray);
|
||||
pglDisableClientState(GL_VERTEX_ARRAY);
|
||||
pglDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
|
||||
// the DrawPolygon variant of this has some code about polyflags and wrapping here but havent noticed any problems from omitting it?
|
||||
}
|
||||
|
|
@ -2532,7 +2566,9 @@ EXPORT void HWRAPI(RenderSkyDome) (gl_sky_t *sky)
|
|||
pglTexCoordPointer(2, GL_FLOAT, sizeof(sky->data[0]), sky_vbo_u);
|
||||
pglColorPointer(4, GL_UNSIGNED_BYTE, sizeof(sky->data[0]), sky_vbo_r);
|
||||
|
||||
// activate color arrays
|
||||
// activate client states
|
||||
pglEnableClientState(GL_VERTEX_ARRAY);
|
||||
pglEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
pglEnableClientState(GL_COLOR_ARRAY);
|
||||
|
||||
// set transforms
|
||||
|
|
@ -2572,7 +2608,9 @@ EXPORT void HWRAPI(RenderSkyDome) (gl_sky_t *sky)
|
|||
if (gl_ext_arb_vertex_buffer_object)
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
|
||||
// deactivate color array
|
||||
// deactivate client states
|
||||
pglDisableClientState(GL_VERTEX_ARRAY);
|
||||
pglDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
pglDisableClientState(GL_COLOR_ARRAY);
|
||||
}
|
||||
|
||||
|
|
@ -2635,7 +2673,7 @@ EXPORT void HWRAPI(SetSpecialState) (hwdspecialstate_t IdState, INT32 Value)
|
|||
break;
|
||||
|
||||
case HWD_SET_TEXTUREANISOTROPICMODE:
|
||||
anisotropic_filter = min(Value,maximumAnisotropy);
|
||||
anisotropic_filter = std::min(Value,maximumAnisotropy);
|
||||
if (maximumAnisotropy)
|
||||
Flush(); //??? if we want to change filter mode by texture, remove this
|
||||
break;
|
||||
|
|
@ -2666,8 +2704,8 @@ static void AllocLerpBuffer(size_t size)
|
|||
free(normBuffer);
|
||||
|
||||
lerpBufferSize = size;
|
||||
vertBuffer = malloc(lerpBufferSize);
|
||||
normBuffer = malloc(lerpBufferSize);
|
||||
vertBuffer = (float *)malloc(lerpBufferSize);
|
||||
normBuffer = (float *)malloc(lerpBufferSize);
|
||||
}
|
||||
|
||||
// Static temporary buffer for doing frame interpolation
|
||||
|
|
@ -2684,8 +2722,8 @@ static void AllocLerpTinyBuffer(size_t size)
|
|||
free(normTinyBuffer);
|
||||
|
||||
lerpTinyBufferSize = size;
|
||||
vertTinyBuffer = malloc(lerpTinyBufferSize);
|
||||
normTinyBuffer = malloc(lerpTinyBufferSize / 2);
|
||||
vertTinyBuffer = (short *)malloc(lerpTinyBufferSize);
|
||||
normTinyBuffer = (char *)malloc(lerpTinyBufferSize / 2);
|
||||
}
|
||||
|
||||
#ifndef GL_STATIC_DRAW
|
||||
|
|
@ -2990,6 +3028,8 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, float duration, float
|
|||
memcmp(&(model->vbo_max_t), &(model->max_t), sizeof(model->max_t)) != 0)
|
||||
useVBO = false;
|
||||
|
||||
pglEnableClientState(GL_VERTEX_ARRAY);
|
||||
pglEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
pglEnableClientState(GL_NORMAL_ARRAY);
|
||||
|
||||
for (i = 0; i < model->numMeshes; i++)
|
||||
|
|
@ -3009,6 +3049,7 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, float duration, float
|
|||
if (useVBO)
|
||||
{
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, frame->vboID);
|
||||
pglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
pglVertexPointer(3, GL_SHORT, sizeof(vbotiny_t), BUFFER_OFFSET(0));
|
||||
pglNormalPointer(GL_BYTE, sizeof(vbotiny_t), BUFFER_OFFSET(sizeof(short)*3));
|
||||
pglTexCoordPointer(2, GL_FLOAT, sizeof(vbotiny_t), BUFFER_OFFSET(sizeof(short) * 3 + sizeof(char) * 6));
|
||||
|
|
@ -3018,6 +3059,8 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, float duration, float
|
|||
}
|
||||
else
|
||||
{
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
pglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
pglVertexPointer(3, GL_SHORT, 0, frame->vertices);
|
||||
pglNormalPointer(GL_BYTE, 0, frame->normals);
|
||||
pglTexCoordPointer(2, GL_FLOAT, 0, mesh->uvs);
|
||||
|
|
@ -3042,6 +3085,8 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, float duration, float
|
|||
*normPtr++ = (char)(frame->normals[j] + (pol * (nextframe->normals[j] - frame->normals[j])));
|
||||
}
|
||||
|
||||
pglBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
pglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
pglVertexPointer(3, GL_SHORT, 0, vertTinyBuffer);
|
||||
pglNormalPointer(GL_BYTE, 0, normTinyBuffer);
|
||||
pglTexCoordPointer(2, GL_FLOAT, 0, mesh->uvs);
|
||||
|
|
@ -3105,6 +3150,8 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, float duration, float
|
|||
}
|
||||
}
|
||||
|
||||
pglDisableClientState(GL_VERTEX_ARRAY);
|
||||
pglDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
pglDisableClientState(GL_NORMAL_ARRAY);
|
||||
|
||||
pglPopMatrix(); // should be the same as glLoadIdentity
|
||||
|
|
@ -114,12 +114,10 @@ extern char english_shiftxform[];
|
|||
#define CHAT_MUTE (cv_mute.value && !(server || IsPlayerAdmin(consoleplayer))) // this still allows to open the chat but not to type. That's used for scrolling and whatnot.
|
||||
#define OLD_MUTE (OLDCHAT && cv_mute.value && !(server || IsPlayerAdmin(consoleplayer))) // this is used to prevent oldchat from opening when muted.
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HU_SHOUT = 1, // Shout message
|
||||
HU_CSAY = 1<<1, // Middle-of-screen server message
|
||||
HU_PRIVNOTICE = 1<<2, // Special server sayto, we don't want to see it as the sender.
|
||||
} sayflags_t;
|
||||
typedef INT32 sayflags_t;
|
||||
#define HU_SHOUT (1) // Shout message
|
||||
#define HU_CSAY (1<<1) // Middle-of-screen server message
|
||||
#define HU_PRIVNOTICE (1<<2) // Special server sayto, we don't want to see it as the sender.
|
||||
|
||||
// some functions
|
||||
void HU_AddChatText(const char *text, boolean playsound);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ struct HardwareState
|
|||
std::unique_ptr<BlitRectPass> crtsharp_blit_rect;
|
||||
std::unique_ptr<ScreenshotPass> screen_capture;
|
||||
std::unique_ptr<UpscaleBackbuffer> backbuffer;
|
||||
std::unique_ptr<UpscaleBackbuffer> legacygl_backbuffer;
|
||||
std::unique_ptr<ImguiRenderer> imgui_renderer;
|
||||
WipeFrames wipe_frames;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -47,17 +47,29 @@ void UpscaleBackbuffer::begin_pass(Rhi& rhi)
|
|||
}
|
||||
|
||||
TextureDesc color_tex {};
|
||||
color_tex.format = TextureFormat::kRGBA;
|
||||
color_tex.format = TextureFormat::kRGB;
|
||||
color_tex.width = vid_width;
|
||||
color_tex.height = vid_height;
|
||||
color_tex.u_wrap = TextureWrapMode::kClamp;
|
||||
color_tex.v_wrap = TextureWrapMode::kClamp;
|
||||
color_ = rhi.create_texture(color_tex);
|
||||
|
||||
if (depth_)
|
||||
{
|
||||
rhi.destroy_renderbuffer(depth_);
|
||||
depth_ = kNullHandle;
|
||||
}
|
||||
|
||||
RenderbufferDesc rb_desc {};
|
||||
rb_desc.width = vid_width;
|
||||
rb_desc.height = vid_height;
|
||||
depth_ = rhi.create_renderbuffer(rb_desc);
|
||||
}
|
||||
|
||||
RenderPassBeginInfo begin_info {};
|
||||
begin_info.clear_color = {0, 0, 0, 1};
|
||||
begin_info.color_attachment = color_;
|
||||
begin_info.depth_stencil_attachment = depth_;
|
||||
begin_info.color_load_op = rhi::AttachmentLoadOp::kLoad;
|
||||
begin_info.color_store_op = rhi::AttachmentStoreOp::kStore;
|
||||
begin_info.depth_load_op = rhi::AttachmentLoadOp::kLoad;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ namespace srb2::hwr2
|
|||
class UpscaleBackbuffer
|
||||
{
|
||||
rhi::Handle<rhi::Texture> color_;
|
||||
rhi::Handle<rhi::Renderbuffer> depth_;
|
||||
|
||||
public:
|
||||
UpscaleBackbuffer();
|
||||
|
|
|
|||
|
|
@ -170,6 +170,9 @@ UINT32 I_GetRefreshRate(void);
|
|||
|
||||
void I_CaptureVideoFrame(void);
|
||||
|
||||
void VID_BeginLegacyGLRenderPass(void);
|
||||
void VID_EndLegacyGLRenderPass(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ static void reset_hardware_state(Rhi* rhi)
|
|||
g_hw_state.crtsharp_blit_rect = std::make_unique<BlitRectPass>(BlitRectPass::BlitMode::kCrtSharp);
|
||||
g_hw_state.screen_capture = std::make_unique<ScreenshotPass>();
|
||||
g_hw_state.backbuffer = std::make_unique<UpscaleBackbuffer>();
|
||||
g_hw_state.legacygl_backbuffer = std::make_unique<UpscaleBackbuffer>();
|
||||
g_hw_state.imgui_renderer = std::make_unique<ImguiRenderer>();
|
||||
g_hw_state.wipe_frames = {};
|
||||
|
||||
|
|
@ -215,13 +216,6 @@ void I_StartDisplayUpdate(void)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
rhi::Rhi* rhi = sys::get_rhi(sys::g_current_rhi);
|
||||
|
||||
if (rhi == nullptr)
|
||||
|
|
@ -252,15 +246,6 @@ void I_FinishUpdate(void)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
finish_legacy_ogl_update();
|
||||
FrameMark;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
temp_legacy_finishupdate_draws();
|
||||
|
||||
rhi::Rhi* rhi = sys::get_rhi(sys::g_current_rhi);
|
||||
|
|
@ -338,3 +323,40 @@ void I_FinishUpdate(void)
|
|||
// Immediately prepare to begin drawing the next frame
|
||||
I_StartDisplayUpdate();
|
||||
}
|
||||
|
||||
void VID_BeginLegacyGLRenderPass(void)
|
||||
{
|
||||
if (rendermode == render_none)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rhi::Rhi* rhi = sys::get_rhi(sys::g_current_rhi);
|
||||
|
||||
if (rhi == nullptr)
|
||||
{
|
||||
// ???
|
||||
return;
|
||||
}
|
||||
|
||||
g_hw_state.twodee_renderer->flush(*rhi, g_2d);
|
||||
g_hw_state.legacygl_backbuffer->begin_pass(*rhi);
|
||||
}
|
||||
|
||||
void VID_EndLegacyGLRenderPass(void)
|
||||
{
|
||||
if (rendermode == render_none)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rhi::Rhi* rhi = sys::get_rhi(sys::g_current_rhi);
|
||||
|
||||
if (rhi == nullptr)
|
||||
{
|
||||
// ???
|
||||
return;
|
||||
}
|
||||
|
||||
rhi->pop_render_pass();
|
||||
}
|
||||
|
|
|
|||
42
src/k_menu.h
42
src/k_menu.h
|
|
@ -134,14 +134,12 @@ void M_HandlePauseMenuCallVote(INT32 choice);
|
|||
// MENU TYPEDEFS
|
||||
//
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MBF_UD_LR_FLIPPED = 1, // flip up-down and left-right axes
|
||||
MBF_SOUNDLESS = 1<<1, // do not play base menu sounds
|
||||
MBF_NOLOOPENTRIES = 1<<2, // do not loop M_NextOpt/M_PrevOpt
|
||||
MBF_DRAWBGWHILEPLAYING = 1<<3, // run backroutine() outside of GS_MENU
|
||||
MBF_CANTRESTORE = 1<<4, // Do not use in restoreMenu
|
||||
} menubehaviourflags_t;
|
||||
typedef INT32 menubehaviourflags_t;
|
||||
#define MBF_UD_LR_FLIPPED (1) // flip up-down and left-right axes
|
||||
#define MBF_SOUNDLESS (1<<1) // do not play base menu sounds
|
||||
#define MBF_NOLOOPENTRIES (1<<2) // do not loop M_NextOpt/M_PrevOpt
|
||||
#define MBF_DRAWBGWHILEPLAYING (1<<3) // run backroutine() outside of GS_MENU
|
||||
#define MBF_CANTRESTORE (1<<4) // Do not use in restoreMenu
|
||||
|
||||
struct menuitem_t
|
||||
{
|
||||
|
|
@ -694,21 +692,19 @@ void M_DrawMenuMessage(void);
|
|||
#define MENUDELAYTIME 7
|
||||
#define MENUMINDELAY 2
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MBT_A = 1,
|
||||
MBT_B = 1<<1,
|
||||
MBT_C = 1<<2,
|
||||
MBT_X = 1<<3,
|
||||
MBT_Y = 1<<4,
|
||||
MBT_Z = 1<<5,
|
||||
MBT_L = 1<<6,
|
||||
MBT_R = 1<<7,
|
||||
MBT_START = 1<<8,
|
||||
MBT_SCREENSHOT = 1<<9,
|
||||
MBT_STARTMOVIE = 1<<10,
|
||||
MBT_STARTLOSSLESS = 1<<11,
|
||||
} menuButtonCode_t;
|
||||
typedef INT32 menuButtonCode_t;
|
||||
#define MBT_A (1)
|
||||
#define MBT_B (1<<1)
|
||||
#define MBT_C (1<<2)
|
||||
#define MBT_X (1<<3)
|
||||
#define MBT_Y (1<<4)
|
||||
#define MBT_Z (1<<5)
|
||||
#define MBT_L (1<<6)
|
||||
#define MBT_R (1<<7)
|
||||
#define MBT_START (1<<8)
|
||||
#define MBT_SCREENSHOT (1<<9)
|
||||
#define MBT_STARTMOVIE (1<<10)
|
||||
#define MBT_STARTLOSSLESS (1<<11)
|
||||
|
||||
struct menucmd_t
|
||||
{
|
||||
|
|
|
|||
|
|
@ -93,15 +93,13 @@ struct t_overlay_t
|
|||
fixed_t speed; // Speed-up based on object speed. 0 plays the animation at a constant rate.
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
// Terrain flag values.
|
||||
TRF_LIQUID = 1, // Texture has water properties (wavy, slippery, etc)
|
||||
TRF_SNEAKERPANEL = 1<<1, // Texture is a booster
|
||||
TRF_STAIRJANK = 1<<2, // Texture is bumpy road
|
||||
TRF_TRIPWIRE = 1<<3, // Texture is a tripwire when used as a midtexture
|
||||
TRF_REMAP = 1<<4, // Texture colors may be remapped with ENCOREMAP or TWEAKMAP
|
||||
} terrain_flags_t;
|
||||
typedef INT32 terrain_flags_t;
|
||||
// Terrain flag values.
|
||||
#define TRF_LIQUID (1) // Texture has water properties (wavy, slippery, etc)
|
||||
#define TRF_SNEAKERPANEL (1<<1) // Texture is a booster
|
||||
#define TRF_STAIRJANK (1<<2) // Texture is bumpy road
|
||||
#define TRF_TRIPWIRE (1<<3) // Texture is a tripwire when used as a midtexture
|
||||
#define TRF_REMAP (1<<4) // Texture colors may be remapped with ENCOREMAP or TWEAKMAP
|
||||
|
||||
struct terrain_t
|
||||
{
|
||||
|
|
@ -435,7 +433,7 @@ terrain_t *K_GetTerrainForTextureName(const char *checkName);
|
|||
|
||||
Returns the ID of the terrain definition applied
|
||||
to the texture name inputted.
|
||||
|
||||
|
||||
Input Arguments:-
|
||||
checkName - The texture's name.
|
||||
|
||||
|
|
|
|||
|
|
@ -1415,97 +1415,6 @@ void M_StartMovie(moviemode_t mode)
|
|||
|
||||
static void M_SaveFrame_AVRecorder(uint32_t width, uint32_t height, tcb::span<const std::byte> data);
|
||||
|
||||
void M_LegacySaveFrame(void)
|
||||
{
|
||||
#if NUMSCREENS > 2
|
||||
// TODO: until HWR2 replaces legacy OpenGL renderer, this
|
||||
// function still needs to called for OpenGL.
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_opengl)
|
||||
#endif
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// paranoia: should be unnecessary without singletics
|
||||
static tic_t oldtic = 0;
|
||||
|
||||
#ifdef SRB2_CONFIG_ENABLE_WEBM_MOVIES
|
||||
if (moviemode == MM_AVRECORDER)
|
||||
{
|
||||
if (M_AVRecorder_IsExpired())
|
||||
{
|
||||
M_StopMovie();
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// skip interpolated frames for other modes
|
||||
if (oldtic == I_GetTime())
|
||||
return;
|
||||
else
|
||||
oldtic = I_GetTime();
|
||||
|
||||
switch (moviemode)
|
||||
{
|
||||
case MM_SCREENSHOT:
|
||||
takescreenshot = true;
|
||||
return;
|
||||
case MM_GIF:
|
||||
GIF_frame();
|
||||
return;
|
||||
case MM_APNG:
|
||||
#ifdef USE_APNG
|
||||
{
|
||||
UINT8 *linear = NULL;
|
||||
if (!apng_FILE) // should not happen!!
|
||||
{
|
||||
moviemode = MM_OFF;
|
||||
return;
|
||||
}
|
||||
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
// munge planar buffer to linear
|
||||
linear = screens[2];
|
||||
I_ReadScreen(linear);
|
||||
}
|
||||
#ifdef HWRENDER
|
||||
else
|
||||
linear = HWR_GetScreenshot();
|
||||
#endif
|
||||
M_PNGFrame(apng_ptr, apng_info_ptr, (png_bytep)linear);
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl && linear)
|
||||
free(linear);
|
||||
#endif
|
||||
|
||||
if (apng_frames == PNG_UINT_31_MAX)
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("Max movie size reached\n"));
|
||||
M_StopMovie();
|
||||
}
|
||||
}
|
||||
#else
|
||||
moviemode = MM_OFF;
|
||||
#endif
|
||||
return;
|
||||
case MM_AVRECORDER:
|
||||
#if defined(SRB2_CONFIG_ENABLE_WEBM_MOVIES) && defined(HWRENDER)
|
||||
{
|
||||
UINT8 *linear = HWR_GetScreenshot();
|
||||
M_SaveFrame_AVRecorder(vid.width, vid.height, tcb::as_bytes(tcb::span(linear, 3 * vid.width * vid.height)));
|
||||
free(linear);
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void M_SaveFrame_GIF(uint32_t width, uint32_t height, tcb::span<const std::byte> data)
|
||||
{
|
||||
if (moviemode != MM_GIF)
|
||||
|
|
@ -1801,12 +1710,6 @@ void M_ScreenShot(void)
|
|||
takescreenshot = true;
|
||||
}
|
||||
|
||||
void M_DoLegacyGLScreenShot(void)
|
||||
{
|
||||
const std::byte* fake_data = nullptr;
|
||||
M_DoScreenShot(vid.width, vid.height, tcb::span(fake_data, vid.width * vid.height));
|
||||
}
|
||||
|
||||
/** Takes a screenshot.
|
||||
* The screenshot is saved as "srb2xxxx.png" where xxxx is the lowest
|
||||
* four-digit number for which a file does not already exist.
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ extern consvar_t cv_zlib_memorya, cv_zlib_levela, cv_zlib_strategya, cv_zlib_win
|
|||
extern consvar_t cv_apng_delay, cv_apng_downscale;
|
||||
|
||||
void M_StartMovie(moviemode_t mode);
|
||||
void M_LegacySaveFrame(void);
|
||||
void M_StopMovie(void);
|
||||
|
||||
// the file where game vars and settings are saved
|
||||
|
|
@ -108,9 +107,6 @@ boolean M_SavePNG(const char *filename, const void *data, int width, int height,
|
|||
|
||||
extern boolean takescreenshot;
|
||||
void M_ScreenShot(void);
|
||||
#ifdef HWRENDER
|
||||
void M_DoLegacyGLScreenShot(void);
|
||||
#endif
|
||||
void M_ScreenshotTicker(void);
|
||||
|
||||
void M_MinimapGenerate(void);
|
||||
|
|
|
|||
264
src/p_mobj.h
264
src/p_mobj.h
|
|
@ -100,112 +100,74 @@ extern "C" {
|
|||
//
|
||||
// Misc. mobj flags
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
// Call P_TouchSpecialThing when touched.
|
||||
MF_SPECIAL = 1,
|
||||
// Blocks.
|
||||
MF_SOLID = 1<<1,
|
||||
// Can be hit.
|
||||
MF_SHOOTABLE = 1<<2,
|
||||
// Don't use the sector links (invisible but touchable).
|
||||
MF_NOSECTOR = 1<<3,
|
||||
// Don't use the blocklinks (inert but displayable)
|
||||
MF_NOBLOCKMAP = 1<<4,
|
||||
// Thin, paper-like collision bound (for visual equivalent, see FF_PAPERSPRITE)
|
||||
MF_PAPERCOLLISION = 1<<5,
|
||||
// You can push this object. It can activate switches and things by pushing it on top.
|
||||
MF_PUSHABLE = 1<<6,
|
||||
// Object is a boss.
|
||||
MF_BOSS = 1<<7,
|
||||
// On level spawning (initial position), hang from ceiling instead of stand on floor.
|
||||
MF_SPAWNCEILING = 1<<8,
|
||||
// Don't apply gravity (every tic); object will float, keeping current height
|
||||
// or changing it actively.
|
||||
MF_NOGRAVITY = 1<<9,
|
||||
// This object is visible from a greater distance than normal objects.
|
||||
MF_DRAWFROMFARAWAY = 1<<10,
|
||||
// Slide this object when it hits a wall.
|
||||
MF_SLIDEME = 1<<11,
|
||||
// Don't collide with walls or solid objects. Two MF_NOCLIP objects can't touch each other at all!
|
||||
MF_NOCLIP = 1<<12,
|
||||
// Allow moves to any height, no gravity. For active floaters.
|
||||
MF_FLOAT = 1<<13,
|
||||
// Change pitch/roll when touching slopes.
|
||||
MF_SLOPE = 1<<14,
|
||||
// Don't hit same species, explode on block.
|
||||
// Player missiles as well as fireballs of various kinds.
|
||||
MF_MISSILE = 1<<15,
|
||||
// Item is a spring.
|
||||
MF_SPRING = 1<<16,
|
||||
// Object is elemental. If it is punted, it will evaporate.
|
||||
MF_ELEMENTAL = 1<<17,
|
||||
// Don't run the thinker for this object.
|
||||
MF_NOTHINK = 1<<18,
|
||||
// Don't adjust z if below or above floorz/ceilingz
|
||||
MF_NOCLIPHEIGHT = 1<<19,
|
||||
// This mobj is an enemy!
|
||||
MF_ENEMY = 1<<20,
|
||||
// Scenery (uses scenery thinker).
|
||||
MF_SCENERY = 1<<21,
|
||||
// Painful (shit hurts).
|
||||
MF_PAIN = 1<<22,
|
||||
// Object cannot be punted by invincible players. (Default CAN be punted, if it deals damage or is solid.)
|
||||
MF_DONTPUNT = 1<<23,
|
||||
// Object uses terrain effects. (Overlays, footsteps, etc)
|
||||
MF_APPLYTERRAIN = 1<<24,
|
||||
// for chase camera, don't be blocked by things (partial clipping)
|
||||
MF_NOCLIPTHING = 1<<25,
|
||||
// Missile bounces like a grenade.
|
||||
MF_GRENADEBOUNCE = 1<<26,
|
||||
// Run the action thinker on spawn.
|
||||
MF_RUNSPAWNFUNC = 1<<27,
|
||||
// Don't remap in Encore mode. (Not a drawflag so that it's settable by mobjinfo.)
|
||||
MF_DONTENCOREMAP = 1<<28,
|
||||
// Hitbox extends just as far below as above.
|
||||
MF_PICKUPFROMBELOW = 1<<29,
|
||||
// Disable momentum-based squash and stretch.
|
||||
MF_NOSQUISH = 1<<30,
|
||||
// Disable hitlag for this object
|
||||
MF_NOHITLAGFORME = (INT32)(1U<<31),
|
||||
// no more free slots, gotta get rid of more crusty base SRB2 flags
|
||||
} mobjflag_t;
|
||||
typedef INT32 mobjflag_t;
|
||||
#define MF_SPECIAL (1) // Call P_TouchSpecialThing when touched.
|
||||
#define MF_SOLID (1<<1) // Blocks.
|
||||
#define MF_SHOOTABLE (1<<2) // Can be hit.
|
||||
#define MF_NOSECTOR (1<<3) // Don't use the sector links (invisible but touchable).
|
||||
#define MF_NOBLOCKMAP (1<<4) // Don't use the blocklinks (inert but displayable)
|
||||
#define MF_PAPERCOLLISION (1<<5) // Thin, paper-like collision bound (for visual equivalent, see FF_PAPERSPRITE)
|
||||
#define MF_PUSHABLE (1<<6) // You can push this object. It can activate switches and things by pushing it on top.
|
||||
#define MF_BOSS (1<<7) // Object is a boss.
|
||||
#define MF_SPAWNCEILING (1<<8) // On level spawning (initial position), hang from ceiling instead of stand on floor.
|
||||
#define MF_NOGRAVITY (1<<9) // Don't apply gravity (every tic); object will float, keeping current height
|
||||
#define MF_DRAWFROMFARAWAY (1<<10) // This object is visible from a greater distance than normal objects.
|
||||
#define MF_SLIDEME (1<<11) // Slide this object when it hits a wall.
|
||||
#define MF_NOCLIP (1<<12) // Don't collide with walls or solid objects. Two MF_NOCLIP objects can't touch each other at all!
|
||||
#define MF_FLOAT (1<<13) // Allow moves to any height, no gravity. For active floaters.
|
||||
#define MF_SLOPE (1<<14) // Change pitch/roll when touching slopes.
|
||||
#define MF_MISSILE (1<<15) // Don't hit same species, explode on block.
|
||||
#define MF_SPRING (1<<16) // Item is a spring.
|
||||
#define MF_ELEMENTAL (1<<17) // Object is elemental. If it is punted, it will evaporate.
|
||||
#define MF_NOTHINK (1<<18) // Don't run the thinker for this object.
|
||||
#define MF_NOCLIPHEIGHT (1<<19) // Don't adjust z if below or above floorz/ceilingz
|
||||
#define MF_ENEMY (1<<20) // This mobj is an enemy!
|
||||
#define MF_SCENERY (1<<21) // Scenery (uses scenery thinker).
|
||||
#define MF_PAIN (1<<22) // Painful (shit hurts).
|
||||
#define MF_DONTPUNT (1<<23) // Object cannot be punted by invincible players. (Default CAN be punted, if it deals damage or is solid.)
|
||||
#define MF_APPLYTERRAIN (1<<24) // Object uses terrain effects. (Overlays, footsteps, etc)
|
||||
#define MF_NOCLIPTHING (1<<25) // for chase camera, don't be blocked by things (partial clipping)
|
||||
#define MF_GRENADEBOUNCE (1<<26) // Missile bounces like a grenade.
|
||||
#define MF_RUNSPAWNFUNC (1<<27) // Run the action thinker on spawn.
|
||||
#define MF_DONTENCOREMAP (1<<28) // Don't remap in Encore mode. (Not a drawflag so that it's settable by mobjinfo.)
|
||||
#define MF_PICKUPFROMBELOW (1<<29) // Hitbox extends just as far below as above.
|
||||
#define MF_NOSQUISH (1<<30) // Disable momentum-based squash and stretch.
|
||||
#define MF_NOHITLAGFORME ((INT32)(1U<<31)) // Disable hitlag for this object
|
||||
// no more free slots, gotta get rid of more crusty base SRB2 flags
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MF2_AXIS = 1, // It's a NiGHTS axis! (For faster checking)
|
||||
// free: 1<<1
|
||||
MF2_DONTRESPAWN = 1<<2, // Don't respawn this object!
|
||||
// free: 1<<3
|
||||
MF2_AUTOMATIC = 1<<4, // Thrown ring has automatic properties
|
||||
MF2_RAILRING = 1<<5, // Thrown ring has rail properties
|
||||
MF2_BOUNCERING = 1<<6, // Thrown ring has bounce properties
|
||||
MF2_EXPLOSION = 1<<7, // Thrown ring has explosive properties
|
||||
MF2_SCATTER = 1<<8, // Thrown ring has scatter properties
|
||||
MF2_BEYONDTHEGRAVE = 1<<9, // Source of this missile has died and has since respawned.
|
||||
MF2_SLIDEPUSH = 1<<10, // MF_PUSHABLE that pushes continuously.
|
||||
MF2_CLASSICPUSH = 1<<11, // Drops straight down when object has negative momz.
|
||||
MF2_INVERTAIMABLE = 1<<12, // Flips whether it's targetable by A_LookForEnemies (enemies no, decoys yes)
|
||||
MF2_INFLOAT = 1<<13, // Floating to a height for a move, don't auto float to target's height.
|
||||
MF2_DEBRIS = 1<<14, // Splash ring from explosion ring
|
||||
MF2_NIGHTSPULL = 1<<15, // Attracted from a paraloop
|
||||
MF2_JUSTATTACKED = 1<<16, // can be pushed by other moving mobjs
|
||||
MF2_FIRING = 1<<17, // turret fire
|
||||
MF2_SUPERFIRE = 1<<18, // Firing something with Super Sonic-stopping properties. Or, if mobj has MF_MISSILE, this is the actual fire from it.
|
||||
MF2_ALREADYHIT = 1<<19, // This object was already damaged THIS tic, resets even during hitlag
|
||||
MF2_STRONGBOX = 1<<20, // Flag used for "strong" random monitors.
|
||||
MF2_OBJECTFLIP = 1<<21, // Flag for objects that always have flipped gravity.
|
||||
MF2_SKULLFLY = 1<<22, // Special handling: skull in flight.
|
||||
MF2_FRET = 1<<23, // Flashing from a previous hit
|
||||
MF2_BOSSNOTRAP = 1<<24, // No Egg Trap after boss
|
||||
MF2_BOSSFLEE = 1<<25, // Boss is fleeing!
|
||||
MF2_BOSSDEAD = 1<<26, // Boss is dead! (Not necessarily fleeing, if a fleeing point doesn't exist.)
|
||||
MF2_AMBUSH = 1<<27, // Alternate behaviour typically set by MTF_AMBUSH
|
||||
MF2_LINKDRAW = 1<<28, // Draw vissprite of mobj immediately before/after tracer's vissprite (dependent on dispoffset and position)
|
||||
MF2_SHIELD = 1<<29, // Thinker calls P_AddShield/P_ShieldLook (must be partnered with MF_SCENERY to use)
|
||||
MF2_SPLAT = 1<<30, // Renders as a splat
|
||||
// free: to and including 1<<31
|
||||
} mobjflag2_t;
|
||||
typedef INT32 mobjflag2_t;
|
||||
#define MF2_AXIS (1) // It's a NiGHTS axis! (For faster checking)
|
||||
// free: 1<<1
|
||||
#define MF2_DONTRESPAWN (1<<2) // Don't respawn this object!
|
||||
// free: 1<<3
|
||||
#define MF2_AUTOMATIC (1<<4) // Thrown ring has automatic properties
|
||||
#define MF2_RAILRING (1<<5) // Thrown ring has rail properties
|
||||
#define MF2_BOUNCERING (1<<6) // Thrown ring has bounce properties
|
||||
#define MF2_EXPLOSION (1<<7) // Thrown ring has explosive properties
|
||||
#define MF2_SCATTER (1<<8) // Thrown ring has scatter properties
|
||||
#define MF2_BEYONDTHEGRAVE (1<<9) // Source of this missile has died and has since respawned.
|
||||
#define MF2_SLIDEPUSH (1<<10) // MF_PUSHABLE that pushes continuously.
|
||||
#define MF2_CLASSICPUSH (1<<11) // Drops straight down when object has negative momz.
|
||||
#define MF2_INVERTAIMABLE (1<<12) // Flips whether it's targetable by A_LookForEnemies (enemies no, decoys yes)
|
||||
#define MF2_INFLOAT (1<<13) // Floating to a height for a move, don't auto float to target's height.
|
||||
#define MF2_DEBRIS (1<<14) // Splash ring from explosion ring
|
||||
#define MF2_NIGHTSPULL (1<<15) // Attracted from a paraloop
|
||||
#define MF2_JUSTATTACKED (1<<16) // can be pushed by other moving mobjs
|
||||
#define MF2_FIRING (1<<17) // turret fire
|
||||
#define MF2_SUPERFIRE (1<<18) // Firing something with Super Sonic-stopping properties. Or, if mobj has MF_MISSILE, this is the actual fire from it.
|
||||
#define MF2_ALREADYHIT (1<<19) // This object was already damaged THIS tic, resets even during hitlag
|
||||
#define MF2_STRONGBOX (1<<20) // Flag used for "strong" random monitors.
|
||||
#define MF2_OBJECTFLIP (1<<21) // Flag for objects that always have flipped gravity.
|
||||
#define MF2_SKULLFLY (1<<22) // Special handling: skull in flight.
|
||||
#define MF2_FRET (1<<23) // Flashing from a previous hit
|
||||
#define MF2_BOSSNOTRAP (1<<24) // No Egg Trap after boss
|
||||
#define MF2_BOSSFLEE (1<<25) // Boss is fleeing!
|
||||
#define MF2_BOSSDEAD (1<<26) // Boss is dead! (Not necessarily fleeing, if a fleeing point doesn't exist.)
|
||||
#define MF2_AMBUSH (1<<27) // Alternate behaviour typically set by MTF_AMBUSH
|
||||
#define MF2_LINKDRAW (1<<28) // Draw vissprite of mobj immediately before/after tracer's vissprite (dependent on dispoffset and position)
|
||||
#define MF2_SHIELD (1<<29) // Thinker calls P_AddShield/P_ShieldLook (must be partnered with MF_SCENERY to use)
|
||||
#define MF2_SPLAT (1<<30) // Renders as a splat
|
||||
// free: to and including 1<<31
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -224,58 +186,54 @@ typedef enum
|
|||
//
|
||||
// Mobj extra flags
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
// The mobj stands on solid floor (not on another mobj or in air)
|
||||
MFE_ONGROUND = 1,
|
||||
// The mobj just hit the floor while falling, this is cleared on next frame
|
||||
// (instant damage in lava/slime sectors to prevent jump cheat..)
|
||||
MFE_JUSTHITFLOOR = 1<<1,
|
||||
// The mobj stands in a sector with water, and touches the surface
|
||||
// this bit is set once and for all at the start of mobjthinker
|
||||
MFE_TOUCHWATER = 1<<2,
|
||||
// The mobj stands in a sector with water, and his waist is BELOW the water surface
|
||||
// (for player, allows swimming up/down)
|
||||
MFE_UNDERWATER = 1<<3,
|
||||
// used for ramp sectors
|
||||
MFE_JUSTSTEPPEDDOWN = 1<<4,
|
||||
// Vertically flip sprite/allow upside-down physics
|
||||
MFE_VERTICALFLIP = 1<<5,
|
||||
// Goo water
|
||||
MFE_GOOWATER = 1<<6,
|
||||
// The mobj is touching a lava block
|
||||
MFE_TOUCHLAVA = 1<<7,
|
||||
// Mobj was already pushed this tic
|
||||
MFE_PUSHED = 1<<8,
|
||||
// Mobj was already sprung this tic
|
||||
MFE_SPRUNG = 1<<9,
|
||||
// Platform movement
|
||||
MFE_APPLYPMOMZ = 1<<10,
|
||||
// Compute and trigger on mobj angle relative to tracer
|
||||
// See Linedef Exec 457 (Track mobj angle to point)
|
||||
MFE_TRACERANGLE = 1<<11,
|
||||
// SRB2Kart: The mobj just hit & bounced off a wall, this is cleared on next frame
|
||||
MFE_JUSTBOUNCEDWALL = 1<<12,
|
||||
// SRB2Kart: In damage hitlag (displays different visual efx)
|
||||
MFE_DAMAGEHITLAG = 1<<13,
|
||||
// Slope physics sent you airborne
|
||||
MFE_SLOPELAUNCHED = 1<<14,
|
||||
// Thinker is paused due to hitlag
|
||||
MFE_PAUSED = 1<<15,
|
||||
// Don't launch off of slopes
|
||||
MFE_DONTSLOPELAUNCH = 1<<16,
|
||||
} mobjeflag_t;
|
||||
typedef INT32 mobjeflag_t;
|
||||
#define MFE_ONGROUND (1) // The mobj stands on solid floor (not on another mobj or in air)
|
||||
// The mobj just hit the floor while falling, this is cleared on next frame
|
||||
// (instant damage in lava/slime sectors to prevent jump cheat..)
|
||||
#define MFE_JUSTHITFLOOR (1<<1)
|
||||
// The mobj stands in a sector with water, and touches the surface
|
||||
// this bit is set once and for all at the start of mobjthinker
|
||||
#define MFE_TOUCHWATER (1<<2)
|
||||
// The mobj stands in a sector with water, and his waist is BELOW the water surface
|
||||
// (for player, allows swimming up/down)
|
||||
#define MFE_UNDERWATER (1<<3)
|
||||
// used for ramp sectors
|
||||
#define MFE_JUSTSTEPPEDDOWN (1<<4)
|
||||
// Vertically flip sprite/allow upside-down physics
|
||||
#define MFE_VERTICALFLIP (1<<5)
|
||||
// Goo water
|
||||
#define MFE_GOOWATER (1<<6)
|
||||
// The mobj is touching a lava block
|
||||
#define MFE_TOUCHLAVA (1<<7)
|
||||
// Mobj was already pushed this tic
|
||||
#define MFE_PUSHED (1<<8)
|
||||
// Mobj was already sprung this tic
|
||||
#define MFE_SPRUNG (1<<9)
|
||||
// Platform movement
|
||||
#define MFE_APPLYPMOMZ (1<<10)
|
||||
// Compute and trigger on mobj angle relative to tracer
|
||||
// See Linedef Exec 457 (Track mobj angle to point)
|
||||
#define MFE_TRACERANGLE (1<<11)
|
||||
// SRB2Kart: The mobj just hit & bounced off a wall, this is cleared on next frame
|
||||
#define MFE_JUSTBOUNCEDWALL (1<<12)
|
||||
// SRB2Kart: In damage hitlag (displays different visual efx)
|
||||
#define MFE_DAMAGEHITLAG (1<<13)
|
||||
// Slope physics sent you airborne
|
||||
#define MFE_SLOPELAUNCHED (1<<14)
|
||||
// Thinker is paused due to hitlag
|
||||
#define MFE_PAUSED (1<<15)
|
||||
// Don't launch off of slopes
|
||||
#define MFE_DONTSLOPELAUNCH (1<<16)
|
||||
|
||||
//
|
||||
// PRECIPITATION flags ?! ?! ?!
|
||||
//
|
||||
typedef enum {
|
||||
PCF_THUNK = 1, // Ran the thinker this tic.
|
||||
PCF_SPLASH = 1<<1, // Splashed on the ground, return to the ceiling after the animation's over
|
||||
PCF_INVISIBLE = 1<<2, // Don't draw.
|
||||
PCF_PIT = 1<<3, // Above pit.
|
||||
PCF_FLIP = 1<<4, // Spawning from floor, moving upwards.
|
||||
} precipflag_t;
|
||||
typedef INT32 precipflag_t;
|
||||
#define PCF_THUNK (1) // Ran the thinker this tic.
|
||||
#define PCF_SPLASH (1<<1) // Splashed on the ground, return to the ceiling after the animation's over
|
||||
#define PCF_INVISIBLE (1<<2) // Don't draw.
|
||||
#define PCF_PIT (1<<3) // Above pit.
|
||||
#define PCF_FLIP (1<<4) // Spawning from floor, moving upwards.
|
||||
|
||||
// Map Object definition.
|
||||
struct mobj_t
|
||||
|
|
|
|||
100
src/p_polyobj.h
100
src/p_polyobj.h
|
|
@ -34,38 +34,34 @@ extern "C" {
|
|||
|
||||
#define POLYOBJ_START_LINE 20
|
||||
|
||||
typedef enum
|
||||
{
|
||||
POF_CLIPLINES = 0x1, ///< Test against lines for collision
|
||||
POF_CLIPPLANES = 0x2, ///< Test against tops and bottoms for collision
|
||||
POF_SOLID = 0x3, ///< Clips things.
|
||||
POF_TESTHEIGHT = 0x4, ///< Test line collision with heights
|
||||
POF_RENDERSIDES = 0x8, ///< Renders the sides.
|
||||
POF_RENDERTOP = 0x10, ///< Renders the top.
|
||||
POF_RENDERBOTTOM = 0x20, ///< Renders the bottom.
|
||||
POF_RENDERPLANES = 0x30, ///< Renders top and bottom.
|
||||
POF_RENDERALL = 0x38, ///< Renders everything.
|
||||
POF_INVERT = 0x40, ///< Inverts collision (like a cage).
|
||||
POF_INVERTPLANES = 0x80, ///< Render inside planes.
|
||||
POF_INVERTPLANESONLY = 0x100, ///< Only render inside planes.
|
||||
POF_PUSHABLESTOP = 0x200, ///< Pushables will stop movement.
|
||||
POF_LDEXEC = 0x400, ///< This PO triggers a linedef executor.
|
||||
POF_ONESIDE = 0x800, ///< Only use the first side of the linedef.
|
||||
POF_NOSPECIALS = 0x1000, ///< Don't apply sector specials.
|
||||
POF_SPLAT = 0x2000, ///< Use splat flat renderer (treat cyan pixels as invisible).
|
||||
} polyobjflags_e;
|
||||
typedef INT32 polyobjflags_e;
|
||||
#define POF_CLIPLINES (0x1) ///< Test against lines for collision
|
||||
#define POF_CLIPPLANES (0x2) ///< Test against tops and bottoms for collision
|
||||
#define POF_SOLID (0x3) ///< Clips things.
|
||||
#define POF_TESTHEIGHT (0x4) ///< Test line collision with heights
|
||||
#define POF_RENDERSIDES (0x8) ///< Renders the sides.
|
||||
#define POF_RENDERTOP (0x10) ///< Renders the top.
|
||||
#define POF_RENDERBOTTOM (0x20) ///< Renders the bottom.
|
||||
#define POF_RENDERPLANES (0x30) ///< Renders top and bottom.
|
||||
#define POF_RENDERALL (0x38) ///< Renders everything.
|
||||
#define POF_INVERT (0x40) ///< Inverts collision (like a cage).
|
||||
#define POF_INVERTPLANES (0x80) ///< Render inside planes.
|
||||
#define POF_INVERTPLANESONLY (0x100) ///< Only render inside planes.
|
||||
#define POF_PUSHABLESTOP (0x200) ///< Pushables will stop movement.
|
||||
#define POF_LDEXEC (0x400) ///< This PO triggers a linedef executor.
|
||||
#define POF_ONESIDE (0x800) ///< Only use the first side of the linedef.
|
||||
#define POF_NOSPECIALS (0x1000) ///< Don't apply sector specials.
|
||||
#define POF_SPLAT (0x2000) ///< Use splat flat renderer (treat cyan pixels as invisible).
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMPF_NOINSIDES = 1,
|
||||
TMPF_INTANGIBLE = 1<<1,
|
||||
TMPF_PUSHABLESTOP = 1<<2,
|
||||
TMPF_INVISIBLEPLANES = 1<<3,
|
||||
TMPF_EXECUTOR = 1<<4,
|
||||
TMPF_CRUSH = 1<<5,
|
||||
TMPF_SPLAT = 1<<6,
|
||||
//TMPF_DONTCLIPPLANES = 1<<7,
|
||||
} textmappolyobjectflags_t;
|
||||
typedef INT32 textmappolyobjectflags_t;
|
||||
#define TMPF_NOINSIDES (1)
|
||||
#define TMPF_INTANGIBLE (1<<1)
|
||||
#define TMPF_PUSHABLESTOP (1<<2)
|
||||
#define TMPF_INVISIBLEPLANES (1<<3)
|
||||
#define TMPF_EXECUTOR (1<<4)
|
||||
#define TMPF_CRUSH (1<<5)
|
||||
#define TMPF_SPLAT (1<<6)
|
||||
// #define TMPF_DONTCLIPPLANES (1<<7)
|
||||
|
||||
//
|
||||
// Polyobject Structure
|
||||
|
|
@ -252,19 +248,15 @@ struct polyfade_t
|
|||
// Line Activation Data Structures
|
||||
//
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMPR_DONTROTATEOTHERS = 1,
|
||||
TMPR_ROTATEPLAYERS = 1<<1,
|
||||
TMPR_CONTINUOUS = 1<<2,
|
||||
TMPR_OVERRIDE = 1<<3,
|
||||
} textmappolyrotate_t;
|
||||
typedef INT32 textmappolyrotate_t;
|
||||
#define TMPR_DONTROTATEOTHERS (1)
|
||||
#define TMPR_ROTATEPLAYERS (1<<1)
|
||||
#define TMPR_CONTINUOUS (1<<2)
|
||||
#define TMPR_OVERRIDE (1<<3)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PTF_PLAYERS = 1, // Turn players with movement
|
||||
PTF_OTHERS = 1<<1, // Turn other mobjs with movement
|
||||
} polyturnflags_e;
|
||||
typedef INT32 polyturnflags_e;
|
||||
#define PTF_PLAYERS (1) // Turn players with movement
|
||||
#define PTF_OTHERS (1<<1) // Turn other mobjs with movement
|
||||
|
||||
struct polyrotdata_t
|
||||
{
|
||||
|
|
@ -284,11 +276,9 @@ struct polymovedata_t
|
|||
UINT8 overRide; // if true, will override any action on the object
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PWF_REVERSE = 1, // Move through waypoints in reverse order
|
||||
PWF_LOOP = 1<<1, // Loop movement (used with PWR_WRAP or PWR_COMEBACK)
|
||||
} polywaypointflags_e;
|
||||
typedef INT32 polywaypointflags_e;
|
||||
#define PWF_REVERSE (1) // Move through waypoints in reverse order
|
||||
#define PWF_LOOP (1<<1) // Loop movement (used with PWR_WRAP or PWR_COMEBACK)
|
||||
|
||||
struct polywaypointdata_t
|
||||
{
|
||||
|
|
@ -340,14 +330,12 @@ struct polyflagdata_t
|
|||
fixed_t momx;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMPF_RELATIVE = 1,
|
||||
TMPF_OVERRIDE = 1<<1,
|
||||
TMPF_TICBASED = 1<<2,
|
||||
TMPF_IGNORECOLLISION = 1<<3,
|
||||
TMPF_GHOSTFADE = 1<<4,
|
||||
} textmappolyfade_t;
|
||||
typedef INT32 textmappolyfade_t;
|
||||
#define TMPF_RELATIVE (1)
|
||||
#define TMPF_OVERRIDE (1<<1)
|
||||
#define TMPF_TICBASED (1<<2)
|
||||
#define TMPF_IGNORECOLLISION (1<<3)
|
||||
#define TMPF_GHOSTFADE (1<<4)
|
||||
|
||||
struct polyfadedata_t
|
||||
{
|
||||
|
|
|
|||
136
src/p_setup.cpp
136
src/p_setup.cpp
|
|
@ -1055,7 +1055,7 @@ static void P_LoadSectors(UINT8 *data)
|
|||
ss->gravity = FRACUNIT;
|
||||
|
||||
ss->flags = MSF_FLIPSPECIAL_FLOOR;
|
||||
ss->specialflags = static_cast<sectorspecialflags_t>(0);
|
||||
ss->specialflags = 0;
|
||||
ss->damagetype = SD_NONE;
|
||||
ss->triggertag = 0;
|
||||
ss->triggerer = TO_PLAYER;
|
||||
|
|
@ -1065,7 +1065,7 @@ static void P_LoadSectors(UINT8 *data)
|
|||
ss->action = 0;
|
||||
memset(ss->args, 0, NUM_SCRIPT_ARGS*sizeof(*ss->args));
|
||||
memset(ss->stringargs, 0x00, NUM_SCRIPT_STRINGARGS*sizeof(*ss->stringargs));
|
||||
ss->activation = static_cast<sectoractionflags_t>(0);
|
||||
ss->activation = 0;
|
||||
|
||||
P_InitializeSector(ss);
|
||||
}
|
||||
|
|
@ -1764,49 +1764,49 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char
|
|||
else if (fastcmp(param, "colormapprotected") && fastcmp("true", val))
|
||||
sectors[i].colormap_protected = true;
|
||||
else if (fastcmp(param, "flipspecial_nofloor") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags & ~MSF_FLIPSPECIAL_FLOOR);
|
||||
sectors[i].flags &= ~MSF_FLIPSPECIAL_FLOOR;
|
||||
else if (fastcmp(param, "flipspecial_ceiling") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_FLIPSPECIAL_CEILING);
|
||||
sectors[i].flags |= MSF_FLIPSPECIAL_CEILING;
|
||||
else if (fastcmp(param, "triggerspecial_touch") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_TRIGGERSPECIAL_TOUCH);
|
||||
sectors[i].flags |= MSF_TRIGGERSPECIAL_TOUCH;
|
||||
else if (fastcmp(param, "triggerspecial_headbump") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_TRIGGERSPECIAL_HEADBUMP);
|
||||
sectors[i].flags |= MSF_TRIGGERSPECIAL_HEADBUMP;
|
||||
else if (fastcmp(param, "invertprecip") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_INVERTPRECIP);
|
||||
sectors[i].flags |= MSF_INVERTPRECIP;
|
||||
else if (fastcmp(param, "gravityflip") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_GRAVITYFLIP);
|
||||
sectors[i].flags |= MSF_GRAVITYFLIP;
|
||||
else if (fastcmp(param, "heatwave") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_HEATWAVE);
|
||||
sectors[i].flags |= MSF_HEATWAVE;
|
||||
else if (fastcmp(param, "noclipcamera") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_NOCLIPCAMERA);
|
||||
sectors[i].flags |= MSF_NOCLIPCAMERA;
|
||||
else if (fastcmp(param, "ripple_floor") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_RIPPLE_FLOOR);
|
||||
sectors[i].flags |= MSF_RIPPLE_FLOOR;
|
||||
else if (fastcmp(param, "ripple_ceiling") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_RIPPLE_CEILING);
|
||||
sectors[i].flags |= MSF_RIPPLE_CEILING;
|
||||
else if (fastcmp(param, "invertencore") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_INVERTENCORE);
|
||||
sectors[i].flags |= MSF_INVERTENCORE;
|
||||
else if (fastcmp(param, "flatlighting") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_FLATLIGHTING);
|
||||
sectors[i].flags |= MSF_FLATLIGHTING;
|
||||
else if (fastcmp(param, "forcedirectionallighting") && fastcmp("true", val))
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_DIRECTIONLIGHTING);
|
||||
sectors[i].flags |= MSF_DIRECTIONLIGHTING;
|
||||
else if (fastcmp(param, "nostepup") && fastcmp("true", val))
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_NOSTEPUP);
|
||||
sectors[i].specialflags |= SSF_NOSTEPUP;
|
||||
else if (fastcmp(param, "doublestepup") && fastcmp("true", val))
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_DOUBLESTEPUP);
|
||||
sectors[i].specialflags |= SSF_DOUBLESTEPUP;
|
||||
else if (fastcmp(param, "nostepdown") && fastcmp("true", val))
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_NOSTEPDOWN);
|
||||
sectors[i].specialflags |= SSF_NOSTEPDOWN;
|
||||
else if ((fastcmp(param, "cheatcheckactivator") || fastcmp(param, "starpostactivator")) && fastcmp("true", val))
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_CHEATCHECKACTIVATOR);
|
||||
sectors[i].specialflags |= SSF_CHEATCHECKACTIVATOR;
|
||||
else if (fastcmp(param, "exit") && fastcmp("true", val))
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_EXIT);
|
||||
sectors[i].specialflags |= SSF_EXIT;
|
||||
else if (fastcmp(param, "deleteitems") && fastcmp("true", val))
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_DELETEITEMS);
|
||||
sectors[i].specialflags |= SSF_DELETEITEMS;
|
||||
else if (fastcmp(param, "fan") && fastcmp("true", val))
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_FAN);
|
||||
sectors[i].specialflags |= SSF_FAN;
|
||||
else if (fastcmp(param, "zoomtubestart") && fastcmp("true", val))
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_ZOOMTUBESTART);
|
||||
sectors[i].specialflags |= SSF_ZOOMTUBESTART;
|
||||
else if (fastcmp(param, "zoomtubeend") && fastcmp("true", val))
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_ZOOMTUBEEND);
|
||||
sectors[i].specialflags |= SSF_ZOOMTUBEEND;
|
||||
else if (fastcmp(param, "friction"))
|
||||
sectors[i].friction = FLOAT_TO_FIXED(atof(val));
|
||||
else if (fastcmp(param, "gravity"))
|
||||
|
|
@ -1842,27 +1842,27 @@ static void ParseTextmapSectorParameter(UINT32 i, const char *param, const char
|
|||
sectors[i].args[argnum] = atol(val);
|
||||
}
|
||||
else if (fastcmp(param, "repeatspecial") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | ((sectors[i].activation & ~SECSPAC_TRIGGERMASK) | SECSPAC_REPEATSPECIAL));
|
||||
sectors[i].activation |= ((sectors[i].activation & ~SECSPAC_TRIGGERMASK) | SECSPAC_REPEATSPECIAL);
|
||||
else if (fastcmp(param, "continuousspecial") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | ((sectors[i].activation & ~SECSPAC_TRIGGERMASK) | SECSPAC_CONTINUOUSSPECIAL));
|
||||
sectors[i].activation |= ((sectors[i].activation & ~SECSPAC_TRIGGERMASK) | SECSPAC_CONTINUOUSSPECIAL);
|
||||
else if (fastcmp(param, "playerenter") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_ENTER);
|
||||
sectors[i].activation |= SECSPAC_ENTER;
|
||||
else if (fastcmp(param, "playerfloor") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_FLOOR);
|
||||
sectors[i].activation |= SECSPAC_FLOOR;
|
||||
else if (fastcmp(param, "playerceiling") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_CEILING);
|
||||
sectors[i].activation |= SECSPAC_CEILING;
|
||||
else if (fastcmp(param, "monsterenter") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_ENTERMONSTER);
|
||||
sectors[i].activation |= SECSPAC_ENTERMONSTER;
|
||||
else if (fastcmp(param, "monsterfloor") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_FLOORMONSTER);
|
||||
sectors[i].activation |= SECSPAC_FLOORMONSTER;
|
||||
else if (fastcmp(param, "monsterceiling") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_CEILINGMONSTER);
|
||||
sectors[i].activation |= SECSPAC_CEILINGMONSTER;
|
||||
else if (fastcmp(param, "missileenter") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_ENTERMISSILE);
|
||||
sectors[i].activation |= SECSPAC_ENTERMISSILE;
|
||||
else if (fastcmp(param, "missilefloor") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_FLOORMISSILE);
|
||||
sectors[i].activation |= SECSPAC_FLOORMISSILE;
|
||||
else if (fastcmp(param, "missileceiling") && fastcmp("true", val))
|
||||
sectors[i].activation = static_cast<sectoractionflags_t>(sectors[i].activation | SECSPAC_CEILINGMISSILE);
|
||||
sectors[i].activation |= SECSPAC_CEILINGMISSILE;
|
||||
else
|
||||
ParseUserProperty(§ors[i].user, param, val);
|
||||
}
|
||||
|
|
@ -3205,7 +3205,7 @@ static void P_LoadTextmap(void)
|
|||
sc->gravity = FRACUNIT;
|
||||
|
||||
sc->flags = MSF_FLIPSPECIAL_FLOOR;
|
||||
sc->specialflags = static_cast<sectorspecialflags_t>(0);
|
||||
sc->specialflags = 0;
|
||||
sc->damagetype = SD_NONE;
|
||||
sc->triggertag = 0;
|
||||
sc->triggerer = TO_PLAYER;
|
||||
|
|
@ -3215,7 +3215,7 @@ static void P_LoadTextmap(void)
|
|||
sc->action = 0;
|
||||
memset(sc->args, 0, NUM_SCRIPT_ARGS*sizeof(*sc->args));
|
||||
memset(sc->stringargs, 0x00, NUM_SCRIPT_STRINGARGS*sizeof(*sc->stringargs));
|
||||
sc->activation = static_cast<sectoractionflags_t>(0);
|
||||
sc->activation = 0;
|
||||
|
||||
K_UserPropertiesClear(&sc->user);
|
||||
|
||||
|
|
@ -4867,24 +4867,24 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
{
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
{
|
||||
sectors[s].flags = static_cast<sectorflags_t>(sectors[s].flags & ~MSF_FLIPSPECIAL_FLOOR);
|
||||
sectors[s].flags = static_cast<sectorflags_t>(sectors[s].flags | MSF_FLIPSPECIAL_CEILING);
|
||||
sectors[s].flags &= ~MSF_FLIPSPECIAL_FLOOR;
|
||||
sectors[s].flags |= MSF_FLIPSPECIAL_CEILING;
|
||||
}
|
||||
else if (lines[i].flags & ML_MIDSOLID)
|
||||
sectors[s].flags = static_cast<sectorflags_t>(sectors[s].flags | MSF_FLIPSPECIAL_BOTH);
|
||||
sectors[s].flags |= MSF_FLIPSPECIAL_BOTH;
|
||||
|
||||
if (lines[i].flags & ML_MIDPEG)
|
||||
sectors[s].flags = static_cast<sectorflags_t>(sectors[s].flags | MSF_TRIGGERSPECIAL_TOUCH);
|
||||
sectors[s].flags |= MSF_TRIGGERSPECIAL_TOUCH;
|
||||
if (lines[i].flags & ML_NOSKEW)
|
||||
sectors[s].flags = static_cast<sectorflags_t>(sectors[s].flags | MSF_TRIGGERSPECIAL_HEADBUMP);
|
||||
sectors[s].flags |= MSF_TRIGGERSPECIAL_HEADBUMP;
|
||||
|
||||
if (lines[i].flags & ML_SKEWTD)
|
||||
sectors[s].flags = static_cast<sectorflags_t>(sectors[s].flags | MSF_INVERTPRECIP);
|
||||
sectors[s].flags |= MSF_INVERTPRECIP;
|
||||
|
||||
if (lines[i].flags & ML_DONTPEGTOP)
|
||||
sectors[s].flags = static_cast<sectorflags_t>(sectors[s].flags | MSF_RIPPLE_FLOOR);
|
||||
sectors[s].flags |= MSF_RIPPLE_FLOOR;
|
||||
if (lines[i].flags & ML_DONTPEGBOTTOM)
|
||||
sectors[s].flags = static_cast<sectorflags_t>(sectors[s].flags | MSF_RIPPLE_CEILING);
|
||||
sectors[s].flags |= MSF_RIPPLE_CEILING;
|
||||
}
|
||||
|
||||
if (GETSECSPECIAL(lines[i].frontsector->special, 4) != 12)
|
||||
|
|
@ -4906,7 +4906,7 @@ static void P_ConvertBinaryLinedefTypes(void)
|
|||
INT32 s;
|
||||
|
||||
TAG_ITER_SECTORS(tag, s)
|
||||
sectors[s].flags = static_cast<sectorflags_t>(sectors[s].flags | MSF_HEATWAVE);
|
||||
sectors[s].flags |= MSF_HEATWAVE;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -6603,13 +6603,13 @@ static void P_ConvertBinarySectorTypes(void)
|
|||
sectors[i].damagetype = SD_STUMBLE;
|
||||
break;
|
||||
case 12: //Wall sector
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_NOSTEPUP);
|
||||
sectors[i].specialflags |= SSF_NOSTEPUP;
|
||||
break;
|
||||
case 13: //Ramp sector
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_DOUBLESTEPUP);
|
||||
sectors[i].specialflags |= SSF_DOUBLESTEPUP;
|
||||
break;
|
||||
case 14: //Non-ramp sector
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_NOSTEPDOWN);
|
||||
sectors[i].specialflags |= SSF_NOSTEPDOWN;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -6619,34 +6619,34 @@ static void P_ConvertBinarySectorTypes(void)
|
|||
{
|
||||
case 1: //Trigger linedef executor (pushable objects)
|
||||
sectors[i].triggertag = tag;
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_TRIGGERLINE_PLANE);
|
||||
sectors[i].flags |= MSF_TRIGGERLINE_PLANE;
|
||||
sectors[i].triggerer = TO_MOBJ;
|
||||
break;
|
||||
case 2: //Trigger linedef executor (Anywhere in sector, all players)
|
||||
sectors[i].triggertag = tag;
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags & ~MSF_TRIGGERLINE_PLANE);
|
||||
sectors[i].flags &= ~MSF_TRIGGERLINE_PLANE;
|
||||
sectors[i].triggerer = TO_ALLPLAYERS;
|
||||
break;
|
||||
case 3: //Trigger linedef executor (Floor touch, all players)
|
||||
sectors[i].triggertag = tag;
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_TRIGGERLINE_PLANE);
|
||||
sectors[i].flags |= MSF_TRIGGERLINE_PLANE;
|
||||
sectors[i].triggerer = TO_ALLPLAYERS;
|
||||
break;
|
||||
case 4: //Trigger linedef executor (Anywhere in sector)
|
||||
sectors[i].triggertag = tag;
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags & ~MSF_TRIGGERLINE_PLANE);
|
||||
sectors[i].flags &= ~MSF_TRIGGERLINE_PLANE;
|
||||
sectors[i].triggerer = TO_PLAYER;
|
||||
break;
|
||||
case 5: //Trigger linedef executor (Floor touch)
|
||||
sectors[i].triggertag = tag;
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_TRIGGERLINE_PLANE);
|
||||
sectors[i].flags |= MSF_TRIGGERLINE_PLANE;
|
||||
sectors[i].triggerer = TO_PLAYER;
|
||||
break;
|
||||
case 8: //Check for linedef executor on FOFs
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_TRIGGERLINE_MOBJ);
|
||||
sectors[i].flags |= MSF_TRIGGERLINE_MOBJ;
|
||||
break;
|
||||
case 15: //Invert Encore
|
||||
sectors[i].flags = static_cast<sectorflags_t>(sectors[i].flags | MSF_INVERTENCORE);
|
||||
sectors[i].flags |= MSF_INVERTENCORE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -6668,25 +6668,25 @@ static void P_ConvertBinarySectorTypes(void)
|
|||
switch(GETSECSPECIAL(sectors[i].special, 4))
|
||||
{
|
||||
case 1: //Cheat Check activator
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_CHEATCHECKACTIVATOR);
|
||||
sectors[i].specialflags |= SSF_CHEATCHECKACTIVATOR;
|
||||
break;
|
||||
case 2: //Exit
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_EXIT);
|
||||
sectors[i].specialflags |= SSF_EXIT;
|
||||
break;
|
||||
case 5: //Fan sector
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_FAN);
|
||||
sectors[i].specialflags |= SSF_FAN;
|
||||
break;
|
||||
case 6: //Sneaker panel
|
||||
CONS_Alert(CONS_WARNING, "Sneaker Panel special is deprecated. Use the TERRAIN effect!\n");
|
||||
break;
|
||||
case 7: //Destroy items
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_DELETEITEMS);
|
||||
sectors[i].specialflags |= SSF_DELETEITEMS;
|
||||
break;
|
||||
case 8: //Zoom tube start
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_ZOOMTUBESTART);
|
||||
sectors[i].specialflags |= SSF_ZOOMTUBESTART;
|
||||
break;
|
||||
case 9: //Zoom tube end
|
||||
sectors[i].specialflags = static_cast<sectorspecialflags_t>(sectors[i].specialflags | SSF_ZOOMTUBEEND);
|
||||
sectors[i].specialflags |= SSF_ZOOMTUBEEND;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -8571,9 +8571,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
I_UpdateTime(); \
|
||||
} \
|
||||
lastwipetic = nowtime; \
|
||||
if (moviemode && rendermode == render_opengl) \
|
||||
M_LegacySaveFrame(); \
|
||||
else if (moviemode && rendermode == render_soft) \
|
||||
if (moviemode && rendermode != render_none) \
|
||||
I_CaptureVideoFrame(); \
|
||||
NetKeepAlive(); \
|
||||
} \
|
||||
|
|
@ -8768,9 +8766,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
}
|
||||
|
||||
lastwipetic = nowtime;
|
||||
if (moviemode && rendermode == render_opengl)
|
||||
M_LegacySaveFrame();
|
||||
else if (moviemode && rendermode == render_soft)
|
||||
if (moviemode && rendermode != render_none)
|
||||
I_CaptureVideoFrame();
|
||||
NetKeepAlive();
|
||||
}
|
||||
|
|
@ -8997,7 +8993,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
|||
|
||||
if (marathonmode & MA_INGAME)
|
||||
{
|
||||
marathonmode = static_cast<marathonmode_t>(marathonmode | MA_INIT);
|
||||
marathonmode |= MA_INIT;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -9100,7 +9096,7 @@ void P_PostLoadLevel(void)
|
|||
|
||||
if (marathonmode & MA_INGAME)
|
||||
{
|
||||
marathonmode = static_cast<marathonmode_t>(marathonmode & ~MA_INIT);
|
||||
marathonmode &= ~MA_INIT;
|
||||
}
|
||||
|
||||
Music_TuneReset(); // Placed before ACS scripts to allow remaps to occur on level start.
|
||||
|
|
|
|||
|
|
@ -31,13 +31,11 @@ typedef enum
|
|||
TMSP_BACKCEILING,
|
||||
} textmapslopeplane_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMSC_FRONTTOBACKFLOOR = 1,
|
||||
TMSC_BACKTOFRONTFLOOR = 1<<1,
|
||||
TMSC_FRONTTOBACKCEILING = 1<<2,
|
||||
TMSC_BACKTOFRONTCEILING = 1<<3,
|
||||
} textmapslopecopy_t;
|
||||
typedef INT32 textmapslopecopy_t;
|
||||
#define TMSC_FRONTTOBACKFLOOR (1)
|
||||
#define TMSC_BACKTOFRONTFLOOR (1<<1)
|
||||
#define TMSC_FRONTTOBACKCEILING (1<<2)
|
||||
#define TMSC_BACKTOFRONTCEILING (1<<3)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -46,26 +44,20 @@ typedef enum
|
|||
TMS_BACK,
|
||||
} textmapside_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMSL_NOPHYSICS = 1,
|
||||
TMSL_DYNAMIC = 1<<1,
|
||||
TMSL_COPY = 1<<2,
|
||||
} textmapslopeflags_t;
|
||||
typedef INT32 textmapslopeflags_t;
|
||||
#define TMSL_NOPHYSICS (1)
|
||||
#define TMSL_DYNAMIC (1<<1)
|
||||
#define TMSL_COPY (1<<2)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMSA_FLOOR = 1,
|
||||
TMSA_CEILING = 1<<1,
|
||||
} textmapslopeanchor_t;
|
||||
typedef INT32 textmapslopeanchor_t;
|
||||
#define TMSA_FLOOR (1)
|
||||
#define TMSA_CEILING (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMSAF_NOPHYSICS = 1,
|
||||
TMSAF_DYNAMIC = 1<<1,
|
||||
TMSAF_BACKSIDE = 1<<2,
|
||||
TMSAF_MIRROR = 1<<3,
|
||||
} textmapslopeanchorflags_t;
|
||||
typedef INT32 textmapslopeanchorflags_t;
|
||||
#define TMSAF_NOPHYSICS (1)
|
||||
#define TMSAF_DYNAMIC (1<<1)
|
||||
#define TMSAF_BACKSIDE (1<<2)
|
||||
#define TMSAF_MIRROR (1<<3)
|
||||
|
||||
void P_LinkSlopeThinkers (void);
|
||||
|
||||
|
|
|
|||
464
src/p_spec.h
464
src/p_spec.h
|
|
@ -30,56 +30,42 @@ void P_InitSkyboxPoint(mobj_t *mobj, mapthing_t *mthing);
|
|||
// Amount (dx, dy) vector linedef is shifted right to get scroll amount
|
||||
#define SCROLL_SHIFT 5
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMM_DOUBLESIZE = 1,
|
||||
TMM_SILENT = 1<<1,
|
||||
TMM_ALLOWYAWCONTROL = 1<<2,
|
||||
TMM_SWING = 1<<3,
|
||||
TMM_MACELINKS = 1<<4,
|
||||
TMM_CENTERLINK = 1<<5,
|
||||
TMM_CLIP = 1<<6,
|
||||
TMM_ALWAYSTHINK = 1<<7,
|
||||
} textmapmaceflags_t;
|
||||
typedef int textmapmaceflags_t;
|
||||
#define TMM_DOUBLESIZE (1)
|
||||
#define TMM_SILENT (1<<1)
|
||||
#define TMM_ALLOWYAWCONTROL (1<<2)
|
||||
#define TMM_SWING (1<<3)
|
||||
#define TMM_MACELINKS (1<<4)
|
||||
#define TMM_CENTERLINK (1<<5)
|
||||
#define TMM_CLIP (1<<6)
|
||||
#define TMM_ALWAYSTHINK (1<<7)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMDA_BOTTOMOFFSET = 1,
|
||||
TMDA_BOTTOM = 1<<1,
|
||||
TMDA_MIDDLE = 1<<2,
|
||||
TMDA_TOP = 1<<3,
|
||||
} textmapdronealignment_t;
|
||||
typedef int textmapdronealignment_t;
|
||||
#define TMDA_BOTTOMOFFSET (1)
|
||||
#define TMDA_BOTTOM (1<<1)
|
||||
#define TMDA_MIDDLE (1<<2)
|
||||
#define TMDA_TOP (1<<3)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMSF_RETRACTED = 1,
|
||||
TMSF_INTANGIBLE = 1<<1,
|
||||
} textmapspikeflags_t;
|
||||
typedef int textmapspikeflags_t;
|
||||
#define TMSF_RETRACTED (1)
|
||||
#define TMSF_INTANGIBLE (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFF_AIMLESS = 1,
|
||||
TMFF_STATIONARY = 1<<1,
|
||||
TMFF_HOP = 1<<2,
|
||||
} textmapflickyflags_t;
|
||||
typedef int textmapflickyflags_t;
|
||||
#define TMFF_AIMLESS (1)
|
||||
#define TMFF_STATIONARY (1<<1)
|
||||
#define TMFF_HOP (1<<2)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFH_NOFLAME = 1,
|
||||
TMFH_CORONA = 1<<1,
|
||||
} textmapflameholderflags_t;
|
||||
typedef int textmapflameholderflags_t;
|
||||
#define TMFH_NOFLAME (1)
|
||||
#define TMFH_CORONA (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMDS_NOGRAVITY = 1,
|
||||
TMDS_ROTATEEXTRA = 1<<1,
|
||||
} textmapdiagonalspringflags_t;
|
||||
typedef int textmapdiagonalspringflags_t;
|
||||
#define TMDS_NOGRAVITY (1)
|
||||
#define TMDS_ROTATEEXTRA (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMF_INVISIBLE = 1,
|
||||
TMF_NODISTANCECHECK = 1<<1,
|
||||
} textmapfanflags_t;
|
||||
typedef int textmapfanflags_t;
|
||||
#define TMF_INVISIBLE (1)
|
||||
#define TMF_NODISTANCECHECK (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -88,11 +74,9 @@ typedef enum
|
|||
TMGD_LEFT = 2,
|
||||
} textmapguarddirection_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMNI_BONUSONLY = 1,
|
||||
TMNI_REVEAL = 1<<1,
|
||||
} textmapnightsitem_t;
|
||||
typedef int textmapnightsitem_t;
|
||||
#define TMNI_BONUSONLY (1)
|
||||
#define TMNI_REVEAL (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -116,51 +100,37 @@ typedef enum
|
|||
TMMR_STRONG = 2,
|
||||
} textmapmonitorrespawn_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMF_GRAYSCALE = 1,
|
||||
TMF_SKIPINTRO = 1<<1,
|
||||
} textmapfangflags_t;
|
||||
typedef int textmapfangflags_t;
|
||||
#define TMF_GRAYSCALE (1)
|
||||
#define TMF_SKIPINTRO (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMB_NODEATHFLING = 1,
|
||||
TMB_BARRIER = 1<<1,
|
||||
} textmapbrakflags_t;
|
||||
typedef int textmapbrakflags_t;
|
||||
#define TMB_NODEATHFLING (1)
|
||||
#define TMB_BARRIER (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMWPF_DISABLED = 1,
|
||||
TMWPF_SHORTCUT = 1<<1,
|
||||
TMWPF_NORESPAWN = 1<<2,
|
||||
TMWPF_FINISHLINE = 1<<3,
|
||||
TMWPF_BLOCKLIGHTSNAKE = 1<<4
|
||||
} textmapwaypointflags_t;
|
||||
typedef int textmapwaypointflags_t;
|
||||
#define TMWPF_DISABLED (1)
|
||||
#define TMWPF_SHORTCUT (1<<1)
|
||||
#define TMWPF_NORESPAWN (1<<2)
|
||||
#define TMWPF_FINISHLINE (1<<3)
|
||||
#define TMWPF_BLOCKLIGHTSNAKE (1<<4)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMAUDIM_FLOAT = 1,
|
||||
TMAUDIM_BORED = 1<<1,
|
||||
} textmapaudiencemovementflags_t;
|
||||
typedef int textmapaudiencemovementflags_t;
|
||||
#define TMAUDIM_FLOAT (1)
|
||||
#define TMAUDIM_BORED (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMBCF_BACKANDFORTH = 1,
|
||||
TMBCF_REVERSE = 1<<1,
|
||||
} textmapbattlecapsuleflags_t;
|
||||
typedef int textmapbattlecapsuleflags_t;
|
||||
#define TMBCF_BACKANDFORTH (1)
|
||||
#define TMBCF_REVERSE (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
//TMICF_UNUSED = 1,
|
||||
TMICF_INVERTSIZE = 1<<1,
|
||||
} textmapitemcapsuleflags_t;
|
||||
typedef int textmapitemcapsuleflags_t;
|
||||
#define TMICF_UNUSED (1)
|
||||
#define TMICF_INVERTSIZE (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMICM_DEFAULT = 0, // Time Attack only has rings, multiplayer has everything
|
||||
TMICM_MULTIPLAYER = 1,
|
||||
TMICM_TIMEATTACK = 1<<1,
|
||||
} textmapitemcapsulemodes_t;
|
||||
typedef int textmapitemcapsulemodes_t;
|
||||
#define TMICM_DEFAULT (0) // Time Attack only has rings, multiplayer has everything
|
||||
#define TMICM_MULTIPLAYER (1)
|
||||
#define TMICM_TIMEATTACK (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -168,76 +138,58 @@ typedef enum
|
|||
TMMA_FLIP = 2,
|
||||
} textmapmayarrow_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMEF_SKIPTALLY = 1,
|
||||
TMEF_EMERALDCHECK = 1<<1,
|
||||
} textmapexitflags_t;
|
||||
typedef int textmapexitflags_t;
|
||||
#define TMEF_SKIPTALLY (1)
|
||||
#define TMEF_EMERALDCHECK (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMSP_NOTELEPORT = 1,
|
||||
TMSP_FORCESPIN = 1<<1,
|
||||
} textmapspeedpadflags_t;
|
||||
typedef int textmapspeedpadflags_t;
|
||||
#define TMSP_NOTELEPORT (1)
|
||||
#define TMSP_FORCESPIN (1<<1)
|
||||
|
||||
//FOF flags
|
||||
typedef enum
|
||||
{
|
||||
TMFA_NOPLANES = 1,
|
||||
TMFA_NOSIDES = 1<<1,
|
||||
TMFA_INSIDES = 1<<2,
|
||||
TMFA_ONLYINSIDES = 1<<3,
|
||||
TMFA_NOSHADE = 1<<4,
|
||||
TMFA_SPLAT = 1<<5,
|
||||
} textmapfofappearance_t;
|
||||
typedef int textmapfofappearance_t;
|
||||
#define TMFA_NOPLANES (1)
|
||||
#define TMFA_NOSIDES (1<<1)
|
||||
#define TMFA_INSIDES (1<<2)
|
||||
#define TMFA_ONLYINSIDES (1<<3)
|
||||
#define TMFA_NOSHADE (1<<4)
|
||||
#define TMFA_SPLAT (1<<5)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFT_INTANGIBLETOP = 1,
|
||||
TMFT_INTANGIBLEBOTTOM = 1<<1,
|
||||
TMFT_DONTBLOCKPLAYER = 1<<2,
|
||||
TMFT_VISIBLEFROMINSIDE = (TMFT_INTANGIBLETOP|TMFT_INTANGIBLEBOTTOM|TMFT_DONTBLOCKPLAYER),
|
||||
TMFT_DONTBLOCKOTHERS = 1<<3,
|
||||
TMFT_INTANGIBLE = (TMFT_DONTBLOCKPLAYER|TMFT_DONTBLOCKOTHERS),
|
||||
} textmapfoftangibility_t;
|
||||
typedef int textmapfoftangibility_t;
|
||||
#define TMFT_INTANGIBLETOP (1)
|
||||
#define TMFT_INTANGIBLEBOTTOM (1<<1)
|
||||
#define TMFT_DONTBLOCKPLAYER (1<<2)
|
||||
#define TMFT_VISIBLEFROMINSIDE (TMFT_INTANGIBLETOP|TMFT_INTANGIBLEBOTTOM|TMFT_DONTBLOCKPLAYER)
|
||||
#define TMFT_DONTBLOCKOTHERS (1<<3)
|
||||
#define TMFT_INTANGIBLE (TMFT_DONTBLOCKPLAYER|TMFT_DONTBLOCKOTHERS)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFW_NOSIDES = 1,
|
||||
TMFW_DOUBLESHADOW = 1<<1,
|
||||
TMFW_COLORMAPONLY = 1<<2,
|
||||
TMFW_NORIPPLE = 1<<3,
|
||||
TMFW_GOOWATER = 1<<4,
|
||||
TMFW_SPLAT = 1<<5,
|
||||
} textmapfofwater_t;
|
||||
typedef int textmapfofwater_t;
|
||||
#define TMFW_NOSIDES (1)
|
||||
#define TMFW_DOUBLESHADOW (1<<1)
|
||||
#define TMFW_COLORMAPONLY (1<<2)
|
||||
#define TMFW_NORIPPLE (1<<3)
|
||||
#define TMFW_GOOWATER (1<<4)
|
||||
#define TMFW_SPLAT (1<<5)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFB_REVERSE = 1,
|
||||
TMFB_SPINDASH = 1<<1,
|
||||
TMFB_DYNAMIC = 1<<2,
|
||||
} textmapfofbobbing_t;
|
||||
typedef int textmapfofbobbing_t;
|
||||
#define TMFB_REVERSE (1)
|
||||
#define TMFB_SPINDASH (1<<1)
|
||||
#define TMFB_DYNAMIC (1<<2)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFC_NOSHADE = 1,
|
||||
TMFC_NORETURN = 1<<1,
|
||||
TMFC_AIRBOB = 1<<2,
|
||||
TMFC_FLOATBOB = 1<<3,
|
||||
TMFC_SPLAT = 1<<4,
|
||||
} textmapfofcrumbling_t;
|
||||
typedef int textmapfofcrumbling_t;
|
||||
#define TMFC_NOSHADE (1)
|
||||
#define TMFC_NORETURN (1<<1)
|
||||
#define TMFC_AIRBOB (1<<2)
|
||||
#define TMFC_FLOATBOB (1<<3)
|
||||
#define TMFC_SPLAT (1<<4)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFR_REVERSE = 1,
|
||||
TMFR_SPINDASH = 1<<1,
|
||||
} textmapfofrising_t;
|
||||
typedef int textmapfofrising_t;
|
||||
#define TMFR_REVERSE (1)
|
||||
#define TMFR_SPINDASH (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFM_BRICK = 1,
|
||||
TMFM_INVISIBLE = 1<<1,
|
||||
} textmapfofmario_t;
|
||||
typedef int textmapfofmario_t;
|
||||
#define TMFM_BRICK (1)
|
||||
#define TMFM_INVISIBLE (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -247,19 +199,15 @@ typedef enum
|
|||
TMFB_STRONG,
|
||||
} textmapfofbusttype_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFB_PUSHABLES = 1,
|
||||
TMFB_EXECUTOR = 1<<1,
|
||||
TMFB_ONLYBOTTOM = 1<<2,
|
||||
TMFB_SPLAT = 1<<3,
|
||||
} textmapfofbustflags_t;
|
||||
typedef int textmapfofbustflags_t;
|
||||
#define TMFB_PUSHABLES (1)
|
||||
#define TMFB_EXECUTOR (1<<1)
|
||||
#define TMFB_ONLYBOTTOM (1<<2)
|
||||
#define TMFB_SPLAT (1<<3)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFL_NOBOSSES = 1,
|
||||
TMFL_SPLAT = 1<<1,
|
||||
} textmapfoflaserflags_t;
|
||||
typedef int textmapfoflaserflags_t;
|
||||
#define TMFL_NOBOSSES (1)
|
||||
#define TMFL_SPLAT (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -314,11 +262,9 @@ typedef enum
|
|||
TMN_FROMNIGHTS = 2,
|
||||
} textmapnighterizeoptions_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMN_BONUSLAPS = 1,
|
||||
TMN_LEVELCOMPLETION = 1<<2,
|
||||
} textmapnightserizeflags_t;
|
||||
typedef int textmapnightserizeflags_t;
|
||||
#define TMN_BONUSLAPS (1)
|
||||
#define TMN_LEVELCOMPLETION (1<<2)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -334,11 +280,9 @@ typedef enum
|
|||
TMS_ALWAYS = 2,
|
||||
} textmapspherescheck_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMI_BONUSLAPS = 1,
|
||||
TMI_ENTER = 1<<2,
|
||||
} textmapideyacaptureflags_t;
|
||||
typedef int textmapideyacaptureflags_t;
|
||||
#define TMI_BONUSLAPS (1)
|
||||
#define TMI_ENTER (1<<2)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -354,24 +298,20 @@ typedef enum
|
|||
TMT_REPLACEFIRST = 2,
|
||||
} textmaptagoptions_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMT_SILENT = 1,
|
||||
TMT_KEEPANGLE = 1<<1,
|
||||
TMT_KEEPMOMENTUM = 1<<2,
|
||||
TMT_RELATIVE = 1<<3,
|
||||
} textmapteleportflags_t;
|
||||
typedef int textmapteleportflags_t;
|
||||
#define TMT_SILENT (1)
|
||||
#define TMT_KEEPANGLE (1<<1)
|
||||
#define TMT_KEEPMOMENTUM (1<<2)
|
||||
#define TMT_RELATIVE (1<<3)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMM_ALLPLAYERS = 1,
|
||||
TMM_OFFSET = 1<<1,
|
||||
TMM_FADE = 1<<2,
|
||||
TMM_NORELOAD = 1<<3,
|
||||
TMM_FORCERESET = 1<<4,
|
||||
TMM_NOLOOP = 1<<5,
|
||||
TMM_NOCREDIT = 1<<6,
|
||||
} textmapmusicflags_t;
|
||||
typedef int textmapmusicflags_t;
|
||||
#define TMM_ALLPLAYERS (1)
|
||||
#define TMM_OFFSET (1<<1)
|
||||
#define TMM_FADE (1<<2)
|
||||
#define TMM_NORELOAD (1<<3)
|
||||
#define TMM_FORCERESET (1<<4)
|
||||
#define TMM_NOLOOP (1<<5)
|
||||
#define TMM_NOCREDIT (1<<6)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -395,51 +335,39 @@ typedef enum
|
|||
TML_CEILING = 2,
|
||||
} textmaplightareas_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMLC_NOSECTOR = 1,
|
||||
TMLC_NOFLOOR = 1<<1,
|
||||
TMLC_NOCEILING = 1<<2,
|
||||
} textmaplightcopyflags_t;
|
||||
typedef int textmaplightcopyflags_t;
|
||||
#define TMLC_NOSECTOR (1)
|
||||
#define TMLC_NOFLOOR (1<<1)
|
||||
#define TMLC_NOCEILING (1<<2)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMF_RELATIVE = 1,
|
||||
TMF_OVERRIDE = 1<<1,
|
||||
TMF_TICBASED = 1<<2,
|
||||
} textmapfadeflags_t;
|
||||
typedef int textmapfadeflags_t;
|
||||
#define TMF_RELATIVE (1)
|
||||
#define TMF_OVERRIDE (1<<1)
|
||||
#define TMF_TICBASED (1<<2)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMB_USETARGET = 1,
|
||||
TMB_SYNC = 1<<1,
|
||||
} textmapblinkinglightflags_t;
|
||||
typedef int textmapblinkinglightflags_t;
|
||||
#define TMB_USETARGET (1)
|
||||
#define TMB_SYNC (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFR_NORETURN = 1,
|
||||
TMFR_CHECKFLAG = 1<<1,
|
||||
} textmapfofrespawnflags_t;
|
||||
typedef int textmapfofrespawnflags_t;
|
||||
#define TMFR_NORETURN (1)
|
||||
#define TMFR_CHECKFLAG (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMST_RELATIVE = 1,
|
||||
TMST_DONTDOTRANSLUCENT = 1<<1,
|
||||
} textmapsettranslucencyflags_t;
|
||||
typedef int textmapsettranslucencyflags_t;
|
||||
#define TMST_RELATIVE (1)
|
||||
#define TMST_DONTDOTRANSLUCENT (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFT_RELATIVE = 1,
|
||||
TMFT_OVERRIDE = 1<<1,
|
||||
TMFT_TICBASED = 1<<2,
|
||||
TMFT_IGNORECOLLISION = 1<<3,
|
||||
TMFT_GHOSTFADE = 1<<4,
|
||||
TMFT_DONTDOTRANSLUCENT = 1<<5,
|
||||
TMFT_DONTDOEXISTS = 1<<6,
|
||||
TMFT_DONTDOLIGHTING = 1<<7,
|
||||
TMFT_DONTDOCOLORMAP = 1<<8,
|
||||
TMFT_USEEXACTALPHA = 1<<9,
|
||||
} textmapfadetranslucencyflags_t;
|
||||
typedef int textmapfadetranslucencyflags_t;
|
||||
#define TMFT_RELATIVE (1)
|
||||
#define TMFT_OVERRIDE (1<<1)
|
||||
#define TMFT_TICBASED (1<<2)
|
||||
#define TMFT_IGNORECOLLISION (1<<3)
|
||||
#define TMFT_GHOSTFADE (1<<4)
|
||||
#define TMFT_DONTDOTRANSLUCENT (1<<5)
|
||||
#define TMFT_DONTDOEXISTS (1<<6)
|
||||
#define TMFT_DONTDOLIGHTING (1<<7)
|
||||
#define TMFT_DONTDOCOLORMAP (1<<8)
|
||||
#define TMFT_USEEXACTALPHA (1<<9)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -448,16 +376,14 @@ typedef enum
|
|||
TMS_BOTH = 2,
|
||||
} textmapskybox_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMP_CLOSE = 1,
|
||||
TMP_RUNPOSTEXEC = 1<<1,
|
||||
TMP_CALLBYNAME = 1<<2,
|
||||
TMP_KEEPCONTROLS = 1<<3,
|
||||
TMP_KEEPREALTIME = 1<<4,
|
||||
//TMP_ALLPLAYERS = 1<<5,
|
||||
//TMP_FREEZETHINKERS = 1<<6,
|
||||
} textmappromptflags_t;
|
||||
typedef int textmappromptflags_t;
|
||||
#define TMP_CLOSE (1)
|
||||
#define TMP_RUNPOSTEXEC (1<<1)
|
||||
#define TMP_CALLBYNAME (1<<2)
|
||||
#define TMP_KEEPCONTROLS (1<<3)
|
||||
#define TMP_KEEPREALTIME (1<<4)
|
||||
// #define TMP_ALLPLAYERS (1<<5)
|
||||
// #define TMP_FREEZETHINKERS (1<<6)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -489,18 +415,14 @@ typedef enum
|
|||
TMST_NONEXCLUSIVE = 4,
|
||||
} textmapscrolltype_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMPF_SLIDE = 1,
|
||||
TMPF_NONEXCLUSIVE = 1<<1,
|
||||
} textmappusherflags_t;
|
||||
typedef int textmappusherflags_t;
|
||||
#define TMPF_SLIDE (1)
|
||||
#define TMPF_NONEXCLUSIVE (1<<1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMPP_NOZFADE = 1,
|
||||
TMPP_PUSHZ = 1<<1,
|
||||
TMPP_NONEXCLUSIVE = 1<<2,
|
||||
} textmappointpushflags_t;
|
||||
typedef int textmappointpushflags_t;
|
||||
#define TMPP_NOZFADE (1)
|
||||
#define TMPP_PUSHZ (1<<1)
|
||||
#define TMPP_NONEXCLUSIVE (1<<2)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -511,23 +433,17 @@ typedef enum
|
|||
TMB_MODULATE = 4,
|
||||
} textmapblendmodes_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMCFF_FLIP = 1,
|
||||
} textmapcrossfinishflags_t;
|
||||
typedef int textmapcrossfinishflags_t;
|
||||
#define TMCFF_FLIP (1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMCRF_FRONTONLY = 1,
|
||||
} textmapcrossrespawnflags_t;
|
||||
typedef int textmapcrossrespawnflags_t;
|
||||
#define TMCRF_FRONTONLY (1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMBOT_NORUBBERBAND = 1,
|
||||
TMBOT_NOCONTROL = 1<<1,
|
||||
TMBOT_FORCEDIR = 1<<2,
|
||||
TMBOT_FASTFALL = 1<<3,
|
||||
} textmapbotcontroller_t;
|
||||
typedef int textmapbotcontroller_t;
|
||||
#define TMBOT_NORUBBERBAND (1)
|
||||
#define TMBOT_NOCONTROL (1<<1)
|
||||
#define TMBOT_FORCEDIR (1<<2)
|
||||
#define TMBOT_FASTFALL (1<<3)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -895,12 +811,10 @@ struct elevator_t
|
|||
fixed_t ceilingwasheight; // Height the ceiling WAS at
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CF_RETURN = 1, // Return after crumbling
|
||||
CF_FLOATBOB = 1<<1, // Float on water
|
||||
CF_REVERSE = 1<<2, // Reverse gravity
|
||||
} crumbleflag_t;
|
||||
typedef int crumbleflag_t;
|
||||
#define CF_RETURN (1) // Return after crumbling
|
||||
#define CF_FLOATBOB (1<<1) // Float on water
|
||||
#define CF_REVERSE (1<<2) // Reverse gravity
|
||||
|
||||
struct crumble_t
|
||||
{
|
||||
|
|
@ -997,12 +911,10 @@ struct eachtime_t
|
|||
boolean triggerOnExit;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RF_REVERSE = 1, //Lower when stood on
|
||||
RF_SPINDASH = 1<<1, //Require spindash to move
|
||||
RF_DYNAMIC = 1<<2, //Dynamically sinking platform
|
||||
} raiseflag_t;
|
||||
typedef int raiseflag_t;
|
||||
#define RF_REVERSE (1) //Lower when stood on
|
||||
#define RF_SPINDASH (1<<1) //Require spindash to move
|
||||
#define RF_DYNAMIC (1<<2) //Dynamically sinking platform
|
||||
|
||||
struct raise_t
|
||||
{
|
||||
|
|
|
|||
32
src/r_data.h
32
src/r_data.h
|
|
@ -76,23 +76,21 @@ boolean R_CheckDefaultColormap(extracolormap_t *extra_colormap, boolean checkrgb
|
|||
boolean R_CheckEqualColormaps(extracolormap_t *exc_a, extracolormap_t *exc_b, boolean checkrgba, boolean checkfadergba, boolean checkparams);
|
||||
extracolormap_t *R_GetColormapFromList(extracolormap_t *extra_colormap);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMCF_RELATIVE = 1,
|
||||
TMCF_SUBLIGHTR = 1<<1,
|
||||
TMCF_SUBLIGHTG = 1<<2,
|
||||
TMCF_SUBLIGHTB = 1<<3,
|
||||
TMCF_SUBLIGHTA = 1<<4,
|
||||
TMCF_SUBFADER = 1<<5,
|
||||
TMCF_SUBFADEG = 1<<6,
|
||||
TMCF_SUBFADEB = 1<<7,
|
||||
TMCF_SUBFADEA = 1<<8,
|
||||
TMCF_SUBFADESTART = 1<<9,
|
||||
TMCF_SUBFADEEND = 1<<10,
|
||||
TMCF_IGNOREFLAGS = 1<<11,
|
||||
TMCF_FROMBLACK = 1<<12,
|
||||
TMCF_OVERRIDE = 1<<13,
|
||||
} textmapcolormapflags_t;
|
||||
typedef int textmapcolormapflags_t;
|
||||
#define TMCF_RELATIVE (1)
|
||||
#define TMCF_SUBLIGHTR (1<<1)
|
||||
#define TMCF_SUBLIGHTG (1<<2)
|
||||
#define TMCF_SUBLIGHTB (1<<3)
|
||||
#define TMCF_SUBLIGHTA (1<<4)
|
||||
#define TMCF_SUBFADER (1<<5)
|
||||
#define TMCF_SUBFADEG (1<<6)
|
||||
#define TMCF_SUBFADEB (1<<7)
|
||||
#define TMCF_SUBFADEA (1<<8)
|
||||
#define TMCF_SUBFADESTART (1<<9)
|
||||
#define TMCF_SUBFADEEND (1<<10)
|
||||
#define TMCF_IGNOREFLAGS (1<<11)
|
||||
#define TMCF_FROMBLACK (1<<12)
|
||||
#define TMCF_OVERRIDE (1<<13)
|
||||
|
||||
lighttable_t *R_CreateLightTable(extracolormap_t *extra_colormap);
|
||||
extracolormap_t * R_CreateColormapFromLinedef(char *p1, char *p2, char *p3);
|
||||
|
|
|
|||
425
src/r_defs.h
425
src/r_defs.h
|
|
@ -119,92 +119,89 @@ struct degenmobj_t
|
|||
// heightsec. Allows for multiple fake planes.
|
||||
/** Flags describing 3Dfloor behavior and appearance.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
FOF_EXISTS = 0x1, ///< Always set, to check for validity.
|
||||
FOF_BLOCKPLAYER = 0x2, ///< Solid to player, but nothing else
|
||||
FOF_BLOCKOTHERS = 0x4, ///< Solid to everything but player
|
||||
FOF_SOLID = 0x6, ///< Clips things.
|
||||
FOF_RENDERSIDES = 0x8, ///< Renders the sides.
|
||||
FOF_RENDERPLANES = 0x10, ///< Renders the floor/ceiling.
|
||||
FOF_RENDERALL = 0x18, ///< Renders everything.
|
||||
FOF_SWIMMABLE = 0x20, ///< Is a water block.
|
||||
FOF_NOSHADE = 0x40, ///< Messes with the lighting?
|
||||
FOF_CUTSOLIDS = 0x80, ///< Cuts out hidden solid pixels.
|
||||
FOF_CUTEXTRA = 0x100, ///< Cuts out hidden translucent pixels.
|
||||
FOF_CUTLEVEL = 0x180, ///< Cuts out all hidden pixels.
|
||||
FOF_CUTSPRITES = 0x200, ///< Final step in making 3D water.
|
||||
FOF_BOTHPLANES = 0x400, ///< Render inside and outside planes.
|
||||
FOF_EXTRA = 0x800, ///< Gets cut by ::FOF_CUTEXTRA.
|
||||
FOF_TRANSLUCENT = 0x1000, ///< See through!
|
||||
FOF_FOG = 0x2000, ///< Fog "brush."
|
||||
FOF_INVERTPLANES = 0x4000, ///< Only render inside planes.
|
||||
FOF_ALLSIDES = 0x8000, ///< Render inside and outside sides.
|
||||
FOF_INVERTSIDES = 0x10000, ///< Only render inside sides.
|
||||
FOF_DOUBLESHADOW = 0x20000, ///< Make two lightlist entries to reset light?
|
||||
FOF_FLOATBOB = 0x40000, ///< Floats on water and bobs if you step on it.
|
||||
FOF_NORETURN = 0x80000, ///< Used with ::FOF_CRUMBLE. Will not return to its original position after falling.
|
||||
FOF_CRUMBLE = 0x100000, ///< Falls 2 seconds after being stepped on, and randomly brings all touching crumbling 3dfloors down with it, providing their master sectors share the same tag (allows crumble platforms above or below, to also exist).
|
||||
FOF_GOOWATER = 0x200000, ///< Used with ::FOF_SWIMMABLE. Makes thick bouncey goop.
|
||||
FOF_MARIO = 0x400000, ///< Acts like a question block when hit from underneath. Goodie spawned at top is determined by master sector.
|
||||
FOF_BUSTUP = 0x800000, ///< You can spin through/punch this block and it will crumble!
|
||||
FOF_QUICKSAND = 0x1000000, ///< Quicksand!
|
||||
FOF_PLATFORM = 0x2000000, ///< You can jump up through this to the top.
|
||||
FOF_REVERSEPLATFORM = 0x4000000, ///< A fall-through floor in normal gravity, a platform in reverse gravity.
|
||||
FOF_INTANGIBLEFLATS = 0x6000000, ///< Both flats are intangible, but the sides are still solid.
|
||||
FOF_RIPPLE = 0x8000000, ///< Ripple the flats
|
||||
FOF_COLORMAPONLY = 0x10000000, ///< Only copy the colormap, not the lightlevel
|
||||
FOF_BOUNCY = 0x20000000, ///< Bounces players
|
||||
FOF_SPLAT = 0x40000000, ///< Use splat flat renderer (treat cyan pixels as invisible)
|
||||
} ffloortype_e;
|
||||
typedef int ffloortype_e;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FF_OLD_EXISTS = 0x1,
|
||||
FF_OLD_BLOCKPLAYER = 0x2,
|
||||
FF_OLD_BLOCKOTHERS = 0x4,
|
||||
FF_OLD_SOLID = 0x6,
|
||||
FF_OLD_RENDERSIDES = 0x8,
|
||||
FF_OLD_RENDERPLANES = 0x10,
|
||||
FF_OLD_RENDERALL = 0x18,
|
||||
FF_OLD_SWIMMABLE = 0x20,
|
||||
FF_OLD_NOSHADE = 0x40,
|
||||
FF_OLD_CUTSOLIDS = 0x80,
|
||||
FF_OLD_CUTEXTRA = 0x100,
|
||||
FF_OLD_CUTLEVEL = 0x180,
|
||||
FF_OLD_CUTSPRITES = 0x200,
|
||||
FF_OLD_BOTHPLANES = 0x400,
|
||||
FF_OLD_EXTRA = 0x800,
|
||||
FF_OLD_TRANSLUCENT = 0x1000,
|
||||
FF_OLD_FOG = 0x2000,
|
||||
FF_OLD_INVERTPLANES = 0x4000,
|
||||
FF_OLD_ALLSIDES = 0x8000,
|
||||
FF_OLD_INVERTSIDES = 0x10000,
|
||||
FF_OLD_DOUBLESHADOW = 0x20000,
|
||||
FF_OLD_FLOATBOB = 0x40000,
|
||||
FF_OLD_NORETURN = 0x80000,
|
||||
FF_OLD_CRUMBLE = 0x100000,
|
||||
FF_OLD_SHATTERBOTTOM = 0x200000,
|
||||
FF_OLD_GOOWATER = 0x200000,
|
||||
FF_OLD_MARIO = 0x400000,
|
||||
FF_OLD_BUSTUP = 0x800000,
|
||||
FF_OLD_QUICKSAND = 0x1000000,
|
||||
FF_OLD_PLATFORM = 0x2000000,
|
||||
FF_OLD_REVERSEPLATFORM = 0x4000000,
|
||||
FF_OLD_INTANGIBLEFLATS = 0x6000000,
|
||||
FF_OLD_SHATTER = 0x8000000,
|
||||
FF_OLD_SPINBUST = 0x10000000,
|
||||
FF_OLD_STRONGBUST = 0x20000000,
|
||||
FF_OLD_RIPPLE = 0x40000000,
|
||||
FF_OLD_COLORMAPONLY = (INT32)0x80000000,
|
||||
} oldffloortype_e;
|
||||
#define FOF_EXISTS (0x1) ///< Always set, to check for validity.
|
||||
#define FOF_BLOCKPLAYER (0x2) ///< Solid to player, but nothing else
|
||||
#define FOF_BLOCKOTHERS (0x4) ///< Solid to everything but player
|
||||
#define FOF_SOLID (0x6) ///< Clips things.
|
||||
#define FOF_RENDERSIDES (0x8) ///< Renders the sides.
|
||||
#define FOF_RENDERPLANES (0x10) ///< Renders the floor/ceiling.
|
||||
#define FOF_RENDERALL (0x18) ///< Renders everything.
|
||||
#define FOF_SWIMMABLE (0x20) ///< Is a water block.
|
||||
#define FOF_NOSHADE (0x40) ///< Messes with the lighting?
|
||||
#define FOF_CUTSOLIDS (0x80) ///< Cuts out hidden solid pixels.
|
||||
#define FOF_CUTEXTRA (0x100) ///< Cuts out hidden translucent pixels.
|
||||
#define FOF_CUTLEVEL (0x180) ///< Cuts out all hidden pixels.
|
||||
#define FOF_CUTSPRITES (0x200) ///< Final step in making 3D water.
|
||||
#define FOF_BOTHPLANES (0x400) ///< Render inside and outside planes.
|
||||
#define FOF_EXTRA (0x800) ///< Gets cut by ::FOF_CUTEXTRA.
|
||||
#define FOF_TRANSLUCENT (0x1000) ///< See through!
|
||||
#define FOF_FOG (0x2000) ///< Fog "brush."
|
||||
#define FOF_INVERTPLANES (0x4000) ///< Only render inside planes.
|
||||
#define FOF_ALLSIDES (0x8000) ///< Render inside and outside sides.
|
||||
#define FOF_INVERTSIDES (0x10000) ///< Only render inside sides.
|
||||
#define FOF_DOUBLESHADOW (0x20000) ///< Make two lightlist entries to reset light?
|
||||
#define FOF_FLOATBOB (0x40000) ///< Floats on water and bobs if you step on it.
|
||||
#define FOF_NORETURN (0x80000) ///< Used with ::FOF_CRUMBLE. Will not return to its original position after falling.
|
||||
#define FOF_CRUMBLE (0x100000) ///< Falls 2 seconds after being stepped on, and randomly brings all touching crumbling 3dfloors down with it, providing their master sectors share the same tag (allows crumble platforms above or below, to also exist).
|
||||
#define FOF_GOOWATER (0x200000) ///< Used with ::FOF_SWIMMABLE. Makes thick bouncey goop.
|
||||
#define FOF_MARIO (0x400000) ///< Acts like a question block when hit from underneath. Goodie spawned at top is determined by master sector.
|
||||
#define FOF_BUSTUP (0x800000) ///< You can spin through/punch this block and it will crumble!
|
||||
#define FOF_QUICKSAND (0x1000000) ///< Quicksand!
|
||||
#define FOF_PLATFORM (0x2000000) ///< You can jump up through this to the top.
|
||||
#define FOF_REVERSEPLATFORM (0x4000000) ///< A fall-through floor in normal gravity, a platform in reverse gravity.
|
||||
#define FOF_INTANGIBLEFLATS (0x6000000) ///< Both flats are intangible, but the sides are still solid.
|
||||
#define FOF_RIPPLE (0x8000000) ///< Ripple the flats
|
||||
#define FOF_COLORMAPONLY (0x10000000) ///< Only copy the colormap, not the lightlevel
|
||||
#define FOF_BOUNCY (0x20000000) ///< Bounces players
|
||||
#define FOF_SPLAT (0x40000000) ///< Use splat flat renderer (treat cyan pixels as invisible)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
FB_PUSHABLES = 0x1, // Bustable by pushables
|
||||
FB_EXECUTOR = 0x2, // Trigger linedef executor
|
||||
FB_ONLYBOTTOM = 0x4, // Only bustable from below
|
||||
} ffloorbustflags_e;
|
||||
typedef int ffloorbustflags_e;
|
||||
|
||||
#define FB_PUSHABLES (0x1) // Bustable by pushables
|
||||
#define FB_EXECUTOR (0x2) // Trigger linedef executor
|
||||
#define FB_ONLYBOTTOM (0x4) // Only bustable from below
|
||||
|
||||
typedef int oldffloortype_e;
|
||||
|
||||
#define FF_OLD_EXISTS (0x1)
|
||||
#define FF_OLD_BLOCKPLAYER (0x2)
|
||||
#define FF_OLD_BLOCKOTHERS (0x4)
|
||||
#define FF_OLD_SOLID (0x6)
|
||||
#define FF_OLD_RENDERSIDES (0x8)
|
||||
#define FF_OLD_RENDERPLANES (0x10)
|
||||
#define FF_OLD_RENDERALL (0x18)
|
||||
#define FF_OLD_SWIMMABLE (0x20)
|
||||
#define FF_OLD_NOSHADE (0x40)
|
||||
#define FF_OLD_CUTSOLIDS (0x80)
|
||||
#define FF_OLD_CUTEXTRA (0x100)
|
||||
#define FF_OLD_CUTLEVEL (0x180)
|
||||
#define FF_OLD_CUTSPRITES (0x200)
|
||||
#define FF_OLD_BOTHPLANES (0x400)
|
||||
#define FF_OLD_EXTRA (0x800)
|
||||
#define FF_OLD_TRANSLUCENT (0x1000)
|
||||
#define FF_OLD_FOG (0x2000)
|
||||
#define FF_OLD_INVERTPLANES (0x4000)
|
||||
#define FF_OLD_ALLSIDES (0x8000)
|
||||
#define FF_OLD_INVERTSIDES (0x10000)
|
||||
#define FF_OLD_DOUBLESHADOW (0x20000)
|
||||
#define FF_OLD_FLOATBOB (0x40000)
|
||||
#define FF_OLD_NORETURN (0x80000)
|
||||
#define FF_OLD_CRUMBLE (0x100000)
|
||||
#define FF_OLD_SHATTERBOTTOM (0x200000)
|
||||
#define FF_OLD_GOOWATER (0x200000)
|
||||
#define FF_OLD_MARIO (0x400000)
|
||||
#define FF_OLD_BUSTUP (0x800000)
|
||||
#define FF_OLD_QUICKSAND (0x1000000)
|
||||
#define FF_OLD_PLATFORM (0x2000000)
|
||||
#define FF_OLD_REVERSEPLATFORM (0x4000000)
|
||||
#define FF_OLD_INTANGIBLEFLATS (0x6000000)
|
||||
#define FF_OLD_SHATTER (0x8000000)
|
||||
#define FF_OLD_SPINBUST (0x10000000)
|
||||
#define FF_OLD_STRONGBUST (0x20000000)
|
||||
#define FF_OLD_RIPPLE (0x40000000)
|
||||
#define FF_OLD_COLORMAPONLY ((INT32)0x80000000)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -297,10 +294,10 @@ struct r_lightlist_t
|
|||
};
|
||||
|
||||
// Slopes
|
||||
typedef enum {
|
||||
SL_NOPHYSICS = 1, /// This plane will have no physics applied besides the positioning.
|
||||
SL_DYNAMIC = 1<<1, /// This plane slope will be assigned a thinker to make it dynamic.
|
||||
} slopeflags_t;
|
||||
typedef int slopeflags_t;
|
||||
|
||||
#define SL_NOPHYSICS (1) /// This plane will have no physics applied besides the positioning.
|
||||
#define SL_DYNAMIC (1<<1) /// This plane slope will be assigned a thinker to make it dynamic.
|
||||
|
||||
struct pslope_t
|
||||
{
|
||||
|
|
@ -340,96 +337,91 @@ struct botcontroller_t
|
|||
angle_t forceAngle;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
// flipspecial - planes with effect
|
||||
MSF_FLIPSPECIAL_FLOOR = 1,
|
||||
MSF_FLIPSPECIAL_CEILING = 1<<1,
|
||||
MSF_FLIPSPECIAL_BOTH = (MSF_FLIPSPECIAL_FLOOR|MSF_FLIPSPECIAL_CEILING),
|
||||
// triggerspecial - conditions under which plane touch causes effect
|
||||
MSF_TRIGGERSPECIAL_TOUCH = 1<<2,
|
||||
MSF_TRIGGERSPECIAL_HEADBUMP = 1<<3,
|
||||
// triggerline - conditions for linedef executor triggering
|
||||
MSF_TRIGGERLINE_PLANE = 1<<4, // require plane touch
|
||||
MSF_TRIGGERLINE_MOBJ = 1<<5, // allow non-pushable mobjs to trigger
|
||||
// invertprecip - inverts presence of precipitation
|
||||
MSF_INVERTPRECIP = 1<<6,
|
||||
MSF_GRAVITYFLIP = 1<<7,
|
||||
MSF_HEATWAVE = 1<<8,
|
||||
MSF_NOCLIPCAMERA = 1<<9,
|
||||
// water ripple
|
||||
MSF_RIPPLE_FLOOR = 1<<10,
|
||||
MSF_RIPPLE_CEILING = 1<<11,
|
||||
// invert encore color remap status
|
||||
MSF_INVERTENCORE = 1<<12,
|
||||
// turn off directional lighting
|
||||
MSF_FLATLIGHTING = 1<<13,
|
||||
// force it on (even if it was disabled)
|
||||
MSF_DIRECTIONLIGHTING = 1<<14,
|
||||
} sectorflags_t;
|
||||
typedef int sectorflags_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SSF_NOSTEPUP = 1,
|
||||
SSF_DOUBLESTEPUP = 1<<1,
|
||||
SSF_NOSTEPDOWN = 1<<2,
|
||||
SSF_WINDCURRENT = 1<<3,
|
||||
SSF_CONVEYOR = 1<<4,
|
||||
// free: 1<<5,
|
||||
SSF_CHEATCHECKACTIVATOR = 1<<6,
|
||||
SSF_EXIT = 1<<7,
|
||||
SSF_DELETEITEMS = 1<<8,
|
||||
// free: 1<<9,
|
||||
// free: 1<<10,
|
||||
// free: 1<<11,
|
||||
SSF_FAN = 1<<12,
|
||||
// free: 1<<13,
|
||||
// free: 1<<14,
|
||||
SSF_ZOOMTUBESTART = 1<<15,
|
||||
SSF_ZOOMTUBEEND = 1<<16,
|
||||
} sectorspecialflags_t;
|
||||
// flipspecial - planes with effect
|
||||
#define MSF_FLIPSPECIAL_FLOOR (1)
|
||||
#define MSF_FLIPSPECIAL_CEILING (1<<1)
|
||||
#define MSF_FLIPSPECIAL_BOTH ((MSF_FLIPSPECIAL_FLOOR)|(MSF_FLIPSPECIAL_CEILING))
|
||||
// triggerspecial - conditions under which plane touch causes effect
|
||||
#define MSF_TRIGGERSPECIAL_TOUCH (1<<2)
|
||||
#define MSF_TRIGGERSPECIAL_HEADBUMP (1<<3)
|
||||
// triggerline - conditions for linedef executor triggering
|
||||
#define MSF_TRIGGERLINE_PLANE (1<<4) // require plane touch
|
||||
#define MSF_TRIGGERLINE_MOBJ (1<<5) // allow non-pushable mobjs to trigger
|
||||
// invertprecip - inverts presence of precipitation
|
||||
#define MSF_INVERTPRECIP (1<<6)
|
||||
#define MSF_GRAVITYFLIP (1<<7)
|
||||
#define MSF_HEATWAVE (1<<8)
|
||||
#define MSF_NOCLIPCAMERA (1<<9)
|
||||
// water ripple
|
||||
#define MSF_RIPPLE_FLOOR (1<<10)
|
||||
#define MSF_RIPPLE_CEILING (1<<11)
|
||||
// invert encore color remap status
|
||||
#define MSF_INVERTENCORE (1<<12)
|
||||
// turn off directional lighting
|
||||
#define MSF_FLATLIGHTING (1<<13)
|
||||
// force it on (even if it was disabled)
|
||||
#define MSF_DIRECTIONLIGHTING (1<<14)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
// Mask to get trigger type.
|
||||
SECSPAC_TRIGGERMASK = 0x0000000F,
|
||||
typedef int sectorspecialflags_t;
|
||||
#define SSF_NOSTEPUP (1)
|
||||
#define SSF_DOUBLESTEPUP (1<<1)
|
||||
#define SSF_NOSTEPDOWN (1<<2)
|
||||
#define SSF_WINDCURRENT (1<<3)
|
||||
#define SSF_CONVEYOR (1<<4)
|
||||
// free: 1<<5,
|
||||
#define SSF_CHEATCHECKACTIVATOR (1<<6)
|
||||
#define SSF_EXIT (1<<7)
|
||||
#define SSF_DELETEITEMS (1<<8)
|
||||
// free: 1<<9,
|
||||
// free: 1<<10,
|
||||
// free: 1<<11,
|
||||
#define SSF_FAN (1<<12)
|
||||
// free: 1<<13,
|
||||
// free: 1<<14,
|
||||
#define SSF_ZOOMTUBESTART (1<<15)
|
||||
#define SSF_ZOOMTUBEEND (1<<16)
|
||||
|
||||
// Special action is activated once.
|
||||
SECSPAC_ONCESPECIAL = 0x00000000,
|
||||
typedef int sectoractionflags_t;
|
||||
// Mask to get trigger type.
|
||||
#define SECSPAC_TRIGGERMASK (0x0000000F)
|
||||
|
||||
// Special action is repeatable.
|
||||
SECSPAC_REPEATSPECIAL = 0x00000001,
|
||||
// Special action is activated once.
|
||||
#define SECSPAC_ONCESPECIAL (0x00000000)
|
||||
|
||||
// Special action is activated continously.
|
||||
SECSPAC_CONTINUOUSSPECIAL = 0x00000002,
|
||||
// Special action is repeatable.
|
||||
#define SECSPAC_REPEATSPECIAL (0x00000001)
|
||||
|
||||
// When a player enters this sector.
|
||||
SECSPAC_ENTER = 0x00000010,
|
||||
// Special action is activated continously.
|
||||
#define SECSPAC_CONTINUOUSSPECIAL (0x00000002)
|
||||
|
||||
// When a player touches the floor of this sector.
|
||||
SECSPAC_FLOOR = 0x00000020,
|
||||
// When a player enters this sector.
|
||||
#define SECSPAC_ENTER (0x00000010)
|
||||
|
||||
// When a player touches the ceiling of this sector.
|
||||
SECSPAC_CEILING = 0x00000040,
|
||||
// When a player touches the floor of this sector.
|
||||
#define SECSPAC_FLOOR (0x00000020)
|
||||
|
||||
// When an enemy enters this sector.
|
||||
SECSPAC_ENTERMONSTER = 0x00000080,
|
||||
// When a player touches the ceiling of this sector.
|
||||
#define SECSPAC_CEILING (0x00000040)
|
||||
|
||||
// When an enemy touches the floor of this sector.
|
||||
SECSPAC_FLOORMONSTER = 0x00000100,
|
||||
// When an enemy enters this sector.
|
||||
#define SECSPAC_ENTERMONSTER (0x00000080)
|
||||
|
||||
// When an enemy touches the ceiling of this sector.
|
||||
SECSPAC_CEILINGMONSTER = 0x00000200,
|
||||
// When an enemy touches the floor of this sector.
|
||||
#define SECSPAC_FLOORMONSTER (0x00000100)
|
||||
|
||||
// When a projectile enters this sector.
|
||||
SECSPAC_ENTERMISSILE = 0x00000400,
|
||||
// When an enemy touches the ceiling of this sector.
|
||||
#define SECSPAC_CEILINGMONSTER (0x00000200)
|
||||
|
||||
// When a projectile touches the floor of this sector.
|
||||
SECSPAC_FLOORMISSILE = 0x00000800,
|
||||
// When a projectile enters this sector.
|
||||
#define SECSPAC_ENTERMISSILE (0x00000400)
|
||||
|
||||
// When a projectile touches the ceiling of this sector.
|
||||
SECSPAC_CEILINGMISSILE = 0x00001000,
|
||||
} sectoractionflags_t;
|
||||
// When a projectile touches the floor of this sector.
|
||||
#define SECSPAC_FLOORMISSILE (0x00000800)
|
||||
|
||||
// When a projectile touches the ceiling of this sector.
|
||||
#define SECSPAC_CEILINGMISSILE (0x00001000)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -941,69 +933,68 @@ struct pic_t
|
|||
// Possible alpha types for a patch.
|
||||
typedef enum {AST_COPY, AST_TRANSLUCENT, AST_ADD, AST_SUBTRACT, AST_REVERSESUBTRACT, AST_MODULATE, AST_OVERLAY, AST_FOG} patchalphastyle_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
RF_HORIZONTALFLIP = 0x00000001, // Flip sprite horizontally
|
||||
RF_VERTICALFLIP = 0x00000002, // Flip sprite vertically
|
||||
RF_ABSOLUTEOFFSETS = 0x00000004, // Sprite uses the object's offsets absolutely, instead of relatively
|
||||
RF_FLIPOFFSETS = 0x00000008, // Relative object offsets are flipped with the sprite
|
||||
typedef int renderflags_t;
|
||||
|
||||
RF_SPLATMASK = 0x000000F0, // --Floor sprite flags
|
||||
RF_SLOPESPLAT = 0x00000010, // Rotate floor sprites by a slope
|
||||
RF_OBJECTSLOPESPLAT = 0x00000020, // Rotate floor sprites by the object's standing slope
|
||||
RF_NOSPLATBILLBOARD = 0x00000040, // Don't billboard floor sprites (faces forward from the view angle)
|
||||
RF_NOSPLATROLLANGLE = 0x00000080, // Don't rotate floor sprites by the object's rollangle (uses rotated patches instead)
|
||||
#define RF_HORIZONTALFLIP (0x00000001) // Flip sprite horizontally
|
||||
#define RF_VERTICALFLIP (0x00000002) // Flip sprite vertically
|
||||
#define RF_ABSOLUTEOFFSETS (0x00000004) // Sprite uses the object's offsets absolutely, instead of relatively
|
||||
#define RF_FLIPOFFSETS (0x00000008) // Relative object offsets are flipped with the sprite
|
||||
|
||||
RF_BRIGHTMASK = 0x00000300, // --Bright modes
|
||||
RF_FULLBRIGHT = 0x00000100, // Sprite is drawn at full brightness
|
||||
RF_FULLDARK = 0x00000200, // Sprite is drawn completely dark
|
||||
RF_SEMIBRIGHT = (RF_FULLBRIGHT | RF_FULLDARK), // between sector bright and full bright
|
||||
#define RF_SPLATMASK (0x000000F0) // --Floor sprite flags
|
||||
#define RF_SLOPESPLAT (0x00000010) // Rotate floor sprites by a slope
|
||||
#define RF_OBJECTSLOPESPLAT (0x00000020) // Rotate floor sprites by the object's standing slope
|
||||
#define RF_NOSPLATBILLBOARD (0x00000040) // Don't billboard floor sprites (faces forward from the view angle)
|
||||
#define RF_NOSPLATROLLANGLE (0x00000080) // Don't rotate floor sprites by the object's rollangle (uses rotated patches instead)
|
||||
|
||||
RF_NOCOLORMAPS = 0x00000400, // Sprite is not drawn with colormaps
|
||||
#define RF_BRIGHTMASK (0x00000300) // --Bright modes
|
||||
#define RF_FULLBRIGHT (0x00000100) // Sprite is drawn at full brightness
|
||||
#define RF_FULLDARK (0x00000200) // Sprite is drawn completely dark
|
||||
#define RF_SEMIBRIGHT (RF_FULLBRIGHT | RF_FULLDARK) // between sector bright and full bright
|
||||
|
||||
RF_ALWAYSONTOP = 0x00000800, // Sprite is drawn on top of level geometry
|
||||
#define RF_NOCOLORMAPS (0x00000400) // Sprite is not drawn with colormaps
|
||||
|
||||
RF_SPRITETYPEMASK = 0x00003000, // --Different sprite types
|
||||
RF_PAPERSPRITE = 0x00001000, // Paper sprite
|
||||
RF_FLOORSPRITE = 0x00002000, // Floor sprite
|
||||
#define RF_ALWAYSONTOP (0x00000800) // Sprite is drawn on top of level geometry
|
||||
|
||||
RF_SHADOWDRAW = 0x00004000, // Stretches and skews the sprite like a shadow.
|
||||
RF_SHADOWEFFECTS = 0x00008000, // Scales and becomes transparent like a shadow.
|
||||
RF_DROPSHADOW = (RF_SHADOWDRAW | RF_SHADOWEFFECTS | RF_FULLDARK),
|
||||
#define RF_SPRITETYPEMASK (0x00003000) // --Different sprite types
|
||||
#define RF_PAPERSPRITE (0x00001000) // Paper sprite
|
||||
#define RF_FLOORSPRITE (0x00002000) // Floor sprite
|
||||
|
||||
RF_ABSOLUTELIGHTLEVEL = 0x00010000, // mobj_t.lightlevel is absolute instead of relative
|
||||
RF_REDUCEVFX = 0x00020000, // only mobj_t.owner can see this object
|
||||
RF_HIDEINSKYBOX = 0x00040000, // do not render in skybox
|
||||
#define RF_SHADOWDRAW (0x00004000) // Stretches and skews the sprite like a shadow.
|
||||
#define RF_SHADOWEFFECTS (0x00008000) // Scales and becomes transparent like a shadow.
|
||||
#define RF_DROPSHADOW (RF_SHADOWDRAW | RF_SHADOWEFFECTS | RF_FULLDARK)
|
||||
|
||||
RF_DONTDRAW = 0x00F00000, // --Don't generate a vissprite
|
||||
RF_DONTDRAWP1 = 0x00100000, // No P1
|
||||
RF_DONTDRAWP2 = 0x00200000, // No P2
|
||||
RF_DONTDRAWP3 = 0x00400000, // No P3
|
||||
RF_DONTDRAWP4 = 0x00800000, // No P4
|
||||
#define RF_ABSOLUTELIGHTLEVEL (0x00010000) // mobj_t.lightlevel is absolute instead of relative
|
||||
#define RF_REDUCEVFX (0x00020000) // only mobj_t.owner can see this object
|
||||
#define RF_HIDEINSKYBOX (0x00040000) // do not render in skybox
|
||||
|
||||
RF_BLENDMASK = 0x07000000, // --Blending override - see patchalphastyle_t
|
||||
RF_BLENDSHIFT = (6*4),
|
||||
// minus 1 as effects don't distinguish between AST_COPY and AST_TRANSLUCENT
|
||||
RF_ADD = ((AST_ADD-1)<<RF_BLENDSHIFT),
|
||||
RF_SUBTRACT = ((AST_SUBTRACT-1)<<RF_BLENDSHIFT),
|
||||
RF_REVERSESUBTRACT = ((AST_REVERSESUBTRACT-1)<<RF_BLENDSHIFT),
|
||||
RF_MODULATE = ((AST_MODULATE-1)<<RF_BLENDSHIFT),
|
||||
RF_OVERLAY = ((AST_OVERLAY-1)<<RF_BLENDSHIFT),
|
||||
#define RF_DONTDRAW (0x00F00000) // --Don't generate a vissprite
|
||||
#define RF_DONTDRAWP1 (0x00100000) // No P1
|
||||
#define RF_DONTDRAWP2 (0x00200000) // No P2
|
||||
#define RF_DONTDRAWP3 (0x00400000) // No P3
|
||||
#define RF_DONTDRAWP4 (0x00800000) // No P4
|
||||
|
||||
RF_TRANSMASK = (INT32)0xF0000000, // --Transparency override
|
||||
RF_TRANSSHIFT = (7*4),
|
||||
RF_TRANS10 = (1<<RF_TRANSSHIFT), // 10%
|
||||
RF_TRANS20 = (2<<RF_TRANSSHIFT), // 20%
|
||||
RF_TRANS30 = (3<<RF_TRANSSHIFT), // 30%
|
||||
RF_TRANS40 = (4<<RF_TRANSSHIFT), // 40%
|
||||
RF_TRANS50 = (5<<RF_TRANSSHIFT), // 50%
|
||||
RF_TRANS60 = (6<<RF_TRANSSHIFT), // 60%
|
||||
RF_TRANS70 = (7<<RF_TRANSSHIFT), // 70%
|
||||
RF_TRANS80 = (INT32)(8U<<RF_TRANSSHIFT), // 80%
|
||||
RF_TRANS90 = (INT32)(9U<<RF_TRANSSHIFT), // 90%
|
||||
RF_GHOSTLY = (RF_TRANS80 | RF_FULLBRIGHT),
|
||||
RF_GHOSTLYMASK = (RF_TRANSMASK | RF_FULLBRIGHT),
|
||||
} renderflags_t;
|
||||
#define RF_BLENDMASK (0x07000000) // --Blending override - see patchalphastyle_t
|
||||
#define RF_BLENDSHIFT (6*4)
|
||||
// minus 1 as effects don't distinguish between AST_COPY and AST_TRANSLUCENT
|
||||
#define RF_ADD ((AST_ADD-1)<<RF_BLENDSHIFT)
|
||||
#define RF_SUBTRACT ((AST_SUBTRACT-1)<<RF_BLENDSHIFT)
|
||||
#define RF_REVERSESUBTRACT ((AST_REVERSESUBTRACT-1)<<RF_BLENDSHIFT)
|
||||
#define RF_MODULATE ((AST_MODULATE-1)<<RF_BLENDSHIFT)
|
||||
#define RF_OVERLAY ((AST_OVERLAY-1)<<RF_BLENDSHIFT)
|
||||
|
||||
#define RF_TRANSMASK ((INT32)0xF0000000) // --Transparency override
|
||||
#define RF_TRANSSHIFT (7*4)
|
||||
#define RF_TRANS10 (1<<RF_TRANSSHIFT) // 10%
|
||||
#define RF_TRANS20 (2<<RF_TRANSSHIFT) // 20%
|
||||
#define RF_TRANS30 (3<<RF_TRANSSHIFT) // 30%
|
||||
#define RF_TRANS40 (4<<RF_TRANSSHIFT) // 40%
|
||||
#define RF_TRANS50 (5<<RF_TRANSSHIFT) // 50%
|
||||
#define RF_TRANS60 (6<<RF_TRANSSHIFT) // 60%
|
||||
#define RF_TRANS70 (7<<RF_TRANSSHIFT) // 70%
|
||||
#define RF_TRANS80 ((INT32)(8U<<RF_TRANSSHIFT)) // 80%
|
||||
#define RF_TRANS90 ((INT32)(9U<<RF_TRANSSHIFT)) // 90%
|
||||
#define RF_GHOSTLY (RF_TRANS80 | RF_FULLBRIGHT)
|
||||
#define RF_GHOSTLYMASK (RF_TRANSMASK | RF_FULLBRIGHT)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1008,7 +1008,7 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
|||
vis->scale = FixedMul(vis->scale, this_scale);
|
||||
vis->scalestep = FixedMul(vis->scalestep, this_scale);
|
||||
vis->xiscale = FixedDiv(vis->xiscale,this_scale);
|
||||
vis->cut = static_cast<spritecut_e>(vis->cut | SC_ISSCALED);
|
||||
vis->cut |= SC_ISSCALED;
|
||||
}
|
||||
dc.texturemid = FixedDiv(dc.texturemid,this_scale);
|
||||
}
|
||||
|
|
@ -1246,9 +1246,9 @@ static void R_SplitSprite(vissprite_t *sprite)
|
|||
// adjust the heights.
|
||||
newsprite = static_cast<vissprite_t*>(M_Memcpy(R_NewVisSprite(), sprite, sizeof (vissprite_t)));
|
||||
|
||||
newsprite->cut = static_cast<spritecut_e>(newsprite->cut | (sprite->cut & SC_FLAGMASK));
|
||||
newsprite->cut |= sprite->cut & SC_FLAGMASK;
|
||||
|
||||
sprite->cut = static_cast<spritecut_e>(sprite->cut | SC_BOTTOM);
|
||||
sprite->cut |= SC_BOTTOM;
|
||||
sprite->gz = testheight;
|
||||
|
||||
newsprite->gzt = sprite->gz;
|
||||
|
|
@ -1258,7 +1258,7 @@ static void R_SplitSprite(vissprite_t *sprite)
|
|||
|
||||
newsprite->szt -= 8;
|
||||
|
||||
newsprite->cut = static_cast<spritecut_e>(newsprite->cut | SC_TOP);
|
||||
newsprite->cut |= SC_TOP;
|
||||
if (!(sector->lightlist[i].caster->fofflags & FOF_NOSHADE))
|
||||
{
|
||||
lightnum = (*sector->lightlist[i].lightlevel >> LIGHTSEGSHIFT);
|
||||
|
|
@ -1521,7 +1521,7 @@ static void R_ProjectDropShadow(
|
|||
shadow->sector = vis->sector;
|
||||
shadow->szt = (INT16)((centeryfrac - FixedMul(shadow->gzt - viewz, yscale))>>FRACBITS);
|
||||
shadow->sz = (INT16)((centeryfrac - FixedMul(shadow->gz - viewz, yscale))>>FRACBITS);
|
||||
shadow->cut = static_cast<spritecut_e>(SC_ISSCALED|SC_SHADOW); //check this
|
||||
shadow->cut = SC_ISSCALED|SC_SHADOW; //check this
|
||||
|
||||
shadow->startfrac = 0;
|
||||
//shadow->xiscale = 0x7ffffff0 / (shadow->xscale/2);
|
||||
|
|
@ -1966,7 +1966,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
if (rotsprite != NULL)
|
||||
{
|
||||
patch = rotsprite;
|
||||
cut = static_cast<spritecut_e>(cut | SC_ISROTATED);
|
||||
cut |= SC_ISROTATED;
|
||||
|
||||
spr_width = rotsprite->width << FRACBITS;
|
||||
spr_height = rotsprite->height << FRACBITS;
|
||||
|
|
@ -2214,7 +2214,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
fixed_t jitters = HITLAGJITTERS;
|
||||
if (R_UsingFrameInterpolation() && !paused)
|
||||
jitters += (rendertimefrac / HITLAGDIV);
|
||||
|
||||
|
||||
fixed_t mul = thing->hitlag * jitters;
|
||||
|
||||
if (leveltime & 1)
|
||||
|
|
@ -2247,7 +2247,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
dispoffset *= -1; // if it's physically behind, make sure it's ordered behind (if dispoffset > 0)
|
||||
|
||||
sortscale = linkscale; // now make sure it's linked
|
||||
cut = static_cast<spritecut_e>(cut | SC_LINKDRAW);
|
||||
cut |= SC_LINKDRAW;
|
||||
}
|
||||
else if (splat)
|
||||
{
|
||||
|
|
@ -2336,7 +2336,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
gzt = (isflipped ? (interp.z + thing->height) : interp.z) + patch->height * spriteyscale / 2;
|
||||
gz = gzt - patch->height * spriteyscale;
|
||||
|
||||
cut = static_cast<spritecut_e>(cut | SC_SHEAR);
|
||||
cut |= SC_SHEAR;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2567,11 +2567,11 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
vis->transmap = R_GetBlendTable(blendmode, trans);
|
||||
|
||||
if (R_ThingIsSemiBright(oldthing))
|
||||
vis->cut = static_cast<spritecut_e>(vis->cut | SC_SEMIBRIGHT);
|
||||
vis->cut |= SC_SEMIBRIGHT;
|
||||
else if (R_ThingIsFullBright(oldthing))
|
||||
vis->cut = static_cast<spritecut_e>(vis->cut | SC_FULLBRIGHT);
|
||||
vis->cut |= SC_FULLBRIGHT;
|
||||
else if (R_ThingIsFullDark(oldthing))
|
||||
vis->cut = static_cast<spritecut_e>(vis->cut | SC_FULLDARK);
|
||||
vis->cut |= SC_FULLDARK;
|
||||
|
||||
//
|
||||
// determine the colormap (lightlevel & special effects)
|
||||
|
|
@ -2600,9 +2600,9 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
}
|
||||
|
||||
if (vflip)
|
||||
vis->cut = static_cast<spritecut_e>(vis->cut | SC_VFLIP);
|
||||
vis->cut |= SC_VFLIP;
|
||||
if (splat)
|
||||
vis->cut = static_cast<spritecut_e>(vis->cut | SC_SPLAT); // I like ya cut g
|
||||
vis->cut |= SC_SPLAT; // I like ya cut g
|
||||
|
||||
vis->patch = patch;
|
||||
vis->bright = R_CacheSpriteBrightMap(sprinfo, frame);
|
||||
|
|
@ -3685,7 +3685,7 @@ void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, portal_t* portal)
|
|||
|
||||
if (xclip == x)
|
||||
{
|
||||
spr->cut = static_cast<spritecut_e>(spr->cut | SC_CULL); // completely skip this sprite going forward
|
||||
spr->cut |= SC_CULL; // completely skip this sprite going forward
|
||||
}
|
||||
else if (portal)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -132,31 +132,29 @@ void R_DrawMasked(maskcount_t* masks, INT32 nummasks);
|
|||
#define VISSPRITESPERCHUNK (1 << VISSPRITECHUNKBITS)
|
||||
#define VISSPRITEINDEXMASK (VISSPRITESPERCHUNK - 1)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
// actual cuts
|
||||
SC_NONE = 0,
|
||||
SC_TOP = 1,
|
||||
SC_BOTTOM = 1<<1,
|
||||
// other flags
|
||||
SC_PRECIP = 1<<2,
|
||||
SC_LINKDRAW = 1<<3,
|
||||
SC_FULLBRIGHT = 1<<4,
|
||||
SC_FULLDARK = 1<<5,
|
||||
SC_VFLIP = 1<<6,
|
||||
SC_ISSCALED = 1<<7,
|
||||
SC_ISROTATED = 1<<8,
|
||||
SC_SHADOW = 1<<9,
|
||||
SC_SHEAR = 1<<10,
|
||||
SC_SPLAT = 1<<11,
|
||||
// srb2kart
|
||||
SC_SEMIBRIGHT = 1<<12,
|
||||
SC_BBOX = 1<<13,
|
||||
SC_CULL = 1<<14,
|
||||
// masks
|
||||
SC_CUTMASK = SC_TOP|SC_BOTTOM,
|
||||
SC_FLAGMASK = ~SC_CUTMASK
|
||||
} spritecut_e;
|
||||
typedef INT32 spritecut_e;
|
||||
// actual cuts
|
||||
#define SC_NONE (0)
|
||||
#define SC_TOP (1)
|
||||
#define SC_BOTTOM (1<<1)
|
||||
// other flags
|
||||
#define SC_PRECIP (1<<2)
|
||||
#define SC_LINKDRAW (1<<3)
|
||||
#define SC_FULLBRIGHT (1<<4)
|
||||
#define SC_FULLDARK (1<<5)
|
||||
#define SC_VFLIP (1<<6)
|
||||
#define SC_ISSCALED (1<<7)
|
||||
#define SC_ISROTATED (1<<8)
|
||||
#define SC_SHADOW (1<<9)
|
||||
#define SC_SHEAR (1<<10)
|
||||
#define SC_SPLAT (1<<11)
|
||||
// srb2kart
|
||||
#define SC_SEMIBRIGHT (1<<12)
|
||||
#define SC_BBOX (1<<13)
|
||||
#define SC_CULL (1<<14)
|
||||
// masks
|
||||
#define SC_CUTMASK (SC_TOP|SC_BOTTOM)
|
||||
#define SC_FLAGMASK (~SC_CUTMASK)
|
||||
|
||||
// A vissprite_t is a thing that will be drawn during a refresh,
|
||||
// i.e. a sprite object that is partly visible.
|
||||
|
|
|
|||
|
|
@ -1024,7 +1024,7 @@ void Gl2Rhi::apply_framebuffer(const RenderPassBeginInfo& info, bool allow_clear
|
|||
|
||||
SRB2_ASSERT(texture_slab_.is_valid(info.color_attachment));
|
||||
auto& texture = texture_slab_[info.color_attachment];
|
||||
SRB2_ASSERT(texture.desc.format == TextureFormat::kRGBA);
|
||||
SRB2_ASSERT(texture.desc.format == TextureFormat::kRGBA || texture.desc.format == TextureFormat::kRGB);
|
||||
gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture.texture, 0);
|
||||
GL_ASSERT;
|
||||
|
||||
|
|
@ -1432,6 +1432,13 @@ void Gl2Rhi::set_rasterizer_state(const RasterizerStateDesc& desc)
|
|||
}
|
||||
gl_->Scissor(desc.scissor.x, desc.scissor.y, desc.scissor.w, desc.scissor.h);
|
||||
GL_ASSERT;
|
||||
|
||||
// We never use fixed func alpha test, but Legacy GL does, so it has to be turned off.
|
||||
// Note that Core profile and GLES 2+ don't have this at all.
|
||||
gl_->Disable(GL_ALPHA_TEST);
|
||||
GL_ASSERT;
|
||||
gl_->AlphaFunc(GL_ALWAYS, 0);
|
||||
GL_ASSERT;
|
||||
}
|
||||
|
||||
void Gl2Rhi::set_viewport(const Rect& rect)
|
||||
|
|
|
|||
|
|
@ -66,16 +66,14 @@ extern consvar_t cv_voice_concurrentattenuation_max;
|
|||
extern float g_local_voice_last_peak;
|
||||
extern boolean g_local_voice_detected;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SF_TOTALLYSINGLE = 1, // Only play one of these sounds at a time...GLOBALLY
|
||||
SF_NOMULTIPLESOUND = 2, // Like SF_NOINTERRUPT, but doesnt care what the origin is
|
||||
SF_OUTSIDESOUND = 4, // Volume is adjusted depending on how far away you are from 'outside'
|
||||
SF_X4AWAYSOUND = 8, // Hear it from 4x the distance away
|
||||
SF_X8AWAYSOUND = 16, // Hear it from 8x the distance away
|
||||
SF_NOINTERRUPT = 32, // Only play this sound if it isn't already playing on the origin
|
||||
SF_X2AWAYSOUND = 64, // Hear it from 2x the distance away
|
||||
} soundflags_t;
|
||||
typedef int soundflags_t;
|
||||
#define SF_TOTALLYSINGLE (1) // Only play one of these sounds at a time...GLOBALLY
|
||||
#define SF_NOMULTIPLESOUND (2) // Like SF_NOINTERRUPT, but doesnt care what the origin is
|
||||
#define SF_OUTSIDESOUND (4) // Volume is adjusted depending on how far away you are from 'outside'
|
||||
#define SF_X4AWAYSOUND (8) // Hear it from 4x the distance away
|
||||
#define SF_X8AWAYSOUND (16) // Hear it from 8x the distance away
|
||||
#define SF_NOINTERRUPT (32) // Only play this sound if it isn't already playing on the origin
|
||||
#define SF_X2AWAYSOUND (64) // Hear it from 2x the distance away
|
||||
|
||||
struct listener_t {
|
||||
fixed_t x, y, z;
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ void *hwSym(const char *funcName,void *handle)
|
|||
|
||||
GETFUNC(SetShaderInfo);
|
||||
GETFUNC(LoadCustomShader);
|
||||
GETFUNC(ResetRenderState);
|
||||
|
||||
#else //HWRENDER
|
||||
if (0 == strcmp("FinishUpdate", funcName))
|
||||
|
|
|
|||
|
|
@ -310,3 +310,12 @@ void operator delete(void* ptr) noexcept
|
|||
TracyFree(ptr);
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
// Enable high performance graphics on multi-gpu laptops, since we can't pick devices in WGL
|
||||
#ifdef _WIN32
|
||||
extern "C"
|
||||
{
|
||||
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||
__declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1321,27 +1321,6 @@ static void init_imgui()
|
|||
|
||||
static SDL_bool Impl_CreateContext(void)
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
if (!g_legacy_gl_context)
|
||||
{
|
||||
SDL_GL_ResetAttributes();
|
||||
g_legacy_gl_context = SDL_GL_CreateContext(window);
|
||||
}
|
||||
if (g_legacy_gl_context == NULL)
|
||||
{
|
||||
SDL_DestroyWindow(window);
|
||||
I_Error("Failed to create a Legacy GL context: %s\n", SDL_GetError());
|
||||
}
|
||||
init_imgui();
|
||||
SDL_GL_MakeCurrent(window, g_legacy_gl_context);
|
||||
return SDL_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
// RHI always uses OpenGL 2.0 (for now)
|
||||
|
||||
if (!sdlglcontext)
|
||||
{
|
||||
SDL_GL_ResetAttributes();
|
||||
|
|
@ -1352,11 +1331,18 @@ static SDL_bool Impl_CreateContext(void)
|
|||
if (sdlglcontext == NULL)
|
||||
{
|
||||
SDL_DestroyWindow(window);
|
||||
I_Error("Failed to create an RHI GL context: %s\n", SDL_GetError());
|
||||
I_Error("Failed to create a GL context: %s\n", SDL_GetError());
|
||||
}
|
||||
init_imgui();
|
||||
SDL_GL_MakeCurrent(window, sdlglcontext);
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
LoadGL();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!g_rhi)
|
||||
{
|
||||
std::unique_ptr<rhi::SdlGl2Platform> platform = std::make_unique<rhi::SdlGl2Platform>();
|
||||
|
|
@ -1674,6 +1660,7 @@ void VID_StartupOpenGL(void)
|
|||
|
||||
*(void**)&HWD.pfnSetShaderInfo = hwSym("SetShaderInfo",NULL);
|
||||
*(void**)&HWD.pfnLoadCustomShader = hwSym("LoadCustomShader",NULL);
|
||||
*(void**)&HWD.pfnResetRenderState = hwSym("ResetRenderState",NULL);
|
||||
glstartup = true;
|
||||
}
|
||||
|
||||
|
|
@ -1746,24 +1733,9 @@ void srb2::cvarhandler::on_set_vid_wait()
|
|||
interval = 1;
|
||||
}
|
||||
|
||||
switch (rendermode)
|
||||
if (sdlglcontext == nullptr || SDL_GL_GetCurrentContext() != sdlglcontext)
|
||||
{
|
||||
case render_soft:
|
||||
if (sdlglcontext == nullptr || SDL_GL_GetCurrentContext() != sdlglcontext)
|
||||
{
|
||||
return;
|
||||
}
|
||||
SDL_GL_SetSwapInterval(interval);
|
||||
break;
|
||||
#ifdef HWRENDER
|
||||
case render_opengl:
|
||||
if (g_legacy_gl_context == nullptr || SDL_GL_GetCurrentContext() != g_legacy_gl_context)
|
||||
{
|
||||
return;
|
||||
}
|
||||
SDL_GL_SetSwapInterval(interval);
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
return;
|
||||
}
|
||||
SDL_GL_SetSwapInterval(interval);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ PFNglGetString pglGetString;
|
|||
INT32 oglflags = 0;
|
||||
void *GLUhandle = NULL;
|
||||
SDL_GLContext sdlglcontext = 0;
|
||||
SDL_GLContext g_legacy_gl_context = 0;
|
||||
|
||||
void *GetGLFunc(const char *proc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,10 +30,13 @@ boolean OglSdlSurface(INT32 w, INT32 h);
|
|||
void OglSdlFinishUpdate(boolean vidwait);
|
||||
|
||||
extern SDL_GLContext sdlglcontext;
|
||||
extern SDL_GLContext g_legacy_gl_context;
|
||||
extern Uint16 realwidth;
|
||||
extern Uint16 realheight;
|
||||
|
||||
#ifdef HWRENDER
|
||||
boolean LoadGL(void);
|
||||
#endif
|
||||
|
||||
#ifdef _CREATE_DLL_
|
||||
EXPORT void HWRAPI( OglSdlSetPalette ) (RGBA_t *palette);
|
||||
#endif
|
||||
|
|
|
|||
183
src/v_video.cpp
183
src/v_video.cpp
|
|
@ -440,15 +440,14 @@ void V_SetPalette(INT32 palettenum)
|
|||
}
|
||||
}
|
||||
|
||||
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
|
||||
if (rendermode != render_none)
|
||||
I_SetPalette(&pLocalPalette[palettenum*256]);
|
||||
#endif
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
HWR_SetPalette(&pLocalPalette[palettenum*256]);
|
||||
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL)
|
||||
else
|
||||
#endif
|
||||
#endif
|
||||
if (rendermode != render_none)
|
||||
I_SetPalette(&pLocalPalette[palettenum*256]);
|
||||
}
|
||||
|
||||
void V_SetPaletteLump(const char *pal)
|
||||
|
|
@ -798,14 +797,6 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca
|
|||
if (rendermode == render_none)
|
||||
return;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
HWR_DrawStretchyFixedPatch(patch, x, y, pscale, vscale, scrn, colormap);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((blendmode = ((scrn & V_BLENDMASK) >> V_BLENDSHIFT)))
|
||||
blendmode++; // realign to constants
|
||||
if ((alphalevel = V_GetAlphaLevel(scrn)) >= 10)
|
||||
|
|
@ -1016,14 +1007,6 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
|||
if (rendermode == render_none)
|
||||
return;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
HWR_DrawFill(x, y, w, h, c);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
UINT32 alphalevel;
|
||||
if ((alphalevel = V_GetAlphaLevel(c)) >= 10)
|
||||
return;
|
||||
|
|
@ -1139,15 +1122,6 @@ void V_DrawFillConsoleMap(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
|
|||
if (rendermode == render_none)
|
||||
return;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
UINT32 hwcolor = V_GetHWConsBackColor();
|
||||
HWR_DrawConsoleFill(x, y, w, h, c, hwcolor); // we still use the regular color stuff but only for flags. actual draw color is "hwcolor" for this.
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((alphalevel = V_GetAlphaLevel(c)) >= 10)
|
||||
return;
|
||||
|
||||
|
|
@ -1210,14 +1184,6 @@ void V_DrawDiag(INT32 x, INT32 y, INT32 wh, INT32 c)
|
|||
if (rendermode == render_none)
|
||||
return;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
HWR_DrawDiag(x, y, wh, c);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!(c & V_NOSCALESTART))
|
||||
{
|
||||
INT32 dupx = vid.dupx, dupy = vid.dupy;
|
||||
|
|
@ -1292,15 +1258,6 @@ void V_DrawFadeFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c, UINT16 color, U
|
|||
if (rendermode == render_none)
|
||||
return;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
// ughhhhh please can someone else do this? thanks ~toast 25/7/19 in 38 degrees centigrade w/o AC
|
||||
HWR_DrawFadeFill(x, y, w, h, c, color, strength); // toast two days later - left above comment in 'cause it's funny
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!(c & V_NOSCALESTART))
|
||||
{
|
||||
INT32 dupx = vid.dupx, dupy = vid.dupy;
|
||||
|
|
@ -1380,13 +1337,6 @@ void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum)
|
|||
size_t size;
|
||||
size_t lflatsize;
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
HWR_DrawFlatFill(x, y, w, h, flatnum);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
size = W_LumpLength(flatnum);
|
||||
|
||||
switch (size)
|
||||
|
|
@ -1521,14 +1471,6 @@ void V_DrawVhsEffect(boolean rewind)
|
|||
//
|
||||
void V_DrawFadeScreen(UINT16 color, UINT8 strength)
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
HWR_FadeScreenMenuBack(color, strength);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
float r;
|
||||
float g;
|
||||
float b;
|
||||
|
|
@ -1638,13 +1580,6 @@ void V_DrawCustomFadeScreen(const char *lump, UINT8 strength)
|
|||
void V_DrawFadeConsBack(INT32 plines)
|
||||
{
|
||||
UINT32 hwcolor = V_GetHWConsBackColor();
|
||||
#ifdef HWRENDER // not win32 only 19990829 by Kin
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
HWR_DrawConsoleBack(hwcolor, plines);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
float r = ((hwcolor & 0xFF000000) >> 24) / 255.f;
|
||||
float g = ((hwcolor & 0xFF0000) >> 16) / 255.f;
|
||||
|
|
@ -1663,14 +1598,6 @@ void V_DrawFadeConsBack(INT32 plines)
|
|||
//
|
||||
void V_EncoreInvertScreen(void)
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
HWR_EncoreInvertScreen();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
g_2d.begin_quad()
|
||||
.blend(hwr2::BlendMode::kInvertDest)
|
||||
.color(1, 1, 1, 1)
|
||||
|
|
@ -1698,14 +1625,6 @@ void V_DrawPromptBack(INT32 boxheight, INT32 color)
|
|||
|
||||
UINT32 hwcolor = V_GetHWConsBackColor();
|
||||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
HWR_DrawTutorialBack(hwcolor, boxheight);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
float r = ((color & 0xFF000000) >> 24) / 255.f;
|
||||
float g = ((color & 0xFF0000) >> 16) / 255.f;
|
||||
float b = ((color & 0xFF00) >> 8) / 255.f;
|
||||
|
|
@ -3771,13 +3690,17 @@ void VID_DisplaySoftwareScreen()
|
|||
{
|
||||
ZoneScoped;
|
||||
|
||||
// TODO implement
|
||||
// upload framebuffer, bind pipeline, draw
|
||||
rhi::Rhi* rhi = srb2::sys::get_rhi(srb2::sys::g_current_rhi);
|
||||
hwr2::HardwareState* hw_state = srb2::sys::main_hardware_state();
|
||||
|
||||
// Misnomer; this just uploads the screen to the software indexed screen texture
|
||||
hw_state->software_screen_renderer->draw(*rhi);
|
||||
}
|
||||
|
||||
void VID_DisplayRHIPostimg(void)
|
||||
{
|
||||
rhi::Rhi* rhi = srb2::sys::get_rhi(srb2::sys::g_current_rhi);
|
||||
hwr2::HardwareState* hw_state = srb2::sys::main_hardware_state();
|
||||
|
||||
const int screens = std::clamp(r_splitscreen + 1, 1, MAXSPLITSCREENPLAYERS);
|
||||
hw_state->blit_postimg_screens->set_num_screens(screens);
|
||||
|
|
@ -3791,43 +3714,91 @@ void VID_DisplaySoftwareScreen()
|
|||
if (screens > 2)
|
||||
{
|
||||
uv_size = glm::vec2(.5f, .5f);
|
||||
switch (i)
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
case 0:
|
||||
uv_offset = glm::vec2(0.f, 0.f);
|
||||
break;
|
||||
case 1:
|
||||
uv_offset = glm::vec2(.5f, 0.f);
|
||||
break;
|
||||
case 2:
|
||||
uv_offset = glm::vec2(0.f, .5f);
|
||||
break;
|
||||
case 3:
|
||||
uv_offset = glm::vec2(.5f, .5f);
|
||||
break;
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
uv_offset = glm::vec2(0.f, .5f);
|
||||
break;
|
||||
case 1:
|
||||
uv_offset = glm::vec2(.5f, .5f);
|
||||
break;
|
||||
case 2:
|
||||
uv_offset = glm::vec2(0.f, 0.f);
|
||||
break;
|
||||
case 3:
|
||||
uv_offset = glm::vec2(.5f, 0.f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
uv_offset = glm::vec2(0.f, 0.f);
|
||||
break;
|
||||
case 1:
|
||||
uv_offset = glm::vec2(.5f, 0.f);
|
||||
break;
|
||||
case 2:
|
||||
uv_offset = glm::vec2(0.f, .5f);
|
||||
break;
|
||||
case 3:
|
||||
uv_offset = glm::vec2(.5f, .5f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (screens > 1)
|
||||
{
|
||||
uv_size = glm::vec2(1.f, .5f);
|
||||
if (i == 1)
|
||||
if (rendermode == render_opengl)
|
||||
{
|
||||
uv_offset = glm::vec2(0.f, .5f);
|
||||
uv_offset = glm::vec2(0.f, i == 0 ? .5f : 0.f);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i == 1)
|
||||
{
|
||||
uv_offset = glm::vec2(0.f, .5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rhi::Handle<rhi::Texture> source;
|
||||
bool indexed;
|
||||
bool vflip;
|
||||
bool mirror;
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
source = hw_state->software_screen_renderer->screen();
|
||||
indexed = true;
|
||||
vflip = postimgtype[i] == postimg_flip;
|
||||
mirror = postimgtype[i] == postimg_mirror;
|
||||
}
|
||||
else
|
||||
{
|
||||
source = hw_state->legacygl_backbuffer->color();
|
||||
indexed = false;
|
||||
// Legacy GL handles these on its own.
|
||||
vflip = true;
|
||||
mirror = false;
|
||||
}
|
||||
|
||||
hw_state->blit_postimg_screens->set_screen(
|
||||
i,
|
||||
{
|
||||
hw_state->software_screen_renderer->screen(),
|
||||
true,
|
||||
source,
|
||||
indexed,
|
||||
uv_offset,
|
||||
uv_size,
|
||||
{
|
||||
postimgtype[i] == postimg_water && !cv_reducevfx.value,
|
||||
postimgtype[i] == postimg_heat && !cv_reducevfx.value,
|
||||
postimgtype[i] == postimg_flip,
|
||||
postimgtype[i] == postimg_mirror
|
||||
vflip,
|
||||
mirror
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -442,6 +442,8 @@ void VID_BlitLinearScreen(const UINT8 *srcptr, UINT8 *destptr, INT32 width, INT3
|
|||
*/
|
||||
void VID_DisplaySoftwareScreen(void);
|
||||
|
||||
void VID_DisplayRHIPostimg(void);
|
||||
|
||||
char *V_ParseText(const char *rawText); // Launder srb2::draw::TextElement.parse() through C code!
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#define SRB2VERSION "2.4"/* this must be the first line, for cmake !! */
|
||||
#define SRB2VERSION "2.5"/* this must be the first line, for cmake !! */
|
||||
|
||||
// The Modification Version, starting from 1. Do not follow your version string for this,
|
||||
// it's only for detection of the version the player is using so the MS can alert them of an update.
|
||||
// Only set it higher, not lower, obviously.
|
||||
// Note that we use this to help keep internal testing in check; this is why v2.0 is not version "2".
|
||||
#define MODVERSION 13
|
||||
#define MODVERSION 14
|
||||
|
||||
// Define this as a prerelease version suffix
|
||||
//#define BETAVERSION "RC10"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue