mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-17 14:00:25 +02:00
5882 lines
208 KiB
C
5882 lines
208 KiB
C
/*
|
|
UI_WIDGET_EVENT_HANDLER_FUNCTIONS.C
|
|
|
|
symbols in this file:
|
|
000D8F90 0090:
|
|
_ui_widget_event_handler_function_invoke (0000)
|
|
000D9020 0010:
|
|
_code_000d9020 (0000)
|
|
000D9030 0010:
|
|
_reset_last_player1_profile_index (0000)
|
|
000D9040 01a0:
|
|
_code_000d9040 (0000)
|
|
000D91E0 0030:
|
|
_code_000d91e0 (0000)
|
|
000D9210 0140:
|
|
_code_000d9210 (0000)
|
|
000D9350 0060:
|
|
_code_000d9350 (0000)
|
|
000D93B0 0030:
|
|
_code_000d93b0 (0000)
|
|
000D93E0 0010:
|
|
_code_000d93e0 (0000)
|
|
000D93F0 0010:
|
|
_code_000d93f0 (0000)
|
|
000D9400 0010:
|
|
_code_000d9400 (0000)
|
|
000D9410 0020:
|
|
_code_000d9410 (0000)
|
|
000D9430 0050:
|
|
_code_000d9430 (0000)
|
|
000D9480 0040:
|
|
_code_000d9480 (0000)
|
|
000D94C0 0090:
|
|
_code_000d94c0 (0000)
|
|
000D9550 0200:
|
|
_code_000d9550 (0000)
|
|
000D9750 0020:
|
|
_code_000d9750 (0000)
|
|
000D9770 0020:
|
|
_code_000d9770 (0000)
|
|
000D9790 0070:
|
|
_code_000d9790 (0000)
|
|
000D9800 0010:
|
|
_code_000d9800 (0000)
|
|
000D9810 0040:
|
|
_code_000d9810 (0000)
|
|
000D9850 0010:
|
|
_code_000d9850 (0000)
|
|
000D9860 0020:
|
|
_code_000d9860 (0000)
|
|
000D9880 00f0:
|
|
_code_000d9880 (0000)
|
|
000D9970 0020:
|
|
_code_000d9970 (0000)
|
|
000D9990 01d0:
|
|
_code_000d9990 (0000)
|
|
000D9B60 0160:
|
|
_code_000d9b60 (0000)
|
|
000D9CC0 0030:
|
|
_code_000d9cc0 (0000)
|
|
000D9CF0 02a0:
|
|
_code_000d9cf0 (0000)
|
|
000D9F90 00f0:
|
|
_code_000d9f90 (0000)
|
|
000DA080 0110:
|
|
_code_000da080 (0000)
|
|
000DA190 0160:
|
|
_code_000da190 (0000)
|
|
000DA2F0 0030:
|
|
_code_000da2f0 (0000)
|
|
000DA320 01c0:
|
|
_code_000da320 (0000)
|
|
000DA4E0 0160:
|
|
_code_000da4e0 (0000)
|
|
000DA640 0140:
|
|
_code_000da640 (0000)
|
|
000DA780 0020:
|
|
_code_000da780 (0000)
|
|
000DA7A0 00e0:
|
|
_code_000da7a0 (0000)
|
|
000DA880 0050:
|
|
_code_000da880 (0000)
|
|
000DA8D0 03a0:
|
|
_code_000da8d0 (0000)
|
|
000DAC70 0220:
|
|
_code_000dac70 (0000)
|
|
000DAE90 0360:
|
|
_code_000dae90 (0000)
|
|
000DB1F0 0580:
|
|
_code_000db1f0 (0000)
|
|
000DB770 02d0:
|
|
_code_000db770 (0000)
|
|
000DBA40 0580:
|
|
_code_000dba40 (0000)
|
|
000DBFC0 0320:
|
|
_code_000dbfc0 (0000)
|
|
000DC2E0 01f0:
|
|
_code_000dc2e0 (0000)
|
|
000DC4D0 00c0:
|
|
_code_000dc4d0 (0000)
|
|
000DC590 00a0:
|
|
_code_000dc590 (0000)
|
|
000DC630 0390:
|
|
_code_000dc630 (0000)
|
|
000DC9C0 0230:
|
|
_code_000dc9c0 (0000)
|
|
000DCBF0 0350:
|
|
_code_000dcbf0 (0000)
|
|
000DCF40 0510:
|
|
_code_000dcf40 (0000)
|
|
000DD450 02e0:
|
|
_code_000dd450 (0000)
|
|
000DD730 0550:
|
|
_code_000dd730 (0000)
|
|
000DDC80 0310:
|
|
_code_000ddc80 (0000)
|
|
000DDF90 0200:
|
|
_code_000ddf90 (0000)
|
|
000DE190 00c0:
|
|
_code_000de190 (0000)
|
|
000DE250 0110:
|
|
_code_000de250 (0000)
|
|
000DE360 0030:
|
|
_code_000de360 (0000)
|
|
000DE390 0100:
|
|
_code_000de390 (0000)
|
|
000DE490 0130:
|
|
_code_000de490 (0000)
|
|
000DE5C0 0020:
|
|
_code_000de5c0 (0000)
|
|
000DE5E0 0050:
|
|
_code_000de5e0 (0000)
|
|
000DE630 0080:
|
|
_code_000de630 (0000)
|
|
000DE6B0 01e0:
|
|
_code_000de6b0 (0000)
|
|
000DE890 02e0:
|
|
_code_000de890 (0000)
|
|
000DEB70 01d0:
|
|
_code_000deb70 (0000)
|
|
000DED40 0340:
|
|
_code_000ded40 (0000)
|
|
000DF080 0050:
|
|
_code_000df080 (0000)
|
|
000DF0D0 0020:
|
|
_code_000df0d0 (0000)
|
|
000DF0F0 0110:
|
|
_code_000df0f0 (0000)
|
|
000DF200 0140:
|
|
_code_000df200 (0000)
|
|
000DF340 0050:
|
|
_code_000df340 (0000)
|
|
000DF390 0040:
|
|
_code_000df390 (0000)
|
|
000DF3D0 0010:
|
|
_code_000df3d0 (0000)
|
|
000DF3E0 0180:
|
|
_code_000df3e0 (0000)
|
|
000DF560 00f0:
|
|
_code_000df560 (0000)
|
|
000DF650 00a0:
|
|
_code_000df650 (0000)
|
|
000DF6F0 00a0:
|
|
_code_000df6f0 (0000)
|
|
000DF790 0020:
|
|
_code_000df790 (0000)
|
|
000DF7B0 0020:
|
|
_code_000df7b0 (0000)
|
|
000DF7D0 0020:
|
|
_code_000df7d0 (0000)
|
|
000DF7F0 0020:
|
|
_code_000df7f0 (0000)
|
|
000DF810 0010:
|
|
_code_000df810 (0000)
|
|
000DF820 0010:
|
|
_code_000df820 (0000)
|
|
000DF830 0050:
|
|
_code_000df830 (0000)
|
|
000DF880 0070:
|
|
_code_000df880 (0000)
|
|
000DF8F0 0060:
|
|
_code_000df8f0 (0000)
|
|
000DF950 0080:
|
|
_code_000df950 (0000)
|
|
000DF9D0 0180:
|
|
_code_000df9d0 (0000)
|
|
000DFB50 0050:
|
|
_code_000dfb50 (0000)
|
|
000DFBA0 0010:
|
|
_code_000dfba0 (0000)
|
|
000DFBB0 0090:
|
|
_code_000dfbb0 (0000)
|
|
000DFC40 0160:
|
|
_code_000dfc40 (0000)
|
|
000DFDA0 0020:
|
|
_code_000dfda0 (0000)
|
|
000DFDC0 00e0:
|
|
_code_000dfdc0 (0000)
|
|
000DFEA0 0020:
|
|
_code_000dfea0 (0000)
|
|
000DFEC0 0050:
|
|
_code_000dfec0 (0000)
|
|
000DFF10 02a0:
|
|
_code_000dff10 (0000)
|
|
00273234 001c:
|
|
??_C@_0BM@CKKFJKOP@levels?2test?2longest?2longest?$AA@ (0000)
|
|
00273250 001a:
|
|
??_C@_0BK@MPFNKPCD@levels?2test?2putput?2putput?$AA@ (0000)
|
|
0027326C 001a:
|
|
??_C@_0BK@OFNDPNPO@levels?2test?2wizard?2wizard?$AA@ (0000)
|
|
00273288 0022:
|
|
??_C@_0CC@POIILJDH@levels?2test?2bloodgulch?2bloodgulc@ (0000)
|
|
002732AC 002a:
|
|
??_C@_0CK@HECAMEMK@levels?2test?2boardingaction?2board@ (0000)
|
|
002732D8 001e:
|
|
??_C@_0BO@FIJEGPFC@levels?2test?2chillout?2chillout?$AA@ (0000)
|
|
002732F8 0022:
|
|
??_C@_0CC@MJDACFAF@levels?2test?2hangemhigh?2hangemhig@ (0000)
|
|
0027331C 001e:
|
|
??_C@_0BO@NDKKNFGF@levels?2test?2prisoner?2prisoner?$AA@ (0000)
|
|
0027333C 001c:
|
|
??_C@_0BM@IKJMNKIP@levels?2test?2ratrace?2ratrace?$AA@ (0000)
|
|
00273358 0020:
|
|
??_C@_0CA@JNPLOBAC@levels?2test?2damnation?2damnation?$AA@ (0000)
|
|
00273378 0022:
|
|
??_C@_0CC@JCCBAGPB@levels?2test?2sidewinder?2sidewinde@ (0000)
|
|
0027339C 0024:
|
|
??_C@_0CE@KHFKIHNB@levels?2test?2beavercreek?2beavercr@ (0000)
|
|
002733C0 001d:
|
|
??_C@_0BN@PJAAEBLK@new?5game?5if?5no?5plyr?5profiles?$AA@ (0000)
|
|
002733E0 0015:
|
|
??_C@_0BF@GNFLEJPM@begin?5music?5fade?5out?$AA@ (0000)
|
|
002733F8 0015:
|
|
??_C@_0BF@NOJBMGJJ@difficulty?5menu?5init?$AA@ (0000)
|
|
00273410 0017:
|
|
??_C@_0BH@MPIABOAL@pop?5history?5stack?5once?$AA@ (0000)
|
|
00273428 0016:
|
|
??_C@_0BG@DCONGAJK@new?5campaign?5decision?$AA@ (0000)
|
|
00273440 0014:
|
|
??_C@_0BE@LAFLJECA@new?5campaign?5chosen?$AA@ (0000)
|
|
00273454 0017:
|
|
??_C@_0BH@PGIFGDHO@exit?5to?5xbox?5dashboard?$AA@ (0000)
|
|
0027346C 001d:
|
|
??_C@_0BN@CMCONINM@close?5if?5not?5editing?5profile?$AA@ (0000)
|
|
0027348C 0017:
|
|
??_C@_0BH@GEKFCEPO@net?5game?5unjoin?5player?$AA@ (0000)
|
|
002734A4 0020:
|
|
??_C@_0CA@FJIAAMCI@start?5server?5if?5none?5advertised?$AA@ (0000)
|
|
002734C4 001f:
|
|
??_C@_0BP@JGPNCJEH@error?5if?5no?5network?5connection?$AA@ (0000)
|
|
002734E4 001c:
|
|
??_C@_0BM@CNEIABDN@sp?5set?5p2?5controller?5choice?$AA@ (0000)
|
|
00273500 001c:
|
|
??_C@_0BM@ICOBEMPH@sp?5set?5p1?5controller?5choice?$AA@ (0000)
|
|
0027351C 001c:
|
|
??_C@_0BM@MMMCBMPA@sp?5reset?5controller?5choices?$AA@ (0000)
|
|
00273538 000b:
|
|
??_C@_0L@NMGEHBFG@run?5xdemos?$AA@ (0000)
|
|
00273544 0015:
|
|
??_C@_0BF@KAAHCELF@disable?5if?5no?5xdemos?$AA@ (0000)
|
|
0027355C 0017:
|
|
??_C@_0BH@LFMLNMCG@net?5server?5allow?5start?$AA@ (0000)
|
|
00273574 0017:
|
|
??_C@_0BH@JMMJIBIA@net?5server?5defer?5start?$AA@ (0000)
|
|
0027358C 0017:
|
|
??_C@_0BH@JOMFGOKO@net?5server?5accept?5conx?$AA@ (0000)
|
|
002735A4 0015:
|
|
??_C@_0BF@OPPDMGPP@net?5game?5delay?5start?$AA@ (0000)
|
|
002735BC 0015:
|
|
??_C@_0BF@OJFPEDJ@net?5game?5speed?5start?$AA@ (0000)
|
|
002735D4 001b:
|
|
??_C@_0BL@PLPJJODF@create?$CGedit?5player?5profile?$AA@ (0000)
|
|
002735F0 001d:
|
|
??_C@_0BN@ECPIMEEB@create?$CGedit?5playlist?5profile?$AA@ (0000)
|
|
00273610 0016:
|
|
??_C@_0BG@MKAEGKD@cancel?5profile?5delete?$AA@ (0000)
|
|
00273628 001b:
|
|
??_C@_0BL@NOENJPBG@final?5del?5playlist?5profile?$AA@ (0000)
|
|
00273644 0019:
|
|
??_C@_0BJ@MAIEEAIE@final?5del?5player?5profile?$AA@ (0000)
|
|
00273660 001d:
|
|
??_C@_0BN@JEGEKGKO@request?5del?5playlist?5profile?$AA@ (0000)
|
|
00273680 001b:
|
|
??_C@_0BL@OFFLHPFB@request?5del?5player?5profile?$AA@ (0000)
|
|
0027369C 001e:
|
|
??_C@_0BO@CDIODLMI@main?5menu?5switch?5to?5solo?5game?$AA@ (0000)
|
|
002736BC 0014:
|
|
??_C@_0BE@OBGOABGF@mp?5game?5player?5quit?$AA@ (0000)
|
|
002736D0 001b:
|
|
??_C@_0BL@KBEIKELI@plyr?5prf?5save?5adv?5cntl?5set?$AA@ (0000)
|
|
002736EC 001c:
|
|
??_C@_0BM@JCFNELGA@plyr?5prf?5save?5cntl?5settings?$AA@ (0000)
|
|
00273708 001b:
|
|
??_C@_0BL@MOLIBDPJ@plyr?5prf?5init?5adv?5cntl?5set?$AA@ (0000)
|
|
00273724 001c:
|
|
??_C@_0BM@JDOJMKNB@plyr?5prf?5init?5cntl?5settings?$AA@ (0000)
|
|
00273740 001c:
|
|
??_C@_0BM@IDODMIOF@player?5profile?5save?5changes?$AA@ (0000)
|
|
0027375C 001b:
|
|
??_C@_0BL@LNBEKBDK@player?5profile?5change?5name?$AA@ (0000)
|
|
00273778 001b:
|
|
??_C@_0BL@FJHEPBDC@player?5profile?5end?5editing?$AA@ (0000)
|
|
00273794 001d:
|
|
??_C@_0BN@JGMAOMFB@player?5profile?5begin?5editing?$AA@ (0000)
|
|
002737B4 001a:
|
|
??_C@_0BK@DDPMGOLB@color?5picker?5select?5color?$AA@ (0000)
|
|
002737D0 001a:
|
|
??_C@_0BK@KLIELBBF@color?5picker?5menu?5dispose?$AA@ (0000)
|
|
002737EC 001d:
|
|
??_C@_0BN@LOBGBHKN@color?5picker?5menu?5initialize?$AA@ (0000)
|
|
0027380C 0018:
|
|
??_C@_0BI@BEFJGPMM@mp?5profile?5save?5changes?$AA@ (0000)
|
|
00273824 001f:
|
|
??_C@_0BP@NNAOBMAO@mp?5profile?5init?5indicator?5opts?$AA@ (0000)
|
|
00273844 001d:
|
|
??_C@_0BN@DOGEIAEE@mp?5profile?5init?5item?5options?$AA@ (0000)
|
|
00273864 001c:
|
|
??_C@_0BM@HMFJPO@mp?5profile?5init?5player?5opts?$AA@ (0000)
|
|
00273880 001d:
|
|
??_C@_0BN@JDIGJKOO@mp?5profile?5init?5racing?5rules?$AA@ (0000)
|
|
002738A0 001e:
|
|
??_C@_0BO@HEJNENFA@mp?5profile?5init?5oddball?5rules?$AA@ (0000)
|
|
002738C0 001d:
|
|
??_C@_0BN@BJHDNLDO@mp?5profile?5init?5slayer?5rules?$AA@ (0000)
|
|
002738E0 001b:
|
|
??_C@_0BL@CECKFCFG@mp?5profile?5init?5koth?5rules?$AA@ (0000)
|
|
002738FC 001a:
|
|
??_C@_0BK@OOPLKCME@mp?5profile?5init?5ctf?5rules?$AA@ (0000)
|
|
00273918 0015:
|
|
??_C@_0BF@CGAEGGLI@mp?5profile?5init?5name?$AA@ (0000)
|
|
00273930 001c:
|
|
??_C@_0BM@FLOIEBB@mp?5profile?5init?5game?5engine?$AA@ (0000)
|
|
0027394C 001e:
|
|
??_C@_0BO@MBNNOLCN@mp?5profile?5set?5indicator?5opts?$AA@ (0000)
|
|
0027396C 001c:
|
|
??_C@_0BM@HIEEMHHH@mp?5profile?5set?5item?5options?$AA@ (0000)
|
|
00273988 001e:
|
|
??_C@_0BO@JOANNGJK@mp?5profile?5set?5player?5options?$AA@ (0000)
|
|
002739A8 001c:
|
|
??_C@_0BM@NFKGNNNN@mp?5profile?5set?5racing?5rules?$AA@ (0000)
|
|
002739C4 001d:
|
|
??_C@_0BN@MLALAMAB@mp?5profile?5set?5oddball?5rules?$AA@ (0000)
|
|
002739E4 001c:
|
|
??_C@_0BM@FPFDJMAN@mp?5profile?5set?5slayer?5rules?$AA@ (0000)
|
|
00273A00 001a:
|
|
??_C@_0BK@LECHLALA@mp?5profile?5set?5koth?5rules?$AA@ (0000)
|
|
00273A1C 0019:
|
|
??_C@_0BJ@FMAENFML@mp?5profile?5set?5ctf?5rules?$AA@ (0000)
|
|
00273A38 0017:
|
|
??_C@_0BH@NFGKAADB@mp?5profile?5change?5name?$AA@ (0000)
|
|
00273A50 001b:
|
|
??_C@_0BL@EMEHMOLO@mp?5profile?5set?5game?5engine?$AA@ (0000)
|
|
00273A6C 0017:
|
|
??_C@_0BH@DBAKFADJ@mp?5profile?5end?5editing?$AA@ (0000)
|
|
00273A84 0019:
|
|
??_C@_0BJ@NEOFMOJK@mp?5profile?5begin?5editing?$AA@ (0000)
|
|
00273AA0 001d:
|
|
??_C@_0BN@JEELJKPD@1wide?5plyr?5prof?5set?5for?5game?$AA@ (0000)
|
|
00273AC0 001d:
|
|
??_C@_0BN@FCEECILL@3wide?5plyr?5prof?5set?5for?5game?$AA@ (0000)
|
|
00273AE0 001c:
|
|
??_C@_0BM@FDFIEBEE@player?5profile?5list?5dispose?$AA@ (0000)
|
|
00273AFC 001f:
|
|
??_C@_0BP@EILBCMJA@player?5profile?5list?5initialize?$AA@ (0000)
|
|
00273B1C 0015:
|
|
??_C@_0BF@DEFPINBF@net?5game?5join?5player?$AA@ (0000)
|
|
00273B34 0011:
|
|
??_C@_0BB@OAGILGIB@swap?5player?5team?$AA@ (0000)
|
|
00273B48 0018:
|
|
??_C@_0BI@PANNINNP@mp?5profile?5set?5for?5game?$AA@ (0000)
|
|
00273B60 0019:
|
|
??_C@_0BJ@LEMMAL@mp?5profiles?5list?5dispose?$AA@ (0000)
|
|
00273B7C 001c:
|
|
??_C@_0BM@BEOGKOGL@mp?5profiles?5list?5initialize?$AA@ (0000)
|
|
00273B98 0010:
|
|
??_C@_0BA@HKPGOGHG@mp?5level?5select?$AA@ (0000)
|
|
00273BA8 0016:
|
|
??_C@_0BG@DPANKKCK@mp?5level?5list?5dispose?$AA@ (0000)
|
|
00273BC0 0019:
|
|
??_C@_0BJ@KMHDEFIK@mp?5level?5list?5initialize?$AA@ (0000)
|
|
00273BDC 0020:
|
|
??_C@_0CA@IHMPEHAC@pick?5play?5stage?5for?5quick?5start?$AA@ (0000)
|
|
00273BFC 0018:
|
|
??_C@_0BI@GLDLEOML@mp?5type?5menu?5initialize?$AA@ (0000)
|
|
00273C14 0014:
|
|
??_C@_0BE@IAMGJKAG@main?5menu?5intialize?$AA@ (0000)
|
|
00273C28 0015:
|
|
??_C@_0BF@IPNDONHP@coop?5game?5initialize?$AA@ (0000)
|
|
00273C40 001d:
|
|
??_C@_0BN@NGOBJECA@split?5screen?5game?5initialize?$AA@ (0000)
|
|
00273C60 001f:
|
|
??_C@_0BP@OKMDBJFP@net?5game?5join?5from?5server?5list?$AA@ (0000)
|
|
00273C80 0016:
|
|
??_C@_0BG@KCDKAAGE@shutdown?5network?5game?$AA@ (0000)
|
|
00273C98 001d:
|
|
??_C@_0BN@BNONIGKN@dispose?5net?5game?5server?5list?$AA@ (0000)
|
|
00273CB8 001a:
|
|
??_C@_0BK@OIAMDICB@start?5network?5game?5server?$AA@ (0000)
|
|
00273CD4 0020:
|
|
??_C@_0CA@BOOGOHNA@initialize?5net?5game?5server?5list?$AA@ (0000)
|
|
00273CF4 001b:
|
|
??_C@_0BL@HNHGNHOC@join?5controller?5to?5mp?5game?$AA@ (0000)
|
|
00273D10 001f:
|
|
??_C@_0BP@NOHMKMMJ@clear?5multiplayer?5player?5joins?$AA@ (0000)
|
|
00273D30 001f:
|
|
??_C@_0BP@HKCAHEBO@pause?5game?5return?5to?5main?5menu?$AA@ (0000)
|
|
00273D50 0019:
|
|
??_C@_0BJ@MBLNANKA@pause?5game?5restart?5level?$AA@ (0000)
|
|
00273D6C 0021:
|
|
??_C@_0CB@MLJNKJPN@pause?5game?5restart?5at?5checkpoint@ (0000)
|
|
00273D90 000f:
|
|
??_C@_0P@ELIKNFC@start?5new?5game?$AA@ (0000)
|
|
00273DA0 000f:
|
|
??_C@_0P@NMIEKKIE@set?5difficulty?$AA@ (0000)
|
|
00273DB0 0013:
|
|
??_C@_0BD@CFCHPLOM@solo?5level?5set?5map?$AA@ (0000)
|
|
00273DC4 0016:
|
|
??_C@_0BG@GLIOCLOO@dispose?5sp?5level?5list?$AA@ (0000)
|
|
00273DDC 001e:
|
|
??_C@_0BO@GFDJFBIC@initialize?5sp?5level?5list?5coop?$AA@ (0000)
|
|
00273DFC 001e:
|
|
??_C@_0BO@MKMFHGMH@initialize?5sp?5level?5list?5solo?$AA@ (0000)
|
|
00273E1C 0018:
|
|
??_C@_0BI@KBLNOBEE@list?5goto?5previous?5item?$AA@ (0000)
|
|
00273E34 0014:
|
|
??_C@_0BE@GIAPNLMB@list?5goto?5next?5item?$AA@ (0000)
|
|
00273E48 0005:
|
|
??_C@_04HIBGFPH@NULL?$AA@ (0000)
|
|
00273E50 001f:
|
|
??_C@_0BP@LILGJJIN@invalid?5event_handler_function?$AA@ (0000)
|
|
00273E70 001a:
|
|
??_C@_0BK@KLBEFMEG@event?5handler?5?8?$CFs?8?5failed?$AA@ (0000)
|
|
00273E8C 002d:
|
|
??_C@_0CN@PLPCDKAG@?$CIwidget?5?$CB?$DN?5NULL?$CJ?5?$CG?$CG?5?$CIwidget_dele@ (0000)
|
|
00273EBC 003d:
|
|
??_C@_0DN@CNKLADJF@c?3?2halo?2SOURCE?2interface?2ui_widg@ (0000)
|
|
00273EFC 0033:
|
|
??_C@_0DD@OHOLFOBA@expected?53?5list?5items?5for?5?8solo?5@ (0000)
|
|
00273F30 003c:
|
|
??_C@_0DM@NMDHJKNH@expected?5a?5spinner?5list?5widget?5f@ (0000)
|
|
00273F6C 0022:
|
|
??_C@_0CC@PKIAILIE@this?5level?5is?5unavailable?5to?5you@ (0000)
|
|
00273F90 002c:
|
|
??_C@_0CM@JJCEJILN@invalid?5player?5count?5for?5single?5@ (0000)
|
|
00273FBC 0031:
|
|
??_C@_0DB@OCCHKEGI@I?5don?8t?5think?5this?5is?5the?5solo?5l@ (0000)
|
|
00273FF0 0031:
|
|
??_C@_0DB@KBOONLAB@I?5don?8t?5think?5this?5is?5the?5diffic@ (0000)
|
|
00274028 0043:
|
|
??_C@_0ED@FBGCADHE@need?5a?5specific?5local?5player?5ind@ (0000)
|
|
0027406C 0038:
|
|
??_C@_0DI@HJCBGPBM@failed?5to?5create?5network?5client?5@ (0000)
|
|
002740A8 0071:
|
|
??_C@_0HB@LIIHEKKC@unable?5to?5join?5server?3?5this?5does@ (0000)
|
|
00274120 0065:
|
|
??_C@_0GF@PKNHAMOD@unable?5to?5join?5server?3?5there?5are@ (0000)
|
|
00274188 0020:
|
|
??_C@_0CA@NOFBALF@attempted?5to?5join?5a?5closed?5game?$AA@ (0000)
|
|
002741A8 0057:
|
|
??_C@_0FH@LKFHGHJL@attempted?5to?5join?5a?5network?5game@ (0000)
|
|
00274200 0036:
|
|
??_C@_0DG@KBGBLHKP@attempted?5to?5join?5a?5network?5game@ (0000)
|
|
00274238 0028:
|
|
??_C@_0CI@FDBEIAII@failed?5to?5initiate?5join?5game?5pro@ (0000)
|
|
00274260 0030:
|
|
??_C@_0DA@JMNAFPHL@failed?5to?5initiate?5split?5screen?5@ (0000)
|
|
00274290 003a:
|
|
??_C@_0DK@FAPNEHOE@expected?53?5list?5items?5for?5?8multi@ (0000)
|
|
002742D0 0043:
|
|
??_C@_0ED@LIBBFHLL@expected?5a?5spinner?5list?5widget?5f@ (0000)
|
|
00274314 0005:
|
|
??_C@_04GIIIDFDH@?6?$AN?5?7?$AA@ (0000)
|
|
0027431C 0016:
|
|
??_C@_0BG@JCJMDKIB@d?3?2map_automation?4txt?$AA@ (0000)
|
|
00274338 004e:
|
|
??_C@_0EO@BEGBILMM@invalid?5multiplayer?5level?5specif@ (0000)
|
|
00274388 004d:
|
|
??_C@_0EN@ECKNGNPN@expected?5the?5multiplayer?5level?5s@ (0000)
|
|
002743D8 0045:
|
|
??_C@_0EF@MKBKJGIH@expected?5a?5wrapper?5widget?5around@ (0000)
|
|
00274420 003d:
|
|
??_C@_0DN@CGGANPPO@expected?53?5list?5items?5for?5?8multi@ (0000)
|
|
00274460 0046:
|
|
??_C@_0EG@KCPOAKJJ@expected?5a?5spinner?5list?5widget?5f@ (0000)
|
|
002744A8 002e:
|
|
??_C@_0CO@IOMLMFLI@failed?5to?5retrieve?5user?5selected@ (0000)
|
|
002744D8 001a:
|
|
??_C@_0BK@IHCJGFAG@d?3?2variant_automation?4txt?$AA@ (0000)
|
|
002744F8 0052:
|
|
??_C@_0FC@NPAIGO@invalid?5multiplayer?5profile?5spec@ (0000)
|
|
0027454C 003c:
|
|
??_C@_0DM@EHEIABGG@expected?53?5list?5items?5for?5?8multi@ (0000)
|
|
00274588 0045:
|
|
??_C@_0EF@GHNMLIHF@expected?5a?5spinner?5list?5widget?5f@ (0000)
|
|
002745D0 004f:
|
|
??_C@_0EP@BPILFDAD@expected?5the?5multiplayer?5profile@ (0000)
|
|
00274620 0047:
|
|
??_C@_0EH@IDEDNEPI@expected?5a?5wrapper?5widget?5around@ (0000)
|
|
00274668 0034:
|
|
??_C@_0DE@BFAJHNAN@failed?5to?5update?5player?8s?5team?5f@ (0000)
|
|
0027469C 0006:
|
|
??_C@_05GFHEIIDD@event?$AA@ (0000)
|
|
002746A4 001c:
|
|
??_C@_0BM@ODJCCMDB@failed?5to?5send?5join?5request?$AA@ (0000)
|
|
002746C0 0005:
|
|
??_C@_04MJNAPEEI@game?$AA@ (0000)
|
|
002746C8 0044:
|
|
??_C@_0EE@OLLGDBGO@expected?5either?51?5or?53?5list?5item@ (0000)
|
|
00274710 0041:
|
|
??_C@_0EB@DCCMCEEJ@expected?5a?5spinner?5list?5widget?5f@ (0000)
|
|
00274754 0028:
|
|
??_C@_0CI@FBPJAHMJ@this?5is?5not?5a?5selectable?5player?5@ (0000)
|
|
0027477C 0030:
|
|
??_C@_0DA@INIMKAED@failed?5to?5retrieve?5user?5selected@ (0000)
|
|
002747B0 004d:
|
|
??_C@_0EN@DAMMCLCE@invalid?5multiplayer?5profile?5spec@ (0000)
|
|
00274800 0037:
|
|
??_C@_0DH@OLFFHCGO@expected?53?5list?5items?5for?5?8playe@ (0000)
|
|
00274838 0040:
|
|
??_C@_0EA@KOPPJHK@expected?5a?5spinner?5list?5widget?5f@ (0000)
|
|
00274878 0052:
|
|
??_C@_0FC@GCMGMAHG@expected?5the?5player?5profile?5sele@ (0000)
|
|
002748CC 003b:
|
|
??_C@_0DL@DGCCINMB@setting?5a?5player?5profile?5require@ (0000)
|
|
00274908 0050:
|
|
??_C@_0FA@MNFIIJIE@invalid?5multiplayer?5profile?5spec@ (0000)
|
|
00274958 0052:
|
|
??_C@_0FC@GEGBOOAJ@expected?5a?5code?9generated?51?9wide@ (0000)
|
|
002749B0 0066:
|
|
??_C@_0GG@HKMBCICA@failed?5to?5find?5the?51?9wide?5spinne@ (0000)
|
|
00274A18 0050:
|
|
??_C@_0FA@OKGLHGEL@expected?5the?5multiplayer?5profile@ (0000)
|
|
00274A68 0029:
|
|
??_C@_0CJ@BILCCILP@failed?5to?5retrieve?5editable?5game@ (0000)
|
|
00274A94 0024:
|
|
??_C@_0CE@EHKAIEHI@unknown?5game?5engine?5option?5selec@ (0000)
|
|
00274AB8 002f:
|
|
??_C@_0CP@NEIOJJBH@expected?5column?5list?5for?5game?5en@ (0000)
|
|
00274AE8 0032:
|
|
??_C@_0DC@BKONMLHO@failed?5to?5invoke?5virtual?5keyboar@ (0000)
|
|
00274B20 0041:
|
|
??_C@_0EB@HBCCICNL@unknown?5option?5selected?5in?5?8capt@ (0000)
|
|
00274B64 002f:
|
|
??_C@_0CP@LPNNIAMP@expected?5?8captures?5to?5win?8?5optio@ (0000)
|
|
00274B94 0020:
|
|
??_C@_0CA@JIGFKFNJ@expected?5?8captures?5to?5win?8?5item?$AA@ (0000)
|
|
00274BB8 0047:
|
|
??_C@_0EH@JFABHGNL@unknown?5option?5selected?5in?5?8flag@ (0000)
|
|
00274C00 0035:
|
|
??_C@_0DF@DCLCNIIN@expected?5?8flag?5at?5home?5to?5score?8@ (0000)
|
|
00274C38 0026:
|
|
??_C@_0CG@HKINOOCO@expected?5?8flag?5at?5home?5to?5score?8@ (0000)
|
|
00274C60 0041:
|
|
??_C@_0EB@CGKNEHBN@unknown?5option?5selected?5in?5?8flag@ (0000)
|
|
00274CA4 002f:
|
|
??_C@_0CP@OIFCEFAJ@expected?5?8flag?5must?5reset?8?5optio@ (0000)
|
|
00274CD4 0020:
|
|
??_C@_0CA@MJDABGHA@expected?5?8flag?5must?5reset?8?5item?$AA@ (0000)
|
|
00274CF4 003d:
|
|
??_C@_0DN@PHJOOEPC@unknown?5option?5selected?5in?5?8sing@ (0000)
|
|
00274D34 002b:
|
|
??_C@_0CL@LLJHPHCN@expected?5?8single?5flag?8?5option?5sp@ (0000)
|
|
00274D60 0021:
|
|
??_C@_0CB@LHIFFFIG@expected?5?8single?5flag?8?5list?5item@ (0000)
|
|
00274D84 0039:
|
|
??_C@_0DJ@HLIJINGC@unknown?5option?5selected?5in?5?8assa@ (0000)
|
|
00274DC0 0027:
|
|
??_C@_0CH@PDPKILPB@expected?5?8assault?8?5option?5spinne@ (0000)
|
|
00274DE8 001d:
|
|
??_C@_0BN@CBOBGHLN@expected?5?8assault?8?5list?5item?$AA@ (0000)
|
|
00274E08 0037:
|
|
??_C@_0DH@MEHAIAGM@unknown?5option?5selected?5in?5?8team@ (0000)
|
|
00274E40 0025:
|
|
??_C@_0CF@CJCOPGKG@expected?5?8teams?8?5option?5spinner?5@ (0000)
|
|
00274E68 0016:
|
|
??_C@_0BG@PCIKNPB@expected?5?8teams?8?5item?$AA@ (0000)
|
|
00274E80 003e:
|
|
??_C@_0DO@BCHNEKIC@unknown?5option?5selected?5in?5?8scor@ (0000)
|
|
00274EC0 002c:
|
|
??_C@_0CM@EFNIMNE@expected?5?8score?5to?5win?8?5option?5s@ (0000)
|
|
00274EEC 0022:
|
|
??_C@_0CC@HPHFEIIB@expected?5?8score?5to?5win?8?5list?5ite@ (0000)
|
|
00274F10 003d:
|
|
??_C@_0DN@CIHCFDHC@unknown?5option?5selected?5in?5?8movi@ (0000)
|
|
00274F50 002b:
|
|
??_C@_0CL@GEHLEAKN@expected?5?8moving?5hill?8?5option?5sp@ (0000)
|
|
00274F7C 0021:
|
|
??_C@_0CB@GMMNACEB@expected?5?8moving?5hill?8?5list?5item@ (0000)
|
|
00274FA0 003e:
|
|
??_C@_0DO@EGAILLBM@unknown?5option?5selected?5in?5?8kill@ (0000)
|
|
00274FE0 002c:
|
|
??_C@_0CM@FACIHNEK@expected?5?8kills?5to?5win?8?5option?5s@ (0000)
|
|
0027500C 001d:
|
|
??_C@_0BN@ONFPNDEA@expected?5?8kills?5to?5win?8?5item?$AA@ (0000)
|
|
0027502C 003e:
|
|
??_C@_0DO@LOCDLFDG@unknown?5option?5selected?5in?5?8kill@ (0000)
|
|
0027506C 002c:
|
|
??_C@_0CM@KIADHDGA@expected?5?8kill?5penalty?8?5option?5s@ (0000)
|
|
00275098 001d:
|
|
??_C@_0BN@EEPNIEIC@expected?5?8kill?5penalty?8?5item?$AA@ (0000)
|
|
002750B8 003f:
|
|
??_C@_0DP@OMJBMMFJ@unknown?5option?5selected?5in?5?8kill@ (0000)
|
|
002750F8 002d:
|
|
??_C@_0CN@GOIPBIFO@expected?5?8kill?5in?5order?8?5option?5@ (0000)
|
|
00275128 001e:
|
|
??_C@_0BO@BPPJICBD@expected?5?8kill?5in?5order?8?5item?$AA@ (0000)
|
|
00275148 003d:
|
|
??_C@_0DN@CAAKCEOG@unknown?5option?5selected?5in?5?8deat@ (0000)
|
|
00275188 002b:
|
|
??_C@_0CL@GMADDHDJ@expected?5?8death?5bonus?8?5option?5sp@ (0000)
|
|
002751B4 0021:
|
|
??_C@_0CB@GGOOLOIH@expected?5?8death?5bonus?8?5list?5item@ (0000)
|
|
002751D8 001d:
|
|
??_C@_0BN@BGJOOIEM@expected?5?8score?5to?5win?8?5item?$AA@ (0000)
|
|
002751F8 0042:
|
|
??_C@_0EC@CNGNLKIP@unknown?5option?5selected?5in?5?8ball@ (0000)
|
|
0027523C 0030:
|
|
??_C@_0DA@DHHJJBPA@expected?5?8ball?5spawn?5count?8?5opti@ (0000)
|
|
0027526C 0021:
|
|
??_C@_0CB@KFIKNLPP@expected?5?8ball?5spawn?5count?8?5item@ (0000)
|
|
00275290 003e:
|
|
??_C@_0DO@CNOIDBIE@unknown?5option?5selected?5in?5?8rand@ (0000)
|
|
002752D0 002c:
|
|
??_C@_0CM@DLMIPHNC@expected?5?8random?5start?8?5option?5s@ (0000)
|
|
002752FC 001d:
|
|
??_C@_0BN@IGOMDGMO@expected?5?8random?5start?8?5item?$AA@ (0000)
|
|
0027531C 003b:
|
|
??_C@_0DL@ELHEFNKJ@unknown?5option?5selected?5in?5?8ball@ (0000)
|
|
00275358 0029:
|
|
??_C@_0CJ@PIHLKJDG@expected?5?8ball?5type?8?5option?5spin@ (0000)
|
|
00275384 001a:
|
|
??_C@_0BK@KGJGIPPN@expected?5?8ball?5type?8?5item?$AA@ (0000)
|
|
002753A0 0041:
|
|
??_C@_0EB@PAOCLLOA@unknown?5option?5selected?5in?5?8spee@ (0000)
|
|
002753E4 002f:
|
|
??_C@_0CP@DOBNLJPE@expected?5?8speed?5with?5ball?8?5optio@ (0000)
|
|
00275414 0020:
|
|
??_C@_0CA@JLLKBAE@expected?5?8speed?5with?5ball?8?5item?$AA@ (0000)
|
|
00275438 0044:
|
|
??_C@_0EE@JGOKJLCD@unknown?5option?5selected?5in?5?8trai@ (0000)
|
|
0027547C 0032:
|
|
??_C@_0DC@JCPBBNEO@expected?5?8trait?5without?5ball?8?5op@ (0000)
|
|
002754B0 0028:
|
|
??_C@_0CI@OIIALKKI@expected?5?8trait?5without?5ball?8?5li@ (0000)
|
|
002754D8 0041:
|
|
??_C@_0EB@JHLOGGN@unknown?5option?5selected?5in?5?8trai@ (0000)
|
|
0027551C 002f:
|
|
??_C@_0CP@MHIEOEHJ@expected?5?8trait?5with?5ball?8?5optio@ (0000)
|
|
0027554C 0025:
|
|
??_C@_0CF@IEGNKFJE@expected?5?8trait?5with?5ball?8?5list?5@ (0000)
|
|
00275574 003d:
|
|
??_C@_0DN@MLCIAKGM@unknown?5option?5selected?5in?5?8laps@ (0000)
|
|
002755B4 002b:
|
|
??_C@_0CL@IHCBBJLD@expected?5?8laps?5to?5win?8?5option?5sp@ (0000)
|
|
002755E0 001c:
|
|
??_C@_0BM@PDNFGFIN@expected?5?8laps?5to?5win?8?5item?$AA@ (0000)
|
|
002755FC 003b:
|
|
??_C@_0DL@PFKKAJFD@unknown?5option?5selected?5in?5?8race@ (0000)
|
|
00275638 0029:
|
|
??_C@_0CJ@EGKFPNMM@expected?5?8race?5type?8?5option?5spin@ (0000)
|
|
00275664 001f:
|
|
??_C@_0BP@OOINMFFA@expected?5?8race?5type?8?5list?5item?$AA@ (0000)
|
|
00275684 003e:
|
|
??_C@_0DO@BBKCLPHM@unknown?5option?5selected?5in?5?8team@ (0000)
|
|
002756C4 002c:
|
|
??_C@_0CM@HICHJCK@expected?5?8team?5scoring?8?5option?5s@ (0000)
|
|
002756F0 0022:
|
|
??_C@_0CC@EHLHFBCF@expected?5?8team?5scoring?8?5list?5ite@ (0000)
|
|
00275718 0041:
|
|
??_C@_0EB@JIMOAOFB@unknown?5option?5selected?5in?5?8suic@ (0000)
|
|
0027575C 002f:
|
|
??_C@_0CP@FGDBAMEF@expected?5?8suicide?5penalty?8?5optio@ (0000)
|
|
00275790 0043:
|
|
??_C@_0ED@DAPJCPMO@unknown?5option?5selected?5in?5?8invi@ (0000)
|
|
002757D4 0031:
|
|
??_C@_0DB@PAFJFHEI@expected?5?8invisible?5players?8?5opt@ (0000)
|
|
00275808 0022:
|
|
??_C@_0CC@PDNGOBNG@expected?5?8invisible?5players?8?5ite@ (0000)
|
|
0027582C 003d:
|
|
??_C@_0DN@CLJGJJAA@unknown?5option?5selected?5in?5?8odd?5@ (0000)
|
|
0027586C 002b:
|
|
??_C@_0CL@GHJPIKNP@expected?5?8odd?5man?5out?8?5option?5sp@ (0000)
|
|
00275898 001c:
|
|
??_C@_0BM@BHDHCLKH@expected?5?8odd?5man?5out?8?5item?$AA@ (0000)
|
|
002758B8 0045:
|
|
??_C@_0EF@OIKIDCBL@unknown?5option?5selected?5in?5?8resp@ (0000)
|
|
00275900 0033:
|
|
??_C@_0DD@NLKPDEHI@expected?5?8respawn?5time?5growth?8?5o@ (0000)
|
|
00275934 0024:
|
|
??_C@_0CE@KBCHINMN@expected?5?8respawn?5time?5growth?8?5i@ (0000)
|
|
00275958 003e:
|
|
??_C@_0DO@CKKLAEB@unknown?5option?5selected?5in?5?8resp@ (0000)
|
|
00275998 002c:
|
|
??_C@_0CM@BEIKHGBH@expected?5?8respawn?5time?8?5option?5s@ (0000)
|
|
002759C4 001d:
|
|
??_C@_0BN@DPHKLODK@expected?5?8respawn?5time?8?5item?$AA@ (0000)
|
|
002759E4 0039:
|
|
??_C@_0DJ@DBDJNBHE@unknown?5option?5selected?5in?5?8shie@ (0000)
|
|
00275A20 0027:
|
|
??_C@_0CH@LJEKNHOH@expected?5?8shields?8?5option?5spinne@ (0000)
|
|
00275A48 0018:
|
|
??_C@_0BI@CEHIOBPG@expected?5?8shields?8?5item?$AA@ (0000)
|
|
00275A60 0040:
|
|
??_C@_0EA@DABIHKOK@unknown?5option?5selected?5in?5?8maxi@ (0000)
|
|
00275AA0 002e:
|
|
??_C@_0CO@KOPOPBJN@expected?5?8maximum?5health?8?5option@ (0000)
|
|
00275AD0 0024:
|
|
??_C@_0CE@PMIGFAEH@expected?5?8maximum?5health?8?5list?5i@ (0000)
|
|
00275AF8 0041:
|
|
??_C@_0EB@CKLNCFJI@unknown?5option?5selected?5in?5?8numb@ (0000)
|
|
00275B3C 002f:
|
|
??_C@_0CP@OEECCHIM@expected?5?8number?5of?5lives?8?5optio@ (0000)
|
|
00275B6C 0025:
|
|
??_C@_0CF@HPCBIIEO@expected?5?8number?5of?5lives?8?5list?5@ (0000)
|
|
00275B98 0044:
|
|
??_C@_0EE@OIHOJDAL@unknown?5option?5selected?5in?5?8star@ (0000)
|
|
00275BDC 0032:
|
|
??_C@_0DC@OMGFBFGG@expected?5?8starting?5equipment?8?5op@ (0000)
|
|
00275C10 0023:
|
|
??_C@_0CD@CEBCLNHA@expected?5?8starting?5equipment?8?5it@ (0000)
|
|
00275C34 003c:
|
|
??_C@_0DM@LJEKOMEA@unknown?5option?5selected?5in?5?8weap@ (0000)
|
|
00275C70 002a:
|
|
??_C@_0CK@NJEJGNGB@expected?5?8weapon?5set?8?5option?5spi@ (0000)
|
|
00275C9C 001b:
|
|
??_C@_0BL@EIPHFBCA@expected?5?8weapon?5set?8?5item?$AA@ (0000)
|
|
00275CB8 003d:
|
|
??_C@_0DN@LNELOOFC@unknown?5option?5selected?5in?5?8vehi@ (0000)
|
|
00275CF8 002b:
|
|
??_C@_0CL@PBECPNIN@expected?5?8vehicle?5set?8?5option?5sp@ (0000)
|
|
00275D24 0021:
|
|
??_C@_0CB@EJJNGEPI@expected?5?8vehicle?5set?8?5list?5item@ (0000)
|
|
00275D48 0043:
|
|
??_C@_0ED@LEBGDHCG@unknown?5option?5selected?5in?5?8infi@ (0000)
|
|
00275D8C 0031:
|
|
??_C@_0DB@HELGEPKA@expected?5?8infinite?5grenades?8?5opt@ (0000)
|
|
00275DC0 0027:
|
|
??_C@_0CH@DKDNJNOJ@expected?5?8infinite?5grenades?8?5lis@ (0000)
|
|
00275DE8 0043:
|
|
??_C@_0ED@IMDCIIKE@unknown?5option?5selected?5in?5?8frie@ (0000)
|
|
00275E2C 0031:
|
|
??_C@_0DB@EMJCPACC@expected?5?8friends?5on?5screen?8?5opt@ (0000)
|
|
00275E60 0022:
|
|
??_C@_0CC@LMGDHIAO@expected?5?8friends?5on?5screen?8?5ite@ (0000)
|
|
00275E88 0048:
|
|
??_C@_0EI@FOCJOPJP@unknown?5option?5selected?5in?5?8othe@ (0000)
|
|
00275ED0 0036:
|
|
??_C@_0DG@NMIGKIPA@expected?5?8other?5players?5on?5radar@ (0000)
|
|
00275F08 002c:
|
|
??_C@_0CM@LDFEKJGI@expected?5?8other?5players?5on?5radar@ (0000)
|
|
00275F34 003f:
|
|
??_C@_0DP@GEBGHLEK@unknown?5option?5selected?5in?5?8rada@ (0000)
|
|
00275F74 002d:
|
|
??_C@_0CN@OGAIKPEN@expected?5?8radar?5display?8?5option?5@ (0000)
|
|
00275FA4 0023:
|
|
??_C@_0CD@GBAFKDJE@expected?5?8radar?5display?8?5list?5it@ (0000)
|
|
00275FC8 003e:
|
|
??_C@_0DO@ENIMCAMG@expected?5a?5column?5list?5for?5the?5l@ (0000)
|
|
00276008 002a:
|
|
??_C@_0CK@PKAEGOCK@expected?5text?5box?5widget?5for?5pro@ (0000)
|
|
00276034 003a:
|
|
??_C@_0DK@FCMOBEK@expected?5column?5list?5for?5multipl@ (0000)
|
|
00276070 0020:
|
|
??_C@_0CA@CBEFDPK@expected?5?8suicide?5penalty?8?5item?$AA@ (0000)
|
|
00276090 0004:
|
|
__real@c1200000 (0000)
|
|
00276094 0032:
|
|
??_C@_0DC@JFKLHNN@expected?5?8starting?5equpiment?8?5op@ (0000)
|
|
002760C8 003c:
|
|
??_C@_0DM@HKEJCMPM@no?5changes?5to?5playlist?5profile?5d@ (0000)
|
|
00276104 0037:
|
|
??_C@_0DH@LFKJEPCM@failed?5to?5save?5changes?5to?5multip@ (0000)
|
|
0027613C 0028:
|
|
??_C@_0CI@CFFCECLC@failed?5to?5prompt?5user?5to?5rename?5@ (0000)
|
|
00276164 0026:
|
|
??_C@_0CG@PAOGPANA@failed?5to?5find?5editing?5player?5pr@ (0000)
|
|
0027618C 003c:
|
|
??_C@_0DM@CEMIACLO@expected?53?5list?5items?5for?5?8playe@ (0000)
|
|
002761C8 0045:
|
|
??_C@_0EF@EFMLLKN@expected?5a?5spinner?5list?5widget?5f@ (0000)
|
|
00276210 0050:
|
|
??_C@_0FA@JLLIDFJH@failed?5to?5set?5player?5profile?5col@ (0000)
|
|
00276260 002d:
|
|
??_C@_0CN@MOIEDJPH@invalid?5player?5profile?5color?5ind@ (0000)
|
|
00276290 0050:
|
|
??_C@_0FA@DIAMNMAL@expected?5the?5color?5select?5screen@ (0000)
|
|
002762E0 0048:
|
|
??_C@_0EI@LGBBIBIN@invalid?5player?5profile?5specified@ (0000)
|
|
00276328 0043:
|
|
??_C@_0ED@KGGAFPOI@expected?5the?5player?5profile?5sele@ (0000)
|
|
0027636C 002b:
|
|
??_C@_0CL@BMHGDODI@failed?5to?5retrieve?5editable?5play@ (0000)
|
|
00276398 0039:
|
|
??_C@_0DJ@EEDBFAPF@failed?5to?5invoke?5virtual?5keyboar@ (0000)
|
|
002763D4 003a:
|
|
??_C@_0DK@GNCHNLBL@no?5changes?5to?5player?5profile?5det@ (0000)
|
|
00276410 0029:
|
|
??_C@_0CJ@IAAFIHHO@failed?5to?5save?5changes?5to?5player@ (0000)
|
|
0027643C 002d:
|
|
??_C@_0CN@MPCLCLKM@expected?5?8button?5config?8?5option?5@ (0000)
|
|
0027646C 0023:
|
|
??_C@_0CD@OLPIPNIN@expected?5?8button?5config?8?5list?5it@ (0000)
|
|
00276490 002f:
|
|
??_C@_0CP@BIPIEEBI@expected?5?8joystick?5config?8?5optio@ (0000)
|
|
002764C0 0025:
|
|
??_C@_0CF@OPPPALBL@expected?5?8joystick?5config?8?5list?5@ (0000)
|
|
002764E8 0034:
|
|
??_C@_0DE@COFFBEJJ@expected?5column?5list?5for?5control@ (0000)
|
|
0027651C 002a:
|
|
??_C@_0CK@PDIFHFLO@expected?5?8autocenter?8?5option?5spi@ (0000)
|
|
00276548 0020:
|
|
??_C@_0CA@LHOLDKPN@expected?5?8autocenter?8?5list?5item?$AA@ (0000)
|
|
00276568 0035:
|
|
??_C@_0DF@CKIKEEOB@expected?5?8flight?5stick?5controls?8@ (0000)
|
|
002765A0 002b:
|
|
??_C@_0CL@LGILJIEO@expected?5?8flight?5stick?5controls?8@ (0000)
|
|
002765CC 0034:
|
|
??_C@_0DE@GKAMOJCH@expected?5?8controller?5vibration?8?5@ (0000)
|
|
00276600 002a:
|
|
??_C@_0CK@MHECGMGN@expected?5?8controller?5vibration?8?5@ (0000)
|
|
0027662C 0030:
|
|
??_C@_0DA@MCAAKNGI@expected?5?8look?5sensitivity?8?5opti@ (0000)
|
|
0027665C 0026:
|
|
??_C@_0CG@JKPEBBJO@expected?5?8look?5sensitivity?8?5list@ (0000)
|
|
00276684 002f:
|
|
??_C@_0CP@MJKCDOAK@expected?5?8invert?5joystick?8?5optio@ (0000)
|
|
002766B4 0025:
|
|
??_C@_0CF@HEHNOJIA@expected?5?8invert?5joystick?8?5list?5@ (0000)
|
|
002766DC 003d:
|
|
??_C@_0DN@EHAOJAGJ@expected?5column?5list?5for?5advance@ (0000)
|
|
0027671C 0026:
|
|
??_C@_0CG@GJIEMKFG@unknown?5button?5config?5option?5sel@ (0000)
|
|
00276744 002c:
|
|
??_C@_0CM@LCPFMMAJ@unknown?5option?5selected?5for?5joys@ (0000)
|
|
00276770 0032:
|
|
??_C@_0DC@GJKGKFFM@unknown?5option?5selected?5for?5cont@ (0000)
|
|
002767A8 0046:
|
|
??_C@_0EG@EHBHKPIP@unknown?5option?5selected?5for?5cont@ (0000)
|
|
002767F0 0031:
|
|
??_C@_0DB@FDCPOOAP@unknown?5option?5selected?5for?5cont@ (0000)
|
|
00276824 002d:
|
|
??_C@_0CN@OOBHBLBJ@unknown?5option?5selected?5for?5look@ (0000)
|
|
00276854 002c:
|
|
??_C@_0CM@BMAPGOKA@unknown?5option?5selected?5for?5inve@ (0000)
|
|
00276880 0043:
|
|
??_C@_0ED@LCCDOMCC@valid?5controller?5index?5required?5@ (0000)
|
|
002768C4 0039:
|
|
??_C@_0DJ@HCJBFEGF@expected?53?5list?5items?5for?5?8playl@ (0000)
|
|
00276900 0042:
|
|
??_C@_0EC@CGFFDICC@expected?5a?5spinner?5list?5widget?5f@ (0000)
|
|
00276948 004d:
|
|
??_C@_0EN@KMDPJKLA@expected?5the?5playlist?5profile?5se@ (0000)
|
|
00276998 003d:
|
|
??_C@_0DN@BMNEAMJB@sorry?0?5you?5are?5not?5allowed?5to?5de@ (0000)
|
|
002769D8 0027:
|
|
??_C@_0CH@DEJGJFNG@?$CD0x?$CF08lX?5is?5not?5a?5player?5profile@ (0000)
|
|
00276A00 0029:
|
|
??_C@_0CJ@OBODLPNP@?$CD0x?$CF08lX?5is?5not?5a?5playlist?5profi@ (0000)
|
|
00276A2C 0028:
|
|
??_C@_0CI@ICBONEFN@unable?5to?5create?5a?5new?5untitled?5@ (0000)
|
|
00276A54 0035:
|
|
??_C@_0DF@GHAGJAFN@failed?5to?5create?5a?5new?5multiplay@ (0000)
|
|
00276A8C 0032:
|
|
??_C@_0DC@DAKIGPNM@failed?5to?5retrieve?5editable?5game@ (0000)
|
|
00276AC0 003b:
|
|
??_C@_0DL@KBABGNPK@creating?5a?5new?5profile?5requires?5@ (0000)
|
|
00276AFC 0026:
|
|
??_C@_0CG@JJGJJAEA@failed?5to?5create?5a?5new?5player?5pr@ (0000)
|
|
00276B24 002c:
|
|
??_C@_0CM@KEIBNLED@failed?5to?5retrieve?5editable?5play@ (0000)
|
|
00276B50 0037:
|
|
??_C@_0DH@GECHANBJ@network_game_client_request_star@ (0000)
|
|
00276B88 000e:
|
|
??_C@_0O@DGLDALDL@event?5?$CB?$DN?5NULL?$AA@ (0000)
|
|
00276B98 0048:
|
|
??_C@_0EI@BKECLHHJ@not?5attempting?5to?5start?5a?5new?5se@ (0000)
|
|
00276BE0 0027:
|
|
??_C@_0CH@JIOCLNMI@expected?5a?5column?5list?5for?5serve@ (0000)
|
|
00276C08 0053:
|
|
??_C@_0FD@LCEGCPBM@can?8t?5request?5player?5removal?5fro@ (0000)
|
|
00276C5C 0021:
|
|
??_C@_0CB@NGMIIKKH@failed?5to?5request?5player?5removal@ (0000)
|
|
00276C80 0024:
|
|
??_C@_0CE@CJLNJCKF@duplicate?5player?5registered?5in?5g@ (0000)
|
|
00276CA4 003f:
|
|
??_C@_0DP@OCEIDKPE@closing?5widget?5?8?$CFs?8?5because?5no?5s@ (0000)
|
|
00276CE8 0046:
|
|
??_C@_0EG@LAGPKDPO@failed?5to?5invoke?5the?5virtual?5key@ (0000)
|
|
00276D30 002e:
|
|
??_C@_0CO@CIHPLIFE@can?8t?5create?5a?5new?5profile?5with?5@ (0000)
|
|
00276D60 0024:
|
|
??_C@_0CE@MOMFODCN@failed?5to?5create?5new?5player?5prof@ (0000)
|
|
00276D84 0030:
|
|
??_C@_0DA@HDOIMLAN@failed?5to?5retrieve?5newly?5created@ (0000)
|
|
00276DB4 0026:
|
|
??_C@_0CG@GODFIEFJ@failed?5to?5find?5?8difficulty?8?5menu@ (0000)
|
|
00276DDC 0030:
|
|
??_C@_0DA@CLKNGJMF@expected?5column?5list?5for?5difficu@ (0000)
|
|
00305EE0 03a6:
|
|
_data_00305ee0 (0000)
|
|
_event_handler_functions (0330)
|
|
00454AF0 016e:
|
|
_bss_00454af0 (0000)
|
|
_single_player_level_data (0018)
|
|
_persistant_game_data_info (0068)
|
|
*/
|
|
|
|
/* ---------- headers */
|
|
|
|
#include "cseries.h"
|
|
#include "bungie_net/network/transport.h"
|
|
#include "bungie_net/network/transport_endpoint_winsock.h"
|
|
#include "interface/player_ui.h"
|
|
#include "saved games/player_profile.h"
|
|
#include "interface/ui_widget_definitions.h"
|
|
|
|
/* ---------- constants */
|
|
|
|
/* ---------- macros */
|
|
|
|
/* ---------- structures */
|
|
|
|
struct widget_instance
|
|
{
|
|
long definition_tag_index;
|
|
char const *name;
|
|
short local_player_index;
|
|
byte unknown0A[4];
|
|
short type;
|
|
boolean visible;
|
|
byte unknown11;
|
|
boolean disabled;
|
|
byte unknown13[9];
|
|
long unknown1C;
|
|
byte unknown20[12];
|
|
struct widget_instance *next;
|
|
struct widget_instance *parent;
|
|
struct widget_instance *child;
|
|
struct widget_instance *focused_child;
|
|
union
|
|
{
|
|
short selected_index;
|
|
wchar_t *text;
|
|
long value;
|
|
} data3C;
|
|
void *generated_list;
|
|
short generated_count;
|
|
};
|
|
|
|
struct single_player_level_entry
|
|
{
|
|
char *map_name;
|
|
boolean available;
|
|
boolean unknown5;
|
|
boolean unknown6;
|
|
boolean unknown7;
|
|
};
|
|
|
|
struct event_record
|
|
{
|
|
short type;
|
|
short controller_index;
|
|
};
|
|
|
|
struct network_player_data
|
|
{
|
|
byte data[0x20];
|
|
};
|
|
|
|
struct network_game_join_descriptor
|
|
{
|
|
byte unknown00[2];
|
|
short unknown02;
|
|
byte unknown04[0x0E];
|
|
byte token[0x12];
|
|
};
|
|
|
|
struct game_variant_data
|
|
{
|
|
byte data[0x68];
|
|
};
|
|
|
|
#pragma pack(push, 2)
|
|
struct event_handler_globals
|
|
{
|
|
long function_count;
|
|
char const **function_names;
|
|
long unknown08;
|
|
long profile_index;
|
|
char *map_name;
|
|
char *single_player_levels[9];
|
|
long last_player1_profile_index;
|
|
long unknown3C;
|
|
char *multiplayer_levels[13];
|
|
short unknown74;
|
|
};
|
|
#pragma pack(pop)
|
|
|
|
struct playlist_profile_item_options_prefix
|
|
{
|
|
byte unknown00[0x20];
|
|
unsigned long flags;
|
|
byte unknown24[0x20];
|
|
long weapon_set;
|
|
long vehicle_set;
|
|
};
|
|
|
|
/* ---------- prototypes */
|
|
|
|
void main_revert_map(
|
|
void);
|
|
void main_reset_map(
|
|
void);
|
|
void game_state_save_to_persistent_storage(
|
|
void);
|
|
void main_goto_main_menu(
|
|
void);
|
|
void main_run_demos(
|
|
void);
|
|
void xbox_dashboard_launch(
|
|
void);
|
|
void dispose_global_network_game_client(
|
|
void);
|
|
void dispose_global_network_game_server(
|
|
void);
|
|
void game_engine_playlist_initialize(
|
|
void);
|
|
void game_engine_playlist_next(
|
|
long,
|
|
long,
|
|
long);
|
|
void network_game_set_quickstart_local(
|
|
void);
|
|
void game_connection_set(
|
|
long);
|
|
void main_menu_switch_to_single_player(
|
|
void);
|
|
void network_game_server_open_game(
|
|
void *server);
|
|
void network_game_server_pause_countdown(
|
|
void *server,
|
|
boolean pause);
|
|
void *global_network_game_server_get(
|
|
void);
|
|
boolean xbox_demos_available(
|
|
void);
|
|
void ui_stop_main_menu_music(
|
|
void);
|
|
void ui_widgets_pop_stack(
|
|
short local_player_index);
|
|
boolean ui_main_menu_music_active(
|
|
void);
|
|
void main_set_difficulty(
|
|
word difficulty);
|
|
void main_set_map_name(
|
|
char *map_name);
|
|
void main_defer_map_map_change(
|
|
void);
|
|
void *widget_free(
|
|
void *pointer);
|
|
boolean create_global_network_game_client(
|
|
void);
|
|
boolean create_global_network_game_server(
|
|
void);
|
|
void game_engine_playlist_begin(
|
|
void);
|
|
void network_game_accept_remote_connections(
|
|
boolean accept);
|
|
void ui_start_main_menu_music(
|
|
void);
|
|
void error(
|
|
long priority,
|
|
char *format,
|
|
...);
|
|
void playlist_profile_delete(
|
|
long profile_index);
|
|
void ui_play_audio_feedback_sound(
|
|
short feedback);
|
|
void display_error_deferred(
|
|
short error_code,
|
|
short local_player_index,
|
|
boolean modal,
|
|
boolean pause_game_time);
|
|
boolean virtual_keyboard_launch(
|
|
void *text,
|
|
long maximum_length,
|
|
long keyboard_type);
|
|
void network_game_client_local_player_quit(
|
|
word controller_index);
|
|
struct widget_instance *widget_instance_get_topmost_parent(
|
|
struct widget_instance *widget);
|
|
struct widget_instance *widget_instance_get_nth_child(
|
|
struct widget_instance *widget,
|
|
long n);
|
|
void display_error(
|
|
short error_code,
|
|
short local_player_index,
|
|
boolean modal,
|
|
boolean pause_game_time);
|
|
char *main_get_map_name(
|
|
void);
|
|
void *global_network_game_client_get(
|
|
void);
|
|
void *network_game_client_get_game(
|
|
void *client);
|
|
short network_game_client_get_machine_index(
|
|
void *client);
|
|
boolean network_player_is_valid(
|
|
void *player);
|
|
boolean network_game_client_request_start_time_change(
|
|
void *client,
|
|
boolean start);
|
|
boolean network_game_client_request_remove_player(
|
|
void *client,
|
|
void *player);
|
|
boolean network_game_should_accept_remote_connections(
|
|
void);
|
|
boolean network_game_client_initiate_join_game(
|
|
void *client,
|
|
void *server,
|
|
struct network_game_join_descriptor *join_descriptor,
|
|
struct transport_address *address);
|
|
void *network_game_get_game(
|
|
void);
|
|
short network_game_client_get_local_machine_index(
|
|
void);
|
|
boolean network_game_client_update_local_player_data(
|
|
void *client,
|
|
struct network_player_data *player);
|
|
boolean network_game_client_add_player(
|
|
void *client,
|
|
short controller_index);
|
|
void network_event(
|
|
char *format,
|
|
...);
|
|
void ui_widget_delete(
|
|
struct widget_instance *widget);
|
|
void playlist_profiles_enumerate_available_to_local_player_index(
|
|
short local_player_index,
|
|
long *profile_count,
|
|
long *profile_indices);
|
|
boolean saved_game_file_retrieve_last_used_multiplayer_variant_directory(
|
|
char *directory_path);
|
|
long saved_game_file_find_profile_index_for_directory_path(
|
|
char *directory_path,
|
|
short profile_type);
|
|
extern byte cached_variant_profile[0x144];
|
|
boolean new_campaign_chosen(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
short network_game_client_get_state(
|
|
void *client,
|
|
short *state);
|
|
boolean network_game_start_new_server(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
void console_warning(
|
|
char *format,
|
|
...);
|
|
void saved_game_file_get_useable_untitled_profile_name(
|
|
wchar_t *name);
|
|
boolean saved_game_file_retrieve_last_used_multiplayer_map(
|
|
char *map_name);
|
|
wchar_t *ustrncpy(
|
|
wchar_t *destination,
|
|
wchar_t const *source,
|
|
long count);
|
|
void *ui_widget_realloc(
|
|
void *pointer,
|
|
word size,
|
|
char *file,
|
|
long line);
|
|
|
|
extern byte cached_player_profile[0x9C];
|
|
|
|
long playlist_profile_new(
|
|
short local_player_index,
|
|
wchar_t *name);
|
|
boolean saved_game_file_get_path_to_enclosing_directory(
|
|
long profile_index,
|
|
char *directory_path);
|
|
void saved_game_file_remember_last_used_multiplayer_variant_directory(
|
|
char *directory_path);
|
|
struct game_variant_data *build_game_variant_slayer(
|
|
struct game_variant_data *variant);
|
|
|
|
typedef boolean (*ui_widget_event_handler_function)(
|
|
struct widget_instance *,
|
|
struct event_record *,
|
|
boolean *);
|
|
boolean widget_event_function_null(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean solo_level_initialize_list_coop(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean solo_level_dispose_list(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean solo_level_set_next_map_name(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean difficulty_set(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean start_new_game(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean pause_game_restart_at_checkpoint(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean pause_game_restart_level(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean pause_game_quit_to_main_menu(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean clear_multiplayer_player_joins(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_wants_to_join_multiplayer_game(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_game_server_list_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_game_start_new_server(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_game_join_game_from_server_list(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_server_list_dispose(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_game_cancel(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean split_screen_game_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean coop_game_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean main_menu_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean multiplayer_type_menu_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean multiplayer_pick_quick_start_play_stage(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean multiplayer_level_list_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean multiplayer_level_list_dispose(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean multiplayer_level_select(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean multiplayer_profiles_list_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean multiplayer_profiles_list_dispose(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean multiplayer_profile_set_for_game(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean multiplayer_game_swap_teams(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean netgame_join_player(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profiles_list_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profiles_list_dispose(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_set_for_game_3wide(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_set_for_game_1wide(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_begin_editing(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_end_editing(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_set_game_engine(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_change_name(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_change_ctf_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_change_koth_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_change_slayer_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_change_oddball_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_change_racing_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_change_player_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_change_item_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_change_indicator_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_initialize_game_engine(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_initialize_name(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_initialize_ctf_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_initialize_koth_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_initialize_slayer_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_initialize_oddball_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_initialize_racing_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_initialize_player_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_initialize_item_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_initialize_indicator_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean playlist_profile_save_changes(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_color_picker_menu_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_color_picker_menu_dispose(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_color_picker_select_color(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_begin_editing(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_end_editing(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_change_name(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_save_changes(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_initialize_controller_settings(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_initialize_advanced_controller_settings(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_change_controller_settings(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean player_profile_change_advanced_controller_settings(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_game_remove_local_player(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean switch_from_main_menu_to_single_player(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean delete_player_profile_request(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean delete_playlist_profile_request(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean delete_player_profile_final(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean delete_playlist_profile_final(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean cancel_profile_delete(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean create_and_begin_editing_new_gametype_profile(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean create_and_begin_editing_new_player_profile(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_game_start_faster(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_game_start_slower(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_game_server_accept_connections(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_game_server_defer_game_start(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean network_game_server_allow_game_start(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean disable_widget_if_no_xdemos(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean run_xdemos(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean single_player_reset_controller_choices(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean single_player_set_player1_controller_choice(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean single_player_set_player2_controller_choice(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean display_error_if_no_network_connection(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean start_network_game_if_no_advertised_servers(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean netgame_unjoin_player(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean close_calling_widget_if_not_editing_profile(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean exit_to_xbox_dashboard(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean new_campaign_chosen(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean virtual_keyboard_last_exit_saved_text(
|
|
void);
|
|
boolean new_campaign_decision(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean pop_history_stack_once(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean difficulty_menu_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean begin_music_fade_out(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean new_campaign_if_no_custom_player_profiles_exist(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean solo_level_initialize_list_single_player(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean widget_event_function_list_widget_goto_next_item(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
boolean widget_event_function_list_widget_goto_previous_item(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted);
|
|
|
|
|
|
/* ---------- globals */
|
|
|
|
extern short player_spawn_count;
|
|
wchar_t new_campaign_profile_name[12] = { 0 };
|
|
byte single_player_level_data[0x50] = { 0 };
|
|
struct persistent_game_difficulty
|
|
{
|
|
short value;
|
|
};
|
|
|
|
struct persistent_game_data_info
|
|
{
|
|
char map_name[0x100];
|
|
struct persistent_game_difficulty difficulty;
|
|
byte map_index;
|
|
boolean valid;
|
|
boolean corrupted;
|
|
};
|
|
|
|
struct persistent_game_data_info persistant_game_data_info = { 0 };
|
|
|
|
struct ui_widget_event_handler_function_table
|
|
{
|
|
ui_widget_event_handler_function functions[102];
|
|
char const *names[102];
|
|
};
|
|
|
|
struct ui_widget_event_handler_function_table event_handler_function_list =
|
|
{
|
|
{
|
|
widget_event_function_null,
|
|
widget_event_function_list_widget_goto_next_item,
|
|
widget_event_function_list_widget_goto_previous_item,
|
|
widget_event_function_null,
|
|
widget_event_function_null,
|
|
solo_level_initialize_list_single_player,
|
|
solo_level_initialize_list_coop,
|
|
solo_level_dispose_list,
|
|
solo_level_set_next_map_name,
|
|
difficulty_set,
|
|
start_new_game,
|
|
pause_game_restart_at_checkpoint,
|
|
pause_game_restart_level,
|
|
pause_game_quit_to_main_menu,
|
|
clear_multiplayer_player_joins,
|
|
player_wants_to_join_multiplayer_game,
|
|
network_game_server_list_initialize,
|
|
network_game_start_new_server,
|
|
network_server_list_dispose,
|
|
network_game_cancel,
|
|
network_game_join_game_from_server_list,
|
|
split_screen_game_initialize,
|
|
coop_game_initialize,
|
|
main_menu_initialize,
|
|
multiplayer_type_menu_initialize,
|
|
multiplayer_pick_quick_start_play_stage,
|
|
multiplayer_level_list_initialize,
|
|
multiplayer_level_list_dispose,
|
|
multiplayer_level_select,
|
|
multiplayer_profiles_list_initialize,
|
|
multiplayer_profiles_list_dispose,
|
|
multiplayer_profile_set_for_game,
|
|
multiplayer_game_swap_teams,
|
|
netgame_join_player,
|
|
player_profiles_list_initialize,
|
|
player_profiles_list_dispose,
|
|
player_profile_set_for_game_3wide,
|
|
player_profile_set_for_game_1wide,
|
|
playlist_profile_begin_editing,
|
|
playlist_profile_end_editing,
|
|
playlist_profile_set_game_engine,
|
|
playlist_profile_change_name,
|
|
playlist_profile_change_ctf_rules,
|
|
playlist_profile_change_koth_rules,
|
|
playlist_profile_change_slayer_rules,
|
|
playlist_profile_change_oddball_rules,
|
|
playlist_profile_change_racing_rules,
|
|
playlist_profile_change_player_options,
|
|
playlist_profile_change_item_options,
|
|
playlist_profile_change_indicator_options,
|
|
playlist_profile_initialize_game_engine,
|
|
playlist_profile_initialize_name,
|
|
playlist_profile_initialize_ctf_rules,
|
|
playlist_profile_initialize_koth_rules,
|
|
playlist_profile_initialize_slayer_rules,
|
|
playlist_profile_initialize_oddball_rules,
|
|
playlist_profile_initialize_racing_rules,
|
|
playlist_profile_initialize_player_options,
|
|
playlist_profile_initialize_item_options,
|
|
playlist_profile_initialize_indicator_options,
|
|
playlist_profile_save_changes,
|
|
player_profile_color_picker_menu_initialize,
|
|
player_profile_color_picker_menu_dispose,
|
|
player_profile_color_picker_select_color,
|
|
player_profile_begin_editing,
|
|
player_profile_end_editing,
|
|
player_profile_change_name,
|
|
player_profile_save_changes,
|
|
player_profile_initialize_controller_settings,
|
|
player_profile_initialize_advanced_controller_settings,
|
|
player_profile_change_controller_settings,
|
|
player_profile_change_advanced_controller_settings,
|
|
network_game_remove_local_player,
|
|
switch_from_main_menu_to_single_player,
|
|
delete_player_profile_request,
|
|
delete_playlist_profile_request,
|
|
delete_player_profile_final,
|
|
delete_playlist_profile_final,
|
|
cancel_profile_delete,
|
|
create_and_begin_editing_new_gametype_profile,
|
|
create_and_begin_editing_new_player_profile,
|
|
network_game_start_faster,
|
|
network_game_start_slower,
|
|
network_game_server_accept_connections,
|
|
network_game_server_defer_game_start,
|
|
network_game_server_allow_game_start,
|
|
disable_widget_if_no_xdemos,
|
|
run_xdemos,
|
|
single_player_reset_controller_choices,
|
|
single_player_set_player1_controller_choice,
|
|
single_player_set_player2_controller_choice,
|
|
display_error_if_no_network_connection,
|
|
start_network_game_if_no_advertised_servers,
|
|
netgame_unjoin_player,
|
|
close_calling_widget_if_not_editing_profile,
|
|
exit_to_xbox_dashboard,
|
|
new_campaign_chosen,
|
|
new_campaign_decision,
|
|
pop_history_stack_once,
|
|
difficulty_menu_initialize,
|
|
begin_music_fade_out,
|
|
new_campaign_if_no_custom_player_profiles_exist,
|
|
},
|
|
{
|
|
"NULL",
|
|
"list goto next item",
|
|
"list goto previous item",
|
|
"unused",
|
|
"unused",
|
|
"initialize sp level list solo",
|
|
"initialize sp level list coop",
|
|
"dispose sp level list",
|
|
"solo level set map",
|
|
"set difficulty",
|
|
"start new game",
|
|
"pause game restart at checkpoint",
|
|
"pause game restart level",
|
|
"pause game return to main menu",
|
|
"clear multiplayer player joins",
|
|
"join controller to mp game",
|
|
"initialize net game server list",
|
|
"start network game server",
|
|
"dispose net game server list",
|
|
"shutdown network game",
|
|
"net game join from server list",
|
|
"split screen game initialize",
|
|
"coop game initialize",
|
|
"main menu intialize",
|
|
"mp type menu initialize",
|
|
"pick play stage for quick start",
|
|
"mp level list initialize",
|
|
"mp level list dispose",
|
|
"mp level select",
|
|
"mp profiles list initialize",
|
|
"mp profiles list dispose",
|
|
"mp profile set for game",
|
|
"swap player team",
|
|
"net game join player",
|
|
"player profile list initialize",
|
|
"player profile list dispose",
|
|
"3wide plyr prof set for game",
|
|
"1wide plyr prof set for game",
|
|
"mp profile begin editing",
|
|
"mp profile end editing",
|
|
"mp profile set game engine",
|
|
"mp profile change name",
|
|
"mp profile set ctf rules",
|
|
"mp profile set koth rules",
|
|
"mp profile set slayer rules",
|
|
"mp profile set oddball rules",
|
|
"mp profile set racing rules",
|
|
"mp profile set player options",
|
|
"mp profile set item options",
|
|
"mp profile set indicator opts",
|
|
"mp profile init game engine",
|
|
"mp profile init name",
|
|
"mp profile init ctf rules",
|
|
"mp profile init koth rules",
|
|
"mp profile init slayer rules",
|
|
"mp profile init oddball rules",
|
|
"mp profile init racing rules",
|
|
"mp profile init player opts",
|
|
"mp profile init item options",
|
|
"mp profile init indicator opts",
|
|
"mp profile save changes",
|
|
"color picker menu initialize",
|
|
"color picker menu dispose",
|
|
"color picker select color",
|
|
"player profile begin editing",
|
|
"player profile end editing",
|
|
"player profile change name",
|
|
"player profile save changes",
|
|
"plyr prf init cntl settings",
|
|
"plyr prf init adv cntl set",
|
|
"plyr prf save cntl settings",
|
|
"plyr prf save adv cntl set",
|
|
"mp game player quit",
|
|
"main menu switch to solo game",
|
|
"request del player profile",
|
|
"request del playlist profile",
|
|
"final del player profile",
|
|
"final del playlist profile",
|
|
"cancel profile delete",
|
|
"create&edit playlist profile",
|
|
"create&edit player profile",
|
|
"net game speed start",
|
|
"net game delay start",
|
|
"net server accept conx",
|
|
"net server defer start",
|
|
"net server allow start",
|
|
"disable if no xdemos",
|
|
"run xdemos",
|
|
"sp reset controller choices",
|
|
"sp set p1 controller choice",
|
|
"sp set p2 controller choice",
|
|
"error if no network connection",
|
|
"start server if none advertised",
|
|
"net game unjoin player",
|
|
"close if not editing profile",
|
|
"exit to xbox dashboard",
|
|
"new campaign chosen",
|
|
"new campaign decision",
|
|
"pop history stack once",
|
|
"difficulty menu init",
|
|
"begin music fade out",
|
|
"new game if no plyr profiles",
|
|
}
|
|
};
|
|
|
|
struct event_handler_globals event_handler_functions =
|
|
{
|
|
102,
|
|
event_handler_function_list.names,
|
|
0,
|
|
NONE,
|
|
"levels\\a10\\a10",
|
|
{
|
|
"levels\\a30\\a30",
|
|
"levels\\a50\\a50",
|
|
"levels\\b30\\b30",
|
|
"levels\\b40\\b40",
|
|
"levels\\c10\\c10",
|
|
"levels\\c20\\c20",
|
|
"levels\\c40\\c40",
|
|
"levels\\d20\\d20",
|
|
"levels\\d40\\d40",
|
|
},
|
|
NONE,
|
|
NONE,
|
|
{
|
|
"levels\\test\\beavercreek\\beavercreek",
|
|
"levels\\test\\sidewinder\\sidewinder",
|
|
"levels\\test\\damnation\\damnation",
|
|
"levels\\test\\ratrace\\ratrace",
|
|
"levels\\test\\prisoner\\prisoner",
|
|
"levels\\test\\hangemhigh\\hangemhigh",
|
|
"levels\\test\\chillout\\chillout",
|
|
"levels\\test\\carousel\\carousel",
|
|
"levels\\test\\boardingaction\\boardingaction",
|
|
"levels\\test\\bloodgulch\\bloodgulch",
|
|
"levels\\test\\wizard\\wizard",
|
|
"levels\\test\\putput\\putput",
|
|
"levels\\test\\longest\\longest",
|
|
},
|
|
NONE
|
|
};
|
|
|
|
/* ---------- public code */
|
|
|
|
boolean widget_event_function_null(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
return TRUE;
|
|
}
|
|
|
|
void reset_last_player1_profile_index(
|
|
void)
|
|
{
|
|
event_handler_functions.last_player1_profile_index = NONE;
|
|
return;
|
|
}
|
|
|
|
boolean new_campaign_decision(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result;
|
|
struct player_profile profile;
|
|
wchar_t name[128];
|
|
|
|
result = FALSE;
|
|
if (event_handler_functions.unknown74 != NONE)
|
|
{
|
|
if (virtual_keyboard_last_exit_saved_text())
|
|
{
|
|
if (new_campaign_profile_name[0])
|
|
{
|
|
long profile_index;
|
|
|
|
player_ui_set_single_player_local_player_controller(0, event_handler_functions.unknown74);
|
|
profile_index = player_profile_new(event_handler_functions.unknown74, new_campaign_profile_name);
|
|
if (profile_index == NONE)
|
|
{
|
|
saved_game_file_get_useable_untitled_profile_name(name);
|
|
ustrncpy(new_campaign_profile_name, name, 11);
|
|
new_campaign_profile_name[11] = L'\0';
|
|
profile_index = player_profile_new(event_handler_functions.unknown74, new_campaign_profile_name);
|
|
}
|
|
if (profile_index != NONE)
|
|
{
|
|
if (player_profile_get(profile_index, &profile))
|
|
{
|
|
player_ui_set_active_player_profile(0, profile_index, &profile);
|
|
result = TRUE;
|
|
}
|
|
else
|
|
error(2, "failed to retrieve newly created player profile");
|
|
}
|
|
else
|
|
error(2, "failed to create new player profile");
|
|
if (result)
|
|
{
|
|
main_set_map_name(event_handler_functions.map_name);
|
|
main_defer_map_map_change();
|
|
}
|
|
|
|
if (!result)
|
|
{
|
|
main_goto_main_menu();
|
|
display_error_deferred(37, NONE, TRUE, FALSE);
|
|
ui_play_audio_feedback_sound(4);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
error(2, "can't create a new profile with an empty name");
|
|
ui_play_audio_feedback_sound(4);
|
|
}
|
|
}
|
|
event_handler_functions.unknown74 = NONE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean create_and_begin_editing_new_gametype_profile(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result;
|
|
long profile_index;
|
|
wchar_t name[128];
|
|
struct game_variant_data source_variant;
|
|
struct game_variant_data variant;
|
|
char directory_path[256];
|
|
byte *profile;
|
|
|
|
result = FALSE;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4272,
|
|
event->controller_index >= 0 && event->controller_index < 4,
|
|
"creating a new profile requires a valid local player index");
|
|
saved_game_file_get_useable_untitled_profile_name(name);
|
|
if (name[0])
|
|
{
|
|
profile_index = playlist_profile_new(widget->local_player_index, name);
|
|
if (profile_index != NONE)
|
|
{
|
|
player_ui_begin_editing_profile(profile_index);
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
if (profile)
|
|
{
|
|
variant = *build_game_variant_slayer(&source_variant);
|
|
memcpy(profile, &variant, sizeof(variant));
|
|
*(short *)(profile + 0x64) = 0;
|
|
ustrncpy((wchar_t *)profile, name, 11);
|
|
*(short *)(profile + 0x16) = 0;
|
|
result = virtual_keyboard_launch(profile, 24, 9);
|
|
}
|
|
else
|
|
{
|
|
error(2, "failed to retrieve editable game variant profile!");
|
|
player_ui_end_editing_profile();
|
|
}
|
|
}
|
|
else
|
|
error(2, "failed to create a new multiplayer game type profile");
|
|
}
|
|
else
|
|
error(2, "unable to create a new untitled profile");
|
|
|
|
if (result == TRUE)
|
|
{
|
|
if (saved_game_file_get_path_to_enclosing_directory(profile_index, directory_path))
|
|
saved_game_file_remember_last_used_multiplayer_variant_directory(directory_path);
|
|
}
|
|
else if (!result)
|
|
{
|
|
display_error_deferred(38, NONE, TRUE, FALSE);
|
|
ui_play_audio_feedback_sound(4);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean network_game_join_game_from_server_list(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result;
|
|
byte *server;
|
|
struct widget_instance *topmost_parent;
|
|
long focused_child_parent_widget_tag;
|
|
register short zero;
|
|
|
|
zero = 0;
|
|
result = FALSE;
|
|
if (widget->focused_child && widget->data3C.selected_index >= zero)
|
|
{
|
|
short generated_count;
|
|
|
|
generated_count = widget->generated_count;
|
|
if (widget->data3C.selected_index < (word)generated_count && widget->generated_list)
|
|
{
|
|
if ((word)generated_count > (word)zero)
|
|
{
|
|
server = ((byte **)widget->generated_list)[widget->data3C.selected_index];
|
|
if (server[0xE0] == TRUE)
|
|
{
|
|
if (*(short *)(server + 0xDE) == zero)
|
|
{
|
|
struct transport_address address = { { { 0 } } };
|
|
struct network_game_join_descriptor join_descriptor;
|
|
|
|
transport_client_start(server + 0x18, server + 8, server, 0x141E, &address);
|
|
if (address.address.long_words[0] != zero && address.port != zero)
|
|
{
|
|
join_descriptor.unknown02 = (short)zero;
|
|
network_game_generate_join_game_token(join_descriptor.token);
|
|
if (network_game_client_initiate_join_game(global_network_game_client_get(), server, &join_descriptor, &address))
|
|
{
|
|
topmost_parent = widget_instance_get_topmost_parent(widget);
|
|
if (widget->parent)
|
|
focused_child_parent_widget_tag = widget->parent->definition_tag_index;
|
|
else
|
|
focused_child_parent_widget_tag = NONE;
|
|
if (!ui_widget_load_by_name_or_tag(
|
|
"ui\\shell\\main_menu\\multiplayer_type_select\\connected\\pregame\\connected_pregame_screen",
|
|
NONE,
|
|
NULL,
|
|
NONE,
|
|
topmost_parent->definition_tag_index,
|
|
focused_child_parent_widget_tag,
|
|
widget_instance_get_child_index_from_parent(widget)))
|
|
error(2, "event handler failed to spawn widget");
|
|
else
|
|
{
|
|
game_connection_set(1);
|
|
result = TRUE;
|
|
}
|
|
*widget_deleted = TRUE;
|
|
}
|
|
else
|
|
{
|
|
network_game_abort();
|
|
error(2, "failed to initiate join game procedures");
|
|
}
|
|
}
|
|
else
|
|
error(2, "attempted to join a network game with a bogus address");
|
|
}
|
|
else
|
|
error(2, "attempted to join a network game running on a different platform than the local system");
|
|
}
|
|
else
|
|
{
|
|
error(2, "attempted to join a closed game");
|
|
ui_play_audio_feedback_sound(4);
|
|
}
|
|
}
|
|
else
|
|
error(2, "unable to join server: there are no servers in the server list (maybe the server list was disposed?)");
|
|
}
|
|
else
|
|
error(2, "unable to join server: this doesn't look like a valid server list to me... or the server list has been disposed?");
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/* ---------- private code */
|
|
|
|
boolean pause_game_restart_at_checkpoint(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
main_revert_map();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean pause_game_restart_level(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
main_reset_map();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean pause_game_quit_to_main_menu(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
game_state_save_to_persistent_storage();
|
|
main_goto_main_menu();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean coop_game_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
player_spawn_count = 2;
|
|
return TRUE;
|
|
}
|
|
|
|
boolean multiplayer_type_menu_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
player_spawn_count = 1;
|
|
return TRUE;
|
|
}
|
|
|
|
boolean cancel_profile_delete(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
event_handler_functions.profile_index = NONE;
|
|
return TRUE;
|
|
}
|
|
|
|
boolean run_xdemos(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
main_run_demos();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean single_player_reset_controller_choices(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
player_ui_reset_single_player_local_player_controllers();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean exit_to_xbox_dashboard(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
xbox_dashboard_launch();
|
|
return FALSE;
|
|
}
|
|
|
|
boolean clear_multiplayer_player_joins(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
dispose_global_network_game_client();
|
|
dispose_global_network_game_server();
|
|
player_ui_clear_multiplayer_joins();
|
|
player_ui_clear_multiplayer_variant();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean network_server_list_dispose(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
widget->generated_list = NULL;
|
|
widget->generated_count = 0;
|
|
return TRUE;
|
|
}
|
|
|
|
boolean network_game_cancel(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
dispose_global_network_game_server();
|
|
dispose_global_network_game_client();
|
|
player_ui_clear_multiplayer_variant();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean multiplayer_pick_quick_start_play_stage(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
game_engine_playlist_initialize();
|
|
game_engine_playlist_next(0, 0, 4);
|
|
network_game_set_quickstart_local();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean multiplayer_level_list_dispose(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
widget->generated_list = NULL;
|
|
widget->generated_count = 0;
|
|
return TRUE;
|
|
}
|
|
|
|
boolean playlist_profile_end_editing(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
event_handler_functions.profile_index = NONE;
|
|
player_ui_end_editing_profile();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean player_profile_end_editing(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
event_handler_functions.profile_index = NONE;
|
|
player_ui_end_editing_profile();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean switch_from_main_menu_to_single_player(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
game_connection_set(0);
|
|
main_menu_switch_to_single_player();
|
|
player_ui_remember_player1_profile(0);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean network_game_server_accept_connections(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
void *server = global_network_game_server_get();
|
|
if (server)
|
|
network_game_server_open_game(server);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean network_game_server_defer_game_start(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
void *server = global_network_game_server_get();
|
|
if (server)
|
|
network_game_server_pause_countdown(server, TRUE);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean network_game_server_allow_game_start(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
void *server = global_network_game_server_get();
|
|
if (server)
|
|
network_game_server_pause_countdown(server, FALSE);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean disable_widget_if_no_xdemos(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
if (!xbox_demos_available())
|
|
{
|
|
widget->disabled = TRUE;
|
|
widget->visible = FALSE;
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
boolean pop_history_stack_once(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
ui_widgets_pop_stack(widget->local_player_index);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean begin_music_fade_out(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
if (ui_main_menu_music_active())
|
|
ui_stop_main_menu_music();
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
boolean solo_level_dispose_list(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
memset(single_player_level_data, 0, sizeof(single_player_level_data));
|
|
widget->generated_list = NULL;
|
|
widget->generated_count = 0;
|
|
return TRUE;
|
|
}
|
|
|
|
boolean start_new_game(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
main_set_difficulty(1);
|
|
main_set_map_name(event_handler_functions.map_name);
|
|
game_connection_set(0);
|
|
main_menu_switch_to_single_player();
|
|
player_ui_remember_player1_profile(0);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean multiplayer_profiles_list_dispose(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
if (widget->generated_list)
|
|
{
|
|
widget_free(widget->generated_list);
|
|
widget->generated_list = NULL;
|
|
}
|
|
widget->generated_count = 0;
|
|
return TRUE;
|
|
}
|
|
|
|
boolean player_profiles_list_dispose(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
if (widget->generated_list)
|
|
{
|
|
widget_free(widget->generated_list);
|
|
widget->generated_list = NULL;
|
|
}
|
|
widget->generated_count = 0;
|
|
return TRUE;
|
|
}
|
|
|
|
boolean player_profile_color_picker_menu_dispose(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
if (widget->generated_list)
|
|
{
|
|
widget_free(widget->generated_list);
|
|
widget->generated_list = NULL;
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
boolean network_game_server_list_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = TRUE;
|
|
|
|
dispose_global_network_game_client();
|
|
dispose_global_network_game_server();
|
|
player_ui_clear_multiplayer_variant();
|
|
if (create_global_network_game_client())
|
|
game_connection_set(1);
|
|
else
|
|
{
|
|
error(2, "failed to create network client to initiate game search");
|
|
result = FALSE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean main_menu_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
player_ui_clear_multiplayer_joins();
|
|
player_ui_clear_multiplayer_variant();
|
|
dispose_global_network_game_client();
|
|
dispose_global_network_game_server();
|
|
network_game_accept_remote_connections(FALSE);
|
|
player_spawn_count = 1;
|
|
player_ui_end_editing_profile();
|
|
if (!ui_main_menu_music_active())
|
|
ui_start_main_menu_music();
|
|
return TRUE;
|
|
}
|
|
|
|
boolean delete_playlist_profile_final(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = FALSE;
|
|
long profile_index = event_handler_functions.profile_index;
|
|
|
|
if ((profile_index & 0xF) == 1)
|
|
{
|
|
playlist_profile_delete(profile_index);
|
|
result = TRUE;
|
|
}
|
|
else
|
|
error(2, "#0x%08lX is not a playlist profile index", profile_index);
|
|
return result;
|
|
}
|
|
|
|
boolean player_wants_to_join_multiplayer_game(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 873,
|
|
widget->local_player_index != NONE,
|
|
"need a specific local player index when joining a multiplayer game");
|
|
player_ui_local_player_joined_multiplayer_game(widget->local_player_index);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean playlist_profile_change_name(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
void *profile = player_ui_get_edit_playlist_profile();
|
|
boolean result = TRUE;
|
|
|
|
if (profile)
|
|
{
|
|
if (!virtual_keyboard_launch(profile, 24, 9))
|
|
error(2, "failed to invoke virtual keyboard on profile name");
|
|
}
|
|
else
|
|
{
|
|
error(2, "failed to retrieve editable game variant");
|
|
result = FALSE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean player_profile_change_name(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct player_profile *profile = player_ui_get_edit_player_profile();
|
|
boolean result = TRUE;
|
|
|
|
if (profile)
|
|
{
|
|
if (!virtual_keyboard_launch(profile->player_name, sizeof(profile->player_name), 8))
|
|
{
|
|
error(2, "failed to invoke virtual keyboard on player profile name");
|
|
result = FALSE;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
error(2, "failed to retrieve editable player profile");
|
|
result = FALSE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean network_game_remove_local_player(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4073,
|
|
event && event->controller_index >= 0 && event->controller_index < 4,
|
|
"valid controller index required to remove player from network game");
|
|
network_game_client_local_player_quit(event->controller_index);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean delete_player_profile_final(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = FALSE;
|
|
long profile_index = event_handler_functions.profile_index;
|
|
|
|
if (!(profile_index & 0x40000000))
|
|
{
|
|
if ((profile_index & 0xF) == 0)
|
|
{
|
|
player_profile_delete(profile_index);
|
|
result = TRUE;
|
|
}
|
|
else
|
|
error(2, "#0x%08lX is not a player profile index", profile_index);
|
|
}
|
|
else
|
|
{
|
|
error(2, "sorry, you are not allowed to delete default player profiles");
|
|
result = FALSE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean single_player_set_player1_controller_choice(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4537,
|
|
event != NULL, "event != NULL");
|
|
player_ui_set_single_player_local_player_controller(0, event->controller_index);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean netgame_unjoin_player(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = TRUE;
|
|
void *client = global_network_game_client_get();
|
|
|
|
if (client)
|
|
{
|
|
short state;
|
|
|
|
if (network_game_client_get_state(client, &state) == 2)
|
|
{
|
|
byte *game = network_game_client_get_game(client);
|
|
short machine_index;
|
|
long machine_player_count;
|
|
byte *player;
|
|
long player_index;
|
|
byte *test_player;
|
|
|
|
player = NULL;
|
|
machine_index = network_game_client_get_local_machine_index();
|
|
machine_player_count = 0;
|
|
|
|
if ((short)machine_index != NONE)
|
|
{
|
|
test_player = game + 0x226;
|
|
for (player_index = 0; player_index < 16; player_index++, test_player += 0x20)
|
|
{
|
|
if (network_player_is_valid(test_player) &&
|
|
(short)(signed char)test_player[0x1C] == (short)machine_index)
|
|
{
|
|
machine_player_count++;
|
|
if ((short)(signed char)test_player[0x1D] == event->controller_index)
|
|
{
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4646, !player, "duplicate player registered in game");
|
|
player = test_player;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (machine_player_count > 0)
|
|
{
|
|
if (player)
|
|
{
|
|
if (!network_game_client_request_remove_player(client, player))
|
|
error(2, "failed to request player removal");
|
|
player_ui_clear_multiplayer_autojoin_for_local_player((short)(signed char)player[0x1D]);
|
|
}
|
|
|
|
if (machine_player_count == 1)
|
|
{
|
|
if (global_network_game_server_get() && network_game_should_accept_remote_connections() == TRUE)
|
|
{
|
|
void *server = global_network_game_server_get();
|
|
if (server)
|
|
network_game_server_pause_countdown(server, TRUE);
|
|
}
|
|
else
|
|
{
|
|
dispose_global_network_game_client();
|
|
dispose_global_network_game_server();
|
|
}
|
|
result = TRUE;
|
|
player_ui_autojoin_players_to_next_multiplayer_game();
|
|
}
|
|
else
|
|
result = FALSE;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
error(2, "can't request player removal from netgame_unjoin_player() unless we are in pregame");
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean close_calling_widget_if_not_editing_profile(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result;
|
|
if (!player_ui_get_edit_player_profile() && !player_ui_get_edit_playlist_profile())
|
|
{
|
|
struct widget_instance *top = widget_instance_get_topmost_parent(widget);
|
|
error(2, "closing widget '%s' because no saved game file is being edited", top->name);
|
|
result = FALSE;
|
|
top->unknown1C = 1;
|
|
top->visible = result;
|
|
}
|
|
else
|
|
result = TRUE;
|
|
return result;
|
|
}
|
|
|
|
boolean new_campaign_if_no_custom_player_profiles_exist(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
word profile_count = 1;
|
|
long profile_index;
|
|
boolean result;
|
|
player_profiles_enumerate_available_to_local_player_index(NONE, &profile_count, &profile_index, FALSE);
|
|
if ((short)profile_count > 0)
|
|
result = TRUE;
|
|
else
|
|
{
|
|
result = FALSE;
|
|
new_campaign_chosen(widget, event, widget_deleted);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean difficulty_set(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 787,
|
|
widget->data3C.selected_index >= 0 && widget->data3C.selected_index < 4,
|
|
"I don't think this is the difficulty list widget");
|
|
main_set_difficulty(widget->data3C.selected_index);
|
|
ui_play_audio_feedback_sound(2);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean display_error_if_no_network_connection(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = transport_network_available();
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4575,
|
|
event != NULL, "event");
|
|
if (!result)
|
|
display_error(5, event->controller_index, TRUE, TRUE);
|
|
return result;
|
|
}
|
|
|
|
boolean split_screen_game_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = TRUE;
|
|
|
|
network_game_accept_remote_connections(FALSE);
|
|
if (!global_network_game_server_get())
|
|
{
|
|
game_engine_playlist_initialize();
|
|
result = create_global_network_game_server();
|
|
if (result == TRUE)
|
|
{
|
|
game_engine_playlist_begin();
|
|
game_connection_set(2);
|
|
}
|
|
}
|
|
if (result && !global_network_game_client_get())
|
|
result = create_global_network_game_client();
|
|
if (!result)
|
|
{
|
|
dispose_global_network_game_server();
|
|
dispose_global_network_game_client();
|
|
player_ui_clear_multiplayer_variant();
|
|
error(2, "failed to initiate split screen game networking");
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean single_player_set_player2_controller_choice(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
short controller_index;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4551,
|
|
event != NULL, "event != NULL");
|
|
controller_index = event->controller_index;
|
|
if (controller_index == player_ui_get_single_player_local_player_controller(0))
|
|
{
|
|
display_error(18, NONE, TRUE, FALSE);
|
|
*widget_deleted = TRUE;
|
|
return FALSE;
|
|
}
|
|
player_ui_set_single_player_local_player_controller(1, controller_index);
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
boolean player_profile_save_changes(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = FALSE;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3759,
|
|
event != NULL, "event");
|
|
if (player_ui_edit_profile_is_dirty())
|
|
{
|
|
result = player_ui_save_profile();
|
|
if (!result)
|
|
error(2, "failed to save changes to player profile");
|
|
}
|
|
else
|
|
error(2, "no changes to player profile detected; not saving to disk");
|
|
if (!result)
|
|
{
|
|
player_ui_end_editing_profile();
|
|
ui_widget_delete(widget_instance_get_topmost_parent(widget));
|
|
*widget_deleted = TRUE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean start_network_game_if_no_advertised_servers(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = FALSE;
|
|
short state;
|
|
void *client;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4593,
|
|
widget->type == 3, "expected a column list for server list");
|
|
if (widget->generated_count == 0)
|
|
{
|
|
client = global_network_game_client_get();
|
|
if (client && network_game_client_get_state(client, &state) == 0)
|
|
result = network_game_start_new_server(widget, event, widget_deleted);
|
|
}
|
|
else
|
|
error(2, "not attempting to start a new server; there are other servers available");
|
|
return result;
|
|
}
|
|
|
|
|
|
boolean delete_player_profile_request(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
long definition_tag_index = widget->definition_tag_index;
|
|
struct ui_widget_definition *definition = ui_widget_definition_get(definition_tag_index);
|
|
long profile_index;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4111,
|
|
definition->type == 0 && definition->child_count >= 3,
|
|
"expected the multiplayer profile select screen to be a container w/ 3+ children");
|
|
{
|
|
struct ui_widget_definition *list_definition = ui_widget_definition_get(widget->child->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4114,
|
|
list_definition->type == 2,
|
|
"expected a spinner list widget for 'multiplayer profile list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4115,
|
|
list_definition->child_count == 3,
|
|
"expected 3 list items for 'multiplayer profile list' widget");
|
|
}
|
|
widget = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4124,
|
|
widget->data3C.selected_index >= 0 &&
|
|
widget->data3C.selected_index < (unsigned short)widget->generated_count,
|
|
"invalid multiplayer profile specified from 'multiplayer profile list' list widget");
|
|
profile_index = ((long *)widget->generated_list)[widget->data3C.selected_index];
|
|
event_handler_functions.profile_index = profile_index;
|
|
if (profile_index != NONE)
|
|
return TRUE;
|
|
ui_play_audio_feedback_sound(4);
|
|
return FALSE;
|
|
}
|
|
|
|
boolean player_profile_color_picker_select_color(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct widget_instance *color_select_screen = widget->focused_child;
|
|
struct player_profile *profile = player_ui_get_edit_player_profile();
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3630,
|
|
color_select_screen != NULL && color_select_screen->type == 2,
|
|
"expected the color select screen to contain a spinner list for the color picker");
|
|
{
|
|
struct ui_widget_definition *definition = ui_widget_definition_get(color_select_screen->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3637,
|
|
definition->type == 2,
|
|
"expected a spinner list widget for 'player color picker list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3638,
|
|
definition->child_count == 3,
|
|
"expected 3 list items for 'player color picker list' widget");
|
|
}
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3644,
|
|
color_select_screen->data3C.selected_index >= 0 &&
|
|
color_select_screen->data3C.selected_index <
|
|
player_profile_number_of_available_primary_colors(),
|
|
"invalid player profile color index specified");
|
|
if (profile)
|
|
{
|
|
profile->primary_color_index = color_select_screen->data3C.selected_index;
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to set player profile color because no profile is currently being edited");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean playlist_profile_set_game_engine(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
struct widget_instance *list_widget = widget->parent;
|
|
boolean result = TRUE;
|
|
long game_engine;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1958,
|
|
list_widget != NULL && list_widget->type == 3,
|
|
"expected column list for game engine type list");
|
|
if (profile)
|
|
{
|
|
switch (list_widget->data3C.selected_index)
|
|
{
|
|
case 0:
|
|
game_engine = 1;
|
|
break;
|
|
case 1:
|
|
game_engine = 4;
|
|
break;
|
|
case 2:
|
|
game_engine = 2;
|
|
break;
|
|
case 3:
|
|
game_engine = 3;
|
|
break;
|
|
case 4:
|
|
game_engine = 5;
|
|
break;
|
|
default:
|
|
error(2, "unknown game engine option selected");
|
|
game_engine = *(long *)(profile + 0x18);
|
|
break;
|
|
}
|
|
if (game_engine != *(long *)(profile + 0x18))
|
|
memset(profile + 0x4C, 0, 0x18);
|
|
*(long *)(profile + 0x18) = game_engine;
|
|
}
|
|
else
|
|
{
|
|
error(2, "failed to retrieve editable game variant");
|
|
result = FALSE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean multiplayer_game_swap_teams(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct network_player_data player_data;
|
|
short machine_index;
|
|
byte *game;
|
|
long player_index;
|
|
byte *player;
|
|
|
|
match_assert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1572, event);
|
|
game = network_game_get_game();
|
|
if (game && game[0xC0] == TRUE)
|
|
{
|
|
machine_index = network_game_client_get_local_machine_index();
|
|
if ((short)machine_index != NONE)
|
|
{
|
|
player_index = 0;
|
|
player = game + 0x242;
|
|
for (; player_index < 16; player_index++, player += 0x20)
|
|
{
|
|
if (network_player_is_valid(player - 0x1C) &&
|
|
(short)(signed char)player[0] == (short)machine_index &&
|
|
(short)(signed char)player[1] == event->controller_index)
|
|
{
|
|
player_data = *(struct network_player_data *)(game + 0x226 + player_index * 0x20);
|
|
player_data.data[0x1E] = !player_data.data[0x1E];
|
|
if (!network_game_client_update_local_player_data(
|
|
global_network_game_client_get(), &player_data))
|
|
{
|
|
error(2, "failed to update player's team for multiplayer game");
|
|
}
|
|
return TRUE;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
boolean network_game_start_faster(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
void *client = global_network_game_client_get();
|
|
byte *player;
|
|
short machine_index;
|
|
long player_index;
|
|
|
|
if (client)
|
|
{
|
|
void *game = network_game_client_get_game(client);
|
|
machine_index = network_game_client_get_machine_index(client);
|
|
player_index = 0;
|
|
player = (byte *)game;
|
|
player += 0x242;
|
|
for (; player_index < 16; player_index++, player += 0x20)
|
|
{
|
|
if (network_player_is_valid(player - 0x1C) &&
|
|
(short)(signed char)player[0] == (short)machine_index &&
|
|
(short)(signed char)player[1] == event->controller_index)
|
|
{
|
|
if (!network_game_client_request_start_time_change(client, TRUE))
|
|
error(2, "network_game_client_request_start_time_change() failed");
|
|
return TRUE;
|
|
}
|
|
}
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
boolean network_game_start_slower(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
void *client = global_network_game_client_get();
|
|
byte *player;
|
|
short machine_index;
|
|
long player_index;
|
|
|
|
if (client)
|
|
{
|
|
void *game = network_game_client_get_game(client);
|
|
machine_index = network_game_client_get_machine_index(client);
|
|
player_index = 0;
|
|
player = (byte *)game;
|
|
player += 0x242;
|
|
for (; player_index < 16; player_index++, player += 0x20)
|
|
{
|
|
if (network_player_is_valid(player - 0x1C) &&
|
|
(short)(signed char)player[0] == (short)machine_index &&
|
|
(short)(signed char)player[1] == event->controller_index)
|
|
{
|
|
if (!network_game_client_request_start_time_change(client, FALSE))
|
|
error(2, "network_game_client_request_start_time_change() failed");
|
|
return TRUE;
|
|
}
|
|
}
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
boolean create_and_begin_editing_new_player_profile(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
wchar_t name[128];
|
|
short controller_index = event->controller_index;
|
|
boolean result = FALSE;
|
|
long profile_index;
|
|
struct player_profile *profile;
|
|
|
|
if (controller_index == NONE)
|
|
controller_index = 0;
|
|
saved_game_file_get_useable_untitled_profile_name(name);
|
|
if (name[0])
|
|
{
|
|
profile_index = player_profile_new(controller_index, name);
|
|
if (profile_index != NONE)
|
|
{
|
|
player_ui_begin_editing_profile(profile_index);
|
|
profile = player_ui_get_edit_player_profile();
|
|
if (profile)
|
|
{
|
|
ustrncpy(profile->player_name, name, MAXIMUM_PLAYER_PROFILE_NAME_LENGTH-1);
|
|
profile->player_name[MAXIMUM_PLAYER_PROFILE_NAME_LENGTH-1] = 0;
|
|
result = virtual_keyboard_launch(profile->player_name, sizeof(profile->player_name), 8);
|
|
}
|
|
else
|
|
{
|
|
error(2, "failed to retrieve editable player profile!");
|
|
player_ui_end_editing_profile();
|
|
}
|
|
}
|
|
else
|
|
error(2, "failed to create a new player profile");
|
|
}
|
|
else
|
|
error(2, "unable to create a new untitled profile");
|
|
if (!result)
|
|
{
|
|
display_error_deferred(37, NONE, TRUE, FALSE);
|
|
ui_play_audio_feedback_sound(4);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean multiplayer_level_list_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
char map_name[256];
|
|
struct ui_widget_definition *definition = ui_widget_definition_get(widget->definition_tag_index);
|
|
short level_count = 13;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1228,
|
|
definition->type == 2,
|
|
"expected a spinner list widget for 'multiplayer level list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1229,
|
|
definition->child_count == 3,
|
|
"expected 3 list items for 'multiplayer level list' widget");
|
|
widget->generated_list = event_handler_functions.multiplayer_levels;
|
|
widget->generated_count = level_count;
|
|
if (saved_game_file_retrieve_last_used_multiplayer_map(map_name))
|
|
{
|
|
widget->data3C.selected_index = 0;
|
|
while (widget->data3C.selected_index < level_count &&
|
|
_stricmp(map_name,
|
|
event_handler_functions.multiplayer_levels[widget->data3C.selected_index]))
|
|
{
|
|
widget->data3C.selected_index++;
|
|
}
|
|
if (widget->data3C.selected_index == level_count)
|
|
widget->data3C.selected_index = 0;
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
boolean playlist_profile_begin_editing(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = FALSE;
|
|
long profile_index;
|
|
|
|
{
|
|
long definition_tag_index = widget->definition_tag_index;
|
|
struct ui_widget_definition *definition;
|
|
event_handler_functions.profile_index = NONE;
|
|
definition = ui_widget_definition_get(definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1896,
|
|
definition->type == 0 && definition->child_count >= 3,
|
|
"expected the multiplayer profile select screen to be a container w/ 3+ children");
|
|
}
|
|
{
|
|
struct ui_widget_definition *list_definition = ui_widget_definition_get(widget->child->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1899,
|
|
list_definition->type == 2,
|
|
"expected a spinner list widget for 'multiplayer profile list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1900,
|
|
list_definition->child_count == 3,
|
|
"expected 3 list items for 'multiplayer profile list' widget");
|
|
}
|
|
widget = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1909,
|
|
widget->data3C.selected_index >= 0 &&
|
|
widget->data3C.selected_index < (unsigned short)widget->generated_count,
|
|
"invalid multiplayer profile specified from 'multiplayer profile list' list widget");
|
|
profile_index = ((long *)widget->generated_list)[widget->data3C.selected_index];
|
|
if (profile_index != NONE)
|
|
{
|
|
if (profile_index & 0x80000000)
|
|
{
|
|
player_ui_begin_editing_profile(profile_index);
|
|
result = TRUE;
|
|
}
|
|
else
|
|
{
|
|
display_error_deferred(31, NONE, TRUE, FALSE);
|
|
ui_play_audio_feedback_sound(4);
|
|
}
|
|
}
|
|
else
|
|
ui_play_audio_feedback_sound(4);
|
|
return result;
|
|
}
|
|
|
|
boolean player_profile_begin_editing(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = FALSE;
|
|
long profile_index;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3667,
|
|
widget->type == 0,
|
|
"expected the player profile select screen to be a container widget");
|
|
{
|
|
long definition_tag_index = widget->child->definition_tag_index;
|
|
struct ui_widget_definition *definition;
|
|
event_handler_functions.profile_index = NONE;
|
|
definition = ui_widget_definition_get(definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3677,
|
|
definition->type == 2,
|
|
"expected a spinner list widget for 'player profile list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3678,
|
|
definition->child_count == 3,
|
|
"expected 3 list items for 'player profile list' widget");
|
|
}
|
|
widget = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3687,
|
|
widget->data3C.selected_index >= 0 &&
|
|
widget->data3C.selected_index < (unsigned short)widget->generated_count,
|
|
"invalid player profile specified from 'player profile list' list widget");
|
|
profile_index = ((long *)widget->generated_list)[widget->data3C.selected_index];
|
|
if (profile_index != NONE)
|
|
{
|
|
if (profile_index & 0x80000000)
|
|
{
|
|
player_ui_begin_editing_profile(profile_index);
|
|
result = TRUE;
|
|
}
|
|
else
|
|
{
|
|
display_error_deferred(31, NONE, TRUE, FALSE);
|
|
ui_play_audio_feedback_sound(4);
|
|
}
|
|
}
|
|
else
|
|
ui_play_audio_feedback_sound(4);
|
|
return result;
|
|
}
|
|
|
|
boolean delete_playlist_profile_request(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = FALSE;
|
|
long profile_index;
|
|
|
|
{
|
|
long definition_tag_index = widget->definition_tag_index;
|
|
struct ui_widget_definition *definition = ui_widget_definition_get(definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4157,
|
|
definition->type == 0 && definition->child_count >= 3,
|
|
"expected the playlist profile select screen to be a container w/ 3+ children");
|
|
}
|
|
{
|
|
struct ui_widget_definition *list_definition = ui_widget_definition_get(widget->child->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4160,
|
|
list_definition->type == 2,
|
|
"expected a spinner list widget for 'playlist profile list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4161,
|
|
list_definition->child_count == 3,
|
|
"expected 3 list items for 'playlist profile list' widget");
|
|
}
|
|
widget = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4169,
|
|
widget->data3C.selected_index >= 0 &&
|
|
widget->data3C.selected_index < (unsigned short)widget->generated_count,
|
|
"invalid multiplayer profile specified from 'multiplayer profile list' list widget");
|
|
profile_index = ((long *)widget->generated_list)[widget->data3C.selected_index];
|
|
event_handler_functions.profile_index = profile_index;
|
|
if (profile_index != NONE)
|
|
{
|
|
if (profile_index & 0x40000000)
|
|
{
|
|
display_error_deferred(26, NONE, TRUE, FALSE);
|
|
ui_play_audio_feedback_sound(4);
|
|
}
|
|
else
|
|
result = TRUE;
|
|
}
|
|
else
|
|
ui_play_audio_feedback_sound(4);
|
|
return result;
|
|
}
|
|
|
|
boolean player_profile_color_picker_menu_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
word color_count = player_profile_number_of_available_primary_colors();
|
|
struct player_profile *profile = player_ui_get_edit_player_profile();
|
|
struct ui_widget_definition *definition = ui_widget_definition_get(widget->definition_tag_index);
|
|
long index;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3576,
|
|
definition->type == 2,
|
|
"expected a spinner list widget for 'player color picker list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3577,
|
|
definition->child_count == 3,
|
|
"expected 3 list items for 'player color picker list' widget");
|
|
widget->generated_list = ui_widget_realloc(widget->generated_list, color_count,
|
|
"c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3581);
|
|
if (widget->generated_list)
|
|
{
|
|
for (index = 0; index < (unsigned short)color_count; index++)
|
|
((byte *)widget->generated_list)[index] = (byte)index;
|
|
widget->generated_count = (short)color_count;
|
|
}
|
|
if (profile)
|
|
{
|
|
short color = profile->primary_color_index;
|
|
long result;
|
|
|
|
if (color < 0)
|
|
result = 0;
|
|
else
|
|
{
|
|
long maximum_color = (unsigned short)color_count - 1;
|
|
result = color;
|
|
if (result > maximum_color)
|
|
result = maximum_color;
|
|
}
|
|
profile->primary_color_index = (short)result;
|
|
widget->data3C.selected_index = (short)result;
|
|
}
|
|
else
|
|
error(2, "failed to find editing player profile");
|
|
return TRUE;
|
|
}
|
|
|
|
boolean difficulty_menu_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct widget_instance *difficulty_widget;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4860,
|
|
widget->type == 3, "expected column list for difficulty menu widget");
|
|
if (persistant_game_data_info.valid == TRUE &&
|
|
_stricmp(persistant_game_data_info.map_name, main_get_map_name()) == 0)
|
|
{
|
|
difficulty_widget = widget_instance_get_nth_child(widget,
|
|
persistant_game_data_info.difficulty.value);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4865,
|
|
difficulty_widget != NULL, "failed to find 'difficulty' menu item");
|
|
widget->data3C.selected_index = persistant_game_data_info.difficulty.value;
|
|
widget->focused_child = difficulty_widget;
|
|
return TRUE;
|
|
}
|
|
difficulty_widget = widget_instance_get_nth_child(widget, 1);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4871,
|
|
difficulty_widget != NULL, "failed to find 'difficulty' menu item");
|
|
widget->focused_child = difficulty_widget;
|
|
widget->data3C.selected_index = 1;
|
|
return TRUE;
|
|
}
|
|
|
|
boolean playlist_profile_initialize_game_engine(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
wchar_t *profile = player_ui_get_edit_playlist_profile();
|
|
long game_engine;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2738,
|
|
widget->type == 3, "expected a column list for the list of available game engines");
|
|
if (profile)
|
|
{
|
|
game_engine = *(long *)((byte *)profile + 0x18);
|
|
switch (game_engine)
|
|
{
|
|
case 4:
|
|
widget->data3C.selected_index = 1;
|
|
break;
|
|
case 2:
|
|
widget->data3C.selected_index = 2;
|
|
break;
|
|
case 3:
|
|
widget->data3C.selected_index = 3;
|
|
break;
|
|
case 5:
|
|
widget->data3C.selected_index = 4;
|
|
break;
|
|
case 1:
|
|
goto default_game_engine;
|
|
default:
|
|
default_game_engine:
|
|
widget->data3C.selected_index = 0;
|
|
break;
|
|
}
|
|
widget->focused_child = widget_instance_get_nth_child(widget, widget->data3C.selected_index);
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean playlist_profile_save_changes(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = FALSE;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3510,
|
|
event != NULL, "event");
|
|
if (player_ui_edit_profile_is_dirty())
|
|
{
|
|
if (player_ui_edit_profile_is_default_profile() &&
|
|
!player_ui_edit_profile_name_is_dirty())
|
|
{
|
|
if (!player_ui_prompt_user_to_rename_edit_profile())
|
|
{
|
|
error(2, "failed to prompt user to rename profile");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
result = player_ui_save_profile();
|
|
if (!result)
|
|
{
|
|
error(2, "failed to save changes to multiplayer playlist profile");
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
error(2, "no changes to playlist profile detected; not saving to disk");
|
|
player_ui_end_editing_profile();
|
|
ui_widget_delete(widget_instance_get_topmost_parent(widget));
|
|
*widget_deleted = TRUE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean multiplayer_profiles_list_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct ui_widget_definition *definition;
|
|
char directory_path[256];
|
|
long *profile_indices;
|
|
long profile_index;
|
|
word list_item_index;
|
|
|
|
event_handler_functions.profile_index = NONE;
|
|
memset(cached_variant_profile, -1, 0x144);
|
|
definition = ui_widget_definition_get(widget->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1384,
|
|
definition->type == 2,
|
|
"expected a spinner list widget for 'multiplayer settings list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1385,
|
|
definition->child_count == 3,
|
|
"expected 3 list items for 'multiplayer settings list' widget");
|
|
widget->generated_list = ui_widget_realloc(widget->generated_list, 0x190,
|
|
"c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1390);
|
|
profile_indices = widget->generated_list;
|
|
if (profile_indices)
|
|
{
|
|
long profile_count;
|
|
|
|
profile_count = 100;
|
|
playlist_profiles_enumerate_available_to_local_player_index(0, &profile_count, profile_indices);
|
|
if ((word)profile_count < 3)
|
|
{
|
|
long *profile_index_pointer;
|
|
long remaining_profile_count;
|
|
|
|
profile_index_pointer = profile_indices + (word)profile_count;
|
|
remaining_profile_count = (word)(3 - (word)profile_count);
|
|
do
|
|
{
|
|
*profile_index_pointer = NONE;
|
|
profile_count++;
|
|
profile_index_pointer++;
|
|
} while (--remaining_profile_count);
|
|
}
|
|
widget->generated_count = (word)profile_count;
|
|
if (saved_game_file_retrieve_last_used_multiplayer_variant_directory(directory_path))
|
|
{
|
|
profile_index = saved_game_file_find_profile_index_for_directory_path(directory_path, 1);
|
|
if (profile_index != NONE)
|
|
{
|
|
for (list_item_index = 0; list_item_index < (word)profile_count; list_item_index++)
|
|
{
|
|
if (profile_indices[list_item_index] == profile_index)
|
|
{
|
|
widget->data3C.selected_index = list_item_index;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
boolean ui_widget_event_handler_function_invoke(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
word function_index,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 478,
|
|
widget != NULL && widget_deleted != NULL,
|
|
"(widget != NULL) && (widget_deleted != NULL)");
|
|
if ((short)function_index >= 0 && function_index < 102)
|
|
{
|
|
result = event_handler_function_list.functions[(short)function_index](widget, event, widget_deleted);
|
|
if (!result)
|
|
console_warning("event handler '%s' failed", event_handler_function_list.names[(short)function_index]);
|
|
return result;
|
|
}
|
|
error(2, "invalid event_handler_function");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean new_campaign_chosen(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
wchar_t name[128];
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4741,
|
|
event != NULL, "event");
|
|
saved_game_file_get_useable_untitled_profile_name(name);
|
|
ustrncpy(new_campaign_profile_name, name, 11);
|
|
new_campaign_profile_name[11] = L'\0';
|
|
event_handler_functions.unknown74 = event->controller_index;
|
|
if (!virtual_keyboard_launch(new_campaign_profile_name, 24, 8))
|
|
error(2, "failed to invoke the virtual keyboard for a new campaign profile name");
|
|
return TRUE;
|
|
}
|
|
|
|
boolean network_game_start_new_server(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result = TRUE;
|
|
|
|
dispose_global_network_game_client();
|
|
player_ui_clear_multiplayer_variant();
|
|
network_game_accept_remote_connections(TRUE);
|
|
if (!global_network_game_server_get())
|
|
{
|
|
game_engine_playlist_initialize();
|
|
result = create_global_network_game_server();
|
|
if (result == TRUE)
|
|
{
|
|
network_game_server_pause_countdown(global_network_game_server_get(), TRUE);
|
|
game_engine_playlist_begin();
|
|
game_connection_set(2);
|
|
}
|
|
}
|
|
if (result && !global_network_game_client_get())
|
|
result = create_global_network_game_client();
|
|
if (!result)
|
|
{
|
|
dispose_global_network_game_server();
|
|
dispose_global_network_game_client();
|
|
network_game_accept_remote_connections(FALSE);
|
|
player_ui_clear_multiplayer_variant();
|
|
error(2, "failed to initiate a multiplayer game server");
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean playlist_profile_initialize_name(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
wchar_t *profile = player_ui_get_edit_playlist_profile();
|
|
boolean result = TRUE;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2770,
|
|
widget->type == 1, "expected text box widget for profile name");
|
|
if (profile)
|
|
{
|
|
widget->data3C.text = ui_widget_realloc(widget->data3C.text, 0x100,
|
|
"c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2774);
|
|
if (widget->data3C.text)
|
|
{
|
|
ustrncpy(widget->data3C.text, profile, 0x7F);
|
|
widget->data3C.text[0x7F] = L'\0';
|
|
}
|
|
}
|
|
else
|
|
{
|
|
error(2, "failed to retrieve editable game variant");
|
|
result = FALSE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean playlist_profile_change_item_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2608, list_item, "expected 'infinite grenades' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2610, option_spinner, "expected 'infinite grenades' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0:
|
|
*(long *)(profile + 0x20) |= 4;
|
|
break;
|
|
case 1:
|
|
*(long *)(profile + 0x20) &= ~4;
|
|
break;
|
|
default:
|
|
error(2, "unknown option selected in 'infinite grenades' option spinner list");
|
|
break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2619, list_item, "expected 'vehicle set' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2621, option_spinner, "expected 'vehicle set' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x48) = 0; break;
|
|
case 1: *(long *)(profile + 0x48) = 1; break;
|
|
case 2: *(long *)(profile + 0x48) = 2; break;
|
|
case 3: *(long *)(profile + 0x48) = 3; break;
|
|
case 4: *(long *)(profile + 0x48) = 4; break;
|
|
default:
|
|
error(2, "unknown option selected in 'vehicle set' option spinner list");
|
|
break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2633, list_item, "expected 'weapon set' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2635, option_spinner, "expected 'weapon set' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x44) = 0; break;
|
|
case 1: *(long *)(profile + 0x44) = 1; break;
|
|
case 2: *(long *)(profile + 0x44) = 2; break;
|
|
case 3: *(long *)(profile + 0x44) = 3; break;
|
|
case 4: *(long *)(profile + 0x44) = 4; break;
|
|
case 5: *(long *)(profile + 0x44) = 5; break;
|
|
case 6: *(long *)(profile + 0x44) = 6; break;
|
|
case 7: *(long *)(profile + 0x44) = 7; break;
|
|
case 8: *(long *)(profile + 0x44) = 8; break;
|
|
case 9: *(long *)(profile + 0x44) = 9; break;
|
|
case 10: *(long *)(profile + 0x44) = 10; break;
|
|
default:
|
|
error(2, "unknown option selected in 'weapon set' option spinner list");
|
|
break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2654, list_item, "expected 'starting equipment' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2656, option_spinner, "expected 'starting equipment' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0:
|
|
*(long *)(profile + 0x20) &= ~0x20;
|
|
return TRUE;
|
|
case 1:
|
|
*(long *)(profile + 0x20) |= 0x20;
|
|
return TRUE;
|
|
default:
|
|
error(2, "unknown option selected in 'starting equipment' option spinner list");
|
|
return TRUE;
|
|
}
|
|
}
|
|
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean playlist_profile_change_indicator_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2688, list_item, "expected 'radar display' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2690, option_spinner, "expected 'radar display' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x24) = 0; break;
|
|
case 1: *(long *)(profile + 0x24) = 1; break;
|
|
case 2: *(long *)(profile + 0x24) = 2; break;
|
|
default:
|
|
error(2, "unknown option selected in 'radar display' option spinner list");
|
|
break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2700, list_item, "expected 'other players on radar' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2702, option_spinner, "expected 'other players on radar' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0:
|
|
*(long *)(profile + 0x20) |= 1;
|
|
break;
|
|
case 1:
|
|
*(long *)(profile + 0x20) &= ~1;
|
|
break;
|
|
default:
|
|
error(2, "unknown option selected in 'other players on radar' option spinner list");
|
|
break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2711, list_item, "expected 'friends on screen' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2713, option_spinner, "expected 'friends on screen' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0:
|
|
*(long *)(profile + 0x20) |= 2;
|
|
return TRUE;
|
|
case 1:
|
|
*(long *)(profile + 0x20) &= ~2;
|
|
return TRUE;
|
|
default:
|
|
error(2, "unknown option selected in 'friends on screen' option spinner list");
|
|
return TRUE;
|
|
}
|
|
}
|
|
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean playlist_profile_change_ctf_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2040, list_item, "expected 'assault' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2042, option_spinner, "expected 'assault' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x4C] = TRUE; break;
|
|
case 1: profile[0x4C] = FALSE; break;
|
|
default: error(2, "unknown option selected in 'assault' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2051, list_item, "expected 'single flag' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2053, option_spinner, "expected 'single flag' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x50) = 0; break;
|
|
case 1: *(long *)(profile + 0x50) = 0x708; break;
|
|
case 2: *(long *)(profile + 0x50) = 0xE10; break;
|
|
case 3: *(long *)(profile + 0x50) = 0x1518; break;
|
|
case 4: *(long *)(profile + 0x50) = 0x2328; break;
|
|
case 5: *(long *)(profile + 0x50) = 0x4650; break;
|
|
default: error(2, "unknown option selected in 'single flag' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2066, list_item, "expected 'flag must reset' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2068, option_spinner, "expected 'flag must reset' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x4E] = TRUE; break;
|
|
case 1: profile[0x4E] = FALSE; break;
|
|
default: error(2, "unknown option selected in 'flag must reset' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2077, list_item, "expected 'flag at home to score' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2079, option_spinner, "expected 'flag at home to score' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x4F] = TRUE; break;
|
|
case 1: profile[0x4F] = FALSE; break;
|
|
default: error(2, "unknown option selected in 'flag at home to score' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2088, list_item, "expected 'captures to win' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2090, option_spinner, "expected 'captures to win' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x40) = 1; break;
|
|
case 1: *(long *)(profile + 0x40) = 3; break;
|
|
case 2: *(long *)(profile + 0x40) = 5; break;
|
|
case 3: *(long *)(profile + 0x40) = 10; break;
|
|
case 4: *(long *)(profile + 0x40) = 15; break;
|
|
default: error(2, "unknown option selected in 'captures to win' option spinner list"); break;
|
|
}
|
|
ui_widgets_pop_stack(widget->local_player_index);
|
|
return TRUE;
|
|
}
|
|
|
|
error(2, "failed to retrieve editable game variant");
|
|
return TRUE;
|
|
}
|
|
|
|
boolean playlist_profile_change_racing_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2408, list_item, "expected 'team scoring' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2410, option_spinner, "expected 'team scoring' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x50) = 0; break;
|
|
case 1: *(long *)(profile + 0x50) = 1; break;
|
|
case 2: *(long *)(profile + 0x50) = 2; break;
|
|
default: error(2, "unknown option selected in 'team scoring' option spinner list"); break;
|
|
}
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2420, list_item, "expected 'race type' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2422, option_spinner, "expected 'race type' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x4C) = 0; break;
|
|
case 1: *(long *)(profile + 0x4C) = 1; break;
|
|
case 2: *(long *)(profile + 0x4C) = 2; break;
|
|
default: error(2, "unknown option selected in 'race type' option spinner list"); break;
|
|
}
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2432, list_item, "expected 'laps to win' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2434, option_spinner, "expected 'laps to win' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x40) = 1; break;
|
|
case 1: *(long *)(profile + 0x40) = 3; break;
|
|
case 2: *(long *)(profile + 0x40) = 5; break;
|
|
case 3: *(long *)(profile + 0x40) = 10; break;
|
|
case 4: *(long *)(profile + 0x40) = 15; break;
|
|
case 5: *(long *)(profile + 0x40) = 25; break;
|
|
default: error(2, "unknown option selected in 'laps to win' option spinner list"); break;
|
|
}
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2447, list_item, "expected 'teams' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2449, option_spinner, "expected 'teams' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x1C] = TRUE; break;
|
|
case 1: profile[0x1C] = FALSE; break;
|
|
default: error(2, "unknown option selected in 'teams' option spinner list"); break;
|
|
}
|
|
ui_widgets_pop_stack(widget->local_player_index);
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean playlist_profile_change_koth_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2126, list_item, "expected 'moving hill' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2128, option_spinner, "expected 'moving hill' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x4C] = TRUE; break;
|
|
case 1: profile[0x4C] = FALSE; break;
|
|
default: error(2, "unknown option selected in 'moving hill' option spinner list"); break;
|
|
}
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2137, list_item, "expected 'score to win' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2139, option_spinner, "expected 'score to win' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x40) = 1; break;
|
|
case 1: *(long *)(profile + 0x40) = 2; break;
|
|
case 2: *(long *)(profile + 0x40) = 5; break;
|
|
case 3: *(long *)(profile + 0x40) = 10; break;
|
|
case 4: *(long *)(profile + 0x40) = 15; break;
|
|
default: error(2, "unknown option selected in 'score to win' option spinner list"); break;
|
|
}
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2151, list_item, "expected 'teams' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2153, option_spinner, "expected 'teams' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x1C] = TRUE; break;
|
|
case 1: profile[0x1C] = FALSE; break;
|
|
default: error(2, "unknown option selected in 'teams' option spinner list"); break;
|
|
}
|
|
ui_widgets_pop_stack(widget->local_player_index);
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean playlist_profile_change_slayer_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2187, list_item, "expected 'death bonus' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2189, option_spinner, "expected 'death bonus' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x4C] = FALSE; break;
|
|
case 1: profile[0x4C] = TRUE; break;
|
|
default: error(2, "unknown option selected in 'death bonus' option spinner list"); break;
|
|
}
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2198, list_item, "expected 'kill in order' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2200, option_spinner, "expected 'kill in order' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x4E] = TRUE; break;
|
|
case 1: profile[0x4E] = FALSE; break;
|
|
default: error(2, "unknown option selected in 'kill in order' option spinner list"); break;
|
|
}
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2209, list_item, "expected 'kill penalty' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2211, option_spinner, "expected 'kill penalty' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x4D] = FALSE; break;
|
|
case 1: profile[0x4D] = TRUE; break;
|
|
default: error(2, "unknown option selected in 'kill penalty' option spinner list"); break;
|
|
}
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2220, list_item, "expected 'kills to win' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2222, option_spinner, "expected 'kills to win' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x40) = 5; break;
|
|
case 1: *(long *)(profile + 0x40) = 10; break;
|
|
case 2: *(long *)(profile + 0x40) = 15; break;
|
|
case 3: *(long *)(profile + 0x40) = 25; break;
|
|
case 4: *(long *)(profile + 0x40) = 50; break;
|
|
default: error(2, "unknown option selected in 'kills to win' option spinner list"); break;
|
|
}
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2234, list_item, "expected 'teams' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2236, option_spinner, "expected 'teams' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x1C] = TRUE; break;
|
|
case 1: profile[0x1C] = FALSE; break;
|
|
default: error(2, "unknown option selected in 'teams' option spinner list"); break;
|
|
}
|
|
ui_widgets_pop_stack(widget->local_player_index);
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean player_profile_set_for_game_1wide(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct player_profile profile;
|
|
struct widget_instance *spinner_list;
|
|
struct ui_widget_definition *definition;
|
|
short controller_index;
|
|
long *available_profiles;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1834, event && event->controller_index != NONE, "setting a player profile requires a valid controller index");
|
|
controller_index = event->controller_index;
|
|
spinner_list = widget->child;
|
|
while (spinner_list && spinner_list->type != 2)
|
|
spinner_list = spinner_list->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1838, spinner_list, "failed to find the 1-wide spinner list for player profiles (expected it to be a child of this widget)");
|
|
definition = ui_widget_definition_get(spinner_list->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1845, definition->child_count == 0, "expected a code-generated 1-wide spinner list for 'mp player profile list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1851, spinner_list->data3C.selected_index >= 0 && spinner_list->data3C.selected_index < (word)spinner_list->generated_count, "invalid multiplayer profile specified from 'mp player profile list' list widget");
|
|
available_profiles = spinner_list->generated_list;
|
|
if (!(available_profiles[spinner_list->data3C.selected_index] & 0x80000000))
|
|
{
|
|
display_error_deferred(31, controller_index, TRUE, FALSE);
|
|
ui_play_audio_feedback_sound(4);
|
|
return FALSE;
|
|
}
|
|
if (player_profile_get(available_profiles[spinner_list->data3C.selected_index], &profile))
|
|
{
|
|
player_ui_set_active_player_profile(controller_index, available_profiles[spinner_list->data3C.selected_index], &profile);
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve user selected player profile");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean player_profile_initialize_controller_settings(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result;
|
|
struct player_profile *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = player_ui_get_edit_player_profile();
|
|
result = TRUE;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3793, widget->type == 3, "expected column list for controller settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3801, list_item, "expected 'joystick config' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3803, option_spinner, "expected 'joystick config' option spinner list");
|
|
switch (profile->controller_settings.joystick_preset)
|
|
{
|
|
case _joystick_preset_standard:
|
|
option_spinner->data3C.selected_index = 0;
|
|
break;
|
|
case _joystick_preset_south_paw:
|
|
option_spinner->data3C.selected_index = 1;
|
|
break;
|
|
case _joystick_preset_legacy:
|
|
option_spinner->data3C.selected_index = 2;
|
|
break;
|
|
case _joystick_preset_legacy_south_paw:
|
|
option_spinner->data3C.selected_index = 3;
|
|
break;
|
|
default:
|
|
option_spinner->data3C.selected_index = 0;
|
|
break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3814, list_item, "expected 'button config' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3816, option_spinner, "expected 'button config' option spinner list");
|
|
switch (profile->controller_settings.button_preset)
|
|
{
|
|
case _button_preset_standard:
|
|
option_spinner->data3C.selected_index = 0;
|
|
break;
|
|
case _button_preset_swap_triggers:
|
|
option_spinner->data3C.selected_index = 1;
|
|
break;
|
|
case _button_preset_swap_a_and_left_trigger:
|
|
option_spinner->data3C.selected_index = 2;
|
|
break;
|
|
case _button_preset_swap_b_and_left_trigger:
|
|
option_spinner->data3C.selected_index = 3;
|
|
break;
|
|
case _button_preset_swap_b_and_right_thumb:
|
|
option_spinner->data3C.selected_index = 4;
|
|
break;
|
|
default:
|
|
option_spinner->data3C.selected_index = 0;
|
|
break;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
error(2, "failed to retrieve editable player profile");
|
|
result = FALSE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean solo_level_initialize_list_coop(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct player_profile profile1;
|
|
struct player_profile profile0;
|
|
short highest_levels[2];
|
|
short highest_difficulties[2];
|
|
struct ui_widget_definition *definition;
|
|
|
|
memset(single_player_level_data, 0, 0x50);
|
|
{
|
|
player_ui_get_active_player_profile(0, &profile0);
|
|
player_profile_get_highest_completed_solo_level(&profile0, &highest_levels[0], &highest_difficulties[0]);
|
|
player_ui_get_active_player_profile(1, &profile1);
|
|
player_profile_get_highest_completed_solo_level(&profile1, &highest_levels[1], &highest_difficulties[1]);
|
|
}
|
|
{
|
|
long level_index;
|
|
|
|
for (level_index = 0; level_index < 10; level_index++)
|
|
{
|
|
((struct single_player_level_entry *)single_player_level_data)[level_index].map_name = (&event_handler_functions.map_name)[level_index];
|
|
if (profile0.single_player_map_flags[level_index] || level_index == highest_levels[0] + 1 || profile1.single_player_map_flags[level_index] || level_index == highest_levels[1] + 1 || level_index == 0)
|
|
{
|
|
unsigned long level_flags;
|
|
|
|
level_flags = (char)profile0.single_player_map_flags[level_index] | (char)profile1.single_player_map_flags[level_index];
|
|
((struct single_player_level_entry *)single_player_level_data)[level_index].unknown5 = (level_flags >> 1) & 1;
|
|
((struct single_player_level_entry *)single_player_level_data)[level_index].available = TRUE;
|
|
((struct single_player_level_entry *)single_player_level_data)[level_index].unknown6 = (level_flags >> 2) & 1;
|
|
((struct single_player_level_entry *)single_player_level_data)[level_index].unknown7 = (level_flags >> 3) & 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
definition = ui_widget_definition_get(widget->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 689, definition->type == 2, "expected a spinner list widget for 'solo level list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 690, definition->child_count == 3, "expected 3 list items for 'solo level list' widget");
|
|
widget->generated_list = single_player_level_data;
|
|
widget->generated_count = 10;
|
|
widget->data3C.selected_index = PIN(player_ui_get_last_single_player_level_played(0), 0, 9);
|
|
return TRUE;
|
|
}
|
|
|
|
boolean player_profile_change_advanced_controller_settings(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct player_profile *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = player_ui_get_edit_player_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3984, widget->type == 3, "expected column list for advanced controller settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3992, list_item, "expected 'invert joystick' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3994, option_spinner, "expected 'invert joystick' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile->controller_settings.invert_look = TRUE; break;
|
|
case 1: profile->controller_settings.invert_look = FALSE; break;
|
|
default: error(2, "unknown option selected for invert joystick"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4003, list_item, "expected 'look sensitivity' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4005, option_spinner, "expected 'look sensitivity' option spinner list");
|
|
{
|
|
long selected_index = option_spinner->data3C.selected_index;
|
|
if (selected_index >= 0 && selected_index <= 9)
|
|
profile->controller_settings.look_sensitivity = (byte)(option_spinner->data3C.selected_index + 1);
|
|
else
|
|
error(2, "unknown option selected for look sensitivity");
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4024, list_item, "expected 'controller vibration' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4026, option_spinner, "expected 'controller vibration' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile->controller_settings.vibration_disabled = FALSE; break;
|
|
case 1: profile->controller_settings.vibration_disabled = TRUE; break;
|
|
default: error(2, "unknown option selected for controller vibration"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4035, list_item, "expected 'flight stick controls' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4037, option_spinner, "expected 'flight stick controls' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile->controller_settings.flight_stick_aircraft_controls = TRUE; break;
|
|
case 1: profile->controller_settings.flight_stick_aircraft_controls = FALSE; break;
|
|
default: error(2, "unknown option selected for controller flight_stick_aircraft_controls"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4046, list_item, "expected 'autocenter' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 4048, option_spinner, "expected 'autocenter' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile->controller_settings.autocenter = TRUE; break;
|
|
case 1: profile->controller_settings.autocenter = FALSE; break;
|
|
default: error(2, "unknown option selected for controller autocenter"); break;
|
|
}
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable player profile");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean solo_level_set_next_map_name(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
boolean result;
|
|
struct widget_instance *list_widget;
|
|
struct player_profile profile;
|
|
short highest_level;
|
|
short highest_difficulty;
|
|
|
|
list_widget = widget;
|
|
result = FALSE;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 724, list_widget->data3C.selected_index >= 0 && list_widget->data3C.selected_index < 10, "I don't think this is the solo level list widget");
|
|
switch (player_spawn_count)
|
|
{
|
|
case 1:
|
|
player_ui_get_active_player_profile(0, &profile);
|
|
player_profile_get_highest_completed_solo_level(&profile, &highest_level, &highest_difficulty);
|
|
if (profile.single_player_map_flags[list_widget->data3C.selected_index] || list_widget->data3C.selected_index == highest_level + 1 || list_widget->data3C.selected_index == 0)
|
|
result = TRUE;
|
|
player_ui_remember_player1_profile(0);
|
|
case 2:
|
|
{
|
|
short local_player_index;
|
|
|
|
for (local_player_index = 0; local_player_index <= 1; local_player_index++)
|
|
{
|
|
player_ui_get_active_player_profile(local_player_index, &profile);
|
|
player_profile_get_highest_completed_solo_level(&profile, &highest_level, &highest_difficulty);
|
|
if (profile.single_player_map_flags[list_widget->data3C.selected_index] || list_widget->data3C.selected_index == highest_level + 1 || list_widget->data3C.selected_index == 0)
|
|
{
|
|
result = TRUE;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
default:
|
|
error(2, "invalid player count for single player game");
|
|
break;
|
|
}
|
|
if (result == TRUE)
|
|
{
|
|
main_set_map_name((&event_handler_functions.map_name)[list_widget->data3C.selected_index]);
|
|
main_defer_map_map_change();
|
|
}
|
|
else
|
|
{
|
|
error(2, "this level is unavailable to you!");
|
|
ui_play_audio_feedback_sound(4);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean netgame_join_player(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
void *client;
|
|
short value;
|
|
|
|
match_assert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1618, event);
|
|
client = global_network_game_client_get();
|
|
if (!client)
|
|
return TRUE;
|
|
if (network_game_client_get_state(client, &value) != 2)
|
|
return TRUE;
|
|
{
|
|
byte *game = network_game_get_game();
|
|
short machine_index = network_game_client_get_local_machine_index();
|
|
match_assert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1627, game);
|
|
if ((short)machine_index != NONE)
|
|
{
|
|
for (value = 0; value < 16; value++)
|
|
{
|
|
if (network_player_is_valid(game + 0x226 + value * 0x20) &&
|
|
(short)(signed char)game[0x242 + value * 0x20] == (short)machine_index &&
|
|
(short)(signed char)game[0x243 + value * 0x20] == event->controller_index)
|
|
return TRUE;
|
|
}
|
|
}
|
|
if (!network_game_client_add_player(client, event->controller_index))
|
|
network_event("failed to send join request");
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
boolean player_profiles_list_initialize(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct ui_widget_definition *definition = ui_widget_definition_get(widget->definition_tag_index);
|
|
word profile_count;
|
|
long last_profile_index;
|
|
long profile_index;
|
|
boolean include_default;
|
|
short required_profile_count;
|
|
|
|
event_handler_functions.profile_index = NONE;
|
|
memset(cached_player_profile, NONE, 0x9C);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1686,
|
|
definition->type == 2,
|
|
"expected a spinner list widget for 'player settings list' widget");
|
|
required_profile_count = 3;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1688,
|
|
definition->child_count == 0 || definition->child_count == required_profile_count,
|
|
"expected either 1 or 3 list items for 'player settings list' widget");
|
|
widget->generated_list = ui_widget_realloc(widget->generated_list, 400,
|
|
"c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1693);
|
|
if (widget->generated_list)
|
|
{
|
|
if (definition->child_count != required_profile_count)
|
|
{
|
|
profile_count = 100;
|
|
include_default = TRUE;
|
|
}
|
|
else
|
|
{
|
|
profile_count = 100;
|
|
include_default = FALSE;
|
|
}
|
|
player_profiles_enumerate_available_to_local_player_index(
|
|
widget->local_player_index,
|
|
&profile_count,
|
|
widget->generated_list,
|
|
include_default);
|
|
if (definition->child_count == required_profile_count && (word)profile_count < (word)required_profile_count)
|
|
{
|
|
long remaining_profile_count;
|
|
long profile_offset;
|
|
|
|
profile_offset = (word)profile_count * sizeof(long);
|
|
remaining_profile_count = (word)(required_profile_count - (word)profile_count);
|
|
do
|
|
{
|
|
*(long *)((byte *)widget->generated_list + profile_offset) = NONE;
|
|
profile_count++;
|
|
profile_offset += sizeof(long);
|
|
} while (--remaining_profile_count);
|
|
}
|
|
widget->generated_count = (word)profile_count;
|
|
last_profile_index = player_ui_get_player1_last_used_profile_index();
|
|
if (last_profile_index != NONE)
|
|
{
|
|
byte *profile_indices;
|
|
|
|
profile_indices = widget->generated_list;
|
|
for (profile_index = 0; profile_index < (word)widget->generated_count; profile_index++)
|
|
{
|
|
if (*(long *)(profile_indices + profile_index * sizeof(long)) == last_profile_index)
|
|
{
|
|
widget->data3C.selected_index = (short)profile_index;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
boolean player_profile_set_for_game_3wide(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct player_profile profile;
|
|
struct ui_widget_definition *definition;
|
|
struct widget_instance *spinner;
|
|
long profile_index;
|
|
long *profile_indices;
|
|
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1763,
|
|
event && event->controller_index != NONE,
|
|
"setting a player profile requires a valid controller index");
|
|
definition = ui_widget_definition_get(widget->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1772,
|
|
definition->type == 0 && definition->child_count >= 3,
|
|
"expected the player profile select screen to be a container w/ 3 or more children");
|
|
{
|
|
struct widget_instance *child = widget->child;
|
|
definition = ui_widget_definition_get(child->definition_tag_index);
|
|
}
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1775,
|
|
definition->type == 2,
|
|
"expected a spinner list widget for 'player profile list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1776,
|
|
definition->child_count == 3,
|
|
"expected 3 list items for 'player profile list' widget");
|
|
spinner = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1784,
|
|
spinner->data3C.selected_index >= 0 && spinner->data3C.selected_index < (unsigned short)spinner->generated_count,
|
|
"invalid multiplayer profile specified from 'player profile list' list widget");
|
|
profile_indices = spinner->generated_list;
|
|
profile_index = profile_indices[spinner->data3C.selected_index];
|
|
if (profile_index != NONE)
|
|
{
|
|
if (!(profile_index & 0x80000000))
|
|
{
|
|
display_error_deferred(31, NONE, TRUE, FALSE);
|
|
ui_play_audio_feedback_sound(4);
|
|
*widget_deleted = TRUE;
|
|
return FALSE;
|
|
}
|
|
if (player_profile_get(profile_index, &profile))
|
|
{
|
|
short local_player_index;
|
|
|
|
local_player_index = player_ui_get_single_player_local_player_from_controller(event->controller_index);
|
|
player_ui_set_active_player_profile(
|
|
local_player_index,
|
|
profile_indices[spinner->data3C.selected_index],
|
|
&profile);
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve user selected player profile");
|
|
return FALSE;
|
|
}
|
|
error(2, "this is not a selectable player profile");
|
|
ui_play_audio_feedback_sound(4);
|
|
return FALSE;
|
|
}
|
|
|
|
boolean playlist_profile_initialize_indicator_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3450, widget->type == 3, "expected column list for multiplayer game settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3458, list_item, "expected 'radar display' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3460, option_spinner, "expected 'radar display' option spinner list");
|
|
switch (*(long *)(profile + 0x24))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
case 2: option_spinner->data3C.selected_index = 2; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3470, list_item, "expected 'other players on radar' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3472, option_spinner, "expected 'other players on radar' option spinner list");
|
|
switch (*(long *)(profile + 0x20) & 1)
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; break;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3482, list_item, "expected 'friends on screen' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3484, option_spinner, "expected 'friends on screen' option spinner list");
|
|
switch ((*(unsigned long *)(profile + 0x20) >> 1) & 1)
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; return TRUE;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean playlist_profile_initialize_item_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct playlist_profile_item_options_prefix *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (struct playlist_profile_item_options_prefix *)player_ui_get_edit_playlist_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3366,
|
|
widget->type == 3,
|
|
"expected column list for multiplayer game settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3374, list_item, "expected 'infinite grenades' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3376, option_spinner, "expected 'infinite grenades' option spinner list");
|
|
switch ((profile->flags >> 2) & 1)
|
|
{
|
|
case 0:
|
|
option_spinner->data3C.selected_index = 1;
|
|
break;
|
|
case 1:
|
|
option_spinner->data3C.selected_index = 0;
|
|
break;
|
|
default:
|
|
option_spinner->data3C.selected_index = 0;
|
|
break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3386, list_item, "expected 'vehicle set' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3388, option_spinner, "expected 'vehicle set' option spinner list");
|
|
switch (profile->vehicle_set)
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
case 2: option_spinner->data3C.selected_index = 2; break;
|
|
case 3: option_spinner->data3C.selected_index = 3; break;
|
|
case 4: option_spinner->data3C.selected_index = 4; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3400, list_item, "expected 'weapon set' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3402, option_spinner, "expected 'weapon set' option spinner list");
|
|
switch (profile->weapon_set)
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
case 2: option_spinner->data3C.selected_index = 2; break;
|
|
case 3: option_spinner->data3C.selected_index = 3; break;
|
|
case 4: option_spinner->data3C.selected_index = 4; break;
|
|
case 5: option_spinner->data3C.selected_index = 5; break;
|
|
case 6: option_spinner->data3C.selected_index = 6; break;
|
|
case 7: option_spinner->data3C.selected_index = 7; break;
|
|
case 8: option_spinner->data3C.selected_index = 8; break;
|
|
case 9: option_spinner->data3C.selected_index = 9; break;
|
|
case 10: option_spinner->data3C.selected_index = 10; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3421, list_item, "expected 'starting equipment' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3423, option_spinner, "expected 'starting equpiment' option spinner list");
|
|
switch ((profile->flags >> 5) & 1)
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; return TRUE;
|
|
case 1: option_spinner->data3C.selected_index = 1; return TRUE;
|
|
default: option_spinner->data3C.selected_index = 0; return TRUE;
|
|
}
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean player_profile_initialize_advanced_controller_settings(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct player_profile *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = player_ui_get_edit_player_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3844, widget->type == 3, "expected column list for advanced controller settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3852, list_item, "expected 'invert joystick' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3854, option_spinner, "expected 'invert joystick' option spinner list");
|
|
switch (profile->controller_settings.invert_look)
|
|
{
|
|
case FALSE: option_spinner->data3C.selected_index = 1; break;
|
|
case TRUE: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3863, list_item, "expected 'look sensitivity' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3865, option_spinner, "expected 'look sensitivity' option spinner list");
|
|
if (profile->controller_settings.look_sensitivity > 0 && profile->controller_settings.look_sensitivity <= 10)
|
|
option_spinner->data3C.selected_index = profile->controller_settings.look_sensitivity - 1;
|
|
else
|
|
option_spinner->data3C.selected_index = 0;
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3884, list_item, "expected 'controller vibration' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3886, option_spinner, "expected 'controller vibration' option spinner list");
|
|
switch (profile->controller_settings.vibration_disabled)
|
|
{
|
|
case FALSE: option_spinner->data3C.selected_index = 0; break;
|
|
case TRUE: option_spinner->data3C.selected_index = 1; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3895, list_item, "expected 'flight stick controls' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3897, option_spinner, "expected 'flight stick controls' option spinner list");
|
|
switch (profile->controller_settings.flight_stick_aircraft_controls)
|
|
{
|
|
case FALSE: option_spinner->data3C.selected_index = 1; break;
|
|
case TRUE: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3906, list_item, "expected 'autocenter' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3908, option_spinner, "expected 'autocenter' option spinner list");
|
|
switch (profile->controller_settings.autocenter)
|
|
{
|
|
case FALSE: option_spinner->data3C.selected_index = 1; return TRUE;
|
|
case TRUE: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable player profile");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean player_profile_change_controller_settings(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct player_profile *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = player_ui_get_edit_player_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3933, widget->type == 3, "expected column list for controller settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3941, list_item, "expected 'joystick config' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3943, option_spinner, "expected 'joystick config' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case _joystick_preset_standard: profile->controller_settings.joystick_preset = _joystick_preset_standard; break;
|
|
case _joystick_preset_south_paw: profile->controller_settings.joystick_preset = _joystick_preset_south_paw; break;
|
|
case _joystick_preset_legacy: profile->controller_settings.joystick_preset = _joystick_preset_legacy; break;
|
|
case _joystick_preset_legacy_south_paw: profile->controller_settings.joystick_preset = _joystick_preset_legacy_south_paw; break;
|
|
default: error(2, "unknown option selected for joystick config"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3954, list_item, "expected 'button config' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3956, option_spinner, "expected 'button config' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case _button_preset_standard: profile->controller_settings.button_preset = _button_preset_standard; return TRUE;
|
|
case _button_preset_swap_triggers: profile->controller_settings.button_preset = _button_preset_swap_triggers; return TRUE;
|
|
case _button_preset_swap_a_and_left_trigger: profile->controller_settings.button_preset = _button_preset_swap_a_and_left_trigger; return TRUE;
|
|
case _button_preset_swap_b_and_left_trigger: profile->controller_settings.button_preset = _button_preset_swap_b_and_left_trigger; return TRUE;
|
|
case _button_preset_swap_b_and_right_thumb: profile->controller_settings.button_preset = _button_preset_swap_b_and_right_thumb; return TRUE;
|
|
default: error(2, "unknown button config option selected"); return TRUE;
|
|
}
|
|
}
|
|
error(2, "failed to retrieve editable player profile");
|
|
return FALSE;
|
|
}
|
|
|
|
|
|
boolean playlist_profile_initialize_racing_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3162, widget->type == 3, "expected column list for multiplayer game settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3170, list_item, "expected 'team scoring' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3172, option_spinner, "expected 'team scoring' option spinner list");
|
|
switch (*(long *)(profile + 0x50))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
case 2: option_spinner->data3C.selected_index = 2; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3182, list_item, "expected 'race type' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3184, option_spinner, "expected 'race type' option spinner list");
|
|
switch (*(long *)(profile + 0x4C))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
case 2: option_spinner->data3C.selected_index = 2; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3194, list_item, "expected 'laps to win' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3196, option_spinner, "expected 'laps to win' option spinner list");
|
|
switch (*(long *)(profile + 0x40))
|
|
{
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
case 3: option_spinner->data3C.selected_index = 1; break;
|
|
case 5: option_spinner->data3C.selected_index = 2; break;
|
|
case 10: option_spinner->data3C.selected_index = 3; break;
|
|
case 15: option_spinner->data3C.selected_index = 4; break;
|
|
case 25: option_spinner->data3C.selected_index = 5; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3209, list_item, "expected 'teams' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3211, option_spinner, "expected 'teams' option spinner list");
|
|
switch (profile[0x1C])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; return TRUE;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
|
|
boolean playlist_profile_initialize_slayer_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2943, widget->type == 3, "expected column list for multiplayer game settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2951, list_item, "expected 'death bonus' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2953, option_spinner, "expected 'death bonus' option spinner list");
|
|
switch (profile[0x4C])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2962, list_item, "expected 'kill in order' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2964, option_spinner, "expected 'kill in order' option spinner list");
|
|
switch (profile[0x4E])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; break;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2973, list_item, "expected 'kill penalty' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2975, option_spinner, "expected 'kill penalty' option spinner list");
|
|
switch (profile[0x4D])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2984, list_item, "expected 'kills to win' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2986, option_spinner, "expected 'kills to win' option spinner list");
|
|
switch (*(long *)(profile + 0x40))
|
|
{
|
|
case 5: option_spinner->data3C.selected_index = 0; break;
|
|
case 10: option_spinner->data3C.selected_index = 1; break;
|
|
case 15: option_spinner->data3C.selected_index = 2; break;
|
|
case 25: option_spinner->data3C.selected_index = 3; break;
|
|
case 50: option_spinner->data3C.selected_index = 4; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2998, list_item, "expected 'teams' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3000, option_spinner, "expected 'teams' option spinner list");
|
|
switch (profile[0x1C])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; return TRUE;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
|
|
boolean playlist_profile_initialize_ctf_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2797, widget->type == 3, "expected column list for multiplayer game settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2805, list_item, "expected 'assault' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2807, option_spinner, "expected 'assault' option spinner list");
|
|
switch (profile[0x4C])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; break;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2816, list_item, "expected 'single flag' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2818, option_spinner, "expected 'single flag' option spinner list");
|
|
switch (*(long *)(profile + 0x50))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 0x708: option_spinner->data3C.selected_index = 1; break;
|
|
case 0xE10: option_spinner->data3C.selected_index = 2; break;
|
|
case 0x1518: option_spinner->data3C.selected_index = 3; break;
|
|
case 0x2328: option_spinner->data3C.selected_index = 4; break;
|
|
case 0x4650: option_spinner->data3C.selected_index = 5; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2831, list_item, "expected 'flag must reset' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2833, option_spinner, "expected 'flag must reset' option spinner list");
|
|
switch (profile[0x4E])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; break;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2842, list_item, "expected 'flag at home to score' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2844, option_spinner, "expected 'flag at home to score' option spinner list");
|
|
switch (profile[0x4F])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; break;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2853, list_item, "expected 'captures to win' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2855, option_spinner, "expected 'captures to win' option spinner list");
|
|
switch (*(long *)(profile + 0x40))
|
|
{
|
|
case 1: option_spinner->data3C.selected_index = 0; return TRUE;
|
|
case 3: option_spinner->data3C.selected_index = 1; return TRUE;
|
|
case 5: option_spinner->data3C.selected_index = 2; return TRUE;
|
|
case 10: option_spinner->data3C.selected_index = 3; return TRUE;
|
|
case 15: option_spinner->data3C.selected_index = 4; return TRUE;
|
|
default: option_spinner->data3C.selected_index = 0; return TRUE;
|
|
}
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean playlist_profile_initialize_koth_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2883, widget->type == 3, "expected column list for multiplayer game settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2891, list_item, "expected 'moving hill' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2893, option_spinner, "expected 'moving hill' option spinner list");
|
|
switch (profile[0x4C])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; break;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2902, list_item, "expected 'score to win' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2904, option_spinner, "expected 'score to win' option spinner list");
|
|
switch (*(long *)(profile + 0x40))
|
|
{
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
case 2: option_spinner->data3C.selected_index = 1; break;
|
|
case 5: option_spinner->data3C.selected_index = 2; break;
|
|
case 10: option_spinner->data3C.selected_index = 3; break;
|
|
case 15: option_spinner->data3C.selected_index = 4; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2916, list_item, "expected 'teams' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2918, option_spinner, "expected 'teams' option spinner list");
|
|
switch (profile[0x1C])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; return TRUE;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
boolean playlist_profile_initialize_oddball_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3025, widget->type == 3, "expected column list for multiplayer game settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3033, list_item, "expected 'trait with ball' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3035, option_spinner, "expected 'trait with ball' option spinner list");
|
|
switch (*(long *)(profile + 0x54))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
case 2: option_spinner->data3C.selected_index = 2; break;
|
|
case 3: option_spinner->data3C.selected_index = 3; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3046, list_item, "expected 'trait without ball' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3048, option_spinner, "expected 'trait without ball' option spinner list");
|
|
switch (*(long *)(profile + 0x58))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
case 2: option_spinner->data3C.selected_index = 2; break;
|
|
case 3: option_spinner->data3C.selected_index = 3; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3059, list_item, "expected 'speed with ball' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3061, option_spinner, "expected 'speed with ball' option spinner list");
|
|
switch (*(long *)(profile + 0x50))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; break;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
case 2: option_spinner->data3C.selected_index = 2; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3071, list_item, "expected 'ball type' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3073, option_spinner, "expected 'ball type' option spinner list");
|
|
switch (*(long *)(profile + 0x5C))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
case 2: option_spinner->data3C.selected_index = 2; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3083, list_item, "expected 'random start' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3085, option_spinner, "expected 'random start' option spinner list");
|
|
switch (profile[0x4C])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; break;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3094, list_item, "expected 'ball spawn count' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3096, option_spinner, "expected 'ball spawn count' option spinner list");
|
|
if (*(long *)(profile + 0x60) > 0 && *(long *)(profile + 0x60) <= 16)
|
|
option_spinner->data3C.selected_index = (short)(*(long *)(profile + 0x60) - 1);
|
|
else
|
|
option_spinner->data3C.selected_index = 0;
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3121, list_item, "expected 'score to win' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3123, option_spinner, "expected 'score to win' option spinner list");
|
|
switch (*(long *)(profile + 0x40))
|
|
{
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
case 2: option_spinner->data3C.selected_index = 1; break;
|
|
case 5: option_spinner->data3C.selected_index = 2; break;
|
|
case 10: option_spinner->data3C.selected_index = 3; break;
|
|
case 15: option_spinner->data3C.selected_index = 4; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3135, list_item, "expected 'teams' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3137, option_spinner, "expected 'teams' option spinner list");
|
|
switch (profile[0x1C])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; return TRUE;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
boolean playlist_profile_initialize_player_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
long maximum_health;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3237, widget->type == 3, "expected column list for multiplayer game settings widget");
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3245, list_item, "expected 'number of lives' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3247, option_spinner, "expected 'number of lives' option spinner list");
|
|
switch (*(long *)(profile + 0x38))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
case 3: option_spinner->data3C.selected_index = 2; break;
|
|
case 5: option_spinner->data3C.selected_index = 3; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3258, list_item, "expected 'maximum health' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3260, option_spinner, "expected 'maximum health' option spinner list");
|
|
maximum_health = -5 - (long)(*(float *)(profile + 0x3C) * -10.0f);
|
|
switch (maximum_health)
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 5: option_spinner->data3C.selected_index = 1; break;
|
|
case 10: option_spinner->data3C.selected_index = 2; break;
|
|
case 15: option_spinner->data3C.selected_index = 3; break;
|
|
case 25: option_spinner->data3C.selected_index = 4; break;
|
|
case 35: option_spinner->data3C.selected_index = 5; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3273, list_item, "expected 'shields' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3275, option_spinner, "expected 'shields' option spinner list");
|
|
switch ((*(unsigned long *)(profile + 0x20) >> 3) & 1)
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 1: option_spinner->data3C.selected_index = 1; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3285, list_item, "expected 'respawn time' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3287, option_spinner, "expected 'respawn time' option spinner list");
|
|
switch (*(long *)(profile + 0x30))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 150: option_spinner->data3C.selected_index = 1; break;
|
|
case 300: option_spinner->data3C.selected_index = 2; break;
|
|
case 450: option_spinner->data3C.selected_index = 3; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3298, list_item, "expected 'respawn time growth' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3300, option_spinner, "expected 'respawn time growth' option spinner list");
|
|
switch (*(long *)(profile + 0x2C))
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 150: option_spinner->data3C.selected_index = 1; break;
|
|
case 300: option_spinner->data3C.selected_index = 2; break;
|
|
case 450: option_spinner->data3C.selected_index = 3; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3311, list_item, "expected 'odd man out' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3313, option_spinner, "expected 'odd man out' option spinner list");
|
|
switch (profile[0x28])
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; break;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3322, list_item, "expected 'invisible players' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3324, option_spinner, "expected 'invisible players' option spinner list");
|
|
switch ((*(unsigned long *)(profile + 0x20) >> 4) & 1)
|
|
{
|
|
case 0: option_spinner->data3C.selected_index = 1; break;
|
|
case 1: option_spinner->data3C.selected_index = 0; break;
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 3335, list_item, "expected 'suicide penalty' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
switch (*(long *)(profile + 0x34))
|
|
{
|
|
default: option_spinner->data3C.selected_index = 0; break;
|
|
case 0: option_spinner->data3C.selected_index = 0; break;
|
|
case 150: option_spinner->data3C.selected_index = 1; break;
|
|
case 300: option_spinner->data3C.selected_index = 2; break;
|
|
case 450: option_spinner->data3C.selected_index = 3; break;
|
|
}
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
boolean playlist_profile_change_oddball_rules(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
long selected_index;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
if (profile)
|
|
{
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2270, list_item, "expected 'trait with ball' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2272, option_spinner, "expected 'trait with ball' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x54) = 0; break;
|
|
case 1: *(long *)(profile + 0x54) = 1; break;
|
|
case 2: *(long *)(profile + 0x54) = 2; break;
|
|
case 3: *(long *)(profile + 0x54) = 3; break;
|
|
default: error(2, "unknown option selected in 'trait with ball' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2283, list_item, "expected 'trait without ball' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2285, option_spinner, "expected 'trait without ball' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x58) = 0; break;
|
|
case 1: *(long *)(profile + 0x58) = 1; break;
|
|
case 2: *(long *)(profile + 0x58) = 2; break;
|
|
case 3: *(long *)(profile + 0x58) = 3; break;
|
|
default: error(2, "unknown option selected in 'trait without ball' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2296, list_item, "expected 'speed with ball' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2298, option_spinner, "expected 'speed with ball' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x50) = 1; break;
|
|
case 1: *(long *)(profile + 0x50) = 0; break;
|
|
case 2: *(long *)(profile + 0x50) = 2; break;
|
|
default: error(2, "unknown option selected in 'speed with ball' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2308, list_item, "expected 'ball type' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2310, option_spinner, "expected 'ball type' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x5C) = 0; break;
|
|
case 1: *(long *)(profile + 0x5C) = 1; break;
|
|
case 2: *(long *)(profile + 0x5C) = 2; break;
|
|
default: error(2, "unknown option selected in 'ball type' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2320, list_item, "expected 'random start' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2322, option_spinner, "expected 'random start' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x4C] = 1; break;
|
|
case 1: profile[0x4C] = 0; break;
|
|
default: error(2, "unknown option selected in 'random start' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2331, list_item, "expected 'ball spawn count' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2333, option_spinner, "expected 'ball spawn count' option spinner list");
|
|
selected_index = option_spinner->data3C.selected_index;
|
|
if (selected_index >= 0 && selected_index <= 15)
|
|
*(long *)(profile + 0x60) = selected_index + 1;
|
|
else
|
|
error(2, "unknown option selected in 'ball spawn count' option spinner list");
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2358, list_item, "expected 'score to win' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2360, option_spinner, "expected 'score to win' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x40) = 1; break;
|
|
case 1: *(long *)(profile + 0x40) = 2; break;
|
|
case 2: *(long *)(profile + 0x40) = 5; break;
|
|
case 3: *(long *)(profile + 0x40) = 10; break;
|
|
case 4: *(long *)(profile + 0x40) = 15; break;
|
|
default: error(2, "unknown option selected in 'score to win' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2372, list_item, "expected 'teams' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2374, option_spinner, "expected 'teams' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x1C] = 1; break;
|
|
case 1: profile[0x1C] = 0; break;
|
|
default: error(2, "unknown option selected in 'teams' option spinner list"); break;
|
|
}
|
|
|
|
ui_widgets_pop_stack(widget->local_player_index);
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve editable game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
boolean playlist_profile_change_player_options(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
byte *profile;
|
|
boolean result = TRUE;
|
|
|
|
profile = (byte *)player_ui_get_edit_playlist_profile();
|
|
if (profile)
|
|
{
|
|
struct widget_instance *list_item;
|
|
struct widget_instance *option_spinner;
|
|
|
|
list_item = widget->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2483, list_item, "expected 'number of lives' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2485, option_spinner, "expected 'number of lives' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x38) = 0; break;
|
|
case 1: *(long *)(profile + 0x38) = 1; break;
|
|
case 2: *(long *)(profile + 0x38) = 3; break;
|
|
case 3: *(long *)(profile + 0x38) = 5; break;
|
|
default: error(2, "unknown option selected in 'number of lives' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2496, list_item, "expected 'maximum health' list item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2498, option_spinner, "expected 'maximum health' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(float *)(profile + 0x3C) = 0.5f; break;
|
|
case 1: *(float *)(profile + 0x3C) = 1.0f; break;
|
|
case 2: *(float *)(profile + 0x3C) = 1.5f; break;
|
|
case 3: *(float *)(profile + 0x3C) = 2.0f; break;
|
|
case 4: *(float *)(profile + 0x3C) = 3.0f; break;
|
|
case 5: *(float *)(profile + 0x3C) = 4.0f; break;
|
|
default: error(2, "unknown option selected in 'maximum health' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2511, list_item, "expected 'shields' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2513, option_spinner, "expected 'shields' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(unsigned long *)(profile + 0x20) &= ~8UL; break;
|
|
case 1: *(unsigned long *)(profile + 0x20) |= 8UL; break;
|
|
default: error(2, "unknown option selected in 'shields' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2522, list_item, "expected 'respawn time' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2524, option_spinner, "expected 'respawn time' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x30) = 0; break;
|
|
case 1: *(long *)(profile + 0x30) = 150; break;
|
|
case 2: *(long *)(profile + 0x30) = 300; break;
|
|
case 3: *(long *)(profile + 0x30) = 450; break;
|
|
default: error(2, "unknown option selected in 'respawn time' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2535, list_item, "expected 'respawn time growth' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2537, option_spinner, "expected 'respawn time growth' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x2C) = 0; break;
|
|
case 1: *(long *)(profile + 0x2C) = 150; break;
|
|
case 2: *(long *)(profile + 0x2C) = 300; break;
|
|
case 3: *(long *)(profile + 0x2C) = 450; break;
|
|
default: error(2, "unknown option selected in 'respawn time growth' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2548, list_item, "expected 'odd man out' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2550, option_spinner, "expected 'odd man out' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: profile[0x28] = TRUE; break;
|
|
case 1: profile[0x28] = FALSE; break;
|
|
default: error(2, "unknown option selected in 'odd man out' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2559, list_item, "expected 'invisible players' item");
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2561, option_spinner, "expected 'invisible players' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(unsigned long *)(profile + 0x20) |= 0x10UL; break;
|
|
case 1: *(unsigned long *)(profile + 0x20) &= ~0x10UL; break;
|
|
default: error(2, "unknown option selected in 'invisible players' option spinner list"); break;
|
|
}
|
|
|
|
list_item = list_item->next;
|
|
if (list_item)
|
|
{
|
|
option_spinner = list_item->child;
|
|
while (option_spinner && option_spinner->type != 2)
|
|
option_spinner = option_spinner->next;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 2574, option_spinner, "expected 'suicide penalty' option spinner list");
|
|
switch (option_spinner->data3C.selected_index)
|
|
{
|
|
case 0: *(long *)(profile + 0x34) = 0; break;
|
|
case 1: *(long *)(profile + 0x34) = 150; break;
|
|
case 2: *(long *)(profile + 0x34) = 300; break;
|
|
case 3: *(long *)(profile + 0x34) = 450; break;
|
|
default: error(2, "unknown option selected in 'suicide penalty' option spinner list"); break;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
error(2, "failed to retrieve editable game variant");
|
|
result = FALSE;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
boolean multiplayer_level_select(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
char automation_map_name[64];
|
|
char *map_name;
|
|
FILE *file;
|
|
struct widget_instance *level_select_screen;
|
|
struct widget_instance *level_list;
|
|
struct ui_widget_definition *definition;
|
|
long level_index;
|
|
|
|
definition = ui_widget_definition_get(widget->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1280,
|
|
definition->child_count == 1,
|
|
"expected a wrapper widget around the multiplayer level select screen");
|
|
level_select_screen = widget->child;
|
|
definition = ui_widget_definition_get(level_select_screen->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1285,
|
|
definition->type == 0 && definition->child_count == 3,
|
|
"expected the multiplayer level select screen to be a container w/ 3 children");
|
|
level_list = level_select_screen->child;
|
|
definition = ui_widget_definition_get(level_list->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1288,
|
|
definition->type == 2,
|
|
"expected a spinner list widget for 'multiplayer level list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1289,
|
|
definition->child_count == 3,
|
|
"expected 3 list items for 'multiplayer level list' widget");
|
|
level_list = widget->child->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1298,
|
|
level_list->data3C.selected_index >= 0 && level_list->data3C.selected_index < 13,
|
|
"invalid multiplayer level specified from 'multiplayer level list' list widget");
|
|
map_name = event_handler_functions.multiplayer_levels[level_list->data3C.selected_index];
|
|
file = fopen("d:\\map_automation.txt", "r");
|
|
if (file)
|
|
{
|
|
fgets(automation_map_name, sizeof(automation_map_name), file);
|
|
automation_map_name[sizeof(automation_map_name) - 1] = 0;
|
|
strtok(automation_map_name, "\n\r \t");
|
|
map_name = automation_map_name;
|
|
fclose(file);
|
|
}
|
|
main_set_multiplayer_map_name(map_name);
|
|
game_engine_override_map_name(map_name);
|
|
{
|
|
void *server = global_network_game_server_get();
|
|
if (server)
|
|
network_game_server_change_map_name(server, map_name);
|
|
}
|
|
for (level_index = 0; level_index < 13; level_index++)
|
|
{
|
|
if (!_stricmp(map_name, event_handler_functions.multiplayer_levels[level_index]))
|
|
{
|
|
saved_game_file_remember_last_used_multiplayer_map(event_handler_functions.multiplayer_levels[level_index]);
|
|
break;
|
|
}
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
struct playlist_profile_data
|
|
{
|
|
byte data[0x68];
|
|
};
|
|
|
|
struct playlist_profile_data *game_engine_get_variant_by_name(
|
|
struct playlist_profile_data *result,
|
|
char *name);
|
|
boolean playlist_profile_get(
|
|
long profile_index,
|
|
struct playlist_profile_data *profile);
|
|
boolean saved_game_file_get_path_to_enclosing_directory(
|
|
long profile_index,
|
|
char *directory_path);
|
|
|
|
boolean multiplayer_profile_set_for_game(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct playlist_profile_data profile;
|
|
char variant_name[128];
|
|
struct playlist_profile_data automation_profile;
|
|
struct playlist_profile_data empty_profile;
|
|
struct playlist_profile_data temporary_profile;
|
|
char directory_path[256];
|
|
struct widget_instance *profile_select_screen;
|
|
struct widget_instance *profile_list;
|
|
struct ui_widget_definition *definition;
|
|
long profile_index;
|
|
void *server;
|
|
FILE *file;
|
|
|
|
definition = ui_widget_definition_get(widget->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1465,
|
|
definition->child_count == 1,
|
|
"expected a wrapper widget around the multiplayer profile select screen");
|
|
profile_select_screen = widget->child;
|
|
definition = ui_widget_definition_get(profile_select_screen->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1470,
|
|
definition->type == 0 && definition->child_count == 3,
|
|
"expected the multiplayer profile select screen to be a container w/ 3 children");
|
|
profile_list = profile_select_screen->child;
|
|
definition = ui_widget_definition_get(profile_list->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1473,
|
|
definition->type == 2,
|
|
"expected a spinner list widget for 'multiplayer profile list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1474,
|
|
definition->child_count == 3,
|
|
"expected 3 list items for 'multiplayer profile list' widget");
|
|
profile_list = widget->child->child;
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 1483,
|
|
profile_list->data3C.selected_index >= 0 &&
|
|
profile_list->data3C.selected_index < (unsigned short)profile_list->generated_count,
|
|
"invalid multiplayer profile specified from 'multiplayer profile list' list widget");
|
|
profile_index = ((long *)profile_list->generated_list)[profile_list->data3C.selected_index];
|
|
if (profile_index == NONE)
|
|
{
|
|
ui_play_audio_feedback_sound(4);
|
|
return FALSE;
|
|
}
|
|
if (!(profile_index & 0x80000000))
|
|
{
|
|
display_error_deferred(31, NONE, TRUE, FALSE);
|
|
ui_play_audio_feedback_sound(4);
|
|
return FALSE;
|
|
}
|
|
if (playlist_profile_get(profile_index, &profile))
|
|
{
|
|
server = global_network_game_server_get();
|
|
if (saved_game_file_get_path_to_enclosing_directory(profile_index, directory_path))
|
|
saved_game_file_remember_last_used_multiplayer_variant_directory(directory_path);
|
|
file = fopen("d:\\variant_automation.txt", "r");
|
|
if (file)
|
|
{
|
|
fgets(variant_name, sizeof(variant_name), file);
|
|
variant_name[sizeof(variant_name) - 1] = 0;
|
|
strtok(variant_name, "\n\r \t");
|
|
memset(&empty_profile, 0, sizeof(empty_profile));
|
|
automation_profile = *game_engine_get_variant_by_name(&temporary_profile, variant_name);
|
|
if (memcmp(&automation_profile, &empty_profile, sizeof(automation_profile)))
|
|
profile = automation_profile;
|
|
fclose(file);
|
|
}
|
|
player_ui_set_game_variant(&profile);
|
|
if (server)
|
|
network_game_server_change_game_variant(server, &profile);
|
|
return TRUE;
|
|
}
|
|
error(2, "failed to retrieve user selected game variant");
|
|
return FALSE;
|
|
}
|
|
|
|
|
|
boolean solo_level_initialize_list_single_player(
|
|
struct widget_instance *widget,
|
|
struct event_record *event,
|
|
boolean *widget_deleted)
|
|
{
|
|
struct player_profile profile;
|
|
short highest_level;
|
|
short highest_difficulty;
|
|
struct ui_widget_definition *definition;
|
|
long profile_index;
|
|
long level_index;
|
|
|
|
if (player_spawn_count >= 2)
|
|
{
|
|
memset(&persistant_game_data_info, 0, sizeof(persistant_game_data_info));
|
|
solo_level_initialize_list_coop(widget, event, widget_deleted);
|
|
return TRUE;
|
|
}
|
|
|
|
profile_index = player_ui_get_active_player_profile_index(0);
|
|
memset(single_player_level_data, 0, sizeof(single_player_level_data));
|
|
if (profile_index != event_handler_functions.last_player1_profile_index)
|
|
{
|
|
memset(&persistant_game_data_info, 0, sizeof(persistant_game_data_info));
|
|
persistant_game_data_info.valid = game_state_test_persistent_storage(
|
|
persistant_game_data_info.map_name,
|
|
&persistant_game_data_info.difficulty.value,
|
|
&persistant_game_data_info.corrupted);
|
|
event_handler_functions.last_player1_profile_index = profile_index;
|
|
}
|
|
|
|
player_ui_get_active_player_profile(0, &profile);
|
|
player_profile_get_highest_completed_solo_level(&profile, &highest_level, &highest_difficulty);
|
|
for (level_index = 0; level_index < 10; level_index++)
|
|
{
|
|
unsigned long level_flags;
|
|
|
|
((struct single_player_level_entry *)single_player_level_data)[level_index].map_name =
|
|
(&event_handler_functions.map_name)[level_index];
|
|
if (profile.single_player_map_flags[level_index] || level_index == highest_level + 1 || level_index == 0)
|
|
{
|
|
level_flags = (char)profile.single_player_map_flags[level_index];
|
|
((struct single_player_level_entry *)single_player_level_data)[level_index].unknown5 = (level_flags >> 1) & 1;
|
|
((struct single_player_level_entry *)single_player_level_data)[level_index].available = TRUE;
|
|
((struct single_player_level_entry *)single_player_level_data)[level_index].unknown6 = (level_flags >> 2) & 1;
|
|
((struct single_player_level_entry *)single_player_level_data)[level_index].unknown7 = (level_flags >> 3) & 1;
|
|
}
|
|
}
|
|
|
|
definition = ui_widget_definition_get(widget->definition_tag_index);
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 603,
|
|
definition->type == 2,
|
|
"expected a spinner list widget for 'solo level list' widget");
|
|
match_vassert("c:\\halo\\SOURCE\\interface\\ui_widget_event_handler_functions.c", 604,
|
|
definition->child_count == 3,
|
|
"expected 3 list items for 'solo level list' widget");
|
|
widget->generated_list = single_player_level_data;
|
|
widget->generated_count = 10;
|
|
widget->data3C.selected_index = PIN(player_ui_get_last_single_player_level_played(0), 0, 9);
|
|
|
|
if (persistant_game_data_info.valid == TRUE)
|
|
{
|
|
persistant_game_data_info.map_name[0xFF] = 0;
|
|
for (level_index = 0; level_index < 10; level_index++)
|
|
{
|
|
if (_stricmp(persistant_game_data_info.map_name,
|
|
(&event_handler_functions.map_name)[level_index]) == 0)
|
|
{
|
|
struct persistent_game_difficulty difficulty = persistant_game_data_info.difficulty;
|
|
persistant_game_data_info.map_index = (byte)level_index;
|
|
if (difficulty.value < 0)
|
|
persistant_game_data_info.difficulty.value = 0;
|
|
else
|
|
{
|
|
persistant_game_data_info.difficulty.value = 3;
|
|
if (difficulty.value <= 3)
|
|
persistant_game_data_info.difficulty.value = difficulty.value;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
if (level_index != 10)
|
|
return TRUE;
|
|
persistant_game_data_info.valid = FALSE;
|
|
return TRUE;
|
|
}
|
|
else if (persistant_game_data_info.corrupted == TRUE)
|
|
{
|
|
profile_index = player_ui_get_active_player_profile_index(0);
|
|
if (profile_index != NONE)
|
|
{
|
|
if (event_handler_functions.unknown3C == NONE)
|
|
{
|
|
display_error_deferred(39, NONE, TRUE, FALSE);
|
|
event_handler_functions.unknown3C = profile_index;
|
|
}
|
|
else
|
|
event_handler_functions.unknown3C = NONE;
|
|
}
|
|
}
|
|
return TRUE;
|
|
}
|