Commit Graph

3821 Commits

Author SHA1 Message Date
Randy Heit cf87d0f1e9 Use PFunction instead of PSymbolActionFunction in DECORATE parser 2013-08-14 22:00:16 -05:00
Randy Heit aba691ad72 Implement NewClassPointer() 2013-08-14 21:59:10 -05:00
Randy Heit 8fbb4b90fb Add some flags for PFunction 2013-08-14 21:56:21 -05:00
Randy Heit ed1c22186f Add PStatePointer type 2013-08-14 21:53:03 -05:00
Randy Heit 55bec365e8 Added a way to specify paramater flags for PFunction
- And right now, the only flag is "Optional".
2013-08-10 20:24:12 -05:00
Randy Heit 973b0f5c56 Change PFunction's superclass from PNamedType to PSymbol 2013-08-10 20:17:55 -05:00
Randy Heit 6575499f37 Added basic implementation for PField.
- I don't know why this didn't give me trouble before, but I needed to add IMPLEMENT_CLASS for PField.
2013-08-10 20:17:29 -05:00
Randy Heit 3e46e6376c Added NewPrototype() function 2013-08-10 20:06:54 -05:00
Randy Heit f18c7b8959 Make FType::Hash work for PPrototype
- For Prototypes, Hash is passed the address of two TArrays. If we blindly
  hash those without checking their contents, then we can forget about
  ever finding any matching prototypes in the type table. (Not that I
  remember why I wanted them to be unique, but I'm sure I must have had my
  reasons.)
2013-08-10 20:05:42 -05:00
Randy Heit 93cbdd37a5 PArray's size should take alignment into account. 2013-08-08 22:27:40 -05:00
Randy Heit 6c1f3a1396 Added PStruct::AddField() 2013-08-08 22:27:40 -05:00
Randy Heit 476a98652c Remove extraneous PField class
- Remove the existing PField class, rename PMemberField to PField, and
  derive it from PSymbol instead of the old PField.
2013-08-08 22:27:39 -05:00
Randy Heit 7e24f6b00c - Added NewStruct() function. 2013-08-08 22:27:39 -05:00
Randy Heit 0ec33191aa - Added NewEnum() function. 2013-08-08 22:27:39 -05:00
Randy Heit 12a312b6b4 - Fixed: NewArray returned the element type, not the array type. 2013-08-08 22:27:38 -05:00
Randy Heit dbaf72772b Move the symbol table from PClass to PStruct. 2013-08-08 22:27:38 -05:00
Randy Heit 91207ed3f4 Update lemon.c to August 2012 version from SQLite.
- Add a missing check for out-of-memory in the lemon code generator.
- Fix a total unimportant file descriptor leak in lemon. This is to silence warning messages.
- Fix a bug in lemon in computation of which non-terminals can generate an empty string. This bug and the fix make absolutely no difference for the grammar used by SQLite, but it can make a difference when lemon is used in other grammars.
- In Lemon, when comparing the output to the *.h file to see if it has changed, make sure that the proposed new output and the preexisting output are the same size before deciding that they are the same.
2013-08-02 22:17:32 -05:00
Randy Heit 11b588de4a Add names for fallback tokens.
- Fixed: When falling back to the IDENTIFIER token, the identifier it
  would get was undefined, because it never got initialized.
2013-08-02 21:54:50 -05:00
Randy Heit 5cc8a9c2a7 Remove redundant Resolves
- ParseExpression() calls Resolve() on the FxExpression before returing
  it, so there's no need to immediately Resolve() what it returns.
2013-08-02 21:19:05 -05:00
Randy Heit 4f528e3832 Remove lax from FCompileContext
- It's always set to true these days, so let's get rid of it.
2013-08-02 21:13:40 -05:00
Randy Heit 09c902ce55 Remove isconst from FCompileContext.
- It's not used anymore, so keeping it around is pointless.
2013-08-02 21:09:49 -05:00
Randy Heit 58f088c1ab Remove FxExpression::EvalExpression() entirely
- For the purposes of getting constant values from expressions, the only
  class where Resolve doesn't duplicate the functionality of
  EvalExpression was FxConstant. So, every other class has had its
  EvalExpression taken away, and FxConstant has had it renamed to GetValue.
2013-07-30 22:52:27 -05:00
Randy Heit c810b4d724 Use new degree FLOPs for DECORATE expressions.
- Now that the VM supports degrees, use those instructions when emitting
  code for cos and sin DECORATE expressions. (This looks like it also
  fixed a bug where sqrt also did the degree to radian conversion.)
2013-07-28 20:31:23 -05:00
Randy Heit ff7b1f6e5e Add degree variants of FLOP operations
- Added versions of the trig operations supported by FLOP that can work
  with degrees directly instead of radians.
- Reorder FLOPs into more sensible groupings.
2013-07-28 20:22:47 -05:00
Randy Heit 0468b1f9ce Delete default expressions for action definitions
- After StateParams was removed in commit 4a1fbdb, the expressions for
  default paramaters that ParseActionDef() created went nowhere and were
  lost. Properly throw them away by deleting them as soon as they've been
  parsed.
