This reverts commit 70eef55ab5.
It was premature to merge this commit into HEAD. Maybe we'll try again
one day, but only if a complete and fully working patch with build
system integartion is provided.
COM_FileExtension() was parsing strings from beginning to end, bailing
out as soon as '.' was found and treating everything thereafter as the
file extension. That behavior caused problem with relatives pathes like
models/monsters/tank/../ctank/skin.pcx. The new implementation uses
strrchr() to determine the last '.'.
This fixes issue #48. The bug was introduced in e07294b which replaced
hand rolled code with COM_FileExtention().
This commit has some drawbacks:
- It's rather hacky. The Quake II menu is crap and was never intended
to be scaled. My approach was to add scaling to most of the generic
functions and handle all the special cases in the non generic parts
of the menu. A better solution would require to rewrite at least
parts of the menu. And like it's said in qmenu.c: I won't do that.
- Some menu elements are aligned to the right, others to the left. In
many places magic numbers are used to align elements by hand. This
makes it very hard to impossible to implement a scaling logic which
works in all situations. With this approach most menus look good up
to at least a scaling factor of 3. Especially the "Player Setup"
menu is very problematic at small disalignements are unavoidable.
Please note, that only the menu system itself is scaled. Some elements
like the the "Quit Screen" or the loading plaque are still missing. They
will be done in a later commit.
This change is needed to break a otherwise fatal cycle:
- The renderer calls VID_MenuInit()
- VID_MenuInit() calls SCR_GetMenuScale()
- SCR_GetMenuScale() relies on gl_menuscale which is still
uninitialized at this time.
This integrates the backends for the pandora, gcw and gph written by
Scott "Pickle" Smith. Only the code itself is supplied, but no build
system integration.