| View previous topic :: View next topic |
| Author |
Message |
Fleexy

Joined: 12 Dec 2008 Posts: 281 Location: Blogham Tower
|
Posted: Fri Jul 09, 2010 9:53 pm Post subject: |
|
|
| Make light rooms dark and dark rooms light! |
|
| Back to top |
|
 |
levellass
Joined: 11 Oct 2006 Posts: 2053 Location: Ngaruawahia New Zealand
|
|
| Back to top |
|
 |
Mink
Joined: 03 Nov 2007 Posts: 191 Location: Providence, RI, US
|
Posted: Sat Jul 10, 2010 1:15 pm Post subject: |
|
|
| So I had been holding off testing this since I figured it was pretty much just another not really noticeable palette patch, and wow I stand corrected; that is some seriously nice patching, Dr K - it makes everything else feel clunky! Like THC was saying, this'll have a fair bit of repercussions on mods' styles, and man I am excited for the possibilities. |
|
| Back to top |
|
 |
Dr. Kylstein
Joined: 16 Dec 2009 Posts: 117
|
Posted: Sat Jul 10, 2010 4:36 pm Post subject: |
|
|
Those values you highlighted in the the fade functions are not delay values and should not be modified. $40 = 64, or max brightness + 1, the number of shade levels the fade loops through. The fades are synchronized to the video update, so the only way to speed them up is to make them double-step.
Also, I'm pretty sure the sprites are frozen during the original fade routines. If you can prove otherwise, I'll fix that. |
|
| Back to top |
|
 |
lemm
Joined: 05 Jul 2009 Posts: 532
|
Posted: Sat Jul 10, 2010 5:05 pm Post subject: |
|
|
| Sprites are not drawn until fade in has completed. |
|
| Back to top |
|
 |
levellass
Joined: 11 Oct 2006 Posts: 2053 Location: Ngaruawahia New Zealand
|
Posted: Sun Jul 11, 2010 4:08 am Post subject: |
|
|
| However, since the fades are much smoother than the originals, this is more readily noticeable. Also, I have managed to shorten the fade time by changing those two values to half (32, $20), which works better for my mod, what effect does this have? Can it cause a crash or graphics problems? |
|
| Back to top |
|
 |
CommanderSpleen

Joined: 31 Aug 2003 Posts: 965 Location: The Land of Sparkly Things
|
Posted: Sun Jul 11, 2010 7:38 am Post subject: |
|
|
Finally got around to trying it. Very, very tasty.
I'm not finding everything 'clunky' after seeing it. In fact, the contrast makes me appreciate the graphics even more. |
|
| Back to top |
|
 |
Dr. Kylstein
Joined: 16 Dec 2009 Posts: 117
|
Posted: Sun Jul 11, 2010 4:58 pm Post subject: |
|
|
| levellass wrote: | | However, since the fades are much smoother than the originals, this is more readily noticeable. Also, I have managed to shorten the fade time by changing those two values to half (32, $20), which works better for my mod, what effect does this have? Can it cause a crash or graphics problems? |
It shouldn't cause any serious problems, but it will only fade to/from half-darkened instead of black.
Edit: Here's a version that double-steps.
| Code: | # Set the palette when we go into graphics mode
%patch $6E46 $E8 $64 $FE $90 $90
#support functions
%patch $5B3D $BA $DA $03 $EC $A8 $08 $75 $FB $EC $A8 $08 $74 $FB $C3 $55 $89
$E5 $E8 $EC $FF $BA $DA $03 $EC $BA $C0 $03 $EC $50 $B0 $14 $EE
$8B $46 $04 $EE $58 $EE $89 $EC $5D $C3 $55 $89 $E5 $83 $EC $08
$31 $C0 $31 $DB $89 $46 $F8 $8A $87 $00 $E8 $2A $46 $04 $73 $02
$31 $C0 $89 $46 $FA $43 $8A $87 $00 $E8 $2A $46 $04 $73 $02 $31
$C0 $89 $46 $FC $43 $8A $87 $00 $E8 $2A $46 $04 $73 $02 $31 $C0
$89 $46 $FE $43 $E8 $B9 $10 $FF $46 $F8 $83 $FB $60 $75 $C8 $89
$EC $5D $C3
#VGA palette fading
%patch $6C49 $B9 $20 $00 $E8 $EE $EE $89 $C8 $D1 $E0 $48 $50 $E8 $0F $EF $44
$44 $E2 $F0 $C3 $55 $89 $E5 $BA $C8 $03 $8B $46 $04 $EE $BA $C9
$03 $8B $46 $06 $EE $8B $46 $08 $EE $8B $46 $0A $EE $89 $EC $5D
$C3 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00
$00 $00 $00 $00 $B9 $20 $00 $E8 $AA $EE $B8 $40 $00 $D1 $E1 $29
$C8 $50 $E8 $C9 $EE $44 $44 $D1 $E9 $E2 $EC $31 $C0 $50 $E8 $A1
$EE $44 $44 $C3 $B8 $0D $00 $CD $10 $B8 $13 $10 $BB $00 $01 $CD
$10 $B8 $02 $10 $1E $07 $BA $3B $25 $CD $10 $B8 $12 $10 $B9 $20
$00 $31 $DB $BA $00 $E8 $CD $10 $C3
#VGA lights
%patch $3592 $C7 $06 $1E $82 $01 $00 $B8 $01 $00 $50 $E8 $43 $8B $44 $44 $31
$C0 $50 $E8 $A4 $25 $44 $44 $C3 $00 $00 $00 $00 $00 $00 $00 $00
$C7 $06 $1E $82 $00 $00 $B8 $01 $00 $50 $E8 $23 $8B $44 $44 $B8
$01 $00 $50 $E8 $83 $25 $44 $44 $C3
%patch $3596 $01 $00 #lights on delay
%patch $35B9 $01 $00 #lights off delay
|
I think this may be closer to the pace of the original routines. |
|
| Back to top |
|
 |
levellass
Joined: 11 Oct 2006 Posts: 2053 Location: Ngaruawahia New Zealand
|
Posted: Mon Jul 12, 2010 4:18 am Post subject: |
|
|
| Added to the wiki. I assume the above patch needs the two palettes and the Set EGA color register values code. |
|
| Back to top |
|
 |
Dr. Kylstein
Joined: 16 Dec 2009 Posts: 117
|
Posted: Wed Jul 14, 2010 1:20 am Post subject: |
|
|
| levellass wrote: | | Added to the wiki. I assume the above patch needs the two palettes and the Set EGA color register values code. |
Yes. I've updated the wiki article to make the two patches more consistent and tweak the formatting a bit. |
|
| Back to top |
|
 |
levellass
Joined: 11 Oct 2006 Posts: 2053 Location: Ngaruawahia New Zealand
|
Posted: Wed Jul 14, 2010 2:37 am Post subject: |
|
|
| Cool, cleared up the commentary just a bit. This is excellent stuff! |
|
| Back to top |
|
 |
|