2013-07-28 20:05:07 -05:00
Randy Heit 241622300e Removed some EvalExpression implementations
- Removed EvalExpression() implementations from some subclasses of
  FxExpression that don't make any sense in the context of evaluating a
  constant value.
2013-07-28 19:40:48 -05:00
Randy Heit 2c24e7f9c6 Remove self pointer from FxExpression::EvalExpression()
- Every place that calls this now (which are all in thingdef_parse.cpp)
  passed NULL for the self pointer, so it was superfluous to have around.
2013-07-28 19:28:14 -05:00
Christoph Oelckers 909ec2e35a Merge branch 'maint' into scripting 2013-07-28 10:47:17 +02:00
Christoph Oelckers 775ecdeebb - fall back to drawing triangles on automap when encountering actors with non-displayable sprites 2013-07-28 10:14:46 +02:00
Randy Heit 4a1fbdb32a Remove all state expression/param stuff
- This all became vestigial code after the relevant information was all
  moved into FStateTempCall. Now that the MBF code pointer code has been
  converted, I can be sure it wasn't still used anywhere.
2013-07-27 22:34:44 -05:00
Randy Heit 9485752b55 Reimplement MBF code pointer parameters
- Where the old code mucked about with parameter lists to convert misc1
  and misc2 values to action function parameters, we now create new script
  functions using a VMFunctionBuilder to pass the parameters to an action
  function. This code is completely untested, as I have no BEX patches to
  test it with, but at least it compiles without error.
2013-07-27 22:07:37 -05:00
Randy Heit 6cf0916f72 Use VMFunctionBuilder::EmitParamInt in thingdef_expression.cpp 2013-07-27 22:06:14 -05:00
Randy Heit 0603295822 Added EmitParamInt to VMFunctionBuilder 2013-07-27 22:06:14 -05:00
Randy Heit 57bb9c2f7a Better disassembly of FLOP instructions.
- Annotate FLOP instructions with the name of the floating point operation
  indicated by the C field.
2013-07-25 22:29:59 -05:00
Randy Heit 070c0a9e30 Stop leaking function damage expressions.
- Function damage expressions parsed from DECORATE are now stored in a
  single array and deleted at the end of FinishThingdef().
2013-07-25 21:42:30 -05:00
Randy Heit e3e32d7cca Added DeleteAndClear method to TDeletingArray.
- Normally, TDeletingArray only deletes its contents when it is destroyed.
  Now you can do it earlier if you want.
2013-07-25 21:41:18 -05:00
Christoph Oelckers 992ba0bbf4 - added handling of MF3_FOILINVUL for A_BFGSpray. This function needs special treatment because the shooting player is considered the inflictor of the spray damage. 2013-07-26 00:52:12 +02:00
Christoph Oelckers 897a17309b - added menu option for sprite display on automap. 2013-07-25 17:22:45 +02:00
Christoph Oelckers 7006df8d96 - fixed sprite rotation in automap submission 2013-07-25 17:19:36 +02:00
Christoph Oelckers 9ed829c3af Merge branch 'map_sprites' of https://github.com/alexey-lysiuk/gzdoom 2013-07-25 16:39:53 +02:00
Christoph Oelckers 81cf5f8d38 Merge branch 'maint' 2013-07-25 16:39:32 +02:00
alexey.lysiuk 76e1e87456 + things as sprites on map, controlled with am_showthingsprites CVAR
drawing of sprites instead of things/players markers with am_cheat >= 2
possible am_showthingsprites values are:
0 - sprites disabled
1 - static front sprites
2 - animated front sprites
3 - animated sprites with actual things angles
2013-07-25 17:01:07 +03:00
Christoph Oelckers 6dd956c0dc - fixed: Speaker names in dialogues were not able to use the string table. 2013-07-25 15:58:47 +02:00
Randy Heit f6bbd5abf7 Simplify AST dumps.
- More forced line breaks.
- Don't use extra parentheses in places where it can still be unambiguous
  without them.
- Don't print the UserType for basic-types that aren't ZCC_UserType.
2013-07-24 21:35:02 -05:00
Randy Heit 7d304a4cb6 Partially revert commit 46c0127
- Being able to omit optional function arguments is not such a nonsensical
  thing after all. However, the previous grammar was still inadequate for
  representing this in a useful way.
2013-07-24 20:59:29 -05:00
Christoph Oelckers cf3d1aa2e3 Merge branch 'maint' 2013-07-24 23:10:32 +02:00
Christoph Oelckers cbc0b70e7c - TransferStencilColor A_SpawnItemEx patch / by Ryan Cordell. 2013-07-24 20:15:17 +02:00
Randy Heit 9c86f1c220 Merge branch 'master' into scripting for plugged userinfo memory leak
Conflicts:
	src/d_player.h
	src/p_interaction.cpp
	src/thingdef/thingdef_codeptr.cpp
2013-07-23 21:01:13 -05:00
Randy Heit a136ca65ea Allow functions without parameters
- Fixed: Trying to define a function without any parameters would silently
  discard the function, because the declarator tested FuncParams instead
  of FuncName to decide if it was a function.
2013-07-23 20:43:15 -05:00
Randy Heit 67caf3303b Add the array size to ZCC_VarName 2013-07-23 19:59:47 -05:00