Commit graph

121 commits

Author SHA1 Message Date
hispidence
9fef88ded3 Update object lists and documentation. 2022-11-18 15:34:45 +00:00
Nemoel-Tomo
1201bfa92a
lua-functions-moved-to-lara-class (#853)
* lua-functions-moved-to-lara-class

"AttachObjCamera"
"ResetObjCamera"
"UndrawWeapons"
"ThrowAwayTorch"
"GetLaraHandStatus"
"GetLaraWeaponType"
"SetLaraWeaponType"
"AnimFromObject"

* Small fix for documentation comments
* fixed formatting errors
* fixed Obj active check with AttachObjCamera
* Simplify MoveObjCamera code a bit

Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
2022-11-18 00:21:59 +02:00
Anatoly
5812fc7d45
Merge pull request #840 from MontyTRC89/lua_1.0.3
Lua 1.0.3
2022-11-14 18:02:55 +02:00
Lwmte
c25e48f197 Fix 2 potential cases of wrong room assignment on SetPosition anim/script commands 2022-11-14 16:37:24 +02:00
hispidence
a8be0d667d Merge remote-tracking branch 'origin/master' into lua_1.0.3 2022-11-13 12:30:56 +00:00
Anatoly
ad719fdf30
Simple Lua callback refactor (#829) 2022-11-13 02:46:12 +02:00
hispidence
a56f7af06d Fix documentation, regen docs, bump version. 2022-11-11 21:03:55 +00:00
hispidence
a1fe36f7a3 Add LaraObject, update docs. 2022-11-11 19:43:28 +00:00
Anatoly
827416f887
Meshswap refactor (#828)
* Work
* Fix TestMeshSwapFlags
* Rename callbacks
* Revert unrelated changes
* Update items.h
2022-11-11 14:47:20 +02:00
hispidence
5a0a645427 Merge remote-tracking branch 'origin/master' into lua_1.0.3 2022-11-02 19:24:14 +00:00
Sezz
75b36d8f0f Merge branch 'master' into math 2022-10-24 15:17:46 +11:00
Sezz
30ea899ee7
Bit field class (#736)
* Prototype BitField class

* Use vector<bool> instead

* Rename; add Fill() private method; organise

* Fix comments

* Fix off by 1 errors

* Fix more off by 1 errors

* Resize in constructor

* Use const parameters where necessary

* Tentatively add typedefs to framework.h

* Don't make copies of vectors

* Rename

* Update BitField class

* Update BitField class

* Update BitField operator

* Add TestAny() method

* Update BitField class

* Add |= and & operators for compatibility

* Add return value

* Add comment

* Rename; make method const

* Update framework.h

* Remove duplicate method

* Optimise

* Optimise; add operators

* Add converter methods

* Update BitField class

* Add GetCount() method

* Adopt BitField class usage

* Fix BitField errors

* Fix wrong type in loops

* Make BitField methods and operators const where possible

* Fix ToString() method

* Fix BitSet comparison operators

* Simplify

* Set default

* Set defaults

* Add warnings to BitField

* Reformat local variable

* Add warning

* Add comments

* Remove TestNone()
2022-10-24 14:15:42 +11:00
hispidence
a1c84ad0e6 Unclamp SetHP, update docs. 2022-09-20 19:44:40 +01:00
Sezz
04994a1141 Merge branch 'master' into math 2022-09-17 17:49:21 +10:00
Lwmte
477dae2d08 Get/set velocity script functions 2022-09-15 03:29:38 +03:00
Sezz
418ec7f061 Merge branch 'master' into math 2022-09-12 22:27:37 +10:00
Sezz
3ca39b60e4 Fully adopt new GetJointPosition() 2022-09-10 15:13:16 +10:00
Sezz
db14ac8467 Partially adopt new GetJointPosition() 2022-09-09 20:22:38 +10:00
Sezz
dcfd791086 Sort out phd_global.h and trmath.h includes 2022-09-07 13:05:53 +10:00
hispidence
a30ec88d3f Improve SetOnCollidedWithObject, SetOnCollidedWithRoom, SetOnHit and SetOnKilled to use LevelFuncs. Removed Getters for these for now as it's not really trivial to decide what useful thing they will return. 2022-09-06 21:31:04 +01:00
hispidence
418ab7e8b1 Improve documentation, fix ExecuteFunction behaviour 2022-09-06 21:28:44 +01:00
Sezz
8745f11b82 Rename Vector3Int to Vector3i 2022-09-06 21:14:10 +10:00
hispidence
e16a98a8aa Merge branch 'master' into lua_1.0.2 2022-09-03 16:54:42 +01:00
hispidence
e6319ee18a Update docs 2022-08-26 00:13:02 +01:00
hispidence
dad4ac26f9 Part 2 of fixing #671 2022-08-25 22:52:54 +01:00
hispidence
b9a0e692af Part 1 of hopefully fixing #671. 2022-08-25 21:28:59 +01:00
hispidence
0a630c8e52 Remove New to finally hopefully kill the new/New discourse (the correct way is to use neither) 2022-08-24 23:30:23 +01:00
hispidence
267b05c91f Allow Vec3s to be saved and loaded in LevelVars and GameVars 2022-08-20 14:23:07 +01:00
Sezz
3f18fd0fec Merge branch 'entity_fix' into IndependentGuide_Adngel 2022-08-12 21:01:27 +10:00
hispidence
9686f80b29 Add documentation for EventSequence and update autogenerated docs. 2022-08-11 22:49:31 +01:00
Adngel
a12a54d85a Update MoveableObject.cpp 2022-08-06 16:35:33 +02:00
Adngel
0864ef30a1 Update MoveableObject.cpp
The functions names changed again, so I'm reverting the comments change I did.
2022-08-06 16:23:46 +02:00
Adngel
ed7a085089 Merge branch 'ten_beta' into IndependentGuide_Adngel 2022-08-06 16:04:45 +02:00
hispidence
eebbcea7a5 Change new->New for consistency.
Change byte to unsigned char in accordance with coding standards.
2022-08-04 21:42:29 +01:00
Adngel
bf31a3d68b Revision
- The Do-Actions and the Make_Targetable functions, have been removed from this code, and implemented as a Lua Module to be shared externally.

- With the new Trigger approach, this commitment removes the implementation of the parameters feature.

- Created a new function: GetSlotHP(), So Lua can read the default life points designated for the enemies. (useful for life percentages and such).

- Changed the functions:
 GetItemFlag and SetItemFlag to
 GetItemFlags and SetItemFlags
So they fits with the variable name they are referencing.
2022-08-03 00:12:12 +02:00
hispidence
be4b98dc41 Merge branch 'ten_beta' into lua_funcs 2022-08-01 19:33:19 +01:00
Adngel
f3d9acf19c Scary text flag
Now, when the flag is active, the Guide will get scared when he reads the next inscription.

Like in TR4, but without need to be in room 70.

The flag onces the action is done, it deactivates itself.

Unlike TR4, I set that the scared face changed back to his normal one at the end of the reading animation, so builders can keep using it with his normal face.
2022-07-25 12:59:05 +02:00
Adngel
155867d6e0 Guide, cleaning, polishment, fixes and implementation of new feature.
Some cleaning, polishment and bug fixes (It wasn't refresh the AI searched when moving to a passed node).

Also implemented a new feature, the run default, if the flag is active (with the Lua function) the guide will go running to the next node (unless the next node were very close).
2022-07-25 00:14:43 +02:00
Adngel
9d0b690f9f Doc. comments fixes.
Small changes in the documentation comments.
2022-07-24 02:17:21 +02:00
Adngel
614981e771 Implementation of the functions Moveable:Do actions.
Added the new Moveable : Do functions:

- DoGoToNode
- DoGoDirectlyToNode
- DoGoNextNode
- DoWaitForLara
- DoRunDefault

At the moment, only have actions with the guide, but they have a switch structure to include more objects in the future.
2022-07-24 01:38:27 +02:00
Adngel
86da1fcc52 Update MoveableObject.cpp
The real functions are

Moveable:Enable
Moveable:Disable

not

Moveable:EnableItem
Moveable:DisableItem

Comments changed to avoid confusion.
2022-07-18 18:17:41 +02:00
Adngel
6e68330b7b Update Script Reserved
A forgotten step
2022-07-18 09:57:21 +02:00
Adngel
5b9eddc3d5 LUA Functions: ItemFlags get/set, MakeNotTargetable
Added three functions to the LUA collection.

-GetItemFlags (int index)
-SetItemFlags (int index)
-MakeNotTargetable (bool  isNotTargetable = true)

The three must be used with a moveable. Ideally, for enemies and allies.
2022-07-17 11:12:58 +02:00
hispidence
8bc64e12ea Shatter and Explode should not call Destroy 2022-07-16 12:55:22 +01:00
hispidence
ecb868008c Fixed docs 2022-07-16 12:54:57 +01:00
hispidence
0ebf171298 Move UseIfHave to ScriptUtil.h 2022-07-16 12:54:42 +01:00
Lwmte
d039914dbb Set default tint to 1.0f when spawning item in scripts 2022-07-14 19:47:47 +03:00
Lwmte
d9c6aff449 Use ScriptAssert to generate error message 2022-07-12 12:04:23 +03:00
Lwmte
ba15fa8259 More verbose warning about wrong mesh 2022-07-12 11:54:14 +03:00
Lwmte
189a7165e9 Add bounds check for all mesh-related script methods 2022-07-12 11:37:59 +03:00