Welcome, Guest | Home | Search | Login | Register
Author Mac port of "Attack of the PETSCII Robots"... (Read 39551 times)
lauland
512 MB
*****
Posts: 674
Symtes 7 Mewconer!
View Profile
on: April 24, 2024, 19:10

(As discussed in my "Next project ideas?" posts...)

Strangely, there is no Mac version of this!
https://www.the8bitguy.com/category/the-8-bit-guy/petscii-robots/

The 8-bit guy is very cool, and truly a living asset to the retro community, but I think I detect very faint anti-apple sentiments sometimes in what he says...which may be the reason?

There seem to have been a few different efforts for a Mac port, but none were ever completed.  Here's mine:

https://github.com/laulandn/PETSCIIRobotsMac

https://tinkerdifferent.com/threads/interest-in-a-system-6-7-version-of-attack-of-the-petscii-robots.320/

The github README.md (automatically displayed at github when you go to the link) describes how far I got and what needs finishing, so I won't repeat it here.

----

If any of you guys decide to take a look, I'd be very happy to answer questions, give ideas, explain what I did (and why) etc.  (You have no idea how happy!)

To grab a copy of the source, click on the green "<> Code" button and choose "Download ZIP".

The Codewarior 6/8 projects are in "codewarrior", and the XCode in "petsciixcode2".

From other post:
"If you're interested, here's your homework: Take a look at SDL_FillRect() and put in the QuickDraw call to fill a rectangle.  If you can't figure out what color it should use...I think that might be why I didn't do it myself...try making it clear a rectangle to the background color.  If it works that will probably make the white squares in the screenshots black..."
Jatoba
256 MB
*****
Posts: 270
System 9 Newcomer!
View Profile
Reply #1 on: April 25, 2024, 09:06

Quote from: lauland
From other post:
"If you're interested, here's your homework: Take a look at SDL_FillRect() and put in the QuickDraw call to fill a rectangle.  If you can't figure out what color it should use...I think that might be why I didn't do it myself...try making it clear a rectangle to the background color.  If it works that will probably make the white squares in the screenshots black..."

Will definitely try this over the weekend. Got CW Pro 6 and 8 here, ready to go and fully updated, as well, thanks to my previous (failed) attempts at compiling Bochs for Mac OS 9 using every CW Pro version.

Thanks for making all this so accessible!
Bolkonskij
Administrator
1024 MB
*****
Posts: 2023
View Profile Cornica - Video Entertainment for Mac OS users
Reply #2 on: April 25, 2024, 09:09

Quote
Strangely, there is no Mac version of this!
https://www.the8bitguy.com/category/the-8-bit-guy/petscii-robots/

The 8-bit guy is very cool, and truly a living asset to the retro community, but I think I detect very faint anti-apple sentiments sometimes in what he says...which may be the reason?

If you think David used to be "The iBook Guy" on YouTube before changing that to 8-Bit guy ... I even bought one of his refurbished Clamshells 20 years back or so :-D ... but yeah, he doesn't have that emotional connection with Mac OS (X) that he has with the 8-Bit computers he says. Which is OK, he's still amazingly cool, I agree.

At one point he told me he had Rebecca "Burger Becky" Heinemann doing the Macintosh port for Petscii Robots, who is quite the legend in Mac game development. But that never really got any far - no idea why.

