0% found this document useful (0 votes)
22 views3 pages

POD Umbra Macros

Uploaded by

Ari Schwartz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views3 pages

POD Umbra Macros

Uploaded by

Ari Schwartz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

macro = {

description = "Return the default height of the Umbra map display in pixels"
definition = "UmbraMapHeight"
replace_with = "'(int32)800'"
}

macro = {
description = "Return the default width of the Umbra map display in pixels"
definition = "UmbraMapWidth"
replace_with = "'(int32)600'"
}

macro = {
description = "How off-center are the Umbra Node icons? (half of icon size)"
definition = "UmbraNodeIconOffset"
replace_with = "'(int32)25'"
}

macro = {
description = "Return the rows as an int32"
definition = "UmbraMapRows"
replace_with =
"FixedPointToInt(GetPlayer.MakeScope.Var('umbra_map').Var('rows').GetValue)"
}

macro = {
description = "Return the columns as an int32"
definition = "UmbraMapColumns"
replace_with =
"FixedPointToInt(GetPlayer.MakeScope.Var('umbra_map').Var('columns').GetValue)"
}

macro = {
description = "X scaling factor for Umbra maps"
definition = "UmbraMapXScaling"
replace_with = "Divide_int32(UmbraMapWidth, UmbraMapColumns)"
}

macro = {
description = "X offset for Umbra maps"
definition = "UmbraMapXOffset"
# (map_width / columns) / 2 = (map_width / (columns*2))
# push items into the middle
replace_with = "Divide_int32(UmbraMapWidth, Multiply_int32(UmbraMapColumns,
'(int32)2'))"
}

macro = {
description = "X offset for a cell. This is centering and accounts for icon
size."
definition = "UmbraXOffset"
replace_with = "Subtract_int32(UmbraMapXOffset, UmbraNodeIconOffset)"
}

macro = {
description = "Returns the X coordinate scaled and offset"
definition = "UmbraXPosition(XCoord)"
replace_with = "Add_int32(Multiply_int32(Subtract_int32(UmbraMapColumns,
Add_int32(XCoord, '(int32)1')), UmbraMapXScaling), UmbraXOffset)"
}

macro = {
description = "Y scaling factor for Umbra maps"
definition = "UmbraMapYScaling"
replace_with = "Divide_int32(UmbraMapHeight, UmbraMapRows)"
}

macro = {
description = "Y offset for Umbra maps"
definition = "UmbraMapYOffset"
# (map_height / rows) / 2 = (map_height / (rows*2))
# push items into the middle
replace_with = "Divide_int32(UmbraMapHeight, Multiply_int32(UmbraMapRows,
'(int32)2'))"
}

macro = {
description = "Total Y offset for a cell. This is centering and accounts for
icon size."
definition = "UmbraYOffset"
replace_with = "Subtract_int32(UmbraMapYOffset, UmbraNodeIconOffset)"
}

macro = {
description = "Returns the Y coordinate scaled and offset"
definition = "UmbraYPosition(YCoord)"
replace_with = "Add_int32(Multiply_int32(Subtract_int32(UmbraMapRows,
Add_int32(YCoord, '(int32)1')), UmbraMapYScaling), UmbraYOffset)"
}

# Nodes
macro = {
description = "Return the scaled X coordinate of the scoped Node"
definition = "UmbraScaledScopedNodeX"
replace_with = "UmbraXPosition(ScopedNodeX)"
}

macro = {
description = "Return the scaled Y coordinate of the scoped Node"
definition = "UmbraScaledScopedNodeY"
replace_with = "UmbraYPosition(ScopedNodeY)"
}

# Lines
macro = {
description = "Return the scaled X coordinate of the scoped Line's starting
point"
definition = "UmbraScaledScopedLineX1"
replace_with = "Add_int32(UmbraXPosition(ScopedLineX1), UmbraNodeIconOffset)"
}

macro = {
description = "Return the scaled Y coordinate of the scoped Line's starting
point"
definition = "UmbraScaledScopedLineY1"
replace_with = "Add_int32(UmbraYPosition(ScopedLineY1), UmbraNodeIconOffset)"
}
macro = {
description = "Return the scaled X coordinate of the scoped Line's end point"
definition = "UmbraScaledScopedLineX2"
replace_with = "Add_int32(UmbraXPosition(ScopedLineX2), UmbraNodeIconOffset)"
}

macro = {
description = "Return the Y coordinate of the scoped Line's end point"
definition = "UmbraScaledScopedLineY2"
replace_with = "Add_int32(UmbraYPosition(ScopedLineY2), UmbraNodeIconOffset)"
}

You might also like