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

rename 3dmm classes #51

Open
willbr opened this issue Aug 9, 2023 · 6 comments
Open

rename 3dmm classes #51

willbr opened this issue Aug 9, 2023 · 6 comments

Comments

@willbr
Copy link

willbr commented Aug 9, 2023

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
Copy link
Author

willbr commented Aug 12, 2023

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

#define kclsDLG 'DLG'

/***************************************************************************
Run-time class determination support. Each class, FOO, that uses this
needs a constant, kclsFOO, defined somewhere (preferably with the class
declaration) and needs FOO_PAR defined to be the class' parent class.
kclsFOO should be 'FOO' if FOO is at most 4 characters long and should
consist of a unique string of 4 lowercase characters if FOO is longer
than 4 characters. Eg, kclsSCEG is 'SCEG', but kclsSTUDIO is 'stdo'.
RTCLASS_DEC goes in the class definition.
RTCLASS(FOO) goes in the .cpp file.
***************************************************************************/

@willbr
Copy link
Author

willbr commented Aug 13, 2023

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
Copy link
Author

willbr commented Aug 13, 2023

Some of them are also defined in soc.h

For example MVIE

#define kctgMvie 'MVIE'

3DMMForever/inc/soc.h

Lines 36 to 87 in 79b3010

#define kctgActn 'ACTN'
#define kctgActr 'ACTR'
#define kctgBds 'BDS '
#define kctgBkgd 'BKGD'
#define kctgBmdl 'BMDL'
#define kctgBpmp 'BPMP'
#define kctgCam 'CAM '
#define kctgGgae 'GGAE'
#define kctgGldc 'GLDC' // REVIEW *****: obsolete
#define kctgGgcm 'GGCM'
#define kctgGllt 'GLLT'
#define kctgGlms 'GLMS' // motion-match sounds (under ACTN)
#define kctgGgcl 'GGCL'
#define kctgGlxf 'GLXF'
#define kctgMsnd 'MSND'
#define kctgMtrl 'MTRL'
#define kctgCmtl 'CMTL'
#define kctgMvie 'MVIE'
#define kctgPath 'PATH'
#define kctgPict 'PICT'
#define kctgScen 'SCEN'
#define kctgSnd 'SND '
#define kctgSoc 'SOC '
#define kctgTbox 'TBOX'
#define kctgTdf 'TDF '
#define kctgTdt 'TDT '
#define kctgTmpl 'TMPL'
#define kctgGlpi 'GLPI'
#define kctgGlbs 'GLBS'
#define kctgInfo 'INFO'
#define kctgFrmGg 'GGFR'
#define kctgStartGg 'GGST'
#define kctgThumbMbmp 'THUM'
#define kctgGltm 'GLTM'
#define kctgGlbk 'GLBK'
#define kctgGlcg 'GLCG'
#define kctgBkth 'BKTH' // Background thumbnail
#define kctgCath 'CATH' // Camera thumbnail
#define kctgTmth 'TMTH' // Template thumbnail (non-prop)
#define kctgPrth 'PRTH' // Prop thumbnail
#define kctgAnth 'ANTH' // Action thumbnail
#define kctgSvth 'SVTH' // Sounds (voice) thumbnail
#define kctgSfth 'SFTH' // Sounds (FX) thumbnail
#define kctgSmth 'SMTH' // Sounds (midi) thumbnail
#define kctgMtth 'MTTH' // Materials thumbnail
#define kctgCmth 'CMTH' // Custom materials thumbnail
#define kctgTsth 'TSTH' // 3d shape thumbnail
#define kctgTfth 'TFTH' // 3d font thumbnail
#define kctgTcth 'TCTH' // Text color thumbnail
#define kctgTbth 'TBTH' // Text background thumbnail
#define kctgTzth 'TZTH' // Text size thumbnail
#define kctgTyth 'TYTH' // Text style thumbnail

@willbr
Copy link
Author

willbr commented Aug 13, 2023

Chunky file constants are here:

/***************************************************************************
Chunky file constants.
***************************************************************************/
// convenient to indicate none (chunk places no restrictions on these)
#define cnoNil 0xFFFFFFFF
#define ctgNil 0
#define chidNil 0xFFFFFFFF
#define kctgFramework 'FRAM' // for chunky file creator
#define kctgMacro 'GLCM'
#define kctgGl 'GL '
#define kctgAl 'AL '
#define kctgGg 'GG '
#define kctgAg 'AG '
#define kctgGst 'GST '
#define kctgAst 'AST '
#define kctgRsc 'RSC '
#define kctgMeta 'META'
#define kctgMacPict 'MPIC'
#define kctgPictNative MacWin(kctgMacPict, kctgMeta)
#define kctgGraphic 'GRAF'
#define kctgScript 'GLOP'
#define kctgMask 'MASK'
#define kctgMbmp 'MBMP'
#define kctgMidi 'MIDS'
#define kctgWave 'WAVE'
#define kctgChkCmp 'CHMP'
#define kctgColorTable 'GLCR'
#define kctgCursor 'GGCR'
#define kctgText 'TEXT'
#define kctgTxtProps 'GLMP'
#define kctgTxtPropArgs 'AGPA'
#define kctgRichText 'RTXT'
#define kctgScriptStrs 'GSTX'
#define kctgStringReg 'GSTR'

@willbr
Copy link
Author

willbr commented Aug 13, 2023

And I think these are the rest:

#define kctgChed 'CHED'

/***************************************************************************
Chunky file constants.
***************************************************************************/
#define kctgGokd 'GOKD'
#define kctgAnimation 'GLSC'
#define kctgHelpTopic 'HTOP'
#define kctgTile 'TILE'
#define kctgEditControl 'EDIT' // help balloon edit control tag
#define kctgFill 'FILL'
#define kctgVideo 'VIDE'

#define kctgZbmp 'ZBMP'

#define kctgChelp 'CHLP'

@willbr
Copy link
Author

willbr commented Aug 13, 2023

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

// forward declarations
typedef class WOKS *PWOKS;
typedef class SCEG *PSCEG;
typedef class GOK *PGOK;
typedef class HBAL *PHBAL;
typedef struct HTOP *PHTOP;

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