Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] include foone's classic patches #48

Open
willbr opened this issue Aug 5, 2023 · 7 comments
Open

[Feature] include foone's classic patches #48

willbr opened this issue Aug 5, 2023 · 7 comments

Comments

@willbr
Copy link

willbr commented Aug 5, 2023

It would be nice to include all the classic patches as options

https://github.com/foone/3dmmMagicPatcher/blob/master/patches.json

  • Run multiple copies of 3DMM at once
  • Keep playing in the background
  • Wireframe Mode
  • Flat shaded Mode
  • Don't adjust system volume
  • Don't adjust key repeat
  • Skip loading screens
  • No startup sound
  • No studio sounds
  • No scene fades
@willbr
Copy link
Author

willbr commented Aug 5, 2023

adjustable fps would also be fun

#define kfps 6 // frames per second for playback and recording

Why should this be hardcoded?

@willbr
Copy link
Author

willbr commented Aug 5, 2023

Here's where it checks for multiple copies

// Only allow one copy of 3DMM to run at a time:
if (_FAppAlreadyRunning())
{
_TryToActivateWindow();
_fDontReportInitFailure = fTrue;
goto LFail;
}

@willbr
Copy link
Author

willbr commented Aug 6, 2023

MS Home Logo is initilised here:

if (!_FDisplayHomeLogo())
{
_FGenericError(PszLit("_FDisplayHomeLogo"));
_fDontReportInitFailure = fTrue;
goto LFail;
}
tsHomeLogo = TsCurrent();

if (!_FDisplayHomeLogo())
{
_FGenericError(PszLit("_FDisplayHomeLogo"));
_fDontReportInitFailure = fTrue;
goto LFail;
}
tsHomeLogo = TsCurrent();

Splash Screen and Sound are here:

if (!_FDisplayHomeLogo())
{
_FGenericError(PszLit("_FDisplayHomeLogo"));
_fDontReportInitFailure = fTrue;
goto LFail;
}
tsHomeLogo = TsCurrent();

while (TsCurrent() - tsSplashScreen < kdtsSplashScreen)
; // spin until splash screen has been up long enough
Pkwa()->SetMbmp(pvNil); // bring down splash screen

@willbr
Copy link
Author

willbr commented Aug 6, 2023

skip to the studio?

// If the user specified a doc on the command line, go straight
// to the studio. Otherwise, start the building.
GetPortfolioDoc(&fniUserDoc);
if (fniUserDoc.Ftg() == ftgNil)
{
// Startup place depends on whether this is the user's first time in.
if (!FGetProp(kpridFirstTimeUser, &fFirstTimeUser))
{
_FGenericError(PszLit("FGetProp: kpridFirstTimeUser"));
_fDontReportInitFailure = fTrue;
goto LFail;
}
if (!FSetProp(kpridBuildingGob, (fFirstTimeUser ? kgobCloset : kgobLogin)))
{
_FGenericError(PszLit("FSetProp: kpridBuildingGob"));
_fDontReportInitFailure = fTrue;
goto LFail;
}
if (!_FInitBuilding())
{
_FGenericError(PszLit("_FInitBuilding"));
_fDontReportInitFailure = fTrue;
goto LFail;
}
}
else
{
if (!FSetProp(kpridBuildingGob, kgobStudio1))
{
_FGenericError(PszLit("FSetProp: kpridBuildingGob"));
_fDontReportInitFailure = fTrue;
goto LFail;
}
if (!_FInitStudio(&fniUserDoc, fFalse))
{
_FGenericError(PszLit("_FInitStudio"));
_fDontReportInitFailure = fTrue;
goto LFail;
}
}

@willbr
Copy link
Author

willbr commented Aug 6, 2023

volume fade

if (Iscen() == (Cscen() - 1))
{
// since this is the last scene/last frame, we want to
// fade out music, by setting _vlmOrg we turn off rendering and fade out
// music until VlmCur is 0, at which point we go into stop state.
if (!vpsndm->FPlayingAll()) // there are no sounds playing
SetFStopPlaying(fTrue); // there is nothing to fade
else
{
_vlmOrg = vpsndm->VlmCur(); // get the current volume
if ((0 == _vlmOrg)) // if there is volume to fade with
SetFStopPlaying(fTrue); // there is nothing to fade
}
return (fTrue);
}

@willbr
Copy link
Author

willbr commented Aug 17, 2023

adjustable fps would also be fun

#define kfps 6 // frames per second for playback and recording

Why should this be hardcoded?

looking at the notes for 3DMM FPS, apprently, there was also a bug causing Win98/XP to have different framerates.

3DMM FPS 0.12
This utility, written by Travis Wells, lets you modify the rate at which 3DMM operates. By default, it sets it to run 4x faster than normal. You can use this utility to create very smooth animations, or even to emulate Win98/XP framerates. Download version 0.12 here (30.5 KB RAR).
https://dragonfilms.thegerf.net/utility.html

@willbr
Copy link
Author

willbr commented Aug 30, 2023

We can disable the studio and building transistions by ignore calls to SetGft.

Adding a return statement seems to work so far.

3DMMForever/kauai/src/appb.cpp

Lines 1180 to 1206 in 79b3010

/***************************************************************************
Set the transition to apply the next time we do offscreen fast updating.
gft is the transition type. The meaning of lwGft depends on the
transition. dts is how long each phase of the transition should take.
pglclr is the new palette (may be nil). acr is an intermediary color
to transition to. If acr is clear, no intermediary transition is done.
If pglclr is not nil, this AddRef's it and holds onto it until after
the transition is done.
***************************************************************************/
void APPB::SetGft(long gft, long lwGft, ulong dts, PGL pglclr, ACR acr)
{
AssertThis(0);
AssertNilOrPo(pglclr, 0);
AssertPo(&acr, 0);
_gft = gft;
_lwGft = lwGft;
_dtsGft = dts;
ReleasePpo(&_pglclr);
if (pvNil != pglclr)
{
_pglclr = pglclr;
_pglclr->AddRef();
}
_acr = acr;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant