Changeset 573 for Daodan/MSVC
- Timestamp:
- Sep 9, 2010, 11:27:04 AM (14 years ago)
- Location:
- Daodan/MSVC
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/MSVC/Daodan.c
r572 r573 10 10 #include "Daodan_Console.h" 11 11 12 #include "Flatline_BSL.h" 13 #include "Flatline_Hooks.h" 12 14 #include "Daodan_WindowHack.h" 13 15 … … 233 235 DDrPatch_Const(0x0051BB64, regen_patch); 234 236 } 235 236 237 DDrPatch_MakeCall(0x004FBCEA, DDrText_Hook); 238 DDrPatch_Int32( 0x004B24D2, FLrSpawnHack); 239 DDrPatch_NOOP(0x004C26CB, 6); 240 DDrPatch_MakeCall( 0x004C26CB, FLrHook_DoorOpen); 241 237 242 return true; 238 243 } -
Daodan/MSVC/Daodan_Utility.c
r572 r573 127 127 128 128 } 129 typedef struct 129 130 typedef struct 131 { 132 uint16_t x; 133 uint16_t y; 134 135 } IMtPoint2D; 136 IMtPoint2D Point = {256, 250}; 137 extern void* TSrTest; 138 extern void* TSrScores; 139 unsigned int lastPasteTime; 140 141 void DDrPasteHack() 142 { 143 COtTextArea* cons = *(COtTextArea**)0x00571B74; 144 char* clipboardText = 0; 145 if(GetAsyncKeyState(0x56) && GetAsyncKeyState(VK_CONTROL) ) 130 146 { 131 uint16_t x; 132 uint16_t y; 133 134 } IMtPoint2D; 135 IMtPoint2D Point = {256, 250}; 136 extern void* TSrTest; 147 if(cons && cons->text_entries && cons->num_text_entries) 148 { 149 //why abs()? so we dont have to reset the timer after a level load. 150 if( abs(ONgGameState->GameTime - lastPasteTime) > 60) { 151 //DDrConsole_Print(cons->text_entries[0].text); 152 if(OpenClipboard(ONgPlatformData.Window)) 153 { 154 unsigned short charsUsed = strlen(cons->text_entries[0].text); 155 //get rid of the v character 156 if(charsUsed) charsUsed--; 157 clipboardText = GetClipboardData(CF_TEXT); 158 if(clipboardText && strlen(clipboardText) + charsUsed < 502) 159 { 160 strcpy_s( cons->text_entries[0].text + charsUsed, 502 - charsUsed - 1, clipboardText); 161 lastPasteTime = ONgGameState->GameTime; 162 } 163 } 164 } 165 else 166 { 167 //need to hook whatever controls however often you can repeat characters...i guess. 168 //cons->text_entries[0].text[strlen(cons->text_entries[0].text) - 1] = 0; 169 } 170 } 171 } 172 } 137 173 void ONICALL DDrText_Hook() 138 174 { 175 139 176 if(TSrTest) 140 177 { 141 178 TSrContext_DrawText(TSrTest, "FINALLY THIS BLOODY TEXT THING WORKS\n Gotta call it at the right point...", 128, 0, &Point); 179 142 180 } 143 COrConsole_StatusLine_Display(); 181 FLrRun_Scores(); 182 DDrPasteHack(); 183 184 COrConsole_StatusLine_Display(); 144 185 145 186 } -
Daodan/MSVC/FixedDaodan.sln
r567 r573 1 1 2 Microsoft Visual Studio Solution File, Format Version 1 0.003 # Visual C++ Express 20 084 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FixedDaodan", "FixedDaodan.vc proj", "{6138BFC9-DCAD-4525-90BE-D84703282A4A}"2 Microsoft Visual Studio Solution File, Format Version 11.00 3 # Visual C++ Express 2010 4 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FixedDaodan", "FixedDaodan.vcxproj", "{6138BFC9-DCAD-4525-90BE-D84703282A4A}" 5 5 EndProject 6 6 Global -
Daodan/MSVC/FixedDaodan.vcproj
r567 r573 5 5 Name="FixedDaodan" 6 6 ProjectGUID="{6138BFC9-DCAD-4525-90BE-D84703282A4A}" 7 RootNamespace="FixedDaodan" 7 8 Keyword="Win32Proj" 8 9 TargetFrameworkVersion="0" … … 40 41 Name="VCCLCompilerTool" 41 42 Optimization="0" 43 AdditionalIncludeDirectories="FFI\src;FFI\include" 42 44 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FIXEDDAODAN_EXPORTS;" 43 45 MinimalRebuild="true" … … 63 65 <Tool 64 66 Name="VCLinkerTool" 65 AdditionalDependencies="ws2_32.lib winmm.lib "66 OutputFile=" C:\Program Files\Oni\edition\binkw32.dll"67 AdditionalDependencies="ws2_32.lib winmm.lib opengl32.lib" 68 OutputFile="d:\Program Files\Oni\edition\binkw32.dll" 67 69 LinkIncremental="2" 68 70 ModuleDefinitionFile="binkw32.def" … … 119 121 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FIXEDDAODAN_EXPORTS;" 120 122 MinimalRebuild="true" 121 RuntimeLibrary=" 2"123 RuntimeLibrary="0" 122 124 StructMemberAlignment="1" 123 125 UsePrecompiledHeader="0" … … 140 142 Name="VCLinkerTool" 141 143 AdditionalDependencies="ws2_32.lib winmm.lib" 142 OutputFile=" C:\Program Files\Oni\Edition\binkw32.dll"144 OutputFile="Release\binkw32.dll" 143 145 LinkIncremental="2" 144 146 GenerateManifest="true" … … 314 316 </File> 315 317 <File 318 RelativePath=".\glxext.h" 319 > 320 </File> 321 <File 316 322 RelativePath=".\inifile.h" 317 323 > … … 343 349 <File 344 350 RelativePath=".\Oni_Symbols.h" 351 > 352 </File> 353 <File 354 RelativePath=".\wglext.h" 345 355 > 346 356 </File> -
Daodan/MSVC/FixedDaodan.vcproj.KYLEPC.Kyle.user
r567 r573 12 12 Command="C:\Program Files\Oni\edition\oni.exe" 13 13 WorkingDirectory="C:\Program Files\Oni\edition" 14 CommandArguments="-noswitch "14 CommandArguments="-noswitch -debugfiles" 15 15 Attach="false" 16 16 DebuggerType="3" -
Daodan/MSVC/Flatline.c
r572 r573 2 2 #include "Oni_Character.h" 3 3 #include "Flatline_Server.h" 4 #include "Flatline_Client.h" 5 #include "Daodan_Utility.h" 4 6 //#include <sys/time.h> 5 7 #include <time.h> … … 16 18 17 19 #define BETTER_SYNC 20 21 void PlayerDisconnect( int Player ) 22 { 23 ONrGameState_DeleteCharacter(PlayerList[Player]->Chr); 24 memset(PlayerList[Player], 0, sizeof(player_info)); 25 PlayerList[Player] = 0; 26 if(server_started) 27 { 28 FLsPublic_Event( EV_DISCONNECT, &Player ); 29 } 30 } 18 31 19 32 void DoRareSync( short Player, sockaddr_in * sender ) … … 75 88 //if(Players[i].ip == sender.sin_addr.S_un.S_addr) break; //needs to send an error message 76 89 sender.sin_addr.S_un.S_addr = htonl(sender.sin_addr.S_un.S_addr); 77 playah = FLrServer_AddPlayer(from,packet->connect_send.name, 0 );90 playah = FLrServer_AddPlayer(from,packet->connect_send.name, 0, 0); 78 91 DDrConsole_PrintF("%s connected from %s", packet->connect_send.name, inet_ntoa(sender.sin_addr ) ); 79 92 if(!((int)playah > -5 && (int)playah <= 0)) { … … 97 110 Char->Header.Type = 'CHAR'; 98 111 Char->OSD.Options = chr_dontaim; 112 //Build the NEWCHARACTERs for the new player 99 113 for(j = 0; j < max_connections; j++) { 100 114 if(PlayerList[j] != 0) { … … 201 215 DoRareSync( packet->sync_request , &sender); 202 216 break; 217 case NULL_PACKET: 218 if(1) 219 { 220 int p; 221 char arr[9999]; 222 for (p = 0; p < datalen; p++) 223 { 224 sprintf(arr,"%x",((char*)&packet)[p]); 225 } 226 DDrStartupMessage(arr); 227 } 228 break; 203 229 default: 204 230 DDrConsole_PrintF("Warning, recieved badly formed packet!"); … … 206 232 } 207 233 return true; 234 } 235 236 void* TSrScores = 0; 237 238 void FLrInit_Scores() 239 { 240 void* TSFFTahoma; 241 int returnval; 242 243 if(!TSrScores){ 244 TMrInstance_GetDataPtr( 'TSFF', "Tahoma", &TSFFTahoma); 245 returnval = TSrContext_New( TSFFTahoma, 7, 1, 1, 0, &TSrScores); 246 TSrContext_SetShade(TSrScores, 0xFFFFFFFF); 247 } 248 return; 249 } 250 251 void FLrRun_Scores() 252 { 253 if(TSrScores) 254 { 255 const int scores_top = 20; 256 const int scores_left = 15; 257 //Convert to grabbing the height directly plox 258 const int line_height = 15; 259 unsigned char alpha = 0xCC; 260 unsigned int z; 261 uint16_t point[2] = {scores_left,scores_top}; 262 //TSrContext_DrawText(TSrScores, "Name HP/HP", 0xCC, 0, point); 263 point[0] += 20; 264 TSrContext_DrawText(TSrScores, "Name", alpha, 0, point); 265 point[0] += 100; 266 TSrContext_DrawText(TSrScores, "Dmg", alpha, 0, point); 267 point[0] += 30; 268 TSrContext_DrawText(TSrScores, "K", alpha, 0, point); 269 point[0] += 30; 270 TSrContext_DrawText(TSrScores, "D", alpha, 0, point); 271 point[0] += 30; 272 TSrContext_DrawText(TSrScores, "Health", alpha, 0, point); 273 point[0] = scores_left; 274 275 point[1] += line_height; 276 for(z = 0; z < MAX_CONNECTIONS; z++) 277 { 278 if(PlayerList[z]) 279 { 280 281 char tempString[32]; 282 283 sprintf(tempString, "%i", z); 284 TSrContext_DrawText(TSrScores, tempString, alpha, 0, point); 285 point[0] += 20; 286 287 288 TSrContext_DrawText(TSrScores, PlayerList[z]->Chr->Name, alpha, 0, point); 289 point[0] += 100; 290 291 sprintf(tempString, "%i", PlayerList[z]->Chr->Damage); 292 TSrContext_DrawText(TSrScores, tempString, alpha, 0, point); 293 point[0] += 30; 294 sprintf(tempString, "%i", PlayerList[z]->Chr->Kills); 295 TSrContext_DrawText(TSrScores, tempString, alpha, 0, point); 296 point[0] += 30; 297 sprintf(tempString, "%i", PlayerList[z]->player_data.Deaths); 298 TSrContext_DrawText(TSrScores, tempString, alpha, 0, point); 299 point[0] += 30; 300 if(PlayerList[z]->Chr->Health) 301 { 302 sprintf(tempString, "%i", PlayerList[z]->Chr->Health); 303 TSrContext_DrawText(TSrScores, tempString, alpha, 0, point); 304 point[0] += 25; 305 sprintf(tempString, "/%i", PlayerList[z]->Chr->MaxHealth); 306 TSrContext_DrawText(TSrScores, tempString, alpha, 0, point); 307 } 308 else 309 { 310 TSrContext_SetShade(TSrScores, 0x00FF0000); 311 TSrContext_DrawText(TSrScores, "DEAD", alpha, 0, point); 312 TSrContext_SetShade(TSrScores, 0xFFFFFFFF); 313 } 314 point[0] = scores_left; 315 point[1] += line_height; 316 } 317 } 318 } 208 319 } 209 320 … … 214 325 struct hostent *host_entry; 215 326 gethostname(szHostName, 255); 216 327 FLrInit_Scores(); 217 328 host_entry=gethostbyname(szHostName); 218 329 DDrConsole_PrintF("Server started at %s...", inet_ntoa (*(struct in_addr *)*host_entry->h_addr_list)); … … 286 397 ActiveCharacter * Active; 287 398 flatline_packet packet; 399 FLrInit_Scores(); 288 400 //#define SPAM_INPUT 289 401 #ifdef SPAM_INPUT … … 329 441 COrMessage_Print(packet.data, "chat", 0); 330 442 break; 443 case NULL_PACKET: 444 if(1) 445 { 446 int p; 447 char arr[9999]; 448 for (p = 0; p < len; p++) 449 { 450 sprintf(arr,"%x",((char*)&packet)[p]); 451 } 452 DDrStartupMessage(arr); 453 } 454 break; 331 455 case CONNECT_SEND: 332 456 ;if(1) { … … 340 464 ;if(1) { //haxhaxhax 341 465 CharacterObject* Char = &(packet.new_player.Character); 342 uint32_t chr_index = 0;466 uint32_t chr_index = packet.new_player.Playernumber; 343 467 Character* PC; 344 468 DDrConsole_PrintF("%i | %i", packet.new_player.Playernumber ,client_slot); … … 352 476 else { 353 477 ONrGameState_NewCharacter(Char, NULL, NULL, &chr_index); 354 ONgGameState->CharacterStorage[chr_index]. field_1E8= 0;478 ONgGameState->CharacterStorage[chr_index].charType = 0; 355 479 PlayerList[packet.new_player.Playernumber] = &Players[chr_index]; 356 480 Players[chr_index].Chr = &(ONgGameState->CharacterStorage[chr_index]); 357 481 Players[chr_index].Chr->Flags &= 0xFFBFFFFF; 482 Players[chr_index].Chr->MaxHealth = 200; 358 483 Players[chr_index].spawnnumber = chr_index; 359 484 DDrConsole_PrintF("Spawning player %s, class %s, slot %i", ((new_player*)(packet.data))->Character.OSD.Name, ((new_player*)(packet.data))->Character.OSD.Class,chr_index) ; … … 404 529 sync_request.id = RARE_SYNC_DATA_REQUEST; 405 530 sync_request.sync_request = i; 406 DDrConsole_PrintF( "Requesting sync data for player %i, old index %u", i, PlayerList[i]->rare_sync_index);531 //DDrConsole_PrintF( "Requesting sync data for player %i, old index %u, new index %i", i, PlayerList[i]->rare_sync_index, data->rare_sync_index); 407 532 sent_bytes = NetUDPSocket_Send(client_sock,(sockaddr *) &address, (char*)&sync_request, FLATLINE_HEADER + sizeof(int) ); 408 533 } … … 471 596 } 472 597 break; 473 598 case FLATLINE_EVENT: 599 FLcEvent_Handler(packet.flatline_event.event_index, packet.flatline_event.intArray); 474 600 default: 475 601 DDrConsole_PrintF("Warning, recieved badly formed packet!"); … … 514 640 static flatline_packet cache_input = {0}; 515 641 extern void* TSrTest; 642 643 void ONrCharacter_SetAnimationInternal(Character *ioCharacter, ActiveCharacter *ioActiveCharacter, 644 short inFromState, short inNextAnimType, const void *inAnimation) 645 { 646 void *characterClass = ioCharacter->ONCC; 647 //void *collection = ioCharacter->characterClass; 648 short index = ioCharacter->Number;//ONrCharacter_GetIndex(ioCharacter); 649 short animType; 650 if(inAnimation == NULL) return; 651 //UUmAssert(NULL != inAnimation); 652 653 animType = *((char*)inAnimation + 0x15A); 654 655 ioActiveCharacter->Animation = inAnimation; 656 ioActiveCharacter->Frame = 0; 657 ioActiveCharacter->AnimationFromState = inFromState; 658 ioActiveCharacter->AnimationType = animType; 659 ioActiveCharacter->NextAnimationType = inNextAnimType; 660 ioActiveCharacter->AnimationToState = TRrAnimation_GetTo((void *)inAnimation); 661 662 //UUmAssertTrigRange(ioCharacter->facing); 663 664 /* if (gDebugCharacters && (index == gDebugCharacterTarget)) { 665 COrConsole_Printf("anim %s state %s type %s length %d", 666 TRrAnimation_GetName(inAnimation), 667 ONrAnimStateToString(TRrAnimation_GetTo(inAnimation)), 668 ONrAnimTypeToString(TRrAnimation_GetType(inAnimation)), 669 TRrAnimation_GetDuration(inAnimation)); 670 }*/ 671 672 return; 673 } 674 675 char ONrAnimState_IsFallen(short inAnimState) 676 { 677 char result = false; 678 679 switch(inAnimState) 680 { 681 case 18://ONcAnimState_Fallen_Back: 682 case 50://ONcAnimState_Fallen_Front: 683 result = true; 684 break; 685 } 686 687 return result; 688 } 689 690 void FLrRespawn(int i) 691 { 692 DDrConsole_Print( "Respawn!"); 693 ONrCorpse_Create(PlayerList[i]->Chr); 694 ONrCharacter_SetHitPoints( PlayerList[i]->Chr, PlayerList[i]->Chr->MaxHealth); 695 } 516 696 void * ONICALL FLrInput_Update_Keys(void) 517 697 { … … 525 705 */ 526 706 ActiveCharacter * Active_Player = ONgGameState->ActiveCharacters; 527 Active_Player->PhyContext->Rotation;528 Active_Player->PhyContext->Position;529 ONgGameState->PlayerCharacter->Position;707 //Active_Player->PhyContext->Rotation; 708 //Active_Player->PhyContext->Position; 709 //ONgGameState->PlayerCharacter->Position; 530 710 531 711 … … 564 744 } 565 745 #endif 566 //Testing drawing text to the screen...this failed. Will need to get it working eventually. 567 if( TSrTest ) 568 { 569 // OniRectangle TextRect = { 128, 128, 256, 256 }; 570 IMtPoint2D Point = {50, 50}; 571 //TSrContext_DrawText(TSrTest, "Testing woohoo", 255, 0, &Point); 572 TSrContext_DrawText(TSrTest, "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW", 255, 0, &Point); 573 574 } 746 575 747 if(!(server_started || client_connected)) return ONgGameState; 576 748 … … 579 751 GameInput * Active_Input; 580 752 if(PlayerList[i] == 0) continue; 581 582 //is this right? 583 Active_Player = (void*)ONrGetActiveCharacter( PlayerList[i]->Chr); 584 753 if( !PlayerList[i]->Chr || (PlayerList[i]->flags == PF_SCRIPTEDAI && PlayerList[i]->Chr->Flags & ONcCharacterFlag_Dead ) ) 754 { 755 PlayerDisconnect(i); 756 continue; 757 } 758 PlayerList[i]->Chr->Inventory.Weapons[0] = 0; 759 PlayerList[i]->Chr->Inventory.Weapons[1] = 0; 760 PlayerList[i]->Chr->Inventory.Weapons[2] = 0; 761 if( !client_connected && PlayerList[i]->Chr->Flags & ONcCharacterFlag_Dead )//dead 762 { 763 char doRespawn = false; 764 uint32_t Actions1Bitmask = Action_Punch | Action_Kick; 765 uint32_t Actions2Bitmask = Action2_Fire1 | Action2_Fire2; 766 if(client_connected) continue; 767 if(PlayerList[i]->state == STATE_ALIVE) 768 { 769 PlayerList[i]->state = STATE_DEAD; 770 PlayerList[i]->player_data.Deaths++; 771 } 772 if((i == 0 && ( ONgGameState->Input.Current.Actions1 & Actions1Bitmask || ONgGameState->Input.Current.Actions2 & Actions2Bitmask )) 773 || (PlayerList[i]->Actions1 & Actions1Bitmask) || (PlayerList[i]->Actions2 & Actions2Bitmask) ) 774 { 775 FLrRespawn(i); 776 PlayerList[i]->state = STATE_ALIVE; 777 } 778 continue; 779 } 780 else 781 { 782 Active_Player = (void*)ONrGetActiveCharacter( PlayerList[i]->Chr); 783 // if(Active_Player == 0) continue; 784 //Active_Input = &(Active_Player->Input); 785 if(server_started) { 786 player_data * data; 787 flatline_packet data_out = {0}; 788 789 //if( PlayerList[i]->Chr->Health == 0) PlayerList[i]->Chr->Health = PlayerList[i]->Chr->MaxHealth; 790 791 data_out.id = PLAYER_DATA; 792 data = (void*)&(data_out.data); 793 data->Deaths = PlayerList[i]->player_data.Deaths; 794 data->PlayerNum = i; 795 data->Kills = PlayerList[i]->Chr->Kills; 796 data->Damage = PlayerList[i]->Chr->Damage; 797 data->Health = PlayerList[i]->Chr->Health; 798 data->MaxHealth = PlayerList[i]->Chr->MaxHealth; 799 data->Facing = PlayerList[i]->Chr->Facing; 800 data->DesiredFacing = PlayerList[i]->Chr->DesiredFacing; 801 if(Active_Player && Active_Player->PhyContext) 802 data->Position = Active_Player->PhyContext->Position; 803 804 if( PlayerList[i]->OldClass != PlayerList[i]->Chr->ONCC || memcmp( &(PlayerList[i]->Inventory), &(PlayerList[i]->Chr->Inventory), sizeof(Inventory) ) ) 805 { 806 PlayerList[i]->OldClass = PlayerList[i]->Chr->ONCC; 807 memcpy( &(PlayerList[i]->Inventory), &(PlayerList[i]->Chr->Inventory), sizeof(Inventory) ); 808 PlayerList[i]->rare_sync_index++; 809 810 } 811 data->rare_sync_index = PlayerList[i]->rare_sync_index; 812 if(Active_Player) 813 { 814 data->Frame = Active_Player->Frame; 815 memcpy(data->Animation, TMrInstance_GetInstanceName(Active_Player->Animation), 32); 816 817 if(Active_Player->targetThrow) 818 { 819 ActiveCharacter* Target = ONrGetActiveCharacter(Active_Player->ThrowTargetCharacter); 820 if(Target) 821 { 822 data->throw_data.throwing = Players[Active_Player->throwing].list_slot; 823 data->throw_data.throwFrame = Target->Frame; 824 strcpy_s(data->throw_data.throwName, 32, TMrInstance_GetInstanceName(Active_Player->targetThrow)); 825 } 826 } 827 } 828 if(i == 0) { 829 data->Inputs.Actions1 = ((GameState*)(ONgGameState))->Input.Current.Actions1; 830 data->Inputs.Actions2 = ((GameState*)(ONgGameState))->Input.Current.Actions2; 831 data->Inputs.MouseDeltaX = ONgGameState->Input.MouseDeltaX; 832 data->Inputs.MouseDeltaY = ONgGameState->Input.MouseDeltaY; 833 } 834 else{ 835 data->Inputs.Actions1 = PlayerList[i]->Actions1; 836 data->Inputs.Actions2 = PlayerList[i]->Actions2; 837 data->Inputs.MouseDeltaX = PlayerList[i]->MouseDeltaX; 838 data->Inputs.MouseDeltaY = PlayerList[i]->MouseDeltaY; 839 } 840 memcpy( &(PlayerList[i]->player_data), data, sizeof(player_data) ); 841 842 UDPServer_SendToAll(&data_out, sizeof(player_data) + FLATLINE_HEADER); 843 } 844 } 585 845 if(Active_Player == 0) continue; 586 Active_Input = &(Active_Player->Input); 587 if(server_started) { 588 player_data * data; 589 flatline_packet data_out = {0}; 590 591 //if( PlayerList[i]->Chr->Health == 0) PlayerList[i]->Chr->Health = PlayerList[i]->Chr->MaxHealth; 592 593 data_out.id = PLAYER_DATA; 594 data = (void*)&(data_out.data); 595 data->PlayerNum = i; 596 data->Health = PlayerList[i]->Chr->Health; 597 data->MaxHealth = PlayerList[i]->Chr->MaxHealth; 598 data->Position = PlayerList[i]->Chr->Position; 599 data->Location = PlayerList[i]->Chr->Location; 600 data->LastPosition = PlayerList[i]->Chr->LastPosition; 601 data->Facing = PlayerList[i]->Chr->Facing; 602 data->DesiredFacing = PlayerList[i]->Chr->DesiredFacing; 603 data->CosmeticFacing = PlayerList[i]->Chr->CosmeticFacing; 604 605 606 data->Position = Active_Player->PhyContext->Position; 607 608 if( PlayerList[i]->OldClass != PlayerList[i]->Chr->ONCC || memcmp( &(PlayerList[i]->Inventory), &(PlayerList[i]->Chr->Inventory), sizeof(Inventory) ) ) 609 { 610 PlayerList[i]->OldClass = PlayerList[i]->Chr->ONCC; 611 memcpy( &(PlayerList[i]->Inventory), &(PlayerList[i]->Chr->Inventory), sizeof(Inventory) ); 612 PlayerList[i]->rare_sync_index++; 613 614 } 615 616 data->rare_sync_index = PlayerList[i]->rare_sync_index; 617 618 #if 0 619 data->Frame = Active_Player->Frame; 620 memcpy(data->Animation, TMrInstance_GetInstanceName(Active_Player->Animation), 32); 621 data->AnimationToState = Active_Player->AnimationToState; 622 data->AnimationFromState = Active_Player->AnimationFromState; 623 data->AnimationType = Active_Player->AnimationType; 624 data->NextAnimationType = Active_Player->NextAnimationType; 625 data->InterpolationCurrentFrame = Active_Player->InterpolationCurrentFrame; 626 data->InterpolationFromState = Active_Player->InterpolationFromState; 627 data->InterpolationLength = Active_Player->InterpolationLength; 628 memcpy(data->InterpolationStartRotations, Active_Player->InterpolationStartRotations, 629 sizeof(Quaternion) * 19); 630 // data->InterpolationStartRotations = Active_Player->InterpolationStartRotations; 631 memcpy(data->BoneMatrices, Active_Player->BoneMatrices, 632 sizeof(Quaternion) * 19); 633 data->Stitch = Active_Player->Stitch; 634 data->StitchHeight = Active_Player->StitchHeight; 635 data->StitchVelocity = Active_Player->StitchVelocity; 636 637 data->Overlay = Active_Player->Overlay; 638 memcpy( data->OverlayRotations, Active_Player->OverlayRotations 639 ,sizeof(Quaternion) * 19); 640 #endif 641 if(i == 0) { 642 data->Inputs.Actions1 = ((GameState*)(ONgGameState))->Input.Current.Actions1; 643 data->Inputs.Actions2 = ((GameState*)(ONgGameState))->Input.Current.Actions2; 644 data->Inputs.MouseDeltaX = ONgGameState->Input.MouseDeltaX; 645 data->Inputs.MouseDeltaY = ONgGameState->Input.MouseDeltaY; 646 } 647 else{ 648 data->Inputs.Actions1 = PlayerList[i]->Actions1; 649 data->Inputs.Actions2 = PlayerList[i]->Actions2; 650 data->Inputs.MouseDeltaX = PlayerList[i]->MouseDeltaX; 651 data->Inputs.MouseDeltaY = PlayerList[i]->MouseDeltaY; 652 } 653 memcpy( &(PlayerList[i]->player_data), data, sizeof(player_data) ); 654 655 UDPServer_SendToAll(&data_out, sizeof(player_data) + FLATLINE_HEADER); 656 } 657 846 else Active_Input = &(Active_Player->Input); 658 847 if( (server_started && i !=0) || (!server_started/* && i != client_slot*/) ) 659 848 { 660 //this just made sync even worse...661 #ifdef JITTER_FIX662 input_struct * New_Input = &PlayerList[i]->MouseDeltaX;663 input_struct * Cache_Input = &PlayerList[i]->CacheInput;664 Active_Input->Stop.Actions1 = ~Cache_Input->Actions1 & Active_Input->Current.Actions1;665 Active_Input->Stop.Actions2 = ~Cache_Input->Actions2 & Active_Input->Current.Actions2;666 Active_Input->Start.Actions1 = ~Active_Input->Current.Actions1 & Cache_Input->Actions1;667 Active_Input->Start.Actions2 = ~Active_Input->Current.Actions2 & Cache_Input->Actions2;668 Active_Input->Current.Actions1 = Cache_Input->Actions1;669 Active_Input->Current.Actions2 = Cache_Input->Actions2;670 Active_Input->Stopped.Actions1 = ~Active_Input->Current.Actions1;671 Active_Input->Stopped.Actions2 = ~Active_Input->Current.Actions2;672 Active_Input->MouseDeltaX = Cache_Input->MouseDeltaX;673 Active_Input->MouseDeltaY = Cache_Input->MouseDeltaY;674 memcpy( Cache_Input, New_Input, sizeof(input_struct));675 #else676 677 849 Active_Input->Stop.Actions1 = ~PlayerList[i]->Actions1 & Active_Input->Current.Actions1; 678 850 Active_Input->Stop.Actions2 = ~PlayerList[i]->Actions2 & Active_Input->Current.Actions2; … … 699 871 */ 700 872 701 702 #endif 703 704 #ifdef BETTER_SYNC 705 if( !server_started && PlayerList[i]->player_data.Health != 0) { 706 PlayerList[i]->Chr->Health = PlayerList[i]->player_data.Health; 707 PlayerList[i]->Chr->MaxHealth = PlayerList[i]->player_data.MaxHealth; 708 PlayerList[i]->Chr->Position = PlayerList[i]->player_data.Position; 709 PlayerList[i]->Chr->Location = PlayerList[i]->player_data.Location; 710 PlayerList[i]->Chr->LastPosition = PlayerList[i]->player_data.LastPosition; 711 PlayerList[i]->Chr->Facing = PlayerList[i]->player_data.Facing; 712 PlayerList[i]->Chr->DesiredFacing = PlayerList[i]->player_data.DesiredFacing; 713 PlayerList[i]->Chr->CosmeticFacing = PlayerList[i]->player_data.CosmeticFacing; 714 PlayerList[i]->Actions1 = PlayerList[i]->player_data.Inputs.Actions1; 715 PlayerList[i]->Actions2 = PlayerList[i]->player_data.Inputs.Actions2; 716 PlayerList[i]->MouseDeltaX = PlayerList[i]->player_data.Inputs.MouseDeltaX; 717 PlayerList[i]->MouseDeltaY = PlayerList[i]->player_data.Inputs.MouseDeltaY; 718 Active_Player->PhyContext->Position = PlayerList[i]->player_data.Position; 719 } 720 #endif 721 873 if( !server_started ) 874 { 875 if(PlayerList[i]->player_data.Health != 0) 876 { 877 Character* character = PlayerList[i]->Chr; 878 void* animation; 879 void* prev_character_animation = Active_Player->Animation; 880 int error; 881 td* throw_data= &PlayerList[i]->player_data.throw_data; 882 883 if(PlayerList[i]->Chr->Flags & ONcCharacterFlag_Dead) 884 { 885 FLrRespawn(i); 886 } 887 888 PlayerList[i]->Chr->Health = PlayerList[i]->player_data.Health; 889 PlayerList[i]->Chr->MaxHealth = PlayerList[i]->player_data.MaxHealth; 890 PlayerList[i]->Chr->Facing = PlayerList[i]->player_data.Facing; 891 PlayerList[i]->Chr->DesiredFacing = PlayerList[i]->player_data.DesiredFacing; 892 PlayerList[i]->Actions1 = PlayerList[i]->player_data.Inputs.Actions1; 893 PlayerList[i]->Actions2 = PlayerList[i]->player_data.Inputs.Actions2; 894 PlayerList[i]->MouseDeltaX = PlayerList[i]->player_data.Inputs.MouseDeltaX; 895 PlayerList[i]->MouseDeltaY = PlayerList[i]->player_data.Inputs.MouseDeltaY; 896 PlayerList[i]->Chr->Damage = PlayerList[i]->player_data.Damage; 897 PlayerList[i]->Chr->Kills = PlayerList[i]->player_data.Kills; 898 if(Active_Player->PhyContext) 899 Active_Player->PhyContext->Position = PlayerList[i]->player_data.Position; 900 901 if (!(character->Flags & ONcCharacterFlag_BeingThrown/*ONcCharacterFlag_BeingThrown*/) && 902 (PlayerList[i]->player_data.Animation[0] != '\0')) 903 { 904 // get a pointer to the animation 905 error = 906 TMrInstance_GetDataPtr( 907 'TRAM', 908 PlayerList[i]->player_data.Animation, 909 &animation); 910 if (error == 0) 911 { 912 short num_frames; 913 char updateAnimation = true; 914 915 // if the character is dead, make sure this animation is appropriate for death 916 if (character->Flags & 0x00000001) 917 { 918 int curToState = TRrAnimation_GetTo(Active_Player->Animation); 919 int newToState = TRrAnimation_GetTo(animation); 920 921 // if we are currently heading towards fallen and the new animation would not 922 // then this is a better animation to run when we are dead 923 if ((ONrAnimState_IsFallen(curToState)) && 924 (!ONrAnimState_IsFallen(newToState))) 925 { 926 updateAnimation = false; 927 } 928 } 929 930 if ((updateAnimation) && (Active_Player->Animation == animation)) 931 { 932 int oldFrame = Active_Player->Frame; 933 int newFrame = PlayerList[i]->player_data.Frame; 934 935 if (abs(oldFrame - newFrame) < 2) 936 { 937 updateAnimation = false; 938 } 939 } 940 941 if (updateAnimation) 942 { 943 // set the characters animation 944 ONrCharacter_SetAnimationInternal( 945 character, Active_Player, 946 TRrAnimation_GetFrom(Active_Player->Animation), 947 0, 948 animation); 949 //PlayerList[i]->player_data.Animation[0] = 0; 950 } 951 952 num_frames = TRrAnimation_GetDuration(Active_Player->Animation); 953 954 if (PlayerList[i]->player_data.Frame >= num_frames) 955 { 956 Active_Player->Frame = num_frames - 1; 957 } 958 else 959 { 960 Active_Player->Frame = PlayerList[i]->player_data.Frame ; 961 } 962 } 963 } 964 965 if (throw_data->throwName[0] && PlayerList[throw_data->throwing]) 966 { 967 int realIndex = PlayerList[throw_data->throwing]->Chr->Number; 968 if ((throw_data->throwing != 0xFFFF) && 969 (realIndex != Active_Player->throwing) && 970 (throw_data->throwFrame < 10)) 971 { 972 void *throw_animation; 973 ActiveCharacter* Target; 974 975 // get the animation 976 error = 977 TMrInstance_GetDataPtr( 978 'TRAM', 979 throw_data->throwName, 980 &throw_animation); 981 if (error != 0) return ONgGameState; 982 983 // set the throw target 984 Active_Player->ThrowTargetCharacter = &ONgGameState->CharacterStorage[realIndex]; 985 Target = ONrGetActiveCharacter(Active_Player->ThrowTargetCharacter); 986 if(Target) 987 { 988 if ((Target->Animation != throw_animation) && 989 (prev_character_animation != animation) && 990 !(Active_Player->ThrowTargetCharacter->Flags & ONcCharacterFlag_BeingThrown)) 991 { 992 // set the throw variables 993 Active_Player->targetThrow = throw_animation; 994 Active_Player->throwing = realIndex; 995 996 // run the throw 997 ONrCharacter_NewAnimationHook(character, Active_Player); 998 if (Active_Player->ThrowTargetCharacter) 999 { 1000 Target->Frame += 2; 1001 Target->thrownBy = character->Number; 1002 DDrConsole_PrintF("Thrownby %i!!!!", Target->thrownBy); 1003 DDrStartupMessage("Thrownby %i!!!!", Target->thrownBy); 1004 } 1005 } 1006 } 1007 } 1008 } 1009 } 1010 1011 } 722 1012 } 723 1013 } … … 725 1015 return ONgGameState; 726 1016 } 1017 1018 int EventPlusArgs[EV_MAX + 1][2] = 1019 { 1020 {EV_RESPAWN, 1}, 1021 {EV_DISCONNECT, 1}, 1022 {EV_DOOR_OPEN, 1}, 1023 {EV_MAX, 0}, 1024 }; 1025 1026 int FLrEvent_GetNumArgs( int eventIndex ) 1027 { 1028 return EventPlusArgs[1][eventIndex]; 1029 1030 } 1031 1032 char * FLrHook_DoorOpen( DoorObject *inDoor, Character *Char) 1033 { 1034 if(server_started) 1035 { 1036 FLsPublic_Event( EV_DOOR_OPEN, &inDoor->Door.ID ); 1037 } 1038 return (inDoor->Door.class); 1039 } -
Daodan/MSVC/Flatline.h
r568 r573 108 108 //AC->HeadPitch 109 109 typedef struct { 110 uint16_t throwing; 111 uint16_t throwFrame; 112 char throwName[32]; 113 } td; 114 typedef struct { 110 115 uint16_t PlayerNum; 111 116 Vector3 Position; 112 Vector3 LastPosition;113 Vector3 Location;114 117 float Facing; 115 118 float DesiredFacing; 116 float CosmeticFacing;117 119 uint32_t Health; 118 120 uint32_t MaxHealth; 119 121 input_struct Inputs; 120 122 int rare_sync_index; 121 //__int16 Varient; 122 #if 0 123 char Animation[32]; 123 124 uint16_t Frame; 124 char Animation[32]; 125 uint16_t AnimationToState; 126 uint16_t AnimationFromState; 127 uint16_t AnimationType; 128 uint16_t NextAnimationType; 129 uint16_t AnimationType2; 130 __int16 InterpolationCurrentFrame; 131 __int16 InterpolationFromState; 132 __int16 InterpolationLength; 133 Quaternion InterpolationStartRotations[19]; 134 Vector3 StitchVelocity; 135 int StitchHeight; 136 char Stitch; 137 Quaternion BoneMatrices[19]; 138 int Overlay; 139 Quaternion OverlayRotations[19]; 140 #endif 125 td throw_data; 126 int Kills; 127 int Damage; 128 int Deaths; 129 141 130 } player_data; 142 131 … … 149 138 } rare_sync_data; 150 139 140 typedef struct { 141 unsigned int event_index; 142 int intArray[]; 143 } flatline_event; 144 151 145 //used for storing data about each player 152 146 typedef struct { … … 154 148 char id; 155 149 int packet_index; 156 union payload150 union 157 151 { 158 152 char data[1080]; … … 165 159 rare_sync_data rare_sync_data; 166 160 uint16_t sync_request; 161 flatline_event flatline_event; 167 162 }; 168 163 } flatline_packet; … … 177 172 178 173 enum { 174 NULL_PACKET, // 179 175 CONNECT_SEND, 180 176 CONNECT_REPLY, … … 188 184 RARE_SYNC_DATA, 189 185 RARE_SYNC_DATA_REQUEST, 190 }; 191 192 186 FLATLINE_EVENT, 187 }; 188 189 enum FlatlineEvent { 190 EV_RESPAWN, 191 EV_DISCONNECT, 192 EV_DOOR_OPEN, 193 EV_MAX, 194 }; 195 196 197 198 199 enum { 200 STATE_ALIVE, 201 STATE_DEAD, 202 }; 203 enum { 204 PF_HOST, 205 PF_BOT, 206 PF_SCRIPTEDAI, 207 }; 193 208 typedef struct { 194 209 int ip; … … 198 213 uint16_t spawnnumber; 199 214 uint16_t list_slot; 200 201 215 float MouseDeltaX; 202 216 float MouseDeltaY; … … 205 219 unsigned int LastInputTime; 206 220 input_struct CacheInput; 207 208 221 player_data player_data; 209 210 222 unsigned int rare_sync_index; 211 223 void* OldClass; 212 224 Inventory Inventory; 225 uint16_t state; 226 int flags; 213 227 } player_info; 214 228 … … 233 247 extern bool server_started; 234 248 extern char player_name[]; 235 249 void FLrRun_Scores(); 250 void PlayerDisconnect( int Player ); 251 int FLrEvent_GetNumArgs( int eventIndex ); 236 252 #endif -
Daodan/MSVC/Flatline_BSL.c
r569 r573 41 41 NetUDPSocket_Send(client_sock, (sockaddr*)&address, (char*)&packet, 257); 42 42 } 43 if(server_started) 44 { 45 sprintf_s(PlayerList[0]->Chr->Name,32, args[0].value_str32); 46 } 43 47 return 0; 44 48 } … … 118 122 { 119 123 player_info * info; 120 info = FLrServer_AddPlayer( 0, "Fake", 0 ); 121 info->Actions1 = Action_Forward; 122 return 0; 124 info = FLrServer_AddPlayer( 0, "shinny", 0 , 1); 125 return 0; 126 } 127 128 uint16_t ONICALL kick(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) 129 { 130 PlayerDisconnect(args[0].value_int32); 131 return 0; 132 } 133 134 CharacterObject* spawnObject = 0; 135 char BINACHARCallback(CharacterObject* inObj, char* userdata) 136 { 137 if(strcmp(userdata, inObj->OSD.Name)) 138 { 139 return 1; 140 } 141 spawnObject = inObj; 142 return 0; 143 } 144 uint16_t ONICALL FLrSpawnHack(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) 145 { 146 flatline_packet new_char = {0}; 147 int i; 148 if(client_connected) return 0; 149 AI2iScript_Spawn(callinfo, numargs, args, dontuse1, dontuse2, ret); 150 if(!server_started) return 0; 151 for(i = 0; i < 64; i++) 152 { 153 if(!strcmp(ONgGameState->CharacterStorage[i].Name, args[0].value_str32)) 154 { 155 //DDrConsole_PrintF("%s spawned, slot %i", args[0].value_str32, i); 156 int playerlist_slot = FLr_FindEmptyListSlot(); 157 int player_slot = i; 158 new_char.new_player.Playernumber = playerlist_slot; 159 new_char.id = NEW_PLAYER; 160 OBJrObjectType_EnumerateObjects('CHAR',BINACHARCallback, (int)args[0].value_str32); 161 // while(!spawnObject); 162 if(spawnObject) 163 { 164 memcpy(&new_char.new_player.Character, spawnObject, sizeof(CharacterObject) ); 165 } 166 else return 1; 167 //new_char.new_player.Character; 168 PlayerList[playerlist_slot] = Players+player_slot; 169 PlayerList[playerlist_slot]->spawnnumber = player_slot; 170 PlayerList[playerlist_slot]->Chr = &((Character *)(((GameState * )(ONgGameState))->CharacterStorage))[player_slot]; 171 // PlayerList[playerlist_slot]->Chr->Flags = chr_dontaim | chr_unkillable; //&= 0xFFBFFFFF; //WTF 172 // if(!is_bot) PlayerList[playerlist_slot]->Chr->Flags &= 0xFFBFFFFF; //WTF 173 // sprintf(PlayerList[playerlist_slot]->Chr->Name, "%.31s", name); 174 UDPServer_SendToAll( (char*)&new_char, sizeof(new_player) + FLATLINE_HEADER ); 175 PlayerList[playerlist_slot]->flags = PF_SCRIPTEDAI; 176 PlayerList[playerlist_slot]->list_slot = playerlist_slot; 177 return 0; 178 } 179 } 180 181 return 0; 123 182 } 124 183 … … 140 199 141 200 DDrPatch_MakeCall(0x004FA88B, FLrInput_Update_Keys); 142 201 FLrInput_Update_Keys(); 143 202 SLrGlobalVariable_Register_Int32("skip", "skips", &(((GameState*)ONgGameState)->field_40) ); 144 203 SLrScript_Command_Register_ReturnType("connect","Connects to a server", "ip:string", sl_void, connect_to_server); 145 204 SLrScript_Command_Register_Void("host","Starts a server", "", start_server); 146 205 SLrScript_Command_Register_Void("msg","Sends a message", "", send_message); 147 SLrScript_Command_Register_ReturnType("name","changes your name", "name:str ", sl_void, change_name);206 SLrScript_Command_Register_ReturnType("name","changes your name", "name:string", sl_void, change_name); 148 207 SLrScript_Command_Register_Void("status","shows the connection status", "", status); 149 208 SLrGlobalVariable_Register_String("country", "Your Multiplayer country", player_name); 150 SLrScript_Command_Register_ReturnType("addfakeclient","adds a fake client", "", sl_void, addfake); 151 } 209 SLrScript_Command_Register_ReturnType("addbot","adds a fake client", "", sl_void, addfake); 210 SLrScript_Command_Register_Void("kick", "Kicks a client from the server", "clientnum:int", kick); 211 //SLrScript_Command_Register_ReturnType("ai2_spawn","creates and starts an AI from a character object","ai_name:string [force_spawn:string{\"force\"} | ]", sl_void, spawnAI); 212 } -
Daodan/MSVC/Flatline_BSL.h
r567 r573 3 3 4 4 void SLrFlatline_Initialize(); 5 5 uint16_t ONICALL FLrSpawnHack(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret); 6 6 #endif -
Daodan/MSVC/Flatline_Server.c
r568 r573 5 5 uint16_t max_connections = MAX_CONNECTIONS; 6 6 7 player_info* FLrServer_AddPlayer(int ip, char* name, bool is_server ) {7 player_info* FLrServer_AddPlayer(int ip, char* name, bool is_server, bool is_bot) { 8 8 flatline_packet new_char = {0}; 9 9 CharacterObject* Char; … … 38 38 //memset( new_char, 0, sizeof(new_char); 39 39 //new_char = {0}; 40 new_char.new_player.Playernumber = playerlist_slot; 40 41 Char = &new_char.new_player.Character; 41 42 memset(Char, 0, sizeof(CharacterObject)); … … 44 45 sprintf(Char->OSD.Name,"%s",name); 45 46 sprintf(Char->OSD.Class, "%s", "konoko_generic"); 46 47 47 if(is_bot) { 48 Char->OSD.MeleeID = 22; 49 Char->OSD.JobID = 1; 50 Char->OSD.MinimalAlertLevel = 4; 51 Char->OSD.InvestigatingAlertLevel = 4; 52 Char->OSD.InitialAlertLevel = 4; 53 Char->OSD.StartJobAlertLevel = 4; 54 } 55 else if( !is_server ) 56 { 57 Char->Header.Position.X = PlayerList[0]->Chr->Position.X; 58 Char->Header.Position.Y = PlayerList[0]->Chr->Position.Y; 59 Char->Header.Position.Z = PlayerList[0]->Chr->Position.Z; 60 } 48 61 49 62 //TMrInstance_GetDataPtr('ONCC', "striker_easy_1", PlayerList[playerlist_slot]->Chr->ONCC); … … 54 67 ONrGameState_NewCharacter(Char, NULL, NULL, &(player_slot)); 55 68 //move this to a set up characters function... 56 ONgGameState->CharacterStorage[player_slot].field_1E8= 0;69 if(!is_bot) ONgGameState->CharacterStorage[player_slot].charType = 0; 57 70 58 71 PlayerList[playerlist_slot] = Players+player_slot; … … 60 73 PlayerList[playerlist_slot]->Chr = &((Character *)(((GameState * )(ONgGameState))->CharacterStorage))[player_slot]; 61 74 // PlayerList[playerlist_slot]->Chr->Flags = chr_dontaim | chr_unkillable; //&= 0xFFBFFFFF; //WTF 62 PlayerList[playerlist_slot]->Chr->Flags &= 0xFFBFFFFF; //WTF75 if(!is_bot) PlayerList[playerlist_slot]->Chr->Flags &= 0xFFBFFFFF; //WTF 63 76 sprintf(PlayerList[playerlist_slot]->Chr->Name, "%.31s", name); 64 77 UDPServer_SendToAll( (char*)&new_char, sizeof(new_player) + FLATLINE_HEADER ); … … 82 95 83 96 void FLrServer_Initialize(){ 84 FLrServer_AddPlayer(inet_addr("127.0.0.1"), "host", 1 );97 FLrServer_AddPlayer(inet_addr("127.0.0.1"), "host", 1, 0); 85 98 } 86 99 … … 107 120 return players; 108 121 } 122 123 void FLsPublic_Event( unsigned int eventIndex, int * args ) 124 { 125 int numArgs = FLrEvent_GetNumArgs( eventIndex ); 126 flatline_packet eventPacket = {0}; 127 eventPacket.id = FLATLINE_EVENT; 128 eventPacket.flatline_event.event_index = eventIndex; 129 memcpy( eventPacket.flatline_event.intArray, args, sizeof(int) * numArgs ); 130 UDPServer_SendToAll( &eventPacket, sizeof(int) * (numArgs + 1) + FLATLINE_HEADER ); 131 } 132 -
Daodan/MSVC/Flatline_Server.h
r567 r573 8 8 9 9 extern uint16_t max_connections; 10 player_info* FLrServer_AddPlayer(int ip, char* name, bool is_server); 10 player_info* FLrServer_AddPlayer(int ip, char* name, bool is_server, bool is_bot); 11 void FLsPublic_Event( unsigned int eventIndex, int * args); 12 11 13 void FLrServer_Initialize(); 12 14 #endif -
Daodan/MSVC/Oni_Character.h
r567 r573 38 38 //We need a Oni_Structs #include file. 39 39 40 typedef enum { 41 ONcCharacterFlag_Dead_1_Animating = 0x00000001, // health is 0 42 ONcCharacterFlag_Dead = ONcCharacterFlag_Dead_1_Animating, 43 ONcCharacterFlag_Dead_2_Moving = 0x00000002, // no longer animating 44 ONcCharacterFlag_Dead_3_Cosmetic = 0x00000004, // no longer moving 45 ONcCharacterFlag_Dead_4_Gone = 0x00000008, // dead except but still drawn 40 46 47 ONcCharacterFlag_HastyAnim = 0x00000010, // do this queued animation ASAP 48 ONcCharacterFlag_Unkillable = 0x00000020, // the character cannot be killed, only defeated 49 ONcCharacterFlag_InfiniteAmmo = 0x00000040, // the character always has infinite ammo 50 ONcCharacterFlag_PleaseBlock = 0x00000080, // set if the character should block, cleared once block begins 51 52 ONcCharacterFlag_Unstoppable = 0x00000100, // this character cannot be knocked down, staggered, stunned, etc 53 ONcCharacterFlag_ScriptControl = 0x00000200, // set if the character is completely under script control 54 ONcCharacterFlag_DeathLock = 0x00000400, // this character should never die all the way 55 ONcCharacterFlag_WasUpdated = 0x00000800, // this character's animation was changed 56 57 ONcCharacterFlag_BeingThrown = 0x00001000, // this character is being thrown 58 ONcCharacterFlag_DontUseGunVarient = 0x00002000, // this character should not use a weapon varient 59 ONcCharacterFlag_Draw = 0x00004000, // DoFrame has been executed for this character 60 ONcCharacterFlag_InUse = 0x00008000, // this character is active and in use 61 62 ONcCharacterFlag_DontUseFightVarient = 0x00010000, 63 ONcCharacterFlag_NoCollision = 0x00020000, // no collision for this character 64 ONcCharacterFlag_Teleporting = 0x00040000, // this character is teleporting and does not accept collision 65 ONcCharacterFlag_NoCorpse = 0x00080000, // no corpse for this character 66 67 ONcCharacterFlag_ActiveLock = 0x00100000, // the character is locked active 68 ONcCharacterFlag_ChrAnimate = 0x00200000, // the character is currently runing a chr_animate command 69 ONcCharacterFlag_AIMovement = 0x00400000, // the character is using AI movement 70 ONcCharacterFlag_NeutralUninterruptable = 0x00800000, // running an uninterruptable neutral interaction 71 72 ONcCharacterFlag_NoShadow = 0x01000000, // 73 ONcCharacterFlag_Invincible = 0x02000000, // character is invincible 74 ONcCharacterFlag_NoAutoDrop = 0x04000000, // character should not automatically drop items when killed (invisibility, shield, LSI) 75 ONcCharacterFlag_RestrictedMovement = 0x08000000, // character cannot move fast (used for player holding barabbas' gun) 76 77 ONcCharacterFlag_Boss = 0x10000000, // character is a boss (used for final muro group fight) 78 ONcCharacterFlag_FinalFlash = 0x20000000, // 'final flash' has been played for this character's death 79 ONcCharacterFlag_BossShield = 0x40000000, // this character has the boss shield 80 ONcCharacterFlag_WeaponImmune = 0x80000000 // this character is immune to weapon damage 81 82 } ONtCharacterFlags; 83 84 typedef enum { 85 ONcCharacterFlag2_WeaponEmpty = 0x00000001, // character's weapon is empty, punch instead 86 ONcCharacterFlag2_UltraMode = 0x00000002 87 88 } ONtCharacterFlags2; 41 89 42 90 #endif -
Daodan/MSVC/Oni_GameState.h
r568 r573 361 361 } OSD_Header; 362 362 363 typedef struct 364 { 365 short ID; 366 short flags; 367 368 short keys; 369 short open_time; 370 371 float activate_radius_squared; 372 373 short state; 374 short blocked_frames; 375 376 short open_time_left; 377 short some_timer; 378 379 Vector3 center_offset; 380 char name[63]; 381 char pad; 382 void *class; 383 } DoorOSD; 384 385 typedef struct { 386 OSD_Header OSD; 387 DoorOSD Door; //incomplete 388 } DoorObject; 389 390 363 391 typedef struct { 364 392 int32_t Flags; … … 515 543 typedef struct { //Inventory 516 544 Weapon* Weapons[3]; 517 int16_t field_1A0; //10 bucks says this is the current weapon 545 int8_t z_forced_holster; 546 int8_t z_forced_holster_is_magic; 518 547 int16_t AmmoUsed; //Ammo given for the char to use 519 548 int16_t HypoUsed; //Hypo given for the char to use … … 522 551 int16_t HypoDropped; //Hypo the char drops 523 552 int16_t CellsDropped; //Cells the char drops 524 int16_t field_1A; //who knows? InverseHypoRegenRate?525 int16_t field_1C;526 int16_t field_1E;553 int16_t hypoRemaining; //who knows? InverseHypoRegenRate? 554 int16_t hypoTimer; 555 int16_t pad; 527 556 char hasLSI; 528 557 char field_1B5; 529 int16_t field_1B6;558 int16_t shieldDisplayAmount; 530 559 int16_t ShieldUsed; //Bullet shield given for the char to use 531 560 int16_t CloakUsed; //Phase Cloak given for the char to use 532 int32_t field_28; //probably bullet shield dropped561 int32_t numInvisibleFrames; //probably bullet shield dropped 533 562 int32_t DoorKeys; //Lol. We can use this later for other sorts of items. 534 563 } Inventory; … … 565 594 int NotifyKnowledgeCallback; 566 595 } AI2KnowledgeState; 567 568 /* 388 */ typedef struct //activecharacter569 {570 __int16 Number;571 __int16 field_2;572 PhyContext* PhyContext;573 SphereTreeNode SphereTree;574 SphereTreeNode SphereTree3[4];575 SphereTreeNode SphereTree2[2];576 __int16 field_B0;577 __int16 field_B2;578 __int16 field_B4;579 char field_B6;580 char gap_b7[1];581 Vector3 field_B8;582 Vector3 AccelerateWith;583 int field_D0;584 Vector3 field_D4;585 __int16 field_E0;586 char gap_e2[2];587 int field_E4;588 int field_E8;589 int field_EC;590 int field_F0;591 __int16 field_F4;592 __int16 IsInAir;593 Vector3 FallingVelocity;594 Vector3 JumpVelocity;595 char field_110;596 char field_111;597 __int16 field_112;598 __int16 field_114;599 char gap_116[2];600 int field_118;601 int field_11C;602 int field_120;603 int field_124;604 int field_128;605 int field_12C;606 BoundingSphere BoundingSphere;607 Vector3 field_140;608 Vector3 field_14C;609 int field_158;610 int field_15C;611 Vector3 Location;612 char gap_16c[24];613 int AkiraNode;614 int GraphNode;615 int PelvisHeight;616 int Movement_StatePtr;617 int ActiveWeapon;618 int field_198;619 int InventoryWeapon;620 char gap_1a0[2];621 __int16 RedAmmoClipCount;622 __int16 HypoCount;623 __int16 GreenAmmoClipCount;624 __int16 RedAmmoClipDropCount;625 __int16 HypoDropCount;626 __int16 GreenAmmoClipDropCount;627 __int16 field_1AE;628 __int16 InverseHypoRegenerationRate;629 char DropShield;630 char DropPhaseCloack;631 char field_1B4;632 char gap_1b5[1];633 __int16 field_1B6;634 __int16 Shield;635 __int16 PhaseCloacking;636 int field_1BC;637 char gap_1c0[4];638 __int16 field_1C4;639 char gap_1c6[10];640 int field_1D0;641 int field_1D4;642 char gap_1d8[4];643 int field_1DC;644 int NotIdleStartTime;645 int TimeToIdle;646 int field_1E8;647 char gap_1ec[4];648 int field_1F0;649 char gap_1f4[2048];650 int field_9F4;651 char gap_9f8[36];652 int field_A1C;653 char gap_a20[3020];654 int field_15EC;655 char gap_15f0[60];656 int field_162C;657 int field_1630;658 int field_1634;659 int field_1638;660 int field_163C;661 char gap_1640[8];662 BoundingBox BoundingBox;663 int field_1660;664 char gap_1664[4];665 int ShieldPower;666 char gap_166c[4];667 int NumberOfKills;668 int InflictedDamage;669 int field_1678;670 int field_167C;671 char gap_1680[8];672 __int16 field_1688;673 __int16 field_168A;674 int field_168C;675 int field_1690;676 char field_1694;677 char field_1695;678 __int16 field_1696;679 int field_1698;680 int field_169C;681 char gap_16a0[2];682 int field_16A2;683 char gap_16a6[994];684 char field_1A88;685 char field_1A89;686 char field_1A8A;687 char field_1A8B;688 Vector3 Executor_AimingDirection;689 int field_1A98;690 int field_1A9C;691 int Executor_ActualMovementMode;692 int field_1AA4;693 int field_1AA8;694 int field_1AAC;695 char Executor_HasFacingOverride;696 char gap_1ab1[3];697 int Executor_AimingSpeed;698 char field_1AB8;699 char Executor_HasMoveOverride;700 char gap_1aba[6];701 int field_1AC0;702 int field_1AC4;703 int Executor_FacingOverride;704 char Executor_HasAttackOverride;705 char gap_1acd[1];706 __int16 field_1ACE;707 __int16 field_1AD0;708 char gap_1ad2[6];709 int field_1AD8;710 int field_1ADC;711 int field_1AE0;712 int field_1AE4;713 char Executor_HasThrowOverride;714 char gap_1ae9[3];715 int field_1AEC;716 int field_1AF0;717 int field_1AF4;718 int Animation;719 __int16 AnimationToState;720 __int16 AnimationFromState;721 __int16 AnimationType;722 __int16 NextAnimationType;723 __int16 field_1B04;724 __int16 field_1B06;725 char Stitch;726 char gap_1b09[3];727 int StitchHeight;728 __int16 InterpolationFromState;729 char gap_1b12[2];730 Vector3 StitchVelocity;731 __int16 InterpolationCurrentFrame;732 __int16 InterpolationLength;733 Quaternion InterpolationStartRotations[19];734 char gap_1c54[4];735 int field_1C58;736 int field_1C5C;737 int field_1C60;738 int Overlay;739 __int16 field_1C68;740 __int16 field_1C6A;741 int field_1C6C;742 int field_1C70;743 __int16 field_1C74;744 char gap_1c76[2];745 int field_1C78;746 char gap_1c7c[12];747 __int16 Frame;748 __int16 SoftPause;749 __int16 HardPause;750 __int16 field_1C8E;751 int field_1C90;752 __int16 field_1C94;753 __int16 field_1C96;754 __int16 Dizzy;755 __int16 field_1C9A;756 int field_1C9C;757 __int16 AnimationVarient;758 __int16 TimeToPeace;759 char NumAnimationAttachedParticles;760 char gap_1ca5[1];761 __int16 field_1CA6;762 AttachedParticle AnimationAttachedParticles[16];763 int TRAMParticles;764 char FixedParticlesAttached;765 char FixedParticlesStarted;766 __int16 NumFixedParticles;767 AttachedParticle FixedParticles[16];768 __int16 CurrentAnimationType;769 char gap_1eb2[2];770 int field_1EB4;771 char field_1EB8;772 char gap_1eb9[33];773 __int16 field_1EDA;774 int field_1EDC;775 char gap_1ee0[4];776 int field_1EE4;777 int field_1EE8;778 int field_1EEC;779 Quaternion Rotations[19];780 Quaternion OverlayRotations[19];781 int field_2150;782 char gap_2154[4];783 GameInput Input;784 int PrevActions1;785 int PrevActions2;786 int SprintTimer;787 char field_2194;788 char field_2195;789 char gap_2196[2];790 Vector3 field_2198;791 int field_21A4;792 int field_21A8;793 int field_21AC;794 Vector3 field_21B0;795 int HeadFacing;796 int HeadPitch;797 int field_21C4;798 int field_21C8;799 int field_21CC;800 int field_21D0;801 char field_21D4;802 char gap_21d5[3];803 int field_21D8;804 char field_21DC;805 char field_21DD;806 char field_21DE;807 char field_21DF;808 char field_21E0;809 char HasAlternateTrigger;810 char field_21E2;811 char ReleaseTrigger;812 char ReleaseAlternateTrigger;813 char TurningLeft;814 char TurningRight;815 char gap_21e7[1];816 int field_21E8;817 int field_21EC;818 __int16 field_21F0;819 char gap_21f2[2];820 PlayingFilm PlayingFilm;821 char gap_2218[4];822 int field_221C;823 char gap_2220[8];824 int field_2228;825 char gap_222c[76];826 Matrix4x3 BoneMatrices[19];827 Matrix4x3 WeaponMatrix;828 char gap_2638[432];829 int field_27E8;830 char gap_27ec[4];831 __int16 field_27F0;832 __int16 field_27F2;833 int field_27F4;834 int field_27F8;835 __int16 ShadowIndex;836 char field_27FE;837 char gap_27ff[1];838 char field_2800;839 char field_2801;840 char ShieldParts[19];841 char field_2815;842 char gap_2816[2];843 int field_2818;844 __int16 field_281C;845 char gap_281e[2];846 int field_2820;847 int field_2824;848 int field_2828;849 int field_282C;850 __int16 field_2830;851 __int16 field_2832;852 char gap_2834[1];853 char field_2835;854 char field_2836;855 char field_2837;856 } ActiveCharacter;857 596 858 597 typedef struct … … 1071 810 int field_1E0; 1072 811 int IdleDelay; 1073 int field_1E8;812 int charType; 1074 813 char gap_1ec[4]; 1075 814 int CombatFlags; … … 1290 1029 ; 1291 1030 1031 /* 388 */ typedef struct //activecharacter 1032 { 1033 __int16 Number; 1034 __int16 field_2; 1035 PhyContext* PhyContext; 1036 SphereTreeNode SphereTree; 1037 SphereTreeNode SphereTree3[4]; 1038 SphereTreeNode SphereTree2[2]; 1039 __int16 field_B0; 1040 __int16 field_B2; 1041 __int16 field_B4; 1042 char field_B6; 1043 char gap_b7[1]; 1044 Vector3 field_B8; 1045 Vector3 AccelerateWith; 1046 int field_D0; 1047 Vector3 field_D4; 1048 __int16 field_E0; 1049 char gap_e2[2]; 1050 int field_E4; 1051 int field_E8; 1052 int field_EC; 1053 int field_F0; 1054 __int16 field_F4; 1055 __int16 IsInAir; 1056 Vector3 FallingVelocity; 1057 Vector3 JumpVelocity; 1058 char field_110; 1059 char field_111; 1060 __int16 field_112; 1061 __int16 field_114; 1062 char gap_116[2]; 1063 int field_118; 1064 int field_11C; 1065 int field_120; 1066 int field_124; 1067 int field_128; 1068 int field_12C; 1069 BoundingSphere BoundingSphere; 1070 Vector3 field_140; 1071 Vector3 field_14C; 1072 int field_158; 1073 int field_15C; 1074 Vector3 Location; 1075 char gap_16c[24]; 1076 int AkiraNode; 1077 int GraphNode; 1078 int PelvisHeight; 1079 int Movement_StatePtr; 1080 int ActiveWeapon; 1081 int field_198; 1082 int InventoryWeapon; 1083 char gap_1a0[2]; 1084 __int16 RedAmmoClipCount; 1085 __int16 HypoCount; 1086 __int16 GreenAmmoClipCount; 1087 __int16 RedAmmoClipDropCount; 1088 __int16 HypoDropCount; 1089 __int16 GreenAmmoClipDropCount; 1090 __int16 field_1AE; 1091 __int16 InverseHypoRegenerationRate; 1092 char DropShield; 1093 char DropPhaseCloack; 1094 char field_1B4; 1095 char gap_1b5[1]; 1096 __int16 field_1B6; 1097 __int16 Shield; 1098 __int16 PhaseCloacking; 1099 int field_1BC; 1100 char gap_1c0[4]; 1101 __int16 field_1C4; 1102 char gap_1c6[10]; 1103 int field_1D0; 1104 int field_1D4; 1105 char gap_1d8[4]; 1106 int field_1DC; 1107 int NotIdleStartTime; 1108 int TimeToIdle; 1109 int field_1E8; 1110 char gap_1ec[4]; 1111 int field_1F0; 1112 char gap_1f4[2048]; 1113 int field_9F4; 1114 char gap_9f8[36]; 1115 int field_A1C; 1116 char gap_a20[3020]; 1117 int field_15EC; 1118 char gap_15f0[60]; 1119 int field_162C; 1120 int field_1630; 1121 int field_1634; 1122 int field_1638; 1123 int field_163C; 1124 char gap_1640[8]; 1125 BoundingBox BoundingBox; 1126 int field_1660; 1127 char gap_1664[4]; 1128 int ShieldPower; 1129 char gap_166c[4]; 1130 int NumberOfKills; 1131 int InflictedDamage; 1132 int field_1678; 1133 int field_167C; 1134 char gap_1680[8]; 1135 __int16 field_1688; 1136 __int16 field_168A; 1137 int field_168C; 1138 int field_1690; 1139 char field_1694; 1140 char field_1695; 1141 __int16 field_1696; 1142 int field_1698; 1143 int field_169C; 1144 char gap_16a0[2]; 1145 int field_16A2; 1146 char gap_16a6[994]; 1147 char field_1A88; 1148 char field_1A89; 1149 char field_1A8A; 1150 char field_1A8B; 1151 Vector3 Executor_AimingDirection; 1152 int field_1A98; 1153 int field_1A9C; 1154 int Executor_ActualMovementMode; 1155 int field_1AA4; 1156 int field_1AA8; 1157 int field_1AAC; 1158 char Executor_HasFacingOverride; 1159 char gap_1ab1[3]; 1160 int Executor_AimingSpeed; 1161 char field_1AB8; 1162 char Executor_HasMoveOverride; 1163 char gap_1aba[6]; 1164 int field_1AC0; 1165 int field_1AC4; 1166 int Executor_FacingOverride; 1167 char Executor_HasAttackOverride; 1168 char gap_1acd[1]; 1169 __int16 field_1ACE; 1170 __int16 field_1AD0; 1171 char gap_1ad2[6]; 1172 int field_1AD8; 1173 int field_1ADC; 1174 int field_1AE0; 1175 int field_1AE4; 1176 char Executor_HasThrowOverride; 1177 char gap_1ae9[3]; 1178 int field_1AEC; 1179 int field_1AF0; 1180 int field_1AF4; 1181 void* Animation; 1182 __int16 AnimationToState; 1183 __int16 AnimationFromState; 1184 __int16 AnimationType; 1185 __int16 NextAnimationType; 1186 __int16 field_1B04; 1187 __int16 field_1B06; 1188 char Stitch; 1189 char gap_1b09[3]; 1190 int StitchHeight; 1191 __int16 InterpolationFromState; 1192 char gap_1b12[2]; 1193 Vector3 StitchVelocity; 1194 __int16 InterpolationCurrentFrame; 1195 __int16 InterpolationLength; 1196 Quaternion InterpolationStartRotations[19]; 1197 char gap_1c54[4]; 1198 int field_1C58; 1199 int field_1C5C; 1200 int field_1C60; 1201 int Overlay; 1202 __int16 field_1C68; 1203 __int16 field_1C6A; 1204 int field_1C6C; 1205 int field_1C70; 1206 __int16 field_1C74; 1207 char gap_1c76[2]; 1208 int field_1C78; 1209 char gap_1c7c[12]; 1210 __int16 Frame; 1211 __int16 SoftPause; 1212 __int16 HardPause; 1213 __int16 field_1C8E; 1214 int field_1C90; 1215 __int16 field_1C94; 1216 __int16 field_1C96; 1217 __int16 Dizzy; 1218 __int16 field_1C9A; 1219 int field_1C9C; 1220 __int16 AnimationVarient; 1221 __int16 TimeToPeace; 1222 char NumAnimationAttachedParticles; 1223 char gap_1ca5[1]; 1224 __int16 field_1CA6; 1225 AttachedParticle AnimationAttachedParticles[16]; 1226 int TRAMParticles; 1227 char FixedParticlesAttached; 1228 char FixedParticlesStarted; 1229 __int16 NumFixedParticles; 1230 AttachedParticle FixedParticles[16]; 1231 __int16 CurrentAnimationType; 1232 char gap_1eb2[2]; 1233 int field_1EB4; 1234 char field_1EB8; 1235 char gap_1eb9[30]; 1236 char field_1ED7; 1237 __int16 throwing; 1238 __int16 thrownBy; 1239 Character* ThrowTargetCharacter; 1240 int targetThrow; //animation 1241 int field_1EE4; 1242 int field_1EE8; 1243 int field_1EEC; 1244 Quaternion Rotations[19]; 1245 Quaternion OverlayRotations[19]; 1246 int field_2150; 1247 char gap_2154[4]; 1248 GameInput Input; 1249 int PrevActions1; 1250 int PrevActions2; 1251 int SprintTimer; 1252 char field_2194; 1253 char field_2195; 1254 char gap_2196[2]; 1255 Vector3 field_2198; 1256 int field_21A4; 1257 int field_21A8; 1258 int field_21AC; 1259 Vector3 field_21B0; 1260 int HeadFacing; 1261 int HeadPitch; 1262 int field_21C4; 1263 int field_21C8; 1264 int field_21CC; 1265 int field_21D0; 1266 char field_21D4; 1267 char gap_21d5[3]; 1268 int field_21D8; 1269 char field_21DC; 1270 char field_21DD; 1271 char field_21DE; 1272 char field_21DF; 1273 char field_21E0; 1274 char HasAlternateTrigger; 1275 char field_21E2; 1276 char ReleaseTrigger; 1277 char ReleaseAlternateTrigger; 1278 char TurningLeft; 1279 char TurningRight; 1280 char gap_21e7[1]; 1281 int field_21E8; 1282 int field_21EC; 1283 __int16 field_21F0; 1284 char gap_21f2[2]; 1285 PlayingFilm PlayingFilm; 1286 char gap_2218[4]; 1287 int field_221C; 1288 char gap_2220[8]; 1289 int field_2228; 1290 char gap_222c[76]; 1291 Matrix4x3 BoneMatrices[19]; 1292 Matrix4x3 WeaponMatrix; 1293 char gap_2638[432]; 1294 int field_27E8; 1295 char gap_27ec[4]; 1296 __int16 field_27F0; 1297 __int16 field_27F2; 1298 int field_27F4; 1299 int field_27F8; 1300 __int16 ShadowIndex; 1301 char field_27FE; 1302 char gap_27ff[1]; 1303 char field_2800; 1304 char field_2801; 1305 char ShieldParts[19]; 1306 char field_2815; 1307 char gap_2816[2]; 1308 int field_2818; 1309 __int16 field_281C; 1310 char gap_281e[2]; 1311 int field_2820; 1312 int field_2824; 1313 int field_2828; 1314 int field_282C; 1315 __int16 field_2830; 1316 __int16 field_2832; 1317 char gap_2834[1]; 1318 char field_2835; 1319 char field_2836; 1320 char field_2837; 1321 } ActiveCharacter; 1322 1292 1323 typedef struct 1293 1324 { … … 1397 1428 } GameState; 1398 1429 #endif 1430 1431 typedef struct 1432 { 1433 int priority; 1434 int timer; // amount of time to display the text 1435 char prefix[10]; // prefix for the line 1436 char text[502]; // text on the line 1437 const char *identifier; 1438 int text_color; 1439 int text_shadow; 1440 } COtTextEntry; 1441 1442 typedef struct 1443 { 1444 void *font_family; 1445 void *text_context; // text context to do the drawing 1446 short formatting; 1447 short font_size; 1448 char scale_font; 1449 char bottom_justify; 1450 char display_completion; 1451 char fade_over_bounds; 1452 char use_formatting_commands; 1453 1454 short bounds[4]; 1455 short num_text_entries; 1456 short max_text_entries; 1457 char pad[3]; 1458 COtTextEntry *text_entries; // an array (num_text_entries long) of COtTextEntry 1459 int blah; 1460 int blah2; 1461 int blah3; 1462 } COtTextArea; -
Daodan/MSVC/Oni_Symbols.c
r572 r573 126 126 DefFunc( oni_fprintf , 0x0051ebbf ); 127 127 128 129 DefFunc( AI2iScript_Spawn , 0x004B4780 ); 128 130 DefFunc( AUrMessageBox , 0x004378c0 ); 129 131 … … 131 133 DefFunc( COrTextArea_Print , 0x00431340 ); 132 134 DefFunc( COrConsole_StatusLine_Display , 0x00431E70 ); 135 136 DefFunc( OBJrObjectType_EnumerateObjects , 0x004D0080 ); 137 //DefFunc( OBJiObjectGroup_GetNumObjects , 138 133 139 DefFunc( ONiGameState_FindAutoPromptMessage , 0x004FDBE0 ); 134 140 DefFunc( ONiMain , 0x004d3280 ); 135 141 142 DefFunc( ONrCharacter_NewAnimationHook , 0x004E97A0 ); 136 143 DefFunc( ONrCheater , 0x004f5c30 ); 144 DefFunc( ONrCorpse_Create , 0x004EF340 ); 137 145 DefFunc( ONrGameState_NewCharacter , 0x004dac50 ); 146 DefFunc( ONrGameState_DeleteCharacter , 0x004DC480 ); 138 147 DefFunc( ONrGetActiveCharacter , 0x004f1180 ); 139 148 DefFunc( ONrPersist_GetGamma , 0x0050f450 ); … … 141 150 DefFunc( ONrPlatform_Initialize , 0x0050f670 ); 142 151 DefFunc( ONrPlatform_WindowProc , 0x0050f7a0 ); 152 DefFunc( ONrCharacter_SetHitPoints , 0x004EB220 ); 153 143 154 DefFunc( iSetCharacterClass , 0x004D99D0 ); 144 155 145 156 146 DefFunc( SLrGlobalVariable_Register_Int32 , 0x0477e30);147 DefFunc( SLrGlobalVariable_Register_Float , 0x0477ec0);148 DefFunc( SLrGlobalVariable_Register_String , 0x0477fe0);149 DefFunc( SLrScript_Command_Register_ReturnType , 0x0477b20);150 DefFunc( SLrScript_Command_Register_Void , 0x0477b40);157 DefFunc( SLrGlobalVariable_Register_Int32 , 0x00477e30 ); 158 DefFunc( SLrGlobalVariable_Register_Float , 0x00477ec0 ); 159 DefFunc( SLrGlobalVariable_Register_String , 0x00477fe0 ); 160 DefFunc( SLrScript_Command_Register_ReturnType , 0x00477b20 ); 161 DefFunc( SLrScript_Command_Register_Void , 0x00477b40 ); 151 162 152 163 DefFunc( SSrMessage_Find , 0x0047F550 ); … … 155 166 DefFunc( TMrInstance_GetDataPtr , 0x004232E0 ); 156 167 157 DefFunc( TSrContext_DrawText , 0x0042DF00 ); 158 DefFunc( TSrContext_New , 0x0042EA30 ); 159 168 DefFunc( TSrContext_DrawText , 0x0042DF00 ); 169 DefFunc( TSrContext_New , 0x0042EA30 ); 170 DefFunc( TSrContext_SetShade , 0x0042EE50 ); 171 DefFunc( TRrAnimation_GetDuration , 0x00428740 ); 172 DefFunc( TRrAnimation_GetFrom , 0x00428720 ); 173 DefFunc( TRrAnimation_GetTo , 0x00428730 ); 160 174 161 175 DefFunc( UUrMachineTime_High , 0x04026480 ); … … 165 179 DefFunc( UUrPlatform_Terminate , 0x04026310 ); 166 180 DefFunc( UUrStartupMessage , 0x00424860 ); 181 DefFunc( OBJrDoor_Open , 0x004C26C0 ); 182 DefFunc( OBJrDoor_ForceOpen , 0x004C1EE0 ); 167 183 168 184 #define DefVar(type, name, address) type* _##name = (type*)address -
Daodan/MSVC/Oni_Symbols.h
r572 r573 58 58 #define COgDefaultTextShadow (*_COgDefaultTextShadow) 59 59 #define ONgFileStartup (*_ONgFileStartup) 60 61 60 62 #undef $ 61 63 … … 87 89 void* flag, uint32_t* list_location); 88 90 typedef ActiveCharacter* ( *_ONrGetActiveCharacter)(void* CharacterPtr); 91 typedef void ( *_ONrCharacter_NewAnimationHook)(Character *ioCharacter, ActiveCharacter *ioActiveCharacter); 89 92 //int16_t ONICALL ONrGameState_GetPlayerCharacter(); 90 93 … … 113 116 typedef int16_t ( *_TSrContext_New)( void* FontInstance, int size, int hthsik1,int hthsik2,int hthsik3, void* TSrContext); 114 117 118 typedef int16_t ( *_TSrContext_SetShade)( 119 void *ioTextContext, 120 uint32_t inShade); 121 122 typedef uint16_t ( *_TRrAnimation_GetDuration)(int Animation); 123 typedef uint16_t ( *_TRrAnimation_GetTo)(int Animation); 124 typedef uint16_t ( *_TRrAnimation_GetFrom)(int Animation); 125 126 typedef void 127 ( *_ONrCharacter_SetHitPoints)( 128 Character *ioCharacter, 129 uint32_t inHitPoints); 130 typedef void ( *_ONrCorpse_Create)(Character* Character); 115 131 //yes im cheating so badly. 116 132 typedef uint16_t ( *_iSetCharacterClass)(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret); 133 typedef uint16_t ( *_AI2iScript_Spawn)(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret); 134 typedef void * ( *_OBJrObjectType_GetObject_ByNumber)(int inObjectType, int inIndex); 135 typedef int ( *_OBJiObjectGroup_GetNumObjects)(void *inObjectGroup); 136 137 typedef void ( *_ONrGameState_DeleteCharacter)(Character *inCharacter); 138 139 typedef char (*OBJtEnumCallback_Object)( 140 void *inObject, 141 int inUserData); 142 143 typedef int ( *_OBJrObjectType_EnumerateObjects)( 144 int inObjectType, 145 OBJtEnumCallback_Object inEnumCallback, 146 int inUserData); 147 148 typedef void ( *_OBJrDoor_Open)( DoorObject *inObject, Character *inCharacter ); 149 typedef void ( *_OBJrDoor_ForceOpen)(short id); 117 150 118 151 #define ExtFunc(name) extern _##name name … … 123 156 ExtFunc(SLrGlobalVariable_Register_String); 124 157 ExtFunc(COrConsole_StatusLine_Display); 158 ExtFunc(OBJrObjectType_EnumerateObjects); 159 //ExtFunc(OBJiObjectGroup_GetNumObjects); 160 ExtFunc(AI2iScript_Spawn); 161 162 ExtFunc(TRrAnimation_GetDuration); 163 ExtFunc(TRrAnimation_GetFrom); 164 ExtFunc(TRrAnimation_GetTo); 125 165 126 166 extern _UUrMachineTime_High UUrMachineTime_High; … … 150 190 ExtFunc(UUrStartupMessage); 151 191 192 ExtFunc(ONrCharacter_NewAnimationHook); 193 ExtFunc(ONrCharacter_SetHitPoints); 152 194 ExtFunc(ONrGameState_NewCharacter); 195 ExtFunc(ONrGameState_DeleteCharacter); 153 196 ExtFunc(ONrGetActiveCharacter); 154 197 ExtFunc(ONrCorpse_Create); 155 198 ExtFunc(iSetCharacterClass); 156 199 … … 165 208 ExtFunc(TSrContext_DrawText); 166 209 ExtFunc(TSrContext_New); 210 ExtFunc(TSrContext_SetShade); 211 ExtFunc(OBJrDoor_Open); 212 ExtFunc(OBJrDoor_ForceOpen); 167 213 #endif
Note:
See TracChangeset
for help on using the changeset viewer.