fix missing light/shadow effects

General Modding Information/Questions; support/discussion/questions

Moderator: thunderchero

Forum rules
:idea: Please search before starting new topic. :idea:
There is a good chance it has already been asked.
Post Reply
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 8572
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

fix missing light/shadow effects

Post by thunderchero »

Hi Everyone,

here is the patch to Add light source / shading data for screensaver and stations in combat.
lighting.patch
for more development info;
viewtopic.php?p=46194#p46194

Code: Select all

NAME: Add light source / shading data for screensaver and stations in combat
DESC: Add light source / shading data for screensaver and stations in combat
AUTHOR: Spocks-cuddly-tribble
DESC: patch file name: lighting.patch
URL: https://www.armadafleetcommand.com/onscreen/botf/viewtopic.php?p=64030#p64030

# >>  = vanilla/original value

# <<  = new value

>> 0x0009dd27 8b 41 04 d9 59 24 85 c0 75 0c d9 81 5c 01 00 00 d8 49 24 d9 59 24 8b 41 48 8b 94 24 74 01 00 00 89 90 8c
>> 0x0009dd4b 00 00 83 79 04 00 75 20
>> 0x000d390b 89 35 b8 ae 5c 00
>> 0x00100d80 4c 0f
>> 0x00100de9 e3 0e
>> 0x00102f52 00 00 00 00 00 00 00
>> 0x00102f5b 00 00 00 00 00

<< 0x0009dd27 d9 59 24 8b 41 48 8b 94 24 74 01 00 00 89 90 8c 00 00 00 8b 41 04 85 c0 74 04 3c 06 75 2e d9 81 5c 01 00
<< 0x0009dd4b d8 49 24 d9 59 24 90 90
<< 0x000d390b 90 90 90 90 90 90
<< 0x00100d80 ce 21
<< 0x00100de9 65 21
<< 0x00102f52 56 57 55 81 ec fc 08
<< 0x00102f5b e9 6d 09 fd ff

# add station light/shadow in combat
# 0049E927     D959 24        FSTP DWORD PTR DS:[ECX+24]
# 0049E92A     8B41 48        MOV EAX,DWORD PTR DS:[ECX+48]
# 0049E92D     8B9424 7401000>MOV EDX,DWORD PTR SS:[ESP+174]
# 0049E934     8990 8C000000  MOV DWORD PTR DS:[EAX+8C],EDX
# 0049E93A     8B41 04        MOV EAX,DWORD PTR DS:[ECX+4]
# 0049E93D     85C0           TEST EAX,EAX
# 0049E93F     74 04          JE SHORT trek.0049E945
# 0049E941     3C 06          CMP AL,6
# 0049E943     75 2E          JNZ SHORT trek.0049E973
# 0049E945     D981 5C010000  FLD DWORD PTR DS:[ECX+15C]
# 0049E94B     D849 24        FMUL DWORD PTR DS:[ECX+24]
# 0049E94E     D959 24        FSTP DWORD PTR DS:[ECX+24]
# 0049E951     90             NOP
# 0049E952     90             NOP

# nop to prevent loading of b.gif tech/screensaver 
# 004D450B     90 90 90 90 90 90 

# screensaver new call for light/shadow sub
# 0050197F     E8 CE210000    CALL trek.00503B52 

# screensaver new call for light/shadow sub
# 005019E8     E8 65210000    CALL trek.00503B52

# new screensaver light/shadow sub
# 00503B52       56             PUSH ESI
# 00503B53       57             PUSH EDI
# 00503B54       55             PUSH EBP
# 00503B55       81EC FC080000  SUB ESP,8FC
# 00503B5B       E9 6D09FDFF    JMP trek.004D44CD
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “General Modding Information/Questions”