mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 13:21:31 +00:00
Merge branch 'master' into next
This commit is contained in:
commit
b949f49c68
3 changed files with 47 additions and 193 deletions
22
README.md
Normal file
22
README.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Sonic Robo Blast 2
|
||||
|
||||
[![Build status](https://ci.appveyor.com/api/projects/status/399d4hcw9yy7hg2y?svg=true)](https://ci.appveyor.com/project/STJr/srb2)
|
||||
[![Build status](https://travis-ci.org/STJr/SRB2.svg?branch=master)](https://travis-ci.org/STJr/SRB2)
|
||||
|
||||
[Sonic Robo Blast 2](https://srb2.org/) is a 3D Sonic the Hedgehog fangame based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/).
|
||||
|
||||
## 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](http://wiki.srb2.org/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.
|
155
readme.txt
155
readme.txt
|
@ -1,155 +0,0 @@
|
|||
Here it is! SRB2 v2.1.14 source code!
|
||||
(why do we keep the version number up to date
|
||||
when everything else in this file is hilariously old?
|
||||
- Inuyasha)
|
||||
|
||||
|
||||
Win32 with Visual C (6SP6+Processor Pack OR 7)
|
||||
~~~
|
||||
|
||||
2 VC++ 6.0 project files are included:
|
||||
|
||||
Win32/DirectX/FMOD
|
||||
src\win32\wLegacy.dsw
|
||||
You'll need FMOD to compile this version (www.fmod.org)
|
||||
or
|
||||
Win32/SDL/SDL_mixer
|
||||
src\sdl\Win32SDL.dsp
|
||||
You'll need SDL and SDL_mixer for this version (www.libsdl.org)
|
||||
|
||||
Both needs NASM (http://sourceforge.net/projects/nasm)
|
||||
For PNG screenshot, libPNG, and Zlib (from http://gnuwin32.sourceforge.net/)
|
||||
|
||||
No warranty, support, etc. of any kind is offered,
|
||||
just plain old as is.
|
||||
Some bits of code are still really scary.
|
||||
Go nuts!
|
||||
|
||||
|
||||
Win32 with Dev-C++ (http://bloodshed.net/ free!)
|
||||
~~~
|
||||
2 Dev-C++ project files are included:
|
||||
|
||||
Win32/DirectX/FMOD
|
||||
src\win32\SRB2.dev
|
||||
or
|
||||
Win32/SDL/SDL_mixer
|
||||
src\sdl\Win32SDL.dev
|
||||
You'll need SDL and SDL_mixer for this version (www.libsdl.org)
|
||||
libPNG and Zlib (from http://gnuwin32.sourceforge.net/)
|
||||
Note there are precompiled libpng.a and libz.a for Mingw
|
||||
|
||||
you will need NASM for both SDL/SDL_mixer and DirectX/FMOD
|
||||
and you need DirectX 6 (or up) Dev-Paks to compile DirectX version
|
||||
|
||||
GNU/Linux
|
||||
~~~
|
||||
|
||||
Dependencies:
|
||||
SDL 1.2.7 or better (from libsdl.org)
|
||||
SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org)
|
||||
Nasm (use NOASM=1 if you don't have it or have an non-i386 system, I think)
|
||||
libPNG 1.2.7
|
||||
Zlib 1.2.3
|
||||
The Xiph.org libogg and libvorbis libraries
|
||||
The OpenGL headers (from Mesa, usually shipped with your X.org or XFree
|
||||
installation, so you needn't worry, most likely)
|
||||
GCC 3.x toolchain and binutils
|
||||
GNU Make
|
||||
|
||||
Build instructions:
|
||||
|
||||
make -C src LINUX=1
|
||||
|
||||
Build instructions (64 bit):
|
||||
|
||||
make -C src LINUX64=1
|
||||
|
||||
Build instructions to build for Wii Linux/SRB2Wii on a PowerPC system,
|
||||
follow cross-compiling instructions for cross-compiling on a x86 system:
|
||||
|
||||
make -C src LINUX=1 WIILINUX=1
|
||||
|
||||
Build instructions to build for Pandora (Linux) on a ARM system,
|
||||
follow cross-compiling instructions for cross-compiling on a x86 system:
|
||||
|
||||
make -C src PANDORA=1
|
||||
|
||||
Solaris
|
||||
~~~
|
||||
|
||||
Dependencies:
|
||||
SDL 1.2.5 or better (from libsdl.org)
|
||||
SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org)
|
||||
libPNG 1.2.7
|
||||
Zlib 1.2.3
|
||||
The Xiph.org libogg and libvorbis libraries
|
||||
The OpenGL headers (from Mesa, usually shipped with your X.org or XFree
|
||||
installation, so you needn't worry, most likely)
|
||||
GCC 3.x toolchain and binutils
|
||||
GNU Make
|
||||
|
||||
You can get all these programs/libraries from the Companion CD (except SDL_mixer and OpenGL)
|
||||
|
||||
Build instructions:
|
||||
|
||||
gmake -C src SOLARIS=1
|
||||
|
||||
FreeBSD
|
||||
~~~
|
||||
|
||||
Dependencies:
|
||||
SDL 1.2.7 or better (from libsdl.org)
|
||||
SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org)
|
||||
Nasm (use NOASM=1 if you don't have it or have an non-i386 system, I think)
|
||||
libPNG 1.2.7
|
||||
Zlib 1.2.3
|
||||
The Xiph.org libogg and libvorbis libraries
|
||||
The OpenGL headers (from Mesa, usually shipped with your X.org or XFree
|
||||
installation, so you needn't worry, most likely)
|
||||
GCC 3.x toolchain and binutils
|
||||
GNU Make
|
||||
|
||||
Build instructions:
|
||||
|
||||
gmake -C src FREEBSD=1
|
||||
|
||||
DJGPP/DOS
|
||||
~~~
|
||||
|
||||
Dependencies:
|
||||
Allegro 3.12 game programming library, (from
|
||||
http://alleg.sourceforge.net/index.html)
|
||||
Nasm (use NOASM=1 if you don't have it)
|
||||
libsocket (from http://homepages.nildram.co.uk/~phekda/richdawe/lsck/) or
|
||||
Watt-32 (from http://www.bgnett.no/~giva/)
|
||||
GCC 3.x toolchain and binutils
|
||||
GNU Make
|
||||
|
||||
Build instructions:
|
||||
|
||||
make -C src # to link with Watt-32, add WATTCP=1
|
||||
# for remote debugging over the COM port, add RDB=1
|
||||
|
||||
Notes:
|
||||
use tools\djgpp\all313.diff to update Allegro to a "more usable" version ;)
|
||||
Example: E:\djgpp\allegro>patch -p# < D:\SRB2Code\1.1\srb2\tools\djgpp\all313.diff
|
||||
|
||||
Windows CE
|
||||
~~~
|
||||
|
||||
Dependencies:
|
||||
SDL 1.27
|
||||
|
||||
Build instructions:
|
||||
|
||||
use src\SDL\WinCE\SRB2CE.vcw
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
binaries will turn in up in bin/
|
||||
|
||||
note: read the src/makefile for more options
|
||||
|
||||
- Sonic Team Junior
|
||||
http://www.srb2.org
|
63
src/p_mobj.c
63
src/p_mobj.c
|
@ -1278,25 +1278,23 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
|
||||
for (rover = mo->subsector->sector->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (!(rover->flags & FF_EXISTS))
|
||||
if (!(rover->flags & FF_EXISTS) || !P_InsideANonSolidFFloor(mo, rover)) // P_InsideANonSolidFFloor checks for FF_EXISTS itself, but let's not always call this function
|
||||
continue;
|
||||
|
||||
if (P_InsideANonSolidFFloor(mo, rover))
|
||||
{
|
||||
if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER))
|
||||
goopgravity = true;
|
||||
if (rover->master->frontsector->gravity)
|
||||
{
|
||||
gravityadd = -FixedMul(gravity,
|
||||
(FixedDiv(*rover->master->frontsector->gravity>>FRACBITS, 1000)));
|
||||
if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER))
|
||||
goopgravity = true;
|
||||
|
||||
if (rover->master->frontsector->verticalflip && gravityadd > 0)
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
if (!(rover->master->frontsector->gravity))
|
||||
continue;
|
||||
|
||||
no3dfloorgrav = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
gravityadd = -FixedMul(gravity,
|
||||
(FixedDiv(*rover->master->frontsector->gravity>>FRACBITS, 1000)));
|
||||
|
||||
if (rover->master->frontsector->verticalflip && gravityadd > 0)
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
|
||||
no3dfloorgrav = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1318,28 +1316,20 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
|
||||
if (mo->player)
|
||||
{
|
||||
if (mo->player->charability == CA_FLY && (mo->player->powers[pw_tailsfly]
|
||||
|| (mo->state >= &states[S_PLAY_SPC1] && mo->state <= &states[S_PLAY_SPC4])))
|
||||
gravityadd = gravityadd/3; // less gravity while flying
|
||||
if (mo->player->pflags & PF_GLIDING)
|
||||
gravityadd = gravityadd/3; // less gravity while gliding
|
||||
if (mo->player->climbing)
|
||||
gravityadd = 0;
|
||||
if (mo->player->pflags & PF_NIGHTSMODE)
|
||||
if ((mo->player->pflags & PF_GLIDING)
|
||||
|| (mo->player->charability == CA_FLY && (mo->player->powers[pw_tailsfly]
|
||||
|| (mo->state >= &states[S_PLAY_SPC1] && mo->state <= &states[S_PLAY_SPC4]))))
|
||||
gravityadd = gravityadd/3; // less gravity while flying/gliding
|
||||
if (mo->player->climbing || (mo->player->pflags & PF_NIGHTSMODE))
|
||||
gravityadd = 0;
|
||||
|
||||
if (!(mo->flags2 & MF2_OBJECTFLIP) != !(mo->player->powers[pw_gravityboots])) // negated to turn numeric into bool - would be double negated, but not needed if both would be
|
||||
{
|
||||
UINT8 bits = 0;
|
||||
if (mo->flags2 & MF2_OBJECTFLIP)
|
||||
bits ^= 1;
|
||||
if (mo->player->powers[pw_gravityboots])
|
||||
bits ^= 1;
|
||||
if (bits & 1)
|
||||
{
|
||||
gravityadd = -gravityadd;
|
||||
mo->eflags ^= MFE_VERTICALFLIP;
|
||||
}
|
||||
gravityadd = -gravityadd;
|
||||
mo->eflags ^= MFE_VERTICALFLIP;
|
||||
}
|
||||
if (wasflip == !(mo->eflags & MFE_VERTICALFLIP)) // note!! == ! is not equivalent to != here - turns numeric into bool this way
|
||||
P_PlayerFlip(mo);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1347,10 +1337,10 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
if (mo->flags2 & MF2_OBJECTFLIP)
|
||||
{
|
||||
mo->eflags |= MFE_VERTICALFLIP;
|
||||
if (gravityadd < 0) // Don't sink, only rise up
|
||||
gravityadd *= -1;
|
||||
if (mo->z + mo->height >= mo->ceilingz)
|
||||
gravityadd = 0;
|
||||
else if (gravityadd < 0) // Don't sink, only rise up
|
||||
gravityadd *= -1;
|
||||
}
|
||||
else //Otherwise, sort through the other exceptions.
|
||||
{
|
||||
|
@ -1396,9 +1386,6 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
if (goopgravity)
|
||||
gravityadd = -gravityadd/5;
|
||||
|
||||
if (mo->player && !!(mo->eflags & MFE_VERTICALFLIP) != wasflip)
|
||||
P_PlayerFlip(mo);
|
||||
|
||||
gravityadd = FixedMul(gravityadd, mo->scale);
|
||||
|
||||
return gravityadd;
|
||||
|
|
Loading…
Reference in a new issue