Everything is legal unless there's a law against it. States would not legalize gambling, they would repeal laws against it.
I'm used to it. HN readers are very sensitive to tone. The downvotes come first and then the upvotes.
In general, each sovereign jurisdiction will fall back on the legal system that was in place at the time the jurisdiction gained its sovereignty. For California, the ancestor state was Mexico, and thus Spain.
https://www.law.berkeley.edu/library/robbins/pdf/ca-legalher...
But to answer the larger question. Everything that is not specifically legislated against is legal. Some ancient laws may still hold, but most are probably going to be found unconstitutional. Although, there may be some exceptions that you could convince a court to enforce.