Commit graph

58 commits

Author SHA1 Message Date
Braden Obrzut
e8731c7571 - Added support for Eternity's JUMP table and PCD_GOTOSTACK (again, requires advanced compiler).
SVN r3990 (trunk)
2012-12-20 04:17:18 +00:00
Randy Heit
e398957a4c - Added cybermind's HUD message clipping patch, with numerous changes. There is a new flag
and two new functions, both of which are intended for use in conjunction with SetHUDSize:
  * SetHUDClipRect(x, y, width, height[, wrapwidth]) - Set the clipping rectangle for future
    HUD messages. If you do not specify <wrapwidth>, the HUD message will be layed out as
    normal, but pixels outside the rectangle will not be drawn. If you specify <wrapwidth>,
    then the message will be wrapped to that width. Use SetHUDClipRect(0, 0, 0, 0[, 0]) to
    reset everything
    back to normal.
  * SetHUDWrapWidth(wrapwidth) - Sets the wrapping width for future HUD messages without
    altering the clipping rectangle. If you set the wrapping width to 0, messages will wrap
    to the full width of the HUD, as normal.
  * HUDMSG_NOWRAP - A HUDMessage() flag that disables wrapping for one message. It is
    functionally equivalent to SetHUDWrapWidth(0x7FFFFFFF), except that it only affects the
    message it's attached to.

SVN r3960 (trunk)
2012-11-10 03:18:52 +00:00
Braden Obrzut
441f633983 - Moved Sqrt, FixedSqrt, and VectorLength to ACSF_ instead of adding new opcodes.
SVN r3888 (trunk)
2012-10-13 22:55:44 +00:00
Randy Heit
924cd3ef38 - Added sqrt, fixedsqrt, and vectorlength to ACS.
SVN r3883 (trunk)
2012-10-11 03:38:12 +00:00
Randy Heit
864fb5798e - Added desaturated translation support to ACS.
SVN r3878 (trunk)
2012-09-20 02:14:43 +00:00
Randy Heit
8a021c4b4b - Added PLAYERINFO_FOV and PLAYERINFO_DESIREDFOV for use with GetPlayerInfo. PLAYERINFO_FOV is
the player's current FOV, and PLAYERINFO_DESIREDFOV is the FOV that was set with the fov
  console command.

SVN r3835 (trunk)
2012-08-22 22:09:17 +00:00
Randy Heit
616672237d - Added PCD_SCRIPTWAITNAMED p-code.
SVN r3756 (trunk)
2012-07-11 04:00:04 +00:00
Braden Obrzut
439b60ae68 - Added support for Eternity Engine's function pointer ACS instructions. (Note that an alternative ACS compiler is necessary to use these instructions properly.)
SVN r3731 (trunk)
2012-07-03 01:24:52 +00:00
Randy Heit
e93029a42a - Make CheckActorFloorTexture and CheckActorCeilingTexture aware of 3D-floors.
SVN r3454 (trunk)
2012-03-18 02:44:46 +00:00
Randy Heit
ba2e8b2461 - Fixed: Old-style ACS has the string table record offsets from the start of the object file to
the strings, not from the start of the string table, so UnescapeStringTable() needs to be
  told where the offsets are based.

SVN r3436 (trunk)
2012-03-15 19:08:19 +00:00
Randy Heit
e5e1ee00a6 - Handle ACS string escape sequences at load time rather than print time.
- Fixed: FBehavior::FindStringInChunk() was not big-endian safe.
- Fixed: FBehavior::LookupString() was not big-endian safe.

SVN r3406 (trunk)
2012-03-08 21:37:34 +00:00
Randy Heit
5f88d2c9f0 - All ACS debugging messages are now aware of named scripts.
- Identify script types by name in FBehavior::StaticStartTypedScripts().

SVN r3405 (trunk)
2012-03-08 20:48:53 +00:00
Randy Heit
1e21ebad5d - Let puke and pukename take up to four script parameters.
- Pass ACS_ExecuteWithResult's fifth argument as a fourth script parameter.
- Simplify P_StartScript()'s usage.

