SoFunction
Updated on 2025-04-12

Yi Language Dungeon and Warriors Assistance Shun Diagram Source Code

DNF auxiliary straight-picture source code

For learning reference only, commercial use is prohibited

.Version 2
.Assembly Shuntu
.Subprogram Shuntu结构
.parameter directionID, Integer type
.Local variables First-level offset, Integer type
.Local variables Secondary offset, Integer type
.Local variables Temporary data, Integer type
.Local variables Coordinate structure, Integer type
.Local variables x, Integer type
.Local variables y, Integer type
.Local variables xF, Integer type
.Local variables yF, Integer type
.Local variables cx, Integer type
.Local variables cy, Integer type
First-level offset = compilation_读Integer type (#Basics Base Address)Secondary offset = compilation_读Integer type (First-level offset + #Map Offset).If true (Secondary offset = 0)
  return ()
.If true结束
Temporary data = compilation_读Integer type (#Shop Base Address - 8)Temporary data = compilation_读Integer type (Temporary data + #Time base address)Temporary data = compilation_读Integer type (Temporary data + #Coordinate structure offset 01)Coordinate structure = Temporary data + (directionID + directionID × 4) × 8 + #Coordinate structure offset 02x = compilation_读Integer type (Coordinate structure + 0)
y = compilation_读Integer type (Coordinate structure + 4)
xF = compilation_读Integer type (Coordinate structure + 8)
yF = compilation_读Integer type (Coordinate structure + 12)
.If true (directionID = 0)
  cx = x + xF + 20
  cy = y + yF ÷ 2
.If true结束
.If true (directionID = 1)
  cx = x - 20
  cy = y + yF ÷ 2
.If true结束
.If true (directionID = 2)
  cx = x + xF ÷ 2
  cy = y + yF + 20
.If true结束
.If true (directionID = 3)
  cx = x + xF ÷ 2
  cy = y - 20
.If true结束
coordinateCALL (First-level offset, cx, cy, 0)
Delay (200)
coordinateCALL (First-level offset, x + xF ÷ 2, y, 0)
.Subprogram Package pictures
.parameter Xindex, Integer type
.parameter Yindex, Integer type
bufferCall (45)
encryptionCall (Xindex, 1)
encryptionCall (Yindex, 1)
encryptionCall (0, 4)
encryptionCall (0, 4)
encryptionCall (0, 1)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 4)
encryptionCall (0, 4)
encryptionCall (0, 4)
encryptionCall (0, 4)
encryptionCall (0, 4)
encryptionCall (0, 4)
encryptionCall (0, 4)
encryptionCall (0, 4)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 4)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 2)
encryptionCall (0, 4)
encryptionCall (0, 4)
encryptionCall (0, 4)
encryptionCall (0, 2)
encryptionCall (0, 1)
Send a packageCall ()
.Subprogram Package first
.Local variables RoomX, Integer type
.Local variables RoomY, Integer type
.If true (Do you need to open the door () = real)
  RoomX = compilation_Get the offset address (compilation_reduce (#Shop Base, 8), { #Time Base, #A Star Offset_3, 0 })  RoomY = compilation_Get the offset address (compilation_reduce (#Shop Base, 8), { #Time Base, #A Star Offset_4, 0 })  Package pictures (RoomX, compilation_reduce (RoomY, 1))
.If true结束
.Subprogram Group package to the bottom
.Local variables RoomX, Integer type
.Local variables RoomY, Integer type
.If true (Do you need to open the door () = real)
  RoomX = compilation_Get the offset address (compilation_reduce (#Shop Base, 8), { #Time Base, #A Star Offset_3, 0 })  RoomY = compilation_Get the offset address (compilation_reduce (#Shop Base, 8), { #Time Base, #A Star Offset_4, 0 })  Package pictures (RoomX, compilation_add (RoomY, 1))
.If true结束
.Subprogram Group packet to the left
.Local variables RoomX, Integer type
.Local variables RoomY, Integer type
.If true (Do you need to open the door () = real)
  RoomX = compilation_Get the offset address (compilation_reduce (#Shop Base, 8), { #Time Base, #A Star Offset_3, 0 })  RoomY = compilation_Get the offset address (compilation_reduce (#Shop Base, 8), { #Time Base, #A Star Offset_4, 0 })  Package pictures (compilation_reduce (RoomX, 1), RoomY)
.If true结束
.Subprogram Group package to the right
.Local variables RoomX, Integer type
.Local variables RoomY, Integer type
.If true (Do you need to open the door () = real)
  RoomX = compilation_Get the offset address (compilation_reduce (#Shop Base, 8), { #Time Base, #A Star Offset_3, 0 })  RoomY = compilation_Get the offset address (compilation_reduce (#Shop Base, 8), { #Time Base, #A Star Offset_4, 0 })  Package pictures (compilation_add (RoomX, 1), RoomY)
.If true结束
.Subprogram Forced first
.If true (Do you need to open the door () = real)
  StrongCall (2)
.If true结束
.Subprogram Force to the bottom
.If true (Do you need to open the door () = real)
  StrongCall (3)
.If true结束
.Subprogram Force to left
.If true (Do you need to open the door () = real)
  StrongCall (0)
.If true结束
.Subprogram Force to the right
.If true (Do you need to open the door () = real)
  StrongCall (1)
.If true结束
.Subprogram Shuntu至上
.If true (Do you need to open the door () = real)
  .Judgment begins (Plot missionID = 26 or Plot missionID = 15 or Plot missionID = 3191 or Global_PlotID = 15 or Global_PlotID = 88 or Global_PlotID = 190 or Global_PlotID = 35 or Global_PlotID = 3191 or Global_PlotID = 26) ' Plot missionID=15It's the city of the sky
    Forced first ()
  .default
    Shuntu结构 (2)
  .The judgment ends
.If true结束
.Subprogram Shuntu至下
.If true (Do you need to open the door () = real)
  .Judgment begins (Plot missionID = 26 or Plot missionID = 15 or Plot missionID = 3191 or Global_PlotID = 15 or Global_PlotID = 88 or Global_PlotID = 190 or Global_PlotID = 35 or Global_PlotID = 3191 or Global_PlotID = 26)
    Force to the bottom ()
  .default
    Shuntu结构 (3)
  .The judgment ends
.If true结束
.Subprogram Shuntu至左
.If true (Do you need to open the door () = real)
  .Judgment begins (Plot missionID = 26 or Plot missionID = 15 or Plot missionID = 3191 or Global_PlotID = 15 or Global_PlotID = 88 or Global_PlotID = 190 or Global_PlotID = 35 or Global_PlotID = 3191 or Global_PlotID = 26)
    Force to left ()
  .default
    Shuntu结构 (0)
  .The judgment ends
.If true结束
.Subprogram Shuntu至右
.If true (Do you need to open the door () = real)
  .Judgment begins (Plot missionID = 26 or Plot missionID = 15 or Plot missionID = 3191 or Global_PlotID = 15 or Global_PlotID = 88 or Global_PlotID = 190 or Global_PlotID = 35 or Global_PlotID = 3191 or Global_PlotID = 26) ' Plot missionID=3191It's the giant beast of heaven
    Force to the right ()
  .default
    Shuntu结构 (1)
  .The judgment ends
.If true结束
.Subprogram Shuntu调用
.Local variables Painting method, Integer type
.Local variables Bureau_Map data, Map data
Painting method = File Reading Configuration (“Painting method”)
Bureau_Map data = Map data ()
Shuntudirection = Shuntudirection (Bureau_Map data.How to walk the map [1], Bureau_Map data.How to walk the map [2])
.If true (Painting method = 1)
  .If true (Shuntudirection = 2)
    Shuntu至上 ()
  .If true结束
  .If true (Shuntudirection = 3)
    Shuntu至下 ()
  .If true结束
  .If true (Shuntudirection = 0)
    Shuntu至左 ()
  .If true结束
  .If true (Shuntudirection = 1)
    Shuntu至右 ()
  .If true结束
.If true结束
.If true (Painting method = 2)
  .If true (Shuntudirection = 2)
    Forced first ()
  .If true结束
  .If true (Shuntudirection = 3)
    Force to the bottom ()
  .If true结束
  .If true (Shuntudirection = 0)
    Force to left ()
  .If true结束
  .If true (Shuntudirection = 1)
    Force to the right ()
  .If true结束
.If true结束

Summarize

The above is the entire content of this article. I hope that the content of this article has certain reference value for your study or work. Thank you for your support. If you want to know more about it, please see the relevant links below