Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
openjazz
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
openjazz
Commits
39c8e8d7
Commit
39c8e8d7
authored
Mar 14, 2010
by
alistert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied Pickle's GP2X/Wiz patch.
parent
59165d12
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
24 deletions
+35
-24
controls.cpp
src/io/controls.cpp
+2
-2
video.cpp
src/io/gfx/video.cpp
+3
-4
sound.cpp
src/io/sound.cpp
+5
-0
main.cpp
src/main.cpp
+4
-4
setupmenu.cpp
src/menu/setupmenu.cpp
+21
-14
No files found.
src/io/controls.cpp
View file @
39c8e8d7
...
...
@@ -27,7 +27,7 @@
#include "controls.h"
#if
def WIZ
#if
defined(WIZ) || defined(GP2X)
#include "platforms/wiz.h"
#endif
...
...
@@ -53,7 +53,7 @@ Controls::Controls () {
keys
[
C_STATS
].
key
=
SDLK_F9
;
keys
[
C_PAUSE
].
key
=
SDLK_p
;
#if
def WIZ
#if
defined(WIZ) || defined(GP2X)
buttons
[
C_UP
].
button
=
GP2X_BUTTON_UP
;
buttons
[
C_DOWN
].
button
=
GP2X_BUTTON_DOWN
;
buttons
[
C_LEFT
].
button
=
GP2X_BUTTON_LEFT
;
...
...
src/io/gfx/video.cpp
View file @
39c8e8d7
...
...
@@ -61,15 +61,14 @@ SDL_Surface * createSurface (unsigned char * pixels, int width, int height) {
void
createFullscreen
()
{
SDL_ShowCursor
(
SDL_DISABLE
);
#ifdef WIZ
screen
=
SDL_SetVideoMode
(
screenW
,
screenH
,
8
,
#if defined(WIZ) || defined(GP2X)
screen
=
SDL_SetVideoMode
(
320
,
240
,
8
,
SDL_FULLSCREEN
|
SDL_SWSURFACE
|
SDL_HWPALETTE
);
#else
screen
=
SDL_SetVideoMode
(
screenW
,
screenH
,
8
,
SDL_FULLSCREEN
|
SDL_DOUBLEBUF
|
SDL_HWSURFACE
|
SDL_HWPALETTE
);
#endif
SDL_ShowCursor
(
SDL_DISABLE
);
SDL_SetPalette
(
screen
,
SDL_LOGPAL
,
logicalPalette
,
0
,
256
);
SDL_SetPalette
(
screen
,
SDL_PHYSPAL
,
currentPalette
,
0
,
256
);
...
...
src/io/sound.cpp
View file @
39c8e8d7
...
...
@@ -48,10 +48,15 @@ ModPlugFile *musicFile;
#define MUSIC_RESAMPLEMODE MODPLUG_RESAMPLE_LINEAR
#define MUSIC_FLAGS MODPLUG_ENABLE_MEGABASS
#else
#if defined(WIZ) || defined(GP2X)
#define MUSIC_RESAMPLEMODE MODPLUG_RESAMPLE_LINEAR
#define MUSIC_FLAGS 0
#else
#define MUSIC_RESAMPLEMODE MODPLUG_RESAMPLE_FIR
#define MUSIC_FLAGS MODPLUG_ENABLE_NOISE_REDUCTION | MODPLUG_ENABLE_REVERB | MODPLUG_ENABLE_MEGABASS | MODPLUG_ENABLE_SURROUND
#endif
#endif
#endif
SDL_AudioSpec
audioSpec
;
...
...
src/main.cpp
View file @
39c8e8d7
...
...
@@ -47,7 +47,7 @@
#include <string.h>
#if
def WIZ
#if
defined(WIZ) || defined(GP2X)
#include "platforms/wiz.h"
extern
int
volume
;
extern
int
volume_direction
;
...
...
@@ -570,7 +570,7 @@ int loop (int type) {
}
#endif
#if
def WIZ
#if
defined(WIZ) || defined(GP2X)
SDL_ShowCursor
(
SDL_DISABLE
);
#endif
// Break statement intentionally omitted
...
...
@@ -584,7 +584,7 @@ int loop (int type) {
if
(
ret
!=
E_NONE
)
return
ret
;
#if
def WIZ
#if
defined(WIZ) || defined(GP2X)
if
(
event
.
jbutton
.
button
==
GP2X_BUTTON_VOLUP
)
{
if
(
event
.
type
==
SDL_JOYBUTTONDOWN
)
volume_direction
=
VOLUME_UP
;
...
...
@@ -655,7 +655,7 @@ int loop (int type) {
}
#if
def WIZ
#if
defined(WIZ) || defined(GP2X)
WIZ_AdjustVolume
(
volume_direction
);
#endif
...
...
src/menu/setupmenu.cpp
View file @
39c8e8d7
...
...
@@ -258,8 +258,6 @@ int Menu::setupJoystick () {
int
Menu
::
setupResolution
()
{
#ifndef FULLSCREEN_ONLY
int
widthOptions
[]
=
{
320
,
400
,
512
,
640
,
720
,
768
,
800
,
960
,
1024
,
1152
,
1280
,
1440
,
1600
,
1920
};
int
heightOptions
[]
=
{
200
,
240
,
300
,
384
,
400
,
480
,
576
,
600
,
720
,
768
,
...
...
@@ -269,20 +267,25 @@ int Menu::setupResolution () {
dimension
=
0
;
if
(
fullscreen
)
#ifndef FULLSCREEN_ONLY
if
(
!
fullscreen
)
resolutions
=
SDL_ListModes
(
NULL
,
SDL_
FULLSCREEN
|
SDL_DOUBLEBUF
|
SDL_HWSURFACE
|
SDL_HWPALETTE
);
SDL_
RESIZABLE
|
SDL_DOUBLEBUF
|
SDL_HWSURFACE
|
SDL_HWPALETTE
);
else
#endif
resolutions
=
SDL_ListModes
(
NULL
,
SDL_
RESIZABLE
|
SDL_DOUBLEBUF
|
SDL_HWSURFACE
|
SDL_HWPALETTE
);
SDL_
FULLSCREEN
|
SDL_DOUBLEBUF
|
SDL_HWSURFACE
|
SDL_HWPALETTE
);
#if defined(WIZ) || defined(GP2X)
maxW
=
320
;
maxH
=
240
;
#else
if
(
resolutions
==
(
SDL_Rect
**
)(
-
1
))
{
maxW
=
1920
;
maxH
=
1200
;
}
else
{
maxW
=
320
;
maxH
=
200
;
...
...
@@ -292,8 +295,8 @@ int Menu::setupResolution () {
if
(
resolutions
[
count
]
->
h
>
maxH
)
maxH
=
resolutions
[
count
]
->
h
;
}
}
#endif
while
(
true
)
{
...
...
@@ -386,15 +389,19 @@ int Menu::setupResolution () {
playSound
(
S_ORB
);
if
(
fullscreen
)
createFullscreen
();
else
createWindow
();
#ifndef FULLSCREEN_ONLY
if
(
!
fullscreen
)
{
createWindow
();
}
else
#endif
createFullscreen
();
}
}
#endif
return
E_NONE
;
}
...
...
@@ -461,9 +468,9 @@ int Menu::setup () {
break
;
case
1
:
#if !defined(WIZ) && !defined(GP2X)
setupKeyboard
();
#endif
break
;
case
2
:
...
...
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