Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Dx7 Day/Night System


Justn
 Share

Recommended Posts

  • 8 months later...
Here is the fix for blinking screen on larger maps, if anyone still uses this…

In modDirectDraw7  in BltNightTile find this line:

```

' render
Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(Y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

```
Change to this:

```

' render
Call Engine_BltFast(Camera.Left + ConvertMapX(x * PIC_X), Camera.top + ConvertMapY(Y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

```
Added to OP
Link to comment
Share on other sites

  • 3 months later...
I know Im at the lonely bottom and will hardly be knoticed back here, but for anyone that wants the same thing but a direct X 8 version for newer engines could use wayback machine to access the link to Eclipse Dawn releases and grab the latest copy back there and rip it. Just search Night everywhere, grab the time related stuff etc. Granted it still needs more work to it like saving time etc or setting day night from server side to be truely complete its still great to get somethin in there :)
Link to comment
Share on other sites

> I know Im at the lonely bottom and will hardly be knoticed back here, but for anyone that wants the same thing but a direct X 8 version for newer engines could use wayback machine to access the link to Eclipse Dawn releases and grab the latest copy back there and rip it. Just search Night everywhere, grab the time related stuff etc. Granted it still needs more work to it like saving time etc or setting day night from server side to be truely complete its still great to get somethin in there :)

Or you could have someone do it for you
Link to comment
Share on other sites

Ok, there is a problem with the code you gave, but I have a fix for it.

Find:

```
Public Sub BltNightTile(ByVal X As Long, ByVal Y As Long)

```
Then Find:

```
Call Engine_BltFast(ConvertMapX(x * PIC_X), ConvertMapY(y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)

```
And replace with:

```
If Map.maxX < 26 And Map.maxY < 16 Then Call Engine_BltFast(ConvertMapX(X * PIC_X), ConvertMapY(Y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
If Map.maxX >= 26 And Map.maxY < 16 Then Call Engine_BltFast(Camera.Left + ConvertMapX(X * PIC_X), ConvertMapY(Y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
If Map.maxX < 26 And Map.maxY >= 16 Then Call Engine_BltFast(ConvertMapX(X * PIC_X), Camera.Top + ConvertMapY(Y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
If Map.maxX >= 26 And Map.maxY >= 16 Then Call Engine_BltFast(Camera.Left + ConvertMapX(X * PIC_X), Camera.Top + ConvertMapY(Y * PIC_Y), DDS_Tileset(.Layer(i).Tileset), rec, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY)
End If

```
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...