Last active
August 29, 2015 14:22
-
-
Save zakki/929fe7408ab051fc323e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hsp3dish/emscripten/hgiox.cpp | 12 ++++++++++++ | |
hsp3dish/hgio.h | 2 ++ | |
hsp3dish/hsp3gr_dish.cpp | 5 +++++ | |
3 files changed, 19 insertions(+) | |
diff --git a/hsp3dish/emscripten/hgiox.cpp b/hsp3dish/emscripten/hgiox.cpp | |
index 428f5d1..d22b885 100644 | |
--- a/hsp3dish/emscripten/hgiox.cpp | |
+++ b/hsp3dish/emscripten/hgiox.cpp | |
@@ -662,6 +662,18 @@ int hgio_getHeight( void ) | |
} | |
+int hgio_getSizeX( void ) | |
+{ | |
+ return _sizex; | |
+} | |
+ | |
+ | |
+int hgio_getSizeY( void ) | |
+{ | |
+ return _sizey; | |
+} | |
+ | |
+ | |
void hgio_setfilter( int type, int opt ) | |
{ | |
hgio_setFilterMode( type ); | |
diff --git a/hsp3dish/hgio.h b/hsp3dish/hgio.h | |
index 3b33b79..8d407cd 100644 | |
--- a/hsp3dish/hgio.h | |
+++ b/hsp3dish/hgio.h | |
@@ -65,6 +65,8 @@ void hgio_drawsprite( hgmodel *mdl, HGMODEL_DRAWPRM *prm ); | |
void hgio_clsmode( int mode, int color, int tex ); | |
int hgio_getWidth( void ); | |
int hgio_getHeight( void ); | |
+int hgio_getSizeX( void ); | |
+int hgio_getSizeY( void ); | |
void hgio_setfilter( int type, int opt ); | |
void hgio_square( BMSCR *bm, int *posx, int *posy, int *color ); | |
diff --git a/hsp3dish/hsp3gr_dish.cpp b/hsp3dish/hsp3gr_dish.cpp | |
index 0d86cc3..d31771f 100644 | |
--- a/hsp3dish/hsp3gr_dish.cpp | |
+++ b/hsp3dish/hsp3gr_dish.cpp | |
@@ -3471,6 +3471,11 @@ static int get_ginfo( int arg ) | |
case 31: | |
return 0; | |
+ case 64: | |
+ return hgio_getSizeX(); | |
+ case 65: | |
+ return hgio_getSizeY(); | |
+ | |
default: | |
throw HSPERR_UNSUPPORTED_FUNCTION; | |
} | |
-- | |
2.1.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment