foone / 3DMMForever

A modernized version of the Microsoft 3D Movie Maker release
MIT License
529 stars 24 forks source link

rename 3dmm classes #51

Open willbr opened 1 year ago

willbr commented 1 year ago

I really like Foone's suggestion for more verbose class names.

Names like MaskedBitmapMBMP to replace MBMP.

https://docs.google.com/spreadsheets/d/1SXMoCPYxwT-2_4j5rGNoWXL4Gf8bzkKoBGnbFJUsmDE/edit?pli=1#gid=1273342821

Foone β€” 27/06/2022 21:18 ok I finished up the missing bits. groups are confusing. and I may have missed some internal structs, as I was basically adding them on an ad-hoc basis. But this seems like it'd rename most of the classes to be way more understandable.

bruxisma β€” 27/06/2022 22:07 These newer names are way nicer πŸ™‚

Frank Weindel β€” 28/06/2022 03:49 Just when I was getting used to the current names πŸ˜„ My only request is not to change the names of the classes that are serializable as chunky chunks MBMP, ZBMP, BMDL, TMAP, etc

bruxisma β€” 28/06/2022 06:41 Those could always be declared as type aliases using MBMP = MaskedBitmap

Foone β€” 28/06/2022 15:33 that's a good idea. although there's structs for each of the classes that are serializable, which I've called WhateverClassFile, which is used to write them out. I could leave those named after chunks, or maybe incorporate both names? like MaskedBitmapMBMP?

Frank Weindel β€” 29/06/2022 03:42 @Foone That sounds good to me. It may look a bit verbose but I'd find the emphasis helpful

Foone β€” 29/06/2022 16:52 sounds good. I'll go back through and rename 'em.

willbr commented 1 year ago

Run-time class determination support, expects class names to be 4 characters or less.

I tried to rename DLG to Dialog and it broke the macro RTCLASS

https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2015?view=msvc-170

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/kauai/src/dlg.h#L52

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/kauai/src/base.h#L20-L30

willbr commented 1 year ago

In dlg.h the following seems to work so far.

#define Dialog_PAR GG
#define kclsDialog 'DLG'

kclsDialog is a long defined by the macro RTCLASS

willbr commented 1 year ago

Some of them are also defined in soc.h

For example MVIE

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/inc/soc.h#L53-L53

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/inc/soc.h#L36-L87

willbr commented 1 year ago

Chunky file constants are here:

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/kauai/src/framedef.h#L144-L179

willbr commented 1 year ago

And I think these are the rest:

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/kauai/tools/ched.h#L19

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/kauai/src/kiddef.h#L42-L51

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/bren/inc/bren.h#L80

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/kauai/tools/chelp.h#L30

willbr commented 1 year ago

the suggested namespaces will need to interact with the foward declarations here kidframe.h

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/kauai/src/kidframe.h#L22-L27