SVN r3394 (trunk)
2012-02-26 03:36:05 +00:00
Randy Heit
87f23f6d38 - Use a signed integer for the script number when loading the transitional ACS binary format
in order to be congruent with the present-day binary format.

SVN r3388 (trunk)
2012-02-26 02:10:32 +00:00
Randy Heit
cbf7162e16 - Allow for using ACS_NamedExecute and friends with SetLineSpecial.
SVN r3371 (trunk)
2012-02-18 02:17:33 +00:00
Randy Heit
9ffb4c40ac - Added support for loading named ACS scripts. You can't run them directly at the moment, but
you can still use them for automatically executed script types (like open and enter).
- Change the DACSThinker::RunningScripts array into a TMap so that it can catalog the new range
  of ACS scripts (up to 32767).


SVN r3359 (trunk)
2012-02-15 02:18:30 +00:00
Christoph Oelckers
163301dcd5 - took all includes of farchive.h out of headers. This file will have to be included explicitly in each source file that needs it.
SVN r3259 (trunk)
2011-07-06 14:20:54 +00:00
Christoph Oelckers
17ed7aaabd - moved the code from r_data.cpp to some better fitting places and deleted this file and r_data.h because the remaining parts of it were just a random collection of unrelated functions.
SVN r3248 (trunk)
2011-07-05 10:02:38 +00:00
Christoph Oelckers
74ad869e62 - ZDoom implementation of strcpy, submitted by FDARI.
SVN r3227 (trunk)
2011-06-13 09:14:02 +00:00
Christoph Oelckers
4264b05e79 - added FDARI's ACS savestring submission.
SVN r3204 (trunk)
2011-05-11 22:29:49 +00:00
Randy Heit
34d8212d64 - Changed G_ChangeLevel()'s parameter list to match the ACS version's.
- Added resethealth to complement resetinventory.

SVN r2377 (trunk)
2010-06-18 03:35:41 +00:00
Christoph Oelckers
385350efae - Fixed: A_SorcOffense2 depended on args being bytes and overflowing.
- Fixed: Even though P_DamageMobj checked an attack's originator
  for MF2_NODMGTHRUST the same check was missing from P_RadiusAttack.
- Fixed: A_MinotaurRoam should not assume without check that it was
  called by a MinotaurFriend.
- Fixed: The Minotaur declared A_MntrFloorFire which it did not use.
- Fixed: All Spawnspot functions did not check for a spot tid of 0 as
  the script's activator.
- Fixed: Friendly monsters ignored team association of their owning
  players.


SVN r1770 (trunk)
2009-08-12 18:57:31 +00:00
Christoph Oelckers
33249ff833 - Added Gez's CheckActorProperty submission.
SVN r1709 (trunk)
2009-07-05 05:56:20 +00:00
Christoph Oelckers
d30e304a7f - Added MF6_FORCEPAIN flag that forces the target to go into the pain state
regardless of pain chance.
- Changed screenblocks CVAR to be settable per game.
- Added SpawnSpotForced and SpawnSpotFacingForced ACS functions.
- Added pushfactor actor property.


SVN r1638 (trunk)
2009-06-05 21:44:34 +00:00
Christoph Oelckers
571d28281b - Added handling for UDMF user keys.
- Added support for ACS functions that can be defined without recompiling ACC.
- Fixed: The short lump name for embedded files must be cleared so that they
  are not found by a normal lump search.
- Added AProp_Notarget actor property.
- Fixed: TraceBleed was missing a NULL pointer check,
- Fixed: P_RandomChaseDir could crash for friendly monsters that belong to
  a player which left the game.
- Changed A_PodGrow so that it plays the generator's attack sound instead of
  "misc/podgrow".


SVN r1575 (trunk)
2009-05-11 21:05:40 +00:00
Christoph Oelckers
4bcd3faef8 - moved all code related to global ACS variables to p_acs.cpp where it belongs.
- fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew.
- merged MAPINFO branch back into trunk.

SVN r1393 (trunk)
2009-02-03 19:11:43 +00:00
Randy Heit
238de9cda1 - Added binary (b) and hexadecimal (x) cast types for ACS's various print
statements.
- Added ClassifyActor(tid) ACS builtin function. This takes a TID and returns
  a set of bits describing the actor. If TID is 0, it returns information
  about the activator. If there is more than one actor with the given TID,
  only the first one is considered. Currently defined bits are:
    ACTOR_NONE         No actors with this TID exist (only when TID is not 0).
    ACTOR_WORLD        Activator is the world (only when TID is 0).
    ACTOR_PLAYER       Actor is a player (includes bots and voodoo dolls).
    ACTOR_BOT          Actor is a bot.
    ACTOR_VOODOODOLL   Actor is a voodoo doll.
    ACTOR_MONSTER      Actor is a monster.
    ACTOR_ALIVE        Actor is alive (players/monsters only).
    ACTOR_DEAD         Actor is dead (players/monsters only).
    ACTOR_MISSILE      Actor is a missile.
    ACTOR_GENERIC      Actor exists, but no further information is available.


SVN r1310 (trunk)
2008-12-07 03:55:49 +00:00
Christoph Oelckers
760f70d3f1 - Changed compilation for g_doom, g_heretic, g_hexen and g_strife folders
so that all files are included by a central one instead of compiling 
  each one separately. This speeds up the compilation process by 25%
  when doing a complete rebuild in Visual C.
- Cleaned up more header dependencies.

SVN r1226 (trunk)
2008-09-15 14:11:05 +00:00
Randy Heit
5cd4604f81 - Added GetPlayerInput() for examining a player's inputs from ACS. Most
buttons are now passed across the network, and there are four new user
  buttons specifically for use with this command. Also defined +zoom
  and +reload for future implementation.

  See http://zdoom.org/files/examples/playerinput.zip for an example.


SVN r1215 (trunk)
2008-09-13 02:55:45 +00:00
Christoph Oelckers
ab6b5e337e - Reworked a few options that previously depended on LEVEL_HEXENFORMAT
(actors being forced to the ground by instantly moving sectors, strife
  railing handling and shooting lines with a non-zero but unassigned tag.)
  With UDMF such semantics have to be handled diffently. 
- finalized UDMF 1.0 implementation.
- Added Martin Howe's latest morph update.


SVN r987 (trunk)
2008-05-22 19:35:38 +00:00
Christoph Oelckers
99b2fab410 - Added submission for ACS CheckPlayerCamera ACS function.
- Removed FRadiusThingsIterator after discovering that VC++ misoptimized
  it in P_CheckPosition. Now FBlockThingsIterator is used with the distance
  check being done manually. 

SVN r914 (trunk)
2008-04-15 10:04:41 +00:00
Christoph Oelckers
82a6d0b44c - Added Karate Chris's ThingCountSector submission.
SVN r830 (trunk)
2008-03-21 12:25:45 +00:00
Christoph Oelckers
5b9073add4 - Added copyright/license headers to a few files.
- Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the
  proper object type.
- Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo.
- Removed dobject.err from the repository. It only contained a list of compiler
  errors for some very old version of dobject.cpp.
- Fixed: A_JumpIfCloser was missing a z-check.
- Added Blzut3's SBARINFO update #13:
- Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp
- Rewrote the mug shot system for SBarInfo to allow for scripting and custom
  states for different means of death.
- SBarInfo now loads all SBarInfo lumps instead of just the last one.  Clashing
  status bar definitions will now be cleared before the bar is read.
- Fixed: When using transparency with bars the new drawing method (bg over fg)
  didn't work.  In the case that the border value is set to 0 it will revert to
  the old method (fg over bg).
- Fixed: drawbar lost any high res information it was given.
- Added: ACS command SetMugShotState(str state) which sets the mug shot state
  for the activating player.
- Added: keepoffsets flag to drawbar.  When set the offsets in the fg image will
  also be applied when displaying the bar.


SVN r812 (trunk)
2008-03-19 09:53:23 +00:00
Randy Heit
6715b84d0d - Fixed: DACSThinker::ActiveThinker was missing a read barrier.
- Loading a save game now initiates a collection.
- Added a finalization cost to the sweep stage.


