mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
More Android changes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4989 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
22ac21598b
commit
31b557ef61
14 changed files with 6798 additions and 636 deletions
|
@ -14,36 +14,33 @@
|
|||
#
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
|
||||
LOCAL_MODULE := duke
|
||||
|
||||
# -O2 -fvisibility=hidden
|
||||
|
||||
LOCAL_CFLAGS := -fvisibility=hidden -fPIC -Wimplicit -O2 -funswitch-loops -fomit-frame-pointer -DNDEBUG -DUSING_LTO -flto -fno-stack-protector -W -Werror-implicit-function-declaration -Wpointer-arith -Wextra -funsigned-char -fno-strict-aliasing -D_FORTIFY_SOURCE=0 -fjump-tables -Wno-unused-result -Wno-char-subscripts -pthread -DHAVE_INTTYPES -D_GNU_SOURCE=1 -D_REENTRANT -DRENDERTYPESDL=1 -Wno-strict-overflow -DUSE_OPENGL -Wno-attributes
|
||||
LOCAL_CFLAGS := -x c++ -std=gnu++03 -fvisibility=hidden -fPIC -O2 -funswitch-loops -fomit-frame-pointer -DNDEBUG -DUSING_LTO -flto -fno-stack-protector -funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=0 -fjump-tables -pthread -DHAVE_INTTYPES -D_GNU_SOURCE=1 -D_REENTRANT
|
||||
LOCAL_CFLAGS += -W -Werror-implicit-function-declaration -Wpointer-arith -Wextra -Wno-unused-result -Wno-char-subscripts -Wno-strict-overflow -Wno-attributes -Wno-write-strings
|
||||
LOCAL_CPPFLAGS := -std=gnu++03
|
||||
|
||||
#-DUSE_LIBPNG
|
||||
|
||||
LOCAL_CFLAGS += -DHAVE_SDL -DHAVE_VORBIS -DDROIDMENU
|
||||
LOCAL_CFLAGS += -DHAVE_SDL -DHAVE_VORBIS -DHAVE_JWZGLES -DHAVE_ANDROID -DRENDERTYPESDL=1 -DUSE_OPENGL -DNETCODE_DISABLE
|
||||
|
||||
#LOCAL_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
|
||||
|
||||
LOCAL_LDFLAGS := -fuse-ld=bfd
|
||||
LOCAL_ARM_NEON = true
|
||||
|
||||
LOCAL_LDLIBS += -lGLESv1_CM -lEGL
|
||||
|
||||
LOCAL_LDLIBS += -llog
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/source $(LOCAL_PATH)/source/jmact $(LOCAL_PATH)/source/jaudiolib/include $(LOCAL_PATH)/source/enet/include $(LOCAL_PATH)/build/include
|
||||
|
||||
LOCAL_C_INCLUDES += $(TOP_DIR)/ $(TOP_DIR)/Libraries/liboggvorbis/include $(TOP_DIR)/Libraries/ $(TOP_DIR)/Libraries/SDL2/include $(TOP_DIR)/Libraries/SDL2_mixer/include $(TOP_DIR)/Libraries/libpng/include $(TOP_DIR)/Libraries/TinyXML/include $(TOP_DIR)/TouchControls
|
||||
LOCAL_C_INCLUDES += $(TOP_DIR)/ $(TOP_DIR)/Libraries/liboggvorbis/include $(TOP_DIR)/Libraries/ $(TOP_DIR)/Libraries/SDL2/include $(TOP_DIR)/Libraries/SDL2_mixer/include $(TOP_DIR)/Libraries/libpng/include $(TOP_DIR)/Libraries/TinyXML/include $(TOP_DIR)/TouchControls
|
||||
|
||||
ANDROID_SRC = \
|
||||
source/android/android-jni.cpp \
|
||||
source/android/in_android.c
|
||||
source/android/in_android.c \
|
||||
build/src/glbuild_android.c \
|
||||
build/src/jwzgles.c
|
||||
|
||||
BUILD_SRC = \
|
||||
build/src/a-c.c \
|
||||
|
@ -54,6 +51,7 @@ BUILD_SRC = \
|
|||
build/src/defs.c \
|
||||
build/src/engine.c \
|
||||
build/src/polymost.c \
|
||||
build/src/mdsprite.c \
|
||||
build/src/texcache.c \
|
||||
build/src/dxtfilter.c \
|
||||
build/src/hightile.c \
|
||||
|
@ -62,21 +60,15 @@ BUILD_SRC = \
|
|||
build/src/kplib.c \
|
||||
build/src/lz4.c \
|
||||
build/src/osd.c \
|
||||
build/src/md4.c \
|
||||
build/src/pragmas.c \
|
||||
build/src/scriptfile.c \
|
||||
build/src/mutex.c \
|
||||
build/src/xxhash.c \
|
||||
build/src/mmulti_null.c \
|
||||
build/src/voxmodel.c \
|
||||
build/src/common.c \
|
||||
|
||||
|
||||
GL_SRC = \
|
||||
build/src/mdsprite.c \
|
||||
build/src/glbuild_android.c \
|
||||
|
||||
SDL_SRC = \
|
||||
build/src/sdlayer.c \
|
||||
build/src/xxhash.c \
|
||||
build/src/mmulti_null.c \
|
||||
build/src/voxmodel.c \
|
||||
build/src/common.c \
|
||||
build/src/sdlayer.c
|
||||
|
||||
JMACT_SRC=source/jmact/file_lib.c \
|
||||
source/jmact//control.c \
|
||||
|
@ -90,6 +82,7 @@ JMACT_SRC=source/jmact/file_lib.c \
|
|||
GAME_SRC=source/game.c \
|
||||
source/actors.c \
|
||||
source/anim.c \
|
||||
source/animsounds.c \
|
||||
source/common.c \
|
||||
source/config.c \
|
||||
source/demo.c \
|
||||
|
@ -137,12 +130,12 @@ GAME_SRC=source/game.c \
|
|||
source/enet/src/compress.c \
|
||||
source/enet/src/unix.c
|
||||
|
||||
LOCAL_SRC_FILES = $(ANDROID_SRC) $(ENET_SRC) $(JAUDIO_SRC) $(JMACT_SRC) $(GAME_SRC) $(BUILD_SRC) $(GL_SRC) $(SDL_SRC)
|
||||
LOCAL_SRC_FILES = $(ANDROID_SRC) $(JAUDIO_SRC) $(JMACT_SRC) $(GAME_SRC) $(BUILD_SRC)
|
||||
|
||||
|
||||
LOCAL_LDLIBS := -lGLESv1_CM -lEGL -ldl -llog -lOpenSLES -lz -L$(TOP_DIR)/openssl/libs/ -lcrypto
|
||||
LOCAL_STATIC_LIBRARIES := nanogl SDL2_net libjpeg libpng
|
||||
LOCAL_SHARED_LIBRARIES := touchcontrols openal ogg vorbis SDL2 SDL2_mixer SDL2_image
|
||||
LOCAL_LDLIBS := -lGLESv1_CM -lEGL -ldl -llog -lOpenSLES -lz -L$(TOP_DIR)/openssl/libs/
|
||||
LOCAL_STATIC_LIBRARIES := libpng crypto
|
||||
LOCAL_SHARED_LIBRARIES := touchcontrols ogg vorbis SDL2 SDL2_mixer
|
||||
# SDL2_image
|
||||
|
||||
ifeq ($(GP_LIC),1)
|
||||
LOCAL_STATIC_LIBRARIES += s-setup
|
||||
|
|
|
@ -93,6 +93,7 @@
|
|||
|
||||
#if defined __ANDROID__ || defined EDUKE32_IOS
|
||||
# define EDUKE32_TOUCH_DEVICES
|
||||
# define EDUKE32_GLES
|
||||
#endif
|
||||
|
||||
// This gives us access to 'intptr_t' and 'uintptr_t', which are
|
||||
|
@ -192,8 +193,8 @@
|
|||
#endif
|
||||
|
||||
#if defined(__arm__)
|
||||
# define Bsqrt __sqrt
|
||||
# define Bsqrtf __sqrtf
|
||||
# define Bsqrt __builtin_sqrt
|
||||
# define Bsqrtf __builtin_sqrtf
|
||||
#else
|
||||
# define Bsqrt sqrt
|
||||
# define Bsqrtf sqrtf
|
||||
|
|
517
polymer/eduke32/build/include/jwzgles.h
Normal file
517
polymer/eduke32/build/include/jwzgles.h
Normal file
|
@ -0,0 +1,517 @@
|
|||
/* xscreensaver, Copyright (c) 2012 Jamie Zawinski <jwz@jwz.org>
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation. No representations are made about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without express or
|
||||
* implied warranty.
|
||||
*/
|
||||
|
||||
/* A compatibility shim to allow OpenGL 1.3 source code to work in an
|
||||
OpenGLES environment, where almost every OpenGL 1.3 function has
|
||||
been "deprecated". See jwzgles.c for details.
|
||||
*/
|
||||
|
||||
#ifndef __JWZGLES_H__
|
||||
#define __JWZGLES_H__
|
||||
|
||||
#ifndef HAVE_JWZGLES
|
||||
# error: do not include this without HAVE_JWZGLES
|
||||
#endif
|
||||
|
||||
|
||||
#include "jwzglesI.h"
|
||||
|
||||
|
||||
/* These are the OpenGL 1.3 functions that are not present in OpenGLES 1.
|
||||
As you can see from the length of this list, OpenGL and OpenGLES have
|
||||
almost nothing to do with each other. To claim that GLES is a dialect
|
||||
of OpenGL is absurd -- English and Latin have more in common!
|
||||
*/
|
||||
|
||||
#define glAccum jwzgles_glAccum
|
||||
#define glAntialiasing jwzgles_glAntialiasing
|
||||
#define glAreTexturesResident jwzgles_glAreTexturesResident
|
||||
#define glArrayElement jwzgles_glArrayElement
|
||||
#define glBegin jwzgles_glBegin
|
||||
#define glBitmap jwzgles_glBitmap
|
||||
#define glBlendColor jwzgles_glBlendColor
|
||||
#define glBlendEquation jwzgles_glBlendEquation
|
||||
#define glCallList jwzgles_glCallList
|
||||
#define glCallLists jwzgles_glCallLists
|
||||
#define glClearAccum jwzgles_glClearAccum
|
||||
#define glClearDepth jwzgles_glClearDepth
|
||||
#define glClearIndex jwzgles_glClearIndex
|
||||
#define glClipPlane jwzgles_glClipPlane
|
||||
#define glColor3b jwzgles_glColor3b
|
||||
#define glColor3bv jwzgles_glColor3bv
|
||||
#define glColor3d jwzgles_glColor3f
|
||||
#define glColor3dv jwzgles_glColor3dv
|
||||
#define glColor3f jwzgles_glColor3f
|
||||
#define glColor3fv jwzgles_glColor3fv
|
||||
#define glColor3i jwzgles_glColor3i
|
||||
#define glColor3iv jwzgles_glColor3iv
|
||||
#define glColor3s jwzgles_glColor3s
|
||||
#define glColor3sv jwzgles_glColor3sv
|
||||
#define glColor3ub jwzgles_glColor3ub
|
||||
#define glColor3ubv jwzgles_glColor3ubv
|
||||
#define glColor3ui jwzgles_glColor3ui
|
||||
#define glColor3uiv jwzgles_glColor3uiv
|
||||
#define glColor3us jwzgles_glColor3us
|
||||
#define glColor3usv jwzgles_glColor3usv
|
||||
#define glColor4b jwzgles_glColor4b
|
||||
#define glColor4bv jwzgles_glColor4bv
|
||||
#define glColor4d jwzgles_glColor4d
|
||||
#define glColor4dv jwzgles_glColor4dv
|
||||
#define glColor4fv jwzgles_glColor4fv
|
||||
#define glColor4i jwzgles_glColor4i
|
||||
#define glColor4iv jwzgles_glColor4iv
|
||||
#define glColor4s jwzgles_glColor4s
|
||||
#define glColor4sv jwzgles_glColor4sv
|
||||
#define glColor4ub jwzgles_glColor4ub
|
||||
#define glColor4ubv jwzgles_glColor4ubv
|
||||
#define glColor4ui jwzgles_glColor4ui
|
||||
#define glColor4uiv jwzgles_glColor4uiv
|
||||
#define glColor4us jwzgles_glColor4us
|
||||
#define glColor4usv jwzgles_glColor4usv
|
||||
#define glColorMaterial jwzgles_glColorMaterial
|
||||
#define glColorSubTable jwzgles_glColorSubTable
|
||||
#define glColorTable jwzgles_glColorTable
|
||||
#define glColorTableParameter jwzgles_glColorTableParameter
|
||||
#define glColorTableParameterfv jwzgles_glColorTableParameterfv
|
||||
#define glColorub jwzgles_glColorub
|
||||
#define glColorui jwzgles_glColorui
|
||||
#define glColorus jwzgles_glColorus
|
||||
#define glCompressedTexImage jwzgles_glCompressedTexImage
|
||||
#define glCompressedTexImage1D jwzgles_glCompressedTexImage1D
|
||||
#define glCompressedTexImage3D jwzgles_glCompressedTexImage3D
|
||||
#define glCompressedTexSubImage1D jwzgles_glCompressedTexSubImage1D
|
||||
#define glCompressedTexSubImage3D jwzgles_glCompressedTexSubImage3D
|
||||
#define glConvolutionFilter1D jwzgles_glConvolutionFilter1D
|
||||
#define glConvolutionFilter2D jwzgles_glConvolutionFilter2D
|
||||
#define glConvolutionParameter jwzgles_glConvolutionParameter
|
||||
#define glConvolutionParameterfv jwzgles_glConvolutionParameterfv
|
||||
#define glConvolutionParameteriv jwzgles_glConvolutionParameteriv
|
||||
#define glCopyColorSubTable jwzgles_glCopyColorSubTable
|
||||
#define glCopyColorTable jwzgles_glCopyColorTable
|
||||
#define glCopyConvolutionFilter1D jwzgles_glCopyConvolutionFilter1D
|
||||
#define glCopyConvolutionFilter2D jwzgles_glCopyConvolutionFilter2D
|
||||
#define glCopyPixels jwzgles_glCopyPixels
|
||||
#define glCopyTexImage1D jwzgles_glCopyTexImage1D
|
||||
#define glCopyTexImage3D jwzgles_glCopyTexImage3D
|
||||
#define glCopyTexSubImage1D jwzgles_glCopyTexSubImage1D
|
||||
#define glCopyTexSubImage3D jwzgles_glCopyTexSubImage3D
|
||||
#define glDeleteLists jwzgles_glDeleteLists
|
||||
#define glDrawBuffer jwzgles_glDrawBuffer
|
||||
#define glDrawPixels jwzgles_glDrawPixels
|
||||
#define glDrawRangeElements jwzgles_glDrawRangeElements
|
||||
#define glEdgeFlag jwzgles_glEdgeFlag
|
||||
#define glEdgeFlagPointer jwzgles_glEdgeFlagPointer
|
||||
#define glEdgeFlagv jwzgles_glEdgeFlagv
|
||||
#define glEnd jwzgles_glEnd
|
||||
#define glEndList jwzgles_glEndList
|
||||
#define glEvalCoord1d jwzgles_glEvalCoord1d
|
||||
#define glEvalCoord1dv jwzgles_glEvalCoord1dv
|
||||
#define glEvalCoord1f jwzgles_glEvalCoord1f
|
||||
#define glEvalCoord1fv jwzgles_glEvalCoord1fv
|
||||
#define glEvalCoord2d jwzgles_glEvalCoord2d
|
||||
#define glEvalCoord2dv jwzgles_glEvalCoord2dv
|
||||
#define glEvalCoord2f jwzgles_glEvalCoord2f
|
||||
#define glEvalCoord2fv jwzgles_glEvalCoord2fv
|
||||
#define glEvalMesh1 jwzgles_glEvalMesh1
|
||||
#define glEvalMesh2 jwzgles_glEvalMesh2
|
||||
#define glEvalPoint1 jwzgles_glEvalPoint1
|
||||
#define glEvalPoint2 jwzgles_glEvalPoint2
|
||||
#define glFeedbackBuffer jwzgles_glFeedbackBuffer
|
||||
#define glFogi jwzgles_glFogi
|
||||
#define glFogiv jwzgles_glFogiv
|
||||
#define glFrustum jwzgles_glFrustum
|
||||
#define glGenLists jwzgles_glGenLists
|
||||
#define glGet jwzgles_glGet
|
||||
#define glGetBooleanv jwzgles_glGetBooleanv
|
||||
#define glGetClipPlane jwzgles_glGetClipPlane
|
||||
#define glGetColorTable jwzgles_glGetColorTable
|
||||
#define glGetColorTableParameter jwzgles_glGetColorTableParameter
|
||||
#define glGetCompressedTexImage jwzgles_glGetCompressedTexImage
|
||||
#define glGetConvolutionFilter jwzgles_glGetConvolutionFilter
|
||||
#define glGetConvolutionParameter jwzgles_glGetConvolutionParameter
|
||||
#define glGetConvolutionParameteriv jwzgles_glGetConvolutionParameteriv
|
||||
#define glGetDoublev jwzgles_glGetDoublev
|
||||
#define glGetFloatv jwzgles_glGetFloatv
|
||||
#define glGetHistogram jwzgles_glGetHistogram
|
||||
#define glGetHistogramParameter jwzgles_glGetHistogramParameter
|
||||
#define glGetLightfv jwzgles_glGetLightfv
|
||||
#define glGetLightiv jwzgles_glGetLightiv
|
||||
#define glGetMapdv jwzgles_glGetMapdv
|
||||
#define glGetMapfv jwzgles_glGetMapfv
|
||||
#define glGetMapiv jwzgles_glGetMapiv
|
||||
#define glGetMaterialfv jwzgles_glGetMaterialfv
|
||||
#define glGetMaterialiv jwzgles_glGetMaterialiv
|
||||
#define glGetPixelMapfv jwzgles_glGetPixelMapfv
|
||||
#define glGetPixelMapuiv jwzgles_glGetPixelMapuiv
|
||||
#define glGetPixelMapusv jwzgles_glGetPixelMapusv
|
||||
#define glGetPointerv jwzgles_glGetPointerv
|
||||
#define glGetPolygonStipple jwzgles_glGetPolygonStipple
|
||||
#define glGetSeparableFilter jwzgles_glGetSeparableFilter
|
||||
#define glGetTexEnvfv jwzgles_glGetTexEnvfv
|
||||
#define glGetTexEnviv jwzgles_glGetTexEnviv
|
||||
#define glGetTexGendv jwzgles_glGetTexGendv
|
||||
#define glGetTexGenfv jwzgles_glGetTexGenfv
|
||||
#define glGetTexGeniv jwzgles_glGetTexGeniv
|
||||
#define glGetTexImage jwzgles_glGetTexImage
|
||||
#define glGetTexImage1D jwzgles_glGetTexImage1D
|
||||
#define glGetTexImage2D jwzgles_glGetTexImage2D
|
||||
#define glGetTexImage3D jwzgles_glGetTexImage3D
|
||||
#define glGetTexLevelParameterfv jwzgles_glGetTexLevelParameterfv
|
||||
//#define glGetTexLevelParameteriv jwzgles_glGetTexLevelParameteriv
|
||||
#define glGetTexParameterfv jwzgles_glGetTexParameterfv
|
||||
//#define glGetTexParameteriv jwzgles_glGetTexParameteriv
|
||||
#define glHistogram jwzgles_glHistogram
|
||||
#define glIndex jwzgles_glIndex
|
||||
#define glIndexMask jwzgles_glIndexMask
|
||||
#define glIndexPointer jwzgles_glIndexPointer
|
||||
#define glIndexd jwzgles_glIndexd
|
||||
#define glIndexdv jwzgles_glIndexdv
|
||||
#define glIndexf jwzgles_glIndexf
|
||||
#define glIndexfv jwzgles_glIndexfv
|
||||
/*#define glIndexi jwzgles_glIndexi*/
|
||||
#define glIndexiv jwzgles_glIndexiv
|
||||
#define glIndexs jwzgles_glIndexs
|
||||
#define glIndexsv jwzgles_glIndexsv
|
||||
#define glIndexub jwzgles_glIndexub
|
||||
#define glIndexubv jwzgles_glIndexubv
|
||||
#define glInitNames jwzgles_glInitNames
|
||||
#define glInterleavedArrays jwzgles_glInterleavedArrays
|
||||
#define glIsEnabled jwzgles_glIsEnabled
|
||||
#define glIsList jwzgles_glIsList
|
||||
#define glIsTexture jwzgles_glIsTexture
|
||||
#define glLightModeli jwzgles_glLightModeli
|
||||
#define glLightModeliv jwzgles_glLightModeliv
|
||||
#define glLighti jwzgles_glLighti
|
||||
#define glLightiv jwzgles_glLightiv
|
||||
#define glLightf jwzgles_glLightf
|
||||
#define glLightfv jwzgles_glLightfv
|
||||
#define glLineStipple jwzgles_glLineStipple
|
||||
#define glListBase jwzgles_glListBase
|
||||
#define glLoadMatrix jwzgles_glLoadMatrix
|
||||
#define glLoadName jwzgles_glLoadName
|
||||
#define glLoadTransposeMatrix jwzgles_glLoadTransposeMatrix
|
||||
#define glLoadTransposeMatrixf jwzgles_glLoadTransposeMatrixf
|
||||
#define glMap1d jwzgles_glMap1d
|
||||
#define glMap1f jwzgles_glMap1f
|
||||
#define glMap2d jwzgles_glMap2d
|
||||
#define glMap2f jwzgles_glMap2f
|
||||
#define glMapGrid1d jwzgles_glMapGrid1d
|
||||
#define glMapGrid1f jwzgles_glMapGrid1f
|
||||
#define glMapGrid2d jwzgles_glMapGrid2d
|
||||
#define glMapGrid2f jwzgles_glMapGrid2f
|
||||
#define glMateriali jwzgles_glMateriali
|
||||
#define glMaterialiv jwzgles_glMaterialiv
|
||||
#define glMultTransposeMatrix jwzgles_glMultTransposeMatrix
|
||||
#define glMultTransposeMatrixf jwzgles_glMultTransposeMatrixf
|
||||
#define glNewList jwzgles_glNewList
|
||||
#define glNormal3b jwzgles_glNormal3b
|
||||
#define glNormal3bv jwzgles_glNormal3bv
|
||||
#define glNormal3d jwzgles_glNormal3f
|
||||
#define glNormal3dv jwzgles_glNormal3dv
|
||||
#define glNormal3fv jwzgles_glNormal3fv
|
||||
#define glNormal3i jwzgles_glNormal3i
|
||||
#define glNormal3iv jwzgles_glNormal3iv
|
||||
#define glNormal3s jwzgles_glNormal3s
|
||||
#define glNormal3sv jwzgles_glNormal3sv
|
||||
#define glOrtho jwzgles_glOrtho
|
||||
#define glPassThrough jwzgles_glPassThrough
|
||||
#define glPixelMapfv jwzgles_glPixelMapfv
|
||||
#define glPixelMapuiv jwzgles_glPixelMapuiv
|
||||
#define glPixelMapusv jwzgles_glPixelMapusv
|
||||
#define glPixelStoref jwzgles_glPixelStoref
|
||||
#define glPixelTransferf jwzgles_glPixelTransferf
|
||||
#define glPixelTransferi jwzgles_glPixelTransferi
|
||||
#define glPixelZoom jwzgles_glPixelZoom
|
||||
#define glPolygonMode jwzgles_glPolygonMode
|
||||
#define glPolygonStipple jwzgles_glPolygonStipple
|
||||
#define glPopAttrib jwzgles_glPopAttrib
|
||||
#define glPopClientAttrib jwzgles_glPopClientAttrib
|
||||
#define glPopName jwzgles_glPopName
|
||||
#define glPrioritizeTextures jwzgles_glPrioritizeTextures
|
||||
#define glPushAttrib jwzgles_glPushAttrib
|
||||
#define glPushClientAttrib jwzgles_glPushClientAttrib
|
||||
#define glPushName jwzgles_glPushName
|
||||
#define glRasterPos2d jwzgles_glRasterPos2d
|
||||
#define glRasterPos2dv jwzgles_glRasterPos2dv
|
||||
#define glRasterPos2f jwzgles_glRasterPos2f
|
||||
#define glRasterPos2fv jwzgles_glRasterPos2fv
|
||||
#define glRasterPos2i jwzgles_glRasterPos2i
|
||||
#define glRasterPos2iv jwzgles_glRasterPos2iv
|
||||
#define glRasterPos2s jwzgles_glRasterPos2s
|
||||
#define glRasterPos2sv jwzgles_glRasterPos2sv
|
||||
#define glRasterPos3d jwzgles_glRasterPos3d
|
||||
#define glRasterPos3dv jwzgles_glRasterPos3dv
|
||||
#define glRasterPos3f jwzgles_glRasterPos3f
|
||||
#define glRasterPos3fv jwzgles_glRasterPos3fv
|
||||
#define glRasterPos3i jwzgles_glRasterPos3i
|
||||
#define glRasterPos3iv jwzgles_glRasterPos3iv
|
||||
#define glRasterPos3s jwzgles_glRasterPos3s
|
||||
#define glRasterPos3sv jwzgles_glRasterPos3sv
|
||||
#define glRasterPos4d jwzgles_glRasterPos4d
|
||||
#define glRasterPos4dv jwzgles_glRasterPos4dv
|
||||
#define glRasterPos4f jwzgles_glRasterPos4f
|
||||
#define glRasterPos4fv jwzgles_glRasterPos4fv
|
||||
//#define glRasterPos4i jwzgles_glRasterPos4i
|
||||
#define glRasterPos4iv jwzgles_glRasterPos4iv
|
||||
#define glRasterPos4s jwzgles_glRasterPos4s
|
||||
#define glRasterPos4sv jwzgles_glRasterPos4sv
|
||||
#define glReadBuffer jwzgles_glReadBuffer
|
||||
#define glRectd jwzgles_glRectf
|
||||
#define glRectdv jwzgles_glRectdv
|
||||
#define glRectf jwzgles_glRectf
|
||||
#define glRectfv jwzgles_glRectfv
|
||||
#define glRecti jwzgles_glRecti
|
||||
#define glRectiv jwzgles_glRectiv
|
||||
#define glRects jwzgles_glRects
|
||||
#define glRectsv jwzgles_glRectsv
|
||||
#define glRenderMode jwzgles_glRenderMode
|
||||
#define glResetHistogram jwzgles_glResetHistogram
|
||||
#define glResetMinmax jwzgles_glResetMinmax
|
||||
#define glRotated jwzgles_glRotated
|
||||
#define glScaled jwzgles_glScalef
|
||||
#define glSelectBuffer jwzgles_glSelectBuffer
|
||||
#define glSeparableFilter2D jwzgles_glSeparableFilter2D
|
||||
#define glTexCoord1d jwzgles_glTexCoord1d
|
||||
#define glTexCoord1dv jwzgles_glTexCoord1dv
|
||||
#define glTexCoord1f jwzgles_glTexCoord1f
|
||||
#define glTexCoord1fv jwzgles_glTexCoord1fv
|
||||
#define glTexCoord1i jwzgles_glTexCoord1i
|
||||
#define glTexCoord1iv jwzgles_glTexCoord1iv
|
||||
#define glTexCoord1s jwzgles_glTexCoord1s
|
||||
#define glTexCoord1sv jwzgles_glTexCoord1sv
|
||||
#define glTexCoord2d jwzgles_glTexCoord2f
|
||||
#define glTexCoord2dv jwzgles_glTexCoord2dv
|
||||
#define glTexCoord2f jwzgles_glTexCoord2f
|
||||
#define glTexCoord2fv jwzgles_glTexCoord2fv
|
||||
#define glTexCoord2i jwzgles_glTexCoord2i
|
||||
#define glTexCoord2iv jwzgles_glTexCoord2iv
|
||||
#define glTexCoord2s jwzgles_glTexCoord2s
|
||||
#define glTexCoord2sv jwzgles_glTexCoord2sv
|
||||
#define glTexCoord3d jwzgles_glTexCoord3d
|
||||
#define glTexCoord3dv jwzgles_glTexCoord3dv
|
||||
#define glTexCoord3f jwzgles_glTexCoord3f
|
||||
#define glTexCoord3fv jwzgles_glTexCoord3fv
|
||||
#define glTexCoord3i jwzgles_glTexCoord3i
|
||||
#define glTexCoord3iv jwzgles_glTexCoord3iv
|
||||
#define glTexCoord3s jwzgles_glTexCoord3s
|
||||
#define glTexCoord3sv jwzgles_glTexCoord3sv
|
||||
#define glTexCoord4d jwzgles_glTexCoord4d
|
||||
#define glTexCoord4dv jwzgles_glTexCoord4dv
|
||||
#define glTexCoord4f jwzgles_glTexCoord4f
|
||||
#define glTexCoord4fv jwzgles_glTexCoord4fv
|
||||
#define glTexCoord4i jwzgles_glTexCoord4i
|
||||
#define glTexCoord4iv jwzgles_glTexCoord4iv
|
||||
#define glTexCoord4s jwzgles_glTexCoord4s
|
||||
#define glTexCoord4sv jwzgles_glTexCoord4sv
|
||||
#define glTexEnvi jwzgles_glTexEnvi
|
||||
#define glTexEnviv jwzgles_glTexEnviv
|
||||
#define glTexGend jwzgles_glTexGend
|
||||
#define glTexGendv jwzgles_glTexGendv
|
||||
#define glTexGenf jwzgles_glTexGenf
|
||||
#define glTexGenfv jwzgles_glTexGenfv
|
||||
#define glTexGeni jwzgles_glTexGeni
|
||||
#define glTexGeniv jwzgles_glTexGeniv
|
||||
#define glTexImage1D jwzgles_glTexImage1D
|
||||
#define glTexImage3D jwzgles_glTexImage3D
|
||||
#define glTexParameterfv jwzgles_glTexParameterfv
|
||||
#define glTexParameteri jwzgles_glTexParameteri
|
||||
#define glTexParameteriv jwzgles_glTexParameteriv
|
||||
#define glTexSubImage1D jwzgles_glTexSubImage1D
|
||||
#define glTexSubImage3D jwzgles_glTexSubImage3D
|
||||
#define glTranslated jwzgles_glTranslatef
|
||||
#define glVertex2d jwzgles_glVertex2d
|
||||
#define glVertex2dv jwzgles_glVertex2dv
|
||||
#define glVertex2f jwzgles_glVertex2f
|
||||
#define glVertex2fv jwzgles_glVertex2fv
|
||||
#define glVertex2i jwzgles_glVertex2i
|
||||
#define glVertex2iv jwzgles_glVertex2iv
|
||||
#define glVertex2s jwzgles_glVertex2s
|
||||
#define glVertex2sv jwzgles_glVertex2sv
|
||||
#define glVertex3d jwzgles_glVertex3f
|
||||
#define glVertex3dv jwzgles_glVertex3dv
|
||||
#define glVertex3f jwzgles_glVertex3f
|
||||
#define glVertex3fv jwzgles_glVertex3fv
|
||||
#define glVertex3i jwzgles_glVertex3i
|
||||
#define glVertex3iv jwzgles_glVertex3iv
|
||||
#define glVertex3s jwzgles_glVertex3s
|
||||
#define glVertex3sv jwzgles_glVertex3sv
|
||||
#define glVertex4d jwzgles_glVertex4d
|
||||
#define glVertex4dv jwzgles_glVertex4dv
|
||||
#define glVertex4f jwzgles_glVertex4f
|
||||
#define glVertex4fv jwzgles_glVertex4fv
|
||||
#define glVertex4i jwzgles_glVertex4i
|
||||
#define glVertex4iv jwzgles_glVertex4iv
|
||||
#define glVertex4s jwzgles_glVertex4s
|
||||
#define glVertex4sv jwzgles_glVertex4sv
|
||||
|
||||
#define gluOrtho2D(L,R,B,T) glOrtho(L,R,B,T,-1,1)
|
||||
#define gluPerspective jwzgles_gluPerspective
|
||||
|
||||
#define glXChooseVisual jwzgles_glXChooseVisual
|
||||
#define glXCopyContext jwzgles_glXCopyContext
|
||||
/*#define glXCreateContext jwzgles_glXCreateContext*/
|
||||
#define glXCreateGLXPixmap jwzgles_glXCreateGLXPixmap
|
||||
#define glXDestroyContext jwzgles_glXDestroyContext
|
||||
#define glXDestroyGLXPixmap jwzgles_glXDestroyGLXPixmap
|
||||
#define glXFreeContextEXT jwzgles_glXFreeContextEXT
|
||||
#define glXGetClientString jwzgles_glXGetClientString
|
||||
#define glXGetConfig jwzgles_glXGetConfig
|
||||
#define glXGetContextIDEXT jwzgles_glXGetContextIDEXT
|
||||
#define glXGetCurrentContext jwzgles_glXGetCurrentContext
|
||||
#define glXGetCurrentDisplay jwzgles_glXGetCurrentDisplay
|
||||
#define glXGetCurrentDrawable jwzgles_glXGetCurrentDrawable
|
||||
#define glXImportContextEXT jwzgles_glXImportContextEXT
|
||||
#define glXIntro jwzgles_glXIntro
|
||||
#define glXIsDirect jwzgles_glXIsDirect
|
||||
/*#define glXMakeCurrent jwzgles_glXMakeCurrent*/
|
||||
#define glXQueryContextInfoEXT jwzgles_glXQueryContextInfoEXT
|
||||
#define glXQueryExtension jwzgles_glXQueryExtension
|
||||
#define glXQueryExtensionsString jwzgles_glXQueryExtensionsString
|
||||
#define glXQueryServerString jwzgles_glXQueryServerString
|
||||
#define glXQueryVersion jwzgles_glXQueryVersion
|
||||
/*#define glXSwapBuffers jwzgles_glXSwapBuffers*/
|
||||
#define glXUseXFont jwzgles_glXUseXFont
|
||||
#define glXWaitGL jwzgles_glXWaitGL
|
||||
#define glXWaitX jwzgles_glXWaitX
|
||||
|
||||
#define gluBeginCurve jwzgles_gluBeginCurve
|
||||
#define gluBeginPolygon jwzgles_gluBeginPolygon
|
||||
#define gluBeginSurface jwzgles_gluBeginSurface
|
||||
#define gluBeginTrim jwzgles_gluBeginTrim
|
||||
#define gluBuild1DMipmaps jwzgles_gluBuild1DMipmaps
|
||||
#define gluBuild2DMipmaps jwzgles_gluBuild2DMipmaps
|
||||
#define gluCylinder jwzgles_gluCylinder
|
||||
#define gluDeleteNurbsRenderer jwzgles_gluDeleteNurbsRenderer
|
||||
#define gluDeleteQuadric jwzgles_gluDeleteQuadric
|
||||
#define gluDeleteTess jwzgles_gluDeleteTess
|
||||
#define gluDisk jwzgles_gluDisk
|
||||
#define gluEndCurve jwzgles_gluEndCurve
|
||||
#define gluEndPolygon jwzgles_gluEndPolygon
|
||||
#define gluEndSurface jwzgles_gluEndSurface
|
||||
#define gluEndTrim jwzgles_gluEndTrim
|
||||
#define gluErrorString jwzgles_gluErrorString
|
||||
#define gluGetNurbsProperty jwzgles_gluGetNurbsProperty
|
||||
#define gluGetString jwzgles_gluGetString
|
||||
#define gluGetTessProperty jwzgles_gluGetTessProperty
|
||||
#define gluLoadSamplingMatrices jwzgles_gluLoadSamplingMatrices
|
||||
#define gluLookAt jwzgles_gluLookAt
|
||||
#define gluNewNurbsRenderer jwzgles_gluNewNurbsRenderer
|
||||
#define gluNewQuadric jwzgles_gluNewQuadric
|
||||
#define gluNewTess jwzgles_gluNewTess
|
||||
#define gluNextContour jwzgles_gluNextContour
|
||||
#define gluNurbsCallback jwzgles_gluNurbsCallback
|
||||
#define gluNurbsCurve jwzgles_gluNurbsCurve
|
||||
#define gluNurbsProperty jwzgles_gluNurbsProperty
|
||||
#define gluNurbsSurface jwzgles_gluNurbsSurface
|
||||
#define gluPartialDisk jwzgles_gluPartialDisk
|
||||
#define gluPickMatrix jwzgles_gluPickMatrix
|
||||
#define gluProject jwzgles_gluProject
|
||||
#define gluPwlCurve jwzgles_gluPwlCurve
|
||||
#define gluQuadricCallback jwzgles_gluQuadricCallback
|
||||
#define gluQuadricDrawStyle jwzgles_gluQuadricDrawStyle
|
||||
#define gluQuadricNormals jwzgles_gluQuadricNormals
|
||||
#define gluQuadricOrientation jwzgles_gluQuadricOrientation
|
||||
#define gluQuadricTexture jwzgles_gluQuadricTexture
|
||||
#define gluScaleImage jwzgles_gluScaleImage
|
||||
#define gluSphere jwzgles_gluSphere
|
||||
#define gluTessBeginContour jwzgles_gluTessBeginContour
|
||||
#define gluTessBeginPolygon jwzgles_gluTessBeginPolygon
|
||||
#define gluTessCallback jwzgles_gluTessCallback
|
||||
#define gluTessEndPolygon jwzgles_gluTessEndPolygon
|
||||
#define gluTessEndContour jwzgles_gluTessEndContour
|
||||
#define gluTessNormal jwzgles_gluTessNormal
|
||||
#define gluTessProperty jwzgles_gluTessProperty
|
||||
#define gluTessVertex jwzgles_gluTessVertex
|
||||
#define gluUnProject jwzgles_gluUnProject
|
||||
|
||||
|
||||
/* These functions are present in both OpenGL 1.1 and in OpenGLES 1,
|
||||
but are allowed within glNewList/glEndList, so we must wrap them
|
||||
to allow them to be recorded.
|
||||
*/
|
||||
#define glActiveTexture jwzgles_glActiveTexture
|
||||
#define glAlphaFunc jwzgles_glAlphaFunc
|
||||
#define glBindTexture jwzgles_glBindTexture
|
||||
#define glBlendFunc jwzgles_glBlendFunc
|
||||
#define glClear jwzgles_glClear
|
||||
#define glClearColor jwzgles_glClearColor
|
||||
#define glClearStencil jwzgles_glClearStencil
|
||||
#define glColor4f jwzgles_glColor4f
|
||||
#define glColorMask jwzgles_glColorMask
|
||||
#define glColorPointer jwzgles_glColorPointer
|
||||
#define glCompressedTexImage2D jwzgles_glCompressedTexImage2D
|
||||
#define glCompressedTexSubImage2D jwzgles_glCompressedTexSubImage2D
|
||||
#define glCopyTexImage2D jwzgles_glCopyTexImage2D
|
||||
#define glCopyTexSubImage2D jwzgles_glCopyTexSubImage2D
|
||||
#define glCullFace jwzgles_glCullFace
|
||||
#define glDeleteTextures jwzgles_glDeleteTextures
|
||||
#define glDepthFunc jwzgles_glDepthFunc
|
||||
#define glDepthMask jwzgles_glDepthMask
|
||||
#define glDisable jwzgles_glDisable
|
||||
#define glDrawArrays jwzgles_glDrawArrays
|
||||
#define glDrawElements jwzgles_glDrawElements
|
||||
#define glEnable jwzgles_glEnable
|
||||
#define glFinish jwzgles_glFinish
|
||||
#define glFlush jwzgles_glFlush
|
||||
#define glFogf jwzgles_glFogf
|
||||
#define glFogfv jwzgles_glFogfv
|
||||
#define glFrontFace jwzgles_glFrontFace
|
||||
#define glGenTextures jwzgles_glGenTextures
|
||||
#define glGetIntegerv jwzgles_glGetIntegerv
|
||||
#define glHint jwzgles_glHint
|
||||
#define glLightModelf jwzgles_glLightModelf
|
||||
#define glLightModelfv jwzgles_glLightModelfv
|
||||
#define glLightf jwzgles_glLightf
|
||||
#define glLightfv jwzgles_glLightfv
|
||||
#define glLineWidth jwzgles_glLineWidth
|
||||
#define glLoadIdentity jwzgles_glLoadIdentity
|
||||
#define glLoadMatrixf jwzgles_glLoadMatrixf
|
||||
#define glLogicOp jwzgles_glLogicOp
|
||||
#define glMaterialf jwzgles_glMaterialf
|
||||
#define glMateriali jwzgles_glMateriali
|
||||
#define glMaterialfv jwzgles_glMaterialfv
|
||||
#define glMaterialiv jwzgles_glMaterialiv
|
||||
#define glMatrixMode jwzgles_glMatrixMode
|
||||
#define glMultMatrixf jwzgles_glMultMatrixf
|
||||
#define glNormal3f jwzgles_glNormal3f
|
||||
#define glNormalPointer jwzgles_glNormalPointer
|
||||
#define glPixelStorei jwzgles_glPixelStorei
|
||||
#define glPointSize jwzgles_glPointSize
|
||||
#define glPolygonOffset jwzgles_glPolygonOffset
|
||||
#define glPopMatrix jwzgles_glPopMatrix
|
||||
#define glPushMatrix jwzgles_glPushMatrix
|
||||
#define glReadPixels jwzgles_glReadPixels
|
||||
#define glRotatef jwzgles_glRotatef
|
||||
#define glScalef jwzgles_glScalef
|
||||
#define glSampleCoverage jwzgles_glSampleCoverage
|
||||
#define glScissor jwzgles_glScissor
|
||||
#define glShadeModel jwzgles_glShadeModel
|
||||
#define glStencilFunc jwzgles_glStencilFunc
|
||||
#define glStencilMask jwzgles_glStencilMask
|
||||
#define glStencilOp jwzgles_glStencilOp
|
||||
#define glTexCoordPointer jwzgles_glTexCoordPointer
|
||||
#define glTexEnvf jwzgles_glTexEnvf
|
||||
#define glTexEnvfv jwzgles_glTexEnvfv
|
||||
#define glTexImage2D jwzgles_glTexImage2D
|
||||
#define glTexParameterf jwzgles_glTexParameterf
|
||||
#define glTexSubImage2D jwzgles_glTexSubImage2D
|
||||
#define glTranslatef jwzgles_glTranslatef
|
||||
#define glVertexPointer jwzgles_glVertexPointer
|
||||
#define glViewport jwzgles_glViewport
|
||||
#define glEnableClientState jwzgles_glEnableClientState
|
||||
#define glDisableClientState jwzgles_glDisableClientState
|
||||
#define glClipPlane jwzgles_glClipPlane
|
||||
|
||||
|
||||
#define glGetError jwzgles_glGetError
|
||||
#define glGetString jwzgles_glGetString
|
||||
|
||||
#endif /* __JWZGLES_H__ */
|
353
polymer/eduke32/build/include/jwzglesI.h
Normal file
353
polymer/eduke32/build/include/jwzglesI.h
Normal file
|
@ -0,0 +1,353 @@
|
|||
/* xscreensaver, Copyright (c) 2012-2014 Jamie Zawinski <jwz@jwz.org>
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation. No representations are made about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without express or
|
||||
* implied warranty.
|
||||
*/
|
||||
|
||||
/* A compatibility shim to allow OpenGL 1.3 source code to work in an
|
||||
OpenGLES environment, where almost every OpenGL 1.3 function has
|
||||
been "deprecated". See jwzgles.c for details.
|
||||
*/
|
||||
|
||||
#ifndef __JWZGLES_I_H__
|
||||
#define __JWZGLES_I_H__
|
||||
|
||||
#ifdef GL_VERSION_ES_CM_1_0 /* compiling against OpenGLES 1.x */
|
||||
|
||||
/* These OpenGL 1.3 constants are not present in OpenGLES 1.
|
||||
Fortunately, it looks like they didn't re-use any of the numbers,
|
||||
so we can just keep using the OpenGL 1.3 values. I'm actually
|
||||
kind of shocked that the GLES folks passed up that opportunity
|
||||
for further clusterfuckery.
|
||||
*/
|
||||
# define GLdouble double
|
||||
|
||||
# define GL_ACCUM_BUFFER_BIT 0x00000200
|
||||
# define GL_ALL_ATTRIB_BITS 0x000FFFFF
|
||||
# define GL_AUTO_NORMAL 0x0D80
|
||||
# define GL_BLEND_SRC_ALPHA 0x80CB
|
||||
# define GL_C3F_V3F 0x2A24
|
||||
# define GL_C4F_N3F_V3F 0x2A26
|
||||
# define GL_C4UB_V2F 0x2A22
|
||||
# define GL_C4UB_V3F 0x2A23
|
||||
# define GL_CLAMP 0x2900
|
||||
# define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
# define GL_COLOR_MATERIAL_FACE 0x0B55
|
||||
# define GL_COLOR_MATERIAL_PARAMETER 0x0B56
|
||||
# define GL_COMPILE 0x1300
|
||||
# define GL_CURRENT_BIT 0x00000001
|
||||
# define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
# define GL_DOUBLEBUFFER 0x0C32
|
||||
# define GL_ENABLE_BIT 0x00002000
|
||||
# define GL_EVAL_BIT 0x00010000
|
||||
# define GL_EYE_LINEAR 0x2400
|
||||
# define GL_EYE_PLANE 0x2502
|
||||
# define GL_FEEDBACK 0x1C01
|
||||
# define GL_FILL 0x1B02
|
||||
# define GL_FOG_BIT 0x00000080
|
||||
# define GL_HINT_BIT 0x00008000
|
||||
# define GL_INTENSITY 0x8049
|
||||
# define GL_LIGHTING_BIT 0x00000040
|
||||
# define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8
|
||||
# define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
|
||||
# define GL_LINE 0x1B01
|
||||
# define GL_LINE_BIT 0x00000004
|
||||
# define GL_LIST_BIT 0x00020000
|
||||
# define GL_N3F_V3F 0x2A25
|
||||
# define GL_OBJECT_LINEAR 0x2401
|
||||
# define GL_OBJECT_PLANE 0x2501
|
||||
# define GL_PIXEL_MODE_BIT 0x00000020
|
||||
# define GL_POINT_BIT 0x00000002
|
||||
# define GL_POLYGON 0x0009
|
||||
# define GL_POLYGON_BIT 0x00000008
|
||||
# define GL_POLYGON_MODE 0x0B40
|
||||
# define GL_POLYGON_SMOOTH 0x0B41
|
||||
# define GL_POLYGON_STIPPLE 0x0B42
|
||||
# define GL_POLYGON_STIPPLE_BIT 0x00000010
|
||||
# define GL_Q 0x2003
|
||||
# define GL_QUADS 0x0007
|
||||
# define GL_QUAD_STRIP 0x0008
|
||||
# define GL_R 0x2002
|
||||
# define GL_RENDER 0x1C00
|
||||
# define GL_RGBA_MODE 0x0C31
|
||||
# define GL_S 0x2000
|
||||
# define GL_SCISSOR_BIT 0x00080000
|
||||
# define GL_SELECT 0x1C02
|
||||
# define GL_SEPARATE_SPECULAR_COLOR 0x81FA
|
||||
# define GL_SINGLE_COLOR 0x81F9
|
||||
# define GL_SPHERE_MAP 0x2402
|
||||
# define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
# define GL_T 0x2001
|
||||
# define GL_T2F_C3F_V3F 0x2A2A
|
||||
# define GL_T2F_C4F_N3F_V3F 0x2A2C
|
||||
# define GL_T2F_C4UB_V3F 0x2A29
|
||||
# define GL_T2F_N3F_V3F 0x2A2B
|
||||
# define GL_T2F_V3F 0x2A27
|
||||
# define GL_T4F_C4F_N3F_V4F 0x2A2D
|
||||
# define GL_T4F_V4F 0x2A28
|
||||
# define GL_TEXTURE_1D 0x0DE0
|
||||
# define GL_TEXTURE_ALPHA_SIZE 0x805F
|
||||
# define GL_TEXTURE_BIT 0x00040000
|
||||
# define GL_TEXTURE_BLUE_SIZE 0x805E
|
||||
# define GL_TEXTURE_BORDER 0x1005
|
||||
# define GL_TEXTURE_BORDER_COLOR 0x1004
|
||||
# define GL_TEXTURE_COMPONENTS 0x1003
|
||||
# define GL_TEXTURE_GEN_MODE 0x2500
|
||||
# define GL_TEXTURE_GEN_Q 0x0C63
|
||||
# define GL_TEXTURE_GEN_R 0x0C62
|
||||
# define GL_TEXTURE_GEN_S 0x0C60
|
||||
# define GL_TEXTURE_GEN_T 0x0C61
|
||||
# define GL_TEXTURE_GREEN_SIZE 0x805D
|
||||
# define GL_TEXTURE_HEIGHT 0x1001
|
||||
# define GL_TEXTURE_INTENSITY_SIZE 0x8061
|
||||
# define GL_TEXTURE_LUMINANCE_SIZE 0x8060
|
||||
# define GL_TEXTURE_RED_SIZE 0x805C
|
||||
# define GL_TEXTURE_WIDTH 0x1000
|
||||
# define GL_TRANSFORM_BIT 0x00001000
|
||||
# define GL_UNPACK_ROW_LENGTH 0x0CF2
|
||||
# define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
|
||||
# define GL_V2F 0x2A20
|
||||
# define GL_V3F 0x2A21
|
||||
# define GL_VIEWPORT_BIT 0x00000800
|
||||
# define GL_INT 0x1404
|
||||
# define GL_DOUBLE 0x140A
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
extern void jwzgles_reset (void);
|
||||
|
||||
|
||||
/* Prototypes for the things re-implemented in jwzgles.c
|
||||
*/
|
||||
|
||||
extern int jwzgles_glGenLists (int n);
|
||||
extern void jwzgles_glNewList (int id, int mode);
|
||||
extern void jwzgles_glEndList (void);
|
||||
extern void jwzgles_glDeleteLists (int list, int range);
|
||||
extern void jwzgles_glBegin (int mode);
|
||||
extern void jwzgles_glNormal3fv (const GLfloat *);
|
||||
extern void jwzgles_glNormal3f (GLfloat x, GLfloat y, GLfloat z);
|
||||
extern void jwzgles_glTexCoord1f (GLfloat s);
|
||||
extern void jwzgles_glTexCoord2fv (const GLfloat *);
|
||||
extern void jwzgles_glTexCoord2f (GLfloat s, GLfloat t);
|
||||
extern void jwzgles_glTexCoord2i (GLint s, GLint t);
|
||||
extern void jwzgles_glTexCoord3fv (const GLfloat *);
|
||||
extern void jwzgles_glTexCoord3f (GLfloat s, GLfloat t, GLfloat r);
|
||||
extern void jwzgles_glTexCoord4fv (const GLfloat *);
|
||||
extern void jwzgles_glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
extern void jwzgles_glVertex2f (GLfloat x, GLfloat y);
|
||||
extern void jwzgles_glVertex2fv (const GLfloat *);
|
||||
extern void jwzgles_glVertex2i (GLint x, GLint y);
|
||||
extern void jwzgles_glVertex3f (GLfloat x, GLfloat y, GLfloat z);
|
||||
extern void jwzgles_glVertex3dv (const GLdouble *);
|
||||
extern void jwzgles_glVertex3fv (const GLfloat *);
|
||||
extern void jwzgles_glVertex3i (GLint x, GLint y, GLint z);
|
||||
extern void jwzgles_glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
extern void jwzgles_glVertex4fv (const GLfloat *);
|
||||
extern void jwzgles_glVertex4i (GLint x, GLint y, GLint z, GLint w);
|
||||
extern void jwzgles_glEnd (void);
|
||||
extern void jwzgles_glCallList (int id);
|
||||
extern void jwzgles_glClearIndex(GLfloat c);
|
||||
extern void jwzgles_glBitmap (GLsizei, GLsizei, GLfloat, GLfloat, GLfloat,
|
||||
GLfloat, const GLubyte *);
|
||||
extern void jwzgles_glPushAttrib(int);
|
||||
extern void jwzgles_glPopAttrib(void);
|
||||
|
||||
|
||||
/* These functions are present in both OpenGL 1.3 and in OpenGLES 1,
|
||||
but are allowed within glNewList/glEndList, so we must wrap them
|
||||
to allow them to be recorded.
|
||||
*/
|
||||
extern void jwzgles_glActiveTexture (GLuint);
|
||||
extern void jwzgles_glBindTexture (GLuint, GLuint);
|
||||
extern void jwzgles_glBlendFunc (GLuint, GLuint);
|
||||
extern void jwzgles_glClear (GLuint);
|
||||
extern void jwzgles_glClearColor (GLclampf, GLclampf, GLclampf, GLclampf);
|
||||
extern void jwzgles_glClearStencil (GLuint);
|
||||
extern void jwzgles_glColorMask (GLuint, GLuint, GLuint, GLuint);
|
||||
extern void jwzgles_glCullFace (GLuint);
|
||||
extern void jwzgles_glDepthFunc (GLuint);
|
||||
extern void jwzgles_glDepthMask (GLuint);
|
||||
extern void jwzgles_glDisable (GLuint);
|
||||
extern void jwzgles_glDrawArrays (GLuint, GLuint, GLuint);
|
||||
extern GLboolean jwzgles_glIsEnabled (GLuint);
|
||||
extern void jwzgles_glEnable (GLuint);
|
||||
extern void jwzgles_glFrontFace (GLuint);
|
||||
extern void jwzgles_glHint (GLuint, GLuint);
|
||||
extern void jwzgles_glLineWidth (GLfloat);
|
||||
extern void jwzgles_glLoadIdentity (void);
|
||||
extern void jwzgles_glLogicOp (GLuint);
|
||||
extern void jwzgles_glMatrixMode (GLuint);
|
||||
extern void jwzgles_glMultMatrixf (const GLfloat *);
|
||||
extern void jwzgles_glLoadMatrixf (const GLfloat *);
|
||||
extern void jwzgles_glPointSize (GLfloat);
|
||||
extern void jwzgles_glPolygonOffset (GLfloat, GLfloat);
|
||||
extern void jwzgles_glPopMatrix (void);
|
||||
extern void jwzgles_glPushMatrix (void);
|
||||
extern void jwzgles_glScissor (GLuint, GLuint, GLuint, GLuint);
|
||||
extern void jwzgles_glShadeModel (GLuint);
|
||||
extern void jwzgles_glStencilFunc (GLuint, GLuint, GLuint);
|
||||
extern void jwzgles_glStencilMask (GLuint);
|
||||
extern void jwzgles_glStencilOp (GLuint, GLuint, GLuint);
|
||||
extern void jwzgles_glViewport (GLuint, GLuint, GLuint, GLuint);
|
||||
extern void jwzgles_glTranslatef (GLfloat, GLfloat, GLfloat);
|
||||
extern void jwzgles_glRotatef (GLfloat, GLfloat, GLfloat, GLfloat);
|
||||
extern void jwzgles_glRotated (GLdouble, GLdouble x, GLdouble y, GLdouble z);
|
||||
extern void jwzgles_glScalef (GLfloat, GLfloat, GLfloat);
|
||||
extern void jwzgles_glColor3f (GLfloat, GLfloat, GLfloat);
|
||||
extern void jwzgles_glColor4f (GLfloat, GLfloat, GLfloat, GLfloat);
|
||||
extern void jwzgles_glColor3fv (const GLfloat *);
|
||||
extern void jwzgles_glColor4fv (const GLfloat *);
|
||||
extern void jwzgles_glColor3s (GLshort, GLshort, GLshort);
|
||||
extern void jwzgles_glColor4s (GLshort, GLshort, GLshort, GLshort);
|
||||
extern void jwzgles_glColor3sv (const GLshort *);
|
||||
extern void jwzgles_glColor4sv (const GLshort *);
|
||||
extern void jwzgles_glColor3us (GLushort, GLushort, GLushort);
|
||||
extern void jwzgles_glColor4us (GLushort, GLushort, GLushort, GLushort);
|
||||
extern void jwzgles_glColor3usv (const GLushort *);
|
||||
extern void jwzgles_glColor4usv (const GLushort *);
|
||||
extern void jwzgles_glColor3d (GLdouble, GLdouble, GLdouble);
|
||||
extern void jwzgles_glColor4d (GLdouble, GLdouble, GLdouble, GLdouble);
|
||||
extern void jwzgles_glColor3dv (const GLdouble *);
|
||||
extern void jwzgles_glColor4dv (const GLdouble *);
|
||||
extern void jwzgles_glColor4i (GLint, GLint, GLint, GLint);
|
||||
extern void jwzgles_glColor3i (GLint, GLint, GLint);
|
||||
extern void jwzgles_glColor3iv (const GLint *);
|
||||
extern void jwzgles_glColor4iv (const GLint *);
|
||||
extern void jwzgles_glColor4ui (GLuint, GLuint, GLuint, GLuint);
|
||||
extern void jwzgles_glColor3ui (GLuint, GLuint, GLuint);
|
||||
extern void jwzgles_glColor3uiv (const GLuint *);
|
||||
extern void jwzgles_glColor4uiv (const GLuint *);
|
||||
extern void jwzgles_glColor4b (GLbyte, GLbyte, GLbyte, GLbyte);
|
||||
extern void jwzgles_glColor3b (GLbyte, GLbyte, GLbyte);
|
||||
extern void jwzgles_glColor4bv (const GLbyte *);
|
||||
extern void jwzgles_glColor3bv (const GLbyte *);
|
||||
extern void jwzgles_glColor4ub (GLubyte, GLubyte, GLubyte, GLubyte);
|
||||
extern void jwzgles_glColor3ub (GLubyte, GLubyte, GLubyte);
|
||||
extern void jwzgles_glColor4ubv (const GLubyte *);
|
||||
extern void jwzgles_glColor3ubv (const GLubyte *);
|
||||
extern void jwzgles_glMaterialf (GLuint, GLuint, GLfloat);
|
||||
extern void jwzgles_glMateriali (GLuint, GLuint, GLuint);
|
||||
extern void jwzgles_glMaterialfv (GLuint, GLuint, const GLfloat *);
|
||||
extern void jwzgles_glMaterialiv (GLuint, GLuint, const GLint *);
|
||||
extern void jwzgles_glFinish (void);
|
||||
extern void jwzgles_glFlush (void);
|
||||
extern void jwzgles_glPixelStorei (GLuint, GLuint);
|
||||
extern void jwzgles_glEnableClientState (GLuint);
|
||||
extern void jwzgles_glDisableClientState (GLuint);
|
||||
|
||||
extern void jwzgles_glInitNames (void);
|
||||
extern void jwzgles_glPushName (GLuint);
|
||||
extern GLuint jwzgles_glPopName (void);
|
||||
extern GLuint jwzgles_glRenderMode (GLuint);
|
||||
extern void jwzgles_glSelectBuffer (GLsizei, GLuint *);
|
||||
extern void jwzgles_glLightf (GLenum, GLenum, GLfloat);
|
||||
extern void jwzgles_glLighti (GLenum, GLenum, GLint);
|
||||
extern void jwzgles_glLightfv (GLenum, GLenum, const GLfloat *);
|
||||
extern void jwzgles_glLightiv (GLenum, GLenum, const GLint *);
|
||||
extern void jwzgles_glLightModelf (GLenum, GLfloat);
|
||||
extern void jwzgles_glLightModeli (GLenum, GLint);
|
||||
extern void jwzgles_glLightModelfv (GLenum, const GLfloat *);
|
||||
extern void jwzgles_glLightModeliv (GLenum, const GLint *);
|
||||
extern void jwzgles_glGenTextures (GLuint, GLuint *);
|
||||
extern void jwzgles_glFrustum (GLfloat, GLfloat, GLfloat, GLfloat,
|
||||
GLfloat, GLfloat);
|
||||
extern void jwzgles_glOrtho (GLfloat, GLfloat, GLfloat, GLfloat,
|
||||
GLfloat, GLfloat);
|
||||
extern void jwzgles_glTexImage1D (GLenum target, GLint level,
|
||||
GLint internalFormat,
|
||||
GLsizei width, GLint border,
|
||||
GLenum format, GLenum type,
|
||||
const GLvoid *pixels);
|
||||
extern void jwzgles_glTexImage2D (GLenum target,
|
||||
GLint level,
|
||||
GLint internalFormat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLint border,
|
||||
GLenum format,
|
||||
GLenum type,
|
||||
const GLvoid *data);
|
||||
extern void jwzgles_glTexSubImage2D (GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset,
|
||||
GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type,
|
||||
const GLvoid *pixels);
|
||||
extern void jwzgles_glCopyTexImage2D (GLenum target, GLint level,
|
||||
GLenum internalformat,
|
||||
GLint x, GLint y,
|
||||
GLsizei width, GLsizei height,
|
||||
GLint border);
|
||||
extern void jwzgles_glInterleavedArrays (GLenum, GLsizei, const GLvoid *);
|
||||
extern void jwzgles_glTexEnvf (GLuint, GLuint, GLfloat);
|
||||
extern void jwzgles_glTexEnvi (GLuint, GLuint, GLuint);
|
||||
extern void jwzgles_glTexParameterf (GLuint, GLuint, GLfloat);
|
||||
extern void jwzgles_glTexParameteri (GLuint, GLuint, GLuint);
|
||||
extern void jwzgles_glTexGeni (GLenum, GLenum, GLint);
|
||||
extern void jwzgles_glTexGenfv (GLenum, GLenum, const GLfloat *);
|
||||
extern void jwzgles_glGetTexGenfv (GLenum, GLenum, GLfloat *);
|
||||
extern void jwzgles_glRectf (GLfloat, GLfloat, GLfloat, GLfloat);
|
||||
extern void jwzgles_glRecti (GLint, GLint, GLint, GLint);
|
||||
extern void jwzgles_glLightModelfv (GLenum, const GLfloat *);
|
||||
extern void jwzgles_glClearDepth (GLfloat);
|
||||
extern GLboolean jwzgles_glIsList (GLuint);
|
||||
extern void jwzgles_glColorMaterial (GLenum, GLenum);
|
||||
extern void jwzgles_glPolygonMode (GLenum, GLenum);
|
||||
extern void jwzgles_glFogf (GLenum, GLfloat);
|
||||
extern void jwzgles_glFogi (GLenum, GLint);
|
||||
extern void jwzgles_glFogfv (GLenum, const GLfloat *);
|
||||
extern void jwzgles_glFogiv (GLenum, const GLint *);
|
||||
extern void jwzgles_glAlphaFunc (GLenum, GLfloat);
|
||||
extern void jwzgles_glClipPlane (GLenum, const GLdouble *);
|
||||
extern void jwzgles_glDrawBuffer (GLenum);
|
||||
extern void jwzgles_glDeleteTextures (GLuint, const GLuint *);
|
||||
|
||||
extern void jwzgles_gluPerspective (GLdouble fovy, GLdouble aspect,
|
||||
GLdouble near, GLdouble far);
|
||||
extern void jwzgles_gluLookAt (GLfloat eyex, GLfloat eyey, GLfloat eyez,
|
||||
GLfloat centerx, GLfloat centery,
|
||||
GLfloat centerz,
|
||||
GLfloat upx, GLfloat upy, GLfloat upz);
|
||||
extern GLint jwzgles_gluProject (GLdouble objx, GLdouble objy, GLdouble objz,
|
||||
const GLdouble modelMatrix[16],
|
||||
const GLdouble projMatrix[16],
|
||||
const GLint viewport[4],
|
||||
GLdouble *winx, GLdouble *winy,
|
||||
GLdouble *winz);
|
||||
extern int jwzgles_gluBuild2DMipmaps (GLenum target,
|
||||
GLint internalFormat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLenum format,
|
||||
GLenum type,
|
||||
const GLvoid *data);
|
||||
extern void jwzgles_glGetFloatv (GLenum pname, GLfloat *params);
|
||||
extern void jwzgles_glGetPointerv (GLenum pname, GLvoid *params);
|
||||
extern void jwzgles_glGetDoublev (GLenum pname, GLdouble *params);
|
||||
extern void jwzgles_glGetIntegerv (GLenum pname, GLint *params);
|
||||
extern void jwzgles_glGetBooleanv (GLenum pname, GLboolean *params);
|
||||
extern void jwzgles_glVertexPointer (GLuint, GLuint, GLuint, const void *);
|
||||
extern void jwzgles_glNormalPointer (GLenum, GLuint, const void *);
|
||||
extern void jwzgles_glColorPointer (GLuint, GLuint, GLuint, const void *);
|
||||
extern void jwzgles_glTexCoordPointer (GLuint, GLuint, GLuint, const void *);
|
||||
extern void jwzgles_glBindBuffer (GLuint, GLuint);
|
||||
extern void jwzgles_glBufferData (GLenum, GLsizeiptr, const void *, GLenum);
|
||||
extern const char *jwzgles_gluErrorString (GLenum error);
|
||||
|
||||
extern GLenum jwzgles_glGetError();
|
||||
extern const GLubyte * jwzgles_glGetString(GLenum name);
|
||||
|
||||
|
||||
typedef float GLclampd;
|
||||
|
||||
extern void jwzgles_glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
|
||||
extern void jwzgles_glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
extern void jwzgles_glDrawElements( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices );
|
||||
|
||||
#endif /* __JWZGLES_I_H__ */
|
1047
polymer/eduke32/build/src/glbuild_android.c
Normal file
1047
polymer/eduke32/build/src/glbuild_android.c
Normal file
File diff suppressed because it is too large
Load diff
4152
polymer/eduke32/build/src/jwzgles.c
Normal file
4152
polymer/eduke32/build/src/jwzgles.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -36,6 +36,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
extern void CONTROL_Android_ClearButton(int32_t whichbutton);
|
||||
extern void CONTROL_Android_PollDevices(ControlInfo *info);
|
||||
extern void CONTROL_Android_SetLastWeapon(int w);
|
||||
|
||||
extern void CONTROL_Android_ScrollMap(int32_t *angle,int32_t *x, int32_t *y, uint16_t *zoom );
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,4 @@
|
|||
#include "compat.h"
|
||||
#include "sdl_inc.h"
|
||||
#include "baselayer.h"
|
||||
#include "keys.h"
|
||||
|
@ -7,34 +8,45 @@
|
|||
#include "player.h"
|
||||
#include "game.h"
|
||||
#include "build.h"
|
||||
#include "anim.h"
|
||||
#include "player.h"
|
||||
|
||||
#include "jmact/keyboard.h"
|
||||
#include "jmact/control.h"
|
||||
#include "jmact/_control.h"
|
||||
|
||||
#include "menus.h"
|
||||
|
||||
#include "../src/video/android/SDL_androidkeyboard.h" // FIXME: include header locally if necessary
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
// #include "../src/video/android/SDL_androidkeyboard.h" // FIXME: include header locally if necessary
|
||||
//#include "../src/events/SDL_mouse_c.h"
|
||||
extern int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode);
|
||||
extern int SDL_SendKeyboardText(const char *text);
|
||||
extern int SDL_SendMouseMotion(SDL_Window * window, Uint32 mouseID, int relative, int x, int y);
|
||||
extern int SDL_SendMouseButton(SDL_Window * window, Uint32 mouseID, Uint8 state, Uint8 button);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "in_android.h"
|
||||
|
||||
#include <android/log.h>
|
||||
|
||||
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO,"DUKE", __VA_ARGS__))
|
||||
|
||||
extern int32_t main(int32_t argc, char *argv []);
|
||||
|
||||
extern int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode);
|
||||
extern int SDL_SendKeyboardText(const char *text);
|
||||
|
||||
static char sdl_text[2];
|
||||
|
||||
droidinput_t droidinput;
|
||||
|
||||
int PortableKeyEvent(int state, int code,int unicode)
|
||||
{
|
||||
LOGI("PortableKeyEvent %d %d %d",state,code,unicode);
|
||||
LOGI("PortableKeyEvent %d %d %d",state,(SDL_Scancode)code,unicode);
|
||||
|
||||
SDL_SendKeyboardKey(state ? SDL_PRESSED : SDL_RELEASED, code);
|
||||
SDL_SendKeyboardKey(state ? SDL_PRESSED : SDL_RELEASED, (SDL_Scancode)code);
|
||||
SDL_EventState(SDL_TEXTINPUT, SDL_ENABLE);
|
||||
|
||||
// if (code == 42)
|
||||
|
@ -58,6 +70,16 @@ int PortableKeyEvent(int state, int code,int unicode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void PortableMouseMenu(float x,float y)
|
||||
{
|
||||
SDL_SendMouseMotion(NULL,0,0,x,y);
|
||||
}
|
||||
|
||||
void PortableMouseMenuButton(int state,int button)
|
||||
{
|
||||
SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, state?SDL_PRESSED:SDL_RELEASED, SDL_BUTTON_LEFT);
|
||||
}
|
||||
|
||||
void changeActionState(int state, int action)
|
||||
{
|
||||
if (state)
|
||||
|
@ -102,13 +124,22 @@ void PortableAction(int state, int action)
|
|||
#endif
|
||||
|
||||
//Special toggle for crouch, NOT when using jetpack or in water
|
||||
if (!g_player[myconnectindex].ps->jetpack_on &&
|
||||
g_player[myconnectindex].ps->on_ground &&
|
||||
(sector[g_player[myconnectindex].ps->cursectnum].lotag != ST_2_UNDERWATER))
|
||||
if (droidinput.toggleCrouch)
|
||||
{
|
||||
if (toggleCrouch)
|
||||
int lotag = sector[g_player[myconnectindex].ps->cursectnum].lotag;
|
||||
|
||||
if (droidinput.crouchToggleState && (lotag == ST_2_UNDERWATER || lotag == ST_1_ABOVE_WATER))
|
||||
{
|
||||
droidinput.crouchToggleState = 0;
|
||||
if (action == gamefunc_Crouch)
|
||||
state = 0;
|
||||
else PortableAction(0, gamefunc_Crouch);
|
||||
}
|
||||
|
||||
if (action == gamefunc_Crouch)
|
||||
{
|
||||
if (!g_player[myconnectindex].ps->jetpack_on && g_player[myconnectindex].ps->on_ground &&
|
||||
lotag != ST_2_UNDERWATER && lotag != ST_1_ABOVE_WATER)
|
||||
{
|
||||
if (state)
|
||||
droidinput.crouchToggleState = !droidinput.crouchToggleState;
|
||||
|
@ -116,19 +147,25 @@ void PortableAction(int state, int action)
|
|||
state = droidinput.crouchToggleState;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Check if jumping while crouched
|
||||
if (action == gamefunc_Jump)
|
||||
{
|
||||
droidinput.crouchToggleState = 0;
|
||||
changeActionState(0, gamefunc_Crouch);
|
||||
if (droidinput.crouchToggleState)
|
||||
{
|
||||
droidinput.crouchToggleState = 0;
|
||||
changeActionState(0, gamefunc_Crouch);
|
||||
}
|
||||
else
|
||||
changeActionState(state, action);
|
||||
}
|
||||
|
||||
changeActionState(state, action);
|
||||
else
|
||||
changeActionState(state, action);
|
||||
|
||||
if (state == 2)
|
||||
PortableAction(0,action);
|
||||
PortableAction(0, action);
|
||||
|
||||
// LOGI("PortableAction state = 0x%016llX", CONTROL_ButtonState);
|
||||
}
|
||||
|
@ -137,6 +174,12 @@ void PortableAction(int state, int action)
|
|||
//Need these NAN check as not cumulative.
|
||||
void PortableMove(float fwd, float strafe)
|
||||
{
|
||||
if (!ud.auto_run)
|
||||
{
|
||||
fwd *= 0.5f;
|
||||
strafe *= 0.5f;
|
||||
}
|
||||
|
||||
if (!isnan(fwd))
|
||||
droidinput.forwardmove = fclamp2(fwd, -1.f, 1.f);
|
||||
|
||||
|
@ -164,13 +207,10 @@ void PortableCommand(const char * cmd)
|
|||
{
|
||||
OSD_Dispatch(cmd);
|
||||
}
|
||||
|
||||
|
||||
void PortableInit(int argc, const char ** argv)
|
||||
{
|
||||
//droidinput.left_double_action = -1;
|
||||
//droidinput.right_double_action = -1;
|
||||
|
||||
main(argc, argv);
|
||||
main(argc, ( char **)argv);
|
||||
}
|
||||
|
||||
int consoleShown = 0;
|
||||
|
@ -179,62 +219,63 @@ void AndroidSetConsoleShown(int onf)
|
|||
consoleShown = onf;
|
||||
}
|
||||
|
||||
extern int animation_playing;
|
||||
extern int inExtraScreens; //In game.c
|
||||
int32_t PortableRead(portableread_t r)
|
||||
{
|
||||
int32_t rv;
|
||||
|
||||
switch (r)
|
||||
{
|
||||
case READ_SCREEN_MODE:
|
||||
|
||||
if (animation_playing)
|
||||
return TOUCH_SCREEN_BLANK_TAP;
|
||||
else if (inExtraScreens)
|
||||
return TOUCH_SCREEN_BLANK_TAP;
|
||||
if (g_animPtr || inExtraScreens)
|
||||
rv = TOUCH_SCREEN_BLANK_TAP;
|
||||
else if (consoleShown)
|
||||
return TOUCH_SCREEN_CONSOLE;
|
||||
rv = TOUCH_SCREEN_CONSOLE;
|
||||
else if ((g_player[myconnectindex].ps->gm & MODE_MENU) == MODE_MENU)
|
||||
{
|
||||
//Then check if Yes/No menu
|
||||
if ((g_currentMenu == MENU_QUITTOTITLE) ||
|
||||
(g_currentMenu == MENU_RESETPLAYER ) ||
|
||||
((g_currentMenu == MENU_LOADVERIFY )) ||
|
||||
(g_currentMenu == MENU_NEWVERIFY ) ||
|
||||
((g_currentMenu == MENU_SAVEVERIFY )) ||
|
||||
(g_currentMenu == MENU_QUIT ) ||
|
||||
(g_currentMenu == MENU_QUITTOTITLE )
|
||||
)
|
||||
return TOUCH_SCREEN_YES_NO;
|
||||
else
|
||||
return TOUCH_SCREEN_MENU;
|
||||
}
|
||||
rv = (m_currentMenu->type == Verify) ? TOUCH_SCREEN_YES_NO : TOUCH_SCREEN_MENU;
|
||||
else if (ud.overhead_on == 2)
|
||||
return TOUCH_SCREEN_AUTOMAP;
|
||||
rv = TOUCH_SCREEN_AUTOMAP;
|
||||
else if ((g_player[myconnectindex].ps->gm & MODE_GAME))
|
||||
if (PortableRead(READ_IS_DEAD))
|
||||
return TOUCH_SCREEN_BLANK_TAP;
|
||||
rv = TOUCH_SCREEN_BLANK_TAP;
|
||||
else
|
||||
return TOUCH_SCREEN_GAME;
|
||||
rv = TOUCH_SCREEN_GAME;
|
||||
else
|
||||
return TOUCH_SCREEN_BLANK_TAP;
|
||||
|
||||
rv = TOUCH_SCREEN_BLANK_TAP;
|
||||
break;
|
||||
case READ_WEAPONS:
|
||||
return g_player[myconnectindex].ps->gotweapon;
|
||||
rv = g_player[myconnectindex].ps->gotweapon; break;
|
||||
case READ_AUTOMAP:
|
||||
return ud.overhead_on != 0; // ud.overhead_on ranges from 0-2
|
||||
rv = ud.overhead_on != 0; break;// ud.overhead_on ranges from 0-2
|
||||
case READ_MAPFOLLOWMODE:
|
||||
return ud.scrollmode;
|
||||
rv = ud.scrollmode; break;
|
||||
case READ_RENDERER:
|
||||
return getrendermode();
|
||||
rv = getrendermode(); break;
|
||||
case READ_LASTWEAPON:
|
||||
return droidinput.lastWeapon;
|
||||
rv = droidinput.lastWeapon;
|
||||
if ((unsigned)rv < MAX_WEAPONS && !g_player[myconnectindex].ps->ammo_amount[rv])
|
||||
rv = -1;
|
||||
break;
|
||||
case READ_PAUSED:
|
||||
return ud.pause_on != 0;
|
||||
rv = ud.pause_on != 0; break;
|
||||
case READ_IS_DEAD:
|
||||
return g_player[myconnectindex].ps->dead_flag;
|
||||
rv = g_player[myconnectindex].ps->dead_flag; break;
|
||||
case READ_INVENTORY:
|
||||
rv = 0;
|
||||
for (int i = 0; i < GET_MAX; i++)
|
||||
{
|
||||
if (g_player[myconnectindex].ps->inv_amount[i])
|
||||
rv += (1 << i);
|
||||
}
|
||||
break;
|
||||
case READ_SOMETHINGONPLAYER:
|
||||
rv = g_player[myconnectindex].ps->somethingonplayer != -1;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
rv = 0; break;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static float map_zoom,map_dx,map_dy = 0;
|
||||
|
@ -254,7 +295,7 @@ extern void CONTROL_Android_ScrollMap(int32_t *angle,int32_t *x, int32_t *y, ui
|
|||
*x += ((int)(map_dx * -30000)*sintable[(512+2048-*angle)&2047])>>14;
|
||||
*y += ((int)(map_dy * -30000)*sintable[(512+1024-512-*angle)&2047])>>14;
|
||||
|
||||
*zoom += map_zoom * 2000;
|
||||
// *zoom += map_zoom * 2000;
|
||||
//*angle = 0;
|
||||
map_dx = map_dy = map_zoom = 0;
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@ extern "C"
|
|||
#define KEY_QUICK_KEY3 0x1013
|
||||
#define KEY_QUICK_KEY4 0x1014
|
||||
|
||||
#define BUTTONSET(x,value) (CONTROL_ButtonState |= ((uint64_t)value<<((uint64_t)(x))))
|
||||
#define BUTTONCLEAR(x) (CONTROL_ButtonState &= ~((uint64_t)1<<((uint64_t)(x))))
|
||||
// #define BUTTONSET(x,value) (CONTROL_ButtonState |= ((uint64_t)value<<((uint64_t)(x))))
|
||||
// #define BUTTONCLEAR(x) (CONTROL_ButtonState &= ~((uint64_t)1<<((uint64_t)(x))))
|
||||
|
||||
#define PRECISIONSHOOTFACTOR 0.3f
|
||||
|
||||
|
@ -49,7 +49,9 @@ typedef enum {
|
|||
READ_RENDERER,
|
||||
READ_LASTWEAPON,
|
||||
READ_PAUSED,
|
||||
READ_IS_DEAD
|
||||
READ_IS_DEAD,
|
||||
READ_INVENTORY,
|
||||
READ_SOMETHINGONPLAYER
|
||||
} portableread_t;
|
||||
|
||||
|
||||
|
@ -68,6 +70,8 @@ typedef struct
|
|||
{
|
||||
int32_t crouchToggleState;
|
||||
int32_t lastWeapon;
|
||||
int32_t toggleCrouch;
|
||||
int32_t quickSelectWeapon;
|
||||
|
||||
uint64_t functionSticky; //To let at least one tick
|
||||
uint64_t functionHeld;
|
||||
|
@ -75,6 +79,8 @@ typedef struct
|
|||
int32_t left_double_action;
|
||||
int32_t right_double_action;
|
||||
|
||||
int32_t invertLook, hideStick;
|
||||
|
||||
double pitch, yaw;
|
||||
double pitch_joystick, yaw_joystick;
|
||||
float forwardmove, sidemove;
|
||||
|
@ -82,6 +88,8 @@ typedef struct
|
|||
// set by configuration UI
|
||||
float strafe_sens, forward_sens;
|
||||
float pitch_sens, yaw_sens;
|
||||
|
||||
float gameControlsAlpha;
|
||||
} droidinput_t;
|
||||
|
||||
typedef struct
|
||||
|
@ -93,8 +101,6 @@ typedef struct
|
|||
|
||||
extern droidinput_t droidinput;
|
||||
extern droidsysinfo_t droidinfo;
|
||||
extern char toggleCrouch;
|
||||
|
||||
|
||||
|
||||
int PortableKeyEvent(int state, int code, int unicode);
|
||||
|
@ -102,6 +108,9 @@ int PortableRead(portableread_t r);
|
|||
|
||||
void PortableAction(int state, int action);
|
||||
|
||||
void PortableMouseMenu(float x,float y);
|
||||
void PortableMouseMenuButton(int state,int button);
|
||||
|
||||
void PortableMove(float fwd, float strafe);
|
||||
void PortableLook(double yaw, double pitch);
|
||||
void PortableLookJoystick(double yaw, double pitch);
|
||||
|
|
|
@ -368,104 +368,102 @@ void G_ExtInit(void)
|
|||
}
|
||||
}
|
||||
|
||||
void G_ExtPreStartupWindow(void)
|
||||
void G_ScanGroups(void)
|
||||
{
|
||||
ScanGroups();
|
||||
|
||||
// try and identify the 'defaultgamegrp' in the set of GRPs.
|
||||
// if it is found, set up the environment accordingly for the game it represents.
|
||||
// if it is not found, choose the first GRP from the list
|
||||
struct grpfile *fg, *first = NULL;
|
||||
|
||||
for (fg = foundgrps; fg; fg=fg->next)
|
||||
{
|
||||
// try and identify the 'defaultgamegrp' in the set of GRPs.
|
||||
// if it is found, set up the environment accordingly for the game it represents.
|
||||
// if it is not found, choose the first GRP from the list
|
||||
struct grpfile *fg, *first = NULL;
|
||||
struct grpfile *grp;
|
||||
for (grp = listgrps; grp; grp=grp->next)
|
||||
if (fg->crcval == grp->crcval) break;
|
||||
|
||||
for (fg = foundgrps; fg; fg=fg->next)
|
||||
if (grp == NULL)
|
||||
continue;
|
||||
|
||||
fg->game = grp->game;
|
||||
if (!first) first = fg;
|
||||
if (!Bstrcasecmp(fg->name, G_DefaultGrpFile()))
|
||||
{
|
||||
struct grpfile *grp;
|
||||
for (grp = listgrps; grp; grp=grp->next)
|
||||
if (fg->crcval == grp->crcval) break;
|
||||
|
||||
if (grp == NULL)
|
||||
continue;
|
||||
|
||||
fg->game = grp->game;
|
||||
if (!first) first = fg;
|
||||
if (!Bstrcasecmp(fg->name, G_DefaultGrpFile()))
|
||||
{
|
||||
g_gameType = grp->game;
|
||||
g_gameNamePtr = grp->name;
|
||||
break;
|
||||
}
|
||||
g_gameType = grp->game;
|
||||
g_gameNamePtr = grp->name;
|
||||
break;
|
||||
}
|
||||
if (!fg && first)
|
||||
{
|
||||
if (g_grpNamePtr == NULL)
|
||||
{
|
||||
clearGrpNamePtr();
|
||||
g_grpNamePtr = dup_filename(first->name);
|
||||
}
|
||||
g_gameType = first->game;
|
||||
g_gameNamePtr = listgrps->name;
|
||||
}
|
||||
else if (!fg) g_gameNamePtr = NULL;
|
||||
}
|
||||
if (!fg && first)
|
||||
{
|
||||
if (g_grpNamePtr == NULL)
|
||||
{
|
||||
clearGrpNamePtr();
|
||||
g_grpNamePtr = dup_filename(first->name);
|
||||
}
|
||||
g_gameType = first->game;
|
||||
g_gameNamePtr = listgrps->name;
|
||||
}
|
||||
else if (!fg) g_gameNamePtr = NULL;
|
||||
}
|
||||
|
||||
void G_ExtPostStartupWindow(int32_t autoload)
|
||||
void G_LoadGroups(int32_t autoload)
|
||||
{
|
||||
if (g_modDir[0] != '/')
|
||||
{
|
||||
char cwd[BMAX_PATH];
|
||||
|
||||
Bstrcat(g_rootDir,g_modDir);
|
||||
Bstrcat(g_rootDir, g_modDir);
|
||||
addsearchpath(g_rootDir);
|
||||
// addsearchpath(mod_dir);
|
||||
// addsearchpath(mod_dir);
|
||||
|
||||
if (getcwd(cwd,BMAX_PATH))
|
||||
if (getcwd(cwd, BMAX_PATH))
|
||||
{
|
||||
Bsprintf(cwd,"%s/%s",cwd,g_modDir);
|
||||
Bsprintf(cwd, "%s/%s", cwd, g_modDir);
|
||||
if (!Bstrcmp(g_rootDir, cwd))
|
||||
{
|
||||
if (addsearchpath(cwd) == -2)
|
||||
if (Bmkdir(cwd,S_IRWXU) == 0) addsearchpath(cwd);
|
||||
if (Bmkdir(cwd, S_IRWXU) == 0)
|
||||
addsearchpath(cwd);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
Bsprintf(cwd,"%s/%s",g_modDir,TEXCACHEFILE);
|
||||
Bstrcpy(TEXCACHEFILE,cwd);
|
||||
Bsprintf(cwd, "%s/%s", g_modDir, TEXCACHEFILE);
|
||||
Bstrcpy(TEXCACHEFILE, cwd);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (g_usingAddon)
|
||||
G_LoadAddon();
|
||||
|
||||
int32_t i;
|
||||
const char *grpfile = G_GrpFile();
|
||||
|
||||
if (g_dependencyCRC)
|
||||
{
|
||||
int32_t i;
|
||||
const char *grpfile = G_GrpFile();
|
||||
|
||||
if (g_dependencyCRC)
|
||||
struct grpfile *grp = FindGroup(g_dependencyCRC);
|
||||
if (grp)
|
||||
{
|
||||
struct grpfile * grp = FindGroup(g_dependencyCRC);
|
||||
if (grp)
|
||||
{
|
||||
if ((i = initgroupfile(grp->name)) == -1)
|
||||
initprintf("Warning: could not find main data file \"%s\"!\n",grp->name);
|
||||
else
|
||||
initprintf("Using \"%s\" as main game data file.\n", grp->name);
|
||||
}
|
||||
if ((i = initgroupfile(grp->name)) == -1)
|
||||
initprintf("Warning: could not find main data file \"%s\"!\n", grp->name);
|
||||
else
|
||||
initprintf("Using \"%s\" as main game data file.\n", grp->name);
|
||||
}
|
||||
}
|
||||
|
||||
if ((i = initgroupfile(grpfile)) == -1)
|
||||
initprintf("Warning: could not find main data file \"%s\"!\n",grpfile);
|
||||
else
|
||||
initprintf("Using \"%s\" as main game data file.\n", grpfile);
|
||||
if ((i = initgroupfile(grpfile)) == -1)
|
||||
initprintf("Warning: could not find main data file \"%s\"!\n", grpfile);
|
||||
else
|
||||
initprintf("Using \"%s\" as main game data file.\n", grpfile);
|
||||
|
||||
if (autoload)
|
||||
{
|
||||
G_LoadGroupsInDir("autoload");
|
||||
if (autoload)
|
||||
{
|
||||
G_LoadGroupsInDir("autoload");
|
||||
|
||||
if (i != -1)
|
||||
G_DoAutoload(grpfile);
|
||||
}
|
||||
if (i != -1)
|
||||
G_DoAutoload(grpfile);
|
||||
}
|
||||
|
||||
if (g_modDir[0] != '/')
|
||||
|
@ -484,32 +482,30 @@ void G_ExtPostStartupWindow(int32_t autoload)
|
|||
|
||||
loaddefinitions_game(G_DefFile(), TRUE);
|
||||
|
||||
struct strllist *s;
|
||||
|
||||
pathsearchmode = 1;
|
||||
while (CommandGrps)
|
||||
{
|
||||
struct strllist *s;
|
||||
int32_t j;
|
||||
|
||||
pathsearchmode = 1;
|
||||
while (CommandGrps)
|
||||
s = CommandGrps->next;
|
||||
|
||||
if ((j = initgroupfile(CommandGrps->str)) == -1)
|
||||
initprintf("Could not find file \"%s\".\n", CommandGrps->str);
|
||||
else
|
||||
{
|
||||
int32_t j;
|
||||
|
||||
s = CommandGrps->next;
|
||||
|
||||
if ((j = initgroupfile(CommandGrps->str)) == -1)
|
||||
initprintf("Could not find file \"%s\".\n",CommandGrps->str);
|
||||
else
|
||||
{
|
||||
g_groupFileHandle = j;
|
||||
initprintf("Using file \"%s\" as game data.\n",CommandGrps->str);
|
||||
if (autoload)
|
||||
G_DoAutoload(CommandGrps->str);
|
||||
}
|
||||
|
||||
Bfree(CommandGrps->str);
|
||||
Bfree(CommandGrps);
|
||||
CommandGrps = s;
|
||||
g_groupFileHandle = j;
|
||||
initprintf("Using file \"%s\" as game data.\n", CommandGrps->str);
|
||||
if (autoload)
|
||||
G_DoAutoload(CommandGrps->str);
|
||||
}
|
||||
pathsearchmode = 0;
|
||||
|
||||
Bfree(CommandGrps->str);
|
||||
Bfree(CommandGrps);
|
||||
CommandGrps = s;
|
||||
}
|
||||
pathsearchmode = 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -60,6 +60,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "input.h"
|
||||
#include "compat.h"
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include "android.h"
|
||||
#endif
|
||||
|
||||
#ifdef LUNATIC
|
||||
# include "lunatic_game.h"
|
||||
#endif
|
||||
|
@ -2884,6 +2888,10 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t
|
|||
int32_t g_logoFlags = 255;
|
||||
#endif
|
||||
|
||||
#ifdef __ANDROID__
|
||||
int inExtraScreens = 0;
|
||||
#endif
|
||||
|
||||
static void G_DisplayExtraScreens(void)
|
||||
{
|
||||
int32_t flags = G_GetLogoFlags();
|
||||
|
@ -2893,6 +2901,9 @@ static void G_DisplayExtraScreens(void)
|
|||
|
||||
if (!DUKEBETA && (!VOLUMEALL || flags & LOGO_SHAREWARESCREENS))
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
inExtraScreens = 1;
|
||||
#endif
|
||||
setview(0,0,xdim-1,ydim-1);
|
||||
flushperms();
|
||||
//g_player[myconnectindex].ps->palette = palette;
|
||||
|
@ -2910,10 +2921,17 @@ static void G_DisplayExtraScreens(void)
|
|||
fadepaltile(0,0,0, 63,0,-7,3290);
|
||||
while (!I_CheckAllInput())
|
||||
G_HandleAsync();
|
||||
|
||||
#ifdef __ANDROID__
|
||||
inExtraScreens = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (flags & LOGO_TENSCREEN)
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
inExtraScreens = 1;
|
||||
#endif
|
||||
setview(0,0,xdim-1,ydim-1);
|
||||
flushperms();
|
||||
//g_player[myconnectindex].ps->palette = palette;
|
||||
|
@ -2928,6 +2946,9 @@ static void G_DisplayExtraScreens(void)
|
|||
|
||||
fadepaltile(0,0,0, 0,63,7, TENSCREEN);
|
||||
I_ClearAllInput();
|
||||
#ifdef __ANDROID__
|
||||
inExtraScreens = 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2976,8 +2997,6 @@ void G_GameExit(const char *msg)
|
|||
}
|
||||
}
|
||||
|
||||
uninitgroupfile();
|
||||
|
||||
Bfflush(NULL);
|
||||
|
||||
exit(0);
|
||||
|
@ -3666,12 +3685,16 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
CONTROL_Android_ScrollMap(&ud.fola,& ud.folx,&ud.foly,&pp->zoom);
|
||||
#else
|
||||
if (!ud.pause_on)
|
||||
{
|
||||
ud.fola += ud.folavel>>3;
|
||||
ud.folx += (ud.folfvel*sintable[(512+2048-ud.fola)&2047])>>14;
|
||||
ud.foly += (ud.folfvel*sintable[(512+1024-512-ud.fola)&2047])>>14;
|
||||
}
|
||||
#endif
|
||||
cposx = ud.folx;
|
||||
cposy = ud.foly;
|
||||
cang = ud.fola;
|
||||
|
@ -4413,6 +4436,11 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
|
|||
|
||||
if (pub > 0 || getrendermode() >= REND_POLYMOST) // JBF 20040101: redraw background always
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
// HACK: this is needed or else we get leftover UI texture crap where we'd get HOM on PC
|
||||
clearallviews(0L);
|
||||
#endif
|
||||
|
||||
#ifndef EDUKE32_TOUCH_DEVICES
|
||||
if (ud.screen_size >= 8)
|
||||
#endif
|
||||
|
@ -7502,8 +7530,11 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
|
|||
#endif
|
||||
|
||||
t->picnum = TILE_VIEWSCR;
|
||||
t->xrepeat = t->xrepeat & 1 ? (t->xrepeat>>2) + 1 : t->xrepeat>>2;
|
||||
t->yrepeat = t->yrepeat & 1 ? (t->yrepeat>>2) + 1 : t->yrepeat>>2;
|
||||
|
||||
#if VIEWSCREENFACTOR > 0
|
||||
t->xrepeat = (t->xrepeat>>VIEWSCREENFACTOR) + (t->xrepeat & 1);
|
||||
t->yrepeat = (t->yrepeat>>VIEWSCREENFACTOR) + (t->yrepeat & 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -9164,6 +9195,18 @@ FAKE_F3:
|
|||
if (ud.overhead_on == 3) ud.overhead_on = 0;
|
||||
ud.last_overhead = ud.overhead_on;
|
||||
}
|
||||
|
||||
#ifdef __ANDROID__
|
||||
if (ud.overhead_on == 1)
|
||||
ud.scrollmode = 0;
|
||||
else if (ud.overhead_on == 2)
|
||||
{
|
||||
ud.scrollmode = 1;
|
||||
ud.folx = g_player[screenpeek].ps->opos.x;
|
||||
ud.foly = g_player[screenpeek].ps->opos.y;
|
||||
ud.fola = g_player[screenpeek].ps->oang;
|
||||
}
|
||||
#endif
|
||||
g_restorePalette = 1;
|
||||
G_UpdateScreenArea();
|
||||
}
|
||||
|
@ -10735,6 +10778,7 @@ void G_Shutdown(void)
|
|||
G_Cleanup();
|
||||
FreeGroups();
|
||||
OSD_Cleanup();
|
||||
uninitgroupfile();
|
||||
Bfflush(NULL);
|
||||
}
|
||||
|
||||
|
@ -11067,7 +11111,10 @@ static void G_Startup(void)
|
|||
G_GameExit("Failed loading art.");
|
||||
}
|
||||
Bchdir(cwd);
|
||||
#ifndef __ANDROID__ //This crashes on *some* Android devices. Small onetime memory leak. TODO fix above function
|
||||
Bfree(cwd);
|
||||
#endif
|
||||
|
||||
}
|
||||
else if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
|
||||
G_GameExit("Failed loading art.");
|
||||
|
@ -11409,7 +11456,7 @@ int32_t app_main(int32_t argc, const char **argv)
|
|||
if (Bstrcmp(setupfilename, SETUPFILENAME))
|
||||
initprintf("Using config file \"%s\".\n",setupfilename);
|
||||
|
||||
G_ExtPreStartupWindow();
|
||||
G_ScanGroups();
|
||||
|
||||
#ifdef STARTUP_SETUP_WINDOW
|
||||
if (i < 0 || (!g_noSetup && (ud.configversion != BYTEVERSION_JF || ud.config.ForceSetup)) || g_commandSetup)
|
||||
|
@ -11429,7 +11476,7 @@ int32_t app_main(int32_t argc, const char **argv)
|
|||
}
|
||||
|
||||
flushlogwindow = 0;
|
||||
G_ExtPostStartupWindow(!g_noAutoLoad && !ud.config.NoAutoLoad);
|
||||
G_LoadGroups(!g_noAutoLoad && !ud.config.NoAutoLoad);
|
||||
// flushlogwindow = 1;
|
||||
|
||||
if (!usecwd)
|
||||
|
|
|
@ -42,6 +42,14 @@ extern "C" {
|
|||
#define MAXPWLOCKOUT 128
|
||||
#define MAXRTSNAME 128
|
||||
|
||||
#if defined(GEKKO) || defined(__OPENDINGUX__)
|
||||
# define VIEWSCREENFACTOR 0
|
||||
#elif defined(__ANDROID__)
|
||||
# define VIEWSCREENFACTOR 1
|
||||
#else
|
||||
# define VIEWSCREENFACTOR 2
|
||||
#endif
|
||||
|
||||
enum GametypeFlags_t {
|
||||
GAMETYPE_COOP = 0x00000001,
|
||||
GAMETYPE_WEAPSTAY = 0x00000002,
|
||||
|
|
|
@ -405,7 +405,7 @@ void G_AnimateCamSprite(int32_t smoothratio)
|
|||
if (OW >= 0 && dist(&sprite[ps->i], &sprite[i]) < VIEWSCREEN_ACTIVE_DISTANCE)
|
||||
{
|
||||
if (waloff[TILE_VIEWSCR] == 0)
|
||||
allocatepermanenttile(TILE_VIEWSCR, tilesiz[PN].x<<2, tilesiz[PN].y<<2);
|
||||
allocatepermanenttile(TILE_VIEWSCR, tilesiz[PN].x<<VIEWSCREENFACTOR, tilesiz[PN].y<<VIEWSCREENFACTOR);
|
||||
else
|
||||
walock[TILE_VIEWSCR] = 255;
|
||||
|
||||
|
|
Loading…
Reference in a new issue