Commit graph

4794 commits

Author SHA1 Message Date
Randy Heit
62ffe7e4e2 Add NOGRAVITY to every Raven actor with FLOATBOB
- Fixed: Heretic and Hexen completely skip all normal Z processing on
  mobjs with FLOATBOB set. To emulate that, we need to add NOGRAVITY to
  everything with that flag set.
2013-11-19 19:42:13 -06:00
Braden Obrzut
c7099744bd - Minor changes to the CMake since it looks like VS2005 doesn't support a few things that were added. 2013-11-11 23:56:58 -05:00
Edward Richardson
a967b05290 Improvements to restoring stalled netgames
- The waiting message is now always cleared, regardless if it needed to
be in the first place. It's a rather simple for-loop so I doubt it
matters.
- Nodes are also cleared from the list if they catch up while other
nodes are still behind.
- "lastglobalrecvtime" is now bumped after the waiting loop if a tic was
successful, rather then bumping it every time a packet was received. It
appears that you can receive a packet before the game knows it stalled,
thus stalling it anyway.
- Instead of comparing the nettics to the local node, all nodes are
tested against gametic+counts (the real reason why the game has
stopped).
- More then one node can be marked as late at any one time.
- In a packet-server game, the arbitrator is now assumed slow, rather
then testing it. There is no point, seeing as we already know the game
has stalled because of it.
2013-11-11 20:42:54 +13:00
Braden Obrzut
34457ce737 - Applied VoidMage's patch to strip color codes from system console on SDL platforms. 2013-11-06 13:42:05 -05:00
Braden Obrzut
f0b946c3cf - Allow use of system GME library. It defaults to forcing the use of the internal library at least for now though. 2013-11-06 13:37:34 -05:00
Randy Heit
ec6624dfc7 Prioritize single->double conversions for FindBestProto()
- The binary form of ZCC_OpInfoType::FindBestProto() needs special
  handling for conversion from single to double precision floating point
  so that it doesn't choose an integer form over a floating point form
  when picking the best prototype.
2013-11-01 22:05:49 -05:00
Randy Heit
3063df4f74 Add single <-> double conversions.
- With explicit casting now possible, converting from double to single
  precision floating point and back again needs to be possible, too.
2013-11-01 21:45:02 -05:00
Randy Heit
b66de4116d Remove IsUnary() and IsBinary()
- This information is already stored in the node's NodeType field, so
  there's no reason to go do a table lookup for it elsewhere. Must have
  been a brain fart when I wrote them in the first place.
2013-11-01 21:28:00 -05:00
Randy Heit
16fc9be411 Interpret function calls to type refs as type casts 2013-10-30 20:53:02 -05:00
Randy Heit
2adf5782b9 Return propertype conversion routes larger than 1
- Fixed: PType::FindConversion() gave all but the source type a distance of
  0, so it only ever returned just one step of a route that requires more
  than one step.
2013-10-30 20:52:46 -05:00
Randy Heit
39d7fa0605 Allow access to the numeric properties.
- Identifiers can now evaluate to type references.
- The dot operator can now find symbols in type references.
2013-10-29 22:06:14 -05:00
Randy Heit
e7616ec0bd Add D-style properties to the numeric types
- This is stuff like min and max for integral types and infinity and nan
  for floating point types.
2013-10-29 22:06:03 -05:00
Randy Heit
fe21ceec56 Add a constructor to PSymbolTable that takes a parent table as input 2013-10-29 22:05:56 -05:00
Randy Heit
e696fff0be Capitalize some names that weren't before.
- Since this caused several duplicate names to creep in, try to be more
  consistant abount name capitalization.
2013-10-29 22:05:49 -05:00
Randy Heit
6c7788d2ad Make global symbols survive GC runs
- The global symbol table was never marked by the GC, so anything pointed
  only by it was fair game to disappear.
- Don't clear the global symbol table during DECORATE parsing. Junk in
  there should be considered constant after initialization.
2013-10-29 22:05:43 -05:00
Randy Heit
61b419c187 Remove duplicated names from namedef.h
- Added an assertion in FName::NameManager::InitBuckets() that makes these
  errors easier to spot in the future.
2013-10-29 22:05:32 -05:00
Randy Heit
82c22459dc Give all types a symbol table, not just structs and derivatives 2013-10-29 22:05:25 -05:00
Randy Heit
b227a2f508 Add the basic types to the global symbol table 2013-10-29 22:05:16 -05:00
Randy Heit
03c4244fd8 Accept only one identifier for class names. 2013-10-29 22:05:09 -05:00
Randy Heit
2b96db5fac Do not share constant 1 for enum autoincrements.
- AST nodes cannot be shared, because type conversion changes them in
  place, and what's appropriate for one use is by no means appropriate for
  all uses.
2013-10-25 22:30:25 -05:00
Randy Heit
6384613487 Allow using constants in other constants before their definitions.
- Something like this is now valid:
    const foo = bar + 10;
    const bar = 1000;
2013-10-25 22:30:25 -05:00
Randy Heit
76d2e8cfc4 Set node type when nil-ing an id node.
- Nodes can't stay as type AST_ExprID if they don't also have the
  operation PEX_ID.
2013-10-25 22:30:25 -05:00
Randy Heit
850055a766 Add evaluation of constant unary and binary expressions
- Added ZCCCompiler class as a place to generate IR and symbols from an
  AST. Right now, all it does is simplify constant expressions into
  constant values.
- Do type promotion on the AST where appropriate.
- Added true and false tokens to the parser driver.
2013-10-25 22:30:24 -05:00
Randy Heit
d0968af9a6 Separate the AST from the parser state. 2013-10-25 22:30:24 -05:00
Randy Heit
dbc9fd6c0e Pad PSymbolConstNumeric to ensure it's the same size as PSymbolConstString 2013-10-25 22:30:12 -05:00
Randy Heit
c7e817dfb9 Added type conversion search routines
- PType::FindConversion() can find a path to convert one type to another.
  This is completely generic and can handle any number of conversion
  functions.
2013-10-23 22:39:51 -05:00
Braden Obrzut
7dbf4ec38f - Slight cleanup and I accidentally inverted the map generation flag. 2013-10-12 01:58:39 -04:00
Braden Obrzut
0759a4b438 - Actually, lets not use /Gm since it's incompatible with /MP which will be much faster on multi-core machines.
- Added ZDOOM_GENERATE_MAPFILE which enables linker map file generation.
2013-10-12 01:44:57 -04:00
Braden Obrzut
03b75ae7c1 - Fixed a few flags for Visual Studio compilation. 2013-10-12 00:56:49 -04:00
Braden Obrzut
3e90b65014 - Use release compiler flags for debug builds of third party libraries. 2013-10-12 00:24:04 -04:00
Braden Obrzut
b9a1528747 - DYN_FLUIDSYNTH now defaults to ON.
- Added ZDOOM_OUTPUT_OLDSTYLE (could probably use a more descriptive name) which causes CMake to vary the executable name by build type and place the exes and pk3s into the directory specified in ZDOOM_OUTPUT_DIR.
- ALL_BUILD will now launch ZDoom.
2013-10-10 17:40:15 -07:00
Randy Heit
d76dbcaa9d Merge branch 'maint' 2013-10-09 22:33:58 -05:00
Randy Heit
02514dc9b2 - Fixed: AFSwordMissile::DoSpecialDamage had a unique prototype
so it would never actually be called.
2013-10-09 22:32:52 -05:00
Randy Heit
637798c1b5 Add handling for +warp at the command line.
- Command-line console commands are executed before a level is entered, so
  trying to use +warp to position yourself at a specific location will not
  work. We now specially handle this command so that it does work.
2013-10-09 22:15:11 -05:00
Randy Heit
1f723c10ae Add CF_INTERPVIEW for players.
- Added CF_INTERPVIEW flag for players. A_SetPitch/A_SetAngle and the
  similar ACS APROPs set this when changing an angle. This forces the
  renderer to interpolate the view angles instead of updating with the
  latest mouse positions. The effect lasts one tick.
2013-10-09 21:50:24 -05:00
Randy Heit
c2bac9d2df Add WorldPanning flag for camera texture definitions.
- To make camera textures pan in world units instead of texture units, you
  can now add "WorldPanning" at the end of the cameratexture definition in
  ANIMDEFS, after the "fit" specification. e.g.

    cameratexture CAMTEX 128 128 fit 64 64 worldpanning
2013-10-09 21:29:28 -05:00
Christoph Oelckers
03f19a12fa Merge branch 'maint' 2013-10-09 12:52:33 +02:00
Christoph Oelckers
8170cfbf98 - added my own FMOD path to CMakeLists.txt so that I can use it to create VC++ 2010 files with it. 2013-10-09 12:52:07 +02:00
Randy Heit
242f2ab7b0 Merge branch 'maint' 2013-10-08 21:51:51 -05:00
Randy Heit
0c9c624e8c Do not follow NextThinker links in DestroyThinkersInList
- Fixed: DThinker::Destroy(Most)ThinkersInList() were unreliable when
  destroyed thinkers destroyed more thinkers in the same list.
  Specifically, if the thinker it destroyed caused the very next thinker
  in the list to also be destroyed, it would get lost in the thinker list
  and end up with a NULL node. So just keep iterating through the first
  thinker in the list until there are none left. Since destroying a
  thinker causes it to remove itself from its list, the first thinker will
  always be changing as long as there's something to destroy.
2013-10-08 21:32:26 -05:00
Randy Heit
3c376aa342 Move C_ExecCmdLineParams() call slightly later in the startup process.
- Fixed: You could not set any CVARINFO-defined cvars from the command line
  because command line console commands were executed before wads were
  even loaded. Off the top of my head, I can't think of anything that would\
  break by having them get executed after wads are loaded.
2013-10-08 20:18:35 -05:00
Randy Heit
d558cf51a9 - Fixed: ABackpackItem::CreateTossable did not check for failure from the supermethod. 2013-10-08 19:59:46 -05:00
Braden Obrzut
4ced90756a - Let CMake know about noncompiled cpp files so they can appear in project files.
- Fixed: Somehow when I added a way to disable generator expressions I inverted the meaning of NO_GENERATOR_EXPRESSIONS.
2013-10-08 15:35:50 -04:00
Christoph Oelckers
eb186a5b92 Merge branch 'maint' 2013-10-07 11:58:53 +02:00
Christoph Oelckers
c4d2a021b0 - fixed: AInventory::BecomePickup must not restore the MF_COUNTITEM flag when transforming the inventory item into a pickup again. 2013-10-07 11:53:58 +02:00
Braden Obrzut
f386d6b1e3 - Embed the proper manifest file and group soure files when building Visual Studio projects with CMake. (The groups probably also apply to other project types as well.) 2013-10-06 14:37:51 -04:00
Randy Heit
4bd5bf310b Do not use GT, GTEQ, or NEQ operators in the AST.
- Since the VM doesn't directly support the GT, GTEQ, and NEQ comparisons,
  don't use them in the trees either. Instead, wrap them as LTEQ, LT, and
  EQEQ inside a BoolNot operator.
2013-10-02 23:28:06 -05:00
Braden Obrzut
ffae34c5fd - Changed the new default alignment keyword for drawimage from topleft to none in order to allow a potential topleft without image offsets. 2013-09-30 20:02:05 -04:00
Randy Heit
a0dbcb5d5b Add TRUE and FALSE terminals to the zcc grammar
- I can't believe I completely forgot to let the parser handle true and
  false literals.
- Consolidate all the %include blocks in zcc-parse.lemon into a single
  one, because Lemon all of a sudden decided it didn't like me having more
  than one in the grammar file.
- Added a PBool type to represent boolean values with.
2013-09-28 21:16:44 -05:00
Randy Heit
1948642758 Add Printf extension %H
- This conversion has behavior similar to %g: It automatically behaves like
  %f or %e based on the number of output characters. However, unlike %g,
  this decision is also based on what will produce the smallest string
  without truncating the output. The precision field (the * in %.*f) is
  ignored. Converting a double to text with %H and then back to a double
  should be lossless.
2013-09-25 20:46:45 -05:00