MCPcopy Create free account
hub / github.com/doldecomp/mkdd / resetPort

Function resetPort

src/Osako/PadMgr.cpp:100–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 }
99
100 void resetPort()
101 {
102 switch (msKartPadInput)
103 {
104 case Input_Local:
105 {
106 for (int i = 0; i < 16; i++)
107 {
108 gpaKartPad[i]->setPadType(KartGamePad::NORMAL);
109 if (i < 4)
110 {
111 gpaKartPad[i]->setPadPort((KartGamePad::PadPort)i);
112 }
113 else
114 {
115 gpaKartPad[i]->setPadPort(KartGamePad::PORT_INV);
116 }
117 }
118 break;
119 }
120 case Input_Net:
121 {
122 for (int i = 0; i < 16; i++)
123 {
124 gpaKartPad[i]->setPadType(KartGamePad::NETWORK);
125
126 u8 port = NetGameMgr::ptr()->getPadConvPort(i);
127 u8 num = NetGameMgr::ptr()->getPadConvNum(i);
128
129 if (num == NetGameMgr::ptr()->getNetworkNum())
130 {
131 gpaKartPad[i]->setPadPort((KartGamePad::PadPort)port);
132 }
133 else
134 {
135 gpaKartPad[i]->setPadPort(KartGamePad::PORT_NET);
136 }
137 }
138 break;
139 }
140 }
141 }
142}

Callers 1

setKartPadInputFunction · 0.85

Calls 5

setPadTypeMethod · 0.80
setPadPortMethod · 0.80
getPadConvPortMethod · 0.80
getPadConvNumMethod · 0.80
getNetworkNumMethod · 0.80

Tested by

no test coverage detected