summaryrefslogtreecommitdiff
path: root/include/JSystem
diff options
context:
space:
mode:
authorjdflyer <jdflyer10@gmail.com>2022-12-29 15:22:26 -0700
committerjdflyer <jdflyer10@gmail.com>2022-12-29 15:22:26 -0700
commit56764ac3bdefe04047693f8f004d0320256b8792 (patch)
treecc472fac5434693b64975d67473aaf1e9a1b0a85 /include/JSystem
parentae040aa688d6937ded96ea46e5ab804019d1ee85 (diff)
Some Z2WolfHowlMgr progress
Diffstat (limited to 'include/JSystem')
-rw-r--r--include/JSystem/JAudio2/JAISoundHandles.h2
-rw-r--r--include/JSystem/JAudio2/JASGadget.h29
2 files changed, 24 insertions, 7 deletions
diff --git a/include/JSystem/JAudio2/JAISoundHandles.h b/include/JSystem/JAudio2/JAISoundHandles.h
index 850358facd..d79baaa2dc 100644
--- a/include/JSystem/JAudio2/JAISoundHandles.h
+++ b/include/JSystem/JAudio2/JAISoundHandles.h
@@ -10,7 +10,7 @@ class JAISoundID;
class JAISoundHandle {
public:
- JAISoundHandle();
+ JAISoundHandle() {sound_ = NULL;};
~JAISoundHandle() {}
bool isSoundAttached() const { return sound_ != NULL; }
diff --git a/include/JSystem/JAudio2/JASGadget.h b/include/JSystem/JAudio2/JASGadget.h
index 811aeacb3b..578ad9a5be 100644
--- a/include/JSystem/JAudio2/JASGadget.h
+++ b/include/JSystem/JAudio2/JASGadget.h
@@ -6,18 +6,35 @@
template <class T>
class JASGlobalInstance {
public:
- T* getInstance() { return sInstance; }
+ inline T* getInstance() { return sInstance; }
- JASGlobalInstance(bool param) {
+ inline JASGlobalInstance(bool param) {
if (param) {
ASSERT(sInstance == 0);
- if (this!=NULL) {
- sInstance = this - sizeof(T);
- }
+ //if (this!=NULL) {
+ sInstance = (T*)this;
+ //We need a better way to compute the location of sInstance
+ //sInstance = (T*)((char*)this-(char*)&(((T*)NULL)->JASGlobalInstance<T>));
+ //}
}
}
-
static T* sInstance;
};
+class Parent {
+ public:
+ int x;
+};
+
+class Parent2 {
+ public:
+ int y;
+};
+
+class Child : public Parent, public Parent2 {
+ public:
+ void func() {
+ Parent2::y = 5; // Access the member x of the Parent class
+ }
+};
#endif /* JASGADGET_H */