Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.

Commit 965d867

Browse files
author
serpentiem
committed
2.7 Nightly 20 October 2021
1 parent e6fea50 commit 965d867

File tree

7 files changed

+172
-5
lines changed

7 files changed

+172
-5
lines changed

Core/Core.ixx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3076,8 +3076,17 @@ export bool Core_Memory_Init()
30763076

30773077
Log("%u %s", moduleEntry.th32ProcessID, moduleEntry.szModule);
30783078

3079+
3080+
3081+
#ifdef _WIN64
30793082
Log("appStart %llX", appBaseAddr);
30803083
Log("appEnd %llX", (appBaseAddr + appSize));
3084+
#else
3085+
Log("appStart %X", appBaseAddr);
3086+
Log("appEnd %X", (appBaseAddr + appSize));
3087+
#endif
3088+
3089+
30813090

30823091
Log("appSize %X", appSize);
30833092

Global.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22

33
#define DDMK_NAME "DDMK 2.7"
4-
#define DDMK_DATE "Nightly 18 October 2021"
4+
#define DDMK_DATE "Nightly 20 October 2021"
55

66
#define DDMK_TITLE_EVA DDMK_NAME " Eva " DDMK_DATE
77
#define DDMK_TITLE_LUCIA DDMK_NAME " Lucia " DDMK_DATE

Kyrie/Actor.ixx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,48 @@ export void EventSpawnMainActor(byte8 * actorBaseAddr)
11661166
SpawnPlayerActors();
11671167
}
11681168

1169+
export void EventCutsceneStart()
1170+
{
1171+
if (!activeConfig.Actor.enable)
1172+
{
1173+
return;
1174+
}
1175+
1176+
LogFunction();
1177+
1178+
1179+
1180+
for_all(playerIndex, activeConfig.Actor.playerCount)
1181+
{
1182+
auto & newActorData = g_newActorData[playerIndex];
1183+
1184+
IntroduceData(newActorData.baseAddr, actorData, PlayerActorData, continue);
1185+
1186+
actorData.enable = false;
1187+
}
1188+
}
1189+
1190+
export void EventCutsceneEnd()
1191+
{
1192+
if (!activeConfig.Actor.enable)
1193+
{
1194+
return;
1195+
}
1196+
1197+
LogFunction();
1198+
1199+
1200+
1201+
for_all(playerIndex, activeConfig.Actor.playerCount)
1202+
{
1203+
auto & newActorData = g_newActorData[playerIndex];
1204+
1205+
IntroduceData(newActorData.baseAddr, actorData, PlayerActorData, continue);
1206+
1207+
actorData.enable = true;
1208+
}
1209+
}
1210+
11691211
namespaceEnd();
11701212

11711213
#pragma endregion

Kyrie/Event.ixx

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,32 @@ void EventHandler()
181181

182182

183183

184+
185+
186+
void EventCutsceneStart()
187+
{
188+
LogFunction();
189+
190+
Actor::EventCutsceneStart();
191+
}
192+
193+
void EventCutsceneEnd()
194+
{
195+
LogFunction();
196+
197+
Actor::EventCutsceneEnd();
198+
}
199+
200+
201+
202+
203+
204+
205+
206+
207+
208+
209+
184210
namespaceStart(Event);
185211

186212
export void Toggle(bool enable)
@@ -374,6 +400,92 @@ export void Toggle(bool enable)
374400
}
375401
}
376402

