Skip to content

Commit

Permalink
Small HLE Pointer functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
gid15 committed Nov 9, 2018
1 parent 5e84c0a commit d892d62
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jpcsp/HLE/TPointer.java
Expand Up @@ -73,10 +73,12 @@ public TPointer sub(int addressOffset) {
return this;
}

public void alignUp(int alignment) {
public TPointer alignUp(int alignment) {
if (isNotNull()) {
address = Utilities.alignUp(address, alignment);
}

return this;
}

@Override
Expand Down
6 changes: 6 additions & 0 deletions src/jpcsp/HLE/TPointer16.java
Expand Up @@ -19,6 +19,12 @@
import jpcsp.Memory;

public class TPointer16 extends TPointerBase {
public static final TPointer16 NULL = new TPointer16();

private TPointer16() {
super();
}

public TPointer16(Memory memory, int address) {
super(memory, address, false);
}
Expand Down
6 changes: 6 additions & 0 deletions src/jpcsp/HLE/TPointer64.java
Expand Up @@ -19,6 +19,12 @@
import jpcsp.Memory;

final public class TPointer64 extends TPointerBase {
public static final TPointer64 NULL = new TPointer64();

private TPointer64() {
super();
}

public TPointer64(Memory memory, int address) {
super(memory, address, false);
}
Expand Down
6 changes: 6 additions & 0 deletions src/jpcsp/HLE/TPointer8.java
Expand Up @@ -19,6 +19,12 @@
import jpcsp.Memory;

public class TPointer8 extends TPointerBase {
public static final TPointer8 NULL = new TPointer8();

private TPointer8() {
super();
}

public TPointer8(Memory memory, int address) {
super(memory, address, false);
}
Expand Down

0 comments on commit d892d62

Please sign in to comment.