Bundle in new mods
|
@ -69,11 +69,19 @@ function string_space_to_underscore(string)
|
||||||
return s
|
return s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function version_coop_dx()
|
||||||
|
if SM64COOPDX_VERSION then
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
----------------------
|
----------------------
|
||||||
-- Global Variables --
|
-- Global Variables --
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
modVersion = "1.5"
|
modVersion = "1.5.1"
|
||||||
|
|
||||||
allowMenu = {}
|
allowMenu = {}
|
||||||
|
|
||||||
|
|
BIN
mods/character-select-coop/actors/gordon_geo.bin
Normal file
BIN
mods/character-select-coop/actors/squishy_geo.bin
Normal file
BIN
mods/character-select-coop/actors/yuyake_geo.bin
Normal file
|
@ -1,5 +1,5 @@
|
||||||
-- name: Character Select
|
-- name: Character Select
|
||||||
-- description: A Library / API made to make adding and\nusing Custom Characters as simple as possible!\n\nCreated by:\\#008800\\ Squishy6094\n\\#dcdcdc\\Concepts by:\\#4496f5\\ AngelicMiracles\\#AAAAFF\\\n\nGithub:\nSquishy6094/character-select-coop
|
-- description: \\#ffff00\\ ----- Character Select Coop ----- \n\n\\#dcdcdc\\A Library / API made to make adding and using Custom Characters as simple as possible!\n\nCreated by:\\#008800\\ Squishy6094\n\\#dcdcdc\\Concepts by:\\#4496f5\\ AngelicMiracles\\#AAAAFF\\\n\nGithub:\nSquishy6094/character-select-coop
|
||||||
|
|
||||||
|
|
||||||
menu = false
|
menu = false
|
||||||
|
@ -40,6 +40,7 @@ local optionTableRef = {
|
||||||
inputLatency = 4,
|
inputLatency = 4,
|
||||||
localModels = 5,
|
localModels = 5,
|
||||||
prefToDefault = 6,
|
prefToDefault = 6,
|
||||||
|
--debugInfo = 7
|
||||||
}
|
}
|
||||||
|
|
||||||
optionTable = {
|
optionTable = {
|
||||||
|
@ -88,6 +89,15 @@ optionTable = {
|
||||||
toggleMax = 1,
|
toggleMax = 1,
|
||||||
toggleNames = {"", ""},
|
toggleNames = {"", ""},
|
||||||
},
|
},
|
||||||
|
--[[
|
||||||
|
[optionTableRef.debugInfo] = {
|
||||||
|
name = "Debugging Info",
|
||||||
|
toggle = tonumber(mod_storage_load("debuginfo")),
|
||||||
|
toggleSaveName = "debuginfo",
|
||||||
|
toggleDefault = 0,
|
||||||
|
toggleMax = 1,
|
||||||
|
},
|
||||||
|
]]
|
||||||
}
|
}
|
||||||
|
|
||||||
local defaultPlayerColors = {
|
local defaultPlayerColors = {
|
||||||
|
@ -161,7 +171,9 @@ local function load_preferred_char()
|
||||||
for i = 2, #characterTable do
|
for i = 2, #characterTable do
|
||||||
if characterTable[i].name == mod_storage_load("PrefChar") then
|
if characterTable[i].name == mod_storage_load("PrefChar") then
|
||||||
currChar = i
|
currChar = i
|
||||||
|
if optionTable[optionTableRef.localModels].toggle == 1 then
|
||||||
djui_popup_create('Character Select:\nYour Preferred Character\n"'..string_underscore_to_space(characterTable[i].name)..'"\nwas applied successfully!', 4)
|
djui_popup_create('Character Select:\nYour Preferred Character\n"'..string_underscore_to_space(characterTable[i].name)..'"\nwas applied successfully!', 4)
|
||||||
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -341,9 +353,20 @@ local optionAnimTimerCap = optionAnimTimer
|
||||||
local inputStallTimer = 0
|
local inputStallTimer = 0
|
||||||
local inputStallTo = 15
|
local inputStallTo = 15
|
||||||
|
|
||||||
|
local FONT_CS_NORMAL = FONT_NORMAL
|
||||||
|
if version_coop_dx() then
|
||||||
|
FONT_CS_NORMAL = FONT_ALIASED
|
||||||
|
end
|
||||||
|
|
||||||
local TEXT_OPTIONS_HEADER = "Menu Options"
|
local TEXT_OPTIONS_HEADER = "Menu Options"
|
||||||
|
local TEXT_VERSION = "Version: "..modVersion
|
||||||
|
if version_coop_dx() then
|
||||||
|
TEXT_VERSION = TEXT_VERSION.." | CoopDX Detected"
|
||||||
|
end
|
||||||
local TEXT_RATIO_UNSUPPORTED = "Your Current Aspect-Ratio isn't Supported!"
|
local TEXT_RATIO_UNSUPPORTED = "Your Current Aspect-Ratio isn't Supported!"
|
||||||
local TEXT_DESCRIPTION = "Character Description:"
|
local TEXT_DESCRIPTION = "Character Description:"
|
||||||
|
local TEXT_DESCRIPTION_SHORT = "Description"
|
||||||
|
local TEXT_DEBUGGING = "Debug"
|
||||||
local TEXT_PREF_SAVE = "Press A to Set as Preferred Character"
|
local TEXT_PREF_SAVE = "Press A to Set as Preferred Character"
|
||||||
local TEXT_PAUSE_Z_OPEN = "Z Button - Character Select"
|
local TEXT_PAUSE_Z_OPEN = "Z Button - Character Select"
|
||||||
local TEXT_PAUSE_CURR_CHAR = "Current Character: "
|
local TEXT_PAUSE_CURR_CHAR = "Current Character: "
|
||||||
|
@ -361,7 +384,7 @@ local menuColor = characterTable[currChar].color
|
||||||
|
|
||||||
local function on_hud_render()
|
local function on_hud_render()
|
||||||
djui_hud_set_resolution(RESOLUTION_N64)
|
djui_hud_set_resolution(RESOLUTION_N64)
|
||||||
djui_hud_set_font(FONT_NORMAL)
|
djui_hud_set_font(FONT_CS_NORMAL)
|
||||||
|
|
||||||
local width = djui_hud_get_screen_width() + 1.4
|
local width = djui_hud_get_screen_width() + 1.4
|
||||||
local height = 240
|
local height = 240
|
||||||
|
@ -438,10 +461,11 @@ local function on_hud_render()
|
||||||
djui_hud_set_color(0, 0, 0, 255)
|
djui_hud_set_color(0, 0, 0, 255)
|
||||||
djui_hud_render_rect(width - x + 2, 2, x - 4, height - 4)
|
djui_hud_render_rect(width - x + 2, 2, x - 4, height - 4)
|
||||||
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
||||||
djui_hud_set_font(FONT_NORMAL)
|
djui_hud_set_font(FONT_CS_NORMAL)
|
||||||
|
|
||||||
local TEXT_NAME = string_underscore_to_space(characterTable[currChar].name)
|
--if optionTable[optionTableRef.debugInfo].toggle == 0 then -- Actual Description
|
||||||
local TEXT_CREDIT = "By: "..characterTable[currChar].credit
|
local TEXT_NAME = characterTable[currChar].name
|
||||||
|
local TEXT_CREDIT = "Credit: "..characterTable[currChar].credit
|
||||||
local TEXT_DESCRIPTION_TABLE = characterTable[currChar].description
|
local TEXT_DESCRIPTION_TABLE = characterTable[currChar].description
|
||||||
local TEXT_PREF = 'Preferred Character: "'..string_underscore_to_space(TEXT_PREF_LOAD)..'"'
|
local TEXT_PREF = 'Preferred Character: "'..string_underscore_to_space(TEXT_PREF_LOAD)..'"'
|
||||||
|
|
||||||
|
@ -449,13 +473,33 @@ local function on_hud_render()
|
||||||
djui_hud_print_text(TEXT_NAME, width - textX - djui_hud_measure_text(TEXT_NAME)*0.3, 55, 0.6)
|
djui_hud_print_text(TEXT_NAME, width - textX - djui_hud_measure_text(TEXT_NAME)*0.3, 55, 0.6)
|
||||||
djui_hud_set_font(FONT_TINY)
|
djui_hud_set_font(FONT_TINY)
|
||||||
djui_hud_print_text(TEXT_CREDIT, width - textX - djui_hud_measure_text(TEXT_CREDIT)*0.3, 72, 0.6)
|
djui_hud_print_text(TEXT_CREDIT, width - textX - djui_hud_measure_text(TEXT_CREDIT)*0.3, 72, 0.6)
|
||||||
djui_hud_set_font(FONT_NORMAL)
|
djui_hud_set_font(FONT_CS_NORMAL)
|
||||||
djui_hud_print_text(TEXT_DESCRIPTION, width - textX - djui_hud_measure_text(TEXT_DESCRIPTION)*0.2, 85, 0.4)
|
djui_hud_print_text(TEXT_DESCRIPTION, width - textX - djui_hud_measure_text(TEXT_DESCRIPTION)*0.2, 85, 0.4)
|
||||||
for i = 1, #TEXT_DESCRIPTION_TABLE do
|
for i = 1, #TEXT_DESCRIPTION_TABLE do
|
||||||
djui_hud_print_text(TEXT_DESCRIPTION_TABLE[i], width - textX - djui_hud_measure_text(TEXT_DESCRIPTION_TABLE[i])*0.15, 90 + i*9, 0.3)
|
djui_hud_print_text(TEXT_DESCRIPTION_TABLE[i], width - textX - djui_hud_measure_text(TEXT_DESCRIPTION_TABLE[i])*0.15, 90 + i*9, 0.3)
|
||||||
end
|
end
|
||||||
djui_hud_print_text(TEXT_PREF, width - textX - djui_hud_measure_text(TEXT_PREF)*0.15, height - 20, 0.3)
|
djui_hud_print_text(TEXT_PREF, width - textX - djui_hud_measure_text(TEXT_PREF)*0.15, height - 20, 0.3)
|
||||||
djui_hud_print_text(TEXT_PREF_SAVE, width - textX - djui_hud_measure_text(TEXT_PREF_SAVE)*0.15, height - 30, 0.3)
|
djui_hud_print_text(TEXT_PREF_SAVE, width - textX - djui_hud_measure_text(TEXT_PREF_SAVE)*0.15, height - 30, 0.3)
|
||||||
|
--[[
|
||||||
|
else -- Debugging Info (Unfinished)
|
||||||
|
local TEXT_NAME = "Name: "..characterTable[currChar].name
|
||||||
|
local TEXT_CREDIT = "Credit: "..characterTable[currChar].credit
|
||||||
|
local TEXT_DESCRIPTION_TABLE = characterTable[currChar].description
|
||||||
|
local TEXT_PREF = 'Preferred: "'..string_underscore_to_space(TEXT_PREF_LOAD)..'"'
|
||||||
|
|
||||||
|
local textX = x * 0.5
|
||||||
|
djui_hud_print_text(TEXT_DEBUGGING, width - textX - djui_hud_measure_text(TEXT_DEBUGGING)*0.3, 55, 0.6)
|
||||||
|
djui_hud_set_font(FONT_TINY)
|
||||||
|
djui_hud_print_text(TEXT_NAME, width - x + 8, 72, 0.6)
|
||||||
|
djui_hud_print_text(TEXT_CREDIT, width - x + 8, 82, 0.6)
|
||||||
|
djui_hud_print_text(TEXT_DESCRIPTION_SHORT, width - x + 8, 92, 0.6)
|
||||||
|
for i = 1, #TEXT_DESCRIPTION_TABLE do
|
||||||
|
djui_hud_print_text(TEXT_DESCRIPTION_TABLE[i], width - x + 8, 101 + i*9, 0.6)
|
||||||
|
end
|
||||||
|
local descriptionOffset = #TEXT_DESCRIPTION_TABLE * 9
|
||||||
|
djui_hud_print_text(TEXT_PREF, width - textX - djui_hud_measure_text(TEXT_PREF)*0.15, 112 + descriptionOffset, 0.3)
|
||||||
|
end
|
||||||
|
]]
|
||||||
|
|
||||||
--Character Select Header
|
--Character Select Header
|
||||||
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
||||||
|
@ -466,7 +510,7 @@ local function on_hud_render()
|
||||||
djui_hud_render_texture(TEX_HEADER, widthHalf - 128, 10, 1, 1)
|
djui_hud_render_texture(TEX_HEADER, widthHalf - 128, 10, 1, 1)
|
||||||
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
||||||
djui_hud_set_font(FONT_TINY)
|
djui_hud_set_font(FONT_TINY)
|
||||||
djui_hud_print_text("Version: "..modVersion, 5, 3, 0.5)
|
djui_hud_print_text(TEXT_VERSION, 5, 3, 0.5)
|
||||||
--Unsupported Res Warning
|
--Unsupported Res Warning
|
||||||
if width < 321.2 or width > 575 then
|
if width < 321.2 or width > 575 then
|
||||||
djui_hud_print_text(TEXT_RATIO_UNSUPPORTED, 5, 39, 0.5)
|
djui_hud_print_text(TEXT_RATIO_UNSUPPORTED, 5, 39, 0.5)
|
||||||
|
@ -482,7 +526,7 @@ local function on_hud_render()
|
||||||
djui_hud_render_rect(width*0.5 - 50 * widthScale + 2, math.min(55 - optionAnimTimer + 2, height - 25 * widthScale + 2), 100 * widthScale - 4, 196)
|
djui_hud_render_rect(width*0.5 - 50 * widthScale + 2, math.min(55 - optionAnimTimer + 2, height - 25 * widthScale + 2), 100 * widthScale - 4, 196)
|
||||||
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
||||||
djui_hud_render_rect(width*0.5 - 50 * widthScale, height - 2, 100 * widthScale, 2)
|
djui_hud_render_rect(width*0.5 - 50 * widthScale, height - 2, 100 * widthScale, 2)
|
||||||
djui_hud_set_font(FONT_NORMAL)
|
djui_hud_set_font(FONT_CS_NORMAL)
|
||||||
djui_hud_set_color(menuColor.r * 0.5 + 127, menuColor.g * 0.5 + 127, menuColor.b * 0.5 + 127, 255)
|
djui_hud_set_color(menuColor.r * 0.5 + 127, menuColor.g * 0.5 + 127, menuColor.b * 0.5 + 127, 255)
|
||||||
djui_hud_print_text(TEXT_OPTIONS_HEADER, widthHalf - djui_hud_measure_text(TEXT_OPTIONS_HEADER)*0.3*widthScale, 65 + optionAnimTimer * -1, 0.6*widthScale)
|
djui_hud_print_text(TEXT_OPTIONS_HEADER, widthHalf - djui_hud_measure_text(TEXT_OPTIONS_HEADER)*0.3*widthScale, 65 + optionAnimTimer * -1, 0.6*widthScale)
|
||||||
|
|
||||||
|
@ -492,7 +536,7 @@ local function on_hud_render()
|
||||||
local scale = 0.5
|
local scale = 0.5
|
||||||
local yOffset = 70 + 10 * math_min(widthScale, 1.8) + i * 9 * math_min(widthScale, 1.8) - optionAnimTimer
|
local yOffset = 70 + 10 * math_min(widthScale, 1.8) + i * 9 * math_min(widthScale, 1.8) - optionAnimTimer
|
||||||
if i == currOption then
|
if i == currOption then
|
||||||
djui_hud_set_font(FONT_NORMAL)
|
djui_hud_set_font(FONT_CS_NORMAL)
|
||||||
scale = 0.3
|
scale = 0.3
|
||||||
yOffset = yOffset - 1
|
yOffset = yOffset - 1
|
||||||
if optionTable[i].toggleNames[optionTable[i].toggle + 1] ~= "" then
|
if optionTable[i].toggleNames[optionTable[i].toggle + 1] ~= "" then
|
||||||
|
@ -519,7 +563,7 @@ local function on_hud_render()
|
||||||
djui_hud_render_rect(widthHalf - 50 * widthScaleUnlimited + 2, height - 25 * widthScale + 2, 100 * widthScaleUnlimited - 4, 22 * widthScale)
|
djui_hud_render_rect(widthHalf - 50 * widthScaleUnlimited + 2, height - 25 * widthScale + 2, 100 * widthScaleUnlimited - 4, 22 * widthScale)
|
||||||
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
djui_hud_set_color(menuColor.r, menuColor.g, menuColor.b, 255)
|
||||||
djui_hud_render_rect(widthHalf - 50 * widthScaleUnlimited, height - 2, 100 * widthScaleUnlimited, 2)
|
djui_hud_render_rect(widthHalf - 50 * widthScaleUnlimited, height - 2, 100 * widthScaleUnlimited, 2)
|
||||||
djui_hud_set_font(FONT_NORMAL)
|
djui_hud_set_font(FONT_CS_NORMAL)
|
||||||
djui_hud_print_text(TEXT_OPTIONS_OPEN, widthHalf - djui_hud_measure_text(TEXT_OPTIONS_OPEN)*0.175 * widthScale, height - 23 * widthScale + optionAnimTimer + 202, 0.35 * widthScale)
|
djui_hud_print_text(TEXT_OPTIONS_OPEN, widthHalf - djui_hud_measure_text(TEXT_OPTIONS_OPEN)*0.175 * widthScale, height - 23 * widthScale + optionAnimTimer + 202, 0.35 * widthScale)
|
||||||
djui_hud_set_font(FONT_TINY)
|
djui_hud_set_font(FONT_TINY)
|
||||||
djui_hud_print_text(TEXT_MENU_CLOSE, widthHalf - djui_hud_measure_text(TEXT_MENU_CLOSE)*0.25 * widthScale, height - 13 * widthScale + optionAnimTimer + 202, 0.5 * widthScale)
|
djui_hud_print_text(TEXT_MENU_CLOSE, widthHalf - djui_hud_measure_text(TEXT_MENU_CLOSE)*0.25 * widthScale, height - 13 * widthScale + optionAnimTimer + 202, 0.5 * widthScale)
|
||||||
|
@ -556,9 +600,11 @@ local function on_hud_render()
|
||||||
if optionTable[optionTableRef.openInputs].toggle == 2 then
|
if optionTable[optionTableRef.openInputs].toggle == 2 then
|
||||||
currCharY = 27
|
currCharY = 27
|
||||||
local width = djui_hud_get_screen_width() - djui_hud_measure_text(TEXT_PAUSE_Z_OPEN)
|
local width = djui_hud_get_screen_width() - djui_hud_measure_text(TEXT_PAUSE_Z_OPEN)
|
||||||
djui_hud_set_font(FONT_NORMAL)
|
djui_hud_set_font(FONT_CS_NORMAL)
|
||||||
|
if not version_coop_dx() then -- Done to match DX not having dropshadow on the "R Button - Options" thingy
|
||||||
djui_hud_set_color(0, 0, 0, 255)
|
djui_hud_set_color(0, 0, 0, 255)
|
||||||
djui_hud_print_text(TEXT_PAUSE_Z_OPEN, width - 19, 17, 1)
|
djui_hud_print_text(TEXT_PAUSE_Z_OPEN, width - 19, 17, 1)
|
||||||
|
end
|
||||||
djui_hud_set_color(255, 255, 255, 255)
|
djui_hud_set_color(255, 255, 255, 255)
|
||||||
djui_hud_print_text(TEXT_PAUSE_Z_OPEN, width - 20, 16, 1)
|
djui_hud_print_text(TEXT_PAUSE_Z_OPEN, width - 20, 16, 1)
|
||||||
end
|
end
|
||||||
|
@ -568,18 +614,22 @@ local function on_hud_render()
|
||||||
local TEXT_PAUSE_CURR_CHAR_WITH_NAME = TEXT_PAUSE_CURR_CHAR..charName
|
local TEXT_PAUSE_CURR_CHAR_WITH_NAME = TEXT_PAUSE_CURR_CHAR..charName
|
||||||
local width = djui_hud_get_screen_width() - djui_hud_measure_text(TEXT_PAUSE_CURR_CHAR_WITH_NAME)
|
local width = djui_hud_get_screen_width() - djui_hud_measure_text(TEXT_PAUSE_CURR_CHAR_WITH_NAME)
|
||||||
local charColor = characterTable[currChar].color
|
local charColor = characterTable[currChar].color
|
||||||
djui_hud_set_font(FONT_NORMAL)
|
djui_hud_set_font(FONT_CS_NORMAL)
|
||||||
|
if not version_coop_dx() then
|
||||||
djui_hud_set_color(0, 0, 0, 255)
|
djui_hud_set_color(0, 0, 0, 255)
|
||||||
djui_hud_print_text(TEXT_PAUSE_CURR_CHAR_WITH_NAME, width - 19, 17 + currCharY, 1)
|
djui_hud_print_text(TEXT_PAUSE_CURR_CHAR_WITH_NAME, width - 19, 17 + currCharY, 1)
|
||||||
|
end
|
||||||
djui_hud_set_color(255, 255, 255, 255)
|
djui_hud_set_color(255, 255, 255, 255)
|
||||||
djui_hud_print_text(TEXT_PAUSE_CURR_CHAR, width - 20, 16 + currCharY, 1)
|
djui_hud_print_text(TEXT_PAUSE_CURR_CHAR, width - 20, 16 + currCharY, 1)
|
||||||
djui_hud_set_color(charColor.r, charColor.g, charColor.b, 255)
|
djui_hud_set_color(charColor.r, charColor.g, charColor.b, 255)
|
||||||
djui_hud_print_text(charName, djui_hud_get_screen_width() - djui_hud_measure_text(charName) - 20, 16 + currCharY, 1)
|
djui_hud_print_text(charName, djui_hud_get_screen_width() - djui_hud_measure_text(charName) - 20, 16 + currCharY, 1)
|
||||||
else
|
else
|
||||||
local width = djui_hud_get_screen_width() - djui_hud_measure_text(TEXT_LOCAL_MODEL_OFF)
|
local width = djui_hud_get_screen_width() - djui_hud_measure_text(TEXT_LOCAL_MODEL_OFF)
|
||||||
djui_hud_set_font(FONT_NORMAL)
|
djui_hud_set_font(FONT_CS_NORMAL)
|
||||||
|
if not version_coop_dx() then
|
||||||
djui_hud_set_color(0, 0, 0, 255)
|
djui_hud_set_color(0, 0, 0, 255)
|
||||||
djui_hud_print_text(TEXT_LOCAL_MODEL_OFF, width - 19, 17 + currCharY, 1)
|
djui_hud_print_text(TEXT_LOCAL_MODEL_OFF, width - 19, 17 + currCharY, 1)
|
||||||
|
end
|
||||||
djui_hud_set_color(255, 255, 255, 255)
|
djui_hud_set_color(255, 255, 255, 255)
|
||||||
djui_hud_print_text(TEXT_LOCAL_MODEL_OFF, width - 20, 16 + currCharY, 1)
|
djui_hud_print_text(TEXT_LOCAL_MODEL_OFF, width - 20, 16 + currCharY, 1)
|
||||||
end
|
end
|
||||||
|
|
BIN
mods/character-select-coop/z-dev-32.lua
Normal file
BIN
mods/character-select-coop/z-dev-64.lua
Normal file
9
mods/day-night-cycle/README.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# Day Night Cycle
|
||||||
|
|
||||||
|
<a href="http://www.youtube.com/watch?feature=player_embedded&v=2OhIsYoHrlA" target="_blank">
|
||||||
|
<img src="http://img.youtube.com/vi/2OhIsYoHrlA/mqdefault.jpg" alt="Watch the video" width="640" height="360" border="10" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
This mod adds a fully featured day night cycle system with night, sunrise, day and sunset to sm64ex-coop. Days last 24 minutes and you can switch to and from 24 hour time with /ampm
|
||||||
|
|
||||||
|
Special thanks to AngelicMiracles for the sunset, sunrise and night time skyboxes
|
69
mods/day-night-cycle/a-utils.lua
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
-- localize functions to improve performance
|
||||||
|
local play_sound,table_insert,get_skybox,level_is_vanilla_level,math_floor,math_ceil = play_sound,table.insert,get_skybox,level_is_vanilla_level,math.floor,math.ceil
|
||||||
|
|
||||||
|
if SM64COOPDX_VERSION == nil then
|
||||||
|
local first = false
|
||||||
|
hook_event(HOOK_ON_LEVEL_INIT, function()
|
||||||
|
if not first then
|
||||||
|
first = true
|
||||||
|
play_sound(SOUND_MENU_CAMERA_BUZZ, gMarioStates[0].marioObj.header.gfx.cameraToObject)
|
||||||
|
djui_chat_message_create("\\#ff7f7f\\Day Night Cycle is no longer supported with sm64ex-coop\nas it uses sm64coopdx exclusive Lua functionality.\n\\#dcdcdc\\To play this mod, try out sm64coopdx at\n\\#7f7fff\\https://sm64coopdx.com")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
function if_then_else(cond, ifTrue, ifFalse)
|
||||||
|
if cond then return ifTrue end
|
||||||
|
return ifFalse
|
||||||
|
end
|
||||||
|
|
||||||
|
function split(s)
|
||||||
|
local result = {}
|
||||||
|
for match in (s):gmatch(string.format("[^%s]+", " ")) do
|
||||||
|
table_insert(result, match)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
function lerp(a, b, t) return a * (1 - t) + b * t end
|
||||||
|
|
||||||
|
--- @param a Color
|
||||||
|
--- @param b Color
|
||||||
|
--- @return Color
|
||||||
|
function color_lerp(a, b, t)
|
||||||
|
return {
|
||||||
|
r = lerp(a.r, b.r, t),
|
||||||
|
g = lerp(a.g, b.g, t),
|
||||||
|
b = lerp(a.b, b.b, t)
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function SEQUENCE_ARGS(priority, seqId)
|
||||||
|
return ((priority << 8) | seqId)
|
||||||
|
end
|
||||||
|
|
||||||
|
function on_or_off(value)
|
||||||
|
if value then return "\\#00ff00\\ON" end
|
||||||
|
return "\\#ff0000\\OFF"
|
||||||
|
end
|
||||||
|
|
||||||
|
function show_day_night_cycle()
|
||||||
|
local skybox = get_skybox()
|
||||||
|
return skybox ~= -1 and
|
||||||
|
skybox ~= BACKGROUND_CUSTOM and
|
||||||
|
skybox ~= BACKGROUND_FLAMING_SKY and
|
||||||
|
skybox ~= BACKGROUND_GREEN_SKY and
|
||||||
|
skybox ~= BACKGROUND_HAUNTED and
|
||||||
|
skybox ~= BACKGROUND_PURPLE_SKY and
|
||||||
|
skybox ~= BACKGROUND_UNDERWATER_CITY
|
||||||
|
end
|
||||||
|
|
||||||
|
function in_vanilla_level(levelNum)
|
||||||
|
return gNetworkPlayers[0].currLevelNum == levelNum and level_is_vanilla_level(levelNum)
|
||||||
|
end
|
||||||
|
|
||||||
|
function lerp_round(a, b, t)
|
||||||
|
local x = lerp(a, b, t)
|
||||||
|
return x >= 0 and math_floor(x + 0.5) or math_ceil(x - 0.5)
|
||||||
|
end
|
BIN
mods/day-night-cycle/actors/heart_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_above_clouds_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_below_clouds_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_below_clouds_night_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_below_clouds_sunrise_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_below_clouds_sunset_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_desert_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_flaming_sky_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_green_sky_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_haunted_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_night_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_ocean_sky_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_purple_sky_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_snow_mountains_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_sunrise_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_sunset_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/skybox_underwater_city_geo.bin
Normal file
BIN
mods/day-night-cycle/actors/transparent_star_geo.bin
Normal file
134
mods/day-night-cycle/b-time.lua
Normal file
|
@ -0,0 +1,134 @@
|
||||||
|
function delete_at_dark() end
|
||||||
|
if SM64COOPDX_VERSION == nil then return end
|
||||||
|
|
||||||
|
gGlobalSyncTable.time = 0
|
||||||
|
gGlobalSyncTable.timeScale = 1
|
||||||
|
|
||||||
|
local sNightSequences = {}
|
||||||
|
|
||||||
|
-- localize functions to improve performance
|
||||||
|
local math_floor,network_is_server,djui_hud_is_pause_menu_created,smlua_audio_utils_replace_sequence,fade_volume_scale,set_background_music,obj_mark_for_deletion = math.floor,network_is_server,djui_hud_is_pause_menu_created,smlua_audio_utils_replace_sequence,fade_volume_scale,set_background_music,obj_mark_for_deletion
|
||||||
|
|
||||||
|
mod_storage_remove("ampm")
|
||||||
|
use24h = mod_storage_load_bool("24h") or false
|
||||||
|
|
||||||
|
local savedInMenu = false
|
||||||
|
local autoSaveTimer = 0
|
||||||
|
playingNightMusic = false
|
||||||
|
|
||||||
|
--- Returns the amount of days that have passed
|
||||||
|
function get_day_count()
|
||||||
|
return math_floor(gGlobalSyncTable.time / (MINUTE * 24))
|
||||||
|
end
|
||||||
|
|
||||||
|
function save_time()
|
||||||
|
mod_storage_save_number("time", gGlobalSyncTable.time)
|
||||||
|
print("Saving time to 'day-night-cycle.sav'")
|
||||||
|
end
|
||||||
|
|
||||||
|
function load_time()
|
||||||
|
local time = mod_storage_load_number("time")
|
||||||
|
if time == nil then
|
||||||
|
time = MINUTE * 4 -- starts at the beginning of sunrise
|
||||||
|
mod_storage_save_number("time", time)
|
||||||
|
end
|
||||||
|
return time
|
||||||
|
end
|
||||||
|
gGlobalSyncTable.time = load_time()
|
||||||
|
|
||||||
|
--- @return string
|
||||||
|
--- Returns the properly formatted time string
|
||||||
|
function get_time_string()
|
||||||
|
local minutes = (gGlobalSyncTable.time / MINUTE) % 24
|
||||||
|
local formattedMinutes = math_floor(minutes)
|
||||||
|
local seconds = math_floor(gGlobalSyncTable.time / SECOND) % 60
|
||||||
|
|
||||||
|
if not use24h then
|
||||||
|
if formattedMinutes == 0 then
|
||||||
|
formattedMinutes = 12
|
||||||
|
elseif formattedMinutes > 12 then
|
||||||
|
formattedMinutes = formattedMinutes - 12
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return math_floor(formattedMinutes) .. ":" .. string.format("%02d", seconds) .. if_then_else(not use24h, if_then_else(minutes < 12, " AM", " PM"), "")
|
||||||
|
end
|
||||||
|
|
||||||
|
function time_tick()
|
||||||
|
if not network_is_server() then return end
|
||||||
|
|
||||||
|
gGlobalSyncTable.time = gGlobalSyncTable.time + gGlobalSyncTable.timeScale
|
||||||
|
|
||||||
|
-- auto save every 30s
|
||||||
|
autoSaveTimer = (autoSaveTimer + 1) % (SECOND * 30)
|
||||||
|
if autoSaveTimer == 0 then
|
||||||
|
save_time()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- save when paused
|
||||||
|
if djui_hud_is_pause_menu_created() then
|
||||||
|
if not savedInMenu then
|
||||||
|
save_time()
|
||||||
|
savedInMenu = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
savedInMenu = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function night_music_register(sequenceId, m64Name)
|
||||||
|
local id = SEQ_COUNT + sequenceId
|
||||||
|
smlua_audio_utils_replace_sequence(id, 20, 127, m64Name)
|
||||||
|
sNightSequences[sequenceId] = id
|
||||||
|
end
|
||||||
|
|
||||||
|
function handle_night_music()
|
||||||
|
if not show_day_night_cycle() or gNetworkPlayers[0].currActNum == 99 or gMarioStates[0].area == nil then return end
|
||||||
|
local seq = sNightSequences[gMarioStates[0].area.musicParam2]
|
||||||
|
if seq == nil then return end
|
||||||
|
|
||||||
|
fade_volume_scale(0, 127, 1)
|
||||||
|
|
||||||
|
local minutes = (gGlobalSyncTable.time / MINUTE) % 24
|
||||||
|
|
||||||
|
if minutes >= HOUR_SUNSET_END + 0.75 and minutes <= HOUR_NIGHT_START then
|
||||||
|
local threshold = 1 - (minutes - (HOUR_SUNSET_END + 0.75)) * 4 -- multiply by 4 because four quarters make a whole
|
||||||
|
fade_volume_scale(SEQ_PLAYER_LEVEL, threshold * 127, 1)
|
||||||
|
elseif minutes >= HOUR_SUNRISE_START + 0.75 and minutes <= HOUR_SUNRISE_END then
|
||||||
|
local threshold = 1 - (minutes - (HOUR_SUNRISE_START + 0.75)) * 4
|
||||||
|
fade_volume_scale(SEQ_PLAYER_LEVEL, threshold * 127, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if (minutes >= HOUR_NIGHT_START or minutes < HOUR_SUNRISE_END) and not playingNightMusic then
|
||||||
|
playingNightMusic = true
|
||||||
|
fade_volume_scale(SEQ_PLAYER_LEVEL, 127, 1)
|
||||||
|
set_background_music(0, SEQUENCE_ARGS(4, seq), 450)
|
||||||
|
elseif minutes >= HOUR_SUNRISE_END and minutes < HOUR_NIGHT_START and playingNightMusic then
|
||||||
|
playingNightMusic = false
|
||||||
|
fade_volume_scale(0, 127, 1)
|
||||||
|
set_background_music(0, SEQUENCE_ARGS(4, gMarioStates[0].area.musicParam2), 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return number
|
||||||
|
--- Returns the time in frames
|
||||||
|
function get_raw_time()
|
||||||
|
return gGlobalSyncTable.time
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param time number
|
||||||
|
--- @return nil
|
||||||
|
--- Sets the time in frames
|
||||||
|
function set_raw_time(time)
|
||||||
|
if type(time) ~= "number" then return end
|
||||||
|
gGlobalSyncTable.time = time
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
function delete_at_dark(o)
|
||||||
|
local minutes = gGlobalSyncTable.time / MINUTE % 24
|
||||||
|
|
||||||
|
if minutes < HOUR_SUNRISE_START or minutes > HOUR_SUNSET_END then
|
||||||
|
obj_mark_for_deletion(o)
|
||||||
|
end
|
||||||
|
end
|
BIN
mods/day-night-cycle/data/bhvBird.bhv
Normal file
BIN
mods/day-night-cycle/data/bhvBirdsSoundLoop.bhv
Normal file
BIN
mods/day-night-cycle/data/bhvButterfly.bhv
Normal file
BIN
mods/day-night-cycle/data/bhvSkybox.bhv
Normal file
BIN
mods/day-night-cycle/day-night-cycle.zip
Normal file
427
mods/day-night-cycle/main.lua
Normal file
|
@ -0,0 +1,427 @@
|
||||||
|
-- name: .Day Night Cycle DX
|
||||||
|
-- incompatible: light
|
||||||
|
-- description: Day Night Cycle DX v2.0\nBy \\#ec7731\\Agent X\n\n\\#dcdcdc\\This mod adds a fully featured day night cycle system with night, sunrise, day and sunset to sm64coopdx. Days last 24 minutes and you can switch to and from 24 hour time with /ampm\n\nSpecial thanks to \\#00ffff\\AngelicMiracles \\#dcdcdc\\for the sunset, sunrise and night time skyboxes
|
||||||
|
-- deluxe: true
|
||||||
|
|
||||||
|
--- @diagnostic disable: undefined-global
|
||||||
|
|
||||||
|
if SM64COOPDX_VERSION == nil then return end
|
||||||
|
|
||||||
|
SECOND = 30
|
||||||
|
MINUTE = SECOND * 60
|
||||||
|
|
||||||
|
HOUR_SUNRISE_START = 4
|
||||||
|
HOUR_SUNRISE_END = 5
|
||||||
|
HOUR_SUNRISE_DURATION = HOUR_SUNRISE_END - HOUR_SUNRISE_START
|
||||||
|
|
||||||
|
HOUR_SUNSET_START = 19
|
||||||
|
HOUR_SUNSET_END = 20
|
||||||
|
HOUR_SUNSET_DURATION = HOUR_SUNSET_END - HOUR_SUNSET_START
|
||||||
|
|
||||||
|
HOUR_DAY_START = 6
|
||||||
|
HOUR_NIGHT_START = 21
|
||||||
|
|
||||||
|
local DIR_DARK = 0.6
|
||||||
|
local DIR_BRIGHT = 1
|
||||||
|
|
||||||
|
local COLOR_NIGHT = { r = 70, g = 75, b = 100 }
|
||||||
|
local COLOR_SUNRISE = { r = 255, g = 255, b = 200 }
|
||||||
|
local COLOR_DAY = { r = 255, g = 255, b = 255 }
|
||||||
|
local COLOR_SUNSET = { r = 255, g = 155, b = 100 }
|
||||||
|
|
||||||
|
local FOG_COLOR_NIGHT = { r = 30, g = 30, b = 50 }
|
||||||
|
|
||||||
|
local COLOR_DISPLAY_DARK = { r = 48, g = 90, b = 200 }
|
||||||
|
local COLOR_DISPLAY_BRIGHT = { r = 255, g = 255, b = 80 }
|
||||||
|
|
||||||
|
local SKYBOX_SCALE = 200
|
||||||
|
|
||||||
|
local REAL_MINUTE = 1 / 60
|
||||||
|
|
||||||
|
gGlobalSyncTable.dncEnabled = true
|
||||||
|
local dncDisplayTime = true
|
||||||
|
|
||||||
|
-- localize functions to improve performance
|
||||||
|
local network_is_moderator,network_is_server,set_override_envfx,set_lighting_dir,set_lighting_color,get_skybox,obj_get_first_with_behavior_id,spawn_non_sync_object,obj_scale,clampf,djui_hud_set_resolution,djui_hud_set_font,hud_is_hidden,djui_hud_get_screen_width,djui_hud_measure_text,djui_hud_get_screen_height,djui_hud_set_color,djui_hud_print_text,djui_chat_message_create,math_floor = network_is_moderator,network_is_server,set_override_envfx,set_lighting_dir,set_lighting_color,get_skybox,obj_get_first_with_behavior_id,spawn_non_sync_object,obj_scale,clampf,djui_hud_set_resolution,djui_hud_set_font,hud_is_hidden,djui_hud_get_screen_width,djui_hud_measure_text,djui_hud_get_screen_height,djui_hud_set_color,djui_hud_print_text,djui_chat_message_create,math.floor
|
||||||
|
|
||||||
|
--- @param enable boolean
|
||||||
|
--- @return nil
|
||||||
|
--- Globally enables or disables Day Night Cycle
|
||||||
|
local function enable_day_night_cycle(enable)
|
||||||
|
if not network_is_server() and not network_is_moderator() then return end
|
||||||
|
if type(enable) ~= "boolean" then return end
|
||||||
|
gGlobalSyncTable.dncEnabled = enable
|
||||||
|
djui_popup_create("Day Night Cycle has been " .. if_then_else(gGlobalSyncTable.dncEnabled, "enabled.", "disabled."), 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Returns whether or not DNC will display the time on the HUD
|
||||||
|
local function get_display_time()
|
||||||
|
return dncDisplayTime
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param enable boolean
|
||||||
|
--- @return nil
|
||||||
|
--- Sets whether or not DNC will display the time on the HUD
|
||||||
|
local function set_display_time(enable)
|
||||||
|
if type(enable) ~= "boolean" then return end
|
||||||
|
dncDisplayTime = enable
|
||||||
|
end
|
||||||
|
|
||||||
|
local function update()
|
||||||
|
if not gGlobalSyncTable.dncEnabled then
|
||||||
|
set_override_envfx(-1)
|
||||||
|
|
||||||
|
set_lighting_dir(1, 0)
|
||||||
|
set_lighting_dir(2, 0)
|
||||||
|
set_lighting_color(0, 255)
|
||||||
|
set_lighting_color(1, 255)
|
||||||
|
set_lighting_color(2, 255)
|
||||||
|
set_vertex_color(0, 255)
|
||||||
|
set_vertex_color(1, 255)
|
||||||
|
set_vertex_color(2, 255)
|
||||||
|
set_fog_color(0, 255)
|
||||||
|
set_fog_color(1, 255)
|
||||||
|
set_fog_color(2, 255)
|
||||||
|
set_fog_intensity(1)
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
time_tick()
|
||||||
|
handle_night_music()
|
||||||
|
|
||||||
|
-- spawn skyboxes
|
||||||
|
local skybox = get_skybox()
|
||||||
|
if obj_get_first_with_behavior_id(bhvSkybox) == nil and skybox ~= -1 then
|
||||||
|
if show_day_night_cycle() then
|
||||||
|
-- spawn day, sunset and night skyboxes
|
||||||
|
for i = 0, 2 do
|
||||||
|
local model = 0
|
||||||
|
if i == 0 then
|
||||||
|
model = gVanillaSkyboxModels[skybox] or E_MODEL_SKYBOX_OCEAN_SKY
|
||||||
|
else
|
||||||
|
model = if_then_else(i == 1, E_MODEL_SKYBOX_SUNSET, E_MODEL_SKYBOX_NIGHT)
|
||||||
|
end
|
||||||
|
|
||||||
|
spawn_non_sync_object(
|
||||||
|
bhvSkybox,
|
||||||
|
model,
|
||||||
|
0, 0, 0,
|
||||||
|
--- @param o Object
|
||||||
|
function(o)
|
||||||
|
o.oBehParams2ndByte = i
|
||||||
|
obj_scale(o, SKYBOX_SCALE + 1 * i)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- spawn static skybox
|
||||||
|
spawn_non_sync_object(
|
||||||
|
bhvSkybox,
|
||||||
|
gVanillaSkyboxModels[skybox] or E_MODEL_SKYBOX_OCEAN_SKY,
|
||||||
|
0, 0, 0,
|
||||||
|
--- @param o Object
|
||||||
|
function(o)
|
||||||
|
o.oBehParams2ndByte = 0
|
||||||
|
obj_scale(o, SKYBOX_SCALE)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local minutes = (gGlobalSyncTable.time / MINUTE) % 24
|
||||||
|
|
||||||
|
local actSelector = obj_get_first_with_behavior_id(id_bhvActSelector)
|
||||||
|
if actSelector == nil and (show_day_night_cycle() or in_vanilla_level(LEVEL_DDD) or in_vanilla_level(LEVEL_TTM)) then -- DDD has a subarea connected by instant warps and TTM has a subarea with sunlight coming through it
|
||||||
|
-- blizzard effect at night in snow levels
|
||||||
|
if (minutes > HOUR_NIGHT_START or minutes < HOUR_SUNRISE_END) and gMarioStates[0].area.terrainType == TERRAIN_SNOW then
|
||||||
|
set_override_envfx(ENVFX_SNOW_BLIZZARD)
|
||||||
|
else
|
||||||
|
set_override_envfx(-1)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- calculate lighting color
|
||||||
|
local color = COLOR_DAY
|
||||||
|
if minutes >= HOUR_SUNRISE_START and minutes <= HOUR_SUNRISE_END then
|
||||||
|
color = color_lerp(COLOR_NIGHT, COLOR_SUNRISE, (minutes - HOUR_SUNRISE_START) / HOUR_SUNRISE_DURATION)
|
||||||
|
elseif minutes >= HOUR_SUNRISE_END and minutes <= HOUR_DAY_START then
|
||||||
|
color = color_lerp(COLOR_SUNRISE, COLOR_DAY, (minutes - HOUR_SUNRISE_END) / HOUR_SUNRISE_DURATION)
|
||||||
|
elseif minutes >= HOUR_SUNSET_START and minutes <= HOUR_SUNSET_END then
|
||||||
|
color = color_lerp(COLOR_DAY, COLOR_SUNSET, (minutes - HOUR_SUNSET_START) / HOUR_SUNSET_DURATION)
|
||||||
|
elseif minutes >= HOUR_SUNSET_END and minutes <= HOUR_NIGHT_START then
|
||||||
|
color = color_lerp(COLOR_SUNSET, COLOR_NIGHT, (minutes - HOUR_SUNSET_END) / HOUR_SUNSET_DURATION)
|
||||||
|
elseif minutes > HOUR_NIGHT_START or minutes < HOUR_SUNRISE_START then
|
||||||
|
color = COLOR_NIGHT
|
||||||
|
elseif minutes > HOUR_DAY_START and minutes < HOUR_SUNSET_START then
|
||||||
|
color = COLOR_DAY
|
||||||
|
end
|
||||||
|
|
||||||
|
-- calculate fog color
|
||||||
|
local fogColor = COLOR_DAY
|
||||||
|
if minutes >= HOUR_SUNRISE_START and minutes <= HOUR_SUNRISE_END then
|
||||||
|
fogColor = color_lerp(FOG_COLOR_NIGHT, COLOR_SUNRISE, (minutes - HOUR_SUNRISE_START) / HOUR_SUNRISE_DURATION)
|
||||||
|
elseif minutes >= HOUR_SUNRISE_END and minutes <= HOUR_DAY_START then
|
||||||
|
fogColor = color_lerp(COLOR_SUNRISE, COLOR_DAY, (minutes - HOUR_SUNRISE_END) / HOUR_SUNRISE_DURATION)
|
||||||
|
elseif minutes >= HOUR_SUNSET_START and minutes <= HOUR_SUNSET_END then
|
||||||
|
fogColor = color_lerp(COLOR_DAY, COLOR_SUNSET, (minutes - HOUR_SUNSET_START) / HOUR_SUNSET_DURATION)
|
||||||
|
elseif minutes >= HOUR_SUNSET_END and minutes <= HOUR_NIGHT_START then
|
||||||
|
fogColor = color_lerp(COLOR_SUNSET, FOG_COLOR_NIGHT, (minutes - HOUR_SUNSET_END) / HOUR_SUNSET_DURATION)
|
||||||
|
elseif minutes > HOUR_NIGHT_START or minutes < HOUR_SUNRISE_START then
|
||||||
|
fogColor = FOG_COLOR_NIGHT
|
||||||
|
elseif minutes > HOUR_DAY_START and minutes < HOUR_SUNSET_START then
|
||||||
|
fogColor = COLOR_DAY
|
||||||
|
end
|
||||||
|
|
||||||
|
-- calculate lighting direction
|
||||||
|
local dir = DIR_BRIGHT
|
||||||
|
if minutes >= HOUR_SUNRISE_START and minutes <= HOUR_SUNRISE_END then
|
||||||
|
dir = lerp(DIR_DARK, DIR_BRIGHT, clampf((minutes - HOUR_SUNRISE_START) / (HOUR_SUNRISE_DURATION), 0, 1))
|
||||||
|
elseif minutes >= HOUR_SUNSET_START and minutes <= HOUR_NIGHT_START then
|
||||||
|
dir = lerp(DIR_BRIGHT, DIR_DARK, clampf((minutes - HOUR_SUNSET_START) / (HOUR_NIGHT_START - HOUR_SUNSET_START), 0, 1))
|
||||||
|
elseif minutes < HOUR_SUNRISE_START or minutes > HOUR_NIGHT_START then
|
||||||
|
dir = DIR_DARK
|
||||||
|
elseif minutes > HOUR_SUNRISE_END and minutes < HOUR_SUNSET_START then
|
||||||
|
dir = DIR_BRIGHT
|
||||||
|
end
|
||||||
|
|
||||||
|
-- calculate fog intensity
|
||||||
|
local intensity = 1
|
||||||
|
if minutes >= HOUR_SUNRISE_START and minutes <= HOUR_SUNRISE_END then
|
||||||
|
intensity = lerp(1.02, 1, clampf((minutes - HOUR_SUNRISE_START) / (HOUR_SUNRISE_DURATION), 0, 1))
|
||||||
|
elseif minutes >= HOUR_SUNSET_START and minutes <= HOUR_NIGHT_START then
|
||||||
|
intensity = lerp(1, 1.02, clampf((minutes - HOUR_SUNSET_START) / (HOUR_NIGHT_START - HOUR_SUNSET_START), 0, 1))
|
||||||
|
elseif minutes < HOUR_SUNRISE_START or minutes > HOUR_NIGHT_START then
|
||||||
|
intensity = 1.02
|
||||||
|
elseif minutes > HOUR_SUNRISE_END and minutes < HOUR_SUNSET_START then
|
||||||
|
intensity = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set_lighting_dir(1, -(1 - dir))
|
||||||
|
set_lighting_dir(2, -(1 - dir))
|
||||||
|
set_lighting_color(0, color.r)
|
||||||
|
set_lighting_color(1, color.g)
|
||||||
|
set_lighting_color(2, color.b)
|
||||||
|
set_vertex_color(0, color.r)
|
||||||
|
set_vertex_color(1, color.g)
|
||||||
|
set_vertex_color(2, color.b)
|
||||||
|
set_fog_color(0, fogColor.r)
|
||||||
|
set_fog_color(1, fogColor.g)
|
||||||
|
set_fog_color(2, fogColor.b)
|
||||||
|
set_fog_intensity(intensity)
|
||||||
|
else
|
||||||
|
set_override_envfx(-1)
|
||||||
|
|
||||||
|
set_lighting_dir(1, 0)
|
||||||
|
set_lighting_dir(2, 0)
|
||||||
|
set_lighting_color(0, 255)
|
||||||
|
set_lighting_color(1, 255)
|
||||||
|
set_lighting_color(2, 255)
|
||||||
|
set_vertex_color(0, 255)
|
||||||
|
set_vertex_color(1, 255)
|
||||||
|
set_vertex_color(2, 255)
|
||||||
|
set_fog_color(0, 255)
|
||||||
|
set_fog_color(1, 255)
|
||||||
|
set_fog_color(2, 255)
|
||||||
|
set_fog_intensity(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_hud_render_behind()
|
||||||
|
if not gGlobalSyncTable.dncEnabled or not dncDisplayTime then return end -- api checks
|
||||||
|
if obj_get_first_with_behavior_id(id_bhvActSelector) ~= nil or gNetworkPlayers[0].currActNum == 99 then return end -- game checks
|
||||||
|
|
||||||
|
djui_hud_set_resolution(RESOLUTION_N64)
|
||||||
|
djui_hud_set_font(FONT_TINY)
|
||||||
|
|
||||||
|
local scale = 1
|
||||||
|
local text = get_time_string()
|
||||||
|
|
||||||
|
local hidden = hud_is_hidden()
|
||||||
|
local x = if_then_else(hidden, (djui_hud_get_screen_width() * 0.5) - (djui_hud_measure_text(text) * (0.5 * scale)), 24)
|
||||||
|
local y = if_then_else(hidden, (djui_hud_get_screen_height() - 20), 32)
|
||||||
|
|
||||||
|
local minutes = (gGlobalSyncTable.time / MINUTE) % 24
|
||||||
|
|
||||||
|
-- outlined text
|
||||||
|
djui_hud_set_color(0, 0, 0, 255)
|
||||||
|
djui_hud_print_text(text, x - 1, y, scale)
|
||||||
|
djui_hud_print_text(text, x + 1, y, scale)
|
||||||
|
djui_hud_print_text(text, x, y - 1, scale)
|
||||||
|
djui_hud_print_text(text, x, y + 1, scale)
|
||||||
|
if minutes >= HOUR_SUNRISE_START and minutes <= HOUR_SUNRISE_END then
|
||||||
|
local color = color_lerp(COLOR_DISPLAY_DARK, COLOR_DISPLAY_BRIGHT, (minutes - HOUR_SUNRISE_START) / HOUR_SUNRISE_DURATION)
|
||||||
|
djui_hud_set_color(color.r, color.g, color.b, 255)
|
||||||
|
elseif minutes >= HOUR_SUNSET_END and minutes <= HOUR_NIGHT_START then
|
||||||
|
local color = color_lerp(COLOR_DISPLAY_BRIGHT, COLOR_DISPLAY_DARK, (minutes - HOUR_SUNSET_END) / HOUR_SUNSET_DURATION)
|
||||||
|
djui_hud_set_color(color.r, color.g, color.b, 255)
|
||||||
|
elseif minutes > HOUR_NIGHT_START or minutes < HOUR_SUNRISE_START then
|
||||||
|
djui_hud_set_color(COLOR_DISPLAY_DARK.r, COLOR_DISPLAY_DARK.g, COLOR_DISPLAY_DARK.b, 255)
|
||||||
|
elseif minutes > HOUR_SUNRISE_END and minutes < HOUR_SUNSET_END then
|
||||||
|
djui_hud_set_color(COLOR_DISPLAY_BRIGHT.r, COLOR_DISPLAY_BRIGHT.g, COLOR_DISPLAY_BRIGHT.b, 255)
|
||||||
|
end
|
||||||
|
djui_hud_print_text(text, x, y, scale)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_level_init()
|
||||||
|
if not gGlobalSyncTable.dncEnabled then return end
|
||||||
|
|
||||||
|
playingNightMusic = false
|
||||||
|
|
||||||
|
if gNetworkPlayers[0].currLevelNum == LEVEL_CASTLE_GROUNDS and gNetworkPlayers[0].currActNum == 99 then
|
||||||
|
if gMarioStates[0].action ~= ACT_END_WAVING_CUTSCENE then
|
||||||
|
gGlobalSyncTable.time = get_day_count() * (MINUTE * 24) + (MINUTE * (HOUR_SUNSET_START - 0.75))
|
||||||
|
gGlobalSyncTable.timeScale = 1
|
||||||
|
else
|
||||||
|
gGlobalSyncTable.time = (get_day_count() + 1) * (MINUTE * 24) + (MINUTE * HOUR_SUNRISE_END)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_warp()
|
||||||
|
if not gGlobalSyncTable.dncEnabled then return end
|
||||||
|
if network_is_server() then save_time() end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_exit()
|
||||||
|
if network_is_server() then save_time() end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_set_command(msg)
|
||||||
|
if msg == "" then
|
||||||
|
djui_chat_message_create("/time \\#00ffff\\set\\#ffff00\\ [TIME]\\#dcdcdc\\ to set the time")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
if msg == "morning" then
|
||||||
|
gGlobalSyncTable.time = get_day_count() * (MINUTE * 24) + (MINUTE * 6)
|
||||||
|
elseif msg == "day" or msg == "noon" then
|
||||||
|
gGlobalSyncTable.time = get_day_count() * (MINUTE * 24) + (MINUTE * 12)
|
||||||
|
elseif msg == "night" then
|
||||||
|
gGlobalSyncTable.time = get_day_count() * (MINUTE * 24) + (MINUTE * 21)
|
||||||
|
elseif msg == "midnight" then
|
||||||
|
gGlobalSyncTable.time = get_day_count() * (MINUTE * 24)
|
||||||
|
elseif msg == "sunrise" then
|
||||||
|
gGlobalSyncTable.time = get_day_count() * (MINUTE * 24) + (MINUTE * 5)
|
||||||
|
elseif msg == "sunset" then
|
||||||
|
gGlobalSyncTable.time = get_day_count() * (MINUTE * 24) + (MINUTE * 20)
|
||||||
|
else
|
||||||
|
local amount = tonumber(msg)
|
||||||
|
if amount ~= nil then
|
||||||
|
gGlobalSyncTable.time = amount * SECOND
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
djui_chat_message_create("Time set to " .. math_floor(gGlobalSyncTable.time / SECOND))
|
||||||
|
|
||||||
|
if network_is_server() then save_time() end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_add_command(msg)
|
||||||
|
local amount = tonumber(msg)
|
||||||
|
if amount == nil then
|
||||||
|
djui_chat_message_create("/time \\#00ffff\\add\\#ffff00\\ [AMOUNT]\\#dcdcdc\\ to add to the time")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
gGlobalSyncTable.time = gGlobalSyncTable.time + (amount * SECOND)
|
||||||
|
|
||||||
|
djui_chat_message_create("[Day Night Cycle] Time set to " .. math_floor(gGlobalSyncTable.time / SECOND))
|
||||||
|
|
||||||
|
if network_is_server() then save_time() end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_scale_command(msg)
|
||||||
|
local scale = tonumber(msg)
|
||||||
|
if scale == nil then
|
||||||
|
djui_chat_message_create("/time \\#00ffff\\scale\\#ffff00\\ [SCALE]\\#dcdcdc\\ to scale the rate at which time passes")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
gGlobalSyncTable.timeScale = scale
|
||||||
|
|
||||||
|
djui_chat_message_create("[Day Night Cycle] Time scale set to " .. scale)
|
||||||
|
|
||||||
|
if network_is_server() then save_time() end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_query_command()
|
||||||
|
djui_chat_message_create(string.format("Time is %d (%s), day %d", math_floor(gGlobalSyncTable.time / SECOND), get_time_string(), get_day_count()))
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_24h_command()
|
||||||
|
use24h = not use24h
|
||||||
|
mod_storage_save_bool("24h", use24h)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_sync_command()
|
||||||
|
djui_chat_message_create("[Day Night Cycle] Attempting to sync in-game time with real world time...")
|
||||||
|
|
||||||
|
local dateTime = get_date_and_time()
|
||||||
|
gGlobalSyncTable.time = get_day_count() * (MINUTE * 24) + (MINUTE * dateTime.hour) + (SECOND * dateTime.minute)
|
||||||
|
gGlobalSyncTable.timeScale = REAL_MINUTE
|
||||||
|
|
||||||
|
if network_is_server() then save_time() end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_time_command(msg)
|
||||||
|
local args = split(msg)
|
||||||
|
local perms = network_is_server() or network_is_moderator()
|
||||||
|
if args[1] == "set" then
|
||||||
|
if not perms then
|
||||||
|
djui_chat_message_create("\\#d86464\\[Day Night Cycle] You do not have permission to run /time set")
|
||||||
|
else
|
||||||
|
on_set_command(args[2] or "")
|
||||||
|
end
|
||||||
|
elseif args[1] == "add" then
|
||||||
|
if not perms then
|
||||||
|
djui_chat_message_create("\\#d86464\\[Day Night Cycle] You do not have permission to run /time add")
|
||||||
|
else
|
||||||
|
on_add_command(args[2] or "")
|
||||||
|
end
|
||||||
|
elseif args[1] == "scale" then
|
||||||
|
if not perms then
|
||||||
|
djui_chat_message_create("\\#d86464\\[Day Night Cycle] You do not have permission to run /time scale")
|
||||||
|
else
|
||||||
|
on_scale_command(args[2] or "")
|
||||||
|
end
|
||||||
|
elseif args[1] == "query" then
|
||||||
|
on_query_command()
|
||||||
|
elseif args[1] == "24h" then
|
||||||
|
on_24h_command()
|
||||||
|
elseif args[1] == "sync" then
|
||||||
|
if not perms then
|
||||||
|
djui_chat_message_create("\\#d86464\\[Day Night Cycle] You do not have permission to run /time sync")
|
||||||
|
else
|
||||||
|
on_sync_command()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if not perms then
|
||||||
|
djui_chat_message_create("\\#d86464\\[Day Night Cycle] You do not have permission to enable or disable Day Night Cycle")
|
||||||
|
else
|
||||||
|
gGlobalSyncTable.dncEnabled = not gGlobalSyncTable.dncEnabled
|
||||||
|
djui_chat_message_create("[Day Night Cycle] Status: " .. on_or_off(gGlobalSyncTable.dncEnabled))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
_G.dayNightCycleApi = {
|
||||||
|
enable_day_night_cycle = enable_day_night_cycle,
|
||||||
|
get_display_time = get_display_time,
|
||||||
|
set_display_time = set_display_time,
|
||||||
|
get_day_count = get_day_count,
|
||||||
|
get_time_string = get_time_string,
|
||||||
|
get_raw_time = get_raw_time,
|
||||||
|
set_raw_time = set_raw_time,
|
||||||
|
}
|
||||||
|
|
||||||
|
night_music_register(SEQ_LEVEL_GRASS, "03_level_grass")
|
||||||
|
night_music_register(SEQ_LEVEL_WATER, "05_level_water")
|
||||||
|
night_music_register(SEQ_LEVEL_HOT, "06_level_hot")
|
||||||
|
night_music_register(SEQ_LEVEL_SNOW, "08_level_snow")
|
||||||
|
|
||||||
|
hook_event(HOOK_UPDATE, update)
|
||||||
|
hook_event(HOOK_ON_HUD_RENDER_BEHIND, on_hud_render_behind)
|
||||||
|
hook_event(HOOK_ON_LEVEL_INIT, on_level_init)
|
||||||
|
hook_event(HOOK_ON_WARP, on_warp)
|
||||||
|
hook_event(HOOK_ON_EXIT, on_exit)
|
||||||
|
|
||||||
|
hook_chat_command("time", "\\#00ffff\\[set|add|scale|query|24h|sync]\\#7f7f7f\\ (leave blank to toggle Day Night Cycle on or off)", on_time_command)
|
129
mods/day-night-cycle/skybox.lua
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
if SM64COOPDX_VERSION == nil then return end
|
||||||
|
|
||||||
|
local SKYBOX_DAY = 0
|
||||||
|
local SKYBOX_SUNSET = 1
|
||||||
|
local SKYBOX_NIGHT = 2
|
||||||
|
|
||||||
|
-- standard skyboxes
|
||||||
|
E_MODEL_SKYBOX_OCEAN_SKY = smlua_model_util_get_id("skybox_ocean_sky_geo")
|
||||||
|
local E_MODEL_SKYBOX_FLAMING_SKY = smlua_model_util_get_id("skybox_flaming_sky_geo")
|
||||||
|
local E_MODEL_SKYBOX_UNDERWATER_CITY = smlua_model_util_get_id("skybox_underwater_city_geo")
|
||||||
|
local E_MODEL_SKYBOX_BELOW_CLOUDS = smlua_model_util_get_id("skybox_below_clouds_geo")
|
||||||
|
local E_MODEL_SKYBOX_SNOW_MOUNTAINS = smlua_model_util_get_id("skybox_snow_mountains_geo")
|
||||||
|
local E_MODEL_SKYBOX_DESERT = smlua_model_util_get_id("skybox_desert_geo")
|
||||||
|
local E_MODEL_SKYBOX_HAUNTED = smlua_model_util_get_id("skybox_haunted_geo")
|
||||||
|
local E_MODEL_SKYBOX_GREEN_SKY = smlua_model_util_get_id("skybox_green_sky_geo")
|
||||||
|
local E_MODEL_SKYBOX_ABOVE_CLOUDS = smlua_model_util_get_id("skybox_above_clouds_geo")
|
||||||
|
local E_MODEL_SKYBOX_PURPLE_SKY = smlua_model_util_get_id("skybox_purple_sky_geo")
|
||||||
|
local E_MODEL_SKYBOX_SUNRISE = smlua_model_util_get_id("skybox_sunrise_geo")
|
||||||
|
E_MODEL_SKYBOX_SUNSET = smlua_model_util_get_id("skybox_sunset_geo")
|
||||||
|
E_MODEL_SKYBOX_NIGHT = smlua_model_util_get_id("skybox_night_geo")
|
||||||
|
|
||||||
|
-- below clouds skyboxes
|
||||||
|
local E_MODEL_SKYBOX_BELOW_CLOUDS_NIGHT = smlua_model_util_get_id("skybox_below_clouds_night_geo")
|
||||||
|
local E_MODEL_SKYBOX_BELOW_CLOUDS_SUNRISE = smlua_model_util_get_id("skybox_below_clouds_sunrise_geo")
|
||||||
|
local E_MODEL_SKYBOX_BELOW_CLOUDS_SUNSET = smlua_model_util_get_id("skybox_below_clouds_sunset_geo")
|
||||||
|
|
||||||
|
gVanillaSkyboxModels = {
|
||||||
|
[BACKGROUND_OCEAN_SKY] = E_MODEL_SKYBOX_OCEAN_SKY,
|
||||||
|
[BACKGROUND_FLAMING_SKY] = E_MODEL_SKYBOX_FLAMING_SKY,
|
||||||
|
[BACKGROUND_UNDERWATER_CITY] = E_MODEL_SKYBOX_UNDERWATER_CITY,
|
||||||
|
[BACKGROUND_BELOW_CLOUDS] = E_MODEL_SKYBOX_BELOW_CLOUDS,
|
||||||
|
[BACKGROUND_SNOW_MOUNTAINS] = E_MODEL_SKYBOX_SNOW_MOUNTAINS,
|
||||||
|
[BACKGROUND_DESERT] = E_MODEL_SKYBOX_DESERT,
|
||||||
|
[BACKGROUND_HAUNTED] = E_MODEL_SKYBOX_HAUNTED,
|
||||||
|
[BACKGROUND_GREEN_SKY] = E_MODEL_SKYBOX_GREEN_SKY,
|
||||||
|
[BACKGROUND_ABOVE_CLOUDS] = E_MODEL_SKYBOX_ABOVE_CLOUDS,
|
||||||
|
[BACKGROUND_PURPLE_SKY] = E_MODEL_SKYBOX_PURPLE_SKY
|
||||||
|
}
|
||||||
|
|
||||||
|
-- localize functions to improve performance
|
||||||
|
local get_skybox,obj_set_model_extended,set_override_far,obj_mark_for_deletion,vec3f_to_object_pos,clampf,cur_obj_hide,cur_obj_unhide = get_skybox,obj_set_model_extended,set_override_far,obj_mark_for_deletion,vec3f_to_object_pos,clampf,cur_obj_hide,cur_obj_unhide
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
function bhv_skybox_init(o)
|
||||||
|
o.header.gfx.skipInViewCheck = true
|
||||||
|
|
||||||
|
local skybox = get_skybox()
|
||||||
|
if o.oBehParams2ndByte == SKYBOX_DAY then
|
||||||
|
obj_set_model_extended(o, gVanillaSkyboxModels[skybox] or E_MODEL_SKYBOX_OCEAN_SKY)
|
||||||
|
elseif o.oBehParams2ndByte == SKYBOX_NIGHT then
|
||||||
|
obj_set_model_extended(o, if_then_else(skybox == BACKGROUND_BELOW_CLOUDS, E_MODEL_SKYBOX_BELOW_CLOUDS_NIGHT, E_MODEL_SKYBOX_NIGHT))
|
||||||
|
end
|
||||||
|
|
||||||
|
set_override_far(100000)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
function bhv_skybox_loop(o)
|
||||||
|
if not gGlobalSyncTable.dncEnabled then
|
||||||
|
obj_mark_for_deletion(o)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
vec3f_to_object_pos(o, gLakituState.pos)
|
||||||
|
|
||||||
|
local skybox = get_skybox()
|
||||||
|
|
||||||
|
-- do not rotate BITDW skybox
|
||||||
|
if skybox == BACKGROUND_GREEN_SKY then return end
|
||||||
|
|
||||||
|
local minutes = (gGlobalSyncTable.time / MINUTE) % 24
|
||||||
|
|
||||||
|
if o.oBehParams2ndByte ~= SKYBOX_SUNSET then
|
||||||
|
o.oFaceAngleYaw = gGlobalSyncTable.time * 2
|
||||||
|
else
|
||||||
|
if minutes < 12 then
|
||||||
|
o.oFaceAngleYaw = 0
|
||||||
|
else
|
||||||
|
o.oFaceAngleYaw = 0x8000
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if o.oBehParams2ndByte == SKYBOX_DAY then
|
||||||
|
if minutes >= HOUR_SUNRISE_END and minutes <= HOUR_DAY_START then
|
||||||
|
o.oOpacity = lerp_round(0, 255, clampf((minutes - HOUR_SUNRISE_END) / HOUR_SUNSET_DURATION, 0, 1))
|
||||||
|
elseif minutes >= HOUR_SUNSET_START and minutes <= HOUR_SUNSET_END then
|
||||||
|
o.oOpacity = lerp_round(255, 0, clampf((minutes - HOUR_SUNSET_START) / HOUR_SUNSET_DURATION, 0, 1))
|
||||||
|
elseif minutes < HOUR_SUNRISE_END or minutes > HOUR_NIGHT_START then
|
||||||
|
o.oOpacity = 0
|
||||||
|
elseif minutes > HOUR_DAY_START and minutes < HOUR_SUNSET_START then
|
||||||
|
o.oOpacity = 255
|
||||||
|
end
|
||||||
|
elseif o.oBehParams2ndByte == SKYBOX_SUNSET then
|
||||||
|
if minutes >= HOUR_SUNRISE_START and minutes <= HOUR_SUNRISE_END then
|
||||||
|
o.oOpacity = lerp_round(0, 255, clampf((minutes - HOUR_SUNRISE_START) / HOUR_SUNRISE_DURATION, 0, 1))
|
||||||
|
elseif minutes >= HOUR_SUNRISE_END and minutes <= HOUR_DAY_START then
|
||||||
|
o.oOpacity = lerp_round(255, 0, clampf((minutes - HOUR_SUNRISE_END) / HOUR_SUNRISE_DURATION, 0, 1))
|
||||||
|
elseif minutes >= HOUR_SUNSET_START and minutes <= HOUR_SUNSET_END then
|
||||||
|
o.oOpacity = lerp_round(0, 255, clampf((minutes - HOUR_SUNSET_START) / HOUR_SUNSET_DURATION, 0, 1))
|
||||||
|
elseif minutes >= HOUR_SUNSET_END and minutes <= HOUR_NIGHT_START then
|
||||||
|
o.oOpacity = 255
|
||||||
|
else
|
||||||
|
o.oOpacity = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if minutes < 12 then
|
||||||
|
obj_set_model_extended(o, if_then_else(skybox == BACKGROUND_BELOW_CLOUDS, E_MODEL_SKYBOX_BELOW_CLOUDS_SUNRISE, E_MODEL_SKYBOX_SUNRISE))
|
||||||
|
else
|
||||||
|
obj_set_model_extended(o, if_then_else(skybox == BACKGROUND_BELOW_CLOUDS, E_MODEL_SKYBOX_BELOW_CLOUDS_SUNSET, E_MODEL_SKYBOX_SUNSET))
|
||||||
|
end
|
||||||
|
elseif o.oBehParams2ndByte == SKYBOX_NIGHT then
|
||||||
|
if minutes >= HOUR_SUNRISE_START and minutes <= HOUR_SUNRISE_END then
|
||||||
|
o.oOpacity = lerp_round(255, 0, clampf((minutes - HOUR_SUNRISE_START) / HOUR_SUNRISE_DURATION, 0, 1))
|
||||||
|
elseif minutes >= HOUR_SUNSET_END and minutes <= HOUR_NIGHT_START then
|
||||||
|
o.oOpacity = lerp_round(0, 255, clampf((minutes - HOUR_SUNSET_END) / HOUR_SUNSET_DURATION, 0, 1))
|
||||||
|
elseif minutes > HOUR_SUNRISE_END and minutes < HOUR_SUNSET_END then
|
||||||
|
o.oOpacity = 0
|
||||||
|
elseif minutes > HOUR_NIGHT_START or minutes < HOUR_SUNRISE_START then
|
||||||
|
o.oOpacity = 255
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if o.oOpacity == 0 then
|
||||||
|
cur_obj_hide()
|
||||||
|
else
|
||||||
|
cur_obj_unhide()
|
||||||
|
end
|
||||||
|
end
|
BIN
mods/day-night-cycle/sound/03_level_grass.m64
Normal file
BIN
mods/day-night-cycle/sound/05_level_water.m64
Normal file
BIN
mods/day-night-cycle/sound/06_level_hot.m64
Normal file
BIN
mods/day-night-cycle/sound/08_level_snow.m64
Normal file
49
mods/gun-mod/a-constants.lua
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
if SM64COOPDX_VERSION == nil then
|
||||||
|
local first = false
|
||||||
|
hook_event(HOOK_ON_LEVEL_INIT, function()
|
||||||
|
if not first then
|
||||||
|
first = true
|
||||||
|
play_sound(SOUND_MENU_CAMERA_BUZZ, { x = 0, y = 0, z = 0 })
|
||||||
|
djui_chat_message_create("\\#ff7f7f\\Gun Mod is no longer supported with sm64ex-coop as it uses sm64coopdx exclusive Lua functionality.\n\\#dcdcdc\\To play this mod, try out sm64coopdx, at\n\\#7f7fff\\https://sm64coopdx.com")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- models
|
||||||
|
E_MODEL_BULLET_HOLE = smlua_model_util_get_id("bullet_hole_geo")
|
||||||
|
E_MODEL_SINGLE_ARM = smlua_model_util_get_id("arm_geo")
|
||||||
|
E_MODEL_PISTOL = smlua_model_util_get_id("pistol_geo")
|
||||||
|
E_MODEL_MAGNUM = smlua_model_util_get_id("magnum_geo")
|
||||||
|
E_MODEL_AK47 = smlua_model_util_get_id("ak47_geo")
|
||||||
|
E_MODEL_SHOTGUN = smlua_model_util_get_id("shotgun_geo")
|
||||||
|
E_MODEL_ARROW = smlua_model_util_get_id("arrow_geo")
|
||||||
|
E_MODEL_TROLL_EXPLOSION = smlua_model_util_get_id("troll_explosion_geo")
|
||||||
|
|
||||||
|
-- textures
|
||||||
|
TEX_CROSSHAIR = get_texture_info("gun_mod_crosshair")
|
||||||
|
|
||||||
|
-- custom sounds
|
||||||
|
SOUND_CUSTOM_IMPACT = audio_sample_load("impact.mp3")
|
||||||
|
SOUND_CUSTOM_RICOCHET = audio_sample_load("ricochet.mp3")
|
||||||
|
SOUND_CUSTOM_DRY = audio_sample_load("dry.mp3")
|
||||||
|
SOUND_CUSTOM_BAD_TO_THE_BONE = audio_sample_load("bad_to_the_bone_riff.mp3")
|
||||||
|
|
||||||
|
-- actions
|
||||||
|
-- ACT_CUSTOM_MOVEMENT = allocate_mario_action(ACT_GROUP_CUTSCENE)
|
||||||
|
|
||||||
|
-- packet ids
|
||||||
|
PACKET_ATTACK = 0
|
||||||
|
PACKET_SOUND = 1
|
||||||
|
|
||||||
|
-- misc
|
||||||
|
START_IN_FIRST_PERSON = true
|
||||||
|
|
||||||
|
MAX_INVENTORY_SLOTS = 2
|
||||||
|
|
||||||
|
HEALTH_SIGN = 30
|
||||||
|
HEALTH_BREAKABLE_BOX = 30
|
||||||
|
HEALTH_BOWLING_BALL = 75
|
||||||
|
HEALTH_CHUCKYA = 60
|
||||||
|
HEALTH_KING_BOBOMB = 200
|
||||||
|
HEALTH_BOWSER = 300
|
228
mods/gun-mod/a-utils.lua
Normal file
|
@ -0,0 +1,228 @@
|
||||||
|
if SM64COOPDX_VERSION == nil then return end
|
||||||
|
|
||||||
|
define_custom_obj_fields({
|
||||||
|
oGmHealth = "f32"
|
||||||
|
})
|
||||||
|
|
||||||
|
--- @return number
|
||||||
|
--- Gets the player's health in 0-100 format
|
||||||
|
function get_health()
|
||||||
|
return clampf((gMarioStates[0].health - 0xFF) / (0x880 - 0xFF), 0, 1) * 100
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return nil
|
||||||
|
--- Sets the player's health in 0-100 format
|
||||||
|
function set_health(health)
|
||||||
|
gMarioStates[0].health = (health * 19.21) + 0xFF
|
||||||
|
end
|
||||||
|
|
||||||
|
function packet_send(reliable, packet, dataTable)
|
||||||
|
dataTable.packet = packet
|
||||||
|
dataTable.level = gNetworkPlayers[0].currLevelNum
|
||||||
|
dataTable.area = gNetworkPlayers[0].currAreaIndex
|
||||||
|
dataTable.act = gNetworkPlayers[0].currActNum
|
||||||
|
network_send(reliable, dataTable)
|
||||||
|
on_packet_receive(dataTable)
|
||||||
|
end
|
||||||
|
|
||||||
|
------------------
|
||||||
|
-- synced audio --
|
||||||
|
------------------
|
||||||
|
|
||||||
|
gSoundTable = {}
|
||||||
|
local soundId = -1
|
||||||
|
|
||||||
|
function sync_audio_sample_load(filename)
|
||||||
|
local sound = audio_sample_load(filename)
|
||||||
|
if sound ~= nil then
|
||||||
|
soundId = soundId + 1
|
||||||
|
gSoundTable["snd" .. soundId] = sound
|
||||||
|
return "snd" .. soundId
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function sync_audio_sample_play(audio, position, volume)
|
||||||
|
local packet = {
|
||||||
|
sound = audio,
|
||||||
|
x = position.x,
|
||||||
|
y = position.y,
|
||||||
|
z = position.z,
|
||||||
|
volume = volume
|
||||||
|
}
|
||||||
|
packet_send(false, PACKET_SOUND, packet)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
-- misc functions --
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
--- @param m MarioState
|
||||||
|
function active_player(m)
|
||||||
|
local np = gNetworkPlayers[m.playerIndex]
|
||||||
|
if m.playerIndex == 0 then
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
if not np.connected then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
if np.currCourseNum ~= gNetworkPlayers[0].currCourseNum then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
if np.currActNum ~= gNetworkPlayers[0].currActNum then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
if np.currLevelNum ~= gNetworkPlayers[0].currLevelNum then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
if np.currAreaIndex ~= gNetworkPlayers[0].currAreaIndex then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
return is_player_active(m)
|
||||||
|
end
|
||||||
|
|
||||||
|
function if_then_else(cond, ifTrue, ifFalse)
|
||||||
|
if cond then return ifTrue end
|
||||||
|
return ifFalse
|
||||||
|
end
|
||||||
|
|
||||||
|
function handle_timer(timer)
|
||||||
|
if timer > 0 then
|
||||||
|
timer = timer - 1
|
||||||
|
end
|
||||||
|
return timer
|
||||||
|
end
|
||||||
|
|
||||||
|
function split(s)
|
||||||
|
local result = {}
|
||||||
|
for match in (s):gmatch(string.format("[^%s]+", " ")) do
|
||||||
|
table.insert(result, match)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
function on_or_off(value)
|
||||||
|
if value then return "\\#00ff00\\ON" end
|
||||||
|
return "\\#ff0000\\OFF"
|
||||||
|
end
|
||||||
|
|
||||||
|
function name_without_hex(name)
|
||||||
|
local s = ''
|
||||||
|
local inSlash = false
|
||||||
|
for i = 1, #name do
|
||||||
|
local c = name:sub(i,i)
|
||||||
|
if c == '\\' then
|
||||||
|
inSlash = not inSlash
|
||||||
|
elseif not inSlash then
|
||||||
|
s = s .. c
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return s
|
||||||
|
end
|
||||||
|
|
||||||
|
function lerp(a,b,t) return a * (1-t) + b * t end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function obj_set_animation(obj, name)
|
||||||
|
if obj == nil then return end
|
||||||
|
|
||||||
|
local animPointer = nil
|
||||||
|
if obj.header.gfx.animInfo.curAnim ~= nil then animPointer = obj.header.gfx.animInfo.curAnim._pointer end
|
||||||
|
smlua_anim_util_set_animation(obj, name)
|
||||||
|
if obj.header.gfx.animInfo.curAnim._pointer ~= animPointer then
|
||||||
|
obj.header.gfx.animInfo.animAccel = 0
|
||||||
|
obj.header.gfx.animInfo.animFrame = obj.header.gfx.animInfo.curAnim.startFrame
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o1 Object
|
||||||
|
--- @param o2 Object
|
||||||
|
--- Basically `obj_check_hitbox_overlap()` except it uses 3 variables for object 1's X, Y and Z coordinates
|
||||||
|
function obj_check_hitbox_overlap_xyz(o1, o2, x2, y2, z2)
|
||||||
|
if o1 == nil or o2 == nil then return false end
|
||||||
|
|
||||||
|
local o1H = maxf(o1.hitboxHeight, o1.hurtboxHeight) -- object 1 hitbox height
|
||||||
|
local o1R = maxf(o1.hitboxRadius, o1.hurtboxRadius) -- object 1 hitbox radius
|
||||||
|
local o2H = maxf(o2.hitboxHeight, o2.hurtboxHeight) -- object 2 hitbox height
|
||||||
|
local o2R = maxf(o2.hitboxRadius, o2.hurtboxRadius) -- object 2 hitbox radius
|
||||||
|
|
||||||
|
-- calculate the distance between the cylinder centers in the xz-plane
|
||||||
|
local distanceXZ = math.sqrt(sqrf(x2 - o1.oPosX) + sqrf(z2 - o1.oPosZ))
|
||||||
|
|
||||||
|
-- check for collision in the xz-plane (ignoring height)
|
||||||
|
if distanceXZ <= o1R + o2R then
|
||||||
|
-- check for collision in the y-axis (height)
|
||||||
|
if math.abs(y2 - o1.oPosY) <= maxf(o1H, o2H) * 0.5 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function obj_skip_in_view_check(obj)
|
||||||
|
obj.header.gfx.skipInViewCheck = true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- generic
|
||||||
|
function obj_generate_hitbox_multiply_func(radius, height)
|
||||||
|
--- @param o Object
|
||||||
|
local func = function(o)
|
||||||
|
o.hitboxRadius = o.hitboxRadius * radius
|
||||||
|
o.hitboxHeight = o.hitboxHeight * height
|
||||||
|
end
|
||||||
|
return func
|
||||||
|
end
|
||||||
|
|
||||||
|
-- generic
|
||||||
|
function obj_generate_health_func(health)
|
||||||
|
--- @param o Object
|
||||||
|
local func = function(o)
|
||||||
|
o.oGmHealth = health
|
||||||
|
end
|
||||||
|
return func
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
function obj_sign_hitbox(o)
|
||||||
|
o.hitboxRadius = o.hitboxRadius * 0.75
|
||||||
|
o.hitboxHeight = o.hitboxHeight * 1.5
|
||||||
|
o.oGmHealth = HEALTH_SIGN
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
function obj_amp_hitbox(o)
|
||||||
|
if o.oAction ~= AMP_ACT_ATTACK_COOLDOWN then
|
||||||
|
o.hitboxHeight = o.hitboxHeight * 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
function obj_chuckya_hitbox(o)
|
||||||
|
o.hitboxHeight = o.hitboxHeight * 2
|
||||||
|
o.oGmHealth = HEALTH_CHUCKYA
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
function obj_snufit_hitbox(o)
|
||||||
|
o.hitboxRadius = o.hitboxRadius * 0.6
|
||||||
|
o.hitboxHeight = o.hitboxHeight * 2
|
||||||
|
o.hitboxDownOffset = 60
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
function obj_king_bobomb_hitbox(o)
|
||||||
|
o.oGmHealth = HEALTH_KING_BOBOMB
|
||||||
|
o.hitboxHeight = o.hitboxHeight * 3
|
||||||
|
end
|
||||||
|
|
||||||
|
function gm_hook_behavior(id, override, init, loop)
|
||||||
|
hook_behavior(
|
||||||
|
id,
|
||||||
|
get_object_list_from_behavior(get_behavior_from_id(id)), -- automatically get the correct object list
|
||||||
|
override, init, loop,
|
||||||
|
"bhvGm" .. get_behavior_name_from_id(id):sub(4) -- give the behavior a consistent behavior name (for example, bhvGoomba will become bhvGmGoomba)
|
||||||
|
)
|
||||||
|
end
|
24
mods/gun-mod/actors/ak47/geo.inc.c
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#include "src/game/envfx_snow.h"
|
||||||
|
|
||||||
|
const GeoLayout ak47_geo[] = {
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_SCALE(LAYER_FORCE, 65536),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ASM(0, geo_mario_set_player_colors),
|
||||||
|
GEO_ASM(8, geo_mario_set_player_colors),
|
||||||
|
GEO_SWITCH_CASE(0, geo_switch_anim_state),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, -45, 0, NULL),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 25, 0, 0, ak47_Arm_mesh_layer_1),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_DISPLAY_LIST(LAYER_OPAQUE, ak47_material_revert_render_settings),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_END(),
|
||||||
|
};
|
25
mods/gun-mod/actors/ak47/geo_header.h
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
extern const GeoLayout ak47_geo[];
|
||||||
|
extern Lights1 ak47_wood_lights;
|
||||||
|
extern Lights1 ak47_gray_lights;
|
||||||
|
extern Lights1 ak47_darkgray_lights;
|
||||||
|
extern Lights1 ak47_darkergray_lights;
|
||||||
|
extern u8 ak47_wood_rgba16[];
|
||||||
|
extern u8 ak47_noise_i8[];
|
||||||
|
extern Vtx ak47_Arm_mesh_layer_1_vtx_0[101];
|
||||||
|
extern Gfx ak47_Arm_mesh_layer_1_tri_0[];
|
||||||
|
extern Vtx ak47_Arm_mesh_layer_1_vtx_1[226];
|
||||||
|
extern Gfx ak47_Arm_mesh_layer_1_tri_1[];
|
||||||
|
extern Vtx ak47_Arm_mesh_layer_1_vtx_2[4];
|
||||||
|
extern Gfx ak47_Arm_mesh_layer_1_tri_2[];
|
||||||
|
extern Vtx ak47_Arm_mesh_layer_1_vtx_3[71];
|
||||||
|
extern Gfx ak47_Arm_mesh_layer_1_tri_3[];
|
||||||
|
extern Vtx ak47_Arm_mesh_layer_1_vtx_4[60];
|
||||||
|
extern Gfx ak47_Arm_mesh_layer_1_tri_4[];
|
||||||
|
extern Gfx mat_ak47_wood[];
|
||||||
|
extern Gfx mat_ak47_gray[];
|
||||||
|
extern Gfx mat_ak47_black_layer1[];
|
||||||
|
extern Gfx mat_revert_ak47_black_layer1[];
|
||||||
|
extern Gfx mat_ak47_darkgray[];
|
||||||
|
extern Gfx mat_ak47_darkergray[];
|
||||||
|
extern Gfx ak47_Arm_mesh_layer_1[];
|
||||||
|
extern Gfx ak47_material_revert_render_settings[];
|
905
mods/gun-mod/actors/ak47/model.inc.c
Normal file
|
@ -0,0 +1,905 @@
|
||||||
|
Lights1 ak47_wood_lights = gdSPDefLights1(
|
||||||
|
0x7F, 0x7F, 0x7F,
|
||||||
|
0xFF, 0xFF, 0xFF, 0x28, 0x28, 0x28);
|
||||||
|
|
||||||
|
Lights1 ak47_gray_lights = gdSPDefLights1(
|
||||||
|
0x53, 0x53, 0x53,
|
||||||
|
0xAA, 0xAA, 0xAA, 0x28, 0x28, 0x28);
|
||||||
|
|
||||||
|
Lights1 ak47_darkgray_lights = gdSPDefLights1(
|
||||||
|
0x3B, 0x3B, 0x3B,
|
||||||
|
0x7C, 0x7C, 0x7C, 0x28, 0x28, 0x28);
|
||||||
|
|
||||||
|
Lights1 ak47_darkergray_lights = gdSPDefLights1(
|
||||||
|
0xF, 0xF, 0xF,
|
||||||
|
0x2A, 0x2A, 0x2A, 0x28, 0x28, 0x28);
|
||||||
|
|
||||||
|
Gfx ak47_wood_rgba16_aligner[] = {gsSPEndDisplayList()};
|
||||||
|
u8 ak47_wood_rgba16[] = {
|
||||||
|
#include "actors/ak47/wood.rgba16.inc.c"
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx ak47_noise_i8_aligner[] = {gsSPEndDisplayList()};
|
||||||
|
u8 ak47_noise_i8[] = {
|
||||||
|
#include "actors/ak47/noise.i8.inc.c"
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx ak47_Arm_mesh_layer_1_vtx_0[101] = {
|
||||||
|
{{ {119, 40, -12}, 0, {-197, 504}, {161, 28, 176, 255} }},
|
||||||
|
{{ {119, 22, -12}, 0, {-197, 1006}, {177, 179, 194, 255} }},
|
||||||
|
{{ {121, 22, 1}, 0, {165, 1006}, {200, 179, 84, 255} }},
|
||||||
|
{{ {120, 45, -2}, 0, {75, 365}, {188, 89, 59, 255} }},
|
||||||
|
{{ {121, 40, 1}, 0, {165, 504}, {191, 28, 105, 255} }},
|
||||||
|
{{ {119, 45, -9}, 0, {-107, 365}, {173, 89, 220, 255} }},
|
||||||
|
{{ {119, 22, -12}, 0, {165, -639}, {177, 179, 194, 255} }},
|
||||||
|
{{ {143, 25, -15}, 0, {144, -1330}, {0, 167, 165, 255} }},
|
||||||
|
{{ {168, 28, -13}, 0, {-16, -2021}, {86, 163, 242, 255} }},
|
||||||
|
{{ {121, 22, 1}, 0, {-197, -639}, {200, 179, 84, 255} }},
|
||||||
|
{{ {145, 25, -4}, 0, {-176, -1330}, {28, 167, 86, 255} }},
|
||||||
|
{{ {143, 25, -15}, 0, {63, -1330}, {0, 167, 165, 255} }},
|
||||||
|
{{ {119, 22, -12}, 0, {-14, -639}, {177, 179, 194, 255} }},
|
||||||
|
{{ {119, 40, -12}, 0, {488, -639}, {161, 28, 176, 255} }},
|
||||||
|
{{ {167, 34, -18}, 0, {309, -2021}, {72, 231, 154, 255} }},
|
||||||
|
{{ {167, 40, -18}, 0, {488, -2021}, {68, 29, 153, 255} }},
|
||||||
|
{{ {119, 40, -12}, 0, {488, -639}, {161, 28, 176, 255} }},
|
||||||
|
{{ {119, 45, -9}, 0, {627, -639}, {173, 89, 220, 255} }},
|
||||||
|
{{ {167, 40, -18}, 0, {488, -2021}, {68, 29, 153, 255} }},
|
||||||
|
{{ {168, 44, -16}, 0, {585, -2021}, {72, 88, 199, 255} }},
|
||||||
|
{{ {143, 25, -15}, 0, {63, -1330}, {0, 167, 165, 255} }},
|
||||||
|
{{ {167, 34, -18}, 0, {309, -2021}, {72, 231, 154, 255} }},
|
||||||
|
{{ {168, 28, -13}, 0, {140, -2021}, {86, 163, 242, 255} }},
|
||||||
|
{{ {168, 28, -13}, 0, {-172, -2021}, {86, 163, 242, 255} }},
|
||||||
|
{{ {169, 34, -8}, 0, {-341, -2021}, {100, 231, 74, 255} }},
|
||||||
|
{{ {145, 25, -4}, 0, {-95, -1330}, {28, 167, 86, 255} }},
|
||||||
|
{{ {169, 40, -8}, 0, {-520, -2021}, {97, 29, 77, 255} }},
|
||||||
|
{{ {121, 22, 1}, 0, {-18, -639}, {200, 179, 84, 255} }},
|
||||||
|
{{ {121, 40, 1}, 0, {-520, -639}, {191, 28, 105, 255} }},
|
||||||
|
{{ {120, 45, -2}, 0, {-659, -639}, {188, 89, 59, 255} }},
|
||||||
|
{{ {169, 44, -11}, 0, {-617, -2021}, {86, 88, 32, 255} }},
|
||||||
|
{{ {169, 34, -8}, 0, {-154, 683}, {100, 231, 74, 255} }},
|
||||||
|
{{ {168, 28, -13}, 0, {-16, 852}, {86, 163, 242, 255} }},
|
||||||
|
{{ {167, 34, -18}, 0, {122, 683}, {72, 231, 154, 255} }},
|
||||||
|
{{ {169, 44, -11}, 0, {-85, 407}, {86, 88, 32, 255} }},
|
||||||
|
{{ {167, 40, -18}, 0, {122, 504}, {68, 29, 153, 255} }},
|
||||||
|
{{ {168, 44, -16}, 0, {53, 407}, {72, 88, 199, 255} }},
|
||||||
|
{{ {169, 40, -8}, 0, {-154, 504}, {97, 29, 77, 255} }},
|
||||||
|
{{ {169, 44, -11}, 0, {53, -2021}, {86, 88, 32, 255} }},
|
||||||
|
{{ {119, 45, -9}, 0, {-107, -639}, {173, 89, 220, 255} }},
|
||||||
|
{{ {120, 45, -2}, 0, {75, -639}, {188, 89, 59, 255} }},
|
||||||
|
{{ {168, 44, -16}, 0, {-85, -2021}, {72, 88, 199, 255} }},
|
||||||
|
{{ {70, 22, 0}, 0, {-16, 768}, {84, 225, 166, 255} }},
|
||||||
|
{{ {42, 0, 3}, 0, {-640, 1553}, {153, 24, 186, 255} }},
|
||||||
|
{{ {53, 22, 3}, 0, {-16, 1248}, {171, 43, 172, 255} }},
|
||||||
|
{{ {57, -10, 0}, 0, {-937, 1115}, {39, 168, 173, 255} }},
|
||||||
|
{{ {42, -8, 3}, 0, {-855, 1553}, {166, 190, 195, 255} }},
|
||||||
|
{{ {57, -10, 0}, 0, {95, 1929}, {39, 168, 173, 255} }},
|
||||||
|
{{ {70, 22, 0}, 0, {43, 1008}, {84, 225, 166, 255} }},
|
||||||
|
{{ {70, 22, 4}, 0, {-75, 1008}, {108, 225, 60, 255} }},
|
||||||
|
{{ {59, -10, 8}, 0, {-127, 1929}, {62, 168, 67, 255} }},
|
||||||
|
{{ {43, 0, 11}, 0, {95, 1632}, {179, 24, 98, 255} }},
|
||||||
|
{{ {54, 22, 7}, 0, {43, 1008}, {201, 43, 106, 255} }},
|
||||||
|
{{ {53, 22, 3}, 0, {-75, 1008}, {171, 43, 172, 255} }},
|
||||||
|
{{ {42, 0, 3}, 0, {-127, 1632}, {153, 24, 186, 255} }},
|
||||||
|
{{ {42, -8, 3}, 0, {-127, 1847}, {166, 190, 195, 255} }},
|
||||||
|
{{ {43, -8, 11}, 0, {95, 1847}, {190, 190, 86, 255} }},
|
||||||
|
{{ {43, 0, 11}, 0, {608, 1553}, {179, 24, 98, 255} }},
|
||||||
|
{{ {70, 22, 4}, 0, {-16, 768}, {108, 225, 60, 255} }},
|
||||||
|
{{ {54, 22, 7}, 0, {-16, 1248}, {201, 43, 106, 255} }},
|
||||||
|
{{ {59, -10, 8}, 0, {905, 1115}, {62, 168, 67, 255} }},
|
||||||
|
{{ {43, -8, 11}, 0, {823, 1553}, {190, 190, 86, 255} }},
|
||||||
|
{{ {57, -10, 0}, 0, {95, 1115}, {39, 168, 173, 255} }},
|
||||||
|
{{ {59, -10, 8}, 0, {-127, 1115}, {62, 168, 67, 255} }},
|
||||||
|
{{ {43, -8, 11}, 0, {-127, 1553}, {190, 190, 86, 255} }},
|
||||||
|
{{ {42, -8, 3}, 0, {95, 1553}, {166, 190, 195, 255} }},
|
||||||
|
{{ {51, 22, 5}, 0, {-16, 1317}, {202, 141, 8, 255} }},
|
||||||
|
{{ {52, 38, 10}, 0, {-449, 1317}, {228, 66, 105, 255} }},
|
||||||
|
{{ {31, 31, 14}, 0, {-263, 1902}, {22, 69, 105, 255} }},
|
||||||
|
{{ {18, 11, 13}, 0, {314, 2254}, {44, 167, 79, 255} }},
|
||||||
|
{{ {22, 33, 15}, 0, {-329, 2171}, {18, 90, 87, 255} }},
|
||||||
|
{{ {-21, 27, 22}, 0, {-159, 3377}, {184, 56, 89, 255} }},
|
||||||
|
{{ {-15, -1, 18}, 0, {643, 3190}, {218, 162, 76, 255} }},
|
||||||
|
{{ {51, 22, 5}, 0, {-16, 1317}, {202, 141, 8, 255} }},
|
||||||
|
{{ {30, 31, 4}, 0, {231, 1902}, {245, 69, 150, 255} }},
|
||||||
|
{{ {50, 38, 0}, 0, {417, 1317}, {197, 66, 165, 255} }},
|
||||||
|
{{ {18, 11, 8}, 0, {-346, 2254}, {18, 167, 167, 255} }},
|
||||||
|
{{ {20, 33, 5}, 0, {297, 2171}, {246, 90, 167, 255} }},
|
||||||
|
{{ {20, 33, 5}, 0, {297, 2171}, {246, 90, 167, 255} }},
|
||||||
|
{{ {18, 11, 8}, 0, {-346, 2254}, {18, 167, 167, 255} }},
|
||||||
|
{{ {-22, 27, 12}, 0, {127, 3377}, {161, 56, 194, 255} }},
|
||||||
|
{{ {-15, -1, 13}, 0, {-675, 3190}, {196, 162, 195, 255} }},
|
||||||
|
{{ {51, 22, 5}, 0, {-16, 1317}, {202, 141, 8, 255} }},
|
||||||
|
{{ {18, 11, 13}, 0, {-87, 2254}, {44, 167, 79, 255} }},
|
||||||
|
{{ {18, 11, 8}, 0, {55, 2254}, {18, 167, 167, 255} }},
|
||||||
|
{{ {-15, -1, 13}, 0, {55, 3190}, {196, 162, 195, 255} }},
|
||||||
|
{{ {-15, -1, 18}, 0, {-87, 3190}, {218, 162, 76, 255} }},
|
||||||
|
{{ {-22, 27, 12}, 0, {-158, 3377}, {161, 56, 194, 255} }},
|
||||||
|
{{ {-21, 27, 22}, 0, {126, 3377}, {184, 56, 89, 255} }},
|
||||||
|
{{ {22, 33, 15}, 0, {126, 2171}, {18, 90, 87, 255} }},
|
||||||
|
{{ {20, 33, 5}, 0, {-158, 2171}, {246, 90, 167, 255} }},
|
||||||
|
{{ {30, 31, 4}, 0, {-158, 1902}, {245, 69, 150, 255} }},
|
||||||
|
{{ {31, 31, 14}, 0, {126, 1902}, {22, 69, 105, 255} }},
|
||||||
|
{{ {50, 38, 0}, 0, {-158, 1317}, {197, 66, 165, 255} }},
|
||||||
|
{{ {50, 38, 0}, 0, {-158, 1317}, {197, 66, 165, 255} }},
|
||||||
|
{{ {31, 31, 14}, 0, {126, 1902}, {22, 69, 105, 255} }},
|
||||||
|
{{ {52, 38, 10}, 0, {126, 1317}, {228, 66, 105, 255} }},
|
||||||
|
{{ {-22, 27, 12}, 0, {-158, 865}, {161, 56, 194, 255} }},
|
||||||
|
{{ {-15, -1, 18}, 0, {55, 1667}, {218, 162, 76, 255} }},
|
||||||
|
{{ {-21, 27, 22}, 0, {126, 865}, {184, 56, 89, 255} }},
|
||||||
|
{{ {-15, -1, 13}, 0, {-87, 1667}, {196, 162, 195, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx ak47_Arm_mesh_layer_1_tri_0[] = {
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_0 + 0, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(2, 4, 3, 0),
|
||||||
|
gsSP1Triangle(3, 5, 0, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(8, 9, 6, 0),
|
||||||
|
gsSP1Triangle(8, 10, 9, 0),
|
||||||
|
gsSP1Triangle(11, 12, 13, 0),
|
||||||
|
gsSP1Triangle(13, 14, 11, 0),
|
||||||
|
gsSP1Triangle(13, 15, 14, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_0 + 16, 15, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 2, 1, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(7, 8, 9, 0),
|
||||||
|
gsSP1Triangle(9, 8, 10, 0),
|
||||||
|
gsSP1Triangle(10, 11, 9, 0),
|
||||||
|
gsSP1Triangle(10, 12, 11, 0),
|
||||||
|
gsSP1Triangle(12, 10, 13, 0),
|
||||||
|
gsSP1Triangle(14, 13, 10, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_0 + 31, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 0, 2, 0),
|
||||||
|
gsSP1Triangle(2, 4, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 3, 0),
|
||||||
|
gsSP1Triangle(3, 6, 0, 0),
|
||||||
|
gsSP1Triangle(7, 8, 9, 0),
|
||||||
|
gsSP1Triangle(7, 10, 8, 0),
|
||||||
|
gsSP1Triangle(11, 12, 13, 0),
|
||||||
|
gsSP1Triangle(12, 11, 14, 0),
|
||||||
|
gsSP1Triangle(15, 12, 14, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_0 + 47, 15, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 6, 7, 0),
|
||||||
|
gsSP1Triangle(8, 4, 7, 0),
|
||||||
|
gsSP1Triangle(8, 9, 4, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(11, 10, 13, 0),
|
||||||
|
gsSP1Triangle(14, 13, 10, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_0 + 62, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(6, 7, 4, 0),
|
||||||
|
gsSP1Triangle(8, 7, 6, 0),
|
||||||
|
gsSP1Triangle(7, 8, 9, 0),
|
||||||
|
gsSP1Triangle(10, 7, 9, 0),
|
||||||
|
gsSP1Triangle(11, 12, 13, 0),
|
||||||
|
gsSP1Triangle(14, 12, 11, 0),
|
||||||
|
gsSP1Triangle(14, 15, 12, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_0 + 78, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 2, 1, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(7, 6, 5, 0),
|
||||||
|
gsSP1Triangle(7, 5, 8, 0),
|
||||||
|
gsSP1Triangle(9, 10, 11, 0),
|
||||||
|
gsSP1Triangle(9, 11, 12, 0),
|
||||||
|
gsSP1Triangle(11, 13, 12, 0),
|
||||||
|
gsSP1Triangle(11, 14, 13, 0),
|
||||||
|
gsSP1Triangle(15, 13, 14, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_0 + 94, 7, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(3, 6, 4, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx ak47_Arm_mesh_layer_1_vtx_1[226] = {
|
||||||
|
{{ {218, 32, -19}, 0, {-85, 746}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 29, -20}, 0, {-37, 828}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 35, -20}, 0, {-37, 664}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 29, -24}, 0, {58, 828}, {125, 0, 236, 255} }},
|
||||||
|
{{ {217, 32, -25}, 0, {105, 746}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 35, -24}, 0, {58, 664}, {125, 0, 236, 255} }},
|
||||||
|
{{ {52, 22, 10}, 0, {126, 1008}, {195, 183, 84, 255} }},
|
||||||
|
{{ {52, 38, 10}, 0, {126, 575}, {228, 66, 105, 255} }},
|
||||||
|
{{ {51, 22, 5}, 0, {-16, 1008}, {202, 141, 8, 255} }},
|
||||||
|
{{ {50, 22, 0}, 0, {-158, 1008}, {172, 183, 195, 255} }},
|
||||||
|
{{ {50, 38, 0}, 0, {-158, 575}, {197, 66, 165, 255} }},
|
||||||
|
{{ {90, 36, 4}, 0, {126, 218}, {0, 127, 0, 255} }},
|
||||||
|
{{ {98, 36, 8}, 0, {277, 24}, {0, 127, 0, 255} }},
|
||||||
|
{{ {95, 36, 1}, 0, {65, 71}, {0, 127, 0, 255} }},
|
||||||
|
{{ {90, 34, 4}, 0, {-158, 218}, {0, 129, 0, 255} }},
|
||||||
|
{{ {95, 34, 1}, 0, {-97, 71}, {0, 129, 0, 255} }},
|
||||||
|
{{ {98, 34, 8}, 0, {-309, 24}, {0, 129, 0, 255} }},
|
||||||
|
{{ {193, 37, -16}, 0, {9, 582}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 39, -17}, 0, {-17, 538}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 39, -19}, 0, {-68, 538}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 36, -19}, 0, {-68, 627}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 37, -20}, 0, {-94, 582}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 36, -17}, 0, {-17, 627}, {131, 0, 20, 255} }},
|
||||||
|
{{ {156, 39, -13}, 0, {-68, -1673}, {246, 110, 193, 255} }},
|
||||||
|
{{ {156, 39, -11}, 0, {-17, -1673}, {10, 110, 63, 255} }},
|
||||||
|
{{ {193, 39, -17}, 0, {-17, -2728}, {10, 110, 63, 255} }},
|
||||||
|
{{ {193, 39, -19}, 0, {-68, -2728}, {246, 110, 193, 255} }},
|
||||||
|
{{ {156, 39, -11}, 0, {-486, -1673}, {10, 110, 63, 255} }},
|
||||||
|
{{ {193, 37, -16}, 0, {-442, -2728}, {20, 0, 125, 255} }},
|
||||||
|
{{ {193, 39, -17}, 0, {-486, -2728}, {10, 110, 63, 255} }},
|
||||||
|
{{ {156, 39, -11}, 0, {-486, -1673}, {10, 110, 63, 255} }},
|
||||||
|
{{ {156, 37, -10}, 0, {-442, -1673}, {20, 0, 125, 255} }},
|
||||||
|
{{ {193, 37, -16}, 0, {-442, -2728}, {20, 0, 125, 255} }},
|
||||||
|
{{ {193, 36, -17}, 0, {-397, -2728}, {10, 146, 63, 255} }},
|
||||||
|
{{ {156, 36, -11}, 0, {-397, -1673}, {10, 146, 63, 255} }},
|
||||||
|
{{ {193, 35, -16}, 0, {5, 664}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 37, -15}, 0, {53, 582}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 40, -16}, 0, {5, 500}, {131, 0, 20, 255} }},
|
||||||
|
{{ {192, 37, -21}, 0, {-137, 582}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 40, -20}, 0, {-90, 500}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 35, -20}, 0, {-90, 664}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 32, -15}, 0, {53, 746}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 29, -20}, 0, {-90, 828}, {131, 0, 20, 255} }},
|
||||||
|
{{ {192, 32, -21}, 0, {-137, 746}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 29, -16}, 0, {5, 828}, {131, 0, 20, 255} }},
|
||||||
|
{{ {193, 35, -16}, 0, {-360, -2728}, {17, 192, 109, 255} }},
|
||||||
|
{{ {206, 35, -18}, 0, {-360, -3083}, {17, 192, 109, 255} }},
|
||||||
|
{{ {206, 37, -17}, 0, {-442, -3083}, {17, 192, 109, 255} }},
|
||||||
|
{{ {193, 37, -15}, 0, {-442, -2728}, {17, 192, 109, 255} }},
|
||||||
|
{{ {218, 35, -20}, 0, {-360, -3439}, {17, 64, 109, 255} }},
|
||||||
|
{{ {206, 35, -18}, 0, {-360, -3083}, {17, 64, 109, 255} }},
|
||||||
|
{{ {193, 35, -16}, 0, {-360, -2728}, {17, 64, 109, 255} }},
|
||||||
|
{{ {218, 32, -19}, 0, {-278, -3439}, {17, 64, 109, 255} }},
|
||||||
|
{{ {193, 32, -15}, 0, {-278, -2728}, {17, 64, 109, 255} }},
|
||||||
|
{{ {192, 37, -21}, 0, {410, -2728}, {239, 192, 147, 255} }},
|
||||||
|
{{ {205, 35, -22}, 0, {328, -3083}, {239, 192, 147, 255} }},
|
||||||
|
{{ {193, 35, -20}, 0, {328, -2728}, {239, 192, 147, 255} }},
|
||||||
|
{{ {205, 37, -23}, 0, {410, -3083}, {239, 192, 147, 255} }},
|
||||||
|
{{ {193, 35, -20}, 0, {328, -2728}, {239, 64, 147, 255} }},
|
||||||
|
{{ {205, 35, -22}, 0, {328, -3083}, {239, 64, 147, 255} }},
|
||||||
|
{{ {218, 35, -24}, 0, {328, -3439}, {239, 64, 147, 255} }},
|
||||||
|
{{ {218, 35, -24}, 0, {328, -3439}, {239, 64, 147, 255} }},
|
||||||
|
{{ {192, 32, -21}, 0, {246, -2728}, {239, 64, 147, 255} }},
|
||||||
|
{{ {193, 35, -20}, 0, {328, -2728}, {239, 64, 147, 255} }},
|
||||||
|
{{ {217, 32, -25}, 0, {246, -3439}, {239, 64, 147, 255} }},
|
||||||
|
{{ {193, 40, -16}, 0, {5, -2728}, {0, 127, 0, 255} }},
|
||||||
|
{{ {206, 40, -18}, 0, {5, -3083}, {0, 127, 0, 255} }},
|
||||||
|
{{ {205, 40, -22}, 0, {-90, -3083}, {0, 127, 0, 255} }},
|
||||||
|
{{ {193, 40, -20}, 0, {-90, -2728}, {0, 127, 0, 255} }},
|
||||||
|
{{ {193, 37, -15}, 0, {-442, -2728}, {17, 64, 109, 255} }},
|
||||||
|
{{ {206, 40, -18}, 0, {-524, -3083}, {17, 64, 109, 255} }},
|
||||||
|
{{ {193, 40, -16}, 0, {-524, -2728}, {17, 64, 109, 255} }},
|
||||||
|
{{ {206, 37, -17}, 0, {-442, -3083}, {17, 64, 109, 255} }},
|
||||||
|
{{ {156, 36, -11}, 0, {-15, -1673}, {10, 146, 63, 255} }},
|
||||||
|
{{ {193, 36, -19}, 0, {36, -2728}, {246, 146, 193, 255} }},
|
||||||
|
{{ {193, 36, -17}, 0, {-15, -2728}, {10, 146, 63, 255} }},
|
||||||
|
{{ {156, 36, -13}, 0, {36, -1673}, {246, 146, 193, 255} }},
|
||||||
|
{{ {156, 36, -13}, 0, {365, -1673}, {246, 146, 193, 255} }},
|
||||||
|
{{ {193, 37, -20}, 0, {410, -2728}, {236, 0, 131, 255} }},
|
||||||
|
{{ {193, 36, -19}, 0, {365, -2728}, {246, 146, 193, 255} }},
|
||||||
|
{{ {156, 37, -14}, 0, {410, -1673}, {236, 0, 131, 255} }},
|
||||||
|
{{ {193, 39, -19}, 0, {454, -2728}, {246, 110, 193, 255} }},
|
||||||
|
{{ {156, 39, -13}, 0, {454, -1673}, {246, 110, 193, 255} }},
|
||||||
|
{{ {156, 30, -13}, 0, {201, -1673}, {246, 146, 193, 255} }},
|
||||||
|
{{ {193, 32, -20}, 0, {246, -2728}, {236, 0, 131, 255} }},
|
||||||
|
{{ {193, 30, -19}, 0, {201, -2728}, {246, 146, 193, 255} }},
|
||||||
|
{{ {156, 32, -14}, 0, {246, -1673}, {236, 0, 131, 255} }},
|
||||||
|
{{ {156, 33, -13}, 0, {290, -1673}, {246, 110, 193, 255} }},
|
||||||
|
{{ {193, 33, -19}, 0, {290, -2728}, {246, 110, 193, 255} }},
|
||||||
|
{{ {156, 30, -11}, 0, {-15, -1673}, {10, 146, 63, 255} }},
|
||||||
|
{{ {156, 30, -13}, 0, {36, -1673}, {246, 146, 193, 255} }},
|
||||||
|
{{ {193, 30, -19}, 0, {36, -2728}, {246, 146, 193, 255} }},
|
||||||
|
{{ {193, 30, -17}, 0, {-15, -2728}, {10, 146, 63, 255} }},
|
||||||
|
{{ {156, 32, -10}, 0, {-278, -1673}, {20, 0, 125, 255} }},
|
||||||
|
{{ {156, 30, -11}, 0, {-233, -1673}, {10, 146, 63, 255} }},
|
||||||
|
{{ {193, 30, -17}, 0, {-233, -2728}, {10, 146, 63, 255} }},
|
||||||
|
{{ {193, 32, -16}, 0, {-278, -2728}, {20, 0, 125, 255} }},
|
||||||
|
{{ {156, 33, -11}, 0, {-322, -1673}, {10, 110, 63, 255} }},
|
||||||
|
{{ {193, 33, -17}, 0, {-322, -2728}, {10, 110, 63, 255} }},
|
||||||
|
{{ {193, 29, -20}, 0, {58, -2728}, {0, 129, 0, 255} }},
|
||||||
|
{{ {218, 29, -24}, 0, {58, -3439}, {0, 129, 0, 255} }},
|
||||||
|
{{ {218, 29, -20}, 0, {-37, -3439}, {0, 129, 0, 255} }},
|
||||||
|
{{ {193, 29, -16}, 0, {-37, -2728}, {0, 129, 0, 255} }},
|
||||||
|
{{ {193, 29, -20}, 0, {164, -2728}, {239, 192, 147, 255} }},
|
||||||
|
{{ {192, 32, -21}, 0, {246, -2728}, {239, 192, 147, 255} }},
|
||||||
|
{{ {217, 32, -25}, 0, {246, -3439}, {239, 192, 147, 255} }},
|
||||||
|
{{ {218, 29, -24}, 0, {164, -3439}, {239, 192, 147, 255} }},
|
||||||
|
{{ {193, 40, -20}, 0, {492, -2728}, {239, 64, 147, 255} }},
|
||||||
|
{{ {205, 37, -23}, 0, {410, -3083}, {239, 64, 147, 255} }},
|
||||||
|
{{ {192, 37, -21}, 0, {410, -2728}, {239, 64, 147, 255} }},
|
||||||
|
{{ {205, 40, -22}, 0, {492, -3083}, {239, 64, 147, 255} }},
|
||||||
|
{{ {205, 37, -22}, 0, {58, 583}, {125, 0, 236, 255} }},
|
||||||
|
{{ {205, 37, -23}, 0, {105, 582}, {125, 0, 236, 255} }},
|
||||||
|
{{ {205, 40, -22}, 0, {58, 500}, {125, 0, 236, 255} }},
|
||||||
|
{{ {205, 35, -22}, 0, {58, 664}, {125, 0, 236, 255} }},
|
||||||
|
{{ {211, 49, -23}, 0, {-90, 251}, {154, 74, 16, 255} }},
|
||||||
|
{{ {205, 40, -22}, 0, {-90, 500}, {154, 74, 16, 255} }},
|
||||||
|
{{ {206, 40, -18}, 0, {5, 500}, {154, 74, 16, 255} }},
|
||||||
|
{{ {212, 49, -19}, 0, {5, 251}, {154, 74, 16, 255} }},
|
||||||
|
{{ {193, 32, -15}, 0, {-278, -2728}, {17, 192, 109, 255} }},
|
||||||
|
{{ {193, 29, -16}, 0, {-196, -2728}, {17, 192, 109, 255} }},
|
||||||
|
{{ {218, 29, -20}, 0, {-196, -3439}, {17, 192, 109, 255} }},
|
||||||
|
{{ {218, 32, -19}, 0, {-278, -3439}, {17, 192, 109, 255} }},
|
||||||
|
{{ {206, 40, -18}, 0, {-37, 500}, {125, 0, 236, 255} }},
|
||||||
|
{{ {206, 37, -17}, 0, {-85, 582}, {125, 0, 236, 255} }},
|
||||||
|
{{ {206, 35, -18}, 0, {-37, 664}, {125, 0, 236, 255} }},
|
||||||
|
{{ {206, 37, -18}, 0, {-37, 583}, {125, 0, 236, 255} }},
|
||||||
|
{{ {206, 35, -18}, 0, {-360, -3083}, {20, 0, 125, 255} }},
|
||||||
|
{{ {218, 35, -20}, 0, {-360, -3439}, {20, 0, 125, 255} }},
|
||||||
|
{{ {218, 37, -20}, 0, {-441, -3439}, {20, 0, 125, 255} }},
|
||||||
|
{{ {209, 37, -19}, 0, {-441, -3165}, {20, 0, 125, 255} }},
|
||||||
|
{{ {215, 37, -20}, 0, {-441, -3357}, {20, 0, 125, 255} }},
|
||||||
|
{{ {218, 49, -20}, 0, {-773, -3439}, {20, 0, 125, 255} }},
|
||||||
|
{{ {215, 46, -20}, 0, {-691, -3357}, {20, 0, 125, 255} }},
|
||||||
|
{{ {213, 46, -20}, 0, {-691, -3303}, {20, 0, 125, 255} }},
|
||||||
|
{{ {212, 49, -19}, 0, {-773, -3261}, {20, 0, 125, 255} }},
|
||||||
|
{{ {206, 37, -18}, 0, {-441, -3083}, {20, 0, 125, 255} }},
|
||||||
|
{{ {206, 40, -18}, 0, {-524, -3083}, {20, 0, 125, 255} }},
|
||||||
|
{{ {209, 39, -19}, 0, {-498, -3165}, {20, 0, 125, 255} }},
|
||||||
|
{{ {218, 35, -24}, 0, {328, -3439}, {236, 0, 131, 255} }},
|
||||||
|
{{ {205, 35, -22}, 0, {328, -3083}, {236, 0, 131, 255} }},
|
||||||
|
{{ {205, 37, -22}, 0, {409, -3083}, {236, 0, 131, 255} }},
|
||||||
|
{{ {208, 37, -22}, 0, {409, -3165}, {236, 0, 131, 255} }},
|
||||||
|
{{ {205, 40, -22}, 0, {492, -3083}, {236, 0, 131, 255} }},
|
||||||
|
{{ {208, 39, -22}, 0, {466, -3165}, {236, 0, 131, 255} }},
|
||||||
|
{{ {213, 46, -23}, 0, {659, -3303}, {236, 0, 131, 255} }},
|
||||||
|
{{ {211, 49, -23}, 0, {741, -3261}, {236, 0, 131, 255} }},
|
||||||
|
{{ {218, 49, -24}, 0, {741, -3439}, {236, 0, 131, 255} }},
|
||||||
|
{{ {215, 46, -23}, 0, {659, -3357}, {236, 0, 131, 255} }},
|
||||||
|
{{ {215, 37, -23}, 0, {409, -3357}, {236, 0, 131, 255} }},
|
||||||
|
{{ {218, 37, -24}, 0, {409, -3439}, {236, 0, 131, 255} }},
|
||||||
|
{{ {212, 49, -19}, 0, {5, -3261}, {0, 127, 0, 255} }},
|
||||||
|
{{ {218, 49, -20}, 0, {5, -3439}, {0, 127, 0, 255} }},
|
||||||
|
{{ {218, 49, -24}, 0, {-90, -3439}, {0, 127, 0, 255} }},
|
||||||
|
{{ {211, 49, -23}, 0, {-90, -3261}, {0, 127, 0, 255} }},
|
||||||
|
{{ {218, 37, -24}, 0, {58, 583}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 49, -24}, 0, {58, 251}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 49, -20}, 0, {-37, 251}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 37, -20}, 0, {-37, 583}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 35, -24}, 0, {58, 664}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 35, -20}, 0, {-37, 664}, {125, 0, 236, 255} }},
|
||||||
|
{{ {209, 37, -19}, 0, {5, -3165}, {0, 127, 0, 255} }},
|
||||||
|
{{ {215, 37, -20}, 0, {5, -3357}, {0, 127, 0, 255} }},
|
||||||
|
{{ {215, 37, -23}, 0, {-90, -3357}, {0, 127, 0, 255} }},
|
||||||
|
{{ {208, 37, -22}, 0, {-90, -3165}, {0, 127, 0, 255} }},
|
||||||
|
{{ {209, 39, -19}, 0, {-37, 526}, {125, 0, 236, 255} }},
|
||||||
|
{{ {209, 37, -19}, 0, {-37, 583}, {125, 0, 236, 255} }},
|
||||||
|
{{ {208, 37, -22}, 0, {58, 583}, {125, 0, 236, 255} }},
|
||||||
|
{{ {208, 39, -22}, 0, {58, 526}, {125, 0, 236, 255} }},
|
||||||
|
{{ {215, 37, -20}, 0, {5, 583}, {131, 0, 20, 255} }},
|
||||||
|
{{ {215, 46, -23}, 0, {-90, 333}, {131, 0, 20, 255} }},
|
||||||
|
{{ {215, 37, -23}, 0, {-90, 583}, {131, 0, 20, 255} }},
|
||||||
|
{{ {215, 46, -20}, 0, {5, 333}, {131, 0, 20, 255} }},
|
||||||
|
{{ {213, 46, -20}, 0, {-37, 333}, {102, 182, 240, 255} }},
|
||||||
|
{{ {209, 39, -19}, 0, {-37, 526}, {102, 182, 240, 255} }},
|
||||||
|
{{ {208, 39, -22}, 0, {58, 526}, {102, 182, 240, 255} }},
|
||||||
|
{{ {213, 46, -23}, 0, {58, 333}, {102, 182, 240, 255} }},
|
||||||
|
{{ {215, 46, -20}, 0, {-37, -3357}, {0, 129, 0, 255} }},
|
||||||
|
{{ {213, 46, -20}, 0, {-37, -3303}, {0, 129, 0, 255} }},
|
||||||
|
{{ {213, 46, -23}, 0, {58, -3303}, {0, 129, 0, 255} }},
|
||||||
|
{{ {215, 46, -23}, 0, {58, -3357}, {0, 129, 0, 255} }},
|
||||||
|
{{ {156, 33, -13}, 0, {-68, -1673}, {246, 110, 193, 255} }},
|
||||||
|
{{ {193, 33, -17}, 0, {-17, -2728}, {10, 110, 63, 255} }},
|
||||||
|
{{ {193, 33, -19}, 0, {-68, -2728}, {246, 110, 193, 255} }},
|
||||||
|
{{ {156, 33, -11}, 0, {-17, -1673}, {10, 110, 63, 255} }},
|
||||||
|
{{ {51, 22, 5}, 0, {-16, 1317}, {202, 141, 8, 255} }},
|
||||||
|
{{ {50, 22, 0}, 0, {126, 1317}, {172, 183, 195, 255} }},
|
||||||
|
{{ {89, 22, -6}, 0, {126, 203}, {245, 165, 168, 255} }},
|
||||||
|
{{ {52, 22, 10}, 0, {-158, 1317}, {195, 183, 84, 255} }},
|
||||||
|
{{ {91, 22, 4}, 0, {-158, 203}, {17, 165, 87, 255} }},
|
||||||
|
{{ {139, 26, -4}, 0, {-158, -1178}, {21, 168, 90, 255} }},
|
||||||
|
{{ {138, 26, -13}, 0, {126, -1178}, {248, 168, 164, 255} }},
|
||||||
|
{{ {52, 38, 10}, 0, {-449, 1317}, {228, 66, 105, 255} }},
|
||||||
|
{{ {52, 22, 10}, 0, {-16, 1317}, {195, 183, 84, 255} }},
|
||||||
|
{{ {91, 22, 4}, 0, {-16, 203}, {17, 165, 87, 255} }},
|
||||||
|
{{ {139, 38, -4}, 0, {-449, -1178}, {19, 27, 122, 255} }},
|
||||||
|
{{ {139, 26, -4}, 0, {-117, -1178}, {21, 168, 90, 255} }},
|
||||||
|
{{ {139, 44, -6}, 0, {-617, -1178}, {11, 107, 68, 255} }},
|
||||||
|
{{ {57, 44, 7}, 0, {-617, 1149}, {229, 107, 63, 255} }},
|
||||||
|
{{ {50, 38, 0}, 0, {-158, 1317}, {197, 66, 165, 255} }},
|
||||||
|
{{ {52, 38, 10}, 0, {126, 1317}, {228, 66, 105, 255} }},
|
||||||
|
{{ {57, 44, 7}, 0, {48, 1149}, {229, 107, 63, 255} }},
|
||||||
|
{{ {56, 44, 2}, 0, {-80, 1149}, {211, 107, 205, 255} }},
|
||||||
|
{{ {139, 44, -6}, 0, {48, -1178}, {11, 107, 68, 255} }},
|
||||||
|
{{ {138, 44, -11}, 0, {-80, -1178}, {245, 107, 188, 255} }},
|
||||||
|
{{ {138, 26, -13}, 0, {85, -1178}, {248, 168, 164, 255} }},
|
||||||
|
{{ {89, 22, -6}, 0, {-16, 203}, {245, 165, 168, 255} }},
|
||||||
|
{{ {50, 22, 0}, 0, {-16, 1317}, {172, 183, 195, 255} }},
|
||||||
|
{{ {138, 38, -13}, 0, {417, -1178}, {237, 27, 134, 255} }},
|
||||||
|
{{ {50, 38, 0}, 0, {417, 1317}, {197, 66, 165, 255} }},
|
||||||
|
{{ {56, 44, 2}, 0, {585, 1149}, {211, 107, 205, 255} }},
|
||||||
|
{{ {138, 44, -11}, 0, {585, -1178}, {245, 107, 188, 255} }},
|
||||||
|
{{ {90, 36, 4}, 0, {375, 218}, {190, 0, 148, 255} }},
|
||||||
|
{{ {95, 36, 1}, 0, {375, 71}, {190, 0, 148, 255} }},
|
||||||
|
{{ {95, 34, 1}, 0, {305, 71}, {190, 0, 148, 255} }},
|
||||||
|
{{ {90, 36, 4}, 0, {375, 218}, {190, 0, 148, 255} }},
|
||||||
|
{{ {95, 34, 1}, 0, {305, 71}, {190, 0, 148, 255} }},
|
||||||
|
{{ {90, 34, 4}, 0, {305, 218}, {190, 0, 148, 255} }},
|
||||||
|
{{ {98, 36, 8}, 0, {-407, 24}, {195, 0, 111, 255} }},
|
||||||
|
{{ {90, 36, 4}, 0, {-407, 218}, {195, 0, 111, 255} }},
|
||||||
|
{{ {90, 34, 4}, 0, {-337, 218}, {195, 0, 111, 255} }},
|
||||||
|
{{ {98, 34, 8}, 0, {-337, 24}, {195, 0, 111, 255} }},
|
||||||
|
{{ {95, 36, 1}, 0, {-97, 617}, {118, 0, 209, 255} }},
|
||||||
|
{{ {98, 36, 8}, 0, {-309, 617}, {118, 0, 209, 255} }},
|
||||||
|
{{ {98, 34, 8}, 0, {-309, 687}, {118, 0, 209, 255} }},
|
||||||
|
{{ {95, 34, 1}, 0, {-97, 687}, {118, 0, 209, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx ak47_Arm_mesh_layer_1_tri_1[] = {
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 0, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(9, 8, 10, 0),
|
||||||
|
gsSP1Triangle(11, 12, 13, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 14, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(6, 3, 5, 0),
|
||||||
|
gsSP1Triangle(5, 7, 6, 0),
|
||||||
|
gsSP1Triangle(6, 8, 3, 0),
|
||||||
|
gsSP1Triangle(9, 10, 11, 0),
|
||||||
|
gsSP1Triangle(9, 11, 12, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 30, 15, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(1, 3, 2, 0),
|
||||||
|
gsSP1Triangle(1, 4, 3, 0),
|
||||||
|
gsSP1Triangle(5, 6, 7, 0),
|
||||||
|
gsSP1Triangle(7, 8, 5, 0),
|
||||||
|
gsSP1Triangle(7, 9, 8, 0),
|
||||||
|
gsSP1Triangle(8, 10, 5, 0),
|
||||||
|
gsSP1Triangle(11, 5, 10, 0),
|
||||||
|
gsSP1Triangle(12, 11, 10, 0),
|
||||||
|
gsSP1Triangle(10, 13, 12, 0),
|
||||||
|
gsSP1Triangle(12, 14, 11, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 45, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(6, 7, 4, 0),
|
||||||
|
gsSP1Triangle(6, 8, 7, 0),
|
||||||
|
gsSP1Triangle(9, 10, 11, 0),
|
||||||
|
gsSP1Triangle(9, 12, 10, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 61, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 3, 1, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 6, 7, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 11, 9, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 15, 13, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 77, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 3, 1, 0),
|
||||||
|
gsSP1Triangle(3, 4, 1, 0),
|
||||||
|
gsSP1Triangle(3, 5, 4, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(6, 9, 7, 0),
|
||||||
|
gsSP1Triangle(7, 9, 10, 0),
|
||||||
|
gsSP1Triangle(7, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 93, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 0, 3, 0),
|
||||||
|
gsSP1Triangle(4, 3, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(6, 8, 9, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(10, 12, 13, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 107, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 3, 1, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 7, 5, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 123, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(7, 4, 6, 0),
|
||||||
|
gsSP1Triangle(6, 8, 7, 0),
|
||||||
|
gsSP1Triangle(8, 6, 9, 0),
|
||||||
|
gsSP1Triangle(10, 8, 9, 0),
|
||||||
|
gsSP1Triangle(11, 10, 9, 0),
|
||||||
|
gsSP1Triangle(9, 12, 11, 0),
|
||||||
|
gsSP1Triangle(12, 13, 11, 0),
|
||||||
|
gsSP1Triangle(12, 14, 13, 0),
|
||||||
|
gsSP1Triangle(13, 15, 11, 0),
|
||||||
|
gsSP1Triangle(13, 7, 15, 0),
|
||||||
|
gsSP1Triangle(7, 13, 4, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 139, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 0, 2, 0),
|
||||||
|
gsSP1Triangle(3, 2, 4, 0),
|
||||||
|
gsSP1Triangle(5, 3, 4, 0),
|
||||||
|
gsSP1Triangle(6, 5, 4, 0),
|
||||||
|
gsSP1Triangle(4, 7, 6, 0),
|
||||||
|
gsSP1Triangle(7, 8, 6, 0),
|
||||||
|
gsSP1Triangle(8, 9, 6, 0),
|
||||||
|
gsSP1Triangle(8, 10, 9, 0),
|
||||||
|
gsSP1Triangle(8, 11, 10, 0),
|
||||||
|
gsSP1Triangle(10, 11, 0, 0),
|
||||||
|
gsSP1Triangle(3, 10, 0, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 155, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(2, 3, 0, 0),
|
||||||
|
gsSP1Triangle(4, 0, 3, 0),
|
||||||
|
gsSP1Triangle(3, 5, 4, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(6, 8, 9, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(10, 12, 13, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 169, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 3, 1, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 6, 7, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 15, 13, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 185, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 0, 2, 0),
|
||||||
|
gsSP1Triangle(2, 4, 3, 0),
|
||||||
|
gsSP1Triangle(5, 4, 2, 0),
|
||||||
|
gsSP1Triangle(5, 2, 6, 0),
|
||||||
|
gsSP1Triangle(7, 8, 9, 0),
|
||||||
|
gsSP1Triangle(9, 10, 7, 0),
|
||||||
|
gsSP1Triangle(9, 11, 10, 0),
|
||||||
|
gsSP1Triangle(7, 10, 12, 0),
|
||||||
|
gsSP1Triangle(7, 12, 13, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 199, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(3, 2, 4, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(8, 9, 6, 0),
|
||||||
|
gsSP1Triangle(8, 10, 9, 0),
|
||||||
|
gsSP1Triangle(9, 10, 11, 0),
|
||||||
|
gsSP1Triangle(9, 11, 12, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_1 + 215, 11, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(3, 5, 6, 0),
|
||||||
|
gsSP1Triangle(7, 8, 9, 0),
|
||||||
|
gsSP1Triangle(7, 9, 10, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx ak47_Arm_mesh_layer_1_vtx_2[4] = {
|
||||||
|
{{ {218, 29, -20}, 0, {-37, 828}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 29, -24}, 0, {58, 828}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 35, -20}, 0, {-37, 664}, {125, 0, 236, 255} }},
|
||||||
|
{{ {218, 35, -24}, 0, {58, 664}, {125, 0, 236, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx ak47_Arm_mesh_layer_1_tri_2[] = {
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_2 + 0, 4, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 2, 1, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx ak47_Arm_mesh_layer_1_vtx_3[71] = {
|
||||||
|
{{ {73, 18, 1}, 0, {-125, 678}, {183, 188, 177, 255} }},
|
||||||
|
{{ {75, 15, 1}, 0, {-218, 619}, {183, 188, 177, 255} }},
|
||||||
|
{{ {72, 18, 2}, 0, {-125, 724}, {183, 188, 177, 255} }},
|
||||||
|
{{ {75, 15, 1}, 0, {-10, 1210}, {106, 68, 239, 255} }},
|
||||||
|
{{ {73, 18, 1}, 0, {21, 1117}, {106, 68, 239, 255} }},
|
||||||
|
{{ {73, 18, 3}, 0, {-40, 1117}, {106, 68, 239, 255} }},
|
||||||
|
{{ {75, 15, 1}, 0, {186, 619}, {211, 188, 97, 255} }},
|
||||||
|
{{ {73, 18, 3}, 0, {93, 678}, {211, 188, 97, 255} }},
|
||||||
|
{{ {72, 18, 2}, 0, {93, 724}, {211, 188, 97, 255} }},
|
||||||
|
{{ {70, 14, 4}, 0, {-67, 768}, {0, 129, 0, 255} }},
|
||||||
|
{{ {70, 14, 1}, 0, {35, 768}, {0, 129, 0, 255} }},
|
||||||
|
{{ {79, 14, -1}, 0, {35, 512}, {0, 129, 0, 255} }},
|
||||||
|
{{ {79, 14, 3}, 0, {-67, 512}, {0, 129, 0, 255} }},
|
||||||
|
{{ {67, 18, 5}, 0, {35, 1136}, {166, 167, 14, 255} }},
|
||||||
|
{{ {70, 14, 1}, 0, {-67, 1238}, {166, 167, 14, 255} }},
|
||||||
|
{{ {70, 14, 4}, 0, {35, 1238}, {166, 167, 14, 255} }},
|
||||||
|
{{ {67, 18, 5}, 0, {35, 1136}, {166, 167, 14, 255} }},
|
||||||
|
{{ {66, 18, 1}, 0, {-67, 1136}, {166, 167, 14, 255} }},
|
||||||
|
{{ {70, 14, 1}, 0, {-67, 1238}, {166, 167, 14, 255} }},
|
||||||
|
{{ {70, 15, 2}, 0, {-16, 760}, {7, 118, 45, 255} }},
|
||||||
|
{{ {70, 14, 4}, 0, {35, 768}, {7, 118, 45, 255} }},
|
||||||
|
{{ {79, 14, 3}, 0, {35, 512}, {7, 118, 45, 255} }},
|
||||||
|
{{ {79, 15, 1}, 0, {-16, 522}, {7, 118, 45, 255} }},
|
||||||
|
{{ {67, 18, 3}, 0, {-16, 1128}, {91, 83, 32, 255} }},
|
||||||
|
{{ {67, 18, 5}, 0, {-67, 1136}, {91, 83, 32, 255} }},
|
||||||
|
{{ {70, 14, 4}, 0, {-67, 1238}, {91, 83, 32, 255} }},
|
||||||
|
{{ {70, 15, 2}, 0, {-16, 1218}, {91, 83, 32, 255} }},
|
||||||
|
{{ {79, 14, 3}, 0, {-67, 1238}, {97, 176, 241, 255} }},
|
||||||
|
{{ {79, 14, -1}, 0, {35, 1238}, {97, 176, 241, 255} }},
|
||||||
|
{{ {82, 18, -1}, 0, {35, 1136}, {97, 176, 241, 255} }},
|
||||||
|
{{ {82, 18, 2}, 0, {-67, 1136}, {97, 176, 241, 255} }},
|
||||||
|
{{ {79, 15, 1}, 0, {-16, 1218}, {172, 75, 60, 255} }},
|
||||||
|
{{ {79, 14, 3}, 0, {35, 1238}, {172, 75, 60, 255} }},
|
||||||
|
{{ {82, 18, 2}, 0, {35, 1136}, {172, 75, 60, 255} }},
|
||||||
|
{{ {81, 18, 1}, 0, {-16, 1129}, {172, 75, 60, 255} }},
|
||||||
|
{{ {70, 14, 1}, 0, {-67, 768}, {249, 118, 211, 255} }},
|
||||||
|
{{ {79, 15, 1}, 0, {-16, 522}, {249, 118, 211, 255} }},
|
||||||
|
{{ {79, 14, -1}, 0, {-67, 512}, {249, 118, 211, 255} }},
|
||||||
|
{{ {70, 15, 2}, 0, {-16, 760}, {249, 118, 211, 255} }},
|
||||||
|
{{ {79, 14, -1}, 0, {-67, 1238}, {158, 75, 225, 255} }},
|
||||||
|
{{ {79, 15, 1}, 0, {-16, 1218}, {158, 75, 225, 255} }},
|
||||||
|
{{ {81, 18, 1}, 0, {-16, 1129}, {158, 75, 225, 255} }},
|
||||||
|
{{ {82, 18, -1}, 0, {-67, 1136}, {158, 75, 225, 255} }},
|
||||||
|
{{ {66, 18, 1}, 0, {35, 1136}, {77, 83, 197, 255} }},
|
||||||
|
{{ {67, 18, 3}, 0, {-16, 1128}, {77, 83, 197, 255} }},
|
||||||
|
{{ {70, 15, 2}, 0, {-16, 1218}, {77, 83, 197, 255} }},
|
||||||
|
{{ {70, 14, 1}, 0, {35, 1238}, {77, 83, 197, 255} }},
|
||||||
|
{{ {82, 18, -1}, 0, {-67, 1136}, {132, 0, 229, 255} }},
|
||||||
|
{{ {81, 18, 1}, 0, {-16, 1129}, {132, 0, 229, 255} }},
|
||||||
|
{{ {81, 25, 1}, 0, {-16, 944}, {132, 0, 229, 255} }},
|
||||||
|
{{ {82, 25, -1}, 0, {-67, 944}, {132, 0, 229, 255} }},
|
||||||
|
{{ {81, 18, 1}, 0, {-16, 1129}, {146, 0, 64, 255} }},
|
||||||
|
{{ {82, 18, 2}, 0, {35, 1136}, {146, 0, 64, 255} }},
|
||||||
|
{{ {82, 25, 2}, 0, {35, 944}, {146, 0, 64, 255} }},
|
||||||
|
{{ {81, 25, 1}, 0, {-16, 944}, {146, 0, 64, 255} }},
|
||||||
|
{{ {82, 18, 2}, 0, {-67, 1136}, {125, 0, 236, 255} }},
|
||||||
|
{{ {82, 18, -1}, 0, {35, 1136}, {125, 0, 236, 255} }},
|
||||||
|
{{ {82, 25, -1}, 0, {35, 944}, {125, 0, 236, 255} }},
|
||||||
|
{{ {82, 25, 2}, 0, {-67, 944}, {125, 0, 236, 255} }},
|
||||||
|
{{ {73, 24, 3}, 0, {-52, 678}, {203, 0, 115, 255} }},
|
||||||
|
{{ {72, 24, 2}, 0, {-52, 724}, {203, 0, 115, 255} }},
|
||||||
|
{{ {72, 18, 2}, 0, {93, 724}, {203, 0, 115, 255} }},
|
||||||
|
{{ {73, 18, 3}, 0, {93, 678}, {203, 0, 115, 255} }},
|
||||||
|
{{ {72, 24, 2}, 0, {20, 724}, {170, 0, 163, 255} }},
|
||||||
|
{{ {73, 24, 1}, 0, {20, 678}, {170, 0, 163, 255} }},
|
||||||
|
{{ {73, 18, 1}, 0, {-125, 678}, {170, 0, 163, 255} }},
|
||||||
|
{{ {72, 18, 2}, 0, {-125, 724}, {170, 0, 163, 255} }},
|
||||||
|
{{ {73, 18, 1}, 0, {21, 1117}, {125, 0, 236, 255} }},
|
||||||
|
{{ {73, 24, 1}, 0, {21, 972}, {125, 0, 236, 255} }},
|
||||||
|
{{ {73, 24, 3}, 0, {-40, 972}, {125, 0, 236, 255} }},
|
||||||
|
{{ {73, 18, 3}, 0, {-40, 1117}, {125, 0, 236, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx ak47_Arm_mesh_layer_1_tri_3[] = {
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_3 + 0, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(9, 10, 11, 0),
|
||||||
|
gsSP1Triangle(9, 11, 12, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_3 + 16, 15, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(3, 5, 6, 0),
|
||||||
|
gsSP1Triangle(7, 8, 9, 0),
|
||||||
|
gsSP1Triangle(7, 9, 10, 0),
|
||||||
|
gsSP1Triangle(11, 12, 13, 0),
|
||||||
|
gsSP1Triangle(11, 13, 14, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_3 + 31, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 7, 5, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_3 + 47, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 6, 7, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_3 + 63, 8, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 6, 7, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx ak47_Arm_mesh_layer_1_vtx_4[60] = {
|
||||||
|
{{ {91, 22, -4}, 0, {-13, 165}, {236, 0, 131, 255} }},
|
||||||
|
{{ {90, 28, -4}, 0, {150, 177}, {236, 0, 131, 255} }},
|
||||||
|
{{ {108, 29, -7}, 0, {185, -310}, {236, 0, 131, 255} }},
|
||||||
|
{{ {108, 24, -7}, 0, {22, -322}, {236, 0, 131, 255} }},
|
||||||
|
{{ {111, 8, -7}, 0, {-419, -402}, {236, 0, 131, 255} }},
|
||||||
|
{{ {103, -14, -6}, 0, {-1042, -187}, {236, 0, 131, 255} }},
|
||||||
|
{{ {118, -6, -8}, 0, {-813, -618}, {236, 0, 131, 255} }},
|
||||||
|
{{ {129, -17, -10}, 0, {-1108, -931}, {236, 0, 131, 255} }},
|
||||||
|
{{ {117, -29, -8}, 0, {-1454, -587}, {236, 0, 131, 255} }},
|
||||||
|
{{ {94, 3, -5}, 0, {-548, 68}, {236, 0, 131, 255} }},
|
||||||
|
{{ {91, 22, -4}, 0, {-101, 1005}, {131, 247, 20, 255} }},
|
||||||
|
{{ {91, 28, 2}, 0, {69, 842}, {131, 247, 20, 255} }},
|
||||||
|
{{ {90, 28, -4}, 0, {-101, 842}, {131, 247, 20, 255} }},
|
||||||
|
{{ {92, 22, 2}, 0, {69, 1005}, {131, 247, 20, 255} }},
|
||||||
|
{{ {108, 29, -7}, 0, {-101, -310}, {247, 127, 1, 255} }},
|
||||||
|
{{ {90, 28, -4}, 0, {-101, 177}, {247, 127, 1, 255} }},
|
||||||
|
{{ {91, 28, 2}, 0, {69, 177}, {247, 127, 1, 255} }},
|
||||||
|
{{ {109, 29, -1}, 0, {69, -310}, {247, 127, 1, 255} }},
|
||||||
|
{{ {111, 8, -7}, 0, {69, 1411}, {110, 61, 239, 255} }},
|
||||||
|
{{ {119, -6, -2}, 0, {-101, 1805}, {110, 61, 239, 255} }},
|
||||||
|
{{ {118, -6, -8}, 0, {69, 1805}, {110, 61, 239, 255} }},
|
||||||
|
{{ {112, 8, -1}, 0, {-101, 1411}, {110, 61, 239, 255} }},
|
||||||
|
{{ {119, -6, -2}, 0, {69, -618}, {86, 92, 242, 255} }},
|
||||||
|
{{ {129, -17, -10}, 0, {-101, -931}, {86, 92, 242, 255} }},
|
||||||
|
{{ {118, -6, -8}, 0, {-101, -618}, {86, 92, 242, 255} }},
|
||||||
|
{{ {130, -17, -4}, 0, {69, -931}, {86, 92, 242, 255} }},
|
||||||
|
{{ {109, 24, -1}, 0, {-101, 970}, {125, 9, 236, 255} }},
|
||||||
|
{{ {108, 24, -7}, 0, {69, 970}, {125, 9, 236, 255} }},
|
||||||
|
{{ {108, 29, -7}, 0, {69, 807}, {125, 9, 236, 255} }},
|
||||||
|
{{ {109, 29, -1}, 0, {-101, 807}, {125, 9, 236, 255} }},
|
||||||
|
{{ {91, 22, -4}, 0, {-101, 1005}, {133, 233, 20, 255} }},
|
||||||
|
{{ {94, 3, -5}, 0, {-101, 1540}, {133, 233, 20, 255} }},
|
||||||
|
{{ {95, 3, 1}, 0, {69, 1540}, {133, 233, 20, 255} }},
|
||||||
|
{{ {92, 22, 2}, 0, {69, 1005}, {133, 233, 20, 255} }},
|
||||||
|
{{ {95, 3, 1}, 0, {69, 1540}, {145, 198, 18, 255} }},
|
||||||
|
{{ {94, 3, -5}, 0, {-101, 1540}, {145, 198, 18, 255} }},
|
||||||
|
{{ {103, -14, -6}, 0, {-101, 2034}, {145, 198, 18, 255} }},
|
||||||
|
{{ {104, -14, 0}, 0, {69, 2034}, {145, 198, 18, 255} }},
|
||||||
|
{{ {103, -14, -6}, 0, {-101, 2034}, {166, 168, 14, 255} }},
|
||||||
|
{{ {117, -29, -8}, 0, {-101, 2446}, {166, 168, 14, 255} }},
|
||||||
|
{{ {118, -29, -2}, 0, {69, 2446}, {166, 168, 14, 255} }},
|
||||||
|
{{ {104, -14, 0}, 0, {69, 2034}, {166, 168, 14, 255} }},
|
||||||
|
{{ {117, -29, -8}, 0, {69, 2446}, {89, 166, 242, 255} }},
|
||||||
|
{{ {130, -17, -4}, 0, {-101, 2100}, {89, 166, 242, 255} }},
|
||||||
|
{{ {118, -29, -2}, 0, {-101, 2446}, {89, 166, 242, 255} }},
|
||||||
|
{{ {129, -17, -10}, 0, {69, 2100}, {89, 166, 242, 255} }},
|
||||||
|
{{ {118, -29, -2}, 0, {1422, -587}, {20, 0, 125, 255} }},
|
||||||
|
{{ {130, -17, -4}, 0, {1076, -931}, {20, 0, 125, 255} }},
|
||||||
|
{{ {119, -6, -2}, 0, {781, -618}, {20, 0, 125, 255} }},
|
||||||
|
{{ {112, 8, -1}, 0, {387, -402}, {20, 0, 125, 255} }},
|
||||||
|
{{ {109, 24, -1}, 0, {-54, -322}, {20, 0, 125, 255} }},
|
||||||
|
{{ {91, 28, 2}, 0, {-182, 177}, {20, 0, 125, 255} }},
|
||||||
|
{{ {109, 29, -1}, 0, {-217, -310}, {20, 0, 125, 255} }},
|
||||||
|
{{ {95, 3, 1}, 0, {516, 68}, {20, 0, 125, 255} }},
|
||||||
|
{{ {92, 22, 2}, 0, {-19, 165}, {20, 0, 125, 255} }},
|
||||||
|
{{ {104, -14, 0}, 0, {1010, -187}, {20, 0, 125, 255} }},
|
||||||
|
{{ {108, 24, -7}, 0, {69, 970}, {123, 23, 236, 255} }},
|
||||||
|
{{ {109, 24, -1}, 0, {-101, 970}, {123, 23, 236, 255} }},
|
||||||
|
{{ {112, 8, -1}, 0, {-101, 1411}, {123, 23, 236, 255} }},
|
||||||
|
{{ {111, 8, -7}, 0, {69, 1411}, {123, 23, 236, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx ak47_Arm_mesh_layer_1_tri_4[] = {
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_4 + 0, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(0, 3, 4, 0),
|
||||||
|
gsSP1Triangle(5, 0, 4, 0),
|
||||||
|
gsSP1Triangle(4, 6, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 5, 0),
|
||||||
|
gsSP1Triangle(7, 8, 5, 0),
|
||||||
|
gsSP1Triangle(5, 9, 0, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(10, 13, 11, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_4 + 14, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 7, 5, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 11, 9, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_4 + 30, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 6, 7, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 15, 13, 0),
|
||||||
|
gsSPVertex(ak47_Arm_mesh_layer_1_vtx_4 + 46, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(0, 3, 4, 0),
|
||||||
|
gsSP1Triangle(4, 5, 0, 0),
|
||||||
|
gsSP1Triangle(4, 6, 5, 0),
|
||||||
|
gsSP1Triangle(5, 7, 0, 0),
|
||||||
|
gsSP1Triangle(5, 8, 7, 0),
|
||||||
|
gsSP1Triangle(7, 9, 0, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(10, 12, 13, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Gfx mat_ak47_wood[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPSetLights1(ak47_wood_lights),
|
||||||
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, ak47_wood_rgba16),
|
||||||
|
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
|
||||||
|
gsDPLoadBlock(7, 0, 0, 1023, 256),
|
||||||
|
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0),
|
||||||
|
gsDPSetTileSize(0, 0, 0, 124, 124),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_ak47_gray[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPSetLights1(ak47_gray_lights),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_ak47_black_layer1[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
gsDPSetRenderMode(G_RM_ZB_OPA_SURF, G_RM_ZB_OPA_SURF2),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_revert_ak47_black_layer1[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_ak47_darkgray[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPSetLights1(ak47_darkgray_lights),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_ak47_darkergray[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPSetLights1(ak47_darkergray_lights),
|
||||||
|
gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 1, ak47_noise_i8),
|
||||||
|
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
|
||||||
|
gsDPLoadBlock(7, 0, 0, 511, 512),
|
||||||
|
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 4, 0, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0),
|
||||||
|
gsDPSetTileSize(0, 0, 0, 124, 124),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx ak47_Arm_mesh_layer_1[] = {
|
||||||
|
gsSPDisplayList(mat_ak47_wood),
|
||||||
|
gsSPDisplayList(ak47_Arm_mesh_layer_1_tri_0),
|
||||||
|
gsSPDisplayList(mat_ak47_gray),
|
||||||
|
gsSPDisplayList(ak47_Arm_mesh_layer_1_tri_1),
|
||||||
|
gsSPDisplayList(mat_ak47_black_layer1),
|
||||||
|
gsSPDisplayList(ak47_Arm_mesh_layer_1_tri_2),
|
||||||
|
gsSPDisplayList(mat_revert_ak47_black_layer1),
|
||||||
|
gsSPDisplayList(mat_ak47_darkgray),
|
||||||
|
gsSPDisplayList(ak47_Arm_mesh_layer_1_tri_3),
|
||||||
|
gsSPDisplayList(mat_ak47_darkergray),
|
||||||
|
gsSPDisplayList(ak47_Arm_mesh_layer_1_tri_4),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx ak47_material_revert_render_settings[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsSPSetGeometryMode(G_LIGHTING),
|
||||||
|
gsSPClearGeometryMode(G_TEXTURE_GEN),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 0),
|
||||||
|
gsDPSetEnvColor(255, 255, 255, 255),
|
||||||
|
gsDPSetAlphaCompare(G_AC_NONE),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
BIN
mods/gun-mod/actors/ak47/noise.i8.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
mods/gun-mod/actors/ak47/wood.rgba16.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
mods/gun-mod/actors/ak47_geo.bin
Normal file
BIN
mods/gun-mod/actors/arm/custom_mario_metal_light.rgba16.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
mods/gun-mod/actors/arm/custom_mario_metal_shade.rgba16.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
58
mods/gun-mod/actors/arm/geo.inc.c
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
#include "src/game/envfx_snow.h"
|
||||||
|
|
||||||
|
const GeoLayout arm_Metal_Arm_Armature[] = {
|
||||||
|
GEO_TRANSLATE_ROTATE(LAYER_OPAQUE, 0, -43, 0, 0, 0, 0),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, -2, 0, arm_Switch_Option_Upper_Arm_Metal_mesh_layer_1),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 25, 0, 0, arm_Switch_Option_Arm_Metal_mesh_layer_1),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_RETURN(),
|
||||||
|
};
|
||||||
|
const GeoLayout arm_Vanish_Arm_Armature[] = {
|
||||||
|
GEO_TRANSLATE_ROTATE(LAYER_OPAQUE, 0, -43, 0, 0, 0, 0),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, -2, 0, arm_Switch_Option_Upper_Arm_Vanish_mesh_layer_5),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 25, 0, 0, arm_Switch_Option_Arm_Vanish_mesh_layer_5),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_RETURN(),
|
||||||
|
};
|
||||||
|
const GeoLayout arm_Vanish_Metal_Armature[] = {
|
||||||
|
GEO_TRANSLATE_ROTATE(LAYER_OPAQUE, 0, -43, 0, 0, 0, 0),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 0, -2, 0, arm_Switch_Option_Upper_Arm_Vanish_Metal_mesh_layer_5),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_TRANSPARENT, 25, 0, 0, arm_Switch_Option_Arm_Vanish_Metal_mesh_layer_5),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_RETURN(),
|
||||||
|
};
|
||||||
|
const GeoLayout arm_geo[] = {
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_SCALE(LAYER_FORCE, 65536),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ASM(LAYER_OPAQUE, geo_mario_set_player_colors),
|
||||||
|
GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors),
|
||||||
|
GEO_SWITCH_CASE(4, geo_switch_anim_state),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, -45, 0, arm_Upper_Arm_mesh_layer_1),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 25, 0, 0, arm_Arm_mesh_layer_1),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_BRANCH(1, arm_Metal_Arm_Armature),
|
||||||
|
GEO_BRANCH(1, arm_Vanish_Arm_Armature),
|
||||||
|
GEO_BRANCH(1, arm_Vanish_Metal_Armature),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_DISPLAY_LIST(LAYER_OPAQUE, arm_material_revert_render_settings),
|
||||||
|
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, arm_material_revert_render_settings),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_END(),
|
||||||
|
};
|
51
mods/gun-mod/actors/arm/geo_header.h
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
extern const GeoLayout arm_Metal_Arm_Armature[];
|
||||||
|
extern const GeoLayout arm_Vanish_Arm_Armature[];
|
||||||
|
extern const GeoLayout arm_Vanish_Metal_Armature[];
|
||||||
|
extern const GeoLayout arm_geo[];
|
||||||
|
extern Lights1 arm_shirt_lights;
|
||||||
|
extern Lights1 arm_gloves_lights;
|
||||||
|
extern Lights1 arm_metal_lights;
|
||||||
|
extern Lights1 arm_shirt2_lights;
|
||||||
|
extern Lights1 arm_gloves2_lights;
|
||||||
|
extern Lights1 arm_metal2_lights;
|
||||||
|
extern u8 arm_custom_mario_metal_shade_rgba16_rgba16[];
|
||||||
|
extern u8 arm_custom_mario_metal_light_rgba16_rgba16[];
|
||||||
|
extern Vtx arm_Upper_Arm_mesh_layer_1_vtx_0[32];
|
||||||
|
extern Gfx arm_Upper_Arm_mesh_layer_1_tri_0[];
|
||||||
|
extern Vtx arm_Arm_mesh_layer_1_vtx_0[36];
|
||||||
|
extern Gfx arm_Arm_mesh_layer_1_tri_0[];
|
||||||
|
extern Vtx arm_Arm_mesh_layer_1_vtx_1[16];
|
||||||
|
extern Gfx arm_Arm_mesh_layer_1_tri_1[];
|
||||||
|
extern Vtx arm_Switch_Option_Upper_Arm_Metal_mesh_layer_1_vtx_0[32];
|
||||||
|
extern Gfx arm_Switch_Option_Upper_Arm_Metal_mesh_layer_1_tri_0[];
|
||||||
|
extern Vtx arm_Switch_Option_Arm_Metal_mesh_layer_1_vtx_0[52];
|
||||||
|
extern Gfx arm_Switch_Option_Arm_Metal_mesh_layer_1_tri_0[];
|
||||||
|
extern Vtx arm_Switch_Option_Upper_Arm_Vanish_mesh_layer_5_vtx_0[32];
|
||||||
|
extern Gfx arm_Switch_Option_Upper_Arm_Vanish_mesh_layer_5_tri_0[];
|
||||||
|
extern Vtx arm_Switch_Option_Arm_Vanish_mesh_layer_5_vtx_0[36];
|
||||||
|
extern Gfx arm_Switch_Option_Arm_Vanish_mesh_layer_5_tri_0[];
|
||||||
|
extern Vtx arm_Switch_Option_Arm_Vanish_mesh_layer_5_vtx_1[16];
|
||||||
|
extern Gfx arm_Switch_Option_Arm_Vanish_mesh_layer_5_tri_1[];
|
||||||
|
extern Vtx arm_Switch_Option_Upper_Arm_Vanish_Metal_mesh_layer_5_vtx_0[32];
|
||||||
|
extern Gfx arm_Switch_Option_Upper_Arm_Vanish_Metal_mesh_layer_5_tri_0[];
|
||||||
|
extern Vtx arm_Switch_Option_Arm_Vanish_Metal_mesh_layer_5_vtx_0[52];
|
||||||
|
extern Gfx arm_Switch_Option_Arm_Vanish_Metal_mesh_layer_5_tri_0[];
|
||||||
|
extern Gfx mat_arm_shirt[];
|
||||||
|
extern Gfx mat_arm_gloves[];
|
||||||
|
extern Gfx mat_arm_metal[];
|
||||||
|
extern Gfx mat_revert_arm_metal[];
|
||||||
|
extern Gfx mat_arm_shirt2[];
|
||||||
|
extern Gfx mat_revert_arm_shirt2[];
|
||||||
|
extern Gfx mat_arm_gloves2[];
|
||||||
|
extern Gfx mat_revert_arm_gloves2[];
|
||||||
|
extern Gfx mat_arm_metal2[];
|
||||||
|
extern Gfx mat_revert_arm_metal2[];
|
||||||
|
extern Gfx arm_Upper_Arm_mesh_layer_1[];
|
||||||
|
extern Gfx arm_Arm_mesh_layer_1[];
|
||||||
|
extern Gfx arm_Switch_Option_Upper_Arm_Metal_mesh_layer_1[];
|
||||||
|
extern Gfx arm_Switch_Option_Arm_Metal_mesh_layer_1[];
|
||||||
|
extern Gfx arm_Switch_Option_Upper_Arm_Vanish_mesh_layer_5[];
|
||||||
|
extern Gfx arm_Switch_Option_Arm_Vanish_mesh_layer_5[];
|
||||||
|
extern Gfx arm_Switch_Option_Upper_Arm_Vanish_Metal_mesh_layer_5[];
|
||||||
|
extern Gfx arm_Switch_Option_Arm_Vanish_Metal_mesh_layer_5[];
|
||||||
|
extern Gfx arm_material_revert_render_settings[];
|
1096
mods/gun-mod/actors/arm/model.inc.c
Normal file
BIN
mods/gun-mod/actors/arm_geo.bin
Normal file
10
mods/gun-mod/actors/arrow/geo.inc.c
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#include "src/game/envfx_snow.h"
|
||||||
|
|
||||||
|
const GeoLayout arrow_geo[] = {
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_BILLBOARD_WITH_PARAMS_AND_DL(LAYER_OPAQUE, 0, 0, 0, arrow_triangle_mesh_layer_1),
|
||||||
|
GEO_DISPLAY_LIST(LAYER_OPAQUE, arrow_material_revert_render_settings),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_END(),
|
||||||
|
};
|
7
mods/gun-mod/actors/arrow/geo_header.h
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
extern const GeoLayout arrow_geo[];
|
||||||
|
extern Vtx arrow_triangle_mesh_layer_1_vtx_0[3];
|
||||||
|
extern Gfx arrow_triangle_mesh_layer_1_tri_0[];
|
||||||
|
extern Gfx mat_arrow_white[];
|
||||||
|
extern Gfx mat_revert_arrow_white[];
|
||||||
|
extern Gfx arrow_triangle_mesh_layer_1[];
|
||||||
|
extern Gfx arrow_material_revert_render_settings[];
|
45
mods/gun-mod/actors/arrow/model.inc.c
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
Vtx arrow_triangle_mesh_layer_1_vtx_0[3] = {
|
||||||
|
{{ {-40, 58, 0}, 0, {-16, 1008}, {0, 0, 129, 255} }},
|
||||||
|
{{ {40, 58, 0}, 0, {1008, 1008}, {0, 0, 129, 255} }},
|
||||||
|
{{ {0, 0, 0}, 0, {-16, -16}, {0, 0, 129, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx arrow_triangle_mesh_layer_1_tri_0[] = {
|
||||||
|
gsSPVertex(arrow_triangle_mesh_layer_1_vtx_0 + 0, 3, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Gfx mat_arrow_white[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0),
|
||||||
|
gsSPClearGeometryMode(G_CULL_BACK),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_revert_arrow_white[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsSPSetGeometryMode(G_CULL_BACK),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx arrow_triangle_mesh_layer_1[] = {
|
||||||
|
gsSPDisplayList(mat_arrow_white),
|
||||||
|
gsSPDisplayList(arrow_triangle_mesh_layer_1_tri_0),
|
||||||
|
gsSPDisplayList(mat_revert_arrow_white),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx arrow_material_revert_render_settings[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsSPSetGeometryMode(G_LIGHTING),
|
||||||
|
gsSPClearGeometryMode(G_TEXTURE_GEN),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 0),
|
||||||
|
gsDPSetEnvColor(255, 255, 255, 255),
|
||||||
|
gsDPSetAlphaCompare(G_AC_NONE),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
BIN
mods/gun-mod/actors/arrow_geo.bin
Normal file
BIN
mods/gun-mod/actors/bullet_hole/bullet_hole.ia8.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
10
mods/gun-mod/actors/bullet_hole/geo.inc.c
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#include "src/game/envfx_snow.h"
|
||||||
|
|
||||||
|
const GeoLayout bullet_hole_geo[] = {
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_DISPLAY_LIST(LAYER_ALPHA, bullet_hole_bullet_hole_mesh_layer_4),
|
||||||
|
GEO_DISPLAY_LIST(LAYER_ALPHA, bullet_hole_material_revert_render_settings),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_END(),
|
||||||
|
};
|
9
mods/gun-mod/actors/bullet_hole/geo_header.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
extern const GeoLayout bullet_hole_geo[];
|
||||||
|
extern Lights1 bullet_hole_bullet_hole_lights;
|
||||||
|
extern u8 bullet_hole_bullet_hole_ia8[];
|
||||||
|
extern Vtx bullet_hole_bullet_hole_mesh_layer_4_vtx_0[4];
|
||||||
|
extern Gfx bullet_hole_bullet_hole_mesh_layer_4_tri_0[];
|
||||||
|
extern Gfx mat_bullet_hole_bullet_hole[];
|
||||||
|
extern Gfx mat_revert_bullet_hole_bullet_hole[];
|
||||||
|
extern Gfx bullet_hole_bullet_hole_mesh_layer_4[];
|
||||||
|
extern Gfx bullet_hole_material_revert_render_settings[];
|
62
mods/gun-mod/actors/bullet_hole/model.inc.c
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
Lights1 bullet_hole_bullet_hole_lights = gdSPDefLights1(
|
||||||
|
0x7F, 0x7F, 0x7F,
|
||||||
|
0xFF, 0xFF, 0xFF, 0x28, 0x28, 0x28);
|
||||||
|
|
||||||
|
Gfx bullet_hole_bullet_hole_ia8_aligner[] = {gsSPEndDisplayList()};
|
||||||
|
u8 bullet_hole_bullet_hole_ia8[] = {
|
||||||
|
#include "actors/bullet_hole/bullet_hole.ia8.inc.c"
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx bullet_hole_bullet_hole_mesh_layer_4_vtx_0[4] = {
|
||||||
|
{{ {-22, 1, 22}, 0, {-16, 2032}, {0, 127, 0, 255} }},
|
||||||
|
{{ {22, 1, 22}, 0, {2032, 2032}, {0, 127, 0, 255} }},
|
||||||
|
{{ {22, 1, -22}, 0, {2032, -16}, {0, 127, 0, 255} }},
|
||||||
|
{{ {-22, 1, -22}, 0, {-16, -16}, {0, 127, 0, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx bullet_hole_bullet_hole_mesh_layer_4_tri_0[] = {
|
||||||
|
gsSPVertex(bullet_hole_bullet_hole_mesh_layer_4_vtx_0 + 0, 4, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Gfx mat_bullet_hole_bullet_hole[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, SHADE, 0, TEXEL0, 0, ENVIRONMENT, 0),
|
||||||
|
gsSPClearGeometryMode(G_CULL_BACK),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPSetLights1(bullet_hole_bullet_hole_lights),
|
||||||
|
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_8b_LOAD_BLOCK, 1, bullet_hole_bullet_hole_ia8),
|
||||||
|
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_8b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
|
||||||
|
gsDPLoadBlock(7, 0, 0, 2047, 256),
|
||||||
|
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_8b, 8, 0, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 6, 0),
|
||||||
|
gsDPSetTileSize(0, 0, 0, 252, 252),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_revert_bullet_hole_bullet_hole[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsSPSetGeometryMode(G_CULL_BACK),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx bullet_hole_bullet_hole_mesh_layer_4[] = {
|
||||||
|
gsSPDisplayList(mat_bullet_hole_bullet_hole),
|
||||||
|
gsSPDisplayList(bullet_hole_bullet_hole_mesh_layer_4_tri_0),
|
||||||
|
gsSPDisplayList(mat_revert_bullet_hole_bullet_hole),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx bullet_hole_material_revert_render_settings[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsSPSetGeometryMode(G_LIGHTING),
|
||||||
|
gsSPClearGeometryMode(G_TEXTURE_GEN),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 0),
|
||||||
|
gsDPSetEnvColor(255, 255, 255, 255),
|
||||||
|
gsDPSetAlphaCompare(G_AC_NONE),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
BIN
mods/gun-mod/actors/bullet_hole_geo.bin
Normal file
24
mods/gun-mod/actors/magnum/geo.inc.c
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#include "src/game/envfx_snow.h"
|
||||||
|
|
||||||
|
const GeoLayout magnum_geo[] = {
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_SCALE(LAYER_FORCE, 65536),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ASM(0, geo_mario_set_player_colors),
|
||||||
|
GEO_ASM(8, geo_mario_set_player_colors),
|
||||||
|
GEO_SWITCH_CASE(0, geo_switch_anim_state),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, -45, 0, NULL),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 25, 0, 0, magnum_Arm_mesh_layer_1),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_DISPLAY_LIST(LAYER_OPAQUE, magnum_material_revert_render_settings),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_END(),
|
||||||
|
};
|
18
mods/gun-mod/actors/magnum/geo_header.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
extern const GeoLayout magnum_geo[];
|
||||||
|
extern Lights1 magnum_darkergray_lights;
|
||||||
|
extern Lights1 magnum_metal_lights;
|
||||||
|
extern u8 magnum_noise_i8[];
|
||||||
|
extern u8 magnum_plat_rgba16[];
|
||||||
|
extern Vtx magnum_Arm_mesh_layer_1_vtx_0[64];
|
||||||
|
extern Gfx magnum_Arm_mesh_layer_1_tri_0[];
|
||||||
|
extern Vtx magnum_Arm_mesh_layer_1_vtx_1[8];
|
||||||
|
extern Gfx magnum_Arm_mesh_layer_1_tri_1[];
|
||||||
|
extern Vtx magnum_Arm_mesh_layer_1_vtx_2[533];
|
||||||
|
extern Gfx magnum_Arm_mesh_layer_1_tri_2[];
|
||||||
|
extern Gfx mat_magnum_darkergray[];
|
||||||
|
extern Gfx mat_magnum_black_layer1[];
|
||||||
|
extern Gfx mat_revert_magnum_black_layer1[];
|
||||||
|
extern Gfx mat_magnum_metal[];
|
||||||
|
extern Gfx mat_revert_magnum_metal[];
|
||||||
|
extern Gfx magnum_Arm_mesh_layer_1[];
|
||||||
|
extern Gfx magnum_material_revert_render_settings[];
|
1166
mods/gun-mod/actors/magnum/model.inc.c
Normal file
BIN
mods/gun-mod/actors/magnum/noise.i8.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
mods/gun-mod/actors/magnum/plat.rgba16.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
mods/gun-mod/actors/magnum_geo.bin
Normal file
24
mods/gun-mod/actors/pistol/geo.inc.c
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#include "src/game/envfx_snow.h"
|
||||||
|
|
||||||
|
const GeoLayout pistol_geo[] = {
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_SCALE(LAYER_FORCE, 65536),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ASM(0, geo_mario_set_player_colors),
|
||||||
|
GEO_ASM(8, geo_mario_set_player_colors),
|
||||||
|
GEO_SWITCH_CASE(0, geo_switch_anim_state),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, -45, 0, NULL),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 25, 0, 0, pistol_Arm_mesh_layer_1),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_DISPLAY_LIST(LAYER_OPAQUE, pistol_material_revert_render_settings),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_END(),
|
||||||
|
};
|
16
mods/gun-mod/actors/pistol/geo_header.h
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
extern const GeoLayout pistol_geo[];
|
||||||
|
extern Lights1 pistol_gray_lights;
|
||||||
|
extern Lights1 pistol_darkergray_lights;
|
||||||
|
extern u8 pistol_noise_i8[];
|
||||||
|
extern Vtx pistol_Arm_mesh_layer_1_vtx_0[174];
|
||||||
|
extern Gfx pistol_Arm_mesh_layer_1_tri_0[];
|
||||||
|
extern Vtx pistol_Arm_mesh_layer_1_vtx_1[34];
|
||||||
|
extern Gfx pistol_Arm_mesh_layer_1_tri_1[];
|
||||||
|
extern Vtx pistol_Arm_mesh_layer_1_vtx_2[6];
|
||||||
|
extern Gfx pistol_Arm_mesh_layer_1_tri_2[];
|
||||||
|
extern Gfx mat_pistol_gray[];
|
||||||
|
extern Gfx mat_pistol_darkergray[];
|
||||||
|
extern Gfx mat_pistol_black_layer1[];
|
||||||
|
extern Gfx mat_revert_pistol_black_layer1[];
|
||||||
|
extern Gfx pistol_Arm_mesh_layer_1[];
|
||||||
|
extern Gfx pistol_material_revert_render_settings[];
|
575
mods/gun-mod/actors/pistol/model.inc.c
Normal file
|
@ -0,0 +1,575 @@
|
||||||
|
Lights1 pistol_gray_lights = gdSPDefLights1(
|
||||||
|
0x53, 0x53, 0x53,
|
||||||
|
0xAA, 0xAA, 0xAA, 0x28, 0x28, 0x28);
|
||||||
|
|
||||||
|
Lights1 pistol_darkergray_lights = gdSPDefLights1(
|
||||||
|
0xF, 0xF, 0xF,
|
||||||
|
0x2A, 0x2A, 0x2A, 0x28, 0x28, 0x28);
|
||||||
|
|
||||||
|
Gfx pistol_noise_i8_aligner[] = {gsSPEndDisplayList()};
|
||||||
|
u8 pistol_noise_i8[] = {
|
||||||
|
0xfa, 0xff, 0xf1, 0xf7, 0xf6, 0xf0, 0xff, 0xff,
|
||||||
|
0xf7, 0xf7, 0xff, 0xff, 0xdb, 0xff, 0xcc, 0xfa,
|
||||||
|
0xd1, 0xff, 0xff, 0xf5, 0xde, 0xf7, 0xe4, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xce,
|
||||||
|
0xfc, 0xf7, 0xff, 0xff, 0xe9, 0xd7, 0xff, 0xff,
|
||||||
|
0xff, 0xe3, 0xff, 0xff, 0xce, 0xff, 0xfe, 0xff,
|
||||||
|
0xff, 0xf9, 0xe2, 0xf4, 0xde, 0xf6, 0xf8, 0xff,
|
||||||
|
0xf6, 0xea, 0xf1, 0xff, 0xff, 0xf6, 0xf3, 0xdf,
|
||||||
|
0xbe, 0xff, 0xff, 0xf4, 0xee, 0xf2, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xf9, 0xff, 0xde, 0xf7, 0xe6, 0xf9,
|
||||||
|
0xff, 0xff, 0xfc, 0xf0, 0xff, 0xeb, 0xf1, 0xff,
|
||||||
|
0xff, 0xfd, 0xea, 0xde, 0xdc, 0xec, 0xd3, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xcd, 0xff, 0xff, 0xff, 0xc9,
|
||||||
|
0xd9, 0xf6, 0xff, 0xdc, 0xff, 0xff, 0xf7, 0xe0,
|
||||||
|
0xff, 0xd9, 0xd4, 0xff, 0xed, 0xff, 0xff, 0xff,
|
||||||
|
0xed, 0xd8, 0xff, 0xff, 0xef, 0xeb, 0xb6, 0xff,
|
||||||
|
0xf9, 0xff, 0xff, 0xf1, 0xd6, 0xe7, 0xde, 0xe9,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xff,
|
||||||
|
0xd0, 0xff, 0xff, 0xff, 0xea, 0xff, 0xe3, 0xdf,
|
||||||
|
0xff, 0xff, 0xff, 0xf6, 0xff, 0xe7, 0xff, 0xff,
|
||||||
|
0xd1, 0xff, 0xeb, 0xef, 0xec, 0xfe, 0xff, 0xff,
|
||||||
|
0xff, 0xd5, 0xde, 0xff, 0xeb, 0xff, 0xfe, 0xcf,
|
||||||
|
0xff, 0xf4, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xca, 0xfd, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xda,
|
||||||
|
0xff, 0xb3, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xf8, 0xf2, 0xf9, 0xe5, 0xde, 0xe0, 0xff, 0xcb,
|
||||||
|
0xf1, 0xe5, 0xed, 0xe1, 0xcb, 0xc4, 0xef, 0xd9,
|
||||||
|
0xff, 0xc1, 0xf3, 0xff, 0xf4, 0xef, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xf1, 0xff, 0xf8, 0xff, 0xfb, 0xff,
|
||||||
|
0xff, 0xff, 0xfd, 0xff, 0xfc, 0xff, 0xf8, 0xff,
|
||||||
|
0xfa, 0xe9, 0xff, 0xff, 0xfe, 0xce, 0xff, 0xe8,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xee, 0xc6,
|
||||||
|
0xed, 0xff, 0xff, 0xe9, 0xe4, 0xe2, 0xf3, 0xd5,
|
||||||
|
0xff, 0xff, 0xff, 0xe4, 0xf0, 0xff, 0xff, 0xff,
|
||||||
|
0xef, 0xf5, 0xf8, 0xff, 0xfa, 0xf0, 0xff, 0xc6,
|
||||||
|
0xf2, 0xff, 0xfb, 0xff, 0xfd, 0xe4, 0xff, 0xed,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd7, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xea, 0xf6, 0xff,
|
||||||
|
0xf7, 0xff, 0xe5, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xe2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xf4, 0xff, 0xf9, 0xf7, 0xff, 0xee, 0xf0, 0xf8,
|
||||||
|
0xf9, 0xff, 0xff, 0xff, 0xe2, 0xff, 0xe0, 0xff,
|
||||||
|
0xf0, 0xfc, 0xe8, 0xff, 0xff, 0xf4, 0xff, 0xe6,
|
||||||
|
0xbc, 0xfa, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xf8, 0xd3, 0xff, 0xff, 0xe5, 0xd9, 0xf6, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xf5,
|
||||||
|
0xde, 0xff, 0xee, 0xff, 0xe6, 0xe6, 0xff, 0xc9,
|
||||||
|
0xff, 0xff, 0xf2, 0xd0, 0xf4, 0xff, 0xfe, 0xe6,
|
||||||
|
0xfe, 0xd4, 0xff, 0xe8, 0xff, 0xfb, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xd5, 0xff, 0xf9, 0xfc, 0xf3, 0xb9,
|
||||||
|
0xf9, 0xf9, 0xf9, 0xea, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xeb, 0xf0, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xfd,
|
||||||
|
0xff, 0xff, 0xfe, 0xfc, 0xf3, 0xfb, 0xfd, 0xff,
|
||||||
|
0xff, 0xe9, 0xde, 0xff, 0xf2, 0xee, 0xff, 0xf4,
|
||||||
|
0xff, 0xf9, 0xff, 0xf2, 0xff, 0xf2, 0xff, 0xd2,
|
||||||
|
0xff, 0xe2, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf4, 0xd5,
|
||||||
|
0xff, 0xff, 0xe5, 0xfd, 0xeb, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xe5, 0xff, 0xed, 0xff, 0xf6, 0xfb,
|
||||||
|
0xff, 0xf4, 0xf1, 0xf9, 0xd5, 0xd8, 0xff, 0xff,
|
||||||
|
0xff, 0xf5, 0xf5, 0xe2, 0xdf, 0xfd, 0xff, 0xea,
|
||||||
|
0xee, 0xff, 0xd2, 0xff, 0xff, 0xff, 0xff, 0xed,
|
||||||
|
0xff, 0xff, 0xfa, 0xe8, 0xf7, 0xcc, 0xf4, 0xef,
|
||||||
|
0xf7, 0xff, 0xe8, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xe7, 0xff, 0xe9, 0xd5, 0xda, 0xff, 0xff, 0xf8,
|
||||||
|
0xe6, 0xf9, 0xf2, 0xfc, 0xff, 0xff, 0xff, 0xed,
|
||||||
|
0xff, 0xff, 0xf5, 0xff, 0xe0, 0xed, 0xff, 0xf4,
|
||||||
|
0xff, 0xf5, 0xff, 0xfd, 0xfa, 0xf9, 0xd6, 0xee,
|
||||||
|
0xe8, 0xff, 0xff, 0xe7, 0xed, 0xff, 0xf4, 0xfc,
|
||||||
|
0xff, 0xff, 0xfd, 0xf7, 0xff, 0xfe, 0xff, 0xf0,
|
||||||
|
0xff, 0xff, 0xef, 0xf4, 0xe3, 0xee, 0xff, 0xf5,
|
||||||
|
0xfa, 0xff, 0xff, 0xff, 0xd3, 0xd6, 0xff, 0xd3,
|
||||||
|
0xfa, 0xed, 0xf5, 0xe9, 0xff, 0xe7, 0xff, 0xa3,
|
||||||
|
0xed, 0xff, 0xfe, 0xff, 0xea, 0xff, 0xfd, 0xff,
|
||||||
|
0xf6, 0xff, 0xe6, 0xff, 0xff, 0xff, 0xff, 0xfa,
|
||||||
|
0xd8, 0xff, 0xff, 0xf7, 0xff, 0xfe, 0xdf, 0xf6,
|
||||||
|
0xff, 0xf0, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xd6,
|
||||||
|
0xff, 0xeb, 0xff, 0xf1, 0xfe, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xef, 0xe8, 0xfe, 0xfa, 0xdc, 0xff, 0xff,
|
||||||
|
0xfc, 0xff, 0xfd, 0xff, 0xf2, 0xf0, 0xff, 0xd6,
|
||||||
|
0xff, 0xf4, 0xff, 0xe3, 0xff, 0xe6, 0xff, 0xff,
|
||||||
|
0xf7, 0xca, 0xde, 0xff, 0xf7, 0xd3, 0xff, 0xf2,
|
||||||
|
0xea, 0xff, 0xff, 0xe7, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xf9, 0xff, 0xf6, 0xf1, 0xec, 0xff, 0xff, 0xff,
|
||||||
|
0xf1, 0xfb, 0xff, 0xf8, 0xff, 0xe2, 0xff, 0xff,
|
||||||
|
0xff, 0xe6, 0xfe, 0xff, 0xe9, 0xed, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xe9,
|
||||||
|
0xe2, 0xec, 0xff, 0xff, 0xf3, 0xf9, 0xff, 0xff,
|
||||||
|
0xfc, 0xff, 0xff, 0xc4, 0xfc, 0xe6, 0xff, 0xd1,
|
||||||
|
0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xd0, 0xff,
|
||||||
|
0xff, 0xff, 0xf9, 0xff, 0xff, 0xfe, 0xff, 0xf8,
|
||||||
|
0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa,
|
||||||
|
0xff, 0xff, 0xff, 0xf0, 0xf9, 0xff, 0xff, 0xff,
|
||||||
|
0xbc, 0xff, 0xff, 0xcb, 0xff, 0xde, 0xff, 0xe7,
|
||||||
|
0xff, 0xfc, 0xff, 0xf3, 0xff, 0xeb, 0xbf, 0xff,
|
||||||
|
0xff, 0xef, 0xe7, 0xff, 0xf4, 0xff, 0xff, 0xff,
|
||||||
|
0xeb, 0xf4, 0xff, 0xec, 0xff, 0xff, 0xff, 0xed,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0xe2, 0xff,
|
||||||
|
0xf4, 0xf0, 0xff, 0xf8, 0xff, 0xff, 0xf2, 0xff,
|
||||||
|
0xff, 0xff, 0xdf, 0xff, 0xfb, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xea, 0xbf, 0xf7, 0xff, 0xff, 0xff, 0xde,
|
||||||
|
0xf9, 0xb3, 0xf3, 0xf1, 0xe6, 0xe4, 0xdb, 0xff,
|
||||||
|
0xf2, 0xff, 0xfd, 0xff, 0xff, 0xf3, 0xf6, 0xde,
|
||||||
|
0xff, 0xf4, 0xfa, 0xea, 0xf2, 0xf1, 0xea, 0xff,
|
||||||
|
0xea, 0xf5, 0xe8, 0xff, 0xef, 0xe8, 0xc9, 0xff,
|
||||||
|
0xff, 0xff, 0xe0, 0xed, 0xff, 0xff, 0xe5, 0xff,
|
||||||
|
0xff, 0xff, 0xf6, 0xf4, 0xe5, 0xc6, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xfc, 0xba, 0xea, 0xed,
|
||||||
|
0xff, 0xfd, 0xff, 0xf9, 0xe9, 0xf8, 0xff, 0xff,
|
||||||
|
0xff, 0xfb, 0xe9, 0xff, 0xff, 0xfe, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xff, 0xff,
|
||||||
|
0xda, 0xdd, 0xff, 0xff, 0xff, 0xda, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xdd, 0xf0, 0xc7, 0xe7, 0xff,
|
||||||
|
0xf8, 0xde, 0xf9, 0xff, 0xff, 0xff, 0xf8, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xec, 0xff,
|
||||||
|
0xd5, 0xfb, 0xfd, 0xff, 0xeb, 0xd9, 0xff, 0xbb,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xdd, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0xfb, 0xfe, 0xec, 0xff, 0xea, 0xdd,
|
||||||
|
0xff, 0xda, 0xff, 0xe6, 0xef, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xf8, 0xff, 0xe3, 0xff, 0xff, 0xe6, 0xff,
|
||||||
|
0xbb, 0xed, 0xff, 0xfc, 0xec, 0xff, 0xf7, 0xfb,
|
||||||
|
0xfe, 0xf5, 0xe5, 0xd5, 0xff, 0xff, 0xef, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfa, 0xff,
|
||||||
|
0xff, 0xdf, 0xff, 0xff, 0xff, 0xf2, 0xff, 0xff,
|
||||||
|
0xff, 0xd2, 0xff, 0xff, 0xff, 0xe4, 0xfe, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xce, 0xff, 0xeb, 0xef, 0xfd,
|
||||||
|
0xfc, 0xe5, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xf0,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx pistol_Arm_mesh_layer_1_vtx_0[174] = {
|
||||||
|
{{ {43, 30, -1}, 0, {-304, 922}, {0, 0, 129, 255} }},
|
||||||
|
{{ {34, 42, -1}, 0, {181, 1299}, {0, 0, 129, 255} }},
|
||||||
|
{{ {47, 39, -1}, 0, {63, 771}, {0, 0, 129, 255} }},
|
||||||
|
{{ {43, 30, 4}, 0, {272, 922}, {0, 0, 127, 255} }},
|
||||||
|
{{ {47, 39, 4}, 0, {-95, 771}, {0, 0, 127, 255} }},
|
||||||
|
{{ {34, 42, 4}, 0, {-213, 1299}, {0, 0, 127, 255} }},
|
||||||
|
{{ {74, 19, 0}, 0, {-306, 916}, {195, 187, 168, 255} }},
|
||||||
|
{{ {77, 14, 1}, 0, {-492, 797}, {195, 187, 168, 255} }},
|
||||||
|
{{ {72, 19, 1}, 0, {-306, 1008}, {195, 187, 168, 255} }},
|
||||||
|
{{ {77, 14, 1}, 0, {-16, 1484}, {107, 68, 0, 255} }},
|
||||||
|
{{ {74, 19, 0}, 0, {46, 1298}, {107, 68, 0, 255} }},
|
||||||
|
{{ {74, 19, 3}, 0, {-78, 1298}, {107, 68, 0, 255} }},
|
||||||
|
{{ {77, 14, 1}, 0, {460, 797}, {195, 187, 88, 255} }},
|
||||||
|
{{ {74, 19, 3}, 0, {274, 916}, {195, 187, 88, 255} }},
|
||||||
|
{{ {72, 19, 1}, 0, {274, 1008}, {195, 187, 88, 255} }},
|
||||||
|
{{ {70, 13, 4}, 0, {-119, 331}, {237, 209, 117, 255} }},
|
||||||
|
{{ {70, 13, -1}, 0, {87, 331}, {237, 209, 139, 255} }},
|
||||||
|
{{ {82, 13, -1}, 0, {87, -181}, {23, 208, 141, 255} }},
|
||||||
|
{{ {82, 13, 4}, 0, {-119, -181}, {23, 208, 115, 255} }},
|
||||||
|
{{ {65, 18, 4}, 0, {87, 1267}, {218, 219, 115, 255} }},
|
||||||
|
{{ {70, 13, -1}, 0, {-119, 1472}, {237, 209, 139, 255} }},
|
||||||
|
{{ {70, 13, 4}, 0, {87, 1472}, {237, 209, 117, 255} }},
|
||||||
|
{{ {65, 18, -1}, 0, {-119, 1267}, {218, 219, 141, 255} }},
|
||||||
|
{{ {70, 14, 2}, 0, {-16, 314}, {49, 117, 0, 255} }},
|
||||||
|
{{ {70, 13, 4}, 0, {87, 331}, {237, 209, 117, 255} }},
|
||||||
|
{{ {82, 13, 4}, 0, {87, -181}, {23, 208, 115, 255} }},
|
||||||
|
{{ {82, 14, 2}, 0, {-16, -162}, {201, 115, 0, 255} }},
|
||||||
|
{{ {70, 13, -1}, 0, {-119, 331}, {237, 209, 139, 255} }},
|
||||||
|
{{ {82, 13, -1}, 0, {-119, -181}, {23, 208, 141, 255} }},
|
||||||
|
{{ {66, 18, 2}, 0, {-16, 1251}, {91, 89, 0, 255} }},
|
||||||
|
{{ {65, 18, 4}, 0, {-119, 1267}, {218, 219, 115, 255} }},
|
||||||
|
{{ {70, 13, 4}, 0, {-119, 1472}, {237, 209, 117, 255} }},
|
||||||
|
{{ {70, 14, 2}, 0, {-16, 1432}, {49, 117, 0, 255} }},
|
||||||
|
{{ {65, 18, -1}, 0, {87, 1267}, {218, 219, 141, 255} }},
|
||||||
|
{{ {70, 13, -1}, 0, {87, 1472}, {237, 209, 139, 255} }},
|
||||||
|
{{ {82, 14, 2}, 0, {-16, 1432}, {201, 115, 0, 255} }},
|
||||||
|
{{ {82, 13, 4}, 0, {87, 1472}, {23, 208, 115, 255} }},
|
||||||
|
{{ {86, 18, 4}, 0, {87, 1267}, {44, 241, 118, 255} }},
|
||||||
|
{{ {86, 18, 2}, 0, {-16, 1253}, {136, 42, 0, 255} }},
|
||||||
|
{{ {86, 27, 4}, 0, {87, 884}, {22, 0, 125, 255} }},
|
||||||
|
{{ {86, 27, 2}, 0, {-16, 884}, {129, 0, 0, 255} }},
|
||||||
|
{{ {86, 18, -1}, 0, {-119, 1267}, {44, 241, 138, 255} }},
|
||||||
|
{{ {86, 27, -1}, 0, {-119, 884}, {22, 0, 131, 255} }},
|
||||||
|
{{ {82, 13, -1}, 0, {-119, 1472}, {23, 208, 141, 255} }},
|
||||||
|
{{ {82, 13, 4}, 0, {-119, 1472}, {23, 208, 115, 255} }},
|
||||||
|
{{ {82, 13, -1}, 0, {87, 1472}, {23, 208, 141, 255} }},
|
||||||
|
{{ {86, 18, -1}, 0, {87, 1267}, {44, 241, 138, 255} }},
|
||||||
|
{{ {86, 18, 4}, 0, {-119, 1267}, {44, 241, 118, 255} }},
|
||||||
|
{{ {86, 27, -1}, 0, {87, 884}, {22, 0, 131, 255} }},
|
||||||
|
{{ {86, 27, 4}, 0, {-119, 884}, {22, 0, 125, 255} }},
|
||||||
|
{{ {127, 28, -2}, 0, {127, 827}, {84, 236, 163, 255} }},
|
||||||
|
{{ {127, 33, -4}, 0, {209, 647}, {71, 56, 167, 255} }},
|
||||||
|
{{ {127, 33, 7}, 0, {-241, 647}, {71, 56, 89, 255} }},
|
||||||
|
{{ {127, 28, 5}, 0, {-159, 827}, {84, 236, 93, 255} }},
|
||||||
|
{{ {127, 24, -2}, 0, {127, 1008}, {73, 183, 183, 255} }},
|
||||||
|
{{ {127, 24, 5}, 0, {-159, 1008}, {73, 183, 73, 255} }},
|
||||||
|
{{ {108, 33, 7}, 0, {209, -1241}, {10, 77, 101, 255} }},
|
||||||
|
{{ {127, 33, 7}, 0, {209, -2006}, {71, 56, 89, 255} }},
|
||||||
|
{{ {127, 33, -4}, 0, {-241, -2006}, {71, 56, 167, 255} }},
|
||||||
|
{{ {38, 33, -4}, 0, {-241, 1660}, {183, 73, 183, 255} }},
|
||||||
|
{{ {38, 33, -4}, 0, {-241, 1660}, {183, 73, 183, 255} }},
|
||||||
|
{{ {38, 33, 7}, 0, {209, 1660}, {183, 73, 73, 255} }},
|
||||||
|
{{ {108, 33, 7}, 0, {209, -1241}, {10, 77, 101, 255} }},
|
||||||
|
{{ {102, 24, -4}, 0, {-16, -982}, {12, 167, 166, 255} }},
|
||||||
|
{{ {38, 24, -4}, 0, {-16, 1660}, {183, 183, 183, 255} }},
|
||||||
|
{{ {38, 33, -4}, 0, {345, 1660}, {183, 73, 183, 255} }},
|
||||||
|
{{ {108, 33, -4}, 0, {345, -1241}, {9, 232, 132, 255} }},
|
||||||
|
{{ {127, 33, -4}, 0, {345, -2006}, {71, 56, 167, 255} }},
|
||||||
|
{{ {108, 28, -2}, 0, {165, -1241}, {26, 229, 135, 255} }},
|
||||||
|
{{ {127, 28, -2}, 0, {165, -2006}, {84, 236, 163, 255} }},
|
||||||
|
{{ {108, 24, -2}, 0, {-16, -1241}, {19, 164, 170, 255} }},
|
||||||
|
{{ {127, 24, -2}, 0, {-16, -2006}, {73, 183, 183, 255} }},
|
||||||
|
{{ {38, 24, 7}, 0, {209, 1008}, {183, 183, 73, 255} }},
|
||||||
|
{{ {38, 33, 7}, 0, {209, 647}, {183, 73, 73, 255} }},
|
||||||
|
{{ {38, 33, -4}, 0, {-241, 647}, {183, 73, 183, 255} }},
|
||||||
|
{{ {38, 24, -4}, 0, {-241, 1008}, {183, 183, 183, 255} }},
|
||||||
|
{{ {108, 24, -2}, 0, {127, -1241}, {19, 164, 170, 255} }},
|
||||||
|
{{ {127, 24, -2}, 0, {127, -2006}, {73, 183, 183, 255} }},
|
||||||
|
{{ {127, 24, 5}, 0, {-159, -2006}, {73, 183, 73, 255} }},
|
||||||
|
{{ {108, 24, 5}, 0, {-159, -1241}, {19, 164, 86, 255} }},
|
||||||
|
{{ {38, 24, 7}, 0, {-241, 1660}, {183, 183, 73, 255} }},
|
||||||
|
{{ {102, 24, 7}, 0, {-241, -982}, {12, 167, 90, 255} }},
|
||||||
|
{{ {102, 24, -4}, 0, {209, -982}, {12, 167, 166, 255} }},
|
||||||
|
{{ {38, 24, -4}, 0, {209, 1660}, {183, 183, 183, 255} }},
|
||||||
|
{{ {102, 24, 7}, 0, {-16, -982}, {12, 167, 90, 255} }},
|
||||||
|
{{ {38, 33, 7}, 0, {-377, 1660}, {183, 73, 73, 255} }},
|
||||||
|
{{ {38, 24, 7}, 0, {-16, 1660}, {183, 183, 73, 255} }},
|
||||||
|
{{ {108, 33, 7}, 0, {-377, -1241}, {10, 77, 101, 255} }},
|
||||||
|
{{ {108, 24, 5}, 0, {-16, -1241}, {19, 164, 86, 255} }},
|
||||||
|
{{ {108, 28, 5}, 0, {-197, -1241}, {26, 229, 121, 255} }},
|
||||||
|
{{ {127, 24, 5}, 0, {-16, -2006}, {73, 183, 73, 255} }},
|
||||||
|
{{ {127, 28, 5}, 0, {-197, -2006}, {84, 236, 93, 255} }},
|
||||||
|
{{ {127, 28, 5}, 0, {-197, -2006}, {84, 236, 93, 255} }},
|
||||||
|
{{ {127, 33, 7}, 0, {-377, -2006}, {71, 56, 89, 255} }},
|
||||||
|
{{ {108, 33, 7}, 0, {-377, -1241}, {10, 77, 101, 255} }},
|
||||||
|
{{ {86, 36, -3}, 0, {480, -347}, {179, 205, 169, 255} }},
|
||||||
|
{{ {86, 40, -3}, 0, {664, -347}, {179, 51, 169, 255} }},
|
||||||
|
{{ {130, 40, -3}, 0, {664, -2149}, {0, 64, 146, 255} }},
|
||||||
|
{{ {130, 36, -3}, 0, {480, -2149}, {0, 192, 146, 255} }},
|
||||||
|
{{ {86, 40, -3}, 0, {-176, -347}, {179, 51, 169, 255} }},
|
||||||
|
{{ {130, 43, 2}, 0, {-16, -2149}, {0, 127, 0, 255} }},
|
||||||
|
{{ {130, 40, -3}, 0, {-176, -2149}, {0, 64, 146, 255} }},
|
||||||
|
{{ {86, 43, 2}, 0, {-16, -347}, {178, 101, 0, 255} }},
|
||||||
|
{{ {130, 40, 6}, 0, {144, -2149}, {0, 64, 110, 255} }},
|
||||||
|
{{ {86, 40, 6}, 0, {144, -347}, {179, 51, 87, 255} }},
|
||||||
|
{{ {86, 34, 2}, 0, {-16, -347}, {178, 155, 0, 255} }},
|
||||||
|
{{ {86, 36, -3}, 0, {144, -347}, {179, 205, 169, 255} }},
|
||||||
|
{{ {130, 36, -3}, 0, {144, -2149}, {0, 192, 146, 255} }},
|
||||||
|
{{ {86, 34, 2}, 0, {-16, -347}, {178, 155, 0, 255} }},
|
||||||
|
{{ {130, 36, -3}, 0, {144, -2149}, {0, 192, 146, 255} }},
|
||||||
|
{{ {130, 34, 2}, 0, {-16, -2149}, {0, 129, 0, 255} }},
|
||||||
|
{{ {86, 36, 6}, 0, {-176, -347}, {179, 205, 87, 255} }},
|
||||||
|
{{ {130, 36, 6}, 0, {-176, -2149}, {0, 192, 110, 255} }},
|
||||||
|
{{ {86, 43, 2}, 0, {-16, 235}, {178, 101, 0, 255} }},
|
||||||
|
{{ {86, 40, -3}, 0, {-176, 328}, {179, 51, 169, 255} }},
|
||||||
|
{{ {86, 36, -3}, 0, {-176, 512}, {179, 205, 169, 255} }},
|
||||||
|
{{ {86, 36, 6}, 0, {144, 512}, {179, 205, 87, 255} }},
|
||||||
|
{{ {86, 34, 2}, 0, {-16, 604}, {178, 155, 0, 255} }},
|
||||||
|
{{ {86, 40, 6}, 0, {144, 328}, {179, 51, 87, 255} }},
|
||||||
|
{{ {86, 40, 6}, 0, {-696, -347}, {179, 51, 87, 255} }},
|
||||||
|
{{ {86, 36, 6}, 0, {-512, -347}, {179, 205, 87, 255} }},
|
||||||
|
{{ {130, 36, 6}, 0, {-512, -2149}, {0, 192, 110, 255} }},
|
||||||
|
{{ {130, 40, 6}, 0, {-696, -2149}, {0, 64, 110, 255} }},
|
||||||
|
{{ {38, 33, 7}, 0, {209, 2872}, {0, 127, 0, 255} }},
|
||||||
|
{{ {127, 33, 7}, 0, {209, -794}, {0, 127, 0, 255} }},
|
||||||
|
{{ {127, 33, -4}, 0, {-241, -794}, {0, 127, 0, 255} }},
|
||||||
|
{{ {38, 33, -4}, 0, {-241, 2872}, {0, 127, 0, 255} }},
|
||||||
|
{{ {38, 33, 7}, 0, {190, 2872}, {161, 26, 81, 255} }},
|
||||||
|
{{ {127, 33, 7}, 0, {190, -794}, {90, 0, 90, 255} }},
|
||||||
|
{{ {127, 42, 7}, 0, {-172, -794}, {77, 51, 87, 255} }},
|
||||||
|
{{ {40, 42, 7}, 0, {-172, 2770}, {187, 66, 83, 255} }},
|
||||||
|
{{ {127, 42, 7}, 0, {-241, 852}, {77, 51, 87, 255} }},
|
||||||
|
{{ {127, 33, 7}, 0, {-241, 1214}, {90, 0, 90, 255} }},
|
||||||
|
{{ {127, 33, -4}, 0, {209, 1214}, {90, 0, 166, 255} }},
|
||||||
|
{{ {127, 42, -4}, 0, {209, 852}, {77, 51, 169, 255} }},
|
||||||
|
{{ {127, 45, 2}, 0, {-16, 721}, {78, 101, 0, 255} }},
|
||||||
|
{{ {127, 33, -4}, 0, {-222, -794}, {90, 0, 166, 255} }},
|
||||||
|
{{ {38, 33, -4}, 0, {-222, 2872}, {161, 26, 175, 255} }},
|
||||||
|
{{ {40, 42, -4}, 0, {140, 2770}, {187, 66, 173, 255} }},
|
||||||
|
{{ {127, 33, -4}, 0, {-222, -794}, {90, 0, 166, 255} }},
|
||||||
|
{{ {40, 42, -4}, 0, {140, 2770}, {187, 66, 173, 255} }},
|
||||||
|
{{ {127, 42, -4}, 0, {140, -794}, {77, 51, 169, 255} }},
|
||||||
|
{{ {40, 42, -4}, 0, {-241, 852}, {187, 66, 173, 255} }},
|
||||||
|
{{ {38, 33, -4}, 0, {-241, 1214}, {161, 26, 175, 255} }},
|
||||||
|
{{ {38, 33, 7}, 0, {209, 1214}, {161, 26, 81, 255} }},
|
||||||
|
{{ {40, 42, 7}, 0, {209, 852}, {187, 66, 83, 255} }},
|
||||||
|
{{ {127, 45, 2}, 0, {-16, -794}, {78, 101, 0, 255} }},
|
||||||
|
{{ {127, 42, -4}, 0, {-241, -794}, {77, 51, 169, 255} }},
|
||||||
|
{{ {40, 42, -4}, 0, {-241, 2770}, {187, 66, 173, 255} }},
|
||||||
|
{{ {44, 45, 2}, 0, {-16, 2626}, {227, 124, 0, 255} }},
|
||||||
|
{{ {40, 42, 7}, 0, {209, 2770}, {187, 66, 83, 255} }},
|
||||||
|
{{ {127, 42, 7}, 0, {209, -794}, {77, 51, 87, 255} }},
|
||||||
|
{{ {47, 39, -1}, 0, {-104, 771}, {27, 124, 0, 255} }},
|
||||||
|
{{ {34, 42, -1}, 0, {-104, 1299}, {27, 124, 0, 255} }},
|
||||||
|
{{ {34, 42, 4}, 0, {72, 1299}, {27, 124, 0, 255} }},
|
||||||
|
{{ {47, 39, -1}, 0, {-104, 771}, {27, 124, 0, 255} }},
|
||||||
|
{{ {34, 42, 4}, 0, {72, 1299}, {27, 124, 0, 255} }},
|
||||||
|
{{ {47, 39, 4}, 0, {72, 771}, {27, 124, 0, 255} }},
|
||||||
|
{{ {34, 42, -1}, 0, {-104, 811}, {155, 178, 0, 255} }},
|
||||||
|
{{ {43, 30, -1}, 0, {-104, 1296}, {155, 178, 0, 255} }},
|
||||||
|
{{ {43, 30, 4}, 0, {72, 1296}, {155, 178, 0, 255} }},
|
||||||
|
{{ {34, 42, 4}, 0, {72, 811}, {155, 178, 0, 255} }},
|
||||||
|
{{ {74, 26, 3}, 0, {-16, 916}, {183, 0, 104, 255} }},
|
||||||
|
{{ {72, 26, 1}, 0, {-16, 1008}, {183, 0, 104, 255} }},
|
||||||
|
{{ {72, 19, 1}, 0, {274, 1008}, {183, 0, 104, 255} }},
|
||||||
|
{{ {74, 19, 3}, 0, {274, 916}, {183, 0, 104, 255} }},
|
||||||
|
{{ {72, 26, 1}, 0, {-16, 1008}, {183, 0, 152, 255} }},
|
||||||
|
{{ {74, 26, 0}, 0, {-16, 916}, {183, 0, 152, 255} }},
|
||||||
|
{{ {74, 19, 0}, 0, {-306, 916}, {183, 0, 152, 255} }},
|
||||||
|
{{ {72, 19, 1}, 0, {-306, 1008}, {183, 0, 152, 255} }},
|
||||||
|
{{ {74, 19, 0}, 0, {46, 1298}, {127, 0, 0, 255} }},
|
||||||
|
{{ {74, 26, 0}, 0, {46, 1008}, {127, 0, 0, 255} }},
|
||||||
|
{{ {74, 26, 3}, 0, {-78, 1008}, {127, 0, 0, 255} }},
|
||||||
|
{{ {74, 19, 3}, 0, {-78, 1298}, {127, 0, 0, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx pistol_Arm_mesh_layer_1_tri_0[] = {
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 0, 15, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(9, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 15, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 7, 5, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 8, 11, 0),
|
||||||
|
gsSP1Triangle(12, 11, 13, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 29, 15, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 0, 3, 0),
|
||||||
|
gsSP1Triangle(4, 3, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(6, 8, 9, 0),
|
||||||
|
gsSP1Triangle(9, 8, 10, 0),
|
||||||
|
gsSP1Triangle(9, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 9, 11, 0),
|
||||||
|
gsSP1Triangle(12, 11, 13, 0),
|
||||||
|
gsSP1Triangle(14, 9, 12, 0),
|
||||||
|
gsSP1Triangle(14, 6, 9, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 44, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(3, 2, 4, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(6, 8, 9, 0),
|
||||||
|
gsSP1Triangle(9, 10, 6, 0),
|
||||||
|
gsSP1Triangle(9, 11, 10, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 60, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(5, 6, 3, 0),
|
||||||
|
gsSP1Triangle(5, 7, 6, 0),
|
||||||
|
gsSP1Triangle(8, 6, 7, 0),
|
||||||
|
gsSP1Triangle(8, 7, 9, 0),
|
||||||
|
gsSP1Triangle(10, 8, 9, 0),
|
||||||
|
gsSP1Triangle(10, 9, 11, 0),
|
||||||
|
gsSP1Triangle(6, 8, 10, 0),
|
||||||
|
gsSP1Triangle(6, 10, 3, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 76, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(3, 4, 0, 0),
|
||||||
|
gsSP1Triangle(3, 5, 4, 0),
|
||||||
|
gsSP1Triangle(4, 6, 0, 0),
|
||||||
|
gsSP1Triangle(4, 7, 6, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 11, 9, 0),
|
||||||
|
gsSP1Triangle(12, 11, 8, 0),
|
||||||
|
gsSP1Triangle(12, 13, 11, 0),
|
||||||
|
gsSP1Triangle(14, 13, 12, 0),
|
||||||
|
gsSP1Triangle(14, 15, 13, 0),
|
||||||
|
gsSP1Triangle(15, 11, 13, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 92, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(3, 5, 6, 0),
|
||||||
|
gsSP1Triangle(7, 8, 9, 0),
|
||||||
|
gsSP1Triangle(7, 10, 8, 0),
|
||||||
|
gsSP1Triangle(10, 11, 8, 0),
|
||||||
|
gsSP1Triangle(10, 12, 11, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 108, 15, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 0, 2, 0),
|
||||||
|
gsSP1Triangle(3, 2, 4, 0),
|
||||||
|
gsSP1Triangle(5, 6, 7, 0),
|
||||||
|
gsSP1Triangle(5, 7, 8, 0),
|
||||||
|
gsSP1Triangle(7, 9, 8, 0),
|
||||||
|
gsSP1Triangle(8, 10, 5, 0),
|
||||||
|
gsSP1Triangle(11, 12, 13, 0),
|
||||||
|
gsSP1Triangle(11, 13, 14, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 123, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 6, 7, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 10, 11, 0),
|
||||||
|
gsSP1Triangle(11, 12, 8, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 139, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(3, 5, 6, 0),
|
||||||
|
gsSP1Triangle(7, 8, 9, 0),
|
||||||
|
gsSP1Triangle(7, 9, 10, 0),
|
||||||
|
gsSP1Triangle(10, 9, 11, 0),
|
||||||
|
gsSP1Triangle(12, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 7, 10, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 155, 15, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(3, 5, 6, 0),
|
||||||
|
gsSP1Triangle(7, 8, 9, 0),
|
||||||
|
gsSP1Triangle(7, 9, 10, 0),
|
||||||
|
gsSP1Triangle(11, 12, 13, 0),
|
||||||
|
gsSP1Triangle(11, 13, 14, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_0 + 170, 4, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx pistol_Arm_mesh_layer_1_vtx_1[34] = {
|
||||||
|
{{ {56, -22, -3}, 0, {168, 2906}, {127, 0, 0, 255} }},
|
||||||
|
{{ {56, -14, -3}, 0, {168, 2582}, {127, 0, 0, 255} }},
|
||||||
|
{{ {56, -14, 6}, 0, {-200, 2582}, {127, 0, 0, 255} }},
|
||||||
|
{{ {56, -22, 6}, 0, {-200, 2906}, {127, 0, 0, 255} }},
|
||||||
|
{{ {56, -14, -3}, 0, {-1590, 906}, {0, 0, 129, 255} }},
|
||||||
|
{{ {56, -22, -3}, 0, {-1914, 906}, {0, 0, 129, 255} }},
|
||||||
|
{{ {30, -14, -3}, 0, {-1590, 1971}, {0, 0, 129, 255} }},
|
||||||
|
{{ {41, 20, -3}, 0, {-173, 1528}, {0, 0, 129, 255} }},
|
||||||
|
{{ {68, 24, -3}, 0, {-16, 414}, {0, 0, 129, 255} }},
|
||||||
|
{{ {39, 24, -3}, 0, {-16, 1602}, {0, 0, 129, 255} }},
|
||||||
|
{{ {68, 24, 6}, 0, {-200, 1008}, {121, 218, 0, 255} }},
|
||||||
|
{{ {56, -14, 6}, 0, {-200, 2582}, {121, 218, 0, 255} }},
|
||||||
|
{{ {56, -14, -3}, 0, {168, 2582}, {121, 218, 0, 255} }},
|
||||||
|
{{ {68, 24, -3}, 0, {168, 1008}, {121, 218, 0, 255} }},
|
||||||
|
{{ {30, -14, 6}, 0, {-200, 1971}, {219, 134, 0, 255} }},
|
||||||
|
{{ {30, -14, -3}, 0, {168, 1971}, {219, 134, 0, 255} }},
|
||||||
|
{{ {56, -22, -3}, 0, {168, 906}, {219, 134, 0, 255} }},
|
||||||
|
{{ {56, -22, 6}, 0, {-200, 906}, {219, 134, 0, 255} }},
|
||||||
|
{{ {30, -14, 6}, 0, {168, 2582}, {135, 38, 0, 255} }},
|
||||||
|
{{ {41, 20, -3}, 0, {-200, 1165}, {135, 38, 0, 255} }},
|
||||||
|
{{ {30, -14, -3}, 0, {-200, 2582}, {135, 38, 0, 255} }},
|
||||||
|
{{ {41, 20, 6}, 0, {168, 1165}, {135, 38, 0, 255} }},
|
||||||
|
{{ {39, 24, -3}, 0, {-200, 1008}, {141, 202, 0, 255} }},
|
||||||
|
{{ {41, 20, -3}, 0, {-200, 1165}, {141, 202, 0, 255} }},
|
||||||
|
{{ {41, 20, 6}, 0, {168, 1165}, {141, 202, 0, 255} }},
|
||||||
|
{{ {39, 24, 6}, 0, {168, 1008}, {141, 202, 0, 255} }},
|
||||||
|
{{ {30, -14, 6}, 0, {1558, 1971}, {0, 0, 127, 255} }},
|
||||||
|
{{ {56, -22, 6}, 0, {1882, 906}, {0, 0, 127, 255} }},
|
||||||
|
{{ {56, -14, 6}, 0, {1558, 906}, {0, 0, 127, 255} }},
|
||||||
|
{{ {41, 20, 6}, 0, {141, 1528}, {0, 0, 127, 255} }},
|
||||||
|
{{ {56, -14, 6}, 0, {1558, 906}, {0, 0, 127, 255} }},
|
||||||
|
{{ {68, 24, 6}, 0, {-16, 414}, {0, 0, 127, 255} }},
|
||||||
|
{{ {41, 20, 6}, 0, {141, 1528}, {0, 0, 127, 255} }},
|
||||||
|
{{ {39, 24, 6}, 0, {-16, 1602}, {0, 0, 127, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx pistol_Arm_mesh_layer_1_tri_1[] = {
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_1 + 0, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 6, 7, 0),
|
||||||
|
gsSP1Triangle(4, 7, 8, 0),
|
||||||
|
gsSP1Triangle(7, 9, 8, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(10, 12, 13, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_1 + 14, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 7, 5, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(15, 12, 14, 0),
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_1 + 30, 4, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(1, 3, 2, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx pistol_Arm_mesh_layer_1_vtx_2[6] = {
|
||||||
|
{{ {130, 36, -3}, 0, {144, 512}, {127, 0, 0, 255} }},
|
||||||
|
{{ {130, 40, -3}, 0, {144, 328}, {127, 0, 0, 255} }},
|
||||||
|
{{ {130, 43, 2}, 0, {-16, 235}, {127, 0, 0, 255} }},
|
||||||
|
{{ {130, 36, 6}, 0, {-176, 512}, {127, 0, 0, 255} }},
|
||||||
|
{{ {130, 40, 6}, 0, {-176, 328}, {127, 0, 0, 255} }},
|
||||||
|
{{ {130, 34, 2}, 0, {-16, 604}, {127, 0, 0, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx pistol_Arm_mesh_layer_1_tri_2[] = {
|
||||||
|
gsSPVertex(pistol_Arm_mesh_layer_1_vtx_2 + 0, 6, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(2, 3, 0, 0),
|
||||||
|
gsSP1Triangle(2, 4, 3, 0),
|
||||||
|
gsSP1Triangle(3, 5, 0, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Gfx mat_pistol_gray[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPSetLights1(pistol_gray_lights),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_pistol_darkergray[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPSetLights1(pistol_darkergray_lights),
|
||||||
|
gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 1, pistol_noise_i8),
|
||||||
|
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
|
||||||
|
gsDPLoadBlock(7, 0, 0, 511, 512),
|
||||||
|
gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 4, 0, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0),
|
||||||
|
gsDPSetTileSize(0, 0, 0, 124, 124),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_pistol_black_layer1[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
gsDPSetRenderMode(G_RM_ZB_OPA_SURF, G_RM_ZB_OPA_SURF2),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_revert_pistol_black_layer1[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx pistol_Arm_mesh_layer_1[] = {
|
||||||
|
gsSPDisplayList(mat_pistol_gray),
|
||||||
|
gsSPDisplayList(pistol_Arm_mesh_layer_1_tri_0),
|
||||||
|
gsSPDisplayList(mat_pistol_darkergray),
|
||||||
|
gsSPDisplayList(pistol_Arm_mesh_layer_1_tri_1),
|
||||||
|
gsSPDisplayList(mat_pistol_black_layer1),
|
||||||
|
gsSPDisplayList(pistol_Arm_mesh_layer_1_tri_2),
|
||||||
|
gsSPDisplayList(mat_revert_pistol_black_layer1),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx pistol_material_revert_render_settings[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsSPSetGeometryMode(G_LIGHTING),
|
||||||
|
gsSPClearGeometryMode(G_TEXTURE_GEN),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 0),
|
||||||
|
gsDPSetEnvColor(255, 255, 255, 255),
|
||||||
|
gsDPSetAlphaCompare(G_AC_NONE),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
BIN
mods/gun-mod/actors/pistol_geo.bin
Normal file
24
mods/gun-mod/actors/shotgun/geo.inc.c
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#include "src/game/envfx_snow.h"
|
||||||
|
|
||||||
|
const GeoLayout shotgun_geo[] = {
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_SCALE(LAYER_FORCE, 65536),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ASM(0, geo_mario_set_player_colors),
|
||||||
|
GEO_ASM(8, geo_mario_set_player_colors),
|
||||||
|
GEO_SWITCH_CASE(0, geo_switch_anim_state),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 0, -45, 0, NULL),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_ANIMATED_PART(LAYER_OPAQUE, 25, 0, 0, shotgun_Arm_mesh_layer_1),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_DISPLAY_LIST(LAYER_OPAQUE, shotgun_material_revert_render_settings),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_END(),
|
||||||
|
};
|
22
mods/gun-mod/actors/shotgun/geo_header.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
extern const GeoLayout shotgun_geo[];
|
||||||
|
extern Lights1 shotgun_wood_lights;
|
||||||
|
extern Lights1 shotgun_darkgray_lights;
|
||||||
|
extern Lights1 shotgun_metal_lights;
|
||||||
|
extern u8 shotgun_wood_rgba16[];
|
||||||
|
extern u8 shotgun_plat_rgba16[];
|
||||||
|
extern Vtx shotgun_Arm_mesh_layer_1_vtx_0[108];
|
||||||
|
extern Gfx shotgun_Arm_mesh_layer_1_tri_0[];
|
||||||
|
extern Vtx shotgun_Arm_mesh_layer_1_vtx_1[68];
|
||||||
|
extern Gfx shotgun_Arm_mesh_layer_1_tri_1[];
|
||||||
|
extern Vtx shotgun_Arm_mesh_layer_1_vtx_2[46];
|
||||||
|
extern Gfx shotgun_Arm_mesh_layer_1_tri_2[];
|
||||||
|
extern Vtx shotgun_Arm_mesh_layer_1_vtx_3[10];
|
||||||
|
extern Gfx shotgun_Arm_mesh_layer_1_tri_3[];
|
||||||
|
extern Gfx mat_shotgun_wood[];
|
||||||
|
extern Gfx mat_shotgun_darkgray[];
|
||||||
|
extern Gfx mat_shotgun_metal[];
|
||||||
|
extern Gfx mat_revert_shotgun_metal[];
|
||||||
|
extern Gfx mat_shotgun_black_layer1[];
|
||||||
|
extern Gfx mat_revert_shotgun_black_layer1[];
|
||||||
|
extern Gfx shotgun_Arm_mesh_layer_1[];
|
||||||
|
extern Gfx shotgun_material_revert_render_settings[];
|
528
mods/gun-mod/actors/shotgun/model.inc.c
Normal file
|
@ -0,0 +1,528 @@
|
||||||
|
Lights1 shotgun_wood_lights = gdSPDefLights1(
|
||||||
|
0x7F, 0x7F, 0x7F,
|
||||||
|
0xFF, 0xFF, 0xFF, 0x28, 0x28, 0x28);
|
||||||
|
|
||||||
|
Lights1 shotgun_darkgray_lights = gdSPDefLights1(
|
||||||
|
0x3B, 0x3B, 0x3B,
|
||||||
|
0x7C, 0x7C, 0x7C, 0x28, 0x28, 0x28);
|
||||||
|
|
||||||
|
Lights1 shotgun_metal_lights = gdSPDefLights1(
|
||||||
|
0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0x28, 0x28, 0x28);
|
||||||
|
|
||||||
|
Gfx shotgun_wood_rgba16_aligner[] = {gsSPEndDisplayList()};
|
||||||
|
u8 shotgun_wood_rgba16[] = {
|
||||||
|
#include "actors/shotgun/wood.rgba16.inc.c"
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx shotgun_plat_rgba16_aligner[] = {gsSPEndDisplayList()};
|
||||||
|
u8 shotgun_plat_rgba16[] = {
|
||||||
|
#include "actors/shotgun/plat.rgba16.inc.c"
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx shotgun_Arm_mesh_layer_1_vtx_0[108] = {
|
||||||
|
{{ {65, 23, 1}, 0, {-20, 1252}, {213, 137, 0, 255} }},
|
||||||
|
{{ {79, 21, -2}, 0, {67, 827}, {238, 150, 188, 255} }},
|
||||||
|
{{ {79, 21, 4}, 0, {-107, 827}, {239, 150, 68, 255} }},
|
||||||
|
{{ {90, 21, 4}, 0, {-107, 498}, {0, 148, 66, 255} }},
|
||||||
|
{{ {90, 21, -2}, 0, {67, 498}, {0, 148, 190, 255} }},
|
||||||
|
{{ {45, 19, 5}, 0, {-116, 1841}, {38, 183, 97, 255} }},
|
||||||
|
{{ {45, 19, -2}, 0, {75, 1841}, {38, 183, 159, 255} }},
|
||||||
|
{{ {5, 0, -2}, 0, {75, 3047}, {202, 163, 189, 255} }},
|
||||||
|
{{ {5, 0, 5}, 0, {-116, 3047}, {202, 163, 68, 255} }},
|
||||||
|
{{ {5, 0, -2}, 0, {-717, 3047}, {202, 163, 189, 255} }},
|
||||||
|
{{ {4, 26, -4}, 0, {68, 3097}, {182, 67, 178, 255} }},
|
||||||
|
{{ {45, 19, -2}, 0, {-166, 1841}, {38, 183, 159, 255} }},
|
||||||
|
{{ {45, 27, -1}, 0, {82, 1841}, {247, 88, 165, 255} }},
|
||||||
|
{{ {65, 23, 1}, 0, {-29, 1252}, {213, 137, 0, 255} }},
|
||||||
|
{{ {60, 33, -1}, 0, {279, 1404}, {208, 73, 164, 255} }},
|
||||||
|
{{ {79, 21, -2}, 0, {-106, 827}, {238, 150, 188, 255} }},
|
||||||
|
{{ {79, 21, -2}, 0, {-106, 827}, {238, 150, 188, 255} }},
|
||||||
|
{{ {60, 33, -1}, 0, {279, 1404}, {208, 73, 164, 255} }},
|
||||||
|
{{ {79, 26, -4}, 0, {64, 827}, {239, 224, 134, 255} }},
|
||||||
|
{{ {79, 37, -4}, 0, {383, 827}, {71, 38, 158, 255} }},
|
||||||
|
{{ {74, 40, -1}, 0, {473, 976}, {229, 112, 202, 255} }},
|
||||||
|
{{ {79, 30, -4}, 0, {190, 827}, {25, 40, 138, 255} }},
|
||||||
|
{{ {90, 26, -4}, 0, {64, 498}, {0, 226, 133, 255} }},
|
||||||
|
{{ {90, 30, -4}, 0, {190, 498}, {0, 90, 166, 255} }},
|
||||||
|
{{ {90, 21, -2}, 0, {-106, 498}, {0, 148, 190, 255} }},
|
||||||
|
{{ {79, 37, -4}, 0, {-186, 827}, {71, 38, 158, 255} }},
|
||||||
|
{{ {74, 40, -1}, 0, {-88, 976}, {229, 112, 202, 255} }},
|
||||||
|
{{ {79, 40, -1}, 0, {-91, 827}, {82, 91, 220, 255} }},
|
||||||
|
{{ {74, 40, 4}, 0, {64, 976}, {230, 112, 54, 255} }},
|
||||||
|
{{ {60, 33, -1}, 0, {-80, 1404}, {208, 73, 164, 255} }},
|
||||||
|
{{ {45, 27, 3}, 0, {48, 1841}, {248, 88, 91, 255} }},
|
||||||
|
{{ {45, 27, -1}, 0, {-71, 1841}, {247, 88, 165, 255} }},
|
||||||
|
{{ {45, 27, -1}, 0, {-71, 1841}, {247, 88, 165, 255} }},
|
||||||
|
{{ {4, 26, 7}, 0, {162, 3097}, {183, 67, 79, 255} }},
|
||||||
|
{{ {45, 27, 3}, 0, {48, 1841}, {248, 88, 91, 255} }},
|
||||||
|
{{ {4, 26, -4}, 0, {-186, 3097}, {182, 67, 178, 255} }},
|
||||||
|
{{ {60, 33, 4}, 0, {56, 1404}, {209, 73, 93, 255} }},
|
||||||
|
{{ {74, 40, 4}, 0, {64, 976}, {230, 112, 54, 255} }},
|
||||||
|
{{ {90, 26, -4}, 0, {-186, 928}, {129, 0, 0, 255} }},
|
||||||
|
{{ {90, 21, -2}, 0, {-99, 1098}, {129, 0, 0, 255} }},
|
||||||
|
{{ {90, 21, 4}, 0, {75, 1098}, {129, 0, 0, 255} }},
|
||||||
|
{{ {90, 30, 7}, 0, {162, 802}, {129, 0, 0, 255} }},
|
||||||
|
{{ {90, 26, 7}, 0, {162, 928}, {129, 0, 0, 255} }},
|
||||||
|
{{ {90, 30, -4}, 0, {-186, 802}, {129, 0, 0, 255} }},
|
||||||
|
{{ {5, 0, -2}, 0, {-107, 1709}, {202, 163, 189, 255} }},
|
||||||
|
{{ {5, 0, 5}, 0, {84, 1709}, {202, 163, 68, 255} }},
|
||||||
|
{{ {4, 26, 7}, 0, {162, 924}, {183, 67, 79, 255} }},
|
||||||
|
{{ {4, 26, -4}, 0, {-186, 924}, {182, 67, 178, 255} }},
|
||||||
|
{{ {5, 0, 5}, 0, {685, 3047}, {202, 163, 68, 255} }},
|
||||||
|
{{ {45, 19, 5}, 0, {134, 1841}, {38, 183, 97, 255} }},
|
||||||
|
{{ {4, 26, 7}, 0, {-100, 3097}, {183, 67, 79, 255} }},
|
||||||
|
{{ {45, 27, 3}, 0, {-114, 1841}, {248, 88, 91, 255} }},
|
||||||
|
{{ {65, 23, 1}, 0, {-3, 1252}, {213, 137, 0, 255} }},
|
||||||
|
{{ {60, 33, 4}, 0, {-311, 1404}, {209, 73, 93, 255} }},
|
||||||
|
{{ {79, 21, 4}, 0, {74, 827}, {239, 150, 68, 255} }},
|
||||||
|
{{ {79, 26, 7}, 0, {-96, 827}, {239, 224, 122, 255} }},
|
||||||
|
{{ {90, 21, 4}, 0, {74, 498}, {0, 148, 66, 255} }},
|
||||||
|
{{ {90, 26, 7}, 0, {-96, 498}, {0, 226, 123, 255} }},
|
||||||
|
{{ {90, 30, 7}, 0, {-222, 498}, {0, 90, 90, 255} }},
|
||||||
|
{{ {79, 30, 7}, 0, {-222, 827}, {26, 40, 118, 255} }},
|
||||||
|
{{ {79, 37, 7}, 0, {-415, 827}, {72, 38, 97, 255} }},
|
||||||
|
{{ {74, 40, 4}, 0, {-505, 976}, {230, 112, 54, 255} }},
|
||||||
|
{{ {79, 40, 4}, 0, {-99, 524}, {82, 91, 35, 255} }},
|
||||||
|
{{ {79, 37, 7}, 0, {-194, 609}, {72, 38, 97, 255} }},
|
||||||
|
{{ {79, 30, 7}, 0, {-194, 802}, {26, 40, 118, 255} }},
|
||||||
|
{{ {79, 37, -4}, 0, {154, 609}, {71, 38, 158, 255} }},
|
||||||
|
{{ {79, 30, -4}, 0, {154, 802}, {25, 40, 138, 255} }},
|
||||||
|
{{ {79, 40, -1}, 0, {59, 524}, {82, 91, 220, 255} }},
|
||||||
|
{{ {79, 40, 4}, 0, {67, 827}, {82, 91, 35, 255} }},
|
||||||
|
{{ {74, 40, 4}, 0, {64, 976}, {230, 112, 54, 255} }},
|
||||||
|
{{ {79, 37, 7}, 0, {162, 827}, {72, 38, 97, 255} }},
|
||||||
|
{{ {79, 40, -1}, 0, {-91, 827}, {82, 91, 220, 255} }},
|
||||||
|
{{ {79, 30, 7}, 0, {162, 827}, {26, 40, 118, 255} }},
|
||||||
|
{{ {90, 30, 7}, 0, {162, 498}, {0, 90, 90, 255} }},
|
||||||
|
{{ {90, 30, -4}, 0, {-186, 498}, {0, 90, 166, 255} }},
|
||||||
|
{{ {79, 30, -4}, 0, {-186, 827}, {25, 40, 138, 255} }},
|
||||||
|
{{ {90, 26, -4}, 0, {-186, 928}, {172, 234, 163, 255} }},
|
||||||
|
{{ {90, 21, -2}, 0, {-99, 1098}, {179, 170, 204, 255} }},
|
||||||
|
{{ {90, 21, 4}, 0, {75, 1098}, {179, 170, 53, 255} }},
|
||||||
|
{{ {90, 30, 7}, 0, {162, 802}, {183, 73, 74, 255} }},
|
||||||
|
{{ {90, 26, 7}, 0, {162, 928}, {173, 234, 93, 255} }},
|
||||||
|
{{ {90, 30, -4}, 0, {-186, 802}, {182, 73, 183, 255} }},
|
||||||
|
{{ {126, 30, -5}, 0, {-186, -580}, {73, 73, 182, 255} }},
|
||||||
|
{{ {90, 30, -4}, 0, {-186, 498}, {182, 73, 183, 255} }},
|
||||||
|
{{ {90, 30, 7}, 0, {162, 498}, {183, 73, 74, 255} }},
|
||||||
|
{{ {126, 30, 7}, 0, {162, -580}, {74, 73, 73, 255} }},
|
||||||
|
{{ {126, 26, -5}, 0, {64, -580}, {83, 231, 163, 255} }},
|
||||||
|
{{ {90, 30, -4}, 0, {190, 498}, {182, 73, 183, 255} }},
|
||||||
|
{{ {126, 30, -5}, 0, {190, -580}, {73, 73, 182, 255} }},
|
||||||
|
{{ {90, 26, -4}, 0, {64, 498}, {172, 234, 163, 255} }},
|
||||||
|
{{ {90, 21, -2}, 0, {-106, 498}, {179, 170, 204, 255} }},
|
||||||
|
{{ {126, 21, -1}, 0, {-106, -580}, {78, 169, 206, 255} }},
|
||||||
|
{{ {126, 26, 7}, 0, {-96, -580}, {83, 231, 92, 255} }},
|
||||||
|
{{ {90, 21, 4}, 0, {74, 498}, {179, 170, 53, 255} }},
|
||||||
|
{{ {126, 21, 4}, 0, {74, -580}, {78, 169, 50, 255} }},
|
||||||
|
{{ {90, 26, 7}, 0, {-96, 498}, {173, 234, 93, 255} }},
|
||||||
|
{{ {126, 30, 7}, 0, {-222, -580}, {74, 73, 73, 255} }},
|
||||||
|
{{ {90, 30, 7}, 0, {-222, 498}, {183, 73, 74, 255} }},
|
||||||
|
{{ {126, 21, 4}, 0, {-96, -580}, {78, 169, 50, 255} }},
|
||||||
|
{{ {90, 21, 4}, 0, {-107, 498}, {179, 170, 53, 255} }},
|
||||||
|
{{ {90, 21, -2}, 0, {67, 498}, {179, 170, 204, 255} }},
|
||||||
|
{{ {126, 21, -1}, 0, {55, -580}, {78, 169, 206, 255} }},
|
||||||
|
{{ {126, 26, -5}, 0, {154, 928}, {83, 231, 163, 255} }},
|
||||||
|
{{ {126, 21, 4}, 0, {-96, 1098}, {78, 169, 50, 255} }},
|
||||||
|
{{ {126, 21, -1}, 0, {55, 1098}, {78, 169, 206, 255} }},
|
||||||
|
{{ {126, 26, 7}, 0, {-194, 928}, {83, 231, 92, 255} }},
|
||||||
|
{{ {126, 30, -5}, 0, {154, 802}, {73, 73, 182, 255} }},
|
||||||
|
{{ {126, 30, 7}, 0, {-194, 802}, {74, 73, 73, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx shotgun_Arm_mesh_layer_1_tri_0[] = {
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_0 + 0, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 2, 1, 0),
|
||||||
|
gsSP1Triangle(3, 1, 4, 0),
|
||||||
|
gsSP1Triangle(0, 5, 6, 0),
|
||||||
|
gsSP1Triangle(5, 7, 6, 0),
|
||||||
|
gsSP1Triangle(5, 8, 7, 0),
|
||||||
|
gsSP1Triangle(9, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 11, 10, 0),
|
||||||
|
gsSP1Triangle(11, 12, 13, 0),
|
||||||
|
gsSP1Triangle(14, 13, 12, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_0 + 16, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(2, 1, 3, 0),
|
||||||
|
gsSP1Triangle(4, 3, 1, 0),
|
||||||
|
gsSP1Triangle(2, 3, 5, 0),
|
||||||
|
gsSP1Triangle(6, 2, 5, 0),
|
||||||
|
gsSP1Triangle(6, 5, 7, 0),
|
||||||
|
gsSP1Triangle(8, 2, 6, 0),
|
||||||
|
gsSP1Triangle(8, 0, 2, 0),
|
||||||
|
gsSP1Triangle(9, 10, 11, 0),
|
||||||
|
gsSP1Triangle(11, 10, 12, 0),
|
||||||
|
gsSP1Triangle(12, 10, 13, 0),
|
||||||
|
gsSP1Triangle(14, 12, 13, 0),
|
||||||
|
gsSP1Triangle(13, 15, 14, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_0 + 32, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 3, 1, 0),
|
||||||
|
gsSP1Triangle(2, 4, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(8, 9, 6, 0),
|
||||||
|
gsSP1Triangle(8, 10, 9, 0),
|
||||||
|
gsSP1Triangle(9, 11, 6, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_0 + 48, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 2, 1, 0),
|
||||||
|
gsSP1Triangle(1, 4, 3, 0),
|
||||||
|
gsSP1Triangle(5, 3, 4, 0),
|
||||||
|
gsSP1Triangle(4, 6, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 5, 0),
|
||||||
|
gsSP1Triangle(8, 7, 6, 0),
|
||||||
|
gsSP1Triangle(8, 9, 7, 0),
|
||||||
|
gsSP1Triangle(7, 9, 10, 0),
|
||||||
|
gsSP1Triangle(7, 10, 11, 0),
|
||||||
|
gsSP1Triangle(7, 11, 5, 0),
|
||||||
|
gsSP1Triangle(11, 12, 5, 0),
|
||||||
|
gsSP1Triangle(5, 12, 13, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_0 + 62, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(2, 4, 3, 0),
|
||||||
|
gsSP1Triangle(3, 5, 0, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(9, 7, 6, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(10, 12, 13, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_0 + 76, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(2, 3, 0, 0),
|
||||||
|
gsSP1Triangle(2, 4, 3, 0),
|
||||||
|
gsSP1Triangle(3, 5, 0, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(6, 8, 9, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(10, 13, 11, 0),
|
||||||
|
gsSP1Triangle(10, 14, 13, 0),
|
||||||
|
gsSP1Triangle(14, 10, 15, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_0 + 92, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(1, 0, 3, 0),
|
||||||
|
gsSP1Triangle(3, 0, 4, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(6, 8, 9, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(10, 13, 11, 0),
|
||||||
|
gsSP1Triangle(13, 10, 14, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx shotgun_Arm_mesh_layer_1_vtx_1[68] = {
|
||||||
|
{{ {75, 18, 1}, 0, {-173, 958}, {211, 206, 148, 255} }},
|
||||||
|
{{ {77, 15, 1}, 0, {-274, 894}, {211, 206, 148, 255} }},
|
||||||
|
{{ {73, 18, 1}, 0, {-173, 1008}, {211, 206, 148, 255} }},
|
||||||
|
{{ {77, 15, 1}, 0, {-16, 1266}, {107, 68, 0, 255} }},
|
||||||
|
{{ {75, 18, 1}, 0, {4, 1165}, {107, 68, 0, 255} }},
|
||||||
|
{{ {75, 18, 2}, 0, {-36, 1165}, {107, 68, 0, 255} }},
|
||||||
|
{{ {77, 15, 1}, 0, {242, 894}, {212, 206, 108, 255} }},
|
||||||
|
{{ {75, 18, 2}, 0, {141, 958}, {212, 206, 108, 255} }},
|
||||||
|
{{ {73, 18, 1}, 0, {141, 1008}, {212, 206, 108, 255} }},
|
||||||
|
{{ {71, 14, 2}, 0, {-54, 1056}, {233, 200, 111, 255} }},
|
||||||
|
{{ {71, 14, 0}, 0, {14, 1056}, {232, 200, 145, 255} }},
|
||||||
|
{{ {81, 14, 0}, 0, {14, 778}, {27, 198, 146, 255} }},
|
||||||
|
{{ {81, 14, 2}, 0, {-54, 778}, {28, 198, 110, 255} }},
|
||||||
|
{{ {68, 18, 3}, 0, {22, 1185}, {200, 233, 112, 255} }},
|
||||||
|
{{ {71, 14, 0}, 0, {-46, 1296}, {232, 200, 145, 255} }},
|
||||||
|
{{ {71, 14, 2}, 0, {22, 1296}, {233, 200, 111, 255} }},
|
||||||
|
{{ {68, 18, 3}, 0, {22, 1185}, {200, 233, 112, 255} }},
|
||||||
|
{{ {68, 18, 0}, 0, {-46, 1185}, {200, 233, 145, 255} }},
|
||||||
|
{{ {71, 14, 0}, 0, {-46, 1296}, {232, 200, 145, 255} }},
|
||||||
|
{{ {68, 25, 3}, 0, {22, 978}, {221, 0, 122, 255} }},
|
||||||
|
{{ {68, 25, 0}, 0, {-46, 978}, {220, 0, 134, 255} }},
|
||||||
|
{{ {71, 14, 0}, 0, {-46, 1056}, {232, 200, 145, 255} }},
|
||||||
|
{{ {80, 15, 1}, 0, {-12, 789}, {201, 115, 0, 255} }},
|
||||||
|
{{ {81, 14, 0}, 0, {-46, 778}, {27, 198, 146, 255} }},
|
||||||
|
{{ {72, 15, 1}, 0, {-12, 1047}, {49, 117, 0, 255} }},
|
||||||
|
{{ {81, 14, 2}, 0, {22, 778}, {28, 198, 110, 255} }},
|
||||||
|
{{ {71, 14, 2}, 0, {22, 1056}, {233, 200, 111, 255} }},
|
||||||
|
{{ {68, 18, 0}, 0, {14, 1185}, {200, 233, 145, 255} }},
|
||||||
|
{{ {72, 15, 1}, 0, {-20, 1274}, {49, 117, 0, 255} }},
|
||||||
|
{{ {71, 14, 0}, 0, {14, 1296}, {232, 200, 145, 255} }},
|
||||||
|
{{ {68, 18, 1}, 0, {-20, 1176}, {118, 48, 0, 255} }},
|
||||||
|
{{ {68, 25, 0}, 0, {14, 978}, {220, 0, 134, 255} }},
|
||||||
|
{{ {68, 25, 0}, 0, {14, 978}, {220, 0, 134, 255} }},
|
||||||
|
{{ {68, 25, 1}, 0, {-20, 978}, {127, 0, 0, 255} }},
|
||||||
|
{{ {68, 18, 1}, 0, {-20, 1176}, {118, 48, 0, 255} }},
|
||||||
|
{{ {68, 18, 3}, 0, {-54, 1185}, {200, 233, 112, 255} }},
|
||||||
|
{{ {68, 25, 3}, 0, {-54, 978}, {221, 0, 122, 255} }},
|
||||||
|
{{ {71, 14, 2}, 0, {-54, 1296}, {233, 200, 111, 255} }},
|
||||||
|
{{ {72, 15, 1}, 0, {-20, 1274}, {49, 117, 0, 255} }},
|
||||||
|
{{ {81, 14, 2}, 0, {-54, 1296}, {28, 198, 110, 255} }},
|
||||||
|
{{ {81, 14, 0}, 0, {14, 1296}, {27, 198, 146, 255} }},
|
||||||
|
{{ {84, 18, 0}, 0, {14, 1185}, {54, 237, 143, 255} }},
|
||||||
|
{{ {84, 18, 2}, 0, {-54, 1185}, {55, 237, 113, 255} }},
|
||||||
|
{{ {84, 25, 0}, 0, {14, 978}, {35, 0, 134, 255} }},
|
||||||
|
{{ {84, 25, 2}, 0, {-54, 978}, {36, 0, 122, 255} }},
|
||||||
|
{{ {80, 15, 1}, 0, {-12, 1274}, {201, 115, 0, 255} }},
|
||||||
|
{{ {81, 14, 2}, 0, {22, 1296}, {28, 198, 110, 255} }},
|
||||||
|
{{ {84, 18, 2}, 0, {22, 1185}, {55, 237, 113, 255} }},
|
||||||
|
{{ {80, 15, 1}, 0, {-12, 1274}, {201, 115, 0, 255} }},
|
||||||
|
{{ {84, 18, 2}, 0, {22, 1185}, {55, 237, 113, 255} }},
|
||||||
|
{{ {83, 18, 1}, 0, {-12, 1177}, {136, 42, 0, 255} }},
|
||||||
|
{{ {84, 25, 2}, 0, {22, 978}, {36, 0, 122, 255} }},
|
||||||
|
{{ {83, 25, 1}, 0, {-12, 978}, {129, 0, 0, 255} }},
|
||||||
|
{{ {84, 18, 0}, 0, {-46, 1185}, {54, 237, 143, 255} }},
|
||||||
|
{{ {84, 25, 0}, 0, {-46, 978}, {35, 0, 134, 255} }},
|
||||||
|
{{ {81, 14, 0}, 0, {-46, 1296}, {27, 198, 146, 255} }},
|
||||||
|
{{ {75, 24, 2}, 0, {-16, 958}, {208, 0, 118, 255} }},
|
||||||
|
{{ {73, 24, 1}, 0, {-16, 1008}, {208, 0, 118, 255} }},
|
||||||
|
{{ {73, 18, 1}, 0, {141, 1008}, {208, 0, 118, 255} }},
|
||||||
|
{{ {75, 18, 2}, 0, {141, 958}, {208, 0, 118, 255} }},
|
||||||
|
{{ {73, 24, 1}, 0, {-16, 1008}, {208, 0, 139, 255} }},
|
||||||
|
{{ {75, 24, 1}, 0, {-16, 958}, {208, 0, 139, 255} }},
|
||||||
|
{{ {75, 18, 1}, 0, {-173, 958}, {208, 0, 139, 255} }},
|
||||||
|
{{ {73, 18, 1}, 0, {-173, 1008}, {208, 0, 139, 255} }},
|
||||||
|
{{ {75, 18, 1}, 0, {4, 1165}, {127, 0, 0, 255} }},
|
||||||
|
{{ {75, 24, 1}, 0, {4, 1008}, {127, 0, 0, 255} }},
|
||||||
|
{{ {75, 24, 2}, 0, {-36, 1008}, {127, 0, 0, 255} }},
|
||||||
|
{{ {75, 18, 2}, 0, {-36, 1165}, {127, 0, 0, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx shotgun_Arm_mesh_layer_1_tri_1[] = {
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_1 + 0, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 4, 5, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(9, 10, 11, 0),
|
||||||
|
gsSP1Triangle(9, 11, 12, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_1 + 16, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(3, 1, 0, 0),
|
||||||
|
gsSP1Triangle(3, 4, 1, 0),
|
||||||
|
gsSP1Triangle(5, 6, 7, 0),
|
||||||
|
gsSP1Triangle(5, 8, 6, 0),
|
||||||
|
gsSP1Triangle(8, 9, 6, 0),
|
||||||
|
gsSP1Triangle(8, 10, 9, 0),
|
||||||
|
gsSP1Triangle(11, 12, 13, 0),
|
||||||
|
gsSP1Triangle(11, 14, 12, 0),
|
||||||
|
gsSP1Triangle(15, 14, 11, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_1 + 32, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(1, 3, 2, 0),
|
||||||
|
gsSP1Triangle(1, 4, 3, 0),
|
||||||
|
gsSP1Triangle(2, 3, 5, 0),
|
||||||
|
gsSP1Triangle(2, 5, 6, 0),
|
||||||
|
gsSP1Triangle(7, 8, 9, 0),
|
||||||
|
gsSP1Triangle(7, 9, 10, 0),
|
||||||
|
gsSP1Triangle(10, 9, 11, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(13, 14, 15, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_1 + 48, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(2, 1, 3, 0),
|
||||||
|
gsSP1Triangle(2, 3, 4, 0),
|
||||||
|
gsSP1Triangle(5, 2, 4, 0),
|
||||||
|
gsSP1Triangle(5, 4, 6, 0),
|
||||||
|
gsSP1Triangle(7, 2, 5, 0),
|
||||||
|
gsSP1Triangle(7, 0, 2, 0),
|
||||||
|
gsSP1Triangle(8, 9, 10, 0),
|
||||||
|
gsSP1Triangle(8, 10, 11, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_1 + 64, 4, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx shotgun_Arm_mesh_layer_1_vtx_2[46] = {
|
||||||
|
{{ {196, 22, 3}, 0, {-160, -3197}, {0, 146, 63, 255} }},
|
||||||
|
{{ {79, 26, 6}, 0, {-419, 315}, {179, 0, 101, 255} }},
|
||||||
|
{{ {79, 22, 4}, 0, {-160, 315}, {179, 169, 51, 255} }},
|
||||||
|
{{ {196, 26, 6}, 0, {-419, -3197}, {0, 0, 127, 255} }},
|
||||||
|
{{ {79, 30, 4}, 0, {-678, 315}, {155, 38, 66, 255} }},
|
||||||
|
{{ {196, 30, 3}, 0, {-678, -3197}, {0, 64, 110, 255} }},
|
||||||
|
{{ {196, 22, -2}, 0, {-119, -3197}, {0, 146, 193, 255} }},
|
||||||
|
{{ {196, 22, 3}, 0, {-418, -3197}, {0, 146, 63, 255} }},
|
||||||
|
{{ {79, 22, 4}, 0, {-418, 315}, {179, 169, 51, 255} }},
|
||||||
|
{{ {79, 22, -1}, 0, {-119, 315}, {178, 169, 206, 255} }},
|
||||||
|
{{ {79, 22, 4}, 0, {-102, 546}, {179, 169, 51, 255} }},
|
||||||
|
{{ {79, 26, 6}, 0, {48, 416}, {179, 0, 101, 255} }},
|
||||||
|
{{ {79, 30, 4}, 0, {-102, 286}, {155, 38, 66, 255} }},
|
||||||
|
{{ {79, 26, -4}, 0, {-551, 416}, {178, 0, 156, 255} }},
|
||||||
|
{{ {79, 30, -1}, 0, {-401, 286}, {154, 38, 190, 255} }},
|
||||||
|
{{ {79, 22, -1}, 0, {-401, 546}, {178, 169, 206, 255} }},
|
||||||
|
{{ {196, 30, -2}, 0, {158, -3197}, {0, 63, 146, 255} }},
|
||||||
|
{{ {79, 26, -4}, 0, {-101, 315}, {178, 0, 156, 255} }},
|
||||||
|
{{ {79, 30, -1}, 0, {158, 315}, {154, 38, 190, 255} }},
|
||||||
|
{{ {196, 26, -4}, 0, {-101, -3197}, {0, 0, 129, 255} }},
|
||||||
|
{{ {79, 22, -1}, 0, {-360, 315}, {178, 169, 206, 255} }},
|
||||||
|
{{ {196, 22, -2}, 0, {-360, -3197}, {0, 146, 193, 255} }},
|
||||||
|
{{ {79, 30, -1}, 0, {-401, 286}, {154, 218, 190, 255} }},
|
||||||
|
{{ {79, 30, 4}, 0, {-102, 286}, {155, 218, 66, 255} }},
|
||||||
|
{{ {79, 35, 6}, 0, {48, 157}, {179, 0, 101, 255} }},
|
||||||
|
{{ {79, 39, -1}, 0, {-401, 27}, {178, 87, 206, 255} }},
|
||||||
|
{{ {79, 39, 4}, 0, {-102, 27}, {179, 87, 51, 255} }},
|
||||||
|
{{ {79, 35, -4}, 0, {-551, 157}, {178, 0, 156, 255} }},
|
||||||
|
{{ {79, 35, 6}, 0, {-938, 315}, {179, 0, 101, 255} }},
|
||||||
|
{{ {79, 30, 4}, 0, {-678, 315}, {155, 218, 66, 255} }},
|
||||||
|
{{ {196, 30, 3}, 0, {-678, -3197}, {0, 192, 110, 255} }},
|
||||||
|
{{ {196, 35, 6}, 0, {-938, -3197}, {0, 0, 127, 255} }},
|
||||||
|
{{ {79, 39, 4}, 0, {-1197, 315}, {179, 87, 51, 255} }},
|
||||||
|
{{ {79, 35, 6}, 0, {-938, 315}, {179, 0, 101, 255} }},
|
||||||
|
{{ {196, 35, 6}, 0, {-938, -3197}, {0, 0, 127, 255} }},
|
||||||
|
{{ {196, 39, 3}, 0, {-1197, -3197}, {0, 110, 63, 255} }},
|
||||||
|
{{ {79, 30, -1}, 0, {158, 315}, {154, 218, 190, 255} }},
|
||||||
|
{{ {196, 35, -4}, 0, {418, -3197}, {0, 0, 129, 255} }},
|
||||||
|
{{ {196, 30, -2}, 0, {158, -3197}, {0, 193, 146, 255} }},
|
||||||
|
{{ {79, 35, -4}, 0, {418, 315}, {178, 0, 156, 255} }},
|
||||||
|
{{ {196, 39, -2}, 0, {677, -3197}, {0, 110, 193, 255} }},
|
||||||
|
{{ {79, 39, -1}, 0, {677, 315}, {178, 87, 206, 255} }},
|
||||||
|
{{ {79, 39, -1}, 0, {-401, 315}, {178, 87, 206, 255} }},
|
||||||
|
{{ {79, 39, 4}, 0, {-102, 315}, {179, 87, 51, 255} }},
|
||||||
|
{{ {196, 39, 3}, 0, {-102, -3197}, {0, 110, 63, 255} }},
|
||||||
|
{{ {196, 39, -2}, 0, {-401, -3197}, {0, 110, 193, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx shotgun_Arm_mesh_layer_1_tri_2[] = {
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_2 + 0, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 3, 1, 0),
|
||||||
|
gsSP1Triangle(3, 4, 1, 0),
|
||||||
|
gsSP1Triangle(3, 5, 4, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(6, 8, 9, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(10, 12, 13, 0),
|
||||||
|
gsSP1Triangle(12, 14, 13, 0),
|
||||||
|
gsSP1Triangle(13, 15, 10, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_2 + 16, 16, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 3, 1, 0),
|
||||||
|
gsSP1Triangle(3, 4, 1, 0),
|
||||||
|
gsSP1Triangle(3, 5, 4, 0),
|
||||||
|
gsSP1Triangle(6, 7, 8, 0),
|
||||||
|
gsSP1Triangle(6, 8, 9, 0),
|
||||||
|
gsSP1Triangle(8, 10, 9, 0),
|
||||||
|
gsSP1Triangle(9, 11, 6, 0),
|
||||||
|
gsSP1Triangle(12, 13, 14, 0),
|
||||||
|
gsSP1Triangle(12, 14, 15, 0),
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_2 + 32, 14, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(0, 2, 3, 0),
|
||||||
|
gsSP1Triangle(4, 5, 6, 0),
|
||||||
|
gsSP1Triangle(4, 7, 5, 0),
|
||||||
|
gsSP1Triangle(7, 8, 5, 0),
|
||||||
|
gsSP1Triangle(7, 9, 8, 0),
|
||||||
|
gsSP1Triangle(10, 11, 12, 0),
|
||||||
|
gsSP1Triangle(10, 12, 13, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Vtx shotgun_Arm_mesh_layer_1_vtx_3[10] = {
|
||||||
|
{{ {196, 30, 3}, 0, {-95, 799}, {127, 0, 0, 255} }},
|
||||||
|
{{ {196, 26, 6}, 0, {-170, 928}, {127, 0, 0, 255} }},
|
||||||
|
{{ {196, 22, 3}, 0, {-95, 1058}, {127, 0, 0, 255} }},
|
||||||
|
{{ {196, 26, -4}, 0, {129, 928}, {127, 0, 0, 255} }},
|
||||||
|
{{ {196, 22, -2}, 0, {55, 1058}, {127, 0, 0, 255} }},
|
||||||
|
{{ {196, 30, -2}, 0, {55, 799}, {127, 0, 0, 255} }},
|
||||||
|
{{ {196, 35, 6}, 0, {-170, 669}, {127, 0, 0, 255} }},
|
||||||
|
{{ {196, 39, -2}, 0, {55, 540}, {127, 0, 0, 255} }},
|
||||||
|
{{ {196, 35, -4}, 0, {129, 669}, {127, 0, 0, 255} }},
|
||||||
|
{{ {196, 39, 3}, 0, {-95, 540}, {127, 0, 0, 255} }},
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx shotgun_Arm_mesh_layer_1_tri_3[] = {
|
||||||
|
gsSPVertex(shotgun_Arm_mesh_layer_1_vtx_3 + 0, 10, 0),
|
||||||
|
gsSP1Triangle(0, 1, 2, 0),
|
||||||
|
gsSP1Triangle(2, 3, 0, 0),
|
||||||
|
gsSP1Triangle(2, 4, 3, 0),
|
||||||
|
gsSP1Triangle(3, 5, 0, 0),
|
||||||
|
gsSP1Triangle(6, 0, 5, 0),
|
||||||
|
gsSP1Triangle(5, 7, 6, 0),
|
||||||
|
gsSP1Triangle(5, 8, 7, 0),
|
||||||
|
gsSP1Triangle(7, 9, 6, 0),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Gfx mat_shotgun_wood[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPSetLights1(shotgun_wood_lights),
|
||||||
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, shotgun_wood_rgba16),
|
||||||
|
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
|
||||||
|
gsDPLoadBlock(7, 0, 0, 1023, 256),
|
||||||
|
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0),
|
||||||
|
gsDPSetTileSize(0, 0, 0, 124, 124),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_shotgun_darkgray[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPSetLights1(shotgun_darkgray_lights),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_shotgun_metal[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT, TEXEL0, 0, SHADE, 0, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPSetGeometryMode(G_TEXTURE_GEN),
|
||||||
|
gsSPTexture(4032, 1984, 0, 0, 1),
|
||||||
|
gsSPSetLights1(shotgun_metal_lights),
|
||||||
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, shotgun_plat_rgba16),
|
||||||
|
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
|
||||||
|
gsDPLoadBlock(7, 0, 0, 2047, 128),
|
||||||
|
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 0, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 5, 0, G_TX_WRAP | G_TX_NOMIRROR, 6, 0),
|
||||||
|
gsDPSetTileSize(0, 0, 0, 252, 124),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_revert_shotgun_metal[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsSPClearGeometryMode(G_TEXTURE_GEN),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_shotgun_black_layer1[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
gsDPSetRenderMode(G_RM_ZB_OPA_SURF, G_RM_ZB_OPA_SURF2),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 1),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx mat_revert_shotgun_black_layer1[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx shotgun_Arm_mesh_layer_1[] = {
|
||||||
|
gsSPDisplayList(mat_shotgun_wood),
|
||||||
|
gsSPDisplayList(shotgun_Arm_mesh_layer_1_tri_0),
|
||||||
|
gsSPDisplayList(mat_shotgun_darkgray),
|
||||||
|
gsSPDisplayList(shotgun_Arm_mesh_layer_1_tri_1),
|
||||||
|
gsSPDisplayList(mat_shotgun_metal),
|
||||||
|
gsSPDisplayList(shotgun_Arm_mesh_layer_1_tri_2),
|
||||||
|
gsSPDisplayList(mat_revert_shotgun_metal),
|
||||||
|
gsSPDisplayList(mat_shotgun_black_layer1),
|
||||||
|
gsSPDisplayList(shotgun_Arm_mesh_layer_1_tri_3),
|
||||||
|
gsSPDisplayList(mat_revert_shotgun_black_layer1),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
Gfx shotgun_material_revert_render_settings[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsSPSetGeometryMode(G_LIGHTING),
|
||||||
|
gsSPClearGeometryMode(G_TEXTURE_GEN),
|
||||||
|
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
|
||||||
|
gsSPTexture(65535, 65535, 0, 0, 0),
|
||||||
|
gsDPSetEnvColor(255, 255, 255, 255),
|
||||||
|
gsDPSetAlphaCompare(G_AC_NONE),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
BIN
mods/gun-mod/actors/shotgun/plat.rgba16.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
mods/gun-mod/actors/shotgun/wood.rgba16.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
mods/gun-mod/actors/shotgun_geo.bin
Normal file
7
mods/gun-mod/actors/troll_explosion/geo.inc.c
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
const GeoLayout troll_explosion_geo[] = {
|
||||||
|
GEO_NODE_START(),
|
||||||
|
GEO_OPEN_NODE(),
|
||||||
|
GEO_DISPLAY_LIST(LAYER_TRANSPARENT, troll_explosion),
|
||||||
|
GEO_CLOSE_NODE(),
|
||||||
|
GEO_END(),
|
||||||
|
};
|
38
mods/gun-mod/actors/troll_explosion/model.inc.c
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
static const Vtx explosion_seg3_vertex_030009C8[] = {
|
||||||
|
{{{ -128, -128, 0}, 0, { 0, 992}, {0xff, 0xff, 0xff, 0xff}}},
|
||||||
|
{{{ 128, -128, 0}, 0, { 992, 992}, {0xff, 0xff, 0xff, 0xff}}},
|
||||||
|
{{{ 128, 128, 0}, 0, { 992, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||||
|
{{{ -128, 128, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||||
|
};
|
||||||
|
|
||||||
|
// 0x03000A08
|
||||||
|
ALIGNED8 const Texture troll_explosion_texture[] = {
|
||||||
|
#include "actors/troll_explosion/troll_explosion.rgba16.inc.c"
|
||||||
|
};
|
||||||
|
|
||||||
|
// 0x03004208 - 0x03004298
|
||||||
|
const Gfx explosion_seg3_dl_03004208[] = {
|
||||||
|
gsDPSetCombineMode(G_CC_DECALFADEA, G_CC_DECALFADEA),
|
||||||
|
gsDPSetEnvColor(255, 255, 255, 150),
|
||||||
|
gsSPClearGeometryMode(G_LIGHTING),
|
||||||
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
|
||||||
|
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
|
||||||
|
gsDPLoadSync(),
|
||||||
|
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 32 * 32 - 1, CALC_DXT(32, G_IM_SIZ_16b_BYTES)),
|
||||||
|
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 5, G_TX_NOLOD, G_TX_CLAMP, 5, G_TX_NOLOD),
|
||||||
|
gsDPSetTileSize(0, 0, 0, (32 - 1) << G_TEXTURE_IMAGE_FRAC, (32 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||||
|
gsSPVertex(explosion_seg3_vertex_030009C8, 4, 0),
|
||||||
|
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||||
|
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_OFF),
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsSPSetGeometryMode(G_LIGHTING),
|
||||||
|
gsDPSetEnvColor(255, 255, 255, 255),
|
||||||
|
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
|
||||||
|
gsSPEndDisplayList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
const Gfx troll_explosion[] = {
|
||||||
|
gsDPPipeSync(),
|
||||||
|
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, troll_explosion_texture),
|
||||||
|
gsSPBranchList(explosion_seg3_dl_03004208),
|
||||||
|
};
|
BIN
mods/gun-mod/actors/troll_explosion/troll_explosion.rgba16.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
mods/gun-mod/actors/troll_explosion_geo.bin
Normal file
490
mods/gun-mod/b-bullet.lua
Normal file
|
@ -0,0 +1,490 @@
|
||||||
|
----------------------
|
||||||
|
-- bullet functions --
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @return nil
|
||||||
|
function bullet_ricochet(obj)
|
||||||
|
if obj == nil then return end
|
||||||
|
|
||||||
|
-- ricochet
|
||||||
|
obj.oAction = 1
|
||||||
|
if obj.oVelY == 0 then
|
||||||
|
obj.oForwardVel = -obj.oForwardVel
|
||||||
|
else
|
||||||
|
obj.oVelX = -obj.oVelX
|
||||||
|
obj.oVelY = -obj.oVelY
|
||||||
|
obj.oVelZ = -obj.oVelZ
|
||||||
|
end
|
||||||
|
obj.oPosX = obj.header.gfx.prevPos.x
|
||||||
|
obj.oPosY = obj.header.gfx.prevPos.y
|
||||||
|
obj.oPosZ = obj.header.gfx.prevPos.z
|
||||||
|
|
||||||
|
audio_sample_play(SOUND_CUSTOM_RICOCHET, { x = obj.oPosX, y = obj.oPosY, z = obj.oPosZ }, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
local function bullet_hit(obj)
|
||||||
|
spawn_mist_particles()
|
||||||
|
|
||||||
|
--[[if obj_count_objects_with_behavior_id(id_bhvBulletHole) < 100 then
|
||||||
|
local raycast = collision_find_surface_on_ray(obj.header.gfx.prevPos.x, obj.header.gfx.prevPos.y, obj.header.gfx.prevPos.z, obj.oVelX, obj.oVelY, obj.oVelZ)
|
||||||
|
if raycast.surface ~= nil and (cur_obj_detect_steep_floor(89) == 0 or cur_obj_detect_steep_floor(-89)) then
|
||||||
|
spawn_non_sync_object(
|
||||||
|
id_bhvBulletHole,
|
||||||
|
E_MODEL_BULLET_HOLE,
|
||||||
|
raycast.hitPos.x, raycast.hitPos.y, raycast.hitPos.z,
|
||||||
|
--- @param o Object
|
||||||
|
function(o)
|
||||||
|
o.parentObj = raycast.surface.object
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end]]
|
||||||
|
|
||||||
|
obj_mark_for_deletion(obj)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
---------------------------
|
||||||
|
-- hitbox hurt functions --
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_player(obj, bulletObj)
|
||||||
|
local m = gMarioStates[network_local_index_from_global(obj.globalPlayerIndex)]
|
||||||
|
if (m.flags & MARIO_METAL_CAP) ~= 0 then
|
||||||
|
bullet_ricochet(bulletObj)
|
||||||
|
play_sound(SOUND_GENERAL_METAL_POUND, m.marioObj.header.gfx.cameraToObject)
|
||||||
|
return false
|
||||||
|
elseif (m.flags & MARIO_VANISH_CAP) ~= 0 or m.invincTimer > 0 or (m.action & ACT_FLAG_INTANGIBLE) ~= 0 then
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
packet_send(true, PACKET_ATTACK, { globalIndex = obj.globalPlayerIndex, weaponId = obj_get_weapon_id(bulletObj), yoshi = bulletObj.oAction == 2 })
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_star(_, bulletObj)
|
||||||
|
bullet_ricochet(bulletObj)
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_sign(obj, bulletObj)
|
||||||
|
if obj.oGmHealth <= 0 or gWeaponTable[obj_get_weapon_id(bulletObj)].strong then
|
||||||
|
obj.oFaceAnglePitch = -0x4000
|
||||||
|
obj.oInteractType = 0
|
||||||
|
obj.hitboxRadius = 0
|
||||||
|
obj.hitboxHeight = 0
|
||||||
|
network_send_object(obj, false)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_toad(obj)
|
||||||
|
obj_spawn_yellow_coins(obj, 1)
|
||||||
|
obj_mark_for_deletion(obj)
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_exclamation_box(obj)
|
||||||
|
if obj.oAction < 4 then
|
||||||
|
obj.oAction = 4
|
||||||
|
network_send_object(obj, true)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_breakable_box(obj)
|
||||||
|
if obj.oGmHealth <= 0 then
|
||||||
|
obj.oInteractStatus = INT_STATUS_INTERACTED | INT_STATUS_WAS_ATTACKED
|
||||||
|
network_send_object(obj, false)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_breakable_box_small(obj)
|
||||||
|
obj.oInteractStatus = ATTACK_KICK_OR_TRIP | INT_STATUS_INTERACTED | INT_STATUS_WAS_ATTACKED | INT_STATUS_STOP_RIDING
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_bowling_ball(obj, bulletObj)
|
||||||
|
if obj.oGmHealth <= 0 or gWeaponTable[obj_get_weapon_id(bulletObj)].strong then
|
||||||
|
play_sound(SOUND_GENERAL_BREAK_BOX, obj.header.gfx.cameraToObject)
|
||||||
|
spawn_triangle_break_particles(30, 138, 3, 4)
|
||||||
|
obj_mark_for_deletion(obj)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_water_bomb(obj)
|
||||||
|
play_sound(SOUND_OBJ_DIVING_IN_WATER, obj.header.gfx.cameraToObject)
|
||||||
|
set_camera_shake_from_point(SHAKE_POS_SMALL, obj.oPosX, obj.oPosY, obj.oPosZ)
|
||||||
|
obj.oAction = WATER_BOMB_ACT_EXPLODE
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_tree(obj, bulletObj)
|
||||||
|
for _ = 1, 10 do
|
||||||
|
spawn_non_sync_object(
|
||||||
|
id_bhvLeafParticleSpawner,
|
||||||
|
E_MODEL_NONE,
|
||||||
|
bulletObj.oPosX, bulletObj.oPosY, bulletObj.oPosZ,
|
||||||
|
nil
|
||||||
|
)
|
||||||
|
end
|
||||||
|
play_sound(SOUND_ACTION_CLIMB_UP_TREE, obj.header.gfx.cameraToObject)
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_chain_chomp(obj, bulletObj)
|
||||||
|
if gWeaponTable[obj_get_weapon_id(bulletObj)].strong then
|
||||||
|
for _ = 1, 5 do
|
||||||
|
spawn_non_sync_object(
|
||||||
|
id_bhvExplosion,
|
||||||
|
E_MODEL_EXPLOSION,
|
||||||
|
obj.oPosX + math.random(-200, 200), obj.oPosY + 90 + math.random(-200, 200), obj.oPosZ + math.random(-200, 200),
|
||||||
|
nil
|
||||||
|
)
|
||||||
|
end
|
||||||
|
obj_mark_for_deletion(obj)
|
||||||
|
else
|
||||||
|
obj.oForwardVel = obj.oForwardVel - 5
|
||||||
|
obj.oVelY = -20
|
||||||
|
obj.oGravity = -4
|
||||||
|
end
|
||||||
|
network_send_object(obj, false)
|
||||||
|
play_sound(SOUND_GENERAL_CHAIN_CHOMP1, obj.header.gfx.cameraToObject)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_goomba(obj, bulletObj)
|
||||||
|
if gWeaponTable[obj_get_weapon_id(bulletObj)].strong then
|
||||||
|
obj.oInteractStatus = ATTACK_GROUND_POUND_OR_TWIRL | INT_STATUS_INTERACTED | INT_STATUS_WAS_ATTACKED
|
||||||
|
else
|
||||||
|
obj.oInteractStatus = ATTACK_KICK_OR_TRIP | INT_STATUS_INTERACTED | INT_STATUS_WAS_ATTACKED
|
||||||
|
end
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_bobomb(obj)
|
||||||
|
if obj.oAction ~= BOBOMB_ACT_EXPLODE then
|
||||||
|
obj.oAction = BOBOMB_ACT_LAUNCHED
|
||||||
|
end
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_amp(obj, bulletObj)
|
||||||
|
if gWeaponTable[obj_get_weapon_id(bulletObj)].strong then
|
||||||
|
play_sound(SOUND_GENERAL_BREAK_BOX, obj.header.gfx.cameraToObject)
|
||||||
|
spawn_triangle_break_particles(30, 138, 3, 4)
|
||||||
|
obj_mark_for_deletion(obj)
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
bullet_ricochet(bulletObj)
|
||||||
|
play_sound(SOUND_ACTION_METAL_BONK, obj.header.gfx.cameraToObject)
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_koopa(obj)
|
||||||
|
if obj.oKoopaMovementType == KOOPA_BP_UNSHELLED or obj.oKoopaMovementType == KOOPA_BP_NORMAL then
|
||||||
|
obj.oInteractStatus = ATTACK_KICK_OR_TRIP + (INT_STATUS_INTERACTED | INT_STATUS_WAS_ATTACKED)
|
||||||
|
network_send_object(obj, false)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_snufit(obj)
|
||||||
|
obj.oInteractStatus = ATTACK_PUNCH + (INT_STATUS_INTERACTED | INT_STATUS_WAS_ATTACKED)
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_chuckya(obj)
|
||||||
|
obj_spawn_loot_yellow_coins(obj, 5, 20)
|
||||||
|
play_sound(SOUND_OBJ_CHUCKYA_DEATH, obj.header.gfx.cameraToObject)
|
||||||
|
obj_mark_for_deletion(obj)
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_piranha_plant(obj)
|
||||||
|
obj.oAction = PIRANHA_PLANT_ACT_ATTACKED
|
||||||
|
stop_secondary_music(50)
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_spindrift(obj)
|
||||||
|
obj.oInteractStatus = ATTACK_PUNCH + (INT_STATUS_INTERACTED | INT_STATUS_WAS_ATTACKED | INT_ATTACK_NOT_FROM_BELOW)
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_mr_blizzard(obj)
|
||||||
|
play_sound(SOUND_OBJ_SNOWMAN_EXPLODE, obj.header.gfx.cameraToObject)
|
||||||
|
obj_mark_for_deletion(obj)
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_scuttlebug(obj)
|
||||||
|
play_sound(SOUND_OBJ_DYING_ENEMY1, obj.header.gfx.cameraToObject)
|
||||||
|
obj_spawn_loot_yellow_coins(obj, obj.oNumLootCoins, 20)
|
||||||
|
obj_mark_for_deletion(obj)
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_pokey(obj)
|
||||||
|
obj.oInteractStatus = ATTACK_PUNCH + (INT_STATUS_INTERACTED | INT_STATUS_WAS_ATTACKED)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_mr_i(obj)
|
||||||
|
obj.oAction = 3
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_bully(obj, bulletObj)
|
||||||
|
obj.oAction = BULLY_ACT_KNOCKBACK
|
||||||
|
obj.oMoveAngleYaw = gMarioStates[network_local_index_from_global(obj_get_weapon_owner(bulletObj))].faceAngle.y
|
||||||
|
obj.oVelY = 30
|
||||||
|
obj.oForwardVel = if_then_else(gWeaponTable[obj_get_weapon_id(bulletObj)].strong, 30, 10)
|
||||||
|
obj.oInteractStatus = ATTACK_PUNCH + (INT_STATUS_INTERACTED | INT_STATUS_WAS_ATTACKED | INT_ATTACK_NOT_FROM_BELOW)
|
||||||
|
network_send_object(obj, false)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_king_bobomb(obj, bulletObj)
|
||||||
|
if (obj.oGmHealth <= 0 or gWeaponTable[obj_get_weapon_id(bulletObj)].strong) and obj.oHealth > 0 then
|
||||||
|
obj.oGmHealth = HEALTH_KING_BOBOMB
|
||||||
|
obj.oMoveFlags = obj.oMoveFlags | OBJ_MOVE_LANDED
|
||||||
|
obj.oAction = 4
|
||||||
|
network_send_object(obj, true)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
function hurt_bowser(obj)
|
||||||
|
if obj.oGmHealth <= 0 and obj.oHealth > 0 then
|
||||||
|
obj.oGmHealth = HEALTH_BOWSER
|
||||||
|
obj.oHealth = obj.oHealth - 1
|
||||||
|
if obj.oHealth <= 0 then
|
||||||
|
obj.oAction = 4
|
||||||
|
else
|
||||||
|
obj.oAction = 12
|
||||||
|
end
|
||||||
|
network_send_object(obj, true)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- @param bulletObj Object
|
||||||
|
function hurt_yoshi(_, bulletObj)
|
||||||
|
bulletObj.oAction = 2
|
||||||
|
bullet_ricochet(bulletObj)
|
||||||
|
|
||||||
|
djui_chat_message_create("\\#a0ffa0\\Yoshi\\#dcdcdc\\: no lol")
|
||||||
|
play_sound(SOUND_MENU_MESSAGE_APPEAR, gGlobalSoundSource)
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-------------
|
||||||
|
-- objects --
|
||||||
|
-------------
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_debug_indicator_init(o)
|
||||||
|
o.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
|
||||||
|
obj_set_billboard(o)
|
||||||
|
cur_obj_scale(0.5)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function bhv_debug_indicator_loop(o)
|
||||||
|
if o.oTimer > 90 then obj_mark_for_deletion(o) end
|
||||||
|
end
|
||||||
|
|
||||||
|
id_bhvDebugIndicator = hook_behavior(nil, OBJ_LIST_UNIMPORTANT, true, bhv_debug_indicator_init, bhv_debug_indicator_loop)
|
||||||
|
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_bullet_init(o)
|
||||||
|
o.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
|
||||||
|
o.oGraphYOffset = if_then_else(obj_has_model_extended(o, E_MODEL_YELLOW_COIN) ~= 0, -5, 0)
|
||||||
|
o.hitboxRadius = 20
|
||||||
|
o.hitboxHeight = 20
|
||||||
|
o.hitboxDownOffset = 10
|
||||||
|
o.oWallHitboxRadius = 30
|
||||||
|
o.oIntangibleTimer = 0
|
||||||
|
|
||||||
|
vec3f_set(o.header.gfx.pos, o.oPosX, o.oPosY, o.oPosZ)
|
||||||
|
obj_set_billboard(o)
|
||||||
|
cur_obj_scale(gWeaponTable[obj_get_weapon_id(o)].bulletScale)
|
||||||
|
cur_obj_hide()
|
||||||
|
network_init_object(o, true, {})
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_bullet_loop(o)
|
||||||
|
if o.oTimer > 150 then
|
||||||
|
obj_mark_for_deletion(o)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if o.oTimer == 1 then cur_obj_unhide() end
|
||||||
|
|
||||||
|
local prevPos = { x = o.oPosX, y = o.oPosY, z = o.oPosZ }
|
||||||
|
if o.oVelY == 0 then
|
||||||
|
cur_obj_move_xz_using_fvel_and_yaw()
|
||||||
|
else
|
||||||
|
cur_obj_move_using_vel()
|
||||||
|
end
|
||||||
|
cur_obj_update_floor_and_resolve_wall_collisions(0)
|
||||||
|
|
||||||
|
local marioObj = gMarioStates[network_local_index_from_global(obj_get_weapon_owner(o))].marioObj
|
||||||
|
local shootableHitboxes = gShootableHitboxes -- localizing saves microseconds
|
||||||
|
-- loop through every shootable behavior
|
||||||
|
for behavior, hurt in pairs(shootableHitboxes) do
|
||||||
|
-- get the nearest object with the current shootable behavior
|
||||||
|
local target = obj_get_nearest_object_with_behavior_id(o, behavior)
|
||||||
|
if target ~= nil then
|
||||||
|
-- check if the bullet (o) intersects with the target object (target)
|
||||||
|
local shot = obj_check_hitbox_overlap(target, o)
|
||||||
|
-- if not, begin using the substep system to see if hitboxes overlap then
|
||||||
|
local weapon = gWeaponTable[obj_get_weapon_id(o)]
|
||||||
|
if not shot then
|
||||||
|
local bulletSteps = weapon.bulletSteps
|
||||||
|
for i = 0, bulletSteps do
|
||||||
|
local step = i / bulletSteps
|
||||||
|
-- go from the previous position of the bullet to the current one over bullet steps
|
||||||
|
local x = lerp(prevPos.x, o.oPosX, step)
|
||||||
|
local y = lerp(prevPos.y, o.oPosY, step)
|
||||||
|
local z = lerp(prevPos.z, o.oPosZ, step)
|
||||||
|
-- spawn_non_sync_object(id_bhvDebugIndicator, E_MODEL_RED_COIN_NO_SHADOW, x, y, z, nil)
|
||||||
|
-- check if the bullet (o) now intersects with target object (target)
|
||||||
|
shot = obj_check_hitbox_overlap_xyz(target, o, x, y, z)
|
||||||
|
-- hit target and break out of loop if so, otherwise continue
|
||||||
|
if shot and (marioObj._pointer ~= target._pointer or o.oAction > 0) then
|
||||||
|
target.oGmHealth = target.oGmHealth - weapon.damage
|
||||||
|
if hurt ~= nil and hurt(target, o) then
|
||||||
|
bullet_hit(o)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif marioObj._pointer ~= target._pointer or o.oAction > 0 then
|
||||||
|
target.oGmHealth = target.oGmHealth - weapon.damage
|
||||||
|
if hurt ~= nil and hurt(target, o) then
|
||||||
|
bullet_hit(o)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- spawn_non_sync_object(id_bhvDebugIndicator, E_MODEL_YELLOW_COIN_NO_SHADOW, prevPos.x, prevPos.y, prevPos.z, nil)
|
||||||
|
-- spawn_non_sync_object(id_bhvDebugIndicator, E_MODEL_YELLOW_COIN_NO_SHADOW, o.oPosX, o.oPosY, o.oPosZ, nil)
|
||||||
|
|
||||||
|
local raycast = collision_find_surface_on_ray(prevPos.x, prevPos.y, prevPos.z, o.oPosX - prevPos.x, o.oPosY - prevPos.y, o.oPosZ - prevPos.z)
|
||||||
|
if raycast.surface ~= nil or (o.oMoveFlags & OBJ_MOVE_HIT_WALL) ~= 0 then
|
||||||
|
vec3f_to_object_pos(o, raycast.hitPos)
|
||||||
|
bullet_hit(o)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
id_bhvBullet = hook_behavior(nil, OBJ_LIST_UNIMPORTANT, true, bhv_bullet_init, bhv_bullet_loop, "bhvGmBullet")
|
||||||
|
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_bullet_hole_init(o)
|
||||||
|
o.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_bullet_hole_loop(o)
|
||||||
|
cur_obj_align_gfx_with_floor()
|
||||||
|
if o.oTimer == 450 then obj_mark_for_deletion(o) end
|
||||||
|
end
|
||||||
|
|
||||||
|
id_bhvBulletHole = hook_behavior(nil, OBJ_LIST_UNIMPORTANT, true, bhv_bullet_hole_init, bhv_bullet_hole_loop, "bhvGmBulletHole")
|
||||||
|
|
||||||
|
|
||||||
|
function spawn_bullets_player(x, y, z, count)
|
||||||
|
local weapon = cur_weapon()
|
||||||
|
if weapon == nil then return end
|
||||||
|
--- @type MarioState
|
||||||
|
local m = gMarioStates[0]
|
||||||
|
|
||||||
|
for _ = 1, count do
|
||||||
|
local spread = math.random() * weapon.spread
|
||||||
|
spawn_sync_object(
|
||||||
|
id_bhvBullet,
|
||||||
|
weapon.bulletModel,
|
||||||
|
x + spread, y + spread, z + spread,
|
||||||
|
--- @param o Object
|
||||||
|
function(o)
|
||||||
|
obj_set_weapon_params(o, gNetworkPlayers[0].globalIndex, weapon.id, 0, 0)
|
||||||
|
local enabled = get_first_person_enabled()
|
||||||
|
o.oFaceAngleYaw = if_then_else(enabled, m.area.camera.yaw + 0x8000, m.faceAngle.y)
|
||||||
|
o.oForwardVel = weapon.bulletSpeed
|
||||||
|
|
||||||
|
if enabled or (m.input & INPUT_FIRST_PERSON) ~= 0 then
|
||||||
|
-- thanks Peachy
|
||||||
|
local dx = m.area.camera.focus.x - m.area.camera.pos.x
|
||||||
|
local dy = m.area.camera.focus.y - m.area.camera.pos.y
|
||||||
|
local dz = m.area.camera.focus.z - m.area.camera.pos.z
|
||||||
|
local dv = math.sqrt(dx * dx + dy * dy + dz * dz)
|
||||||
|
o.oVelX = weapon.bulletSpeed * (dx / dv)
|
||||||
|
o.oVelY = weapon.bulletSpeed * (dy / dv)
|
||||||
|
o.oVelZ = weapon.bulletSpeed * (dz / dv)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
89
mods/gun-mod/b-gun.lua
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
if SM64COOPDX_VERSION == nil then return end
|
||||||
|
|
||||||
|
--- @param weapon Weapon
|
||||||
|
--- @return nil
|
||||||
|
function common_shoot(weapon)
|
||||||
|
--- @type MarioState
|
||||||
|
local m = gMarioStates[0]
|
||||||
|
|
||||||
|
if not weapon.reqCheck(m) then return end
|
||||||
|
|
||||||
|
if weapon.ammo <= 0 and weapon.maxAmmo > 0 then
|
||||||
|
audio_sample_play(SOUND_CUSTOM_DRY, gMarioStates[0].pos, 1)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local enabled = get_first_person_enabled()
|
||||||
|
local x = if_then_else(enabled, gLakituState.pos.x, m.pos.x)
|
||||||
|
local y = if_then_else(enabled, gLakituState.pos.y, m.pos.y + FIRST_PERSON_MARIO_HEAD_POS_SHORT)
|
||||||
|
local z = if_then_else(enabled, gLakituState.pos.z, m.pos.z)
|
||||||
|
|
||||||
|
spawn_bullets_player(x, y, z, weapon.bulletCount)
|
||||||
|
if #weapon.primarySounds > 0 then
|
||||||
|
sync_audio_sample_play(weapon.primarySounds[math.random(#weapon.primarySounds)], gMarioStates[0].pos, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if weapon.maxAmmo > 0 then
|
||||||
|
weapon.ammo = weapon.ammo - 1
|
||||||
|
if weapon.ammo == 0 then common_reload(weapon) end
|
||||||
|
end
|
||||||
|
|
||||||
|
useDualWieldWeapon = not useDualWieldWeapon
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param weapon Weapon
|
||||||
|
--- @return nil
|
||||||
|
function common_reload(weapon)
|
||||||
|
--- @type MarioState
|
||||||
|
local m = gMarioStates[0]
|
||||||
|
if weapon.reloadTimer > 0 or not weapon.reqCheck(m) then return end
|
||||||
|
|
||||||
|
local weapon2 = if_then_else(useDualWieldWeapon, cur_weapon(), cur_dual_wield_weapon())
|
||||||
|
if weapon.ammo >= weapon.maxAmmo then
|
||||||
|
weapon.cooldownTimer = 0
|
||||||
|
if weapon2 ~= nil then
|
||||||
|
if weapon2.ammo >= weapon2.maxAmmo then
|
||||||
|
weapon2.cooldownTimer = 0
|
||||||
|
else
|
||||||
|
if #weapon.secondarySounds > 0 then
|
||||||
|
sync_audio_sample_play(weapon.secondarySounds[math.random(#weapon.secondarySounds)], m.pos, 1)
|
||||||
|
end
|
||||||
|
weapon2.ammo = 0
|
||||||
|
weapon2.reloadTimer = weapon2.reloadTime
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if weapon2 ~= nil then
|
||||||
|
if weapon2.ammo >= weapon2.maxAmmo then
|
||||||
|
weapon2.cooldownTimer = 0
|
||||||
|
else
|
||||||
|
if #weapon.secondarySounds > 0 then
|
||||||
|
sync_audio_sample_play(weapon.secondarySounds[math.random(#weapon.secondarySounds)], m.pos, 1)
|
||||||
|
end
|
||||||
|
weapon2.ammo = 0
|
||||||
|
weapon2.reloadTimer = weapon2.reloadTime
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if #weapon.secondarySounds > 0 then
|
||||||
|
sync_audio_sample_play(weapon.secondarySounds[math.random(#weapon.secondarySounds)], m.pos, 1)
|
||||||
|
end
|
||||||
|
weapon.ammo = 0
|
||||||
|
weapon.reloadTimer = weapon.reloadTime
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param m MarioState
|
||||||
|
function check_common_gun_requirements(m)
|
||||||
|
return m.health > 0xFF and
|
||||||
|
m.action ~= ACT_STAR_DANCE_EXIT and
|
||||||
|
m.action ~= ACT_STAR_DANCE_NO_EXIT and
|
||||||
|
m.action ~= ACT_STAR_DANCE_WATER and
|
||||||
|
m.action ~= ACT_LEDGE_GRAB and
|
||||||
|
m.action ~= ACT_LEDGE_CLIMB_FAST and
|
||||||
|
m.action ~= ACT_LEDGE_CLIMB_SLOW_1 and
|
||||||
|
m.action ~= ACT_LEDGE_CLIMB_SLOW_2 and
|
||||||
|
(m.action & ACT_GROUP_MASK) ~= ACT_GROUP_SUBMERGED and
|
||||||
|
m.action ~= ACT_DISAPPEARED
|
||||||
|
end
|
42
mods/gun-mod/c-dialog-arrow.lua
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
local seen = false
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_dialog_arrow_init(o)
|
||||||
|
o.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
|
||||||
|
|
||||||
|
o.parentObj = obj_get_nearest_object_with_behavior_id(o, id_bhvMessagePanel)
|
||||||
|
if o.parentObj == nil then
|
||||||
|
obj_mark_for_deletion(o)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
o.oDrawingDistance = o.parentObj.oDrawingDistance
|
||||||
|
o.oPosX = o.parentObj.oPosX
|
||||||
|
o.oPosY = o.parentObj.oPosY + 150
|
||||||
|
o.oPosZ = o.parentObj.oPosZ
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_dialog_arrow_loop(o)
|
||||||
|
o.oGraphYOffset = math.sin(o.oTimer * 0.1) * 20
|
||||||
|
|
||||||
|
if gMarioStates[0].interactObj == o.parentObj then
|
||||||
|
seen = true
|
||||||
|
obj_mark_for_deletion(o)
|
||||||
|
elseif o.parentObj.oInteractType == 0 then
|
||||||
|
obj_mark_for_deletion(o)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local id_bhvDialogArrow = hook_behavior(nil, OBJ_LIST_UNIMPORTANT, true, bhv_dialog_arrow_init, bhv_dialog_arrow_loop)
|
||||||
|
|
||||||
|
function spawn_dialog_arrow()
|
||||||
|
if gNetworkPlayers[0].currLevelNum ~= LEVEL_CASTLE_GROUNDS or not level_is_vanilla_level(LEVEL_CASTLE_GROUNDS) or seen then return end
|
||||||
|
|
||||||
|
spawn_non_sync_object(
|
||||||
|
id_bhvDialogArrow,
|
||||||
|
E_MODEL_ARROW,
|
||||||
|
-1567, 386, 3492,
|
||||||
|
nil
|
||||||
|
)
|
||||||
|
end
|
96
mods/gun-mod/c-viewmodel-animations.lua
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
smlua_anim_util_register_animation("arm_idle",
|
||||||
|
0,
|
||||||
|
189,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
60,
|
||||||
|
{
|
||||||
|
0x0000, 0xFFDD, 0x0000, 0x0000, 0x0000, 0xDFFF, 0xE000, 0xE002, 0xE006,
|
||||||
|
0xE00B, 0xE011, 0xE019, 0xE021, 0xE02A, 0xE034, 0xE03F, 0xE04A, 0xE056,
|
||||||
|
0xE061, 0xE06E, 0xE07A, 0xE086, 0xE092, 0xE09E, 0xE0AA, 0xE0B5, 0xE0C0,
|
||||||
|
0xE0CA, 0xE0D3, 0xE0DB, 0xE0E2, 0xE0E9, 0xE0EE, 0xE0F1, 0xE0F4, 0xE0F5,
|
||||||
|
0xE0F4, 0xE0F1, 0xE0EE, 0xE0E9, 0xE0E2, 0xE0DB, 0xE0D3, 0xE0CA, 0xE0C0,
|
||||||
|
0xE0B5, 0xE0AA, 0xE09E, 0xE092, 0xE086, 0xE07A, 0xE06E, 0xE061, 0xE056,
|
||||||
|
0xE04A, 0xE03F, 0xE034, 0xE02A, 0xE021, 0xE019, 0xE011, 0xE00B, 0xE006,
|
||||||
|
0xE002, 0xE000, 0xDFFF, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0xFFFF,
|
||||||
|
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0x0000, 0xFFFF, 0xFFFF,
|
||||||
|
0xFFFF, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0xFFFF,
|
||||||
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
0x0000, 0x0000, 0x0000, 0x0000, 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, 0x0000,
|
||||||
|
0x0000, 0x0000, 0x0000, 0x0000, 0xFFFF, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0x0000, 0xFFFF, 0x0000, 0xFFFF,
|
||||||
|
0x0000, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
|
||||||
|
0x0000, 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, 0xFFFF,
|
||||||
|
0xFFFF, 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0xFFFF,
|
||||||
|
0x0000, 0xFFFF, 0x0000, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
|
||||||
|
0xFFFF, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0x0000, 0xFFFF, 0x0000,
|
||||||
|
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0x0000, 0x0000, 0xFFFF, 0x0000,
|
||||||
|
0x0000, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0x2000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0x0001, 0x0000, 0x0001, 0x0001, 0x0001, 0x0002, 0x0001, 0x0003, 0x0001,
|
||||||
|
0x0004, 0x003D, 0x0005, 0x003D, 0x0042, 0x003D, 0x007F, 0x0001, 0x00BC,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
smlua_anim_util_register_animation("arm_reload_start",
|
||||||
|
1,
|
||||||
|
189,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
15,
|
||||||
|
{
|
||||||
|
0x0000, 0xFFE7, 0x0000, 0x0000, 0x0000, 0xDFFF, 0xE178, 0xE4FF, 0xE938,
|
||||||
|
0xECBF, 0xEE38, 0xECF3, 0xE973, 0xE428, 0xDD93, 0xD64E, 0xCF09, 0xC874,
|
||||||
|
0xC32A, 0xBFA9, 0xBE64, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF,
|
||||||
|
0x0000, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF,
|
||||||
|
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFF, 0xFFFF,
|
||||||
|
0xFFFF, 0x0000, 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0x2000, 0x2000,
|
||||||
|
0x2000, 0x2000, 0x2000, 0x2000, 0x1F2B, 0x1CE6, 0x1984, 0x155F, 0x10D5,
|
||||||
|
0x0C4C, 0x0826, 0x04C5, 0x027F, 0x01AA,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0x0001, 0x0000, 0x0001, 0x0001, 0x0001, 0x0002, 0x0001, 0x0003, 0x0001,
|
||||||
|
0x0004, 0x0010, 0x0005, 0x000F, 0x0015, 0x0010, 0x0024, 0x0010, 0x0034,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
smlua_anim_util_register_animation("arm_reload_end",
|
||||||
|
1,
|
||||||
|
189,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
15,
|
||||||
|
{
|
||||||
|
0x0000, 0xFFDD, 0x0000, 0x0000, 0x0000, 0xBE64, 0xBECF, 0xBFFC, 0xC1D1,
|
||||||
|
0xC432, 0xC704, 0xCA28, 0xCD7E, 0xD0E5, 0xD43C, 0xD760, 0xDA31, 0xDC92,
|
||||||
|
0xDE67, 0xDF94, 0xDFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, 0xFFFF,
|
||||||
|
0x0000, 0x0000, 0x0000, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, 0x0000,
|
||||||
|
0x0000, 0x0000, 0xFFFF, 0x0000, 0x0000, 0x0000, 0xFFFF, 0x0000, 0xFFFF,
|
||||||
|
0xFFFF, 0xFFFF, 0x0000, 0xFD70, 0xFDDE, 0xFF13, 0x00F6, 0x0368, 0x064E,
|
||||||
|
0x0989, 0x0CF8, 0x1079, 0x13E8, 0x1723, 0x1A09, 0x1C7B, 0x1E5D, 0x1F92,
|
||||||
|
0x2000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0x0001, 0x0000, 0x0001, 0x0001, 0x0001, 0x0002, 0x0001, 0x0003, 0x0001,
|
||||||
|
0x0004, 0x0010, 0x0005, 0x000C, 0x0015, 0x000F, 0x0021, 0x0010, 0x0030,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
smlua_anim_util_register_animation("arm_shoot",
|
||||||
|
1,
|
||||||
|
189,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
8,
|
||||||
|
{
|
||||||
|
0x0000, 0xFFDD, 0x0000, 0x0000, 0x0000, 0xDFFF, 0x0000, 0x0000, 0x0000,
|
||||||
|
0x0000, 0x0000, 0xFFFF, 0x0000, 0x0000, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF,
|
||||||
|
0x0000, 0xFFFF, 0x0000, 0x2000, 0x21AA, 0x2555, 0x2901, 0x2AAB, 0x2901,
|
||||||
|
0x2555, 0x21AA, 0x2000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
0x0001, 0x0000, 0x0001, 0x0001, 0x0001, 0x0002, 0x0001, 0x0003, 0x0001,
|
||||||
|
0x0004, 0x0001, 0x0005, 0x0007, 0x0006, 0x0008, 0x000D, 0x0009, 0x0015,
|
||||||
|
}
|
||||||
|
)
|
134
mods/gun-mod/c-viewmodel.lua
Normal file
|
@ -0,0 +1,134 @@
|
||||||
|
if SM64COOPDX_VERSION == nil then return end
|
||||||
|
|
||||||
|
local CAP_FLICKER_FRAMES = 0x4444449249255555 -- this is beyond my comprehension
|
||||||
|
|
||||||
|
gFirstPersonViewmodels = {
|
||||||
|
armObjs = { nil, nil },
|
||||||
|
gunObjs = { nil, nil }
|
||||||
|
}
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_viewmodel_init(o)
|
||||||
|
o.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_viewmodel_loop(o)
|
||||||
|
if not gGlobalSyncTable.gunModEnabled or not get_first_person_enabled() then
|
||||||
|
obj_mark_for_deletion(o)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local dualWield = obj_get_weapon_dual_wield(o) ~= 0
|
||||||
|
--- @type Weapon
|
||||||
|
local weapon = if_then_else(dualWield, cur_dual_wield_weapon(), cur_weapon())
|
||||||
|
|
||||||
|
if not weapon.reqCheck(gMarioStates[0]) then
|
||||||
|
cur_obj_hide()
|
||||||
|
else
|
||||||
|
cur_obj_unhide()
|
||||||
|
end
|
||||||
|
|
||||||
|
local horizontalOffset = 30
|
||||||
|
if cur_dual_wield_weapon() ~= nil then
|
||||||
|
horizontalOffset = if_then_else(obj_get_weapon_dual_wield(o) ~= 0, -50, 50)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- math to calculate staying in the same screen position no matter what
|
||||||
|
o.oPosX = gLakituState.pos.x - 35 * coss(gFirstPersonCamera.pitch) * sins(gFirstPersonCamera.yaw)
|
||||||
|
o.oPosY = gLakituState.pos.y - 35 * sins(gFirstPersonCamera.pitch)
|
||||||
|
o.oPosZ = gLakituState.pos.z - 35 * coss(gFirstPersonCamera.pitch) * coss(gFirstPersonCamera.yaw)
|
||||||
|
|
||||||
|
-- math to offset it to the left or right
|
||||||
|
o.oPosX = o.oPosX + sins(gFirstPersonCamera.yaw + 0x4000) * horizontalOffset
|
||||||
|
o.oPosZ = o.oPosZ + coss(gFirstPersonCamera.yaw + 0x4000) * horizontalOffset
|
||||||
|
|
||||||
|
o.oFaceAnglePitch = 0
|
||||||
|
o.oFaceAngleYaw = gFirstPersonCamera.yaw + 0x4000
|
||||||
|
o.oFaceAngleRoll = -gFirstPersonCamera.pitch
|
||||||
|
|
||||||
|
if weapon ~= nil then
|
||||||
|
if weapon.deployTimer > 0 then
|
||||||
|
obj_set_animation(o, "arm_reload_end")
|
||||||
|
-- freeze animation if the time hasn't come to show the arm rising up
|
||||||
|
if o.header.gfx.animInfo.animFrame > 0 and weapon.deployTimer - o.header.gfx.animInfo.curAnim.loopEnd > 0 then
|
||||||
|
o.header.gfx.animInfo.animFrame = 0
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local half = math.floor(weapon.reloadTime * 0.5)
|
||||||
|
if weapon.reloadTimer <= 0 then
|
||||||
|
if weapon.cooldownTimer > 0 then
|
||||||
|
obj_set_animation(o, "arm_shoot")
|
||||||
|
else
|
||||||
|
obj_set_animation(o, "arm_idle")
|
||||||
|
-- *try* keep both arms in sync
|
||||||
|
if dualWield then
|
||||||
|
o.header.gfx.animInfo.animFrame = gFirstPersonViewmodels.armObjs[1].header.gfx.animInfo.animFrame
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif weapon.reloadTimer < half then
|
||||||
|
obj_set_animation(o, "arm_reload_end")
|
||||||
|
else
|
||||||
|
obj_set_animation(o, "arm_reload_start")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
o.globalPlayerIndex = gNetworkPlayers[0].globalIndex
|
||||||
|
|
||||||
|
--- @type MarioState
|
||||||
|
local m = gMarioStates[0]
|
||||||
|
if m.capTimer < 64 and ((1 << m.capTimer) & CAP_FLICKER_FRAMES) ~= 0 then
|
||||||
|
o.oAnimState = 0
|
||||||
|
else
|
||||||
|
local vanishCap = if_then_else((gMarioStates[0].flags & MARIO_VANISH_CAP) ~= 0, 2, 0)
|
||||||
|
local metalCap = if_then_else((gMarioStates[0].flags & MARIO_METAL_CAP) ~= 0, 1, 0)
|
||||||
|
o.oAnimState = metalCap + vanishCap
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
id_bhvViewmodel = hook_behavior(nil, OBJ_LIST_GENACTOR, true, bhv_viewmodel_init, bhv_viewmodel_loop, "bhvGmViewmodel")
|
||||||
|
|
||||||
|
|
||||||
|
--- @param weapon Weapon
|
||||||
|
local function spawn_viewmodel(weapon, dualWield)
|
||||||
|
local index = if_then_else(dualWield, 1, 2)
|
||||||
|
dualWield = if_then_else(dualWield, 1, 0)
|
||||||
|
|
||||||
|
gFirstPersonViewmodels.armObjs[index] = spawn_non_sync_object(
|
||||||
|
id_bhvViewmodel,
|
||||||
|
weapon.armModel,
|
||||||
|
0, -10000, 0,
|
||||||
|
--- @param o Object
|
||||||
|
function(o)
|
||||||
|
obj_set_weapon_params(o, 0, 0, dualWield, 0)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
gFirstPersonViewmodels.gunObjs[index] = spawn_non_sync_object(
|
||||||
|
id_bhvViewmodel,
|
||||||
|
weapon.model,
|
||||||
|
0, -10000, 0,
|
||||||
|
--- @param o Object
|
||||||
|
function(o)
|
||||||
|
obj_set_weapon_params(o, 0, 0, dualWield, 0)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
function spawn_viewmodels()
|
||||||
|
local weapon1 = cur_weapon()
|
||||||
|
local weapon2 = cur_dual_wield_weapon()
|
||||||
|
if weapon1 == nil then return end
|
||||||
|
|
||||||
|
spawn_viewmodel(weapon1, false)
|
||||||
|
if weapon2 ~= nil then spawn_viewmodel(weapon2, true) end
|
||||||
|
end
|
||||||
|
|
||||||
|
function delete_viewmodels()
|
||||||
|
gFirstPersonViewmodels.armObjs[1] = obj_mark_for_deletion(gFirstPersonViewmodels.armObjs[1])
|
||||||
|
gFirstPersonViewmodels.armObjs[2] = obj_mark_for_deletion(gFirstPersonViewmodels.armObjs[2])
|
||||||
|
gFirstPersonViewmodels.gunObjs[1] = obj_mark_for_deletion(gFirstPersonViewmodels.gunObjs[1])
|
||||||
|
gFirstPersonViewmodels.gunObjs[2] = obj_mark_for_deletion(gFirstPersonViewmodels.gunObjs[2])
|
||||||
|
end
|
593
mods/gun-mod/c-weapon.lua
Normal file
|
@ -0,0 +1,593 @@
|
||||||
|
if SM64COOPDX_VERSION == nil then return end
|
||||||
|
|
||||||
|
---------------------------------------
|
||||||
|
-- API and other important functions --
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
--- @class Weapon
|
||||||
|
--- @field public id integer
|
||||||
|
--- @field public name string
|
||||||
|
--- @field public dualWield boolean
|
||||||
|
--- @field public model ModelExtendedId
|
||||||
|
--- @field public armModel ModelExtendedId
|
||||||
|
--- @field public bulletModel ModelExtendedId
|
||||||
|
--- @field public primarySounds integer[]
|
||||||
|
--- @field public secondarySounds integer[]
|
||||||
|
--- @field public strong boolean
|
||||||
|
--- @field public rapidFire boolean
|
||||||
|
--- @field public spread number
|
||||||
|
--- @field public damage number
|
||||||
|
--- @field public bulletCount integer
|
||||||
|
--- @field public bulletScale number
|
||||||
|
--- @field public bulletSpeed number
|
||||||
|
--- @field public bulletSteps integer
|
||||||
|
--- @field public maxAmmo integer
|
||||||
|
--- @field public ammo integer
|
||||||
|
--- @field public deployTime integer
|
||||||
|
--- @field public cooldownTime integer
|
||||||
|
--- @field public reloadTime integer
|
||||||
|
--- @field public deployTimer integer
|
||||||
|
--- @field public cooldownTimer integer
|
||||||
|
--- @field public reloadTimer integer
|
||||||
|
--- @field public primaryFireFunc fun(weapon:Weapon)
|
||||||
|
--- @field public secondaryFireFunc fun(weapon:Weapon)
|
||||||
|
--- @field public reqCheck fun(m:MarioState)
|
||||||
|
|
||||||
|
--- @class WeaponId
|
||||||
|
|
||||||
|
--- @type Weapon[]
|
||||||
|
gWeaponTable = {}
|
||||||
|
--- @type Weapon[]
|
||||||
|
gInventory = {}
|
||||||
|
for i = 1, MAX_INVENTORY_SLOTS do gInventory[i] = nil end
|
||||||
|
inventorySlot = 1
|
||||||
|
useDualWieldWeapon = false
|
||||||
|
|
||||||
|
local weaponObtained = false
|
||||||
|
local weaponId = -1
|
||||||
|
|
||||||
|
local sMutableWeaponFields = {
|
||||||
|
["ammo"] = true,
|
||||||
|
["deployTimer"] = true,
|
||||||
|
["cooldownTimer"] = true,
|
||||||
|
["reloadTimer"] = true
|
||||||
|
}
|
||||||
|
|
||||||
|
local sReadonlyMetatable = {
|
||||||
|
__index = function(table, key)
|
||||||
|
return rawget(table, key)
|
||||||
|
end,
|
||||||
|
|
||||||
|
__newindex = function()
|
||||||
|
error("attempt to update a read-only table", 2)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
local sWeaponMetatable = {
|
||||||
|
__index = function(table, key)
|
||||||
|
return rawget(table, key)
|
||||||
|
end,
|
||||||
|
|
||||||
|
__newindex = function(table, key, value)
|
||||||
|
if sMutableWeaponFields[key] then
|
||||||
|
rawset(table, key, value)
|
||||||
|
else
|
||||||
|
error("attempt to update an immutable weapon field", 2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
--- @param name string
|
||||||
|
--- @param dualWield boolean
|
||||||
|
--- @param model ModelExtendedId
|
||||||
|
--- @param armModel ModelExtendedId
|
||||||
|
--- @param bulletModel ModelExtendedId
|
||||||
|
--- @param primarySounds integer[]
|
||||||
|
--- @param secondarySounds integer[]
|
||||||
|
--- @param strong boolean
|
||||||
|
--- @param rapidFire boolean
|
||||||
|
--- @param spread number
|
||||||
|
--- @param damage number
|
||||||
|
--- @param bulletCount integer
|
||||||
|
--- @param bulletScale number
|
||||||
|
--- @param bulletSpeed number
|
||||||
|
--- @param bulletSteps integer
|
||||||
|
--- @param maxAmmo integer
|
||||||
|
--- @param deployTime integer
|
||||||
|
--- @param cooldownTime integer
|
||||||
|
--- @param reloadTime integer
|
||||||
|
--- @param primaryFireFunc fun(weapon:Weapon)
|
||||||
|
--- @param secondaryFireFunc fun(weapon:Weapon)
|
||||||
|
--- @param reqCheck function
|
||||||
|
--- @return integer
|
||||||
|
--- Registers a weapon metatable into existence
|
||||||
|
function weapon_register(name, dualWield, model, armModel, bulletModel, primarySounds, secondarySounds, strong, rapidFire, spread, damage, bulletCount, bulletScale, bulletSpeed, bulletSteps, maxAmmo, deployTime, cooldownTime, reloadTime, primaryFireFunc, secondaryFireFunc, reqCheck)
|
||||||
|
weaponId = weaponId + 1
|
||||||
|
gWeaponTable[weaponId] = {
|
||||||
|
id = weaponId,
|
||||||
|
name = name,
|
||||||
|
dualWield = dualWield,
|
||||||
|
model = model,
|
||||||
|
armModel = armModel,
|
||||||
|
bulletModel = bulletModel,
|
||||||
|
primarySounds = primarySounds,
|
||||||
|
secondarySounds = secondarySounds,
|
||||||
|
strong = strong,
|
||||||
|
rapidFire = rapidFire,
|
||||||
|
spread = spread,
|
||||||
|
damage = damage,
|
||||||
|
bulletCount = bulletCount,
|
||||||
|
bulletScale = bulletScale,
|
||||||
|
bulletSpeed = bulletSpeed,
|
||||||
|
bulletSteps = bulletSteps,
|
||||||
|
maxAmmo = maxAmmo,
|
||||||
|
ammo = maxAmmo,
|
||||||
|
deployTime = deployTime,
|
||||||
|
cooldownTime = cooldownTime,
|
||||||
|
reloadTime = reloadTime,
|
||||||
|
deployTimer = deployTime,
|
||||||
|
cooldownTimer = 0,
|
||||||
|
reloadTimer = 0,
|
||||||
|
primaryFireFunc = primaryFireFunc,
|
||||||
|
secondaryFireFunc = secondaryFireFunc,
|
||||||
|
reqCheck = reqCheck
|
||||||
|
}
|
||||||
|
setmetatable(gWeaponTable[weaponId], sReadonlyMetatable)
|
||||||
|
return weaponId
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param id integer
|
||||||
|
--- @return nil
|
||||||
|
--- Unregisters a weapon from existence by ID
|
||||||
|
function weapon_unregister(id)
|
||||||
|
if type(id) ~= "number" then return end
|
||||||
|
gWeaponTable[id] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return nil
|
||||||
|
--- Unregisters all weapons from existence
|
||||||
|
function weapon_unregister_all()
|
||||||
|
gWeaponTable = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return string
|
||||||
|
--- Properly formatted weapon list string for commands
|
||||||
|
function get_weapon_list_string()
|
||||||
|
local string = "["
|
||||||
|
for id, weapon in pairs(gWeaponTable) do
|
||||||
|
string = string .. weapon.name:lower()
|
||||||
|
if id < weaponId then
|
||||||
|
string = string .. "|"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
string = string .. "]"
|
||||||
|
return string
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @param owner integer
|
||||||
|
--- @param id integer
|
||||||
|
--- @param dualWield integer
|
||||||
|
--- @param extra integer
|
||||||
|
--- @return nil
|
||||||
|
--- Returns a 4 byte behavior parameter integer for weapon objects.
|
||||||
|
function obj_set_weapon_params(obj, owner, id, dualWield, extra)
|
||||||
|
if obj == nil then return end
|
||||||
|
if type(owner) ~= "number" or type(id) ~= "number" or type(dualWield) ~= "number" or type(extra) ~= "number" then return end
|
||||||
|
obj.oBehParams = owner | (id << 8) | (dualWield << 16) | (extra << 24)
|
||||||
|
obj.oBehParams2ndByte = id
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @return integer
|
||||||
|
--- Returns the owner parameter (first parameter) of a weapon object.
|
||||||
|
function obj_get_weapon_owner(obj)
|
||||||
|
if obj == nil then return 0 end
|
||||||
|
return obj.oBehParams & 0xFF
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @return integer
|
||||||
|
--- Returns the id parameter (second parameter) of a weapon object.
|
||||||
|
function obj_get_weapon_id(obj)
|
||||||
|
if obj == nil then return 0 end
|
||||||
|
return obj.oBehParams2ndByte
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @return integer
|
||||||
|
--- Returns the dual wield parameter (third parameter) of a weapon object.
|
||||||
|
function obj_get_weapon_dual_wield(obj)
|
||||||
|
if obj == nil then return 0 end
|
||||||
|
return (obj.oBehParams >> 16) & 0xFF
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param obj Object
|
||||||
|
--- @return integer
|
||||||
|
--- Returns the extra parameter (fourth parameter) of a weapon object.
|
||||||
|
function obj_get_weapon_extra(obj)
|
||||||
|
if obj == nil then return 0 end
|
||||||
|
return (obj.oBehParams >> 24) & 0xFF
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return Weapon|nil
|
||||||
|
--- Returns the table of the current weapon
|
||||||
|
function cur_weapon()
|
||||||
|
return gInventory[inventorySlot]
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return Weapon|nil
|
||||||
|
--- Returns the table of the current dual wielding weapon
|
||||||
|
function cur_dual_wield_weapon()
|
||||||
|
local weapon = cur_weapon()
|
||||||
|
if weapon == nil or not weapon.dualWield then return nil end
|
||||||
|
|
||||||
|
local weaponBefore = gInventory[inventorySlot - 1]
|
||||||
|
if weaponBefore ~= nil and weaponBefore.dualWield and weaponBefore.id == weapon.id then return weaponBefore end
|
||||||
|
|
||||||
|
local weaponAfter = gInventory[inventorySlot + 1]
|
||||||
|
if weaponAfter ~= nil and weaponAfter.dualWield and weaponAfter.id == weapon.id then return weaponAfter end
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return integer
|
||||||
|
--- Returns the current inventory slot
|
||||||
|
function get_inventory_slot()
|
||||||
|
return inventorySlot
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param slot integer
|
||||||
|
--- @return nil
|
||||||
|
--- Sets the current inventory slot
|
||||||
|
function set_inventory_slot(slot)
|
||||||
|
if type(slot) ~= "number" then return end
|
||||||
|
|
||||||
|
-- reset fields
|
||||||
|
gInventory[slot].deployTimer = gInventory[slot].deployTime
|
||||||
|
gInventory[slot].cooldownTimer = 0
|
||||||
|
gInventory[slot].reloadTimer = if_then_else(gInventory[slot].ammo <= 0 and gInventory[slot].maxAmmo > 0, gInventory[slot].reloadTime, 0)
|
||||||
|
|
||||||
|
inventorySlot = clamp(slot, 1, MAX_INVENTORY_SLOTS)
|
||||||
|
sync_current_weapons()
|
||||||
|
delete_held_weapon()
|
||||||
|
if get_first_person_enabled() then
|
||||||
|
delete_viewmodels()
|
||||||
|
spawn_viewmodels()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function table_clone(table)
|
||||||
|
local cloned = {}
|
||||||
|
for k, v in pairs(table) do
|
||||||
|
if type(v) == "table" then
|
||||||
|
cloned[k] = table_clone(v)
|
||||||
|
else
|
||||||
|
cloned[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return cloned
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param weapon WeaponId
|
||||||
|
local function inventory_clone(weapon)
|
||||||
|
local table = table_clone(gWeaponTable[weapon])
|
||||||
|
setmetatable(table, sWeaponMetatable)
|
||||||
|
return table
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_inventory_slots_used()
|
||||||
|
local count = 0
|
||||||
|
for i = 1, MAX_INVENTORY_SLOTS do
|
||||||
|
if gInventory[i] ~= nil then
|
||||||
|
count = count + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return count
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param weapon WeaponId
|
||||||
|
--- @return boolean
|
||||||
|
--- Picks up a weapon by ID
|
||||||
|
function pickup_weapon(weapon)
|
||||||
|
if type(weapon) ~= "number" then return false end
|
||||||
|
for i = 1, MAX_INVENTORY_SLOTS do
|
||||||
|
if gInventory[i] == weapon then
|
||||||
|
return false
|
||||||
|
elseif gInventory[i] == nil or get_inventory_slots_used() == MAX_INVENTORY_SLOTS then
|
||||||
|
if not weaponObtained then
|
||||||
|
play_sound(SOUND_MENU_STAR_SOUND, gMarioStates[0].marioObj.header.gfx.cameraToObject)
|
||||||
|
weaponObtained = true
|
||||||
|
else
|
||||||
|
play_sound(SOUND_MENU_CLICK_CHANGE_VIEW, gMarioStates[0].marioObj.header.gfx.cameraToObject)
|
||||||
|
end
|
||||||
|
|
||||||
|
gInventory[i] = inventory_clone(weapon)
|
||||||
|
set_inventory_slot(i)
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function sync_current_weapons()
|
||||||
|
gPlayerSyncTable[0].curWeapon = nil
|
||||||
|
gPlayerSyncTable[0].curWeapon2 = nil
|
||||||
|
|
||||||
|
local weapon = cur_weapon()
|
||||||
|
if weapon ~= nil then
|
||||||
|
gPlayerSyncTable[0].curWeapon = weapon.id
|
||||||
|
end
|
||||||
|
local weapon2 = cur_dual_wield_weapon()
|
||||||
|
if weapon2 ~= nil then
|
||||||
|
gPlayerSyncTable[0].curWeapon2 = weapon2.id
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param weapon Weapon
|
||||||
|
function handle_reloading(weapon)
|
||||||
|
if weapon == nil then return end
|
||||||
|
|
||||||
|
if weapon.reloadTimer > 0 then
|
||||||
|
weapon.reloadTimer = weapon.reloadTimer - 1
|
||||||
|
if weapon.name == "Shotgun" then
|
||||||
|
weapon.ammo = math.floor(lerp(weapon.maxAmmo, 0, weapon.reloadTimer / weapon.reloadTime))
|
||||||
|
end
|
||||||
|
if weapon.reloadTimer == 0 then
|
||||||
|
weapon.ammo = weapon.maxAmmo
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function weapon_update()
|
||||||
|
--- @type MarioState
|
||||||
|
local m = gMarioStates[0]
|
||||||
|
|
||||||
|
-- update inventory slot
|
||||||
|
if (m.controller.buttonPressed & U_JPAD) ~= 0 then
|
||||||
|
inventorySlot = inventorySlot + 1
|
||||||
|
if inventorySlot > MAX_INVENTORY_SLOTS then
|
||||||
|
inventorySlot = 1
|
||||||
|
end
|
||||||
|
set_inventory_slot(inventorySlot)
|
||||||
|
elseif (m.controller.buttonPressed & D_JPAD) ~= 0 then
|
||||||
|
inventorySlot = inventorySlot - 1
|
||||||
|
if inventorySlot < 1 then
|
||||||
|
inventorySlot = MAX_INVENTORY_SLOTS
|
||||||
|
end
|
||||||
|
set_inventory_slot(inventorySlot)
|
||||||
|
end
|
||||||
|
|
||||||
|
local weapon1 = cur_weapon()
|
||||||
|
local weapon2 = cur_dual_wield_weapon()
|
||||||
|
--- @type Weapon
|
||||||
|
local weapon = if_then_else(weapon2 ~= nil and useDualWieldWeapon, weapon2, weapon1)
|
||||||
|
if weapon1 == nil then return end -- if the player isn't holding a weapon
|
||||||
|
|
||||||
|
if weapon.deployTimer <= 0 and weapon.cooldownTimer <= 0 then
|
||||||
|
local buttonFlags = if_then_else(weapon.rapidFire, m.controller.buttonDown, m.controller.buttonPressed)
|
||||||
|
if (buttonFlags & Y_BUTTON) ~= 0 and weapon.primaryFireFunc ~= nil then
|
||||||
|
weapon.cooldownTimer = weapon.cooldownTime
|
||||||
|
weapon.primaryFireFunc(weapon)
|
||||||
|
elseif (buttonFlags & X_BUTTON) ~= 0 and weapon.secondaryFireFunc ~= nil then
|
||||||
|
weapon.cooldownTimer = weapon.cooldownTime
|
||||||
|
weapon.secondaryFireFunc(weapon)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
weapon1.deployTimer = handle_timer(weapon1.deployTimer)
|
||||||
|
weapon1.cooldownTimer = handle_timer(weapon1.cooldownTimer)
|
||||||
|
if weapon2 ~= nil then
|
||||||
|
weapon2.deployTimer = handle_timer(weapon2.deployTimer)
|
||||||
|
weapon2.cooldownTimer = handle_timer(weapon2.cooldownTimer)
|
||||||
|
end
|
||||||
|
handle_reloading(weapon1)
|
||||||
|
handle_reloading(weapon2)
|
||||||
|
end
|
||||||
|
|
||||||
|
function delete_held_weapon()
|
||||||
|
local held = obj_get_first_with_behavior_id(id_bhvHeldWeapon)
|
||||||
|
while held ~= nil do
|
||||||
|
if obj_get_weapon_owner(held) == gNetworkPlayers[0].globalIndex then
|
||||||
|
obj_mark_for_deletion(held)
|
||||||
|
end
|
||||||
|
held = obj_get_next_with_same_behavior_id(held)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-------------
|
||||||
|
-- objects --
|
||||||
|
-------------
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_held_weapon_init(o)
|
||||||
|
o.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
|
||||||
|
o.oGraphYOffset = 10
|
||||||
|
cur_obj_scale(0.6)
|
||||||
|
cur_obj_hide()
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_held_weapon_loop(o)
|
||||||
|
local np = network_player_from_global_index(obj_get_weapon_owner(o))
|
||||||
|
if np == nil or not gGlobalSyncTable.gunModEnabled then
|
||||||
|
obj_mark_for_deletion(o)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local m = gMarioStates[np.localIndex]
|
||||||
|
local dualWield = obj_get_weapon_dual_wield(o)
|
||||||
|
--- @type Weapon|nil
|
||||||
|
local weapon = if_then_else(dualWield ~= 0, cur_dual_wield_weapon(), cur_weapon())
|
||||||
|
if active_player(m) == 0 or weapon == nil then
|
||||||
|
obj_mark_for_deletion(o)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local index = if_then_else(dualWield ~= 0, 1, 0)
|
||||||
|
if m.marioBodyState.updateTorsoTime == gMarioStates[0].marioBodyState.updateTorsoTime and m.marioBodyState.handState == MARIO_HAND_FISTS and weapon.reqCheck(m) then
|
||||||
|
cur_obj_unhide()
|
||||||
|
o.oPosX = get_hand_foot_pos_x(m, index) + m.vel.x - (sins(m.faceAngle.y) * 30)
|
||||||
|
o.oPosY = get_hand_foot_pos_y(m, index) + m.vel.y + if_then_else(m.action == ACT_JUMP or m.action == ACT_DOUBLE_JUMP, 20, 0)
|
||||||
|
o.oPosZ = get_hand_foot_pos_z(m, index) + m.vel.z - (coss(m.faceAngle.y) * 30)
|
||||||
|
o.oFaceAngleYaw = m.faceAngle.y - 0x4000
|
||||||
|
o.oFaceAnglePitch = 0
|
||||||
|
o.oFaceAngleRoll = 0
|
||||||
|
else
|
||||||
|
cur_obj_hide()
|
||||||
|
o.oPosX = m.pos.x
|
||||||
|
o.oPosY = m.pos.y + 60
|
||||||
|
o.oPosZ = m.pos.z
|
||||||
|
end
|
||||||
|
|
||||||
|
if m.playerIndex == 0 and get_first_person_enabled() then
|
||||||
|
cur_obj_hide()
|
||||||
|
end
|
||||||
|
|
||||||
|
obj_set_model_extended(o, weapon.model)
|
||||||
|
end
|
||||||
|
|
||||||
|
id_bhvHeldWeapon = hook_behavior(nil, OBJ_LIST_GENACTOR, true, bhv_held_weapon_init, bhv_held_weapon_loop, "bhvGmHeldWeapon")
|
||||||
|
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_pickup_weapon_init(o)
|
||||||
|
o.oFlags = OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE
|
||||||
|
o.oIntangibleTimer = 0
|
||||||
|
obj_scale(o, 0.75)
|
||||||
|
|
||||||
|
o.hitboxRadius = 90
|
||||||
|
o.hitboxHeight = 90
|
||||||
|
|
||||||
|
network_init_object(o, true, {})
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param o Object
|
||||||
|
local function bhv_pickup_weapon_loop(o)
|
||||||
|
cur_obj_update_floor_height()
|
||||||
|
o.oPosY = o.oFloorHeight + 130
|
||||||
|
|
||||||
|
o.oFaceAngleYaw = o.oFaceAngleYaw + 0x800
|
||||||
|
|
||||||
|
local nearest = nearest_mario_state_to_object(o)
|
||||||
|
if obj_check_hitbox_overlap(o, nearest.marioObj) and o.oIntangibleTimer == 0 and nearest.playerIndex == 0 then
|
||||||
|
o.oIntangibleTimer = 450
|
||||||
|
pickup_weapon(o.oBehParams)
|
||||||
|
end
|
||||||
|
|
||||||
|
if o.oIntangibleTimer ~= 0 then
|
||||||
|
cur_obj_hide()
|
||||||
|
else
|
||||||
|
cur_obj_unhide()
|
||||||
|
o.oGraphYOffset = math.sin(o.oTimer * 0.5) * 5
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
id_bhvWeaponPickup = hook_behavior(nil, OBJ_LIST_LEVEL, true, bhv_pickup_weapon_init, bhv_pickup_weapon_loop, "bhvGmWeaponPickup")
|
||||||
|
|
||||||
|
|
||||||
|
-------------
|
||||||
|
-- weapons --
|
||||||
|
-------------
|
||||||
|
|
||||||
|
WEAPON_PISTOL = weapon_register(
|
||||||
|
"Pistol", -- name
|
||||||
|
true, -- dual wieldable
|
||||||
|
E_MODEL_PISTOL, -- weapon model
|
||||||
|
E_MODEL_SINGLE_ARM, -- arm model
|
||||||
|
E_MODEL_YELLOW_COIN, -- bullet model
|
||||||
|
{ sync_audio_sample_load("pistol_shoot.mp3") }, -- primary sounds
|
||||||
|
{ sync_audio_sample_load("pistol_reload.mp3") }, -- secondary sounds
|
||||||
|
false, -- strong weapon
|
||||||
|
false, -- rapid fire
|
||||||
|
10, -- spread
|
||||||
|
15, -- damage
|
||||||
|
1, -- bullet count
|
||||||
|
0.2, -- bullet scale
|
||||||
|
500, -- bullet speed
|
||||||
|
10, -- bullet steps
|
||||||
|
18, -- max ammo
|
||||||
|
15, -- deploy time
|
||||||
|
5, -- cooldown time
|
||||||
|
60, -- reload time
|
||||||
|
common_shoot, -- primary fire
|
||||||
|
common_reload, -- secondary fire
|
||||||
|
check_common_gun_requirements -- requirement checks function
|
||||||
|
)
|
||||||
|
|
||||||
|
WEAPON_MAGNUM = weapon_register(
|
||||||
|
"Magnum", -- name
|
||||||
|
true, -- dual wieldable
|
||||||
|
E_MODEL_MAGNUM, -- weapon model
|
||||||
|
E_MODEL_SINGLE_ARM, -- arm model
|
||||||
|
E_MODEL_METALLIC_BALL, -- bullet model
|
||||||
|
{ sync_audio_sample_load("magnum_shoot.mp3") }, -- primary sounds
|
||||||
|
{ sync_audio_sample_load("magnum_reload.mp3") }, -- secondary sounds
|
||||||
|
false, -- strong weapon
|
||||||
|
false, -- rapid fire
|
||||||
|
0, -- spread
|
||||||
|
50, -- damage
|
||||||
|
1, -- bullet count
|
||||||
|
0.2, -- bullet scale
|
||||||
|
2000, -- bullet speed
|
||||||
|
40, -- bullet steps
|
||||||
|
6, -- max ammo
|
||||||
|
15, -- deploy time
|
||||||
|
30, -- cooldown time
|
||||||
|
90, -- reload time
|
||||||
|
common_shoot, -- primary fire
|
||||||
|
common_reload, -- secondary fire
|
||||||
|
check_common_gun_requirements -- requirement checks function
|
||||||
|
)
|
||||||
|
|
||||||
|
WEAPON_AK47 = weapon_register(
|
||||||
|
"AK47", -- name
|
||||||
|
false, -- dual wieldable
|
||||||
|
E_MODEL_AK47, -- weapon model
|
||||||
|
E_MODEL_SINGLE_ARM, -- arm model
|
||||||
|
E_MODEL_YELLOW_COIN, -- bullet model
|
||||||
|
{ sync_audio_sample_load("ak47_shoot.mp3") }, -- primary sounds
|
||||||
|
{ sync_audio_sample_load("pistol_reload.mp3") }, -- secondary sounds
|
||||||
|
false, -- strong weapon
|
||||||
|
true, -- rapid fire
|
||||||
|
30, -- spread
|
||||||
|
10, -- damage
|
||||||
|
1, -- bullet count
|
||||||
|
0.2, -- bullet scale
|
||||||
|
500, -- bullet speed
|
||||||
|
10, -- bullet steps
|
||||||
|
40, -- max ammo
|
||||||
|
30, -- deploy time
|
||||||
|
4, -- cooldown time
|
||||||
|
70, -- reload time
|
||||||
|
common_shoot, -- primary fire
|
||||||
|
common_reload, -- secondary fire
|
||||||
|
check_common_gun_requirements -- requirement checks function
|
||||||
|
)
|
||||||
|
|
||||||
|
--[[WEAPON_SHOTGUN = weapon_register(
|
||||||
|
"Shotgun", -- name
|
||||||
|
false, -- dual wieldable
|
||||||
|
E_MODEL_SHOTGUN, -- weapon model
|
||||||
|
E_MODEL_SINGLE_ARM, -- arm model
|
||||||
|
E_MODEL_RED_COIN, -- bullet model
|
||||||
|
{ sync_audio_sample_load("shotgun_shoot.mp3") }, -- primary sounds
|
||||||
|
{}, -- secondary sounds
|
||||||
|
true, -- strong weapon
|
||||||
|
false, -- rapid fire
|
||||||
|
50, -- spread
|
||||||
|
6, -- damage
|
||||||
|
5, -- bullet count
|
||||||
|
0.2, -- bullet scale
|
||||||
|
1000, -- bullet speed
|
||||||
|
20, -- bullet steps
|
||||||
|
7, -- max ammo
|
||||||
|
15, -- deploy time
|
||||||
|
30, -- cooldown time
|
||||||
|
120, -- reload time
|
||||||
|
common_shoot, -- primary fire
|
||||||
|
common_reload, -- secondary fire
|
||||||
|
check_common_gun_requirements -- requirement checks function
|
||||||
|
)]]
|
406
mods/gun-mod/main.lua
Normal file
|
@ -0,0 +1,406 @@
|
||||||
|
-- name: .Gun Mod DX
|
||||||
|
-- description: Gun Mod DX v3.0\nBy \\#ec7731\\Agent X\\#dcdcdc\\\nSpecial thanks to \\#f296af\\PeachyPeach\\#dcdcdc\\\n\nThis is a rewritten & overhauled version of my original Gun Mod for sm64ex-coop. I thought this would make a good mod to bundle with sm64coopdx.\n\nPress [\\#3040ff\\Y\\#dcdcdc\\] to shoot\nPress [\\#3040ff\\X\\#dcdcdc\\] to reload\nRun \\#00ffff\\/gm help\\#dcdcdc\\ for help
|
||||||
|
-- deluxe: true
|
||||||
|
|
||||||
|
if SM64COOPDX_VERSION == nil then return end
|
||||||
|
|
||||||
|
gGlobalSyncTable.gunModEnabled = true
|
||||||
|
|
||||||
|
local renderHud = true
|
||||||
|
|
||||||
|
gShootableHitboxes = {
|
||||||
|
[id_bhvMario] = hurt_player,
|
||||||
|
[id_bhvStar] = hurt_star,
|
||||||
|
[id_bhvMessagePanel] = hurt_sign,
|
||||||
|
[id_bhvToadMessage] = hurt_toad,
|
||||||
|
[id_bhvExclamationBox] = hurt_exclamation_box,
|
||||||
|
[id_bhvBreakableBox] = hurt_breakable_box,
|
||||||
|
[id_bhvBreakableBoxSmall] = hurt_breakable_box_small,
|
||||||
|
[id_bhvBowlingBall] = hurt_bowling_ball,
|
||||||
|
[id_bhvWaterBomb] = hurt_water_bomb,
|
||||||
|
[id_bhvTree] = hurt_tree,
|
||||||
|
[id_bhvChainChomp] = hurt_chain_chomp,
|
||||||
|
[id_bhvGoomba] = hurt_goomba,
|
||||||
|
[id_bhvBobomb] = hurt_bobomb,
|
||||||
|
[id_bhvHomingAmp] = hurt_amp,
|
||||||
|
[id_bhvCirclingAmp] = hurt_amp,
|
||||||
|
[id_bhvKoopa] = hurt_koopa,
|
||||||
|
[id_bhvFlyGuy] = hurt_snufit,
|
||||||
|
[id_bhvChuckya] = hurt_chuckya,
|
||||||
|
[id_bhvPiranhaPlant] = hurt_piranha_plant,
|
||||||
|
[id_bhvSnufit] = hurt_snufit,
|
||||||
|
[id_bhvSwoop] = hurt_snufit,
|
||||||
|
[id_bhvSpindrift] = hurt_spindrift,
|
||||||
|
[id_bhvMrBlizzard] = hurt_mr_blizzard,
|
||||||
|
[id_bhvMrI] = hurt_mr_i,
|
||||||
|
[id_bhvScuttlebug] = hurt_scuttlebug,
|
||||||
|
[id_bhvPokeyBodyPart] = hurt_pokey,
|
||||||
|
[id_bhvSkeeter] = hurt_scuttlebug,
|
||||||
|
[id_bhvSmallBully] = hurt_bully,
|
||||||
|
[id_bhvBigBully] = hurt_bully,
|
||||||
|
[id_bhvSmallChillBully] = hurt_bully,
|
||||||
|
[id_bhvBigChillBully] = hurt_bully,
|
||||||
|
[id_bhvKingBobomb] = hurt_king_bobomb,
|
||||||
|
[id_bhvBowser] = hurt_bowser,
|
||||||
|
[id_bhvYoshi] = hurt_yoshi
|
||||||
|
}
|
||||||
|
|
||||||
|
--- @param enable boolean
|
||||||
|
--- @return nil
|
||||||
|
--- Globally enables or disables Gun Mod
|
||||||
|
local function enable_gun_mod(enable)
|
||||||
|
if not network_is_server() and not network_is_moderator() then return end
|
||||||
|
if type(enable) ~= "boolean" then return end
|
||||||
|
gGlobalSyncTable.gunModEnabled = enable
|
||||||
|
djui_popup_create("Gun Mod has been " .. if_then_else(gGlobalSyncTable.gunModEnabled, "enabled.", "disabled."), 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param weapon WeaponId
|
||||||
|
--- Returns a weapon by its ID
|
||||||
|
local function get_weapon(weapon)
|
||||||
|
return gWeaponTable[weapon]
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return nil
|
||||||
|
--- Returns whether or not the Gun Mod HUD will render
|
||||||
|
local function get_render_hud()
|
||||||
|
return renderHud
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param enable boolean
|
||||||
|
--- @return nil
|
||||||
|
--- Sets whether or not the Gun Mod HUD will render
|
||||||
|
local function set_render_hud(enable)
|
||||||
|
if type(enable) ~= "boolean" then return end
|
||||||
|
renderHud = enable
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param behavior BehaviorId
|
||||||
|
--- @param hurtFunc fun(obj:Object, bulletObj:Object)
|
||||||
|
--- @return nil
|
||||||
|
local function shootable_register(behavior, hurtFunc)
|
||||||
|
if type(behavior) ~= "number" or type(hurtFunc) ~= "function" then return end
|
||||||
|
gShootableHitboxes[behavior] = hurtFunc
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param m MarioState
|
||||||
|
local function mario_update(m)
|
||||||
|
if active_player(m) == 0 then return end
|
||||||
|
|
||||||
|
if gGlobalSyncTable.gunModEnabled and gPlayerSyncTable[m.playerIndex].curWeapon ~= nil then
|
||||||
|
local spawned = false
|
||||||
|
local held = obj_get_first_with_behavior_id(id_bhvHeldWeapon)
|
||||||
|
while held ~= nil do
|
||||||
|
if obj_get_weapon_owner(held) == gNetworkPlayers[m.playerIndex].globalIndex then
|
||||||
|
spawned = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
held = obj_get_next_with_same_behavior_id(held)
|
||||||
|
end
|
||||||
|
|
||||||
|
if not spawned then
|
||||||
|
spawn_non_sync_object(
|
||||||
|
id_bhvHeldWeapon,
|
||||||
|
gWeaponTable[gPlayerSyncTable[m.playerIndex].curWeapon].model,
|
||||||
|
0, 0, 0,
|
||||||
|
--- @param o Object
|
||||||
|
function(o)
|
||||||
|
obj_set_weapon_params(o, gNetworkPlayers[m.playerIndex].globalIndex, gPlayerSyncTable[m.playerIndex].curWeapon, 0, 0)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
if gPlayerSyncTable[m.playerIndex].curWeapon2 ~= nil then
|
||||||
|
spawn_non_sync_object(
|
||||||
|
id_bhvHeldWeapon,
|
||||||
|
gWeaponTable[gPlayerSyncTable[m.playerIndex].curWeapon2].model,
|
||||||
|
0, 0, 0,
|
||||||
|
--- @param o Object
|
||||||
|
function(o)
|
||||||
|
obj_set_weapon_params(o, gNetworkPlayers[m.playerIndex].globalIndex, gPlayerSyncTable[m.playerIndex].curWeapon2, 1, 0)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if m.playerIndex ~= 0 then return end
|
||||||
|
|
||||||
|
if vec3f_dist(m.pos, m.area.camera.pos) < 500 and (m.action & ACT_GROUP_MASK) ~= ACT_GROUP_CUTSCENE then
|
||||||
|
m.marioBodyState.modelState = m.marioBodyState.modelState | MODEL_STATE_NOISE_ALPHA
|
||||||
|
end
|
||||||
|
|
||||||
|
if get_first_person_enabled() then
|
||||||
|
if gGlobalSyncTable.gunModEnabled and obj_get_first_with_behavior_id(id_bhvViewmodel) == nil and cur_weapon() ~= nil then
|
||||||
|
spawn_viewmodels()
|
||||||
|
end
|
||||||
|
|
||||||
|
if (m.action & ACT_FLAG_IDLE) ~= 0 then
|
||||||
|
m.faceAngle.y = gLakituState.yaw + 0x8000
|
||||||
|
end
|
||||||
|
|
||||||
|
-- movement
|
||||||
|
-- if m.action ~= ACT_CUSTOM_MOVEMENT then
|
||||||
|
-- set_mario_action(m, ACT_CUSTOM_MOVEMENT, 0)
|
||||||
|
-- vec3f_copy(gPlayerFirstPerson.movement.pos, m.pos)
|
||||||
|
-- end
|
||||||
|
elseif not camera_config_is_mouse_look_enabled() then
|
||||||
|
djui_hud_set_mouse_locked(false)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- disable negative vertical speed conservation so guns don't appear lower than normal
|
||||||
|
local group = (m.action & ACT_GROUP_MASK)
|
||||||
|
if (group == ACT_GROUP_MOVING or group == ACT_GROUP_STATIONARY or group == ACT_GROUP_OBJECT) and (m.action & ACT_FLAG_AIR) == 0 and m.vel.y < 0 then
|
||||||
|
m.vel.y = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if gGlobalSyncTable.gunModEnabled then
|
||||||
|
weapon_update()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_level_init()
|
||||||
|
local obj = obj_get_first(OBJ_LIST_SURFACE)
|
||||||
|
while obj ~= nil do
|
||||||
|
obj.header.gfx.skipInViewCheck = true
|
||||||
|
obj = obj_get_next(obj)
|
||||||
|
end
|
||||||
|
|
||||||
|
spawn_dialog_arrow()
|
||||||
|
|
||||||
|
if not mod_storage_load_bool("init") then
|
||||||
|
mod_storage_save_bool("init", true)
|
||||||
|
audio_sample_play(SOUND_CUSTOM_BAD_TO_THE_BONE, gMarioStates[0].pos, 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_hud_render_behind()
|
||||||
|
local weapon = cur_weapon()
|
||||||
|
if weapon == nil or not renderHud or not gGlobalSyncTable.gunModEnabled or gNetworkPlayers[0].currActNum == 99 or obj_get_first_with_behavior_id(id_bhvActSelector) ~= nil then return end
|
||||||
|
|
||||||
|
djui_hud_set_resolution(RESOLUTION_N64)
|
||||||
|
djui_hud_set_font(FONT_HUD)
|
||||||
|
|
||||||
|
local width = djui_hud_get_screen_width()
|
||||||
|
local height = djui_hud_get_screen_height()
|
||||||
|
|
||||||
|
if get_first_person_enabled() and weapon ~= nil and not is_game_paused() then
|
||||||
|
djui_hud_set_color(255, 255, 0, 127)
|
||||||
|
djui_hud_render_texture(TEX_CROSSHAIR, width * 0.5 - 4, height * 0.5 - 4, 0.5, 0.5)
|
||||||
|
end
|
||||||
|
|
||||||
|
local y = height - 35
|
||||||
|
djui_hud_set_color(255, 255, 255, 255)
|
||||||
|
if weapon.maxAmmo ~= 0 then
|
||||||
|
djui_hud_print_text(weapon.ammo .. "/" .. weapon.maxAmmo, width - 128, y, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
local weapon2 = cur_dual_wield_weapon()
|
||||||
|
if weapon2 ~= nil and weapon2.maxAmmo ~= 0 then
|
||||||
|
djui_hud_print_text(weapon2.ammo .. "/" .. weapon2.maxAmmo, 16, y, 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function on_packet_receive(dataTable)
|
||||||
|
if dataTable.packet == PACKET_ATTACK then
|
||||||
|
if gNetworkPlayers[0].currLevelNum == dataTable.level and gNetworkPlayers[0].currAreaIndex == dataTable.area and gNetworkPlayers[0].currActNum == dataTable.act then
|
||||||
|
audio_sample_play(SOUND_CUSTOM_IMPACT, gMarioStates[0].pos, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if dataTable.yoshi then
|
||||||
|
local pos = gMarioStates[network_local_index_from_global(dataTable.globalIndex)].pos
|
||||||
|
spawn_non_sync_object(
|
||||||
|
id_bhvExplosion,
|
||||||
|
E_MODEL_TROLL_EXPLOSION,
|
||||||
|
pos.x, pos.y + 80, pos.z,
|
||||||
|
nil
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
if gNetworkPlayers[0].globalIndex ~= dataTable.globalIndex then return end
|
||||||
|
|
||||||
|
if dataTable.yoshi then
|
||||||
|
set_health(0)
|
||||||
|
else
|
||||||
|
set_health(get_health() - gWeaponTable[dataTable.weaponId].damage)
|
||||||
|
end
|
||||||
|
elseif dataTable.packet == PACKET_SOUND then
|
||||||
|
if gNetworkPlayers[0].currLevelNum == dataTable.level and gNetworkPlayers[0].currAreaIndex == dataTable.area and gNetworkPlayers[0].currActNum == dataTable.act then
|
||||||
|
-- audio_sample_stop(gSoundTable[dataTable.sound])
|
||||||
|
audio_sample_play(gSoundTable[dataTable.sound], { x = dataTable.x, y = dataTable.y, z = dataTable.z }, dataTable.volume)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--------------
|
||||||
|
-- commands --
|
||||||
|
--------------
|
||||||
|
|
||||||
|
local function on_fp_command()
|
||||||
|
set_first_person_enabled(not gFirstPersonCamera.enabled)
|
||||||
|
|
||||||
|
djui_chat_message_create("[Gun Mod] First person mode status: " .. on_or_off(gFirstPersonCamera.enabled))
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_fov_command(msg)
|
||||||
|
local fov = tonumber(msg)
|
||||||
|
if fov ~= nil then
|
||||||
|
if fov <= 0 then
|
||||||
|
fov = FIRST_PERSON_DEFAULT_FOV
|
||||||
|
end
|
||||||
|
mod_storage_save_number("fov", fov)
|
||||||
|
gFirstPersonCamera.fov = fov
|
||||||
|
djui_chat_message_create("[Gun Mod] Set FOV to " .. fov)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
djui_chat_message_create("/gm \\#00ffff\\fov\\#ffff00\\ [number]\\#ffffff\\\nSets the first person camera FOV, default is \\#ffff00\\70\\#ffffff\\")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_give_command(msg)
|
||||||
|
-- if not network_is_server() and not network_is_moderator() then
|
||||||
|
-- djui_chat_message_create("\\#ffa0a0\\You do not have permission to run this command.")
|
||||||
|
-- return true
|
||||||
|
-- end
|
||||||
|
|
||||||
|
if not gGlobalSyncTable.gunModEnabled then
|
||||||
|
djui_chat_message_create("\\#ffa0a0\\[Gun Mod] You need to enable Gun Mod to give yourself a weapon.")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
for id, weapon in pairs(gWeaponTable) do
|
||||||
|
if weapon.name:lower() == msg:lower() then
|
||||||
|
pickup_weapon(id)
|
||||||
|
local text = string.format("[Gun Mod] Gave %s %s", name_without_hex(gNetworkPlayers[0].name), weapon.name)
|
||||||
|
djui_chat_message_create(text)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
djui_chat_message_create("/gm \\#00ffff\\give\\#ffff00\\ " .. get_weapon_list_string() .. "\\#ffffff\\\nGives yourself a gun")
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function on_gm_command(msg)
|
||||||
|
local args = split(msg)
|
||||||
|
if args[1] == "fp" then
|
||||||
|
return on_fp_command()
|
||||||
|
elseif args[1] == "fov" then
|
||||||
|
return on_fov_command(args[2] or "")
|
||||||
|
elseif args[1] == "give" then
|
||||||
|
return on_give_command(args[2] or "")
|
||||||
|
end
|
||||||
|
|
||||||
|
if msg:gsub("%s+", "") == "" then
|
||||||
|
gGlobalSyncTable.gunModEnabled = not gGlobalSyncTable.gunModEnabled
|
||||||
|
djui_chat_message_create("[Gun Mod] Status: " .. on_or_off(gGlobalSyncTable.gunModEnabled))
|
||||||
|
else
|
||||||
|
djui_chat_message_create("/gm \\#00ffff\\[fp|fov|give]\\#7f7f7f\\ (leave blank to toggle Gun Mod on or off)")
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
smlua_text_utils_dialog_replace(DIALOG_167, 1, 4, 30, 200, "Welcome to Gun Mod. After\
|
||||||
|
4 months in development,\
|
||||||
|
hopefully it will have\
|
||||||
|
been worth the wait.\
|
||||||
|
This mod has actually been\
|
||||||
|
in development for 16\
|
||||||
|
months, but progress was\
|
||||||
|
pretty slow until recently.\
|
||||||
|
I decided to rewrite the\
|
||||||
|
rewrite to make this\
|
||||||
|
mod's code less of a\
|
||||||
|
total mess.\
|
||||||
|
-- TUTORIAL --\
|
||||||
|
Press X to shoot\
|
||||||
|
Press Y to reload\
|
||||||
|
Run slash gm help\
|
||||||
|
Princess Toadstool's\
|
||||||
|
castle is just ahead.\
|
||||||
|
\
|
||||||
|
\
|
||||||
|
Press [A] to jump, [Z] to\
|
||||||
|
crouch, and [B] to punch,\
|
||||||
|
read a sign, or grab\
|
||||||
|
something.\
|
||||||
|
Press [B] again to throw\
|
||||||
|
something you're holding.")
|
||||||
|
|
||||||
|
gServerSettings.playerInteractions = PLAYER_INTERACTIONS_PVP
|
||||||
|
|
||||||
|
_G.gunModApi = {
|
||||||
|
enable_gun_mod = enable_gun_mod,
|
||||||
|
get_render_hud = get_render_hud,
|
||||||
|
set_render_hud = set_render_hud,
|
||||||
|
get_weapon = get_weapon,
|
||||||
|
weapon_register = weapon_register,
|
||||||
|
weapon_unregister = weapon_unregister,
|
||||||
|
weapon_unregister_all = weapon_unregister_all,
|
||||||
|
get_weapon_list_string = get_weapon_list_string,
|
||||||
|
obj_set_weapon_params = obj_set_weapon_params,
|
||||||
|
obj_get_weapon_owner = obj_get_weapon_owner,
|
||||||
|
obj_get_weapon_id = obj_get_weapon_id,
|
||||||
|
obj_get_weapon_dual_wield = obj_get_weapon_dual_wield,
|
||||||
|
obj_get_weapon_extra = obj_get_weapon_extra,
|
||||||
|
cur_weapon = cur_weapon,
|
||||||
|
cur_dual_wield_weapon = cur_dual_wield_weapon,
|
||||||
|
get_inventory_slot = get_inventory_slot,
|
||||||
|
set_inventory_slot = set_inventory_slot,
|
||||||
|
pickup_weapon = pickup_weapon,
|
||||||
|
get_health = get_health,
|
||||||
|
set_health = set_health,
|
||||||
|
common_shoot = common_shoot,
|
||||||
|
common_reload = common_reload,
|
||||||
|
bullet_ricochet = bullet_ricochet,
|
||||||
|
obj_generate_hitbox_multiply_func = obj_generate_hitbox_multiply_func,
|
||||||
|
obj_generate_health_func = obj_generate_health_func,
|
||||||
|
shootable_register = shootable_register,
|
||||||
|
gm_hook_behavior = gm_hook_behavior
|
||||||
|
}
|
||||||
|
|
||||||
|
local fov = mod_storage_load_number("fov")
|
||||||
|
if fov == 0 then
|
||||||
|
fov = FIRST_PERSON_DEFAULT_FOV
|
||||||
|
mod_storage_save_number("fov", fov)
|
||||||
|
end
|
||||||
|
gFirstPersonCamera.fov = fov
|
||||||
|
|
||||||
|
if START_IN_FIRST_PERSON then
|
||||||
|
set_first_person_enabled(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
hook_event(HOOK_MARIO_UPDATE, mario_update)
|
||||||
|
hook_event(HOOK_ON_LEVEL_INIT, on_level_init)
|
||||||
|
hook_event(HOOK_ON_PACKET_RECEIVE, on_packet_receive)
|
||||||
|
hook_event(HOOK_ON_HUD_RENDER_BEHIND, on_hud_render_behind)
|
||||||
|
|
||||||
|
gm_hook_behavior(id_bhvMessagePanel, false, obj_sign_hitbox)
|
||||||
|
gm_hook_behavior(id_bhvExclamationBox, false, nil, obj_generate_hitbox_multiply_func(1, 1.8))
|
||||||
|
gm_hook_behavior(id_bhvBreakableBox, false, obj_generate_health_func(HEALTH_BREAKABLE_BOX))
|
||||||
|
gm_hook_behavior(id_bhvBowlingBall, false, obj_generate_health_func(HEALTH_BOWLING_BALL))
|
||||||
|
gm_hook_behavior(id_bhvWaterBomb, false, nil, obj_generate_hitbox_multiply_func(1, 2))
|
||||||
|
gm_hook_behavior(id_bhvChainChomp, false, nil, obj_generate_hitbox_multiply_func(1.5, 1.5))
|
||||||
|
gm_hook_behavior(id_bhvHomingAmp, false, nil, obj_amp_hitbox)
|
||||||
|
gm_hook_behavior(id_bhvCirclingAmp, false, nil, obj_amp_hitbox)
|
||||||
|
gm_hook_behavior(id_bhvFlyGuy, false, nil, obj_generate_hitbox_multiply_func(0.75, 1.75))
|
||||||
|
gm_hook_behavior(id_bhvChuckya, false, obj_chuckya_hitbox)
|
||||||
|
gm_hook_behavior(id_bhvSnufit, false, nil, obj_snufit_hitbox)
|
||||||
|
gm_hook_behavior(id_bhvSpindrift, false, nil, obj_generate_hitbox_multiply_func(0.75, 2))
|
||||||
|
gm_hook_behavior(id_bhvKingBobomb, false, obj_king_bobomb_hitbox)
|
||||||
|
gm_hook_behavior(id_bhvBowser, false, obj_generate_health_func(HEALTH_BOWSER))
|
||||||
|
|
||||||
|
gm_hook_behavior(id_bhvStaticObject, false, obj_skip_in_view_check)
|
||||||
|
|
||||||
|
hook_chat_command("gm", "\\#00ffff\\[fp|fov|give]\\#7f7f7f\\ (leave blank to toggle Gun Mod on or off)", on_gm_command)
|
||||||
|
|
||||||
|
-- matches the function(s) below
|
||||||
|
for i = 0, MAX_PLAYERS - 1 do
|
||||||
|
gPlayerSyncTable[i].curWeapon = WEAPON_MAGNUM
|
||||||
|
gPlayerSyncTable[i].curWeapon2 = WEAPON_PISTOL
|
||||||
|
end
|
||||||
|
|
||||||
|
pickup_weapon(WEAPON_MAGNUM)
|
||||||
|
pickup_weapon(WEAPON_PISTOL)
|
BIN
mods/gun-mod/sound/ak47_shoot.mp3
Normal file
BIN
mods/gun-mod/sound/bad_to_the_bone_riff.mp3
Normal file
BIN
mods/gun-mod/sound/dry.mp3
Normal file
BIN
mods/gun-mod/sound/impact.mp3
Normal file
BIN
mods/gun-mod/sound/magnum_reload.mp3
Normal file
BIN
mods/gun-mod/sound/magnum_shoot.mp3
Normal file
BIN
mods/gun-mod/sound/pistol_reload.mp3
Normal file
BIN
mods/gun-mod/sound/pistol_shoot.mp3
Normal file
BIN
mods/gun-mod/sound/ricochet.mp3
Normal file
BIN
mods/gun-mod/sound/shotgun_shoot.mp3
Normal file
BIN
mods/gun-mod/textures/gun_mod_crosshair.png
Normal file
After Width: | Height: | Size: 163 B |