Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Anonymous
unregistriert
Anonymous
unregistriert
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
/* Copyright (C) 1994-1995 Apogee Software, Ltd. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ //*************************************************************************** // // RT_PLAYR.C - Player movement and stuff // //*************************************************************************** #ifndef _rt_playr_public #define _rt_playr_public #include "rt_actor.h" #include "rt_stat.h" #include "states.h" #include "rottnet.h" #include "rt_battl.h" #include "develop.h" extern int mouse_ry_input_scale; #define LOW_GRAVITY 10000 #define NORMAL_GRAVITY 30000 #define HIGH_GRAVITY 250000 #define TAGHANDHEIGHT 40 #define MAXDEAD 32 #define MAXBULLETS 64 #define MAXCODENAMELENGTH 9 #define ARMED(x) ( \ (gamestate.PlayerHasGun[x]) || \ (!BATTLEMODE) \ ) typedef struct { statetype *state; int speed; classtype obclass; int offset; int flags; }missile_stats; extern missile_stats PlayerMissileData[13]; extern int GetWeaponForItem(int itemnumber); extern int GetItemForWeapon(int weapon); typedef enum {reset, reset2, done, at_knife, at_pulltrigger, at_automatic, at_dryheaving, at_missileweapon } attack_action; typedef struct atkinf { attack_action attack; char mtics,frame; // attack is 1 for gun, 2 for knife, 3 for machine guns, // 4 for chaingun (orig. game) } attack_t; typedef struct weaptype {const int screenheight; int startammo; int base_damage; int impulse; int numattacks; attack_t attackinfo[14]; }williamdidthis; // // Interactive input status of device, returned by SWIFT_Get3DStatus // typedef struct { short x; short y; short z; short pitch; short roll; short yaw; short buttons; } SWIFT_3DStatus; // // Static data about device, returned by SWIFT_GetStaticDeviceInfo // typedef struct { unsigned char deviceType; unsigned char majorVersion; unsigned char minorVersion; unsigned char coordDescriptor[6]; unsigned char reserved[1]; } SWIFT_StaticData; typedef struct { int lives; int health; int triads; signed char ammo; short poweruptime; short protectiontime; int new_weapon; int keys; int weapon; int missileweapon; int bulletweapon; signed char HASBULLETWEAPON[3]; int attackframe,attackcount,weaponframe; byte player; int topspeed; int dmomx; int dmomy; int angle; int anglefrac; boolean buttonheld[NUMBUTTONS]; boolean buttonstate[NUMBUTTONS]; int horizon; int lastmomz; signed short playerheight; signed short heightoffset; signed short weaponheight; byte weaponx,weapony; word batblast; signed char NETCAPTURED; signed char HASKNIFE; int oldweapon, oldmissileweapon; signed short weapondowntics,weaponuptics; int soundtime; int healthtime; objtype* guntarget; int targettime; // int steptime; // int stepwhich; boolean falling; int oldshapeoffset; int uniformcolor; char codename[MAXCODENAMELENGTH]; int oldheightoffset; int team; } playertype; typedef struct { int topspeed; int toprunspeed; int hitpoints; int accuracy; int height; } ROTTCHARS; #define M_LINKSTATE(x,y) \ { y = &PLAYERSTATE[x->dirchoosetime];\ } extern williamdidthis DOGSCRATCH; extern int GRAVITY; extern int controlupdatetime; extern int controlupdatestarted; extern statobj_t *DEADPLAYER[MAXDEAD]; extern int NUMDEAD; extern objtype *PLAYER[MAXPLAYERS]; extern objtype *player; extern playertype PLAYERSTATE[MAXPLAYERS],*locplayerstate; extern ROTTCHARS characters[5]; extern williamdidthis FREE; extern statetype s_player; extern williamdidthis WEAPONS[MAXWEAPONS]; extern boolean cybermanenabled; extern boolean spaceballenabled; extern boolean SpaceBallPresent; extern boolean CybermanPresent; extern boolean mouseenabled; extern boolean joystickenabled; extern boolean joypadenabled; extern boolean joystickprogressive; extern int joystickport; extern int joyxmax, joyymax, joyxmin, joyymin; extern int buttonscan[NUMBUTTONS]; extern int buttonmouse[6]; extern int buttonjoy[8]; extern boolean buttonpoll[NUMBUTTONS]; extern boolean godmode; extern boolean missilecam; extern objtype * missobj; extern int lastpolltime; extern int controlbuf[3]; extern int buttonbits; extern int pausedstartedticcount; extern boolean RefreshPause; void PlayNoWaySound(void); int GetBonusTimeForItem(int); int GetRespawnTimeForItem(int); int GetItemForWeapon(int); void SetWhoHaveWeapons(void); int MaxHitpointsForCharacter(playertype*); void RespawnPlayerobj(objtype*); void RevivePlayerobj(int,int,int,objtype*); void OperateElevatorSwitch(objtype*,int,int,int); void ResetPlayerstate(playertype*); void InitializeWeapons(playertype*); void DropWeapon(objtype*ob); void PollKeyboardButtons (void); void PollMouseButtons (void); void PollJoystickButtons (void); void PollKeyboardMove (void); void PollCyberman (void); void PollMouseMove (void); void PollJoystickMove (void); void PollControls (void); void AddDemoCmd (void); void AddRemoteCmd (void); void PlayerSlideMove(objtype * ob); void SpawnSmoke(objtype*); void GetBonus(objtype*,statobj_t*); void SpawnPlayerobj(int,int,int,int); void ClipPlayer(void); void PlayerMove ( objtype * ob ); void Cmd_Use(objtype*); void Cmd_Fire (objtype*ob); void SpawnGunSmoke(int x, int y, int z, int angle, int bullethole); void SpawnBlood(objtype * ob, int angle); void SpawnMetalSparks(objtype * ob, int angle); void CheckPlayerSpecials(objtype * ob); void LoadPlayer ( void ); void PlayerTiltHead (objtype * ob); boolean InRange (objtype *p, objtype *victim, int distance); void CheckUnPause ( void ); void UpdatePlayers ( void ); void UnTargetActor ( objtype * target ); typedef enum { RENORMALIZE = 1, PITFALL, PITRISE, COLUMNCRUSH, GODMODERISE, GODMODEFALL, DOGMODEFALL, DOGMODERISE, STEPUP, STEPDOWN }; extern void ResetWeapons(objtype *); extern void SaveWeapons(objtype*); extern int whichpath; extern statobj_t *BulletHoles[MAXBULLETS]; extern boolean vrenabled; void SetupBulletHoleLink (int num, statobj_t * item); #endif |
Anonymous
unregistriert
Werbeanzeige