help for connecting a led matrix grounds with atmega1284 (and shift register)

Previously, I made a led matrix by connecting it to the arduino, and multiplexing it so I could basically create whatever image I wanted to. But, now that I'm using an atmega with shift registers ( which after much research, am still a little bit shaky with), I'm trying to do the same, but now I'm running into the problem of how to connect my grounds? My cathodes are connected by each row (4x4 matrix) and with my anodes... in arduino I just connected it to resistors, then to separate pins, but with atmega, I'm not sure if I can connect my column anodes to my last 4 pins in my 74HC595N SR?(since I can connect 8 pins to the SR, 4 pins are already to the cathode rows) I'm worried about accidentally short circuiting my matrix.

I might be making this be more complex than it actually is?? But there's so little documentation for a SR + atmega + led matrix ( most people also use the prebuilt matrix so I'm not sure if it will connect the same?? maybe??? ).
After this, I just need to connect my buttons right next to all my leds, so then they'll turn off the lit leds, and then hopefully by then my matrix will be able to recognize when all the leds are off? So i can continue on with my game... but that's all once I can understand how to work this :frowning:

It would be great to have a schematic, not one of those fuzzy things. KiKad is a great program and is free for the download. Normally all the grounds get connected together. If there are resistors in series with a LED to ground, no problem.