Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wolf3d
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
wolf3d
Commits
f4482f23
Commit
f4482f23
authored
Jun 14, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* GL_EXT_shared_texture_palette
* A few cleanups to GL code
parent
22ab23a2
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
190 additions
and
56 deletions
+190
-56
GLDraw.c
macsrc/GLDraw.c
+161
-49
Makefile
macsrc/Makefile
+1
-1
TODO
macsrc/TODO
+10
-5
vi_glx.c
macsrc/vi_glx.c
+18
-1
No files found.
macsrc/GLDraw.c
View file @
f4482f23
This diff is collapsed.
Click to expand it.
macsrc/Makefile
View file @
f4482f23
...
@@ -25,7 +25,7 @@ SLFLAGS = $(LFLAGS) -lvga
...
@@ -25,7 +25,7 @@ SLFLAGS = $(LFLAGS) -lvga
#XLFLAGS = $(LFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXxf86dga
#XLFLAGS = $(LFLAGS) -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXxf86dga
XLFLAGS
=
$(LFLAGS)
-L
/usr/X11R6/lib
-lX11
XLFLAGS
=
$(LFLAGS)
-L
/usr/X11R6/lib
-lX11
GLFLAGS
=
$(LFLAGS)
`
gtk-config
--libs
`
# -L/usr/X11R6/lib -lX11 -lXi -lXext -lgdk -lgtk
GLFLAGS
=
$(LFLAGS)
`
gtk-config
--libs
`
# -L/usr/X11R6/lib -lX11 -lXi -lXext -lgdk -lgtk
GLLFLAGS
=
$(LFLAGS)
-L
/usr/X11R6/lib
-lX11
-lXext
-lGL
GLLFLAGS
=
$(LFLAGS)
-L
/usr/
lib
-L
/usr/
X11R6/lib
-lX11
-lXext
-lGL
NASM
=
nasm
NASM
=
nasm
...
...
macsrc/TODO
View file @
f4482f23
...
@@ -3,6 +3,7 @@ TODO:
...
@@ -3,6 +3,7 @@ TODO:
- With windowed systems, put paused in the title bar?
- With windowed systems, put paused in the title bar?
+ Being in a text menu could be the "pause"
+ Being in a text menu could be the "pause"
- This would be fine for svgalib
- This would be fine for svgalib
- What if the program is ran without a term? The user's fault?
* SVGAlib Hack:
* SVGAlib Hack:
- Check to make sure linear addressing is supported
- Check to make sure linear addressing is supported
- If SVGAlib does not support 512x384x256, allow the user to pan around
- If SVGAlib does not support 512x384x256, allow the user to pan around
...
@@ -21,7 +22,7 @@ TODO:
...
@@ -21,7 +22,7 @@ TODO:
- When all drawing is implemented, remove any unnecessary state/matrix
- When all drawing is implemented, remove any unnecessary state/matrix
changes.
changes.
- Split up GLDraw.c
- Split up GLDraw.c
-
GL_EXT_shared_texture_palette
-
Is GL_REPLACE faster than GL_MODULATE for textures?
* Save/Load Games
* Save/Load Games
- Menu code does not exist yet -- so just have a compiled in default save
- Menu code does not exist yet -- so just have a compiled in default save
and load files
and load files
...
@@ -39,13 +40,14 @@ TODO:
...
@@ -39,13 +40,14 @@ TODO:
- 11025 will probably be the best rate
- 11025 will probably be the best rate
* Interface
* Interface
+ Menus and dialog boxes
+ Menus and dialog boxes
+ Command line (temporary workaround for no menus).
- Command line (temporary workaround for no menus).
- Resolution
- Difficulty
- Text only menus (similar to what snes9x has).
- Text only menus (similar to what snes9x has).
- Would like to have a "lower level" X Toolkit, to provide menus and
dialog boxes, and various widgets, but I rather not be "forced" into
losing the ability to call Xlib functions directly.
* Different depths/visuals for software clients.
* Different depths/visuals for software clients.
+ Different functions to draw with different bpps.
+ Different functions to draw with different bpps.
- 15 bpp uses same draw routes as 16 but different
palette on
e
- 15 bpp uses same draw routes as 16 but different
set palett
e
+ not sure how to do palette fades
+ not sure how to do palette fades
- don't support them generally
- don't support them generally
- MacPlay->Id Logo: have some sort of redraw.
- MacPlay->Id Logo: have some sort of redraw.
...
@@ -77,6 +79,9 @@ IDEAS:
...
@@ -77,6 +79,9 @@ IDEAS:
- XXX: Load Previously Loaded Game
- XXX: Load Previously Loaded Game
- XXX: Save Game to Previously used File
- XXX: Save Game to Previously used File
- F10: Quit
- F10: Quit
* Command Line
- Resolution
- Difficulty
* How about adding red/white shifts (from PC wolf3d)? So screen changes
* How about adding red/white shifts (from PC wolf3d)? So screen changes
color when you are hit or pick up items.
color when you are hit or pick up items.
...
...
macsrc/vi_glx.c
View file @
f4482f23
...
@@ -40,8 +40,12 @@ XVisualInfo *vi;
...
@@ -40,8 +40,12 @@ XVisualInfo *vi;
GLXContext
ctx
;
GLXContext
ctx
;
Atom
wmDeleteWindow
;
Atom
wmDeleteWindow
;
#ifdef GL_EXT_shared_texture_palette
extern
int
UseSharedTexturePalette
;
extern
int
UseSharedTexturePalette
;
extern
PFNGLCOLORTABLEEXTPROC
pglColorTableEXT
;
extern
PFNGLCOLORTABLEEXTPROC
pglColorTableEXT
;
#endif
extern
int
CheckToken
(
const
char
*
str
,
const
char
*
item
);
int
attrib
[]
=
{
int
attrib
[]
=
{
GLX_RGBA
,
GLX_RGBA
,
...
@@ -63,6 +67,7 @@ int main(int argc, char *argv[])
...
@@ -63,6 +67,7 @@ int main(int argc, char *argv[])
XColor
fg
=
{
0
};
XColor
fg
=
{
0
};
char
data
[
8
]
=
{
0x01
};
char
data
[
8
]
=
{
0x01
};
char
*
display
;
char
*
display
;
const
char
*
ext
;
int
mask
,
major
,
minor
,
verbose
=
0
;
int
mask
,
major
,
minor
,
verbose
=
0
;
int
opt
;
int
opt
;
...
@@ -128,7 +133,7 @@ int main(int argc, char *argv[])
...
@@ -128,7 +133,7 @@ int main(int argc, char *argv[])
ctx
=
glXCreateContext
(
dpy
,
vi
,
NULL
,
True
);
ctx
=
glXCreateContext
(
dpy
,
vi
,
NULL
,
True
);
if
(
ctx
==
NULL
)
{
if
(
ctx
==
NULL
)
{
fprintf
(
stderr
,
"glx context create
failed
\n
"
);
fprintf
(
stderr
,
"GLX context creation
failed
\n
"
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
...
@@ -172,6 +177,18 @@ int main(int argc, char *argv[])
...
@@ -172,6 +177,18 @@ int main(int argc, char *argv[])
XMapWindow
(
dpy
,
win
);
XMapWindow
(
dpy
,
win
);
XFlush
(
dpy
);
XFlush
(
dpy
);
ext
=
(
const
char
*
)
glGetString
(
GL_EXTENSIONS
);
#ifdef GL_EXT_shared_texture_palette
UseSharedTexturePalette
=
0
;
if
(
CheckToken
(
ext
,
"GL_EXT_shared_texture_palette"
))
{
pglColorTableEXT
=
glXGetProcAddressARB
((
unsigned
const
char
*
)
"glColorTableEXT"
);
if
(
pglColorTableEXT
)
{
UseSharedTexturePalette
=
1
;
printf
(
"GL_EXT_shared_texture_palette found...
\n
"
);
}
}
#endif
InitData
();
InitData
();
SlowDown
=
1
;
SlowDown
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment