Changeset 484 for Daodan/src
- Timestamp:
- Dec 11, 2009, 9:58:07 AM (15 years ago)
- Location:
- Daodan/src
- Files:
-
- 9 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/BFW_Utility.h
r476 r484 29 29 int16_t ONICALL TSrContext_New( void* FontInstance, int size, int hthsik1,int hthsik2,int hthsik3, void* TSrContext); //int16_t TSrContext_New( TSFF*, size 7, ??? 1, ??? 1, ??? 0, TSrContext*); 30 30 int16_t ONICALL TMrInstance_GetDataPtr(int, char*, void*); //int TMrInstance_GetDataPtr( Type 'TSFF', char* "Tahoma", ptr); 31 31 char* ONICALL TMrInstance_GetInstanceName(void* InstancePointer); 32 32 int __cdecl AUrMessageBox(int Buttons, char *Message, ...); 33 33 -
Daodan/src/Daodan_BSL.c
r481 r484 7 7 8 8 #include "Daodan_BSL.h" 9 #include "Flatline_BSL.h" 9 10 #include "Daodan_Utility.h" 10 11 #include "Daodan_Patch.h" … … 17 18 #include "Daodan_Character.h" 18 19 20 21 19 22 uint16_t ONICALL bsl_int32mul(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) 20 23 { … … 50 53 return 0; 51 54 } 52 53 55 uint16_t ONICALL bsl_div(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) 54 56 { … … 218 220 else index = args[0].value_int32; 219 221 Character* Chr = ONgGameState + 0x1260 ; 220 int* health = (int)&Chr[index] + 0x144; 221 222 int* health = (int*)Chr[index].ScriptNoPath; 223 224 /* 225 DDrConsole_PrintF("Character %s", Chr[index].Name); 226 DDrConsole_PrintF("Spawn %s", Chr[index].ScriptSpawn); 227 DDrConsole_PrintF("Death %s", Chr[index].ScriptDie); 228 DDrConsole_PrintF("Aware %s", Chr[index].ScriptAware); 229 DDrConsole_PrintF("Alarm %s", Chr[index].ScriptAlarm); 230 DDrConsole_PrintF("Hurt %s", Chr[index].ScriptHurt); 231 DDrConsole_PrintF("Defeat %s", Chr[index].ScriptDefeat); 232 DDrConsole_PrintF("NoAmmo %s", Chr[index].ScriptNoAmmo); 233 DDrConsole_PrintF("NoPath %s", Chr[index].ScriptNoPath); 234 */ 222 235 ret->value_int32 = *health; 223 236 ret->type = sl_int32; … … 743 756 { 744 757 745 //const char regen_patch[] = {0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90}; 746 //DDrPatch_Const(OniExe + 0x0011BB6D, regen_patch); 747 748 //This one should work but doesn't. 749 //const char regen_patch[] ={0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x8B, 0x86, 0x44}; 750 //DDrPatch_Const(OniExe + 0x0011BB64, regen_patch); 758 759 //Calculating the value of the needed offset is much more reliable when the compiler does it for you. 760 761 //TODO: fix moonshadow. 762 Character * Chr = 0; 763 char NoPath = (char)(0x100 - (int)(Chr->ScriptNoPath)); 764 const char regen_patch[] = 765 {0x90, 0x90, 0x90, 0x90, 0x90, // mov al, _WPgRegenerationCheat 766 0x90, 0x90, // test al, al 767 0x90, 0x90, // jz short loc_51BB98 768 0x8B, 0x86, NoPath}; 769 DDrPatch_Const(OniExe + 0x0011BB64, regen_patch); 751 770 752 771 SLrConfig(); … … 783 802 SLrScript_Command_Register_ReturnType("sprintf", "C-style sprintf.", "format:string arg1 arg2 ...", sl_str32, bsl_sprintf); 784 803 785 SLrScript_Command_Register_ReturnType("d_dprint", "prints to console in color", "text:string [color: r b g] [color: r b g]", sl_void, bsl_dprintcolored); 786 787 //SLrScript_Command_Register_ReturnType("d_offset", "a test", "thing:int", sl_int32, bsl_returnoffset); 804 SLrScript_Command_Register_ReturnType("st", "prints to console in color", "text:string [color: r b g] [color: r b g]", sl_void, bsl_dprintcolored); 805 806 //Flatline 807 SLrFlatline_Initialize(); 808 788 809 } 789 810 -
Daodan/src/Oni.h
r476 r484 49 49 50 50 51 51 52 #endif -
Daodan/src/Oni_Character.h
r473 r484 126 126 int32_t FILMInstance; 127 127 } PlayingFilm; 128 129 typedef enum { 130 chr_isplayer = 1 << 0, 131 chr_randomskin = 1 << 1, 132 chr_notprespawned = 1 << 2, 133 chr_noncombatant = 1 << 3, 134 chr_multispawnable = 1 << 4, 135 chr_unkillable = 1 << 5, 136 chr_superammo = 1 << 6, 137 chr_omniscient = 1 << 8, 138 chr_haslsi = 1 << 9, 139 chr_boss = 1 << 10, 140 chr_upgradedifficulty = 1 << 11, 141 chr_noautodrop = 1 << 12, 142 chr_dontaim = 1 << 13, 143 chr_nocollision = 1 << 17, 144 chr_noshadow = 1 << 24, 145 chr_invincible = 1 << 25, 146 chr_bossshield = 1 << 30, 147 chr_weaponimmune = 1 << 31, 148 } chr_flags; 149 /* 150 enum { 151 chr_isplayer = 0x00000001, //is player character 152 chr_randomskin = 0x00000002, //gets random skin from ONCV 153 chr_notprespawned = 0x00000004, //isn't spawned at level creation 154 chr_noncombatant = 0x00000008, //doesn't fight 155 chr_multispawnable = 0x00000010, //can spawn up to 5 without forcing 156 chr_unknown = 0x00000020, // 157 chr_unkillable = 0x00000040, //can only be brought to 1 hp 158 chr_superammo = 0x00000080, //infinite ammo 159 chr_omniscient = 0x00000100, //touchofdeath 160 chr_haslsi = 0x00000200, //drops an lsi 161 chr_boss = 0x00000400, //is a boss character 162 chr_upgradedifficulty = 0x00000800, //upgrade the difficulty if you play on med\hard 163 chr_noautodrop = 0x00001000, //uses drop fields instead of has fields on death 164 }; // 165 */ 128 166 129 167 typedef struct { … … 216 254 } Inventory; 217 255 256 typedef struct { 257 uint32_t SphereTree; 258 Vector3 ObBox[8]; 259 Vector3 * ObBowPtr; 260 Vector3 Velocity; 261 Quaternion field_74; 262 Vector3 Position; 263 Quaternion Rotation; 264 float Scale; 265 Matrix4x3 Matrix; 266 Matrix4x3 InitMatrix; 267 float field_104; 268 float Gravity; 269 float field_10C; 270 float field_110; 271 float Friction_1; 272 float Friction_2; 273 Vector3 Force; 274 uint32_t Flags; 275 uint32_t Type; 276 char AnimState[0x18]; 277 void* Callbacks; 278 void* Owner; 279 } PhyContext; 280 218 281 typedef struct { //ActiveCharacter 219 282 int16_t Number; 220 283 int16_t field_2; //probably Number is an int32 221 int32_t PhyContext;284 PhyContext * PhyContext_; 222 285 SphereTreeNode SphereTree1; //probably SphereTree[7]... 223 286 SphereTreeNode SphereTree3[4]; … … 441 504 int32_t Flags; 442 505 int32_t field_8; 443 int32_t ONCC; //change type to ONCC when we get that far...506 int32_t* ONCC; //change type to ONCC when we get that far... 444 507 int16_t field_10; 445 508 int16_t Team; … … 542 605 team_syndicateaccessory, 543 606 }; 544 545 typedef enum { 546 chr_isplayer = 1 << 0, 547 chr_randomskin = 1 << 1, 548 chr_notprespawned = 1 << 2, 549 chr_noncombatant = 1 << 3, 550 chr_multispawnable = 1 << 4, 551 chr_unkillable = 1 << 5, 552 chr_superammo = 1 << 6, 553 chr_omniscient = 1 << 8, 554 chr_haslsi = 1 << 9, 555 chr_boss = 1 << 10, 556 chr_upgradedifficulty = 1 << 11, 557 chr_noautodrop = 1 << 12, 558 chr_dontaim = 1 << 13, 559 chr_nocollision = 1 << 17, 560 chr_noshadow = 1 << 24, 561 chr_invincible = 1 << 25, 562 chr_bossshield = 1 << 30, 563 chr_weaponimmune = 1 << 31, 564 } chr_flags; 565 /* 566 enum { 567 chr_isplayer = 0x00000001, //is player character 568 chr_randomskin = 0x00000002, //gets random skin from ONCV 569 chr_notprespawned = 0x00000004, //isn't spawned at level creation 570 chr_noncombatant = 0x00000008, //doesn't fight 571 chr_multispawnable = 0x00000010, //can spawn up to 5 without forcing 572 chr_unknown = 0x00000020, // 573 chr_unkillable = 0x00000040, //can only be brought to 1 hp 574 chr_superammo = 0x00000080, //infinite ammo 575 chr_omniscient = 0x00000100, //touchofdeath 576 chr_haslsi = 0x00000200, //drops an lsi 577 chr_boss = 0x00000400, //is a boss character 578 chr_upgradedifficulty = 0x00000800, //upgrade the difficulty if you play on med\hard 579 chr_noautodrop = 0x00001000, //uses drop fields instead of has fields on death 580 }; // 581 */ 582 int16_t ONICALL ONrGameState_NewCharacter(CharacterObject* CHAR, void* AISA, void* flag, int* list_location); 607 int16_t ONICALL ONrGameState_NewCharacter(CharacterObject* CHAR, void* AISA, void* flag, uint32_t* list_location); 583 608 int32_t* ONICALL ONrGetActiveCharacter(void* CharacterPtr); 584 609 //int16_t ONICALL ONrGameState_GetPlayerCharacter(); … … 596 621 #define char_weaponimmune (1 << 31) 597 622 623 624 //We need a Oni_Structs #include file. 625 626 typedef struct { 627 uint32_t TimerMode; 628 char TimerName[32]; 629 uint32_t TimerDuration; 630 uint32_t field_28; 631 uint32_t field_2C; 632 uint32_t Letterbox[3]; 633 uint32_t field_3C; 634 uint32_t field_40; 635 uint32_t CutsceneSyncMark; 636 uint32_t SomeCutsceneSyncMarkField; 637 uint32_t field_4C; 638 uint32_t SplashScreenMachineTime; 639 uint32_t field_54; 640 uint32_t field_58; 641 uint32_t field_5C; 642 uint32_t field_60; 643 uint32_t field_64; 644 uint32_t field_68; 645 uint32_t field_6C; 646 uint32_t field_70; 647 uint32_t FadeStartTime; 648 uint32_t FadeEndTime; 649 uint32_t field_7C; 650 uint32_t Camera; 651 char PathFindingGraph[0x28]; 652 struct Character *PlayerCharacter; 653 uint32_t field_B0; 654 uint32_t field_B4; 655 GameInput Input; 656 uint32_t field_E8; 657 uint32_t field_EC; 658 uint32_t ScreenshotEveryFrame; //bool? 659 uint32_t field_F4; 660 char field_F8; 661 char field_F9; 662 char field_FA; 663 char field_FB; 664 uint32_t field_FC; 665 uint32_t field_100; 666 uint32_t SlowMo; //bool 667 uint32_t SlowMotion; 668 uint32_t field_10C; 669 uint32_t field_110; 670 uint32_t field_114; 671 char SplashScreenTextureName[32]; 672 uint32_t field_138; 673 uint32_t field_13C; 674 uint32_t field_140; 675 uint32_t GameTime; 676 uint32_t field_148; 677 uint32_t field_14C; 678 uint32_t Level; 679 uint32_t field_154; 680 char MotionBlur[0x44][64]; 681 uint32_t MotionBlurCount; 682 uint16_t field_125C; 683 uint16_t field_125E; 684 Character CharacterStorage[128]; 685 uint16_t CharacterCount; 686 uint16_t padding_1; 687 uint32_t field_B6264; 688 char ActiveCharacters[0x2838][64]; //Active Character Struct isn't the proper size atm. 689 uint16_t ActiveCharactersCount; 690 char Shadows[32][0x804]; 691 uint32_t field_1670EA; 692 uint32_t ShadowCount; 693 ActiveCharacter* ActiveCharacterList[128]; //or just Character*? Anyways, we wont need to use this. 694 uint32_t ActiveCharacterListCount; 695 uint32_t ActiveCharacterListLock; 696 Character* LivingCharacterList[128]; 697 uint32_t LivingCharacterListCount; 698 uint32_t LivingCharacterListLock; 699 ActiveCharacter* PresentCharacterList[128]; 700 uint32_t PresentCharacterListCount; 701 uint32_t PresentCharacterListLock; 702 void* ObjectList; 703 char DoorArray[8]; 704 char Sky[0x290]; 705 uint32_t field_1679A4; 706 uint32_t Triggers; 707 char IsGamePaused; 708 char IsInputEnabled; 709 char field_1679AE; 710 char field_1679AF; 711 uint32_t LockedActions1; 712 uint32_t LockedActions2; 713 uint32_t field_1679B8; 714 uint32_t WinLose; 715 uint32_t ConditionSoundsCount; 716 uint32_t ConditionSounds[5]; 717 uint16_t LevelNumber; 718 uint16_t padding_5; 719 uint16_t field_1679DC; 720 } GameState; 721 722 598 723 #endif -
Daodan/src/Oni_Symbols.S
r476 r484 65 65 symbol ( @TSrContext_New@24 , 0x0002EA30 ) 66 66 symbol ( @TMrInstance_GetDataPtr@12 , 0x000232E0 ) 67 67 symbol ( @TMrInstance_GetInstanceName@4 , 0x00023D90 ) 68 68 symbol ( @COrTextArea_Print@28 , 0x00031340 ) 69 69 … … 83 83 symbol ( @SLrGlobalVariable_Register_Int32@12 , 0x00077e30 ) 84 84 symbol ( @SLrGlobalVariable_Register_Float@12 , 0x00077ec0 ) 85 symbol ( @SLrGlobalVariable_Register_String@12 , 0x00077fe0 ) 85 86 86 87 // Messages
Note:
See TracChangeset
for help on using the changeset viewer.