SVN r801 (trunk)
2008-03-13 03:14:33 +00:00
Randy Heit
f2660dc336 - Merged the GC branch back into the trunk, so now it can receive more
testing from the people who download SVN trunk builds.

SVN r795 (trunk)
2008-03-12 02:56:11 +00:00
Christoph Oelckers
5589f6b7a1 - fixed: A_CountdownArg used 0 based indices although all uses of it assumed
it is 1-based.
- added MF5_DONTRIP flag.
- added CheckActorFloorTexture, CheckActorCeilingTexture and
  GetActorLightLevel ACS functions.
- added IF_ADDITIVETIME flag to create powerups that add their duration
  to the one of the currently active item of the same type.
- fixed: bouncecount wasn't decreased when bouncing on walls.
- Added MF5_ALWAYSRESPAWN and MF5_NEVERRESPAWN flags that selectively
  enable or disable monster respawning regardless of skill setting.
- Prettified deprecated flag handling.


SVN r780 (trunk)
2008-03-01 16:59:17 +00:00
Randy Heit
2e5257d347 - Added the ACS script type "return". These are executed by players who return
to a map they've previously been to. This is analagous to enter scripts, but
  whereas enter scripts execute only the first time a player enters a map,
  return scripts execute all but the first time.
- Improved map scrolling when rotation is on and follow mode is off.


SVN r742 (trunk)
2008-02-13 02:29:49 +00:00
Christoph Oelckers
671cf5a888 - added UseInventory/UseActorInventory ACS functions.
SVN r636 (trunk)
2007-12-25 08:44:13 +00:00
Randy Heit
490742cf46 - Moved the implementation for the Thing_Damage special into another function
so that I can create the ACS function Thing_Damage2. It's exactly the same as
  Thing_Damage, except the damage type is specified by name. When I did this,
  I noticed that it didn't do anything useful for a TID of 0, so I made it
  affect the activator in that case.
- Added a new SetActorState ACS function:
    int SetActorState (int tid, str statename, optional bool exact);
  If tid is 0, it affects the script activator, otherwise it affects all the
  matching actors. Statename is the name of the state you want to put the
  actor in. The final parameter, exact, specifies whether or not partial
  state name matches are accepted. If you don't specify it or set it to
  false, if you try to do something like:
    SetActorState (0, "Foo.Bar");
  And the actor has a Foo state but no Foo.Bar state, it will enter the Foo
  state. If you set exact to true:
    SetActorState (0, "Foo.Bar", true);
  Then the actor must have a Foo.Bar state, or it will not change state at
  all, even if it has a Foo state.
  The return value for this function is the number of actors that successfully
  changed state. Note that you should refrain from using this function to
  enter special states such as Death, or unpredictable results could occur.


SVN r505 (trunk)
2007-03-23 22:26:14 +00:00
Christoph Oelckers
d26824e5d1 - Fixed: In the Doom2 cast finale it was impossible to toggle the console.
- Added APROP_Friendly actor property for ACS.
- Added a new flag, MF2_DONTREFLECT that prevents missiles from being reflected.
- Fixed: ALoreShot::DoSpecialDamage must check whether the shooter is still
  present. If it had been removed before the projectile hits its target
  a crash could occur.
- Fixed: GetPlayerInfo was missing breaks and always returned 0 as a result.
- Added Grubber's submission for printing key bindings in ACS.


SVN r491 (trunk)
2007-02-24 12:09:36 +00:00
Christoph Oelckers
f6f15ba764 - Added a check to P_CheckMissileSpawn to decrease the monster counter
if it was called for spawning a monster with A_CustomMissile.
- Added a ML_BLOCK_PLAYERS line flag.


SVN r380 (trunk)
2006-11-10 12:13:37 +00:00
Christoph Oelckers
0d5e3cf97e - Added MF5_PIERCEARMOR flag that allows damaging objects that aren't
affected by armor.
- Added an unfreeze CCMD so that frozen players can be unfrozen for testing.
- Added special death states for projectiles hitting actors.
- Added ACS SetActorPitch/GetActorPitch functions.
- Added cameraheight property for actors.


