Skip to content

Commit

Permalink
1.1.0harmattan37-free
Browse files Browse the repository at this point in the history
  • Loading branch information
glKarin committed Jan 9, 2024
1 parent ff3f0f5 commit baf9b80
Show file tree
Hide file tree
Showing 44 changed files with 2,886 additions and 544 deletions.
16 changes: 13 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## Change logs
**1.1.0harmattan36(natasha)** - **2023-12-31**

> 1.1.0harmattan37 (2024-01-06)
* Fixed on-screen buttons initial keycodes.
* On-screen slider button can setup clickable.
* Add dds screenshot support.
* Add cvar `r_scaleMenusTo43` for 4:3 menu.

----------------------------------------------------------------------------------

> 1.1.0harmattan36 (2023-12-31)
* Fixed prelight shadow's shadow mapping.
* Fixed EFX Reverb in Quake4.
Expand All @@ -12,11 +22,11 @@
* Add `Stupid Angry Bot`(a7x) mod of DOOM3 support(need DOOM3: RoE game data), game data directory named `sabot`. More view in [SABot(a7x)](https://www.moddb.com/downloads/sabot-alpha-7x).
* Add `Overthinked DooM^3` mod of DOOM3 support, game data directory named `overthinked`. More view in [Overthinked DooM^3](https://www.moddb.com/mods/overthinked-doom3).
* Add `Fragging Free` mod of DOOM3 support(need DOOM3: RoE game data), game data directory named `fraggingfree`. More view in [Fragging Free](https://www.moddb.com/mods/fragging-free).
* Add `HeXen:Edge of Chaos` mod of DOOM3 support, game data directory named `hexeneoc`. More view in [Overthinked DooM^3](https://www.moddb.com/mods/hexen-edge-of-chaos).
* Add `HeXen:Edge of Chaos` mod of DOOM3 support, game data directory named `hexeneoc`. More view in [HeXen:Edge of Chaos](https://www.moddb.com/mods/hexen-edge-of-chaos).

----------------------------------------------------------------------------------

> 1.1.0harmattan33 (2023-10-29)
> 1.1.0harmattan35 (2023-10-29)
* Optimize soft shadow with shadow mapping. Add shadow map with depth texture in OpenGLES2.0.
* Add OpenAL(soft) and EFX Reverb support.
Expand Down
16 changes: 13 additions & 3 deletions CHANGES.zh.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## 更新日志
**1.1.0harmattan36(natasha)** - **2023-12-31**

> 1.1.0harmattan37 (2024-01-06)
* 修复屏幕按键初始键码配置.
* 滑动按键支持设置为点击触发.
* 新增dds格式屏幕截图.
* 新增cvar `r_scaleMenusTo43`启用4:3比例菜单.

----------------------------------------------------------------------------------

> 1.1.0harmattan36 (2023-12-31)
* 修复预烘培阴影图软阴影渲染.
* 雷神之锤4修复EFX混响.
Expand All @@ -12,11 +22,11 @@
* 添加毁灭战士3 mod `Stupid Angry Bot`(a7x)(需要邪恶复苏数据包), 游戏数据文件夹名为`sabot`. 详情 [SABot(a7x)](https://www.moddb.com/downloads/sabot-alpha-7x).
* 添加毁灭战士3 mod `Overthinked DooM^3`, 游戏数据文件夹名为`overthinked`. 详情 [Overthinked DooM^3](https://www.moddb.com/mods/overthinked-doom3).
* 添加毁灭战士3 mod `Fragging Free`(需要邪恶复苏数据包), 游戏数据文件夹名为`fraggingfree`. 详情 [Fragging Free](https://www.moddb.com/mods/fragging-free).
* 添加毁灭战士3 mod `HeXen:Edge of Chaos`, 游戏数据文件夹名为`hexeneoc`. 详情 [Overthinked DooM^3](https://www.moddb.com/mods/hexen-edge-of-chaos).
* 添加毁灭战士3 mod `HeXen:Edge of Chaos`, 游戏数据文件夹名为`hexeneoc`. 详情 [HeXen:Edge of Chaos](https://www.moddb.com/mods/hexen-edge-of-chaos).

----------------------------------------------------------------------------------

> 1.1.0harmattan33 (2023-10-29)
> 1.1.0harmattan35 (2023-10-29)
* 优化Shadow mapping软阴影. OpenGLES2.0阴影图使用深度纹理.
* 新增OpenALA(soft)和EFX混响支持.",
Expand Down
10 changes: 5 additions & 5 deletions CHECK_FOR_UPDATE.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"release":36,
"update":"2023-12-31",
"version":"1.1.0harmattan36",
"apk_url":"https://github.com/glKarin/com.n0n3m4.diii4a/releases/download/v1.1.0harmattan36/idTech4A++_1.1.0harmattan36.apk",
"changes":" * Fixed prelight shadow's shadow mapping.\n * Fixed EFX Reverb in Quake4.\n * Add translucent stencil shadow support in stencil shadow(bool cvar `harm_r_translucentStencilShadow`(default 0); float cvar `harm_r_stencilShadowAlpha` for setting transparency).\n * Add float cvar `harm_ui_subtitlesTextScale` control subtitles's text scale in Prey.\n * Support cvar `r_brightness`.\n * Fixed weapon projectile's scorches decals rendering in Prey(2006).\n * Data directory chooser support Android SAF.\n * New default on-screen buttons layout.\n * Add `Stupid Angry Bot`(a7x) mod of DOOM3 support(need DOOM3: RoE game data), game data directory named `sabot`. More view in [SABot(a7x)](https://www.moddb.com/downloads/sabot-alpha-7x).\n * Add `Overthinked DooM^3` mod of DOOM3 support, game data directory named `overthinked`. More view in [Overthinked DooM^3](https://www.moddb.com/mods/overthinked-doom3).\n * Add `Fragging Free` mod of DOOM3 support(need DOOM3: RoE game data), game data directory named `fraggingfree`. More view in [Fragging Free](https://www.moddb.com/mods/fragging-free).\n * Add `HeXen:Edge of Chaos` mod of DOOM3 support, game data directory named `hexeneoc`. More view in [Overthinked DooM^3](https://www.moddb.com/mods/hexen-edge-of-chaos)."
"release":37,
"update":"2024-01-06",
"version":"1.1.0harmattan37",
"apk_url":"https://github.com/glKarin/com.n0n3m4.diii4a/releases/download/v1.1.0harmattan37/idTech4A++_1.1.0harmattan37.apk",
"changes":" * Fixed on-screen buttons initial keycodes.\n * On-screen slider button can setup clickable.\n * Add dds screenshot support.\n * Add cvar `r_scaleMenusTo43` for 4:3 menu."
}
2 changes: 2 additions & 0 deletions Q3E/src/main/java/com/n0n3m4/q3e/Q3EGlobals.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public final class Q3EGlobals
// on-screen slider type
public static final int ONSCRREN_SLIDER_STYLE_LEFT_RIGHT = 0;
public static final int ONSCRREN_SLIDER_STYLE_DOWN_RIGHT = 1;
public static final int ONSCRREN_SLIDER_STYLE_LEFT_RIGHT_SPLIT_CLICK = 2;
public static final int ONSCRREN_SLIDER_STYLE_DOWN_RIGHT_SPLIT_CLICK = 3;

// game state
public static final int STATE_NONE = 0;
Expand Down
60 changes: 31 additions & 29 deletions Q3E/src/main/java/com/n0n3m4/q3e/Q3EInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import android.content.Context;
import android.os.Environment;
import android.preference.PreferenceManager;
import android.util.Log;

import java.io.File;
import java.util.Arrays;
Expand All @@ -32,6 +33,7 @@ public class Q3EInterface
private static int[] _defaultArgs;
private static int[] _defaultType;
static {
Q3EKeyCodes.InitD3Keycodes();
InitDefaultTypeTable();
InitDefaultArgTable();
}
Expand All @@ -40,7 +42,7 @@ public class Q3EInterface
public String[] defaults_table;
public String[] texture_table;
public int[] type_table;
public int[] arg_table; //key,key,key,style or key,canbeheld,style,null
public int[] arg_table; // slider: key,key,key,style | button: key,canbeheld,style,null

public boolean isRTCW=false;
public boolean isQ1=false;
Expand Down Expand Up @@ -316,79 +318,79 @@ private static void InitDefaultArgTable()
int[] arg_table = new int[Q3EGlobals.UI_SIZE * 4];

arg_table[Q3EGlobals.UI_SHOOT * 4] = Q3EKeyCodes.KeyCodes.K_MOUSE1;
arg_table[Q3EGlobals.UI_SHOOT * 4 + 1] = 0;
arg_table[Q3EGlobals.UI_SHOOT * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_SHOOT * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD;
arg_table[Q3EGlobals.UI_SHOOT * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_SHOOT * 4 + 3] = 0;


arg_table[Q3EGlobals.UI_JUMP * 4] = Q3EKeyCodes.KeyCodes.K_SPACE;
arg_table[Q3EGlobals.UI_JUMP * 4 + 1] = 0;
arg_table[Q3EGlobals.UI_JUMP * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_JUMP * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD;
arg_table[Q3EGlobals.UI_JUMP * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_JUMP * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_CROUCH * 4] = Q3EKeyCodes.KeyCodesD3.K_C; // BFG
arg_table[Q3EGlobals.UI_CROUCH * 4 + 1] = 1;
arg_table[Q3EGlobals.UI_CROUCH * 4 + 2] = 1;
arg_table[Q3EGlobals.UI_CROUCH * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_CAN_HOLD;
arg_table[Q3EGlobals.UI_CROUCH * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_RIGHT_BOTTOM;
arg_table[Q3EGlobals.UI_CROUCH * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_RELOADBAR * 4] = Q3EKeyCodes.KeyCodesD3.K_BRACKET_RIGHT; // 93
arg_table[Q3EGlobals.UI_RELOADBAR * 4 + 1] = Q3EKeyCodes.KeyCodesD3.K_R; // 114
arg_table[Q3EGlobals.UI_RELOADBAR * 4 + 2] = Q3EKeyCodes.KeyCodesD3.K_BRACKET_LEFT; // 91
arg_table[Q3EGlobals.UI_RELOADBAR * 4 + 3] = 0;
arg_table[Q3EGlobals.UI_RELOADBAR * 4 + 3] = Q3EGlobals.ONSCRREN_SLIDER_STYLE_LEFT_RIGHT;

arg_table[Q3EGlobals.UI_PDA * 4] = Q3EKeyCodes.KeyCodes.K_TAB;
arg_table[Q3EGlobals.UI_PDA * 4 + 1] = 0;
arg_table[Q3EGlobals.UI_PDA * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_PDA * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD;
arg_table[Q3EGlobals.UI_PDA * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_PDA * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_FLASHLIGHT * 4] = Q3EKeyCodes.KeyCodesD3.K_F; // BFG
arg_table[Q3EGlobals.UI_FLASHLIGHT * 4 + 1] = 0;
arg_table[Q3EGlobals.UI_FLASHLIGHT * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_FLASHLIGHT * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD;
arg_table[Q3EGlobals.UI_FLASHLIGHT * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_FLASHLIGHT * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_SAVE * 4] = Q3EKeyCodes.KeyCodes.K_F5;
arg_table[Q3EGlobals.UI_SAVE * 4 + 1] = Q3EKeyCodes.KeyCodes.K_ESCAPE;
arg_table[Q3EGlobals.UI_SAVE * 4 + 2] = Q3EKeyCodes.KeyCodes.K_F9;
arg_table[Q3EGlobals.UI_SAVE * 4 + 3] = 1;
arg_table[Q3EGlobals.UI_SAVE * 4 + 3] = Q3EGlobals.ONSCRREN_SLIDER_STYLE_DOWN_RIGHT;

arg_table[Q3EGlobals.UI_1 * 4] = Q3EKeyCodes.KeyCodesD3BFG.K_1;
arg_table[Q3EGlobals.UI_1 * 4 + 1] = 0;
arg_table[Q3EGlobals.UI_1 * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_1 * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD;
arg_table[Q3EGlobals.UI_1 * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_1 * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_2 * 4] = Q3EKeyCodes.KeyCodesD3BFG.K_2;
arg_table[Q3EGlobals.UI_2 * 4 + 1] = 0;
arg_table[Q3EGlobals.UI_2 * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_2 * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD;
arg_table[Q3EGlobals.UI_2 * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_2 * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_3 * 4] = Q3EKeyCodes.KeyCodesD3BFG.K_3;
arg_table[Q3EGlobals.UI_3 * 4 + 1] = 0;
arg_table[Q3EGlobals.UI_3 * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_3 * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD;
arg_table[Q3EGlobals.UI_3 * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_3 * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_KBD * 4] = Q3EKeyCodes.K_VKBD;
arg_table[Q3EGlobals.UI_KBD * 4 + 1] = 0;
arg_table[Q3EGlobals.UI_KBD * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_KBD * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD;
arg_table[Q3EGlobals.UI_KBD * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_KBD * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_CONSOLE * 4] = Q3EKeyCodes.KeyCodesD3.K_CONSOLE;
arg_table[Q3EGlobals.UI_CONSOLE * 4 + 1] = 0;
arg_table[Q3EGlobals.UI_CONSOLE * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_CONSOLE * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD;
arg_table[Q3EGlobals.UI_CONSOLE * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_CONSOLE * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_RUN * 4] = Q3EKeyCodes.KeyCodesD3.K_SHIFT;
arg_table[Q3EGlobals.UI_RUN * 4 + 1] = 1;
arg_table[Q3EGlobals.UI_RUN * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_RUN * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_CAN_HOLD;
arg_table[Q3EGlobals.UI_RUN * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_RUN * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_ZOOM * 4] = Q3EKeyCodes.KeyCodesD3.K_Z;
arg_table[Q3EGlobals.UI_ZOOM * 4 + 1] = 1;
arg_table[Q3EGlobals.UI_ZOOM * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_ZOOM * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_CAN_HOLD;
arg_table[Q3EGlobals.UI_ZOOM * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_ZOOM * 4 + 3] = 0;

arg_table[Q3EGlobals.UI_INTERACT * 4] = Q3EKeyCodes.KeyCodesD3.K_MOUSE2;
arg_table[Q3EGlobals.UI_INTERACT * 4 + 1] = 0;
arg_table[Q3EGlobals.UI_INTERACT * 4 + 2] = 0;
arg_table[Q3EGlobals.UI_INTERACT * 4 + 1] = Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD;
arg_table[Q3EGlobals.UI_INTERACT * 4 + 2] = Q3EGlobals.ONSCREEN_BUTTON_TYPE_FULL;
arg_table[Q3EGlobals.UI_INTERACT * 4 + 3] = 0;

_defaultArgs = Arrays.copyOf(arg_table, arg_table.length);
Expand Down
18 changes: 18 additions & 0 deletions Q3E/src/main/java/com/n0n3m4/q3e/onscreen/ButtonKey.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.n0n3m4.q3e.onscreen;

import com.n0n3m4.q3e.Q3EGlobals;

public class ButtonKey implements OnScreenKey
{
public int key;
public boolean hold;
public int style;

@Override
public int[] ToArray()
{
return new int[] {
key, hold ? Q3EGlobals.ONSCRREN_BUTTON_CAN_HOLD : Q3EGlobals.ONSCRREN_BUTTON_NOT_HOLD, style, 0
};
}
}
6 changes: 6 additions & 0 deletions Q3E/src/main/java/com/n0n3m4/q3e/onscreen/OnScreenKey.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.n0n3m4.q3e.onscreen;

public interface OnScreenKey
{
public int[] ToArray();
}
23 changes: 0 additions & 23 deletions Q3E/src/main/java/com/n0n3m4/q3e/onscreen/Q3EControls.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,29 +89,6 @@ private static String ButtonLayoutStr(Number x, Number y, Number r_or_w, Number
return x.intValue() + " " + y.intValue() + " " + r_or_w.intValue() + " " + a.intValue();
}

private static class ButtonLayout
{
public final int x, y, width_or_radius, alpha;
public ButtonLayout(Number x, Number y, Number r_or_w, Number a)
{
this.x = x.intValue();
this.y = y.intValue();
this.width_or_radius = r_or_w.intValue();
this.alpha = a.intValue();
}

@Override
public String toString()
{
return x + " " + y + " " + width_or_radius + " " + alpha;
}
}

private static int Dip2px(Activity context, int i, float scale)
{
return Math.round((float)Q3EUtils.dip2px(context, i) * scale);
}

public static String[] GetDefaultLayout(Activity context, boolean friendly, float scale, int opacity, boolean landscape)
{
return Q3EButtonLayoutManager.GetDefaultLayout(context, friendly, scale, opacity, landscape);
Expand Down
Loading

0 comments on commit baf9b80

Please sign in to comment.