Commit Graph

15 Commits

Author SHA1 Message Date
nosoop
d01c72f79b
Update CGameConfig members to use std::string instead of fixed-size char arrays (#1495) 2021-06-03 11:27:16 -05:00
Scags
6fd9d1ce11
gamedata: automate reparsing on load (#1348)
* Add sm_reload_gamedata

* Remove redundant cast

* Automate gamedata reparsing

* Update GameConfigs.cpp

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
2020-10-02 16:25:27 -07:00
David Anderson
b725196a26 Replace AString with std::string. 2020-05-20 17:57:18 -07:00
Michael Flaherty
aaac0b9eb2 Individualize NameHashSet Hashing & Revisit #709 (#740)
* Make mac/win lookups lowercase'd

* Revert #709 & 81042cc

* Adjust HashPolicy implementation across sourcemod

Basically, in order to implement our own (actual) hash policy in
`PluginSys.h`, we needed to remove the blanket implementation of `hash`
that was used before. Now, each policy must implement `hash` along with
`matches` in order to be used with `NameHashSet`. While this does force
us to change every implementation of policies across the entirety of
sourcemod, it allows core to use flexible implementations of `hash`.

* Remove logic duplication

* Improve lowercase checks
2018-07-10 17:38:40 -04:00
peace-maker
f9faf9e48c Allow different values per platform in "Keys" gamedata section (#765)
This adds support for platform specific custom key values in the `Keys` section in game config files. Now you can have different values for the same key per platform.

Previously you could only add general key values in gamedata files that were the same on all platforms like
```
"Keys"
{
	"key"	"value"
}
```

This patch allows you to set the value per platform in a subsection like
```
"Keys"
{
	"key"
	{
		"windows"	"value1"
		"linux"	"value2"
		"mac"	"value3"
	}
}
```

Looking up the `key` will return the value matching the host platform.
2018-02-06 14:40:51 +00:00
FlaminSarge
c3b25e54f8 Add convenience logic for "offset" to Address definitions in GameConf (#580)
Allows for the last "read" offset for an Address to instead be "offset", which doesn't deref the addr pointer after applying the offset
Shortens the necessary coding to get a particular Address inside a function (old: store offset in a separate GameConf Offsets entry, apply the offset to the Address in SP)
2017-10-28 12:11:32 +01:00
David Anderson
4e275eea97 Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
Scott Ehlert
ce6b993954 Use Linux game data for offsets and signatures/symbols on OS X if Mac-specific data is not available (bug 6056, r=dvander).
Although unlikely, OS X game data can also be used on Linux if Linux-specfic data is missing.
2014-02-15 23:23:53 -06:00
David Anderson
b917c540aa Remove memtables from GameConfigs (bug 5899 part 4, r=fyren). 2013-08-31 19:50:26 -07:00
David Anderson
544b6d94aa Switch HandleSys off KTrie (bug 5884 part 2, r=ds). 2013-08-25 11:59:45 -07:00
David Anderson
0144062126 Introduce NameHashSet (bug 5884 part 1, r=ds). 2013-08-25 11:59:44 -07:00
David Anderson
d14b5fe00b Switch GameConfigs to hash tables (bug 5878 part 3, r=ds). 2013-08-25 01:42:16 -07:00
David Anderson
f7991185ba Add reference counting and use it for CGameConfig (bug 5876 part 1, r=ds).
--HG--
extra : rebase_source : 42b033d005ae3118b6505c530227c84e0e8a7553
2013-08-23 00:18:11 -07:00
Nicholas Hastings
a36c266e7d Split TF2, DoD:S, HL2:DM, and ND to separate binaries (bug 5813, r=asherkin). 2013-07-21 11:53:56 -04:00
David Anderson
64455b9852 Moved gameconf code from core to logic (bug 4406 part 11, r=ds).
--HG--
rename : core/GameConfigs.cpp => core/logic/GameConfigs.cpp
rename : core/GameConfigs.h => core/logic/GameConfigs.h
rename : core/smn_gameconfigs.cpp => core/logic/smn_gameconfigs.cpp
2010-05-14 23:35:42 -07:00