SVN r359 (trunk)
2006-10-22 10:32:41 +00:00
Christoph Oelckers
92c3a89255 - Fixed: PrintAlias passed FString objects directly to Printf.
- Added bitwise not (~) operator to ACS.


SVN r352 (trunk)
2006-10-09 15:55:47 +00:00
Randy Heit
c87be34b08 - Removed the r: ACS print cast. You can do it yourself with s: and an array.
- Changed all the bool arguments to the ACS ReplaceTextures and SectorDamage
  commands with a single flags argument. SectorDamage also gained extended
  functionality: you can now make it hurt only players, only non-players, or
  both. Previously, hurting only non-players was not possible.
- Added the HUDMSG_COLORSTRING flag for ACS hudmessages. If you OR it in with
  the message type, the color will be treated as a string naming the color
  you want to use, so now you can use custom colors with hudmessages.


SVN r318 (trunk)
2006-09-01 01:08:27 +00:00
Randy Heit
1a7253e53c - Added support for casting color names in ACS print-type statements. What that
means is that instead of writing this:
    print (s:"\cDSome text");
  You can write this:
    print (r:CR_GREEN, s:"Some text");
- Added some new colors, based on the ones jimmy91 posted in the forum: cream,
  light blue, black, olive, dark green, dark red, dark brown, purple, and dark
  gray.
- Simplified FFont::BuildTranslations() and BuildTranslations2() to make adding
  new colors easier.


SVN r306 (trunk)
2006-08-22 21:58:24 +00:00
Randy Heit
b25c7722f3 - Added the ACS commands
ReplaceTextures (str old_texture, str new_texture, optional bool not_lower,
      optional bool not_mid, optional bool not_upper, optional bool not_floor,
      optional bool not_ceiling); and
  SectorDamage (int tag, int amount, str type, bool players_only, bool in_air,
      str protection_item, bool subclasses_okay);
- Added the vid_nowidescreen cvar to disable widescreen aspect ratio
  correction. When this is enabled, the only display ratio available is 4:3
  (and 5:4 if vid_tft is set).
- Added support for setting an actor's damage property to an expression
  through decorate. Just enclose it within parentheses, and the expression
  will be evaluated exactly as-is without the normal Doom damage calculation.
  So if you want something that does exactly 6 damage, use a "Damage (6)"
  property. To deal normal Doom missile damage, you can use
  "Damage (random(1,8)*6)" instead of "Damage 6".
- Moved InvFirst and InvSel into APlayerPawn so that they can be consistantly
  maintained by ObtainInventory.


SVN r288 (trunk)
2006-08-12 02:30:57 +00:00
Christoph Oelckers
688476b9aa August 10, 2006 (Changes by Graf Zahl)
- Fixed: CheckActorInventory stored the return value in the wrong address
  on the ACS stack.
- Fixed: Skin sounds weren't properly restored after a SNDINFO reset.
- Added a more flexible ACS ChangeLevel function. It gets passed a level name
  instead of a level number and has several additional options (e.g. changing
  skill, starting the map without monsters and clearing the players' inventories. (UNTESTED!)
- Changed Thing_Activate so that passing a tid of 0 activates the calling actor.
- Changed Thing_Remove so that passing a tid of 0 removes the calling actor.
- Added DECORATE parameters to A_Saw.

SVN r283 (trunk)
2006-08-10 15:28:12 +00:00
Christoph Oelckers
f94cdaf782 - Added Grubber's GetPlayerInfo ACS function.
SVN r276 (trunk)
2006-07-30 22:56:20 +00:00
Christoph Oelckers
1ff4d09bed - Added NecroMage's submission for bitwise/shift assignment operators for ACS.
SVN r261 (trunk)
2006-07-16 20:13:24 +00:00
Christoph Oelckers
31c749058b - Generalized Hexen's class-based spawning to be a property of the player class
so now it is available in all games.
- Replaced the call to A_FlameSnd in the HereticPlayer's burn death sequence
  with A_FireScream and defined *burndeath for Heretic.
- Added Grubber's custom player class support.


SVN r250 (trunk)
2006-07-13 10:17:56 +00:00