Commit 0ece4c53 authored by Kiste's avatar Kiste
Browse files

Change default scaling to linear

parent ac637334
......@@ -34,11 +34,11 @@ noiz2sa0_51.zipを適当なフォルダに展開してください。
自機は200,000点および500,000点ごとに1機増えます。
以下のコマンドラインオプションが指定できます。
-nosound 音を出力しません。
-window ウィンドウモードで起動します。
-reverse ショットとスローダウンのキーを入れ替えます。
-brightness n 画面の明るさを設定します(n=0-256)。
-accframe 別のフレームレート制御方法を利用します。
--nosound 音を出力しません。
--window ウィンドウモードで起動します。
--reverse ショットとスローダウンのキーを入れ替えます。
--brightness n 画面の明るさを設定します(n=0-256)。
--accframe 別のフレームレート制御方法を利用します。
(フレームレートが一定しないなどの問題がある場合に
利用してください。)
......
......@@ -34,11 +34,11 @@ When all ships are destroyed, the game is over.
The ship extends 200,000 and every 500,000 points.
These command line options are available:
-nosound Stop the sound.
-window Launch the game in the window, not use the full-screen.
-reverse Reverse the fire key and the slowdown key.
-brightness n Set the brightness of the sceen(n=0-256).
-accframe Use the alternative framerate management algorithm.
--nosound Stop the sound.
--window Launch the game in the window, not use the full-screen.
--reverse Reverse the fire key and the slowdown key.
--brightness n Set the brightness of the sceen(n=0-256).
--accframe Use the alternative framerate management algorithm.
(If you have a problem with framerate, try this option.)
- Add your original barrage patterns.
......
......@@ -225,29 +225,29 @@ static void draw() {
static int accframe = 0;
static void usage(char *argv0) {
fprintf(stderr, "Usage: %s [-nosound] [-window] [-reverse] [-brightness n] [-nowait] [-accframe] [-linear]\n", argv0);
fprintf(stderr, "Usage: %s [--nosound] [--window] [--reverse] [--brightness n] [--nowait] [--accframe] [--nearest]\n", argv0);
}
static void parseArgs(int argc, char *argv[]) {
int i;
for ( i=1 ; i<argc ; i++ ) {
if ( strcmp(argv[i], "-nosound") == 0 ) {
if ( strcmp(argv[i], "--nosound") == 0 ) {
noSound = 1;
} else if ( strcmp(argv[i], "-window") == 0 ) {
} else if ( strcmp(argv[i], "--window") == 0 ) {
windowMode = 1;
} else if ( strcmp(argv[i], "-linear") == 0 ) {
linearScaling = 1;
} else if ( strcmp(argv[i], "-reverse") == 0 ) {
} else if ( strcmp(argv[i], "--nearest") == 0 ) {
nearestScaling = 1;
} else if ( strcmp(argv[i], "--reverse") == 0 ) {
buttonReversed = 1;
} else if ( (strcmp(argv[i], "-brightness") == 0) && argv[i+1] ) {
} else if ( (strcmp(argv[i], "--brightness") == 0) && argv[i+1] ) {
i++;
brightness = (int)atoi(argv[i]);
if ( brightness < 0 || brightness > 256 ) {
brightness = DEFAULT_BRIGHTNESS;
}
} else if ( strcmp(argv[i], "-nowait") == 0 ) {
} else if ( strcmp(argv[i], "--nowait") == 0 ) {
nowait = 1;
} else if ( strcmp(argv[i], "-accframe") == 0 ) {
} else if ( strcmp(argv[i], "--accframe") == 0 ) {
accframe = 1;
} else {
usage(argv[0]);
......@@ -271,7 +271,7 @@ int main(int argc, char *argv[]) {
parseArgs(argc, argv);
initDegutil();
initSDL(windowMode, linearScaling);
initSDL(windowMode, nearestScaling);
if ( !noSound ) initSound();
initFirst();
initTitle();
......
......@@ -24,7 +24,7 @@
#include "attractmanager.h"
int windowMode = 0;
int linearScaling = 0;
int nearestScaling = 0;
int brightness = DEFAULT_BRIGHTNESS;
static SDL_Surface *video, *layer, *lpanel, *rpanel, *helperSurface = NULL;
......@@ -147,7 +147,7 @@ void initSDL(int window, int scaling) {
windowFlags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_INPUT_FOCUS;
if ( !window ) windowFlags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaling ? "linear" : "nearest");
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaling ? "nearest" : "linear");
sdlWindow = SDL_CreateWindow(CAPTION, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, windowFlags);
if ( sdlWindow == NULL ) {
......
......@@ -37,7 +37,7 @@
#define DEFAULT_BRIGHTNESS 224
extern int windowMode;
extern int linearScaling;
extern int nearestScaling;
extern LayerBit *l1buf, *l2buf;
extern LayerBit *buf;
extern LayerBit *lpbuf, *rpbuf;
......@@ -46,7 +46,7 @@ extern SDL_Joystick *stick;
extern int buttonReversed;
extern int brightness;
void initSDL(int window, int linearScaling);
void initSDL(int window, int scaling);
void closeSDL();
void blendScreen();
void flipScreen();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment