b@`8  _ ?.text  .rdata  @-.data.@.sdata0.sbss0.bssk if (PadStatus & PADLleft) { AmbientRed -= colourChange; AmbientLightChanged = TRUE; } if (PadStatus & PADLright) { AmbientRed += colourChange; AmbientLightChanged = TRUE; } if (PadStatus & PADLup) { AmbientGreen += colourChange; AmbientLightChanged = TRUE; } if (PadStatus & PADLdown) { AmbientGreen -= colourChange; AmbientLightChanged = TRUE; } if (PadStatus & PADRup) { AmbientBlue += colourChange; AmbientLightChanged = TRUE; } if (PadStatus & PADRdown) { AmbientBlue -= colourChange; AmbientLightChanged = TRUE; } } void HandleFoggingControls (void) { int fogChange; // rate of change of fog parameters // deal with overall lighting mode if (PadStatus & PADR2) { if (framesSinceLastLightModeChanged > 20) { // flip: either zero or one OverallLightingMode = 1 - OverallLightingMode; // only two valid values assert(OverallLightingMode == 0 || OverallLightingMode == 1); framesSinceLastLightModeChanged = 0; LightingModeChanged = TRUE; } } if (PadStatus & PADselect) // how fast fog paramters change fogChange = 20; else fogChange = 2; // first six: L-pad directional plus L1/L2: // alter the fog-in-distance colour if (PadStatus & PADLleft) { FoggingData.rfc -= fogChange; FoggingChanged = TRUE; } if (PadStatus & PADLright) { FoggingData.rfc += fogChange; FoggingChanged = TRUE; } if (PadStatus & PADLup) { FoggingData.gfc += fogChange; FoggingChanged = TRUE; } if (PadStatus & PADLdown) { FoggingData.gfc -= fogChange; FoggingChanged = TRUE; } if (PadStatus & PADL1) { FoggingData.bfc += fogChange; FoggingChanged = TRUE; } if (PadStatus & PADL2) { FoggingData.bfc -= fogChange; FoggingChanged = TRUE; } // four R-pad directional controls: // change values of 'dqa' and 'dqb' fog parameters if (PadStatus & PADRup) { FoggingData.dqa -= fogChange; FoggingChanged = TRUE; } if (PadStatus & PADRdown) { FoggingData.dqa += fogChange; FoggingChanged = TRUE; } if (PadStatus & PADRleft) { FoggingData.dqb += fogChange; FoggingChanged = TRUE; } if (PadStatus & PADRright) { FoggingData.dqb -= fogChange; FoggingChanged = TRUE; } // start: make for colour fully white or black if (PadStatus & PADstart) { if (FoggingData.rfc == 255 // if white && FoggingData.gfc == 255 && FoggingData.bfc == 255) { FoggingData.rfc = 0; // make black FoggingData.gfc = 0; FoggingData.bfc = 0; FoggingChanged = TRUE; } else // else make white { FoggingData.rfc = 255; FoggingData.gfc = 255; FoggingData.bfc = 255; FoggingChanged = TRUE; } } } void HandleViewControls (void) { int viewChange; // rate of change of viewpoint if (PadStatus & PADselect) // how fast viewpoint changes viewChange = 10; else viewChange = 1; // start: choose next view mode if (PadStatus & PADstart) { if (numberFramesSinceViewModeChange > 10) { if (ViewMode == MAX_VIEW_MODE) ViewMode = 0; else ViewMode++; numberFramesSinceViewModeChange = 0; } } switch(ViewMode) { case GENERAL_DISTORTION: // Rup/Rdown: change projection distance if (PadStatus & PADRup) { ProjectionDistance += 10 * viewChange; ProjectionChanged = TRUE; } if (PadStatus & PADRdown) { ProjectionDistance -= 10 * viewChange; ProjectionChanged = TRUE; } // Ldown/Lup: change the 'rz' distortion if (PadStatus & PADLup) { TheMainView.rz += 10 * viewChange; ViewChanged = '($_ !d ! @$$$$σ ! !(!0x $'!(!0!8$$ S !  @$<&$<"<0eB$<"<0eB$<" !(p$$ $$$Ȕ     O @#b!b!# !<c$ ! ! !(0!00 !0 ! <ъ $z S ! !  H !@7$!(!08!88 !8 !  ! b*@&P&&*@&P'$(@($@$ UU> 4; TheMainView.vpy += (viewChange * direction.vy) >> 4; TheMainView.vpz += (viewChange * direction.vz) >> 4; ViewChanged = TRUE; } if (PadStatus & PADRdown) { direction.vx = TheMainView.vrx - TheMainView.vpx; direction.vy = TheMainView.vry - TheMainView.vpy; direction.vz = TheMainView.vrz - TheMainView.vpz; TheMainView.vpx -= (viewChange * direction.vx) >> 4; TheMainView.vpy -= (viewChange * direction.vy) >> 4; TheMainView.vpz -= (viewChange * direction.vz) >> 4; ViewChanged = TRUE; } } break; case CHANGE_SUPER: // Rup: view from next object up if (PadStatus & PADRup) { if (numberFramesSinceViewpointChange > 20) { if (MainViewObjectID >= 0) // Not world or ship { // get next lowest id of an existing object MainViewObjectID = FindNextLowestObjectID(MainViewObjectID); assert(MainViewObjectID >= 0 && MainViewObjectID < MAX_OBJECTS); // actually set view 'super' TheMainView.super = &ObjectArray[MainViewObjectID].coord; ViewChanged = TRUE; numberFramesSinceViewpointChange = 0; } } } // Rdown: view from next object down if (PadStatus & PADRdown) { if (numberFramesSinceViewpointChange > 20) { if (MainViewObjectID >= 0) // Not world or ship { // get next highest id of an existing object MainViewObjectID = FindNextHighestObjectID(MainViewObjectID); assert(MainViewObjectID >= 0 && MainViewObjectID < MAX_OBJECTS); // actually set view 'super' TheMainView.super = &ObjectArray[MainViewObjectID].coord; ViewChanged = TRUE; numberFramesSinceViewpointChange = 0; } } } // R1: toggle WORLD/player's ship/objects // circular list: (WORLD, player's ship, objects) if (PadStatus & PADR1) { if (numberFramesSinceViewpointChange > 20) { if (MainViewObjectID == -1) // WORLD { MainViewObjectID = -2; // set to player's ship TheMainView.super = &PlayersShip.coord; } else if (MainViewObjectID == -2) // player's ship { // set to first existing object MainViewObjectID = FindNextHighestObjectID(-1); assert(MainViewObjectID >= 0 && MainViewObjectID < MAX_OBJECTS); TheMainView.super = &ObjectArray[MainViewObjectID].coord; } else { assert(MainViewObjectID >= 0 && MainViewObjectID < MAX_OBJECTS); MainViewObjectID = -1; // set to world TheMainView.super = WORLD; } // note that view had changed ViewChanged = TRUE; numberFramesSinceViewpointChange = 0; } } // Ldown: force return to WORLD view if (PadStatus & PADLdown) { if (numberFramesSinceViewpointChange > 20) { MainViewObjectID = -1; // set to world TheMainView.super = WORLD; // note that view had changed ViewChanged = TRUE; numberFramesSinceViewpointChange = 0; } } break; default: // should never get here assert(FALSE); } #if 0 // OLD // these six: L-pad directional plus L1/L2: // alter the 'vpz' viewpoint part of GsRVIEW2 // SHOULD CHANGE THIS: // can set a direction and a magnitude // hence get vp point coord (scale unit direction vector) if (PadStatus & PADLleft) { TheMainView.vpx += viewChange; ViewChanged = TRUE; } if (PadStatus & PADLright) { TheMainView.vpx -= viewChange; ViewChanged = TRUE; } if (PadStatus & PADLup) { TheMainView.vpy += viewChange; 3D Demo By: Ed Federmeyer A               }f (PadStatus & PADRleft) { if (numberFramesSinceViewpointChange > 20) { // get next lowest id of an existing object MainViewObjectID = FindNextLowestObjectID(MainViewObjectID); // actually set view 'super' TheMainView.super = &ObjectArray[MainViewObjectID].coord; ViewChanged = TRUE; numberFramesSinceViewpointChange = 0; } } if (PadStatus & PADRright) { if (numberFramesSinceViewpointChange > 20) { // get next highest id of an existing object MainViewObjectID = FindNextHighestObjectID(MainViewObjectID); // actually set view 'super' TheMainView.super = &ObjectArray[MainViewObjectID].coord; ViewChanged = TRUE; numberFramesSinceViewpointChange = 0; } } // L1 and R1: toggle WORLD/player's ship/objects // circular list: (WORLD, player's ship, if (PadStatus & PADL1 && PadStatus & PADR1) { if (numberFramesSinceViewpointChange > 20) { if (MainViewObjectID == -1) // WORLD { MainViewObjectID = -2; // set to player's ship TheMainView.super = &PlayersShip.coord; } else if (MainViewObjectID == -2) // player's ship { // set to first existing object MainViewObjectID = FindNextHighestObjectID(-1); TheMainView.super = &ObjectArray[MainViewObjectID].coord; } else { assert(MainViewObjectID >= 0 && MainViewObjectID < MAX_OBJECTS); MainViewObjectID = -1; // set to world TheMainView.super = WORLD; } // note that view had changed ViewChanged = TRUE; numberFramesSinceViewpointChange = 0; } } #endif } void HandleObjectSelection (void) { // select and R1/R2: select next submode if (PadStatus & PADR1 && PadStatus & PADselect) { if (framesSinceLastSelection > 12) { if (ObjectSelectionMode == MAX_OBJECT_SELECTION_MODE) ObjectSelectionMode = 0; else ObjectSelectionMode++; framesSinceLastSelection = 0; } } if (PadStatus & PADR2 && PadStatus & PADselect) { if (framesSinceLastSelection > 12) { if (ObjectSelectionMode == 0) ObjectSelectionMode = MAX_OBJECT_SELECTION_MODE; else ObjectSelectionMode--; framesSinceLastSelection = 0; } } // R1 alone: select next object up if (PadStatus & PADR1 && ((PadStatus & PADselect) == 0) ) { if (framesSinceLastSelection > 5) { UnHighlightObject( &ObjectArray[SelectedObject]); SelectedObject = FindNextHighestObjectID (SelectedObject); HighlightObject( &ObjectArray[SelectedObject]); framesSinceLastSelection = 0; } } // R2 alone: select next object down if (PadStatus & PADR2 && ((PadStatus & PADselect) == 0) ) { if (framesSinceLastSelection > 5) { UnHighlightObject( &ObjectArray[SelectedObject]); SelectedObject = FindNextLowestObjectID (SelectedObject); HighlightObject( &ObjectArray[SelectedObject]); framesSinceLastSelection = 0; } } // check that selected ID is valid before indexing array assert(SelectedObject >= 0); assert(SelectedObject < MAX_OBJECTS); switch(ObjectSelectionMode) { case MOVE_OBJECT: HandleMovingAnObject(); break; case CHANGE_SPIN: HandleChangingAnObjectsSpin(); break; case CHANGE_DISPLAY: HandleChangingAnObjectsDisplay(); break; case OBJECT_VIEWS: // options: external view (above, left, front, etc) // circling: which plane, radius, speed, etc // flyby; director's cut // if view super not world, set to world if (TheMainView.super != WORLD) { TheMainView.super = WORLD; ViewChanged = TRUE; retur p `@L8C+FtG IUY> Z0( (H l@8p 8 8 8KF(H (F0 tH0FPHP-E<EHMKSFS(H[F0[4H0-E<EMHcK@iFiHrF0rH0\FP|HPFpHp` FH FH FhH FH-E<EcHK@- E< EHK E4 E EP E l ET ET EH%K`- F-8H- E< E%H:K :HDK DHMK MHVK VH_K _HhK hHqK qHzK zHK H main.cmainInitialiseViewInitialiseLightsgcc2_compiled.__gnu_compiled_cpad.cPadInitPadReadbox.cbox_initbox_init_objectbox_executebox_local_updatebox_world_updatebox_drawbox_drawboxbox_fixupcubetmd.cstartup.sst_regskip_gpskip_ibssclritskip_ispskip_fpskip_ihcall_mainvideo.cSetVideoModesym_usr.sstdef1.sstdef2.sstdef3.sstdef4.sstdef5.sstdef6.sstdef7.sstdef8.slongjmpputcharGsSetLightModeGsScaleScreenSsSeqSetRitardandostrcpy__mainKanjiFntOpenSsUtGetVVollogbcmpsqrtbox_drawboxsetjmpcoshKanjiFntClose__eqdf2ResetGraphGetTPageGsSwapDispBuffdeleteSsUtPitchBendprintf_fdataLoadTestsprintf2ExecStartRCnt__divsf3SetLightMatrix_get_errnoGsSetFogParamSsIsEosGsSetLightMatrixmemmoveeprolGsSetAmbientSsUtKeyOn__gtdf2atolSsSeqSetNextmath_errnoceilCdReadbox_world_updatefloorInitialiseView_etextgetsbsearch_gpKrom2RawAdd2qsortGsSetDrawBuffOffsetformatprintf2GsGetLsgetcApplyMatrixSVmemcpyGsLIGHTWSMATRIX__floatsidf__ltdf2box_init_objectSsSeqReplaySsUtKeyOff_err_mathtolowerPopMatrixmallocrot_countdownldexpGsInitGraphedataSsSeqStopSsSetMuteGsSortLinestrtoulnextfilePutDrawEnvWorldOTLoadImage_sys_init_stacksizeCdPlaybox_drawSsGetMVolSsSetMVolSsUtGetReverbTypeGsIDMATRIX__extendsfdf2PadRead__adddf3GsLSMATRIXlseekGsSetProjectionbzeroPutDispEnvGsInit3DPSDOFSYSsSetTickModestrtolbb0EnterCriticalSectionSsGetSerialAttrGsLIGHT_MODEGsGetWorkBaseSsSetSerialVolGsInitFixBg16renamestrrchrGsSetOrign__fixdfsicallocKanjiFntPrintstrtoddirectionGsMapModelingDataGsSetRefView2GsIDMATRIX2writePSDCNTatof__ledf2strcatPSDOFSXActiveBuff_sys_init_fpendFntOpenGsSortObject4modfSsUtSetReverbTypefmodcosStoreImageSetVideoModeMoveImagetanhetextmemchrview_sys_init_bss_flagSsSeqSetVolGsSortBoxFill_ftext_startGsDefDispBuffstrstrGsGetLwsinrandatan2readstrncmp_sys_init_spaxispowstrncpysinhKrom2Timlog10FlushCacheGsWSMATRIXreallocApplyMatrixFntLoadGsSetClipGsSetFlatLightbcopystrtok__negdf2bb1memcmp_sys_init_heapbaseGsSetView2ResetRCnt__divdf3strncatRotMatrixZSetDispMask_dbl_shiftSsSetTempoCdReadSync__muldf3cube_tmd_lengthSsSeqCloseExitCriticalSectionGsLIOFFPadInitSsSeqPauseScaleMatrixLTestCardCdReadFileGsSortGLineSsUtReverbOffGpuOutputPacketGsSetOffsetmemsetmainGetRCntsrandApplyMatrixLVbox_initgetchar__truncdfsf2GsDISPENVKanjiFntFlushClearImageSsSeqPlayGsGetActiveBuffexpputc__mulsf3GsSortOtstrcmpCdSearchFiletanGsDRAWENVGsSetWorkBase_sys_ramsizeFntPrintGsGetLws__nedf2CdReadExecSsUtSetReverbDelayGsSortFixBg16atansprintfcube_tmd_datalightsstrcspnbox_arrayasinInitialiseLightsVSyncCallbackGsOUT_PACKET_PInitHeapSsUtSetReverbFeedbackWorldOT_TAGGsClearOtCompMatrixDrawSyncGsInitCoordinate2GsGetTimInfoGsDrawOtGsSortSpriteVSyncGetPadBufRotMatrixGsLMODEbox_fixupGsSetClip2DGetVideoModeFntFlush_sys_init_gpGsSortClear_edataScaleMatrixPushMatrix_endPSDIDXbox_executeMulMatrix0GsTONGsLIGNRKrom2RawAddCLIP2SsGetMuteTransMatrixMulMatrixgteMIMefuncexitSsVabTransferSsVabCloseSsSeqOpenSsUtReverbOnGsSortFastSpriteatoiSsUtAllKeyOffSsSetSerialAttrGsDISPONprojection_distancefirstfilestrspnSsUtSetVVolLoadstrlenSsSeqGetVolopenSsSeqSetAccelerandotoupper__gedf2RotMatrixXTransposeMatrixSsPlayBackSsUtChangePitchstrchr_sys_init_heapsizeGetClutacosGsSetDrawBuffCliphypot__subdf3GsLinkObject4_fbssRotMatrixYSsGetSerialVolclosefrexp__addsf3GsNDIVPOSITIONrowstrpbrkbox_local_updatefreeGsSetLsMatrixSsUtSetReverbDepthM Mc c  &  %*  %:4  :D:" DM<# MV>$ V_@%  _hB&  hqD'  qzF(  zH)  J* HUA7A$%A;A-$QA@<AG| AN,cA[AgtAk3ApAu F UA AAPA\`AdF0tATA$lbA6A; A?؃AJ FW<Aa|Af Al5AsxpAQA(AA AA@A3A A0;A`Ax/A>A  A@A>A AoAA(.A)L?A4\ A<AH|RAPAZAi`3Ao@AvAL6A PA1A1AhA=AAAAT6AhAAA9A8/A3 -A;FCLANpA[,AdLAo A{@cAA87AF0A`;AAFP4ATA>A\fAAdMA<A(A,d7A1A:&ACL<AJAW< A[T>Ae`*AsAXA8AAA8dAATAKAe<A0eAFP A @=A- A6 `cAL 0eX L&Ab Am LAv A |)A (&A A hA A A -A F hA DA UA @A A A A% A0 }A5 aA< \FPH AS XAY -Aa /Am ?As A} A A xA l A ]A UA A cA A 1A A 0A =A % /A/ ?A6 AB .AG \=AN $RAZ X/A_ 5As 3A{ A A A MA A <A `A tA |A `A A @A <A A (A A/ /A5 LA; AD tbAK <=AT X >A` Fpq $ Av A cA