Skip to content

Instantly share code, notes, and snippets.

@zakki
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zakki/929fe7408ab051fc323e to your computer and use it in GitHub Desktop.
Save zakki/929fe7408ab051fc323e to your computer and use it in GitHub Desktop.
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