mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 12:40:58 +00:00
Sonic Robo Blast 2 Public
47e053c8f6
Lua additions Thought I'd may as well make a merge request so I can remind people of all the various Lua-related changes here (and because it's about time some of them got in): * Added `P_PointOnLineSide(x, y, line)`. Allows you to quickly determine which side of a line faces the point. *line* can be a real line_t or a custom defined line (just like with P_ClosestPointOnLine). * Added seg_t and node_t support to Lua (note: these are disabled for now, due to complications with OpenGL that we all know something of by now. Bit of a shame really :( ) - of note is node.children and node.bbox: * node.children[] is an array that takes 0 or 1 as indexes (or "right" and "left", alternatively) * node.bbox(child,bboxcoord) is a two-arg function: child can be 0 or 1 (or "right" and "left", alternatively), bbox coord can be 0,1,2 or 3 (or "top", "bottom", "left" and "right", alternatively) * aside from the above, segs[] and nodes[] store the segs/nodes of the current map; segs.iterate and nodes.iterate iterates through segs/nodes * NF_SUBSECTOR is also available for usage with node.children * You can now get the palette indexes (i.e. colormap[n]) of colormap userdata from `v.getColormap`, where n is a palette index number between 0 and 255. Useful for finding out which palette colors turned into what, if they changed at all * ffloor_t userdata can now save to and be read from $$$.sav in netgames properly; this means custom mobj/player variables and NetVars can both send/recieve them directly if you wanted * **IMPORTANT** Blockmap search library! (with a new file: lua_blockmaplib.c) * Format of iteration function: `searchBlockmap(searchtype, function, mobj, [x1, x2, y1, y2])`. Returns true if search was uninteruppted, false if the iteration function returned true at any point * *searchtype* can be either "objects" or "lines", for looking for mobj_t and line_t stuff in the blockmap respectively * *function* is a function of your choice to iterate with: (sorry I can't get the next two bullets to be one indent further to the side) - format of function needed: `funcname(mobj, foundmobj)` or `funcname(mobj, foundline)` (for searching for objects and lines, respectively) - return value of *function* affects searching somewhat: nil doesn't change searching, false ends searching in a block (but doesn't stop searching, it just moves onto the next), and true ends the full search. Both returning true or false ultimately makes `searchBlockmap` return false. * *mobj* is the reference mobj that you're checking around (if you don't supply x/y ranges to search in, it defaults to checking within the mobj's radius in both axes). If *mobj* was removed mid-search the search stops and `searchBlockmap` returns false * (optional) *x1, x2, y1, y2* are coordinates on the map to search the blockmap between, if given See merge request !54 |
||
---|---|---|
android | ||
assets | ||
bin | ||
cmake/Modules | ||
debian | ||
doc | ||
extras | ||
libs | ||
objs | ||
src | ||
tools | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
Android.mk | ||
appveyor.yml | ||
CMakeLists.txt | ||
comptime.bat | ||
comptime.mk | ||
comptime.props | ||
comptime.sh | ||
cpdebug.mk | ||
Doxyfile | ||
LICENSE | ||
README.md | ||
srb2-vc9.sln | ||
srb2-vc10.sln | ||
SRB2.cbp | ||
Srb2.dev | ||
srb2.png | ||
SRB2_common.props | ||
SRB2_Debug.props | ||
SRB2_Release.props |
Sonic Robo Blast 2
Sonic Robo Blast 2 is a 3D Sonic the Hedgehog fangame based on a modified version of Doom Legacy.
Dependencies
- NASM (x86 builds only)
- SDL2 (Linux/OS X only)
- SDL2-Mixer (Linux/OS X only)
- libupnp (Linux/OS X only)
- libgme (Linux/OS X only)
Warning: 64-bit builds are not netgame compatible with 32-bit builds. Use at your own risk.
Compiling
See SRB2 Wiki/Source code compiling
Disclaimer
Sonic Team Junior is in no way affiliated with SEGA or Sonic Team. We do not claim ownership of any of SEGA's intellectual property used in SRB2.