403+
// EventCutsceneStart
404+
{
405+
auto addr = (appBaseAddr + 0x4C828B);
406+
auto jumpAddr = (appBaseAddr + 0x4C8292);
407+
constexpr size_t size = 7;
408+
/*
409+
dmc4.exe+4C828B - 66 89 9E 1D1A0000 - mov [esi+00001A1D],bx
410+
dmc4.exe+4C8292 - 8B C6 - mov eax,esi
411+
*/
412+
413+
static Function func = {};
414+
415+
if (!run)
416+
{
417+
backupHelper.Save(addr, size);
418+
func = CreateFunction(EventCutsceneStart, jumpAddr, (FunctionFlags_SaveRegisters | FunctionFlags_NoResult), size);
419+
CopyMemory(func.sect0, addr, size, MemoryFlags_VirtualProtectSource);
420+
}
421+
422+
if (enable)
423+
{
424+
WriteJump(addr, func.addr, (size - 5));
425+
}
426+
else
427+
{
428+
backupHelper.Restore(addr);
429+
}
430+
}
431+
432+
{
433+
auto addr = (appBaseAddr + 0x153A6A);
434+
auto jumpAddr = (appBaseAddr + 0x153A73);
435+
constexpr size_t size = 9;
436+
/*
437+
dmc4.exe+153A6A - 66 C7 80 1D1A0000 0000 - mov word ptr [eax+00001A1D],0000
438+
dmc4.exe+153A73 - 83 43 04 02 - add dword ptr [ebx+04],02
439+
*/
440+
441+
static Function func = {};
442+
443+
if (!run)
444+
{
445+
backupHelper.Save(addr, size);
446+
func = CreateFunction(EventCutsceneStart, jumpAddr, (FunctionFlags_SaveRegisters | FunctionFlags_NoResult), size);
447+
CopyMemory(func.sect0, addr, size, MemoryFlags_VirtualProtectSource);
448+
}
449+
450+
if (enable)
451+
{
452+
WriteJump(addr, func.addr, (size - 5));
453+
}
454+
else
455+
{
456+
backupHelper.Restore(addr);
457+
}
458+
}
459+
460+
// EventCutsceneEnd
461+
{
462+
auto addr = (appBaseAddr + 0x153A98);
463+
auto jumpAddr = (appBaseAddr + 0x153A9F);
464+
constexpr size_t size = 7;
465+
/*
466+
dmc4.exe+153A98 - C6 80 1D1A0000 01 - mov byte ptr [eax+00001A1D],01
467+
dmc4.exe+153A9F - 83 43 04 02 - add dword ptr [ebx+04],02
468+
*/
469+
470+
static Function func = {};
471+
472+
if (!run)
473+
{
474+
backupHelper.Save(addr, size);
475+
func = CreateFunction(EventCutsceneEnd, jumpAddr, (FunctionFlags_SaveRegisters | FunctionFlags_NoResult), size);
476+
CopyMemory(func.sect0, addr, size, MemoryFlags_VirtualProtectSource);
477+
}
478+
479+
if (enable)
480+
{
481+
WriteJump(addr, func.addr, (size - 5));
482+
}
483+
else
484+
{
485+
backupHelper.Restore(addr);
486+
}
487+
}
488+
377489

378490

379491
run = true;

Kyrie/Vars.ixx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,9 @@ export struct PlayerActorData
381381
_(6568);
382382
uint32 costume; // 0x19A8
383383
uint32 character; // 0x19AC
384-
_(336);
384+
_(109);
385+
bool enable; // 0x1A1D
386+
_(226);
385387
float hitPoints; // 0x1B00
386388
float maxHitPoints; // 0x1B04
387389
_(2556);
@@ -391,6 +393,7 @@ export struct PlayerActorData
391393

392394
static_assert(offsetof(PlayerActorData, costume) == 0x19A8);
393395
static_assert(offsetof(PlayerActorData, character) == 0x19AC);
396+
static_assert(offsetof(PlayerActorData, enable) == 0x1A1D);
394397
static_assert(offsetof(PlayerActorData, hitPoints) == 0x1B00);
395398
static_assert(offsetof(PlayerActorData, maxHitPoints) == 0x1B04);
396399
static_assert(offsetof(PlayerActorData, magicPoints) == 0x2504);

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The following is required to undo the latest patch. You only need to do this onc
5656

5757
* Go to the savegame directory. By default this is `C:\Program Files (x86)\Steam\userdata\STEAM_ACCOUNT_ID\631510\remote`.
5858

59-
If you don't know your STEAM_ACCOUNT_ID, here's how to get it without external tools:
59+
If you don't know your `STEAM_ACCOUNT_ID`, here's how to get it without external tools:
6060

6161
* In Steam hover over your big username and click on `Profile`.
6262
* Right click somewhere in the middle of the window and left click on `View Source...`.
@@ -65,7 +65,7 @@ If you don't know your STEAM_ACCOUNT_ID, here's how to get it without external t
6565

6666
* In the text editor, press CTRL+F and search for `data-miniprofile=`.
6767

68-
The number in the quotes, on the right side of the first search result, is your STEAM_ACCOUNT_ID.
68+
The number in the quotes, on the right side of the first search result, is your `STEAM_ACCOUNT_ID`.
6969

7070
Copy the following files to a secure and easily accessible location:
7171

@@ -77,7 +77,7 @@ Copy the following files to a secure and easily accessible location:
7777

7878
* Go to the savegame directory. By default this is `C:\Users\USER_NAME\Documents\CAPCOM\DEVILMAYCRY4SPECIALEDITION`.
7979

80-
If you don't know your USER_NAME, give your tech-savvy grandchild a call.
80+
If you don't know your `USER_NAME`, give your tech-savvy grandchild a call.
8181

8282
Copy `SavedGame00.DevilMayCry4SpecialEdition` to a secure and easily accessible location.
8383

Scripts/dmc4_create_data.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ let items =
520520
[
521521
[ "costume" , "uint32", [], 0x19A8 ],
522522
[ "character" , "uint32", [], 0x19AC ],
523+
[ "enable" , "bool" , [], 0x1A1D ],
523524
[ "hitPoints" , "float" , [], 0x1B00 ],
524525
[ "maxHitPoints" , "float" , [], 0x1B04 ],
525526
[ "magicPoints" , "float" , [], 0x2504 ],

0 commit comments

Comments
 (0)