- Timestamp:
- Jun 3, 2013, 7:01:38 PM (12 years ago)
- Location:
- Daodan/src/flatline
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/flatline/Flatline.c
r879 r881 14 14 #define isnan(x) ((x) != (x)) 15 15 16 uint32_t last1 = 0; uint32_t last2 = 0;17 16 player_info Players[MAX_PLAYERS]; 18 17 player_info * PlayerList[MAX_CONNECTIONS] = {0}; … … 28 27 }; 29 28 30 #define BETTER_SYNC 31 32 29 typedef struct 30 { 31 uint16_t x; 32 uint16_t y; 33 } IMtPoint2D; 34 35 extern uint16_t max_connections; 33 36 34 37 … … 77 80 } 78 81 79 extern uint16_t max_connections;80 82 uint16_t FLr_FindEmptyListSlot() { 81 83 int j; … … 87 89 return -1; 88 90 } 89 typedef struct90 {91 uint16_t x;92 uint16_t y;93 } IMtPoint2D;94 static flatline_packet cache_input = {0};95 91 96 92 97 93 void * ONICALL FLrInput_Update_Keys(void) 98 94 { 99 uint32_t i;95 int32_t i; 100 96 flatline_packet all_input = {0}; 101 97 int16_t InputIndex = 0; -
Daodan/src/flatline/Flatline.h
r877 r881 22 22 #include "../Oni_Character.h" 23 23 #include "../Oni_GameState.h" 24 #include "Flatline_Packet.h"25 24 26 25 #include "../Oni_Symbols.h" … … 32 31 DWORD WINAPI StartServer(void* lol); 33 32 DWORD WINAPI StartClient(void* lol); 33 34 35 typedef struct 36 { 37 uint16_t ID; 38 uint16_t Size; 39 uint16_t UpdateFlags; 40 uint8_t data[255]; 41 } PlayerData; 42 43 44 typedef struct { 45 uint32_t Actions1; 46 uint32_t Actions2; 47 float MouseDeltaX; 48 float MouseDeltaY; 49 } PlayerInput; 50 51 typedef struct { 52 float Facing; 53 float DesiredFacing; 54 } PlayerFacing; 55 56 typedef struct { 57 uint16_t Health; 58 uint16_t MaxHealth; 59 } PlayerHealth; 60 61 typedef struct { 62 uint16_t Score; 63 uint16_t Deaths; 64 } PlayerScore; 65 66 //Change this later to be misc info 67 typedef struct { 68 uint16_t Frame; 69 uint16_t Ping; 70 } PlayerFP; 71 72 typedef struct { 73 uint8_t Ammo; 74 uint8_t Cells; 75 uint8_t Hypo; 76 uint8_t pad; 77 uint16_t Invis; 78 uint16_t Shield; 79 } PlayerInventory; 80 81 typedef struct { 82 uint16_t throwing; 83 uint16_t throwFrame; 84 char throwName[32]; 85 } PlayerThrowData; 86 87 enum 88 { 89 PFlag_None, 90 PFlag_Input, 91 PFlag_Facing, 92 PFlag_Health, 93 PFlag_Score, //TODO 94 PFlag_FramePing, 95 PFlag_Inventory, //TODO 96 PFlag_Class, 97 PFlag_Position, 98 PFlag_Animation, 99 PFlag_Throws, 100 PFlag_Max, 101 PFlag_AnimationWait,//Clients only! 102 }; 34 103 35 104 -
Daodan/src/flatline/Flatline_Client.c
r877 r881 1 1 #include "Flatline.h" 2 2 #include "Flatline_Client.h" 3 #include "Flatline_Packet.h" 3 4 #include "Mariusnet_Public.h" 5 #include "../Daodan_Patch.h" 4 6 //#include "PortForwardWrapper.h" 5 7 -
Daodan/src/flatline/Flatline_Packet.h
r877 r881 2 2 #define FLATLINE_PACKET_H 3 3 #include "stdint.h" 4 #include "Flatline.h" 4 5 5 6 6 7 uint16_t FLpData_PartSize( uint8_t e); 7 8 void FLsSendPlayerData(); 8 //void FLcReadPlayerData( flatline_packet* Packet, int16_t Size ); 9 10 typedef struct 11 { 12 uint16_t ID; 13 uint16_t Size; 14 uint16_t UpdateFlags; 15 uint8_t data[255]; 16 } PlayerData; 17 18 19 typedef struct { 20 uint32_t Actions1; 21 uint32_t Actions2; 22 float MouseDeltaX; 23 float MouseDeltaY; 24 } PlayerInput; 25 26 typedef struct { 27 float Facing; 28 float DesiredFacing; 29 } PlayerFacing; 30 31 typedef struct { 32 uint16_t Health; 33 uint16_t MaxHealth; 34 } PlayerHealth; 35 36 typedef struct { 37 uint16_t Score; 38 uint16_t Deaths; 39 } PlayerScore; 40 41 //Change this later to be misc info 42 typedef struct { 43 uint16_t Frame; 44 uint16_t Ping; 45 } PlayerFP; 46 47 typedef struct { 48 uint8_t Ammo; 49 uint8_t Cells; 50 uint8_t Hypo; 51 uint8_t pad; 52 uint16_t Invis; 53 uint16_t Shield; 54 } PlayerInventory; 55 56 typedef struct { 57 uint16_t throwing; 58 uint16_t throwFrame; 59 char throwName[32]; 60 } PlayerThrowData; 61 62 enum 63 { 64 PFlag_None, 65 PFlag_Input, 66 PFlag_Facing, 67 PFlag_Health, 68 PFlag_Score, //TODO 69 PFlag_FramePing, 70 PFlag_Inventory, //TODO 71 PFlag_Class, 72 PFlag_Position, 73 PFlag_Animation, 74 PFlag_Throws, 75 PFlag_Max, 76 PFlag_AnimationWait,//Clients only! 77 }; 9 void FLcReadPlayerData( flatline_packet* Packet, int16_t Size ); 78 10 79 11 -
Daodan/src/flatline/Flatline_PacketBuilder.c
r877 r881 2 2 #include "../Oni_Symbols.h" 3 3 #include <assert.h> 4 #include "Flatline_Packet.h" 4 5 5 6 #define FLAG_AND_INCREMENT( FLAG ) PD->UpdateFlags |= (1 << FLAG ); DataPointer += FLpData_PartSize( FLAG ); -
Daodan/src/flatline/Flatline_PacketReader.c
r877 r881 1 1 #include "Flatline.h" 2 #include "Flatline_Packet.h" 2 3 3 4 bool DoWeUpdateThis( uint16_t BitSet, uint16_t Flag ) -
Daodan/src/flatline/Mariusnet.c
r877 r881 9 9 #include "../Oni_Symbols.h" 10 10 #include <stdio.h> 11 12 #pragma comment(lib, "wininet.lib")13 14 11 15 12 char MariusLogin[32]={0}; -
Daodan/src/flatline/Mariusnet_Public.h
r877 r881 1 #ifndef MARIUSNET_PUBLIC_H 2 #define MARIUSNET_PUBLIC_H 3 1 4 extern unsigned char MsNet_Running; 2 5 … … 40 43 } m_announcegame; 41 44 45 int MSNet_CreateGame( m_announcegame* Game ); 46 47 #endif
Note:
See TracChangeset
for help on using the changeset viewer.