More New API changes for MapChooser, Nominations, RockTheVote, RandomCycle, and NextMap#226
More New API changes for MapChooser, Nominations, RockTheVote, RandomCycle, and NextMap#226psychonic merged 18 commits intoalliedmodders:masterfrom powerlord:mapchooser-updates
Conversation
…nto with Advanced Vote Callbacks.
|
OK, question time to those who are looking at this code. Is it better to continue passing |
|
I'd be okay with allowing an implicit coercion from |
|
@dvander Well, I guess the question is... do we want to get rid of the |
…yright header to mapchooser.inc (all .inc files use the same copyright header, so...)
|
I realized I missed converting nextmap.inc despite converting nextmap.sp. Also, updated the copyright years to 2014 to the files I've edited. |
|
er... ignore the newdecls warning commit (f500e20). I'm going to roll that back and make a new pull request for it. |
…ments in mapchooser.sp to match the new mapchooser.inc signature.
|
Side note: Since this hasn't been mentioned yet, this pull request also fixes a few locations that were still hard-coding 32, 64, or 65 for the map name string. |
|
Whoops! I completely forgot about this PR.
I took care of this yesterday in #343, landing shortly, but there shouldn't be a conflict since both use PLATFORM_MAX_PATH for the sizes now. I do see a couple of error reported on this though, due to the added "#pragma newdecls required":
Do you mind fixing the errors and merging master back into your branch since it's been quite some time (our fault)? |
|
@psychonic The errors you're seeing are actually a bug in menus.inc and were fixed in master by PR #229. |
|
Touché. |
|
Urgh, attempting to merge master into this is introducing all sorts of... fun... conflicts. |
|
I seriously hope this didn't mess up the sourcepawn submodule. I had to Google how to resolve it. Which was to Edit: Also, I didn't edit the commit message, which apparently listed the conflicts I had just manually resolved as not being resolved. :/ |
|
sigh of course it f'ed it up. Time to rollback and try again. |
…updates Conflicts: plugins/nominations.sp plugins/rockthevote.sp
There was a problem hiding this comment.
You can ditch these noreturn tags for void returns if you want. They were necessary before it was clear whether a call even returned a value or not.
|
All of the newdecl and buffer size updates look good. I still need to review the actual functionality changes, which is fortunately only a small minority of this. |
|
I misread the PR and some of the code I guess. "New API" is referring to the new-style syntax and methodmaps, not new mapchooser API. I thought that I had spotted some changes to the nominations API. Will take another look. |
It was the comments on the native impls that were throwing me off, making it look like changes that were really just updating a comment to match the prototype in the inc. All looks good. Thanks for updating these. |
More New API changes for MapChooser, Nominations, RockTheVote, RandomCycle, and NextMap.
This depends on pull request 225 and mapchooser will not compile without it.
Changes include things like:
There are also misc cleanups that were missed prior to this:
Note: This is only the first upgrade I have planned for MapChooser. I also have plans for introducing fixes for various issues with different games, but those need more testing.