I think @Jatoba showed some interest. Or maybe @garambo? :-) I'd really love to see this happening and in the form of an open discussion that helps everybody learn from it, but since I terribly lack free time at the moment, I can't be participating myself :-/ (and then, I'd probably even more love to see Open General coming to System 7!)
Jatoba
256 MB
*****
Posts: 270
System 9 Newcomer!
View Profile
Reply #3 on: April 25, 2024, 09:36

Quote from: Bolkonskij
I think @Jatoba showed some interest. Or maybe @garambo? :-) I'd really love to see this happening and in the form of an open discussion that helps everybody learn from it, but since I terribly lack free time at the moment, I can't be participating myself :-/ (and then, I'd probably even more love to see Open General coming to System 7!)

No, not me, not for PETSCII Robots... This time, I'm just very selfishly interested in using the project as a springboard to acquire some experience with Mac graphics drawing in C (C++?) using more than one route (SDL vs. QuickDraw etc.), aiming to make my own (even simpler) game. An Action RPG in the vein of the late Squaresoft's legendary Seiken Densetsu, with some multiplayer, for the Mac, and scale it up from there. Maybe also with oldschool pre-2010 (1987 ~ 2009) Ys hints.

I wish this was my fulltime job somehow!
lauland
512 MB
*****
Posts: 674
Symtes 7 Mewconer!
View Profile
Reply #4 on: April 27, 2024, 06:20

Jatoba, you are in NO WAY being selfish!  My goal, in case you guys haven't read my pontificating in the other posts, is NOT actually to get a Mac version Attack of the PETSCII Robots.  My real goal is to get you guys coding, and this is a REALLY GOOD springboard for that!  Games are fun!  You all should make use of it however you like, and that includes just copy-pasting if that is the only thing you end up doing.

----

With that said, your game idea sounds definitely doable...but I don't think it is much simpler, I think Seiken Densetsu looks A LOT like PETSCII! 

In fact, you could even skin a finished version and make it look almost exactly like it...though no multiplayer...that'd need to be added.  Hey...it might be interesting for you to load the art assets and start making them your own...hmm...?

But a journey of a thousand steps will never be completed until you take the first one.  And your first step is opening the project in a compiler and building your own binary.  Until you do that, your dreams will be just that...

It doesn't matter if the very first thing you do is start renaming everything to make it into your own different game, that is fine with me!  But, experience tells me, although that may be all you need to get started coding, it would probably be wiser to walk a little before you try running a marathon.

----

So, your goals sound like this:
* Experience in Mac graphics drawing.
* In C, but optionally C++.
* QuickDraw, but SDL also.
* A Squaresoft-style Action RPG.

PETSCII can serve the first three well, and be a springboard for the 4th...OR you can take the PETSCII code as is and start right in on the Action RPG.

The reason I'd say walk first, and work at least on fixing SDL_FillRect(), is that PETSCII is NOT finished or even playable (I left the keyboard reading half done purposely). 

If you take the code as is, your new game will draw, but that's about it, you'd still have to finish what I haven't.  This is fine, but it means you'd be trying to learn a LOT of things at the same time.  I'm not saying you can't do it, but it will be a lot more difficult, and frustrating, than if you waited to write your own game after you had a little experience...

So...download the zip...open the project in CodeWarrior (Or XCode)...I dare you!


Last Edit: April 27, 2024, 06:56 by lauland
lauland
512 MB
*****
Posts: 674
Symtes 7 Mewconer!
View Profile
Reply #5 on: April 27, 2024, 06:48

Bolkonskij, Burger Becky is a living Goddess.  I don't have many heroes, but she is definitely one.

I'm not putting myself in the same category as her, by any means, but I'd be willing to bet she didn't finish a PETSCII port for the same reason I haven't: Its thankless, you'd be working for free, and it isn't a challenge. 

The costs outweigh the benefits: Goodwill is nice, but PETSCII's nothing new, and I (or Becky) wouldn't be learning anything.  (She could do it in her sleep, I wouldn't be flexing much).  It's like asking Lady Gaga (Becky) or a professional busker (me) to play "Happy Birthday" at a party.

I don't mean to all sound full of myself, but I do want you guys to understand my motivation, and why I've left it in the state it is.  It's not for me.  It's for someone else who hasn't written their first game...or even their first Mac program yet.

----

So, from your other posts, I can see you started, but probably got stuck, on one (or more) games of your own.  You're also interested in a System 7 port of Open General...perhaps those could be combined, or build off each other in some way...

I absolutely don't want you to abandon your own games (that'd be a sin to me!), but, depending on how far you got...

If you've already got the toolbox init'd, a window open, mouse clicks and/or menus handled, and (maybe) drawing something...you can take those parts of your code and use them in the start of an Open General port...  (Hint: Start a new topic, I promise I'll be there and will help).

On the other hand, if you haven't gotten that far, you should tear apart PETSCII, pull those bits out, and use them for your games!!! 

(You mentioned looking up routines is a pain, I've already got the routines you need in PETSCII...please steal them if you can use them, just look for all the #ifdef _MAC's).

Last Edit: April 27, 2024, 07:01 by lauland
Jatoba
256 MB
*****
Posts: 270
System 9 Newcomer!
View Profile
Reply #6 on: April 29, 2024, 17:13

Quote from: lauland
So...download the zip...open the project in CodeWarrior (Or XCode)...I dare you!

http://revontulet.org/2024/04/29/81336f3ba8d04fc199e3a3f2d6f6531a.jpg

Thanks for the push. I opened petscii6ppc.mcp with CW Pro 6 (updated with all updates). Clicking on the "Make" button easily compiled the app without any stress, just like you said it would be like.

I guess petscii7ppc.mcp is instead meant to be opened with CW Pro... 7? Is that what the number indicates? It made me wonder, because I see also a file for m68k with "7" in the end, but knowing that CWPro6 is the final release to compile 68k, it made me wonder if the "6" and "7" meant something else.

So, even though there are so many files included with the .ZIP, is it really only 5 CPP and 5 header files (plus referenced libs) that are required to compile the whole thing? I expected a lot more! (I understand the port is not finished, though. Maybe that's why?)

So essentially the following .h and .cpp files:
- PT2.3A_replay_cia
- PlatformSDL
- Platform
- petrobots
- Palette

MSL = MetroWerks Standard Library. Would that be the same as PowerPlant?

So here, I assume we are using the MSL included with CWPro6.

Finally, I was wondering about InterfaceLib and MathLib. Are both of these PPC-only, without a 68k equivalent?

I wasn't able to spend time with the code during the weekend, but I'm doing so now, and I will be looking into all this C++ code to understand what it's doing, then go from there. Don't worry, I have only your SDL->QuickDraw "assignment" in mind as far as goals go, for the time being.

I will keep you updated. By the way, I'm narrating my experience "step-by-step" just in case anyone else feels like going for the same ride as me. In my case, this project is great, since I'm not used to C or C++, but instead C#, Java, JavaScript, VB.NET, REALbasic etc. etc., and I could really use getting closer and closer to the bare metal. I also never did anything much with ANY version of CodeWarrior (despite earlier attempts with Bochs), which clearly has also its own learning curve.
lauland
512 MB
*****
Posts: 674
Symtes 7 Mewconer!
View Profile
Reply #7 on: April 29, 2024, 17:57

Impressive!  I knew you could do it!  And it was (almost) completely pain free, right?  It really is as simple as loading it in a compiler and building it...and wham!  Instant (quarter-finished) game.

(I was afraid I may have stepped over the line daring you!)

----

Yes, the 7 is for cw7.  At the time I was experimenting with using cw7 with the cw6 m68k plugins and libs, for another project.  I only had that mutant cw7 on my machine when I started working on PETSCII, but switched to stock cw6 because I wanted others to get involved...and no need for them to screw with a weird m68k cw7!  (For the record, it doesn't get you much...the ide is more stable, but that's about it).  It should be pretty easy to get it building in cw8 (but not for m68k).

----

Those 10 files really are all there is to it.  It is very tight, clean, simple code.  All the remaining work will go in the PlatformSDL files.  Look for #ifdef _MAC, and you'll see a lot of places that are empty where code would go.

Other games' source tend to be spread out more, and not nearly as clean...a lot are major messes, because they never expected anyone outside the devs to see it, so didn't bother making it readable/understandable, etc.

----

MSL is the standard C/C++ libraries for CodeWarrior.  PowerPlant is a C++ framework of hundreds of very useful classes to let you abstract a lot of the gui and do quite sophisticated things...in a game, you'd only use it for menus and preferences settings probably.  Early versions of cw had a different, funkier, standard library.

----

Load up both the m68k and the ppc projects at the same time, and you can compare the libraries they link with.  InterfaceLib is a cfm lib that contains most of the MacOS Toolbox (the m68k traps), excepting newer things like OT, nav, etc, that are pure cfm.  I believe MathLib has PPC native implementations that replace the m68k equivs (much slower as they need to be emulated).  You'll see a few m68k libs that there aren't PPC equivs also.  I kept the linked libraries very minimal and they are good typical examples for Mac programs.

----

A NOTE ABOUT ART ASSETS (esp for you Jatoba, in case you decide to try skinning it as a "Seiken Densetsu", but everyone should know):
The original code uses SDL_Image to read png files.  I didn't want to include a png reader, as that alone is complicated compared to the game code itself. 

Instead I converted the art from png to my own trivial "raw" uncompressed format (with detours trying iff and pcx, both much simpler than png), and wrote an equally trivial file reader for that (IMG_Load).  That format does not (yet!) include the necessary palette for the 256 color art, hence the off colors.

I left the palette handling as "an exercise for the reader", but if you get far enough to need that, I will, of course, help.  (For b&w or thousands/millions no palette is needed, but I just used 256 colors to get things up quickly).

----

FYI If you have devtools and SDL installed, you can comment out the "#define _MAC" in PlatformSDL.h, and build the original SDL version from the same files on modern MacOS or Linux or the like.

----

As far as "assignments", you took the crucial first step, which truly warms my heart.  I've been hoping SOMEBODY would actually try it out, and it turned out to be you, which is pretty cool! What you do next is totally up to you! (duh!)

Here's a (minor) challenge...what do you think "event.what=5" is, and why is it being skipped?

Uncomment line 448 and comment out 449 and the debug out will go to a file "debug.txt" instead of a window...there's a lot that goes by too quick to read!  Look for fprintf's in the code, some are commented out, try adding your own in some places...

Please do keep us updated on your adventure...maybe you'll inspire someone else!

Last Edit: April 29, 2024, 18:21 by lauland
Jatoba
256 MB
*****
Posts: 270
System 9 Newcomer!
View Profile
Reply #8 on: April 30, 2024, 17:48

Quote from: lauland
Here's a (minor) challenge...what do you think "event.what=5" is, and why is it being skipped?

Now that you mention it, AFAIK it is the event type number. Normally I would expect a name like "event.id", "event.type", "event.typeCode" or similar. Upon playing around with the debugger and what is getting logged, it seems clear that "mac event.what=5" is a key press event. Likewise, 2 is  mouse press and 1 mouse release (so 2 followed by 1 would be a complete mouse click). 15 seems to be when the application is switched out of, as well as into (AKA gain/lose focus).

So I presume there's code for "canceling" the event (that is, make event do nothing), and logging it (via fprintf?) when event is type 5 and there hasn't been a key release, presumably to prevent involuntary repeat of key presses that the player may not want to register simultaneously, or too fast. I'm still inspecting all the code, so I haven't found the implementation for this yet, but I decided to write a play-by-play comment here anyway.

EDIT: Actually, OK, event.what 5 seems to be for a "key repeat" event, which I assume is technically another key-related event, rather than a key press. I will have to inspect the code to determine this clearly.

I also built the 68k project, no problems, although this time around there was a warning (not error) about something already being declared previously in another file, which is a self-explanatory warning. Binary works fine on Mac OS 9.2.2 just as the PPC one does.

P.S.: I wish CodeWarrior had tabs to switch between multiple files! I guess I'm spoiled by mid 2000s and later programs.
Last Edit: April 30, 2024, 17:59 by Jatoba
Jatoba
256 MB
*****
Posts: 270
System 9 Newcomer!
View Profile
Reply #9 on: April 30, 2024, 18:39

I believe I found the "culprit" that stops certain events. Inside function PlatformSDL::readKeyboard(), within the #ifdef _MAC, there's a switch case that, based on the event type, it will do things, or just do nothing and log. Since there's no case for some of the event types, things like a key repeat event (5) fall under "default:", hence the log message we see via fprintf:

switch(type) {
      case nullEvent: break;
     case keyDown:
     case keyUp:
      if(event.modifiers&cmdKey) {
          int mchoice=MenuKey(event.message&0xff);
          fprintf(debugf,"mac menu '%c' mchoice=%d\n",event.message&0xff,mchoice);
          if((event.message&0xff)=='q') {
            fprintf(debugf,"Command-Q...quiting...\n");
            ExitToShell();
          }
        }
        else {
         keyToReturn=event.message&0xff;
           fprintf(debugf,"mac keypress '%c' (%d)\n",keyToReturn,keyToReturn);
        }
       break;
     case updateEvt:
       break;
     default:
       fprintf(debugf,"mac event.what=%d skipped!\n",type);
       break;
   }

One thing to note is that, although this function is named "readKeyboard", isn't it also what is stopping the mouse press and mouse up events? Perhaps the name could be updated, or I missed noticing the real culprit for the mouse events in another file, although I suspect not.

I have no idea where constants to map the likes of "keyDown", "nullEvent" etc. to numbers are declared, but I assume either in another file (the header file?) or one of the linked libs.

Looking around various parts of the code, I definitely feel a lot of "resistance" when I hit C++-specific syntax or concepts. So things like a simple switch-case do not affect me, but seeing the "::" and "->" syntax twists my mind a bit, especially considering both of those translate to the same "." in many other languages that I'm accustomed to. (I still don't know the difference between :: and ->, I guess the latter is for what is often called a "property", as in, "property accessor", while :: seems to be... to define a property or method to be part of a class?

I also believe I see some bitwise operators (>> and, I think, also a single &?), plus hex number literals. I would use, or come across these only rarely in my usual work routines, but dealing with them without any search engine is hard for me... so I will get my RetroSearch tab setup in Classilla and rely on it... plenty, I think. Until I get confortable with all those guys, so that I don't need to consult online so much.

I will keep on narrating/updating my experience here as it goes.
Last Edit: April 30, 2024, 18:41 by Jatoba
lauland
512 MB
*****
Posts: 674
Symtes 7 Mewconer!
View Profile
Reply #10 on: April 30, 2024, 19:09

You nailed it!

The reason the function is still named readKeyboard() is because I wanted to make minimal changes/additions to the basic PETSCII code, and keep it clean.  You're 100% correct, event handling should normally be broken out into something like a macHandleEvent() (or whatever).

The constants for the standard Mac event types (such as keyUp) are defined in Apple's Events.h header (Codewarrior:MacOS Support:Universal:Interfaces:CIncludes:Events.h) starting at line 63 (tho may vary on your version of Universal Interfaces).

----

I'm totally on board with you on C++ syntax, I learned C first and it took a while to wrap my head around it too.  The good news is the "::" syntax is used in other object oriented languages like Java, so once you get used to it, it's very good to have under your belt. 

Think of it just as like "." for class functions.  The other trick is it is also used for static data members (tho not used in PETSCII I think)...normal data members, and parts of them just use ".".

For "->" you should just think of C++ classes as C structs, so "foo->bar" is just short hand for "(*foo).bar" as usual. (ie foo is a pointer). It's totally just shorthand and idiomatic to C/C++.

----

In games (and lower level OS access) you'll see Hex numbers all the time!  They are always prefixed with 0x.

The single "&" is used in two EXTREMELY different ways in C/C++: If it comes between two values, it is a bitwise AND operation.  If it comes in front of a value alone, it means "the address of", as in "&event", is the address of the event struct (you can pass whole structs/classes between functions in C++, but using just the address is faster, and most OS's will require you to do that sort of thing a lot).

In readKeyboard() the bitwise "&" is used to mask out the bottom 8 bits (0xff is 8 bits of all 1's) of a 16-bit value for events, as MacOS puts other info in the top (which we don't need in a game).

It is also used to test for the bit corresponding to the command key being held down (other modifier keys like shift would be tested for the same way).

----

All the bitwise shifts are from the original game author.  One very important optimization, ESPECIALLY in games, is to remember a shift can correspond to a multiply/divide by (powers of) 2, but is MUCH faster.  So "foo >> 1" is the same as "foo / 2".

You're doing awesome by the way!
Last Edit: April 30, 2024, 20:28 by lauland
lauland
512 MB
*****
Posts: 674
Symtes 7 Mewconer!
View Profile
Reply #11 on: April 30, 2024, 20:34

FYI: Note that I'm treating key down and key up events the same, and ignoring key repeats.  I think, but never finished looking into it, that that is why you can't move the player when the game is playing...

Either that, or the keyToReturn value needs some more massaging on line 822 (the routine that uses it doesn't understand the values we're returning maybe?)

----

Gaining/losing focus is typically handled in games by making them pause when the window is switched away, and we could do that.  One clever/simple way would be to simulate the user pressing the pause key.  NOTE: I mapped that to the "5" key because I was lazy, but it really should be the code for the ESC key (line 112).
Jatoba
256 MB
*****
Posts: 270
System 9 Newcomer!
View Profile
Reply #12 on: May 01, 2024, 17:46

I'm trying to see if I can get the game character to move. So far I couldn't, but I have the impression we want to register the keyDown, but maybe not keyUp. I noticed that using both like this, when pressing the Pause key, is causing the game to unpause soon after pausing (keyDown = pause, keyUp = unpause), so I commented out "case keyUp:" for now, which for the time being fixed the problem. (I also agree with remapping Pause to ESC key, or maybe even some other key rather than 5.)

I looked into line 822 with the variable "keyToReturn" (the returning value of the function), and I tried poking at that value to see if the game character would move, but I wasn't able to yet. Hm...

I wish I could dedicate more than 20 minutes a day to this to get somewhere quickly, but I hope my baby pace will be also fine. Slow but steady...

I guess there is no equivalent of an "IntelliSense" or "JavaDoc" for CodeWarrior C++, is there...? Most of the time I wonder what is "accessible" to me, maybe get some quick description of an attribute or method, but... I guess this is how things used to be back then. :( Owie.
Last Edit: May 01, 2024, 17:49 by Jatoba
lauland
512 MB
*****
Posts: 674
Symtes 7 Mewconer!
View Profile
Reply #13 on: May 01, 2024, 18:02

Hey, 20 minutes a day seems to be more than enough with the progress you've made!

How keyUp vs keyDown (and repeat) is handled in program varies on what is needed...for just basic keyboard reading just keyUp is usually needed...but in a game, you know the player will be holding down the keys, so keyDown and repeat are very important!  I think you're on the right track.

FYI the reason I used "5" was I was too lazy at the time to even look up the code for ESC...that was extremely lazy for me, but at the time my goal was just getting the bitmaps to display!

I didn't actually check what the return value needs to be on line 822...once what I have worked in the menu screen I stopped fiddling.  I thought the player would move, but no.

Sometimes with reading keys you want to keep track of the last key that was pressed in addition to the current one, and it looks like there is some code to do that in there, on quick glance.  I didn't look further into it, but it's possible some other variable keeping track of that needs to be cleared that I'm not doing.  If that's the case, the code thinks a key has been already been pressed, and is waiting for it to be unpressed?  That's the reason I think we'd have to handle keyUp AND keyDown separately....but the SDL code doesn't, so hmm.

If you look in petrobots.cpp readKeyboard() is called in a LOT of places!

One other idea I had is what they're doing with setting the value to 0xff...maybe that's what they're using for "no key pressed"?  And we need to set it to that somewhere on the Mac it isn't?  Again, if that is it, the code thinks there's never a time where a key isn't being pressed and is waiting for that.  They check the readKeyboard() value for 0xff in a lot of places...

CodeWarrior does have SOMETHING a tiny bit kinda sorta like IntelliSense...try "right clicking" (control click) on variable types and function names and a popup will let you jump to where they're defined, etc.  Be careful to select JUST the thing you want, it doesn't understand if you also select parens, etc.  There's also a class browser where you can see the hierarchy, etc.
Last Edit: May 01, 2024, 18:06 by lauland
Jatoba
256 MB
*****
Posts: 270
System 9 Newcomer!
View Profile
Reply #14 on: May 07, 2024, 11:02

Thanks for the tips, @lauland, they are always helpful to me. I took a deep breath for a quick pause, but plan to return to this shortly. In the meantime, I came across some quick tips from old Apple that is handy to have with regards to C++ development, for anyone else like me trying to grasp C++ better.

http://leopard-adc.pepas.com/technotes/pt/pt_12.html#//apple_ref/doc/uid/DTS10002666

This was helpful to me, in quite a number of ways, and doesn't take very long to go through. Destructors FTW! I barely ever came across them in C#...

Speaking of C#, there's this good video "C++ for Java and C# Developers" by this guy called Dmitri Nesteruk, the guy talks really well and does it all without video cuts. I found it quite helpful a while back, and would like to watch it again, although I remember it was more focused on "modern C++" rather than what our Mac compilers compile, but most of it still applies. He uses Visual Studio on Windows, but the main points in the video apply regardless. Can be helpful to "break our shyness" with C++ when new to it, but coming with a C# or Java background.

http://iteroni.com/watch?v=gRxi1eCV4xI
(Iteroni is a proxy for YouTube)

Finally, I came across C / C++ code "beautifiers" to indent code in whichever way we like it. For the PETSCII Robots project, I don't find it necessary, but it might be a good tool to have for, if nothing else, other C or C++ projects, including our own projects done from scratch. They don't work in the actual Mac OS, which is a problem, but can nonetheless come in handy, even if we need to use VPC for them:

UniversalIndentGUI: https://universalindent.sourceforge.net/ (includes Artistic Style from https://astyle.sourceforge.net/ )

For indentation, I always liked Allman more, but K&R is usually more popular, and is also more or less what is used in PETSCII, which still looks fine to me visually despite my Allman preference. Link to various indentation patterns: https://en.wikipedia.org/wiki/Indentation_style

Just sharing these in case it eventually also helps anyone else trying to "break the barrier" with C++ for Mac.
Pages: [1] 2 3

© 2021 System7Today.com.
The Apple Logo, Macintosh™, Mac OS™, and others property of Apple Computer, Inc.
This site is in no way affiliated with Apple Computer, Inc.