From 17313d9f372e78f8b0de1e9c0fe229fa997468fc Mon Sep 17 00:00:00 2001 From: MartinTrionfetti Date: Sat, 13 Nov 2021 03:07:23 -0300 Subject: [PATCH] Fix sistema de luces + sistema de dias + nicks --- CODIGO/ClsRoundLight.cls | 28 ++++----- CODIGO/General.bas | 5 +- CODIGO/ModMetereologia.bas | 89 ++++++++++++++++++++--------- CODIGO/Protocol.bas | 15 +---- CODIGO/ProtocolCmdParse.bas | 4 +- CODIGO/Recursos.bas | 27 +++++---- CODIGO/TileEngine.bas | 3 +- CODIGO/TileEngine_Map.bas | 39 ++++++++++++- CODIGO/TileEngine_RenderScreen.bas | 15 +++-- CODIGO/clsLucesCuadradas.cls | 43 +++----------- CODIGO/engine.bas | 16 +++++- CODIGO/frmMain.frm | 27 ++++----- CODIGO/frmMain.frx | Bin 81905 -> 81904 bytes 13 files changed, 180 insertions(+), 131 deletions(-) diff --git a/CODIGO/ClsRoundLight.cls b/CODIGO/ClsRoundLight.cls index 82c68ffc..d6abdb30 100644 --- a/CODIGO/ClsRoundLight.cls +++ b/CODIGO/ClsRoundLight.cls @@ -34,7 +34,7 @@ Friend Function Create_Light_To_Map(ByVal map_x As Byte, ByVal map_y As Byte, Co NumLights = NumLights + 1 ReDim Preserve light_list(1 To NumLights) As tLight - + 'Le damos color light_list(NumLights).RGBcolor = Color @@ -50,9 +50,8 @@ Friend Function Create_Light_To_Map(ByVal map_x As Byte, ByVal map_y As Byte, Co 'Pos en el mapa light_list(NumLights).map_x = map_x light_list(NumLights).map_y = map_y - - 'LucesRedondas.LightRenderAll - + + UpdateLights = True Exit Function @@ -112,7 +111,9 @@ Public Function Delete_Light_To_Index(ByVal light_index As Byte, Optional Render max_x = light_list(light_index).map_x + light_list(light_index).range min_y = light_list(light_index).map_y - light_list(light_index).range max_y = light_list(light_index).map_y + light_list(light_index).range - + + UpdateLights = True + For Ya = min_y To max_y For Xa = min_x To max_x @@ -125,12 +126,6 @@ Public Function Delete_Light_To_Index(ByVal light_index As Byte, Optional Render Next Xa Next Ya - - If RenderFinal Then - LucesRedondas.LightRenderAll - - End If - Exit Function @@ -221,6 +216,8 @@ Private Sub LightRender(ByVal light_index As Integer) min_y = light_list(light_index).map_y - range max_y = light_list(light_index).map_y + range + + For Ya = min_y To max_y For Xa = min_x To max_x @@ -255,7 +252,7 @@ LightRender_Err: End Sub -Public Sub LightRenderAll() +Public Sub LightRenderAll(ByVal MinX As Long, ByVal MinY As Long, ByVal MaxX As Long, ByVal MaxY As Long) On Error GoTo LightRenderAll_Err @@ -263,8 +260,9 @@ Public Sub LightRenderAll() Dim i As Long For i = 1 To NumLights - LightRender i - + If light_list(i).map_x + light_list(i).range > MinX And light_list(i).map_x - light_list(i).range < MaxX And light_list(i).map_y + light_list(i).range > MinY And light_list(i).map_y - light_list(i).range < MaxY Then + LightRender i + End If Next i @@ -285,9 +283,7 @@ Public Function Delete_All_LigthRound(Optional RenderFinal As Boolean = True) For i = 1 To NumLights Delete_Light_To_Index i, RenderFinal - Next i - Exit Function diff --git a/CODIGO/General.bas b/CODIGO/General.bas index c0b4e000..7d4df58f 100644 --- a/CODIGO/General.bas +++ b/CODIGO/General.bas @@ -635,8 +635,8 @@ Sub SetConnected() frmMain.Timerping.Enabled = False End If - frmMain.UpdateLight.Enabled = True - frmMain.UpdateDaytime.Enabled = True + ' frmMain.UpdateLight.Enabled = True + 'frmMain.UpdateDaytime.Enabled = True light_transition = 1# COLOR_AZUL = RGB(0, 0, 0) @@ -1149,6 +1149,7 @@ Sub Main() AlphaNiebla = 75 EntradaY = 10 EntradaX = 10 + UpdateLights = False Call SwitchMap(UserMap) diff --git a/CODIGO/ModMetereologia.bas b/CODIGO/ModMetereologia.bas index 2295d494..b1f8957b 100644 --- a/CODIGO/ModMetereologia.bas +++ b/CODIGO/ModMetereologia.bas @@ -6,19 +6,19 @@ Public Const LIGHT_TRANSITION_DURATION = 5000 Public Const STEP_LIGHT_TRANSITION = 1 / LIGHT_TRANSITION_DURATION 'Status -Private Const Normal As Byte = 0 -Private Const NUBLADO As Byte = 1 -Private Const LLUVIA As Byte = 2 -Private Const NIEVE As Byte = 3 -Private Const TORMENTA As Byte = 4 +Public Const Normal As Byte = 0 +Public Const NUBLADO As Byte = 1 +Public Const LLUVIA As Byte = 2 +Public Const NIEVE As Byte = 3 +Public Const TORMENTA As Byte = 4 -Private DayColors() As RGBA -Private DeathColor As RGBA -Private BlindColor As RGBA -Private TimeIndex As Integer +Public DayColors() As RGBA +Public DeathColor As RGBA +Public BlindColor As RGBA +Public TimeIndex As Integer -Private NightIndex As Integer -Private MorningIndex As Integer +Public NightIndex As Integer +Public MorningIndex As Integer Public MeteoParticle As Integer @@ -26,35 +26,64 @@ Public Sub IniciarMeteorologia() On Error GoTo IniciarMeteorologia_Err - ReDim DayColors(11) + ReDim DayColors(0 To 24) As RGBA ' 00:00 - 02:00 - Call SetRGBA(DayColors(0), 130, 130, 130) + Call SetRGBA(DayColors(0), 70, 70, 70) NightIndex = 0 ' 02:00 - 04:00 - Call SetRGBA(DayColors(1), 130, 130, 160) + Call SetRGBA(DayColors(1), 60, 60, 60) ' 04:00 - 06:00 - Call SetRGBA(DayColors(2), 150, 150, 180) + Call SetRGBA(DayColors(2), 80, 80, 80) ' 06:00 - 08:00 - Call SetRGBA(DayColors(3), 200, 200, 200) + 'Call SetRGBA(DayColors(3), 20, 20, 20) + Call SetRGBA(DayColors(3), 100, 100, 100) MorningIndex = 3 ' 08:00 - 10:00 - Call SetRGBA(DayColors(4), 230, 200, 200) + Call SetRGBA(DayColors(4), 100, 100, 100) ' 10:00 - 12:00 - Call SetRGBA(DayColors(5), 255, 230, 220) + Call SetRGBA(DayColors(5), 130, 125, 125) ' 12:00 - 14:00 - Call SetRGBA(DayColors(6), 255, 240, 220) + Call SetRGBA(DayColors(6), 150, 150, 150) ' 14:00 - 16:00 - Call SetRGBA(DayColors(7), 255, 250, 200) + Call SetRGBA(DayColors(7), 170, 170, 170) ' 16:00 - 18:00 - Call SetRGBA(DayColors(8), 255, 200, 200) + Call SetRGBA(DayColors(8), 180, 170, 170) ' 18:00 - 20:00 - Call SetRGBA(DayColors(9), 255, 180, 160) + Call SetRGBA(DayColors(9), 190, 180, 190) ' 20:00 - 22:00 - Call SetRGBA(DayColors(10), 180, 150, 140) + Call SetRGBA(DayColors(10), 200, 210, 200) ' 22:00 - 00:00 - Call SetRGBA(DayColors(11), 150, 140, 130) + Call SetRGBA(DayColors(11), 220, 220, 220) + + Call SetRGBA(DayColors(12), 255, 255, 255) + NightIndex = 0 + ' 02:00 - 04:00 + Call SetRGBA(DayColors(13), 255, 255, 255) + ' 04:00 - 06:00 + Call SetRGBA(DayColors(14), 240, 240, 240) + ' 06:00 - 08:00 + Call SetRGBA(DayColors(15), 240, 235, 240) + MorningIndex = 3 + ' 08:00 - 10:00 + Call SetRGBA(DayColors(16), 230, 230, 230) + ' 10:00 - 12:00 + Call SetRGBA(DayColors(17), 210, 200, 210) + ' 12:00 - 14:00 + Call SetRGBA(DayColors(18), 220, 190, 200) + ' 14:00 - 16:00 + Call SetRGBA(DayColors(19), 190, 170, 170) + ' 16:00 - 18:00 + Call SetRGBA(DayColors(20), 130, 130, 170) + ' 18:00 - 20:00 + Call SetRGBA(DayColors(21), 130, 130, 170) + ' 20:00 - 22:00 + Call SetRGBA(DayColors(22), 120, 120, 140) + ' 22:00 - 00:00 + Call SetRGBA(DayColors(23), 110, 110, 110) + Call SetRGBA(DayColors(24), 90, 90, 90) + ' Muerto Call SetRGBA(DeathColor, 120, 120, 120) @@ -91,9 +120,9 @@ Public Sub RevisarHoraMundo(Optional ByVal Instantaneo As Boolean = False) If MapDat.base_light = 0 Then If Instantaneo Then - global_light = DayColors(TimeIndex) + global_light = DayColors(HoraActual) Else - Call ActualizarLuz(DayColors(TimeIndex)) + Call ActualizarLuz(DayColors(HoraActual)) End If If TimeIndex = NightIndex Then @@ -146,7 +175,13 @@ Public Sub RestaurarLuz() global_light = BlindColor ElseIf TimeIndex >= 0 Then - global_light = DayColors(TimeIndex) + Dim Elapsed As Single + Elapsed = (FrameTime - HoraMundo) / DuracionDia + Elapsed = (Elapsed - Fix(Elapsed)) * 24 + + Dim HoraActual As Integer + HoraActual = Fix(Elapsed) + global_light = DayColors(HoraActual) Else global_light = COLOR_WHITE(0) diff --git a/CODIGO/Protocol.bas b/CODIGO/Protocol.bas index 061dc66c..80fe1c3f 100644 --- a/CODIGO/Protocol.bas +++ b/CODIGO/Protocol.bas @@ -3889,12 +3889,8 @@ Private Sub HandleObjectCreate() If Rango < 100 Then id = x & y LucesCuadradas.Light_Create x, y, Color, Rango, id - LucesCuadradas.Light_Render_All Else LucesRedondas.Create_Light_To_Map x, y, Color, Rango - 99 - LucesRedondas.LightRenderAll - LucesCuadradas.Light_Render_All - End If End If @@ -3969,7 +3965,7 @@ Private Sub HandleObjectDelete() LucesCuadradas.Light_Remove id MapData(x, y).luz.Color = COLOR_EMPTY MapData(x, y).luz.Rango = 0 - LucesCuadradas.Light_Render_All + ' LucesCuadradas.Light_Render_All End If @@ -7259,16 +7255,12 @@ Private Sub HandleLightToFloor() If MapData(x, y).luz.Rango > 100 Then LucesRedondas.Delete_Light_To_Map x, y - - LucesCuadradas.Light_Render_All - LucesRedondas.LightRenderAll Exit Sub Else id = LucesCuadradas.Light_Find(x & y) LucesCuadradas.Light_Remove id MapData(x, y).luz.Color = COLOR_EMPTY MapData(x, y).luz.Rango = 0 - LucesCuadradas.Light_Render_All Exit Sub End If @@ -7281,14 +7273,9 @@ Private Sub HandleLightToFloor() If Rango < 100 Then id = x & y LucesCuadradas.Light_Create x, y, color_value, Rango, id - LucesRedondas.LightRenderAll - LucesCuadradas.Light_Render_All Else LucesRedondas.Create_Light_To_Map x, y, color_value, Rango - 99 - LucesRedondas.LightRenderAll - LucesCuadradas.Light_Render_All - End If Exit Sub diff --git a/CODIGO/ProtocolCmdParse.bas b/CODIGO/ProtocolCmdParse.bas index 493aeb4a..7f74f3b9 100644 --- a/CODIGO/ProtocolCmdParse.bas +++ b/CODIGO/ProtocolCmdParse.bas @@ -755,8 +755,6 @@ Public Sub ParseUserCommand(ByVal RawCommand As String) Else Call LucesRedondas.Create_Light_To_Map(UserPos.x, UserPos.y, COLOR_WHITE(0), 10) End If - LucesRedondas.LightRenderAll - LucesCuadradas.Light_Render_All End If Case "/LUZMAPA" @@ -768,7 +766,7 @@ Public Sub ParseUserCommand(ByVal RawCommand As String) ValidNumber(ArgumentosAll(2), eNumber_Types.ent_Integer) Then Call SetGlobalLight(D3DColorXRGB(ArgumentosAll(0), ArgumentosAll(1), ArgumentosAll(2))) - Call MapUpdateGlobalLight + 'Call MapUpdateGlobalLight Exit Sub End If diff --git a/CODIGO/Recursos.bas b/CODIGO/Recursos.bas index cf9bb8ba..285e6417 100644 --- a/CODIGO/Recursos.bas +++ b/CODIGO/Recursos.bas @@ -186,7 +186,7 @@ Private Type tMapDat End Type -Private MapSize As tMapSize +Public MapSize As tMapSize Public MapDat As tMapDat Public iplst As String ' ********************************************************* @@ -948,6 +948,19 @@ Public Sub CargarMapa(ByVal map As Integer) #End If 'Limpiamos los efectos remantentes del mapa. + For x = 1 To 100 + For y = 1 To 100 + With MapData(x, y) + + Call SetRGBA(.light_value(0), 0, 0, 0) + Call SetRGBA(.light_value(1), 0, 0, 0) + Call SetRGBA(.light_value(2), 0, 0, 0) + Call SetRGBA(.light_value(3), 0, 0, 0) + + End With + Next y + Next x + Call LucesCuadradas.Light_Remove_All Call LucesRedondas.Delete_All_LigthRound(False) Call Graficos_Particulas.Particle_Group_Remove_All @@ -968,13 +981,8 @@ Public Sub CargarMapa(ByVal map As Integer) ReDim MapData(1 To 100, 1 To 100) - If MapDat.base_light = 0 Then - Call RestaurarLuz - - Else - Call SetGlobalLight(MapDat.base_light) - End If - + UpdateLights = True + For x = 1 To 100 For y = 1 To 100 With MapData(x, y) @@ -1214,9 +1222,6 @@ Public Sub CargarMapa(ByVal map As Integer) Delete_File Windows_Temp_Dir & "mapa" & map & ".csm" #End If - Call LucesRedondas.LightRenderAll - Call LucesCuadradas.Light_Render_All - Exit Sub CargarMapa_Err: diff --git a/CODIGO/TileEngine.bas b/CODIGO/TileEngine.bas index a43bb702..36e63b18 100644 --- a/CODIGO/TileEngine.bas +++ b/CODIGO/TileEngine.bas @@ -442,6 +442,7 @@ Public ScrollPixelsPerFrameY As Single Public timerElapsedTime As Single Public timerTicksPerFrame As Single Public engineBaseSpeed As Single +Public UpdateLights As Boolean Public NumBodies As Integer Public Numheads As Integer @@ -576,7 +577,7 @@ Sub ConvertCPtoTP(ByVal viewPortX As Integer, ByVal viewPortY As Integer, ByRef On Error GoTo ConvertCPtoTP_Err - + ' Debug.Print "viewportX: " & viewPortX & "- ViewportY: " & viewPortY If viewPortX < 0 Or viewPortX > frmMain.renderer.ScaleWidth Then Exit Sub If viewPortY < 0 Or viewPortY > frmMain.renderer.ScaleHeight Then Exit Sub diff --git a/CODIGO/TileEngine_Map.bas b/CODIGO/TileEngine_Map.bas index 4faa18f1..48633503 100644 --- a/CODIGO/TileEngine_Map.bas +++ b/CODIGO/TileEngine_Map.bas @@ -517,14 +517,47 @@ Sub MapUpdateGlobalLight() Next x Next y - Call LucesRedondas.LightRenderAll - Call LucesCuadradas.Light_Render_All + Exit Sub + +MapUpdateGlobalLight_Err: + Call RegistrarError(Err.Number, Err.Description, "TileEngine_Map.MapUpdateGlobalLight", Erl) + Resume Next + +End Sub + +Sub MapUpdateGlobalLightRender() + + On Error GoTo MapUpdateGlobalLight_Err + + + Dim x As Integer, y As Integer + Dim MinX As Long, MinY As Long, MaxX As Long, MaxY As Long + MinX = 1 + MinY = 1 + MaxX = 100 + MaxY = 100 + ' Reseteamos toda la luz del mapa + For y = MinY To MaxY + For x = MinX To MaxX + With MapData(x, y) + + .light_value(0) = global_light + .light_value(1) = global_light + .light_value(2) = global_light + .light_value(3) = global_light + + End With + Next x + Next y + Call LucesRedondas.LightRenderAll(MinX, MinY, MaxX, MaxY) '(MinX, MinY, MaxX, MaxY) + Call LucesCuadradas.Light_Render_All(MinX, MinY, MaxX, MaxY) '(MinX, MinY, MaxX, MaxY) + Exit Sub MapUpdateGlobalLight_Err: - Call RegistrarError(Err.number, Err.Description, "TileEngine_Map.MapUpdateGlobalLight", Erl) + ' Call RegistrarError(Err.Number, Err.Description, "TileEngine_Map.MapUpdateGlobalLightRender", Erl) Resume Next End Sub diff --git a/CODIGO/TileEngine_RenderScreen.bas b/CODIGO/TileEngine_RenderScreen.bas index 3009ee27..b03bf409 100644 --- a/CODIGO/TileEngine_RenderScreen.bas +++ b/CODIGO/TileEngine_RenderScreen.bas @@ -127,6 +127,12 @@ Sub RenderScreen(ByVal center_x As Integer, ByVal center_y As Integer, ByVal Pix MaxBufferedY = YMaxMapSize End If + If UpdateLights Then + Call RestaurarLuz + Call MapUpdateGlobalLightRender + UpdateLights = False + End If + Call SpriteBatch.BeginPrecalculated(StartX, StartY) ' ********************************* @@ -139,7 +145,7 @@ Sub RenderScreen(ByVal center_x As Integer, ByVal center_y As Integer, ByVal Pix ' Layer 1 ********************************* Call Draw_Grh_Precalculated(.Graphic(1), .light_value, (.Blocked And FLAG_AGUA) <> 0, (.Blocked And FLAG_LAVA) <> 0, x, y, MinX, MaxX, MinY, MaxY) '****************************************** - + End With Next x @@ -318,7 +324,7 @@ Sub RenderScreen(ByVal center_x As Integer, ByVal center_y As Integer, ByVal Pix Case eObjType.otPuertas, eObjType.otTeleport, eObjType.otCarteles, eObjType.OtPozos, eObjType.otYacimiento, eObjType.OtCorreo ' Objetos grandes (menos árboles) - Call Draw_Grh(.ObjGrh, ScreenX, ScreenY, 1, 1, .light_value, , x, y) + Call Draw_Grh(.ObjGrh, ScreenX, ScreenY, 1, 1, .light_value, False, x, y) End Select End If @@ -466,13 +472,9 @@ Sub RenderScreen(ByVal center_x As Integer, ByVal center_y As Integer, ByVal Pix If Trigger Then Call Copy_RGBAList_WithAlpha(TempColor, .light_value, RoofsLight(Trigger)) - Call Draw_Grh(.Graphic(4), ScreenX, ScreenY, 1, 1, TempColor, , x, y) - Else - Call Draw_Grh(.Graphic(4), ScreenX, ScreenY, 1, 1, .light_value, , x, y) - End If End If @@ -705,6 +707,7 @@ Sub RenderScreen(ByVal center_x As Integer, ByVal center_y As Integer, ByVal Pix End If + ' Call Draw_GrhIndex(63333, 0, 0) Exit Sub RenderScreen_Err: diff --git a/CODIGO/clsLucesCuadradas.cls b/CODIGO/clsLucesCuadradas.cls index 7233145e..f8e5a235 100644 --- a/CODIGO/clsLucesCuadradas.cls +++ b/CODIGO/clsLucesCuadradas.cls @@ -106,7 +106,8 @@ Friend Function Light_Create(ByVal map_x As Integer, ByVal map_y As Integer, ByR Exit Function End If - + + UpdateLights = True Light_Create = Light_Next_Open Light_Make Light_Create, map_x, map_y, color_value, range, id @@ -299,7 +300,6 @@ Private Sub Light_Make(ByVal light_index As Long, ByVal map_x As Integer, ByVal light_list(light_index).Color = rgb_value light_list(light_index).range = range light_list(light_index).id = id - Exit Sub @@ -337,7 +337,7 @@ Light_Check_Err: End Function -Public Sub Light_Render_All() +Public Sub Light_Render_All(ByVal MinX As Long, ByVal MinY As Long, ByVal MaxX As Long, ByVal MaxY As Long) On Error GoTo Light_Render_All_Err @@ -352,8 +352,9 @@ Public Sub Light_Render_All() For loop_counter = 1 To light_count If light_list(loop_counter).active Then - Light_Render loop_counter - + If light_list(loop_counter).map_x + light_list(loop_counter).range > MinX And light_list(loop_counter).map_x - light_list(loop_counter).range < MaxX And light_list(loop_counter).map_y + light_list(loop_counter).range > MinY And light_list(loop_counter).map_y - light_list(loop_counter).range < MaxY Then + Light_Render loop_counter + End If End If Next loop_counter @@ -405,35 +406,7 @@ Private Sub Light_Render(ByVal light_index As Long) MapData(light_list(light_index).map_x, light_list(light_index).map_y).light_value(1) = Color MapData(light_list(light_index).map_x, light_list(light_index).map_y).light_value(2) = Color MapData(light_list(light_index).map_x, light_list(light_index).map_y).light_value(3) = Color - - 'For ia = 0 To 6.5 Step 0.05 - ' For i = 1 To light_list(light_index).range / 2 - ' x = (Sin(ia) * i) + light_list(light_index).map_x - ' y = (Cos(ia) * i) + light_list(light_index).map_y - ' 'Debug.Print x; y - ' If InMapBounds(x, y) Then - ' If i = (light_list(light_index).range / 2) Then - ' If MapData(x - 1, y - 1).light_value(2) <> color Then MapData(x, y).light_value(0) = 0 - ' If MapData(x + 1, y + 1).light_value(0) <> color Then MapData(x, y).light_value(2) = 0 - ' If MapData(x + 1, y - 1).light_value(1) <> color Then MapData(x, y).light_value(1) = 0 - ' If MapData(x - 1, y + 1).light_value(3) <> color Then MapData(x, y).light_value(3) = 0 - ' If MapData(x - 1, y).light_value(0) = color Then MapData(x, y).light_value(3) = color - ' If MapData(x + 1, y).light_value(1) = color And MapData(x + 1, y).light_value(2) = color Then - ' MapData(x, y).light_value(0) = &HFFFF0FFF - ' MapData(x, y).light_value(3) = &HFFFF0FFF - ' End If - ' If MapData(x, y - 1).light_value(2) = color Then MapData(x, y).light_value(3) = color - ' If MapData(x, y + 1).light_value(3) = color Then MapData(x, y).light_value(1) = color'' - - ' Else - ' MapData(x, y).light_value(0) = &HFFFFFFFF - ' MapData(x, y).light_value(1) = &HFFFFFFFF - ' MapData(x, y).light_value(2) = &HFFFFFFFF - ' MapData(x, y).light_value(3) = &HFFFFFFFF - ' End If - ' End If - ' Next i - 'Next ia + 'Arrange corners 'NE If InMapBounds(min_x, min_y) Then @@ -644,6 +617,7 @@ Private Sub Light_Destroy(ByVal light_index As Long) Light_Erase light_index light_list(light_index) = temp + UpdateLights = True 'Update array size If light_index = light_last Then @@ -776,6 +750,7 @@ Private Sub Light_Erase(ByVal light_index As Long) Next y Next x + UpdateLights = True Exit Sub diff --git a/CODIGO/engine.bas b/CODIGO/engine.bas index a2e4138b..8aa23a20 100644 --- a/CODIGO/engine.bas +++ b/CODIGO/engine.bas @@ -1744,7 +1744,7 @@ Sub Char_Render(ByVal charindex As Long, ByVal PixelOffsetX As Integer, ByVal Pi If .Arma.WeaponWalk(.Heading).grhIndex Then Call Draw_Grh(.Arma.WeaponWalk(.Heading), TextureX, TextureY + OffArma, 1, 1, COLOR_WHITE, False, x, y) End Select - + EndComposedTexture If Not .Invisible Then @@ -1800,6 +1800,20 @@ Sub Char_Render(ByVal charindex As Long, ByVal PixelOffsetX As Integer, ByVal Pi 'Nick line = Left$(.nombre, Pos - 2) + Dim factor As Double + factor = MapData(x, y).light_value(0).r / 255 + NameColor(0).r = NameColor(0).r * factor + NameColor(0).G = NameColor(0).G * factor + NameColor(0).B = NameColor(0).B * factor + NameColor(1).r = NameColor(1).r * factor + NameColor(1).G = NameColor(1).G * factor + NameColor(1).B = NameColor(1).B * factor + NameColor(2).r = NameColor(2).r * factor + NameColor(2).G = NameColor(2).G * factor + NameColor(2).B = NameColor(2).B * factor + NameColor(3).r = NameColor(3).r * factor + NameColor(3).G = NameColor(3).G * factor + NameColor(3).B = NameColor(3).B * factor Engine_Text_Render line, PixelOffsetX + 16 - CInt(Engine_Text_Width(line, True) / 2) + .Body.BodyOffset.x, PixelOffsetY + .Body.BodyOffset.y + 30 + OffsetYname - Engine_Text_Height(line, True), NameColor, 1, False, 0, IIf(.Invisible, 160, 255) diff --git a/CODIGO/frmMain.frm b/CODIGO/frmMain.frm index aac8e4c3..dda4b0f4 100644 --- a/CODIGO/frmMain.frm +++ b/CODIGO/frmMain.frm @@ -384,6 +384,7 @@ Begin VB.Form frmMain _Version = 393217 BackColor = 0 BorderStyle = 0 + Enabled = -1 'True HideSelection = 0 'False ReadOnly = -1 'True ScrollBars = 2 @@ -459,7 +460,7 @@ Begin VB.Form frmMain Appearance = 0 'Flat Height = 510 Left = 1680 - Picture = "frmMain.frx":6181 + Picture = "frmMain.frx":6180 ToolTipText = "Seguro de resurrección" Top = 3060 Visible = 0 'False @@ -855,35 +856,35 @@ Begin VB.Form frmMain Begin VB.Image Hpshp Height = 240 Left = 525 - Picture = "frmMain.frx":6F93 + Picture = "frmMain.frx":6F92 Top = 1215 Width = 3240 End Begin VB.Image MANShp Height = 240 Left = 525 - Picture = "frmMain.frx":9857 + Picture = "frmMain.frx":9856 Top = 1635 Width = 3240 End Begin VB.Image STAShp Height = 135 Left = 510 - Picture = "frmMain.frx":C11B + Picture = "frmMain.frx":C11A Top = 2085 Width = 1335 End Begin VB.Image AGUAsp Height = 135 Left = 2340 - Picture = "frmMain.frx":CAC9 + Picture = "frmMain.frx":CAC8 Top = 2085 Width = 480 End Begin VB.Image COMIDAsp Height = 120 Left = 3285 - Picture = "frmMain.frx":CE6D + Picture = "frmMain.frx":CE6C Top = 2100 Width = 480 End @@ -891,7 +892,7 @@ Begin VB.Form frmMain Appearance = 0 'Flat Height = 510 Left = 630 - Picture = "frmMain.frx":D1B1 + Picture = "frmMain.frx":D1B0 ToolTipText = "Seguro de clan" Top = 3060 Visible = 0 'False @@ -900,7 +901,7 @@ Begin VB.Form frmMain Begin VB.Image ImgSegParty Height = 510 Left = 105 - Picture = "frmMain.frx":DFC3 + Picture = "frmMain.frx":DFC2 ToolTipText = "Seguro de grupo" Top = 3060 Visible = 0 'False @@ -910,7 +911,7 @@ Begin VB.Form frmMain Appearance = 0 'Flat Height = 510 Left = 1155 - Picture = "frmMain.frx":EDD5 + Picture = "frmMain.frx":EDD4 ToolTipText = "Seguro de ataque" Top = 3060 Visible = 0 'False @@ -1198,14 +1199,14 @@ Begin VB.Form frmMain Begin VB.Image CombateIcon Height = 180 Left = 8828 - Picture = "frmMain.frx":FBE7 + Picture = "frmMain.frx":FBE6 Top = 1812 Width = 555 End Begin VB.Image globalIcon Height = 180 Left = 8828 - Picture = "frmMain.frx":1016B + Picture = "frmMain.frx":1016A Top = 2008 Width = 555 End @@ -1283,7 +1284,7 @@ Begin VB.Form frmMain Begin VB.Image PicCorreo Height = 435 Left = 11520 - Picture = "frmMain.frx":106EF + Picture = "frmMain.frx":106EE Top = 480 Visible = 0 'False Width = 525 @@ -1353,7 +1354,7 @@ Begin VB.Form frmMain Begin VB.Image ExpBar Height = 240 Left = 11580 - Picture = "frmMain.frx":1136F + Picture = "frmMain.frx":1136E Top = 1545 Width = 3540 End diff --git a/CODIGO/frmMain.frx b/CODIGO/frmMain.frx index 84ea4c6b63424211cca55bf08797658279369e60..5a6f1706ba07ddfef20bec2cd4678788e42fb7f0 100644 GIT binary patch delta 25 hcmezPpXI}UmJKY4j1`kv6E#?j4J?c{8zt_)2LO>C3QGV0 delta 26 icmezHpXK9!mJKY4jFppF6E#>34UNoAHXA1HzXt%Bx(a>(