Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
public class BlendModeManager {

// Blend mode constants matching AThingLeftBehindService.blend_type
// Blend mode constants
public static final int BLEND_ADDITIVE = 0;
public static final int BLEND_MULTIPLICATIVE = 1;
public static final int BLEND_ALPHA = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,6 @@ public ColorConfig(float red, float green, float blue, float alpha) {
public static final ColorConfig REDDISH_BROWN = new ColorConfig(0.375f, 0.04f, 0.09f, 0.5f);
public static final ColorConfig PINKISH = new ColorConfig(1.0f, 0.5f, 0.5f, 0.5f);

/**
* Creates a color config from user settings (0-100 range)
*/
public static ColorConfig fromUserSettings(int[] col) {
return new ColorConfig(
col[0] / 100.0f,
col[1] / 100.0f,
col[2] / 100.0f,
col[3] / 100.0f
);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ public void Update(float deltaTime) {
}

@Override
public void sizechange(boolean smollflg) {
isSmallSize = smollflg;
public void sizechange(boolean smallflg) {
isSmallSize = smallflg;

// Update geometry based on size
geometryConfig = getGeometryForSize(smollflg);
geometryConfig = getGeometryForSize(smallflg);
apex = geometryConfig.vertices;

// Update buffer
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public void Update(float deltaTime) {
}

@Override
public void sizechange(boolean smollflg)
public void sizechange(boolean smallflg)
{
isSmallSize = smollflg;
isSmallSize = smallflg;

// Update vertex data based on size
if(smollflg) {
if(smallflg) {
apex = new float[] { -0.5f, -1.5f, 0.0f, -1.5f, -0.5f, 1.5f, 0.0f, 1.5f, };
} else {
apex = new float[] { -0.7f, -1.5f, 0.7f, -1.5f, -0.7f, 1.5f, 0.7f, 1.5f, };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ public void Update(float deltaTime) {
}

@Override
public void sizechange(boolean smollflg)
public void sizechange(boolean smallflg)
{
isSmallSize = smollflg;
isSmallSize = smallflg;

// Update vertex data based on size
if(smollflg) {
if(smallflg) {
apex = new float[] { 0f, -1.5f, 0.5f, -1.5f, 0f, 1.5f, 0.5f, 1.5f, };
} else {
apex = new float[] { 0f, -1.5f, 0.7f, -1.5f, 0f, 1.5f, 0.7f, 1.5f, };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void cleanup() {
public abstract void Update(float deltaTime);

// Optional method for size changes
public void sizechange(boolean smollflg) {
public void sizechange(boolean smallflg) {
// Default implementation does nothing
// Subclasses can override if needed
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

public class AThingLeftBehindService extends GLWallpaperServiceES32{
public static int[] textures = new int[2];
public static int blend_type;
public static int[] col = new int[4];
private static Context context = null;

// Static method to provide context to other classes
Expand Down Expand Up @@ -142,30 +140,11 @@ public void onSurfaceChanged(javax.microedition.khronos.opengles.GL10 gl, int wi
if(context != null)
{
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
String type = sp.getString("blend_type", "mul");
if(type.equals("add")) blend_type = 0;
else if(type.equals("mul")) blend_type = 1;
else if(type.equals("alpha")) blend_type = 2;
else if(type.equals("xor")) blend_type = 3;
col[0] = sp.getInt("col_R", 50);
col[1] = sp.getInt("col_G", 50);
col[2] = sp.getInt("col_B", 100);
col[3] = sp.getInt("col_Alpha", 50);
String Isvert = sp.getString("filter_size", "smoll");
if(Isvert.equals("smoll"))
{
lf.sizechange(true);
rf.sizechange(true);
}
else if(Isvert.equals("big"))
{
lf.sizechange(false);
rf.sizechange(false);
}
int gr_size = sp.getInt("size", 200);

// Create view matrix using modern approach
float cameraZ = (gr_size + 100) / 100.0f;
// Filter size is fixed to small (true)
lf.sizechange(true);
rf.sizechange(true);
// Garland size is fixed to 4.0
float cameraZ = 4.0f;
viewMatrix = MatrixUtils.lookAt(0, 0, cameraZ, 0, 0, 0, 0, 1, 0);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import androidx.preference.PreferenceFragmentCompat;
import net.t106.sinkerglwallpaper.R;
import net.t106.sinkerglwallpaper.ui.preferences.TextBoxPreference;
import net.t106.sinkerglwallpaper.ui.preferences.SeekBarPreference;
import net.t106.sinkerglwallpaper.ui.preferences.SizeChangePreference;

public class SettingsActivity extends AppCompatActivity {

Expand Down Expand Up @@ -44,22 +42,6 @@ public void onDisplayPreferenceDialog(androidx.preference.Preference preference)
dialogFragment.setArguments(bundle);
dialogFragment.setTargetFragment(this, 0);
dialogFragment.show(getParentFragmentManager(), "androidx.preference.PreferenceFragment.DIALOG");
} else if (preference instanceof SeekBarPreference) {
androidx.preference.PreferenceDialogFragmentCompat dialogFragment =
new SeekBarPreferenceDialogFragmentCompat();
Bundle bundle = new Bundle();
bundle.putString("key", preference.getKey());
dialogFragment.setArguments(bundle);
dialogFragment.setTargetFragment(this, 0);
dialogFragment.show(getParentFragmentManager(), "androidx.preference.PreferenceFragment.DIALOG");
} else if (preference instanceof SizeChangePreference) {
androidx.preference.PreferenceDialogFragmentCompat dialogFragment =
new SizeChangePreferenceDialogFragmentCompat();
Bundle bundle = new Bundle();
bundle.putString("key", preference.getKey());
dialogFragment.setArguments(bundle);
dialogFragment.setTargetFragment(this, 0);
dialogFragment.show(getParentFragmentManager(), "androidx.preference.PreferenceFragment.DIALOG");
} else {
super.onDisplayPreferenceDialog(preference);
}
Expand All @@ -80,34 +62,4 @@ public void onDialogClosed(boolean positiveResult) {
preference.onDialogClosed(positiveResult);
}
}

public static class SeekBarPreferenceDialogFragmentCompat extends androidx.preference.PreferenceDialogFragmentCompat {
@Override
protected void onBindDialogView(android.view.View view) {
super.onBindDialogView(view);
SeekBarPreference preference = (SeekBarPreference) getPreference();
preference.onBindDialogView(view);
}

@Override
public void onDialogClosed(boolean positiveResult) {
SeekBarPreference preference = (SeekBarPreference) getPreference();
preference.onDialogClosed(positiveResult);
}
}

public static class SizeChangePreferenceDialogFragmentCompat extends androidx.preference.PreferenceDialogFragmentCompat {
@Override
protected void onBindDialogView(android.view.View view) {
super.onBindDialogView(view);
SizeChangePreference preference = (SizeChangePreference) getPreference();
preference.onBindDialogView(view);
}

@Override
public void onDialogClosed(boolean positiveResult) {
SizeChangePreference preference = (SizeChangePreference) getPreference();
preference.onDialogClosed(positiveResult);
}
}
}

This file was deleted.

Loading