OK, so if the hole through the subfloor for the vent can be moved to the right (in the picture) within the wall, that would make things easier, but here's the basic approach for your situation, I think. I marked up your picture with some assumptions:
The red lines are the wall above, the tub valve wall. The blue circles are the tub drain (towards the bottom of the picture) and tub overflow, connected by the blue line. Then the left-right blue line hitting the overflow is the u-bend of the trap below the waste-overflow tee. The line coming off that that at a 45 is the elbow of the trap (that joint swivels to any direction). Then the next fitting is a wye, where the wye is rolled up 45 degrees from horizontal; the green branch is the vent, which has to rise.
So the geometric question is whether this all fits without the trap being too low and without the vent rising into the subfloor before it gets under the wall. Also the footprint of the vent won't actually run parallel to the joists as drawn, since you've rolled the wye up 45 degrees from horizontal; it will angle back towards the trap a little. That means you may need to put the wye a little farther downstream if you need to hit your existing hole with the vent, which would then require more height gain for the somewhat longer distance the vent needs to run before hitting the wall above.
Note that with the wye rolled 45 degrees above horizontal, you would need a 60 degree bend to turn the vent to true vertical. So the rising vent segment is actually only 30 degrees above horizontal, which isn't quite considered vertical, but is much better than actually being horizontal as in your original install, and is generally considered sufficient.
Cheers, Wayne